@mnmal-ai/substrate-nl 1.0.0-alpha.1 → 1.0.0-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/access.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Query, Schema, SubstrateRequest } from '@mnmal-ai/substrate/sdk';
1
+ import type { PlanClause, Query, Schema, SubstrateRequest } from '@mnmal-ai/substrate/sdk';
2
2
  export interface NlEnvelope {
3
3
  data?: Record<string, unknown>;
4
4
  errors?: unknown[];
@@ -6,6 +6,10 @@ export interface NlEnvelope {
6
6
  nextCursor?: string;
7
7
  hasMore: boolean;
8
8
  }>;
9
+ /** Per frame key; `plan` marks a walk read's clauses index-served or not. */
10
+ _diagnostics?: Record<string, {
11
+ plan?: PlanClause[];
12
+ }>;
9
13
  }
10
14
  export interface NlEngineAccess {
11
15
  /** Live namespace schemas (with annotations). */
@@ -1 +1 @@
1
- {"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../src/access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE/E,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CACzE;AAED,MAAM,WAAW,cAAc;IAC7B,iDAAiD;IACjD,eAAe,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,wFAAwF;IACxF,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC;IACrE,yFAAyF;IACzF,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACjE"}
1
+ {"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../src/access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3F,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACxE,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,CAAC,EAAE,UAAU,EAAE,CAAA;KAAE,CAAC,CAAC;CACxD;AAED,MAAM,WAAW,cAAc;IAC7B,iDAAiD;IACjD,eAAe,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,wFAAwF;IACxF,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC;IACrE,yFAAyF;IACzF,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACjE"}
package/dist/ask/run.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { SubstrateRequest } from '@mnmal-ai/substrate/sdk';
1
+ import { type PlanClause, type SubstrateRequest } from '@mnmal-ai/substrate/sdk';
2
2
  import type { NlEngineAccess } from '../access.js';
3
3
  import { type Judge } from '../judge/judge.js';
4
4
  import type { ServedPack } from '../pack/service.js';
@@ -10,5 +10,12 @@ export interface AskDeps {
10
10
  judgeTimeoutMs?: number;
11
11
  now?: () => Date;
12
12
  }
13
+ /**
14
+ * The parser's plan with the engine's `served`/`recommend` where the engine
15
+ * planned the same clause (matched by path: the engine's path is a prefix of
16
+ * the parser's labelled one, or, for a NOT, extends it). Parser-only clauses
17
+ * keep their entries; engine-only clauses are appended.
18
+ */
19
+ export declare function mergePlan(parsed: PlanClause[], engine: PlanClause[] | undefined): PlanClause[];
13
20
  export declare function runAsk(req: AskRequest, http: SubstrateRequest, deps: AskDeps): AsyncGenerator<NlEvent>;
14
21
  //# sourceMappingURL=run.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/ask/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,KAAK,KAAK,EAAqC,MAAM,mBAAmB,CAAC;AAElF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAa,MAAM,aAAa,CAAC;AAElE,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;CAClB;AA+ED,wBAAuB,MAAM,CAC3B,GAAG,EAAE,UAAU,EACf,IAAI,EAAE,gBAAgB,EACtB,IAAI,EAAE,OAAO,GACZ,cAAc,CAAC,OAAO,CAAC,CA8GzB"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/ask/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EA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