@rsconcept/rstool 1.6.0 → 1.7.1

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.
Files changed (63) hide show
  1. package/README.md +5 -4
  2. package/dist/{agent-workflow-BTwrxOoX.d.ts → agent-workflow-BqEC_Foh.d.ts} +51 -7
  3. package/dist/{analysis-DA44pfgA.d.ts → analysis-C7GrmB17.d.ts} +3 -4
  4. package/dist/{common-D6TFl6l_.d.ts → common-oafVB-wX.d.ts} +1 -2
  5. package/dist/{constituenta-QY5w1x91.d.ts → constituenta-CwJogNKY.d.ts} +4 -5
  6. package/dist/{diagnostic-C6TRoBgt.d.ts → diagnostic-CtxXifJY.d.ts} +8 -6
  7. package/dist/{diagnostic-assembly-B-6vIA5I.js → diagnostic-assembly-B-r0NyHL.js} +3 -2
  8. package/dist/diagnostic-assembly-B-r0NyHL.js.map +1 -0
  9. package/dist/{evaluation-Cd4S7-3t.d.ts → evaluation-BHv2xNwf.d.ts} +3 -4
  10. package/dist/index.d.ts +12 -11
  11. package/dist/index.js +1 -1
  12. package/dist/mappers/model-adapter.d.ts +4 -4
  13. package/dist/mappers/model-adapter.js +1 -1
  14. package/dist/mappers/schema-adapter.d.ts +5 -5
  15. package/dist/mappers/types.d.ts +5 -4
  16. package/dist/mappers/types.js +1 -1
  17. package/dist/mappers/types.js.map +1 -1
  18. package/dist/{model-value-BUhr2IjA.d.ts → model-value-C0QA-ji2.d.ts} +2 -3
  19. package/dist/models/agent-workflow.d.ts +2 -2
  20. package/dist/models/analysis.d.ts +1 -1
  21. package/dist/models/common.d.ts +1 -1
  22. package/dist/models/constituenta.d.ts +1 -1
  23. package/dist/models/diagnostic.d.ts +1 -1
  24. package/dist/models/diagnostic.js +1 -1
  25. package/dist/models/evaluation.d.ts +1 -1
  26. package/dist/models/index.d.ts +11 -11
  27. package/dist/models/index.js +1 -1
  28. package/dist/models/model-value.d.ts +1 -1
  29. package/dist/models/rstool-agent.d.ts +1 -1
  30. package/dist/models/rstool-agent.js +1 -1
  31. package/dist/models/session.d.ts +1 -1
  32. package/dist/models/tool-contract.d.ts +1 -1
  33. package/dist/models/tool-contract.js +1 -1
  34. package/dist/models/tool-contract.js.map +1 -1
  35. package/dist/{models-LMyDB0md.js → models-DG2uTaV_.js} +117 -4
  36. package/dist/models-DG2uTaV_.js.map +1 -0
  37. package/dist/{rstool-agent-BrAFJcoE.d.ts → rstool-agent-DLq0mtym.d.ts} +13 -10
  38. package/dist/session/session-store.d.ts +3 -2
  39. package/dist/session/session-store.js +1 -1
  40. package/dist/{session-CI4rLYby.d.ts → session-OaLqLq0H.d.ts} +3 -4
  41. package/dist/{tool-contract-BUaDRHoO.d.ts → tool-contract-ZVyh7hhp.d.ts} +15 -11
  42. package/dist/wrapper/stdio-wrapper.js +8 -2
  43. package/dist/wrapper/stdio-wrapper.js.map +1 -1
  44. package/docs/DIAGNOSTICS.md +64 -22
  45. package/docs/DOMAIN.md +16 -4
  46. package/docs/README.md +1 -1
  47. package/examples/diagnostics-utils.ts +3 -4
  48. package/package.json +6 -6
  49. package/skills/rstool-helper/EXAMPLES.md +25 -0
  50. package/skills/rstool-helper/GUIDE.md +5 -4
  51. package/skills/rstool-helper/REFERENCE.md +52 -21
  52. package/skills/rstool-helper/SKILL.md +1 -1
  53. package/src/index.ts +4 -1
  54. package/src/mappers/diagnostic-assembly.ts +9 -6
  55. package/src/mappers/types.ts +1 -0
  56. package/src/models/agent-workflow.ts +45 -0
  57. package/src/models/index.ts +5 -9
  58. package/src/models/rstool-agent.test.ts +62 -0
  59. package/src/models/rstool-agent.ts +160 -2
  60. package/src/models/tool-contract.ts +10 -2
  61. package/src/wrapper/stdio-handler.ts +8 -1
  62. package/dist/diagnostic-assembly-B-6vIA5I.js.map +0 -1
  63. package/dist/models-LMyDB0md.js.map +0 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Agent-facing library for **incremental RSForm construction**, **RSLang expression analysis**, **diagnostics**, **modeling**, and **evaluation**. It wraps [`@rsconcept/domain`](https://www.npmjs.com/package/@rsconcept/domain) with a deterministic session contract and a stdio JSON wrapper for LLM agents. MCP hosts can use it through [`@rsconcept/rstool-mcp`](https://www.npmjs.com/package/@rsconcept/rstool-mcp).
4
4
 
5
- **Contract version:** `3.1.0` — see [skills/rstool-helper/REFERENCE.md](./skills/rstool-helper/REFERENCE.md) for the full v3 API.
5
+ **Contract version:** `3.2.0` — see [skills/rstool-helper/REFERENCE.md](./skills/rstool-helper/REFERENCE.md) for the full v3 API.
6
6
 
7
7
  ## Agent skill
8
8
 
@@ -77,7 +77,7 @@ Maintainers: see [PUBLISHING.md](./PUBLISHING.md) for npm release steps.
77
77
  - If a session method is called without an active session, rstool creates one lazily.
78
78
  - On startup, a ready handshake is printed.
79
79
 
80
- Supported methods (contract `3.1.0`):
80
+ Supported methods (contract `3.2.0`):
81
81
 
82
82
  - `ping`
83
83
  - `methods`
@@ -98,6 +98,7 @@ Supported methods (contract `3.1.0`):
98
98
  - `evaluate`
99
99
  - `recalculateModel`
100
100
  - `restoreOrder`
101
+ - `synthesize`
101
102
 
102
103
  Params are **flat** at the top level (no `params.input` wrapper). Optional `sessionId` sits alongside method fields.
103
104
 
@@ -112,7 +113,7 @@ Request:
112
113
  Response:
113
114
 
114
115
  ```json
115
- { "id": "1", "ok": true, "result": { "sessionId": "...", "contractVersion": "3.1.0" } }
116
+ { "id": "1", "ok": true, "result": { "sessionId": "...", "contractVersion": "3.2.0" } }
116
117
  ```
117
118
 
118
119
  Example `applySchemaPatch`:
@@ -141,7 +142,7 @@ Response:
141
142
  "ok": true,
142
143
  "result": {
143
144
  "success": true,
144
- "session": { "sessionId": "...", "contractVersion": "3.1.0" },
145
+ "session": { "sessionId": "...", "contractVersion": "3.2.0" },
145
146
  "summary": { "itemCount": 3 }
146
147
  }
147
148
  }
@@ -1,8 +1,7 @@
1
- import { a as Diagnostic } from "./diagnostic-C6TRoBgt.js";
2
- import { n as CstType } from "./common-D6TFl6l_.js";
3
- import { a as ApplyConstituentsResult, i as ApplyConstituentsMode, o as ConstituentaDraft } from "./constituenta-QY5w1x91.js";
4
- import { n as SessionRevision, r as SessionState, t as SessionHandle } from "./session-CI4rLYby.js";
5
-
1
+ import { a as Diagnostic } from "./diagnostic-CtxXifJY.js";
2
+ import { n as CstType } from "./common-oafVB-wX.js";
3
+ import { a as ApplyConstituentsResult, i as ApplyConstituentsMode, o as ConstituentaDraft } from "./constituenta-CwJogNKY.js";
4
+ import { n as SessionRevision, r as SessionState, t as SessionHandle } from "./session-OaLqLq0H.js";
6
5
  //#region src/models/agent-workflow.d.ts
7
6
  /** Level of detail returned by {@link RSToolAgent.getSessionState}. */
8
7
  type SessionStateDetail = 'summary' | 'full';
@@ -39,6 +38,51 @@ interface RestoreOrderResult {
39
38
  /** Aliases in the same order as {@link orderedIds}. */
40
39
  orderedAliases: string[];
41
40
  }
41
+ /** One row of an identification (substitution) table, by alias. */
42
+ interface SynthesisSubstitution {
43
+ /** Alias of the constituenta being replaced (deleted). */
44
+ original: string;
45
+ /** Alias of the surviving constituenta. */
46
+ substitution: string;
47
+ }
48
+ /** Input for {@link RSToolAgent.synthesize}. */
49
+ interface SynthesizeInput {
50
+ /** Session whose constituents are merged into the receiver. */
51
+ sourceSessionId: string;
52
+ /**
53
+ * Optional subset of source aliases to import.
54
+ * Omit or pass an empty array to import all source constituents.
55
+ */
56
+ items?: string[];
57
+ /**
58
+ * Identification table: one endpoint is a source alias, the other a receiver alias
59
+ * (same rules as Portal schema embedding / «Встраивание схемы»).
60
+ */
61
+ substitutions?: SynthesisSubstitution[];
62
+ /** When set, a revision is recorded after a successful synthesis. */
63
+ commitMessage?: string;
64
+ }
65
+ /** Result of {@link RSToolAgent.synthesize}. */
66
+ interface SynthesizeResult {
67
+ session: SessionHandle;
68
+ summary: SessionSummary;
69
+ /** False when some constituents failed re-analysis after embedding (best-effort). */
70
+ success: boolean;
71
+ /** Drafts that failed analysis after embedding; empty when {@link success} is true. */
72
+ failed: Array<{
73
+ draft: ConstituentaDraft;
74
+ diagnostics: Diagnostic[];
75
+ }>;
76
+ /** Source constituent id → inserted id in the receiver (before substitutions). */
77
+ idMap: Record<number, number>;
78
+ /** Alias remapping applied to imported constituents. */
79
+ aliasMapping: Record<string, string>;
80
+ /** Ids removed by substitutions. */
81
+ deletedIds: number[];
82
+ /** Ids of constituents inserted from the source (may include later-deleted ones). */
83
+ insertedIds: number[];
84
+ revision?: SessionRevision;
85
+ }
42
86
  /** Compact view of one constituent in a session summary. */
43
87
  interface SessionSummaryItem {
44
88
  id: number;
@@ -67,5 +111,5 @@ interface ApplySchemaPatchResult extends ApplyConstituentsResult {
67
111
  revision?: SessionRevision;
68
112
  }
69
113
  //#endregion
70
- export { SessionStateDetail as a, SessionSummaryItem as c, RestoreOrderResult as i, ApplySchemaPatchInput as n, SessionStateResult as o, ApplySchemaPatchResult as r, SessionSummary as s, AgentConstituentaPatch as t };
71
- //# sourceMappingURL=agent-workflow-BTwrxOoX.d.ts.map
114
+ export { SessionStateDetail as a, SessionSummaryItem as c, SynthesizeResult as d, RestoreOrderResult as i, SynthesisSubstitution as l, ApplySchemaPatchInput as n, SessionStateResult as o, ApplySchemaPatchResult as r, SessionSummary as s, AgentConstituentaPatch as t, SynthesizeInput as u };
115
+ //# sourceMappingURL=agent-workflow-BqEC_Foh.d.ts.map
@@ -1,6 +1,5 @@
1
- import { a as Diagnostic } from "./diagnostic-C6TRoBgt.js";
2
- import { n as CstType, o as ValueClass } from "./common-D6TFl6l_.js";
3
-
1
+ import { a as Diagnostic } from "./diagnostic-CtxXifJY.js";
2
+ import { n as CstType, o as ValueClass } from "./common-oafVB-wX.js";
4
3
  //#region src/models/analysis.d.ts
5
4
  /** Input for {@link RSToolAgent.analyzeExpression}. */
6
5
  interface AnalyzeExpressionInput {
@@ -21,4 +20,4 @@ interface AnalysisResult {
21
20
  }
22
21
  //#endregion
23
22
  export { AnalyzeExpressionInput as n, AnalysisResult as t };
24
- //# sourceMappingURL=analysis-DA44pfgA.d.ts.map
23
+ //# sourceMappingURL=analysis-C7GrmB17.d.ts.map
@@ -2,10 +2,9 @@ import { RSErrorCode as RSErrorCode$1 } from "@rsconcept/domain/rslang/error";
2
2
  import { CstType as CstType$1 } from "@rsconcept/domain/library/rsform";
3
3
  import { BasicBinding, EvalStatus as EvalStatus$1 } from "@rsconcept/domain/library/rsmodel";
4
4
  import { ValueClass as ValueClass$1 } from "@rsconcept/domain/rslang";
5
-
6
5
  //#region src/models/common.d.ts
7
6
  /** Runtime evaluation value: number, nested array (set/tuple), or boolean 0/1. */
8
7
  type RSToolValue = number | RSToolValue[];
9
8
  //#endregion
10
9
  export { RSToolValue as a, RSErrorCode$1 as i, CstType$1 as n, ValueClass$1 as o, EvalStatus$1 as r, BasicBinding as t };
11
- //# sourceMappingURL=common-D6TFl6l_.d.ts.map
10
+ //# sourceMappingURL=common-oafVB-wX.d.ts.map
@@ -1,7 +1,6 @@
1
- import { a as Diagnostic } from "./diagnostic-C6TRoBgt.js";
2
- import { n as CstType } from "./common-D6TFl6l_.js";
3
- import { t as AnalysisResult } from "./analysis-DA44pfgA.js";
4
-
1
+ import { a as Diagnostic } from "./diagnostic-CtxXifJY.js";
2
+ import { n as CstType } from "./common-oafVB-wX.js";
3
+ import { t as AnalysisResult } from "./analysis-C7GrmB17.js";
5
4
  //#region src/models/constituenta.d.ts
6
5
  /** Constituent payload before analysis and merge into session state. */
7
6
  interface ConstituentaDraft {
@@ -51,4 +50,4 @@ interface ApplyConstituentsResult {
51
50
  }
52
51
  //#endregion
53
52
  export { ApplyConstituentsResult as a, ApplyConstituentsMode as i, AddOrUpdateConstituentaResult as n, ConstituentaDraft as o, ApplyConstituentsInput as r, ConstituentaState as s, AddOrUpdateConstituentaInput as t };
54
- //# sourceMappingURL=constituenta-QY5w1x91.d.ts.map
53
+ //# sourceMappingURL=constituenta-CwJogNKY.d.ts.map
@@ -1,7 +1,7 @@
1
- import { Constituenta, CstDiagnostic, CstDiagnostic as CstDiagnostic$1, DiagnosticKind, DiagnosticKind as DiagnosticKind$1, RSDiagnosticCode, RSDiagnosticCode as RSDiagnosticCode$1 } from "@rsconcept/domain/library";
2
- import { RSErrorDescription } from "@rsconcept/domain/rslang/error";
1
+ import { CstDiagnostic, CstDiagnostic as CstDiagnostic$1, DiagnosticKind, DiagnosticKind as DiagnosticKind$1, RSDiagnosticCode, RSDiagnosticCode as RSDiagnosticCode$1 } from "@rsconcept/domain/library";
2
+ import { EvalStackFrame, RSErrorDescription } from "@rsconcept/domain/rslang/error";
3
3
  import { EvalStatus } from "@rsconcept/domain/library/rsmodel";
4
-
4
+ import { DiagnosticSourceFields } from "@rsconcept/domain/library/rsform-api";
5
5
  //#region src/mappers/diagnostic-assembly.d.ts
6
6
  /** Severity of a {@link Diagnostic}. */
7
7
  type DiagnosticSeverity = 'error' | 'warning';
@@ -14,6 +14,8 @@ interface Diagnostic extends CstDiagnostic {
14
14
  expression: string;
15
15
  from: number;
16
16
  to: number;
17
+ /** Evaluation call chain when the fault is inside a called `F#`/`P#` body. */
18
+ stack?: readonly EvalStackFrame[];
17
19
  }
18
20
  /** Context for attributing a {@link Diagnostic} to a constituent. */
19
21
  interface DiagnosticTarget {
@@ -22,9 +24,9 @@ interface DiagnosticTarget {
22
24
  }
23
25
  declare function getDiagnosticName(code: number): string;
24
26
  declare function getDiagnosticSeverity(code: number): DiagnosticSeverity;
25
- declare function expandCstDiagnostic(cst: Constituenta, diagnostic: CstDiagnostic): Diagnostic;
27
+ declare function expandCstDiagnostic(cst: DiagnosticSourceFields, diagnostic: CstDiagnostic): Diagnostic;
26
28
  declare function expressionDiagnostic(error: RSErrorDescription, expression: string, target?: DiagnosticTarget): Diagnostic;
27
- declare function modelStatusDiagnostic(status: EvalStatus, cst: Constituenta): Diagnostic | null;
29
+ declare function modelStatusDiagnostic(status: EvalStatus, cst: DiagnosticSourceFields): Diagnostic | null;
28
30
  //#endregion
29
31
  //#region src/models/diagnostic.d.ts
30
32
  /** Filters for {@link RSToolAgent.listDiagnostics}. */
@@ -35,4 +37,4 @@ interface ListDiagnosticsFilters {
35
37
  }
36
38
  //#endregion
37
39
  export { Diagnostic as a, expandCstDiagnostic as c, getDiagnosticSeverity as d, modelStatusDiagnostic as f, RSDiagnosticCode as i, expressionDiagnostic as l, DiagnosticKind as n, DiagnosticSeverity as o, ListDiagnosticsFilters as r, DiagnosticTarget as s, CstDiagnostic$1 as t, getDiagnosticName as u };
38
- //# sourceMappingURL=diagnostic-C6TRoBgt.d.ts.map
40
+ //# sourceMappingURL=diagnostic-CtxXifJY.d.ts.map
@@ -32,7 +32,8 @@ function expressionDiagnostic(error, expression, target) {
32
32
  expression,
33
33
  from: error.from,
34
34
  to: error.to,
35
- ...error.params ? { params: error.params } : {}
35
+ ...error.params ? { params: error.params } : {},
36
+ ...error.stack ? { stack: error.stack } : {}
36
37
  };
37
38
  }
38
39
  function modelStatusDiagnostic(status, cst) {
@@ -53,4 +54,4 @@ function expressionForCstDiagnostic(cst, diagnostic) {
53
54
  //#endregion
54
55
  export { getDiagnosticSeverity as a, getDiagnosticName as i, expandCstDiagnostic as n, modelStatusDiagnostic as o, expressionDiagnostic as r, DiagnosticKind as t };
55
56
 
56
- //# sourceMappingURL=diagnostic-assembly-B-6vIA5I.js.map
57
+ //# sourceMappingURL=diagnostic-assembly-B-r0NyHL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostic-assembly-B-r0NyHL.js","names":[],"sources":["../src/mappers/diagnostic-assembly.ts"],"sourcesContent":["import {\n type CstDiagnostic,\n DiagnosticKind,\n modelStatusCstDiagnostic,\n RSDiagnosticCode\n} from '@rsconcept/domain/library';\nimport { type DiagnosticSourceFields } from '@rsconcept/domain/library/rsform-api';\nimport { EvalStatus } from '@rsconcept/domain/library/rsmodel';\nimport { isCritical, RSErrorCode, type EvalStackFrame, type RSErrorDescription } from '@rsconcept/domain/rslang/error';\n\nexport { DiagnosticKind, RSDiagnosticCode };\n\n/** Severity of a {@link Diagnostic}. */\nexport type DiagnosticSeverity = 'error' | 'warning';\n\n/** Agent-facing diagnostic with redundant fields for autonomous repair. */\nexport interface Diagnostic extends CstDiagnostic {\n name: string;\n severity: DiagnosticSeverity;\n constituentId?: number;\n alias?: string;\n expression: string;\n from: number;\n to: number;\n /** Evaluation call chain when the fault is inside a called `F#`/`P#` body. */\n stack?: readonly EvalStackFrame[];\n}\n\n/** Context for attributing a {@link Diagnostic} to a constituent. */\nexport interface DiagnosticTarget {\n constituentId?: number;\n alias?: string;\n}\n\nconst DIAGNOSTIC_NAMES: ReadonlyMap<number, string> = new Map([\n ...Object.entries(RSErrorCode).map(([name, code]) => [code, name] as const),\n ...Object.entries(RSDiagnosticCode).map(([name, code]) => [code, name] as const)\n]);\n\nexport function getDiagnosticName(code: number): string {\n return DIAGNOSTIC_NAMES.get(code) ?? `0x${code.toString(16).toUpperCase()}`;\n}\n\nexport function getDiagnosticSeverity(code: number): DiagnosticSeverity {\n return isCritical(code as RSErrorCode) ? 'error' : 'warning';\n}\n\nexport function expandCstDiagnostic(cst: DiagnosticSourceFields, diagnostic: CstDiagnostic): Diagnostic {\n const expression = expressionForCstDiagnostic(cst, diagnostic);\n return {\n ...diagnostic,\n name: getDiagnosticName(diagnostic.code),\n severity: getDiagnosticSeverity(diagnostic.code),\n constituentId: cst.id,\n alias: cst.alias,\n expression,\n from: 0,\n to: diagnostic.kind === DiagnosticKind.MODEL ? 0 : Math.max(expression.length, 1)\n };\n}\n\nexport function expressionDiagnostic(\n error: RSErrorDescription,\n expression: string,\n target?: DiagnosticTarget\n): Diagnostic {\n return {\n kind: DiagnosticKind.EXPRESSION,\n code: error.code,\n name: getDiagnosticName(error.code),\n severity: getDiagnosticSeverity(error.code),\n constituentId: target?.constituentId,\n alias: target?.alias,\n expression,\n from: error.from,\n to: error.to,\n ...(error.params ? { params: error.params } : {}),\n ...(error.stack ? { stack: error.stack } : {})\n };\n}\n\nexport function modelStatusDiagnostic(status: EvalStatus, cst: DiagnosticSourceFields): Diagnostic | null {\n const base = modelStatusCstDiagnostic(status, cst.cst_type);\n return base ? expandCstDiagnostic(cst, base) : null;\n}\n\nfunction expressionForCstDiagnostic(cst: DiagnosticSourceFields, diagnostic: CstDiagnostic): string {\n switch (diagnostic.code) {\n case RSDiagnosticCode.schemaHomonym:\n case RSDiagnosticCode.schemaMissingTerm:\n return cst.term_resolved;\n case RSDiagnosticCode.schemaMissingConvention:\n return cst.convention;\n case RSDiagnosticCode.schemaTypeMismatch:\n return cst.typification_manual;\n case RSDiagnosticCode.schemaDependencyCycle:\n case RSDiagnosticCode.schemaFormalDuplicate:\n return cst.definition_formal;\n default:\n return cst.definition_formal;\n }\n}\n"],"mappings":";;;AAkCA,MAAM,mBAAgD,IAAI,IAAI,CAC5D,GAAG,OAAO,QAAQ,WAAW,CAAC,CAAC,KAAK,CAAC,MAAM,UAAU,CAAC,MAAM,IAAI,CAAU,GAC1E,GAAG,OAAO,QAAQ,gBAAgB,CAAC,CAAC,KAAK,CAAC,MAAM,UAAU,CAAC,MAAM,IAAI,CAAU,CACjF,CAAC;AAED,SAAgB,kBAAkB,MAAsB;CACtD,OAAO,iBAAiB,IAAI,IAAI,KAAK,KAAK,KAAK,SAAS,EAAE,CAAC,CAAC,YAAY;AAC1E;AAEA,SAAgB,sBAAsB,MAAkC;CACtE,OAAO,WAAW,IAAmB,IAAI,UAAU;AACrD;AAEA,SAAgB,oBAAoB,KAA6B,YAAuC;CACtG,MAAM,aAAa,2BAA2B,KAAK,UAAU;CAC7D,OAAO;EACL,GAAG;EACH,MAAM,kBAAkB,WAAW,IAAI;EACvC,UAAU,sBAAsB,WAAW,IAAI;EAC/C,eAAe,IAAI;EACnB,OAAO,IAAI;EACX;EACA,MAAM;EACN,IAAI,WAAW,SAAS,eAAe,QAAQ,IAAI,KAAK,IAAI,WAAW,QAAQ,CAAC;CAClF;AACF;AAEA,SAAgB,qBACd,OACA,YACA,QACY;CACZ,OAAO;EACL,MAAM,eAAe;EACrB,MAAM,MAAM;EACZ,MAAM,kBAAkB,MAAM,IAAI;EAClC,UAAU,sBAAsB,MAAM,IAAI;EAC1C,eAAe,QAAQ;EACvB,OAAO,QAAQ;EACf;EACA,MAAM,MAAM;EACZ,IAAI,MAAM;EACV,GAAI,MAAM,SAAS,EAAE,QAAQ,MAAM,OAAO,IAAI,CAAC;EAC/C,GAAI,MAAM,QAAQ,EAAE,OAAO,MAAM,MAAM,IAAI,CAAC;CAC9C;AACF;AAEA,SAAgB,sBAAsB,QAAoB,KAAgD;CACxG,MAAM,OAAO,yBAAyB,QAAQ,IAAI,QAAQ;CAC1D,OAAO,OAAO,oBAAoB,KAAK,IAAI,IAAI;AACjD;AAEA,SAAS,2BAA2B,KAA6B,YAAmC;CAClG,QAAQ,WAAW,MAAnB;EACE,KAAK,iBAAiB;EACtB,KAAK,iBAAiB,mBACpB,OAAO,IAAI;EACb,KAAK,iBAAiB,yBACpB,OAAO,IAAI;EACb,KAAK,iBAAiB,oBACpB,OAAO,IAAI;EACb,KAAK,iBAAiB;EACtB,KAAK,iBAAiB,uBACpB,OAAO,IAAI;EACb,SACE,OAAO,IAAI;CACf;AACF"}
@@ -1,6 +1,5 @@
1
- import { a as Diagnostic } from "./diagnostic-C6TRoBgt.js";
2
- import { a as RSToolValue, n as CstType, r as EvalStatus, t as BasicBinding } from "./common-D6TFl6l_.js";
3
-
1
+ import { a as Diagnostic } from "./diagnostic-CtxXifJY.js";
2
+ import { a as RSToolValue, n as CstType, r as EvalStatus, t as BasicBinding } from "./common-oafVB-wX.js";
4
3
  //#region src/models/evaluation.d.ts
5
4
  interface EvaluateExpressionInput {
6
5
  expression: string;
@@ -29,4 +28,4 @@ interface EvaluationResult {
29
28
  }
30
29
  //#endregion
31
30
  export { EvaluationResult as i, EvaluateExpressionInput as n, EvaluateInput as r, EvaluateConstituentaInput as t };
32
- //# sourceMappingURL=evaluation-Cd4S7-3t.d.ts.map
31
+ //# sourceMappingURL=evaluation-BHv2xNwf.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,13 +1,14 @@
1
- import { a as Diagnostic, i as RSDiagnosticCode, n as DiagnosticKind, o as DiagnosticSeverity, r as ListDiagnosticsFilters, t as CstDiagnostic } from "./diagnostic-C6TRoBgt.js";
2
- import { a as RSToolValue, i as RSErrorCode, n as CstType, o as ValueClass, r as EvalStatus, t as BasicBinding } from "./common-D6TFl6l_.js";
3
- import { n as AnalyzeExpressionInput, t as AnalysisResult } from "./analysis-DA44pfgA.js";
4
- import { o as ConstituentaDraft, s as ConstituentaState } from "./constituenta-QY5w1x91.js";
5
- import { a as SetConstituentaValueInput, i as SessionModelState, n as ModelValueState, r as RecalculateModelResult, s as SetModelValuesInput } from "./model-value-BUhr2IjA.js";
6
- import { n as SessionRevision, r as SessionState, t as SessionHandle } from "./session-CI4rLYby.js";
7
- import { a as SessionStateDetail, c as SessionSummaryItem, n as ApplySchemaPatchInput, o as SessionStateResult, r as ApplySchemaPatchResult, s as SessionSummary, t as AgentConstituentaPatch } from "./agent-workflow-BTwrxOoX.js";
8
- import { i as EvaluationResult, r as EvaluateInput } from "./evaluation-Cd4S7-3t.js";
9
- import { a as ExportPortalInput, c as PortalExportKind, d as PortalModelImportData, f as PortalRsformDetails, h as PortalTermForm, i as ExportFormat, l as PORTAL_JSON_CONTRACT_VERSION, m as PortalSchemaImportData, n as RSToolAgentContract, o as ExportPortalResult, p as PortalSchemaConstituenta, r as RSToolAgentOptions, s as ImportDataKind, t as CONTRACT_VERSION, u as PortalImportMetadata } from "./tool-contract-BUaDRHoO.js";
10
- import { t as RSToolAgent } from "./rstool-agent-BrAFJcoE.js";
1
+ import { a as Diagnostic, i as RSDiagnosticCode, n as DiagnosticKind, o as DiagnosticSeverity, r as ListDiagnosticsFilters, t as CstDiagnostic } from "./diagnostic-CtxXifJY.js";
2
+ import { a as RSToolValue, i as RSErrorCode, n as CstType, o as ValueClass, r as EvalStatus, t as BasicBinding } from "./common-oafVB-wX.js";
3
+ import { n as AnalyzeExpressionInput, t as AnalysisResult } from "./analysis-C7GrmB17.js";
4
+ import { o as ConstituentaDraft, s as ConstituentaState } from "./constituenta-CwJogNKY.js";
5
+ import { a as SetConstituentaValueInput, i as SessionModelState, n as ModelValueState, r as RecalculateModelResult, s as SetModelValuesInput } from "./model-value-C0QA-ji2.js";
6
+ import { n as SessionRevision, r as SessionState, t as SessionHandle } from "./session-OaLqLq0H.js";
7
+ import { a as SessionStateDetail, c as SessionSummaryItem, d as SynthesizeResult, l as SynthesisSubstitution, n as ApplySchemaPatchInput, o as SessionStateResult, r as ApplySchemaPatchResult, s as SessionSummary, t as AgentConstituentaPatch, u as SynthesizeInput } from "./agent-workflow-BqEC_Foh.js";
8
+ import { i as EvaluationResult, r as EvaluateInput } from "./evaluation-BHv2xNwf.js";
9
+ import { a as ExportPortalInput, c as PortalExportKind, d as PortalModelImportData, f as PortalRsformDetails, h as PortalTermForm, i as ExportFormat, l as PORTAL_JSON_CONTRACT_VERSION, m as PortalSchemaImportData, n as RSToolAgentContract, o as ExportPortalResult, p as PortalSchemaConstituenta, r as RSToolAgentOptions, s as ImportDataKind, t as CONTRACT_VERSION, u as PortalImportMetadata } from "./tool-contract-ZVyh7hhp.js";
10
+ import { t as RSToolAgent } from "./rstool-agent-DLq0mtym.js";
11
+ import "./models/index.js";
11
12
  import { DomainAnalysisLike, DomainErrorLike, toDiagnostic, toPublicAnalysis } from "./mappers/types.js";
12
13
  import { RSToolWrapperClient, RSToolWrapperClientOptions, WrapperResponse } from "./wrapper/client.js";
13
- export { type AgentConstituentaPatch, type AnalysisResult, type AnalyzeExpressionInput, type ApplySchemaPatchInput, type ApplySchemaPatchResult, type BasicBinding, CONTRACT_VERSION, type ConstituentaDraft, type ConstituentaState, type CstDiagnostic, CstType, type Diagnostic, DiagnosticKind, type DiagnosticSeverity, type DomainAnalysisLike, type DomainErrorLike, EvalStatus, type EvaluateInput, type EvaluationResult, type ExportFormat, type ExportPortalInput, type ExportPortalResult, type ImportDataKind, type ListDiagnosticsFilters, type ModelValueState, PORTAL_JSON_CONTRACT_VERSION, type PortalExportKind, type PortalImportMetadata, type PortalModelImportData, type PortalRsformDetails, type PortalSchemaConstituenta, type PortalSchemaImportData, type PortalTermForm, RSDiagnosticCode, RSErrorCode, RSToolAgent, type RSToolAgentContract, type RSToolAgentOptions, type RSToolValue, RSToolWrapperClient, type RSToolWrapperClientOptions, type RecalculateModelResult, type SessionHandle, type SessionModelState, type SessionRevision, type SessionState, type SessionStateDetail, type SessionStateResult, type SessionSummary, type SessionSummaryItem, type SetConstituentaValueInput, type SetModelValuesInput, ValueClass, type WrapperResponse, toDiagnostic, toPublicAnalysis };
14
+ export { type AgentConstituentaPatch, type AnalysisResult, type AnalyzeExpressionInput, type ApplySchemaPatchInput, type ApplySchemaPatchResult, type BasicBinding, CONTRACT_VERSION, type ConstituentaDraft, type ConstituentaState, type CstDiagnostic, CstType, type Diagnostic, DiagnosticKind, type DiagnosticSeverity, type DomainAnalysisLike, type DomainErrorLike, EvalStatus, type EvaluateInput, type EvaluationResult, type ExportFormat, type ExportPortalInput, type ExportPortalResult, type ImportDataKind, type ListDiagnosticsFilters, type ModelValueState, PORTAL_JSON_CONTRACT_VERSION, type PortalExportKind, type PortalImportMetadata, type PortalModelImportData, type PortalRsformDetails, type PortalSchemaConstituenta, type PortalSchemaImportData, type PortalTermForm, RSDiagnosticCode, RSErrorCode, RSToolAgent, type RSToolAgentContract, type RSToolAgentOptions, type RSToolValue, RSToolWrapperClient, type RSToolWrapperClientOptions, type RecalculateModelResult, type SessionHandle, type SessionModelState, type SessionRevision, type SessionState, type SessionStateDetail, type SessionStateResult, type SessionSummary, type SessionSummaryItem, type SetConstituentaValueInput, type SetModelValuesInput, type SynthesisSubstitution, type SynthesizeInput, type SynthesizeResult, ValueClass, type WrapperResponse, toDiagnostic, toPublicAnalysis };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { toDiagnostic, toPublicAnalysis } from "./mappers/types.js";
2
2
  import { CstType, EvalStatus, RSErrorCode, ValueClass } from "./models/common.js";
3
3
  import { DiagnosticKind, RSDiagnosticCode } from "./models/diagnostic.js";
4
- import { r as PORTAL_JSON_CONTRACT_VERSION, t as RSToolAgent } from "./models-LMyDB0md.js";
4
+ import { r as PORTAL_JSON_CONTRACT_VERSION, t as RSToolAgent } from "./models-DG2uTaV_.js";
5
5
  import { CONTRACT_VERSION } from "./models/tool-contract.js";
6
6
  import { RSToolWrapperClient } from "./wrapper/client.js";
7
7
  export { CONTRACT_VERSION, CstType, DiagnosticKind, EvalStatus, PORTAL_JSON_CONTRACT_VERSION, RSDiagnosticCode, RSErrorCode, RSToolAgent, RSToolWrapperClient, ValueClass, toDiagnostic, toPublicAnalysis };
@@ -1,9 +1,9 @@
1
- import { a as SetConstituentaValueInput, i as SessionModelState, r as RecalculateModelResult } from "../model-value-BUhr2IjA.js";
2
- import { r as SessionState } from "../session-CI4rLYby.js";
3
- import { i as EvaluationResult } from "../evaluation-Cd4S7-3t.js";
1
+ import { a as SetConstituentaValueInput, i as SessionModelState, r as RecalculateModelResult } from "../model-value-C0QA-ji2.js";
2
+ import { r as SessionState } from "../session-OaLqLq0H.js";
3
+ import { i as EvaluationResult } from "../evaluation-BHv2xNwf.js";
4
+ import "../models/index.js";
4
5
  import { CstType } from "@rsconcept/domain/library/rsform";
5
6
  import { RSEngine } from "@rsconcept/domain/library/rsengine";
6
-
7
7
  //#region src/mappers/model-adapter.d.ts
8
8
  declare class ModelAdapter {
9
9
  setConstituentaValue(session: SessionState, input: SetConstituentaValueInput): Promise<SessionModelState>;
@@ -1,4 +1,4 @@
1
- import { r as expressionDiagnostic, t as DiagnosticKind } from "../diagnostic-assembly-B-6vIA5I.js";
1
+ import { r as expressionDiagnostic, t as DiagnosticKind } from "../diagnostic-assembly-B-r0NyHL.js";
2
2
  import { t as buildRSFormFromSession } from "../rsform-builder-DKwZfJvN.js";
3
3
  import { EvalStatus } from "@rsconcept/domain/library/rsmodel";
4
4
  import { isBaseSet } from "@rsconcept/domain/library/rsform-api";
@@ -1,10 +1,10 @@
1
- import { a as Diagnostic } from "../diagnostic-C6TRoBgt.js";
2
- import { t as AnalysisResult } from "../analysis-DA44pfgA.js";
3
- import { o as ConstituentaDraft, s as ConstituentaState } from "../constituenta-QY5w1x91.js";
4
- import { r as SessionState } from "../session-CI4rLYby.js";
1
+ import { a as Diagnostic } from "../diagnostic-CtxXifJY.js";
2
+ import { t as AnalysisResult } from "../analysis-C7GrmB17.js";
3
+ import { o as ConstituentaDraft, s as ConstituentaState } from "../constituenta-CwJogNKY.js";
4
+ import { r as SessionState } from "../session-OaLqLq0H.js";
5
+ import "../models/index.js";
5
6
  import { RSForm } from "@rsconcept/domain/library/rsform";
6
7
  import { RSLangAnalyzer } from "@rsconcept/domain/rslang";
7
-
8
8
  //#region src/mappers/schema-adapter.d.ts
9
9
  declare class SchemaAdapter {
10
10
  analyzeAgainstSession(session: SessionState, draft: ConstituentaDraft): {
@@ -1,7 +1,7 @@
1
- import { a as Diagnostic, s as DiagnosticTarget } from "../diagnostic-C6TRoBgt.js";
2
- import { t as AnalysisResult } from "../analysis-DA44pfgA.js";
3
- import { ValueClass } from "@rsconcept/domain/rslang";
4
-
1
+ import { a as Diagnostic, s as DiagnosticTarget } from "../diagnostic-CtxXifJY.js";
2
+ import { t as AnalysisResult } from "../analysis-C7GrmB17.js";
3
+ import "../models/index.js";
4
+ import { RSErrorDescription, ValueClass } from "@rsconcept/domain/rslang";
5
5
  //#region src/mappers/types.d.ts
6
6
  /** Minimal domain error shape before mapping to {@link Diagnostic}. */
7
7
  interface DomainErrorLike {
@@ -9,6 +9,7 @@ interface DomainErrorLike {
9
9
  from: number;
10
10
  to: number;
11
11
  params?: readonly string[];
12
+ stack?: RSErrorDescription['stack'];
12
13
  }
13
14
  /** Minimal domain analysis shape before mapping to {@link AnalysisResult}. */
14
15
  interface DomainAnalysisLike {
@@ -1,4 +1,4 @@
1
- import { r as expressionDiagnostic } from "../diagnostic-assembly-B-6vIA5I.js";
1
+ import { r as expressionDiagnostic } from "../diagnostic-assembly-B-r0NyHL.js";
2
2
  //#region src/mappers/types.ts
3
3
  /** Map a domain parser/semantic error to the public diagnostic shape. */
4
4
  function toDiagnostic(error, expression, target) {
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/mappers/types.ts"],"sourcesContent":["import { DiagnosticKind, type DiagnosticTarget, expressionDiagnostic } from './diagnostic-assembly';\nimport { type RSErrorDescription, type ValueClass } from '@rsconcept/domain/rslang';\n\nimport { type AnalysisResult, type Diagnostic } from '../models';\n\n/** Minimal domain error shape before mapping to {@link Diagnostic}. */\nexport interface DomainErrorLike {\n code: number;\n from: number;\n to: number;\n params?: readonly string[];\n}\n\n/** Minimal domain analysis shape before mapping to {@link AnalysisResult}. */\nexport interface DomainAnalysisLike {\n success: boolean;\n type: Record<string, unknown> | null;\n valueClass: ValueClass | null;\n errors: DomainErrorLike[];\n}\n\n/** Map a domain parser/semantic error to the public diagnostic shape. */\nexport function toDiagnostic(error: DomainErrorLike, expression: string, target?: DiagnosticTarget): Diagnostic {\n return expressionDiagnostic(error as RSErrorDescription, expression, target);\n}\n\n/** Map a domain analysis result to the public {@link AnalysisResult} shape. */\nexport function toPublicAnalysis(\n analysis: DomainAnalysisLike,\n expression: string,\n target?: DiagnosticTarget\n): AnalysisResult {\n return {\n success: analysis.success,\n type: analysis.type,\n valueClass: analysis.valueClass,\n diagnostics: analysis.errors.map(error => expressionDiagnostic(error as RSErrorDescription, expression, target))\n };\n}\n"],"mappings":";;;AAsBA,SAAgB,aAAa,OAAwB,YAAoB,QAAuC;CAC9G,OAAO,qBAAqB,OAA6B,YAAY,MAAM;AAC7E;;AAGA,SAAgB,iBACd,UACA,YACA,QACgB;CAChB,OAAO;EACL,SAAS,SAAS;EAClB,MAAM,SAAS;EACf,YAAY,SAAS;EACrB,aAAa,SAAS,OAAO,KAAI,UAAS,qBAAqB,OAA6B,YAAY,MAAM,CAAC;CACjH;AACF"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/mappers/types.ts"],"sourcesContent":["import { DiagnosticKind, type DiagnosticTarget, expressionDiagnostic } from './diagnostic-assembly';\nimport { type RSErrorDescription, type ValueClass } from '@rsconcept/domain/rslang';\n\nimport { type AnalysisResult, type Diagnostic } from '../models';\n\n/** Minimal domain error shape before mapping to {@link Diagnostic}. */\nexport interface DomainErrorLike {\n code: number;\n from: number;\n to: number;\n params?: readonly string[];\n stack?: RSErrorDescription['stack'];\n}\n\n/** Minimal domain analysis shape before mapping to {@link AnalysisResult}. */\nexport interface DomainAnalysisLike {\n success: boolean;\n type: Record<string, unknown> | null;\n valueClass: ValueClass | null;\n errors: DomainErrorLike[];\n}\n\n/** Map a domain parser/semantic error to the public diagnostic shape. */\nexport function toDiagnostic(error: DomainErrorLike, expression: string, target?: DiagnosticTarget): Diagnostic {\n return expressionDiagnostic(error as RSErrorDescription, expression, target);\n}\n\n/** Map a domain analysis result to the public {@link AnalysisResult} shape. */\nexport function toPublicAnalysis(\n analysis: DomainAnalysisLike,\n expression: string,\n target?: DiagnosticTarget\n): AnalysisResult {\n return {\n success: analysis.success,\n type: analysis.type,\n valueClass: analysis.valueClass,\n diagnostics: analysis.errors.map(error => expressionDiagnostic(error as RSErrorDescription, expression, target))\n };\n}\n"],"mappings":";;;AAuBA,SAAgB,aAAa,OAAwB,YAAoB,QAAuC;CAC9G,OAAO,qBAAqB,OAA6B,YAAY,MAAM;AAC7E;;AAGA,SAAgB,iBACd,UACA,YACA,QACgB;CAChB,OAAO;EACL,SAAS,SAAS;EAClB,MAAM,SAAS;EACf,YAAY,SAAS;EACrB,aAAa,SAAS,OAAO,KAAI,UAAS,qBAAqB,OAA6B,YAAY,MAAM,CAAC;CACjH;AACF"}
@@ -1,5 +1,4 @@
1
- import { a as RSToolValue, r as EvalStatus, t as BasicBinding } from "./common-D6TFl6l_.js";
2
-
1
+ import { a as RSToolValue, r as EvalStatus, t as BasicBinding } from "./common-oafVB-wX.js";
3
2
  //#region src/models/model-value.d.ts
4
3
  /** Model value for one constituent. */
5
4
  interface ModelValueState {
@@ -43,4 +42,4 @@ interface RecalculateModelResult {
43
42
  }
44
43
  //#endregion
45
44
  export { SetConstituentaValueInput as a, SessionModelState as i, ModelValueState as n, SetConstituentaValuesInput as o, RecalculateModelResult as r, SetModelValuesInput as s, ClearConstituentaValuesInput as t };
46
- //# sourceMappingURL=model-value-BUhr2IjA.d.ts.map
45
+ //# sourceMappingURL=model-value-C0QA-ji2.d.ts.map
@@ -1,2 +1,2 @@
1
- import { a as SessionStateDetail, c as SessionSummaryItem, i as RestoreOrderResult, n as ApplySchemaPatchInput, o as SessionStateResult, r as ApplySchemaPatchResult, s as SessionSummary, t as AgentConstituentaPatch } from "../agent-workflow-BTwrxOoX.js";
2
- export { AgentConstituentaPatch, ApplySchemaPatchInput, ApplySchemaPatchResult, RestoreOrderResult, SessionStateDetail, SessionStateResult, SessionSummary, SessionSummaryItem };
1
+ import { a as SessionStateDetail, c as SessionSummaryItem, d as SynthesizeResult, i as RestoreOrderResult, l as SynthesisSubstitution, n as ApplySchemaPatchInput, o as SessionStateResult, r as ApplySchemaPatchResult, s as SessionSummary, t as AgentConstituentaPatch, u as SynthesizeInput } from "../agent-workflow-BqEC_Foh.js";
2
+ export { AgentConstituentaPatch, ApplySchemaPatchInput, ApplySchemaPatchResult, RestoreOrderResult, SessionStateDetail, SessionStateResult, SessionSummary, SessionSummaryItem, SynthesisSubstitution, SynthesizeInput, SynthesizeResult };
@@ -1,2 +1,2 @@
1
- import { n as AnalyzeExpressionInput, t as AnalysisResult } from "../analysis-DA44pfgA.js";
1
+ import { n as AnalyzeExpressionInput, t as AnalysisResult } from "../analysis-C7GrmB17.js";
2
2
  export { AnalysisResult, AnalyzeExpressionInput };
@@ -1,2 +1,2 @@
1
- import { a as RSToolValue, i as RSErrorCode, n as CstType, o as ValueClass, r as EvalStatus, t as BasicBinding } from "../common-D6TFl6l_.js";
1
+ import { a as RSToolValue, i as RSErrorCode, n as CstType, o as ValueClass, r as EvalStatus, t as BasicBinding } from "../common-oafVB-wX.js";
2
2
  export { type BasicBinding, CstType, EvalStatus, RSErrorCode, RSToolValue, ValueClass };
@@ -1,2 +1,2 @@
1
- import { a as ApplyConstituentsResult, i as ApplyConstituentsMode, n as AddOrUpdateConstituentaResult, o as ConstituentaDraft, r as ApplyConstituentsInput, s as ConstituentaState, t as AddOrUpdateConstituentaInput } from "../constituenta-QY5w1x91.js";
1
+ import { a as ApplyConstituentsResult, i as ApplyConstituentsMode, n as AddOrUpdateConstituentaResult, o as ConstituentaDraft, r as ApplyConstituentsInput, s as ConstituentaState, t as AddOrUpdateConstituentaInput } from "../constituenta-CwJogNKY.js";
2
2
  export { AddOrUpdateConstituentaInput, AddOrUpdateConstituentaResult, ApplyConstituentsInput, ApplyConstituentsMode, ApplyConstituentsResult, ConstituentaDraft, ConstituentaState };
@@ -1,2 +1,2 @@
1
- import { a as Diagnostic, c as expandCstDiagnostic, d as getDiagnosticSeverity, f as modelStatusDiagnostic, i as RSDiagnosticCode, l as expressionDiagnostic, n as DiagnosticKind, o as DiagnosticSeverity, r as ListDiagnosticsFilters, s as DiagnosticTarget, t as CstDiagnostic, u as getDiagnosticName } from "../diagnostic-C6TRoBgt.js";
1
+ import { a as Diagnostic, c as expandCstDiagnostic, d as getDiagnosticSeverity, f as modelStatusDiagnostic, i as RSDiagnosticCode, l as expressionDiagnostic, n as DiagnosticKind, o as DiagnosticSeverity, r as ListDiagnosticsFilters, s as DiagnosticTarget, t as CstDiagnostic, u as getDiagnosticName } from "../diagnostic-CtxXifJY.js";
2
2
  export { type CstDiagnostic, type Diagnostic, DiagnosticKind, type DiagnosticSeverity, type DiagnosticTarget, ListDiagnosticsFilters, RSDiagnosticCode, expandCstDiagnostic, expressionDiagnostic, getDiagnosticName, getDiagnosticSeverity, modelStatusDiagnostic };
@@ -1,3 +1,3 @@
1
- import { a as getDiagnosticSeverity, i as getDiagnosticName, n as expandCstDiagnostic, o as modelStatusDiagnostic, r as expressionDiagnostic } from "../diagnostic-assembly-B-6vIA5I.js";
1
+ import { a as getDiagnosticSeverity, i as getDiagnosticName, n as expandCstDiagnostic, o as modelStatusDiagnostic, r as expressionDiagnostic } from "../diagnostic-assembly-B-r0NyHL.js";
2
2
  import { DiagnosticKind, RSDiagnosticCode } from "@rsconcept/domain/library";
3
3
  export { DiagnosticKind, RSDiagnosticCode, expandCstDiagnostic, expressionDiagnostic, getDiagnosticName, getDiagnosticSeverity, modelStatusDiagnostic };
@@ -1,2 +1,2 @@
1
- import { i as EvaluationResult, n as EvaluateExpressionInput, r as EvaluateInput, t as EvaluateConstituentaInput } from "../evaluation-Cd4S7-3t.js";
1
+ import { i as EvaluationResult, n as EvaluateExpressionInput, r as EvaluateInput, t as EvaluateConstituentaInput } from "../evaluation-BHv2xNwf.js";
2
2
  export { EvaluateConstituentaInput, EvaluateExpressionInput, EvaluateInput, EvaluationResult };
@@ -1,11 +1,11 @@
1
- import { a as Diagnostic, i as RSDiagnosticCode, n as DiagnosticKind, o as DiagnosticSeverity, r as ListDiagnosticsFilters, t as CstDiagnostic } from "../diagnostic-C6TRoBgt.js";
2
- import { a as RSToolValue, i as RSErrorCode, n as CstType, o as ValueClass, r as EvalStatus, t as BasicBinding } from "../common-D6TFl6l_.js";
3
- import { n as AnalyzeExpressionInput, t as AnalysisResult } from "../analysis-DA44pfgA.js";
4
- import { i as ApplyConstituentsMode, o as ConstituentaDraft, s as ConstituentaState } from "../constituenta-QY5w1x91.js";
5
- import { a as SetConstituentaValueInput, i as SessionModelState, n as ModelValueState, r as RecalculateModelResult, s as SetModelValuesInput } from "../model-value-BUhr2IjA.js";
6
- import { n as SessionRevision, r as SessionState, t as SessionHandle } from "../session-CI4rLYby.js";
7
- import { a as SessionStateDetail, c as SessionSummaryItem, i as RestoreOrderResult, n as ApplySchemaPatchInput, o as SessionStateResult, r as ApplySchemaPatchResult, s as SessionSummary, t as AgentConstituentaPatch } from "../agent-workflow-BTwrxOoX.js";
8
- import { i as EvaluationResult, r as EvaluateInput } from "../evaluation-Cd4S7-3t.js";
9
- import { a as ExportPortalInput, c as PortalExportKind, d as PortalModelImportData, f as PortalRsformDetails, g as portalItemToDraft, h as PortalTermForm, i as ExportFormat, l as PORTAL_JSON_CONTRACT_VERSION, m as PortalSchemaImportData, n as RSToolAgentContract, o as ExportPortalResult, p as PortalSchemaConstituenta, r as RSToolAgentOptions, s as ImportDataKind, t as CONTRACT_VERSION, u as PortalImportMetadata } from "../tool-contract-BUaDRHoO.js";
10
- import { t as RSToolAgent } from "../rstool-agent-BrAFJcoE.js";
11
- export { type AgentConstituentaPatch, type AnalysisResult, type AnalyzeExpressionInput, type ApplyConstituentsMode, type ApplySchemaPatchInput, type ApplySchemaPatchResult, type BasicBinding, CONTRACT_VERSION, type ConstituentaDraft, type ConstituentaState, type CstDiagnostic, CstType, type Diagnostic, DiagnosticKind, type DiagnosticSeverity, EvalStatus, type EvaluateInput, type EvaluationResult, type ExportFormat, type ExportPortalInput, type ExportPortalResult, type ImportDataKind, type ListDiagnosticsFilters, type ModelValueState, PORTAL_JSON_CONTRACT_VERSION, type PortalExportKind, type PortalImportMetadata, type PortalModelImportData, type PortalRsformDetails, type PortalSchemaConstituenta, type PortalSchemaImportData, type PortalTermForm, RSDiagnosticCode, RSErrorCode, RSToolAgent, type RSToolAgentContract, type RSToolAgentOptions, type RSToolValue, type RecalculateModelResult, type RestoreOrderResult, type SessionHandle, type SessionModelState, type SessionRevision, type SessionState, type SessionStateDetail, type SessionStateResult, type SessionSummary, type SessionSummaryItem, type SetConstituentaValueInput, type SetModelValuesInput, ValueClass, portalItemToDraft };
1
+ import { a as Diagnostic, i as RSDiagnosticCode, n as DiagnosticKind, o as DiagnosticSeverity, r as ListDiagnosticsFilters, t as CstDiagnostic } from "../diagnostic-CtxXifJY.js";
2
+ import { a as RSToolValue, i as RSErrorCode, n as CstType, o as ValueClass, r as EvalStatus, t as BasicBinding } from "../common-oafVB-wX.js";
3
+ import { n as AnalyzeExpressionInput, t as AnalysisResult } from "../analysis-C7GrmB17.js";
4
+ import { i as ApplyConstituentsMode, o as ConstituentaDraft, s as ConstituentaState } from "../constituenta-CwJogNKY.js";
5
+ import { a as SetConstituentaValueInput, i as SessionModelState, n as ModelValueState, r as RecalculateModelResult, s as SetModelValuesInput } from "../model-value-C0QA-ji2.js";
6
+ import { n as SessionRevision, r as SessionState, t as SessionHandle } from "../session-OaLqLq0H.js";
7
+ import { a as SessionStateDetail, c as SessionSummaryItem, d as SynthesizeResult, i as RestoreOrderResult, l as SynthesisSubstitution, n as ApplySchemaPatchInput, o as SessionStateResult, r as ApplySchemaPatchResult, s as SessionSummary, t as AgentConstituentaPatch, u as SynthesizeInput } from "../agent-workflow-BqEC_Foh.js";
8
+ import { i as EvaluationResult, r as EvaluateInput } from "../evaluation-BHv2xNwf.js";
9
+ import { a as ExportPortalInput, c as PortalExportKind, d as PortalModelImportData, f as PortalRsformDetails, g as portalItemToDraft, h as PortalTermForm, i as ExportFormat, l as PORTAL_JSON_CONTRACT_VERSION, m as PortalSchemaImportData, n as RSToolAgentContract, o as ExportPortalResult, p as PortalSchemaConstituenta, r as RSToolAgentOptions, s as ImportDataKind, t as CONTRACT_VERSION, u as PortalImportMetadata } from "../tool-contract-ZVyh7hhp.js";
10
+ import { t as RSToolAgent } from "../rstool-agent-DLq0mtym.js";
11
+ export { type AgentConstituentaPatch, type AnalysisResult, type AnalyzeExpressionInput, type ApplyConstituentsMode, type ApplySchemaPatchInput, type ApplySchemaPatchResult, type BasicBinding, CONTRACT_VERSION, type ConstituentaDraft, type ConstituentaState, type CstDiagnostic, CstType, type Diagnostic, DiagnosticKind, type DiagnosticSeverity, EvalStatus, type EvaluateInput, type EvaluationResult, type ExportFormat, type ExportPortalInput, type ExportPortalResult, type ImportDataKind, type ListDiagnosticsFilters, type ModelValueState, PORTAL_JSON_CONTRACT_VERSION, type PortalExportKind, type PortalImportMetadata, type PortalModelImportData, type PortalRsformDetails, type PortalSchemaConstituenta, type PortalSchemaImportData, type PortalTermForm, RSDiagnosticCode, RSErrorCode, RSToolAgent, type RSToolAgentContract, type RSToolAgentOptions, type RSToolValue, type RecalculateModelResult, type RestoreOrderResult, type SessionHandle, type SessionModelState, type SessionRevision, type SessionState, type SessionStateDetail, type SessionStateResult, type SessionSummary, type SessionSummaryItem, type SetConstituentaValueInput, type SetModelValuesInput, type SynthesisSubstitution, type SynthesizeInput, type SynthesizeResult, ValueClass, portalItemToDraft };
@@ -1,5 +1,5 @@
1
1
  import { CstType, EvalStatus, RSErrorCode, ValueClass } from "./common.js";
2
2
  import { DiagnosticKind, RSDiagnosticCode } from "./diagnostic.js";
3
- import { i as portalItemToDraft, r as PORTAL_JSON_CONTRACT_VERSION, t as RSToolAgent } from "../models-LMyDB0md.js";
3
+ import { i as portalItemToDraft, r as PORTAL_JSON_CONTRACT_VERSION, t as RSToolAgent } from "../models-DG2uTaV_.js";
4
4
  import { CONTRACT_VERSION } from "./tool-contract.js";
5
5
  export { CONTRACT_VERSION, CstType, DiagnosticKind, EvalStatus, PORTAL_JSON_CONTRACT_VERSION, RSDiagnosticCode, RSErrorCode, RSToolAgent, ValueClass, portalItemToDraft };
@@ -1,2 +1,2 @@
1
- import { a as SetConstituentaValueInput, i as SessionModelState, n as ModelValueState, o as SetConstituentaValuesInput, r as RecalculateModelResult, s as SetModelValuesInput, t as ClearConstituentaValuesInput } from "../model-value-BUhr2IjA.js";
1
+ import { a as SetConstituentaValueInput, i as SessionModelState, n as ModelValueState, o as SetConstituentaValuesInput, r as RecalculateModelResult, s as SetModelValuesInput, t as ClearConstituentaValuesInput } from "../model-value-C0QA-ji2.js";
2
2
  export { ClearConstituentaValuesInput, ModelValueState, RecalculateModelResult, SessionModelState, SetConstituentaValueInput, SetConstituentaValuesInput, SetModelValuesInput };
@@ -1,2 +1,2 @@
1
- import { t as RSToolAgent } from "../rstool-agent-BrAFJcoE.js";
1
+ import { t as RSToolAgent } from "../rstool-agent-DLq0mtym.js";
2
2
  export { RSToolAgent };
@@ -1,2 +1,2 @@
1
- import { t as RSToolAgent } from "../models-LMyDB0md.js";
1
+ import { t as RSToolAgent } from "../models-DG2uTaV_.js";
2
2
  export { RSToolAgent };
@@ -1,2 +1,2 @@
1
- import { n as SessionRevision, r as SessionState, t as SessionHandle } from "../session-CI4rLYby.js";
1
+ import { n as SessionRevision, r as SessionState, t as SessionHandle } from "../session-OaLqLq0H.js";
2
2
  export { SessionHandle, SessionRevision, SessionState };
@@ -1,2 +1,2 @@
1
- import { n as RSToolAgentContract, r as RSToolAgentOptions, t as CONTRACT_VERSION } from "../tool-contract-BUaDRHoO.js";
1
+ import { n as RSToolAgentContract, r as RSToolAgentOptions, t as CONTRACT_VERSION } from "../tool-contract-ZVyh7hhp.js";
2
2
  export { CONTRACT_VERSION, RSToolAgentContract, RSToolAgentOptions };
@@ -1,6 +1,6 @@
1
1
  //#region src/models/tool-contract.ts
2
2
  /** Agent-visible contract version; bump on breaking API changes. */
3
- const CONTRACT_VERSION = "3.1.0";
3
+ const CONTRACT_VERSION = "3.3.0";
4
4
  //#endregion
5
5
  export { CONTRACT_VERSION };
6
6
 
@@ -1 +1 @@
1
- {"version":3,"file":"tool-contract.js","names":[],"sources":["../../src/models/tool-contract.ts"],"sourcesContent":["import {\n type ApplySchemaPatchInput,\n type ApplySchemaPatchResult,\n type RestoreOrderResult,\n type SessionStateDetail,\n type SessionStateResult\n} from './agent-workflow';\nimport { type AnalysisResult, type AnalyzeExpressionInput } from './analysis';\nimport { type Diagnostic, type ListDiagnosticsFilters } from './diagnostic';\nimport { type EvaluateInput, type EvaluationResult } from './evaluation';\nimport { type ExportPortalInput, type ExportPortalResult, type ImportDataKind } from './import-export';\nimport { type RecalculateModelResult, type SessionModelState, type SetModelValuesInput } from './model-value';\nimport { type SessionHandle, type SessionRevision, type SessionState } from './session';\n\n/** Agent-visible contract version; bump on breaking API changes. */\nexport const CONTRACT_VERSION = '3.1.0';\n\n/** Options for constructing an {@link RSToolAgent}. */\nexport interface RSToolAgentOptions {\n /** When set, sessions are persisted to this directory and survive process restarts. */\n persistenceDir?: string;\n}\n\n/**\n * Public method surface of {@link RSToolAgent}.\n *\n * Each method accepts an optional `sessionId`; when omitted, the current session is used\n * (or a new one is created where noted).\n */\nexport interface RSToolAgentContract {\n /** Current contract version string (same as {@link CONTRACT_VERSION}). */\n readonly contractVersion: string;\n\n /** Return the current session, or create one with optional `initial` metadata. */\n ensureSession(initial?: Partial<SessionState>): SessionHandle;\n\n /** Create a new session and make it current. */\n createSession(initial?: Partial<SessionState>): SessionHandle;\n\n /** Return the current session handle, or `null` when none is active. */\n getCurrentSession(): SessionHandle | null;\n\n /** Switch the active session; throws when `sessionId` is unknown. */\n setCurrentSession(sessionId: string): SessionHandle;\n\n /** Apply constituent patches to the schema (analyze, merge, optionally commit). */\n applySchemaPatch(input: ApplySchemaPatchInput, sessionId?: string): ApplySchemaPatchResult;\n\n /** Return session summary (default) or full cloned state when `detail` is `'full'`. */\n getSessionState(detail?: SessionStateDetail, sessionId?: string): SessionStateResult;\n\n /** List diagnostics for the session, optionally filtered by constituent or kind. */\n listDiagnostics(filters?: ListDiagnosticsFilters, sessionId?: string): Diagnostic[];\n\n /** Parse and type-check an RSLang expression against the current schema context. */\n analyzeExpression(input: AnalyzeExpressionInput, sessionId?: string): AnalysisResult;\n\n /** Record a revision checkpoint with an optional message. */\n commitStep(message?: string, sessionId?: string): SessionRevision;\n\n /** Export the session as a JSON string (state + diagnostics). */\n exportSession(sessionId?: string): string;\n\n /** Export schema or model payload in Portal JSON format. */\n exportPortal(input: ExportPortalInput, sessionId?: string): ExportPortalResult;\n\n /**\n * Import a session export or Portal JSON payload and make the new session current.\n *\n * When `kind` is `'auto'`, the payload shape is detected automatically.\n */\n importData(payload: string | object, kind?: ImportDataKind): SessionHandle;\n\n /** Set or clear model values for constituents; returns the updated model state. */\n setModelValues(input: SetModelValuesInput, sessionId?: string): Promise<SessionModelState>;\n\n /** Return a deep clone of the session model state. */\n getModelState(sessionId?: string): SessionModelState;\n\n /**\n * Evaluate a stored constituent or a scratch expression.\n *\n * Provide `constituentId`, or both `expression` and `cstType`.\n */\n evaluate(input: EvaluateInput, sessionId?: string): EvaluationResult;\n\n /** Recompute derived model values for all constituents. */\n recalculateModel(sessionId?: string): RecalculateModelResult;\n\n /**\n * Restore declaration order: formal topology, semantic clusters when ready,\n * otherwise stable against type/kernel preferred ranks.\n */\n restoreOrder(sessionId?: string): RestoreOrderResult;\n}\n"],"mappings":";;AAeA,MAAa,mBAAmB"}
1
+ {"version":3,"file":"tool-contract.js","names":[],"sources":["../../src/models/tool-contract.ts"],"sourcesContent":["import {\n type ApplySchemaPatchInput,\n type ApplySchemaPatchResult,\n type RestoreOrderResult,\n type SessionStateDetail,\n type SessionStateResult,\n type SynthesizeInput,\n type SynthesizeResult\n} from './agent-workflow';\nimport { type AnalysisResult, type AnalyzeExpressionInput } from './analysis';\nimport { type Diagnostic, type ListDiagnosticsFilters } from './diagnostic';\nimport { type EvaluateInput, type EvaluationResult } from './evaluation';\nimport { type ExportPortalInput, type ExportPortalResult, type ImportDataKind } from './import-export';\nimport { type RecalculateModelResult, type SessionModelState, type SetModelValuesInput } from './model-value';\nimport { type SessionHandle, type SessionRevision, type SessionState } from './session';\n\n/** Agent-visible contract version; bump on breaking API changes. */\nexport const CONTRACT_VERSION = '3.3.0';\n\n/** Options for constructing an {@link RSToolAgent}. */\nexport interface RSToolAgentOptions {\n /** When set, sessions are persisted to this directory and survive process restarts. */\n persistenceDir?: string;\n}\n\n/**\n * Public method surface of {@link RSToolAgent}.\n *\n * Each method accepts an optional `sessionId`; when omitted, the current session is used\n * (or a new one is created where noted).\n */\nexport interface RSToolAgentContract {\n /** Current contract version string (same as {@link CONTRACT_VERSION}). */\n readonly contractVersion: string;\n\n /** Return the current session, or create one with optional `initial` metadata. */\n ensureSession(initial?: Partial<SessionState>): SessionHandle;\n\n /** Create a new session and make it current. */\n createSession(initial?: Partial<SessionState>): SessionHandle;\n\n /** Return the current session handle, or `null` when none is active. */\n getCurrentSession(): SessionHandle | null;\n\n /** Switch the active session; throws when `sessionId` is unknown. */\n setCurrentSession(sessionId: string): SessionHandle;\n\n /** Apply constituent patches to the schema (analyze, merge, optionally commit). */\n applySchemaPatch(input: ApplySchemaPatchInput, sessionId?: string): ApplySchemaPatchResult;\n\n /** Return session summary (default) or full cloned state when `detail` is `'full'`. */\n getSessionState(detail?: SessionStateDetail, sessionId?: string): SessionStateResult;\n\n /** List diagnostics for the session, optionally filtered by constituent or kind. */\n listDiagnostics(filters?: ListDiagnosticsFilters, sessionId?: string): Diagnostic[];\n\n /** Parse and type-check an RSLang expression against the current schema context. */\n analyzeExpression(input: AnalyzeExpressionInput, sessionId?: string): AnalysisResult;\n\n /** Record a revision checkpoint with an optional message. */\n commitStep(message?: string, sessionId?: string): SessionRevision;\n\n /** Export the session as a JSON string (state + diagnostics). */\n exportSession(sessionId?: string): string;\n\n /** Export schema or model payload in Portal JSON format. */\n exportPortal(input: ExportPortalInput, sessionId?: string): ExportPortalResult;\n\n /**\n * Import a session export or Portal JSON payload and make the new session current.\n *\n * When `kind` is `'auto'`, the payload shape is detected automatically.\n */\n importData(payload: string | object, kind?: ImportDataKind): SessionHandle;\n\n /** Set or clear model values for constituents; returns the updated model state. */\n setModelValues(input: SetModelValuesInput, sessionId?: string): Promise<SessionModelState>;\n\n /** Return a deep clone of the session model state. */\n getModelState(sessionId?: string): SessionModelState;\n\n /**\n * Evaluate a stored constituent or a scratch expression.\n *\n * Provide `constituentId`, or both `expression` and `cstType`.\n */\n evaluate(input: EvaluateInput, sessionId?: string): EvaluationResult;\n\n /** Recompute derived model values for all constituents. */\n recalculateModel(sessionId?: string): RecalculateModelResult;\n\n /**\n * Restore declaration order: formal topology, semantic clusters when ready,\n * otherwise stable against type/kernel preferred ranks.\n */\n restoreOrder(sessionId?: string): RestoreOrderResult;\n\n /**\n * Synthesis by embedding: merge constituents from another session into the receiver,\n * then apply an identification table.\n */\n synthesize(input: SynthesizeInput, sessionId?: string): SynthesizeResult;\n}\n"],"mappings":";;AAiBA,MAAa,mBAAmB"}