Capability first · transport second

RecordPassageIndex.js

Indexes text lines, page markers, dates, rules, and excerpts for record review.

SDK 0.5.18Runtime 0.8.12Protocol arcane/1
On this page

Overview

Indexes text lines, page markers, dates, rules, and excerpts for record review.

  • Artifact
    RecordPassageIndex.js · esm
  • Classification
    public first party
  • Availability
    Cross-host
  • Normalization
    Complete selected excerpts and every unique date/rule finding are preserved without character or result-count caps.

Import and lifecycle

JavaScript
import * as module from '/arcane/modules/RecordPassageIndex.js';

Pure complete text/page/date/rule analysis. Supplied accept callbacks run synchronously; inputs are not mutated.

Application-facing behavior: Eight text/page/date/rule helper exports.

Protocol and host implementation

In-process only This detail does not widen the application-facing API or grant authority.

Exports, signatures, parameters, and results

BindingFormDeclaration or signatureParameter syntax
cleanExcerptfunctionfunction cleanExcerpt(lines=[],start=0,end=start)lines=[],start=0,end=start
extractDateMentionsfunctionfunction extractDateMentions(text='',{ recordId='', contextLines=1 }={})text='',{ recordId='', contextLines=1 }={}
findRulePassagesfunctionfunction findRulePassages(text='',rules=[],{ recordId='', contextLines=2 }={})text='',rules=[],{ recordId='', contextLines=2 }={}
pageAtLinefunctionfunction pageAtLine(markers=[],line=0)markers=[],line=0
pageMarkersfunctionfunction pageMarkers(lines=[])lines=[]
parseDateMentionfunctionfunction parseDateMention(value='')value=''
textLinesfunctionfunction textLines(value='')value=''
validIsoDatefunctionfunction validIsoDate(year,month=1,day=1)year,month=1,day=1

Parameter meanings and results

textLines(text); cleanExcerpt(lines,start,end) preserves the complete selected excerpt; pageMarkers(lines); pageAtLine(markers,line); validIsoDate(y,m,d); parseDateMention(text); extractDateMentions(text,options) returns all sorted findings; findRulePassages(text,rules,options) returns all unique findings.

Events, side effects, and errors

Source-literal CustomEvent dispatches

No source-literal CustomEvent dispatch is part of this artifact.

Lifecycle and event flow

This artifact has no additional documented lifecycle event flow.

Direct coded failures

This artifact directly assigns no stable coded failure.

Exported Error subclasses

This artifact exports no Error subclass.

Documented failure behavior

  • Invalid caller RegExp/pattern or accept callback errors propagate.

Availability and capabilities

Cross-host. Complete selected excerpts and every unique date/rule finding are preserved without character or result-count caps.

None.

Contract example

JavaScript
import {findRulePassages} from '/arcane/modules/RecordPassageIndex.js';

const findings = findRulePassages(
    '# PDF Page 2\nPayment due Friday.',
    [{id:'payment',label:'Payment',patterns:[/payment due/gi]}],
    {recordId:'A1000'}
);
console.log(findings[0]);

No direct Core call is claimed for this artifact. Any injected provider or consuming module retains its own documented authority.