@rsconcept/rstool 0.1.0 → 0.2.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 (77) hide show
  1. package/README.md +21 -26
  2. package/dist/analysis-JiwOYDKx.d.ts +16 -0
  3. package/dist/common-DxLg3eXX.d.ts +17 -0
  4. package/dist/constituenta-Dnd6iToB.d.ts +36 -0
  5. package/dist/diagnostic-BMYvciz8.d.ts +15 -0
  6. package/dist/evaluation-CCVYH0wA.d.ts +21 -0
  7. package/dist/index.d.ts +12 -15
  8. package/dist/index.js +7 -585
  9. package/dist/mappers/model-adapter.d.ts +18 -23
  10. package/dist/mappers/model-adapter.js +183 -231
  11. package/dist/mappers/model-adapter.js.map +1 -1
  12. package/dist/mappers/schema-adapter.d.ts +16 -18
  13. package/dist/mappers/schema-adapter.js +55 -84
  14. package/dist/mappers/schema-adapter.js.map +1 -1
  15. package/dist/mappers/types.d.ts +15 -16
  16. package/dist/mappers/types.js +16 -17
  17. package/dist/mappers/types.js.map +1 -1
  18. package/dist/model-value-SFAVj0dw.d.ts +35 -0
  19. package/dist/models/analysis.d.ts +2 -18
  20. package/dist/models/analysis.js +1 -1
  21. package/dist/models/common.d.ts +2 -15
  22. package/dist/models/common.js +1 -8
  23. package/dist/models/constituenta.d.ts +2 -38
  24. package/dist/models/constituenta.js +1 -1
  25. package/dist/models/diagnostic.d.ts +2 -17
  26. package/dist/models/diagnostic.js +1 -1
  27. package/dist/models/evaluation.d.ts +2 -23
  28. package/dist/models/evaluation.js +1 -1
  29. package/dist/models/index.d.ts +10 -13
  30. package/dist/models/index.js +4 -491
  31. package/dist/models/model-value.d.ts +2 -37
  32. package/dist/models/model-value.js +1 -1
  33. package/dist/models/rstool-agent.d.ts +2 -36
  34. package/dist/models/rstool-agent.js +90 -477
  35. package/dist/models/rstool-agent.js.map +1 -1
  36. package/dist/models/session.d.ts +2 -29
  37. package/dist/models/session.js +1 -1
  38. package/dist/models/tool-contract.d.ts +2 -33
  39. package/dist/models/tool-contract.js +5 -5
  40. package/dist/models/tool-contract.js.map +1 -1
  41. package/dist/rstool-agent-DkeH5Qml.d.ts +33 -0
  42. package/dist/session/session-store.d.ts +14 -21
  43. package/dist/session/session-store.js +59 -63
  44. package/dist/session/session-store.js.map +1 -1
  45. package/dist/session-BHGCCLfQ.d.ts +24 -0
  46. package/dist/tool-contract-CsGqg_0P.d.ts +30 -0
  47. package/dist/wrapper/client.d.ts +26 -24
  48. package/dist/wrapper/client.js +90 -93
  49. package/dist/wrapper/client.js.map +1 -1
  50. package/dist/wrapper/stdio-wrapper.d.ts +1 -1
  51. package/dist/wrapper/stdio-wrapper.js +166 -664
  52. package/dist/wrapper/stdio-wrapper.js.map +1 -1
  53. package/docs/CONCEPTUAL-SCHEMA.md +168 -0
  54. package/docs/CONSTITUENTA.md +46 -23
  55. package/docs/DIAGNOSTICS.md +79 -74
  56. package/docs/DOMAIN.md +32 -30
  57. package/docs/GRAMMAR-REF.md +55 -55
  58. package/docs/PORTAL-API.md +7 -10
  59. package/docs/README.md +1 -0
  60. package/docs/SYNTAX.md +32 -32
  61. package/docs/TYPIFICATION.md +14 -9
  62. package/package.json +8 -7
  63. package/skills/INSTALL.md +35 -0
  64. package/skills/README.md +17 -9
  65. package/skills/rstool-helper/EXAMPLES.md +51 -10
  66. package/skills/rstool-helper/GUIDE.md +141 -0
  67. package/skills/rstool-helper/REFERENCE.md +5 -3
  68. package/skills/rstool-helper/SKILL.md +23 -134
  69. package/dist/index.js.map +0 -1
  70. package/dist/models/analysis.js.map +0 -1
  71. package/dist/models/common.js.map +0 -1
  72. package/dist/models/constituenta.js.map +0 -1
  73. package/dist/models/diagnostic.js.map +0 -1
  74. package/dist/models/evaluation.js.map +0 -1
  75. package/dist/models/index.js.map +0 -1
  76. package/dist/models/model-value.js.map +0 -1
  77. package/dist/models/session.js.map +0 -1
@@ -1,89 +1,60 @@
1
- // src/mappers/schema-adapter.ts
1
+ import { toPublicAnalysis, toPublicError } from "./types.js";
2
+ import { CstType } from "@rsconcept/domain/library/rsform";
2
3
  import { RSLangAnalyzer } from "@rsconcept/domain/rslang";
3
4
  import { getAnalysisFor } from "@rsconcept/domain/library/rsform-api";
4
- import { CstType } from "@rsconcept/domain/library/rsform";
5
-
6
- // src/mappers/types.ts
7
- function toPublicError(error) {
8
- return {
9
- code: error.code,
10
- from: error.from,
11
- to: error.to,
12
- params: error.params
13
- };
14
- }
15
- function toPublicAnalysis(analysis) {
16
- return {
17
- success: analysis.success,
18
- type: analysis.type,
19
- valueClass: analysis.valueClass,
20
- diagnostics: analysis.errors.map(toPublicError)
21
- };
22
- }
23
-
24
- // src/mappers/schema-adapter.ts
5
+ //#region src/mappers/schema-adapter.ts
25
6
  var SchemaAdapter = class {
26
- analyzeAgainstSession(session, draft) {
27
- const analyzer = this.buildAnalyzer(session);
28
- const schema = this.toPseudoRSFormState(session, analyzer);
29
- const analysis = getAnalysisFor(draft.definitionFormal, draft.cstType, schema, draft.alias);
30
- const result = toPublicAnalysis({
31
- success: analysis.success,
32
- type: analysis.type,
33
- valueClass: analysis.valueClass,
34
- errors: analysis.errors
35
- });
36
- return {
37
- result,
38
- diagnostics: analysis.errors.map((error) => ({
39
- sessionId: session.sessionId,
40
- constituentId: draft.id,
41
- expression: draft.definitionFormal,
42
- error: toPublicError(error)
43
- }))
44
- };
45
- }
46
- mergeStateWithDraft(session, draft, analysis) {
47
- const state = {
48
- ...draft,
49
- term: draft.term ?? "",
50
- definitionText: draft.definitionText ?? "",
51
- convention: draft.convention ?? "",
52
- analysis
53
- };
54
- const index = session.items.findIndex((item) => item.id === draft.id);
55
- if (index === -1) {
56
- session.items.push(state);
57
- } else {
58
- session.items[index] = state;
59
- }
60
- session.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
61
- return state;
62
- }
63
- toPseudoRSFormState(session, analyzer) {
64
- const cstByAlias = new Map(session.items.map((item) => [item.alias, item]));
65
- return {
66
- items: session.items,
67
- cstByAlias,
68
- analyzer
69
- };
70
- }
71
- buildAnalyzer(session) {
72
- const analyzer = new RSLangAnalyzer();
73
- for (const item of session.items) {
74
- if (item.cstType === CstType.BASE) {
75
- analyzer.addBase(item.alias);
76
- }
77
- analyzer.setGlobal(
78
- item.alias,
79
- item.analysis.type,
80
- item.analysis.valueClass
81
- );
82
- }
83
- return analyzer;
84
- }
85
- };
86
- export {
87
- SchemaAdapter
7
+ analyzeAgainstSession(session, draft) {
8
+ const analyzer = this.buildAnalyzer(session);
9
+ const schema = this.toPseudoRSFormState(session, analyzer);
10
+ const analysis = getAnalysisFor(draft.definitionFormal, draft.cstType, schema, draft.alias);
11
+ return {
12
+ result: toPublicAnalysis({
13
+ success: analysis.success,
14
+ type: analysis.type,
15
+ valueClass: analysis.valueClass,
16
+ errors: analysis.errors
17
+ }),
18
+ diagnostics: analysis.errors.map((error) => ({
19
+ sessionId: session.sessionId,
20
+ constituentId: draft.id,
21
+ expression: draft.definitionFormal,
22
+ error: toPublicError(error)
23
+ }))
24
+ };
25
+ }
26
+ mergeStateWithDraft(session, draft, analysis) {
27
+ const state = {
28
+ ...draft,
29
+ term: draft.term ?? "",
30
+ definitionText: draft.definitionText ?? "",
31
+ convention: draft.convention ?? "",
32
+ analysis
33
+ };
34
+ const index = session.items.findIndex((item) => item.id === draft.id);
35
+ if (index === -1) session.items.push(state);
36
+ else session.items[index] = state;
37
+ session.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
38
+ return state;
39
+ }
40
+ toPseudoRSFormState(session, analyzer) {
41
+ const cstByAlias = new Map(session.items.map((item) => [item.alias, item]));
42
+ return {
43
+ items: session.items,
44
+ cstByAlias,
45
+ analyzer
46
+ };
47
+ }
48
+ buildAnalyzer(session) {
49
+ const analyzer = new RSLangAnalyzer();
50
+ for (const item of session.items) {
51
+ if (item.cstType === CstType.BASE) analyzer.addBase(item.alias);
52
+ analyzer.setGlobal(item.alias, item.analysis.type, item.analysis.valueClass);
53
+ }
54
+ return analyzer;
55
+ }
88
56
  };
57
+ //#endregion
58
+ export { SchemaAdapter };
59
+
89
60
  //# sourceMappingURL=schema-adapter.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/mappers/schema-adapter.ts","../../src/mappers/types.ts"],"sourcesContent":["import { RSLangAnalyzer, type AnalysisFull, type ValueClass } from '@rsconcept/domain/rslang';\nimport { getAnalysisFor } from '@rsconcept/domain/library/rsform-api';\nimport { CstType, type RSForm } from '@rsconcept/domain/library/rsform';\n\nimport {\n type AnalysisResult,\n type ConstituentaDraft,\n type ConstituentaState,\n type DiagnosticRecord,\n type SessionState\n} from '../models';\nimport { toPublicAnalysis, toPublicError } from './types';\n\nexport class SchemaAdapter {\n public analyzeAgainstSession(\n session: SessionState,\n draft: ConstituentaDraft\n ): { result: AnalysisResult; diagnostics: DiagnosticRecord[] } {\n const analyzer = this.buildAnalyzer(session);\n const schema = this.toPseudoRSFormState(session, analyzer);\n const analysis = getAnalysisFor(draft.definitionFormal, draft.cstType, schema as unknown as RSForm, draft.alias);\n const result = toPublicAnalysis({\n success: analysis.success,\n type: analysis.type as Record<string, unknown> | null,\n valueClass: analysis.valueClass,\n errors: analysis.errors\n });\n return {\n result,\n diagnostics: analysis.errors.map(error => ({\n sessionId: session.sessionId,\n constituentId: draft.id,\n expression: draft.definitionFormal,\n error: toPublicError(error)\n }))\n };\n }\n\n public mergeStateWithDraft(\n session: SessionState,\n draft: ConstituentaDraft,\n analysis: AnalysisResult\n ): ConstituentaState {\n const state: ConstituentaState = {\n ...draft,\n term: draft.term ?? '',\n definitionText: draft.definitionText ?? '',\n convention: draft.convention ?? '',\n analysis\n };\n const index = session.items.findIndex(item => item.id === draft.id);\n if (index === -1) {\n session.items.push(state);\n } else {\n session.items[index] = state;\n }\n session.updatedAt = new Date().toISOString();\n return state;\n }\n\n public toPseudoRSFormState(\n session: SessionState,\n analyzer: RSLangAnalyzer\n ): Pick<RSForm, 'items' | 'cstByAlias' | 'analyzer'> {\n const cstByAlias = new Map(session.items.map(item => [item.alias, item]));\n return {\n items: session.items as unknown as RSForm['items'],\n cstByAlias: cstByAlias as unknown as RSForm['cstByAlias'],\n analyzer\n };\n }\n\n private buildAnalyzer(session: SessionState): RSLangAnalyzer {\n const analyzer = new RSLangAnalyzer();\n for (const item of session.items) {\n if (item.cstType === CstType.BASE) {\n analyzer.addBase(item.alias);\n }\n analyzer.setGlobal(\n item.alias,\n item.analysis.type as AnalysisFull['type'],\n item.analysis.valueClass as ValueClass | null\n );\n }\n return analyzer;\n }\n}\n","import { type ValueClass } from '@rsconcept/domain/rslang';\n\nimport { type AnalysisResult, type RSToolErrorDescription } from '../models';\n\nexport interface DomainErrorLike {\n code: number;\n from: number;\n to: number;\n params?: readonly string[];\n}\n\nexport interface DomainAnalysisLike {\n success: boolean;\n type: Record<string, unknown> | null;\n valueClass: ValueClass | null;\n errors: DomainErrorLike[];\n}\n\nexport function toPublicError(error: DomainErrorLike): RSToolErrorDescription {\n return {\n code: error.code,\n from: error.from,\n to: error.to,\n params: error.params\n };\n}\n\nexport function toPublicAnalysis(analysis: DomainAnalysisLike): AnalysisResult {\n return {\n success: analysis.success,\n type: analysis.type,\n valueClass: analysis.valueClass,\n diagnostics: analysis.errors.map(toPublicError)\n };\n}\n"],"mappings":";AAAA,SAAS,sBAA0D;AACnE,SAAS,sBAAsB;AAC/B,SAAS,eAA4B;;;ACgB9B,SAAS,cAAc,OAAgD;AAC5E,SAAO;AAAA,IACL,MAAM,MAAM;AAAA,IACZ,MAAM,MAAM;AAAA,IACZ,IAAI,MAAM;AAAA,IACV,QAAQ,MAAM;AAAA,EAChB;AACF;AAEO,SAAS,iBAAiB,UAA8C;AAC7E,SAAO;AAAA,IACL,SAAS,SAAS;AAAA,IAClB,MAAM,SAAS;AAAA,IACf,YAAY,SAAS;AAAA,IACrB,aAAa,SAAS,OAAO,IAAI,aAAa;AAAA,EAChD;AACF;;;ADrBO,IAAM,gBAAN,MAAoB;AAAA,EAClB,sBACL,SACA,OAC6D;AAC7D,UAAM,WAAW,KAAK,cAAc,OAAO;AAC3C,UAAM,SAAS,KAAK,oBAAoB,SAAS,QAAQ;AACzD,UAAM,WAAW,eAAe,MAAM,kBAAkB,MAAM,SAAS,QAA6B,MAAM,KAAK;AAC/G,UAAM,SAAS,iBAAiB;AAAA,MAC9B,SAAS,SAAS;AAAA,MAClB,MAAM,SAAS;AAAA,MACf,YAAY,SAAS;AAAA,MACrB,QAAQ,SAAS;AAAA,IACnB,CAAC;AACD,WAAO;AAAA,MACL;AAAA,MACA,aAAa,SAAS,OAAO,IAAI,YAAU;AAAA,QACzC,WAAW,QAAQ;AAAA,QACnB,eAAe,MAAM;AAAA,QACrB,YAAY,MAAM;AAAA,QAClB,OAAO,cAAc,KAAK;AAAA,MAC5B,EAAE;AAAA,IACJ;AAAA,EACF;AAAA,EAEO,oBACL,SACA,OACA,UACmB;AACnB,UAAM,QAA2B;AAAA,MAC/B,GAAG;AAAA,MACH,MAAM,MAAM,QAAQ;AAAA,MACpB,gBAAgB,MAAM,kBAAkB;AAAA,MACxC,YAAY,MAAM,cAAc;AAAA,MAChC;AAAA,IACF;AACA,UAAM,QAAQ,QAAQ,MAAM,UAAU,UAAQ,KAAK,OAAO,MAAM,EAAE;AAClE,QAAI,UAAU,IAAI;AAChB,cAAQ,MAAM,KAAK,KAAK;AAAA,IAC1B,OAAO;AACL,cAAQ,MAAM,KAAK,IAAI;AAAA,IACzB;AACA,YAAQ,aAAY,oBAAI,KAAK,GAAE,YAAY;AAC3C,WAAO;AAAA,EACT;AAAA,EAEO,oBACL,SACA,UACmD;AACnD,UAAM,aAAa,IAAI,IAAI,QAAQ,MAAM,IAAI,UAAQ,CAAC,KAAK,OAAO,IAAI,CAAC,CAAC;AACxE,WAAO;AAAA,MACL,OAAO,QAAQ;AAAA,MACf;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEQ,cAAc,SAAuC;AAC3D,UAAM,WAAW,IAAI,eAAe;AACpC,eAAW,QAAQ,QAAQ,OAAO;AAChC,UAAI,KAAK,YAAY,QAAQ,MAAM;AACjC,iBAAS,QAAQ,KAAK,KAAK;AAAA,MAC7B;AACA,eAAS;AAAA,QACP,KAAK;AAAA,QACL,KAAK,SAAS;AAAA,QACd,KAAK,SAAS;AAAA,MAChB;AAAA,IACF;AACA,WAAO;AAAA,EACT;AACF;","names":[]}
1
+ {"version":3,"file":"schema-adapter.js","names":[],"sources":["../../src/mappers/schema-adapter.ts"],"sourcesContent":["import { RSLangAnalyzer, type AnalysisFull, type ValueClass } from '@rsconcept/domain/rslang';\nimport { getAnalysisFor } from '@rsconcept/domain/library/rsform-api';\nimport { CstType, type RSForm } from '@rsconcept/domain/library/rsform';\n\nimport {\n type AnalysisResult,\n type ConstituentaDraft,\n type ConstituentaState,\n type DiagnosticRecord,\n type SessionState\n} from '../models';\nimport { toPublicAnalysis, toPublicError } from './types';\n\nexport class SchemaAdapter {\n public analyzeAgainstSession(\n session: SessionState,\n draft: ConstituentaDraft\n ): { result: AnalysisResult; diagnostics: DiagnosticRecord[] } {\n const analyzer = this.buildAnalyzer(session);\n const schema = this.toPseudoRSFormState(session, analyzer);\n const analysis = getAnalysisFor(draft.definitionFormal, draft.cstType, schema as unknown as RSForm, draft.alias);\n const result = toPublicAnalysis({\n success: analysis.success,\n type: analysis.type as Record<string, unknown> | null,\n valueClass: analysis.valueClass,\n errors: analysis.errors\n });\n return {\n result,\n diagnostics: analysis.errors.map(error => ({\n sessionId: session.sessionId,\n constituentId: draft.id,\n expression: draft.definitionFormal,\n error: toPublicError(error)\n }))\n };\n }\n\n public mergeStateWithDraft(\n session: SessionState,\n draft: ConstituentaDraft,\n analysis: AnalysisResult\n ): ConstituentaState {\n const state: ConstituentaState = {\n ...draft,\n term: draft.term ?? '',\n definitionText: draft.definitionText ?? '',\n convention: draft.convention ?? '',\n analysis\n };\n const index = session.items.findIndex(item => item.id === draft.id);\n if (index === -1) {\n session.items.push(state);\n } else {\n session.items[index] = state;\n }\n session.updatedAt = new Date().toISOString();\n return state;\n }\n\n public toPseudoRSFormState(\n session: SessionState,\n analyzer: RSLangAnalyzer\n ): Pick<RSForm, 'items' | 'cstByAlias' | 'analyzer'> {\n const cstByAlias = new Map(session.items.map(item => [item.alias, item]));\n return {\n items: session.items as unknown as RSForm['items'],\n cstByAlias: cstByAlias as unknown as RSForm['cstByAlias'],\n analyzer\n };\n }\n\n private buildAnalyzer(session: SessionState): RSLangAnalyzer {\n const analyzer = new RSLangAnalyzer();\n for (const item of session.items) {\n if (item.cstType === CstType.BASE) {\n analyzer.addBase(item.alias);\n }\n analyzer.setGlobal(\n item.alias,\n item.analysis.type as AnalysisFull['type'],\n item.analysis.valueClass as ValueClass | null\n );\n }\n return analyzer;\n }\n}\n"],"mappings":";;;;;AAaA,IAAa,gBAAb,MAA2B;CACzB,sBACE,SACA,OAC6D;EAC7D,MAAM,WAAW,KAAK,cAAc,OAAO;EAC3C,MAAM,SAAS,KAAK,oBAAoB,SAAS,QAAQ;EACzD,MAAM,WAAW,eAAe,MAAM,kBAAkB,MAAM,SAAS,QAA6B,MAAM,KAAK;EAO/G,OAAO;GACL,QAPa,iBAAiB;IAC9B,SAAS,SAAS;IAClB,MAAM,SAAS;IACf,YAAY,SAAS;IACrB,QAAQ,SAAS;GACnB,CAEE;GACA,aAAa,SAAS,OAAO,KAAI,WAAU;IACzC,WAAW,QAAQ;IACnB,eAAe,MAAM;IACrB,YAAY,MAAM;IAClB,OAAO,cAAc,KAAK;GAC5B,EAAE;EACJ;CACF;CAEA,oBACE,SACA,OACA,UACmB;EACnB,MAAM,QAA2B;GAC/B,GAAG;GACH,MAAM,MAAM,QAAQ;GACpB,gBAAgB,MAAM,kBAAkB;GACxC,YAAY,MAAM,cAAc;GAChC;EACF;EACA,MAAM,QAAQ,QAAQ,MAAM,WAAU,SAAQ,KAAK,OAAO,MAAM,EAAE;EAClE,IAAI,UAAU,IACZ,QAAQ,MAAM,KAAK,KAAK;OAExB,QAAQ,MAAM,SAAS;EAEzB,QAAQ,6BAAY,IAAI,KAAK,GAAE,YAAY;EAC3C,OAAO;CACT;CAEA,oBACE,SACA,UACmD;EACnD,MAAM,aAAa,IAAI,IAAI,QAAQ,MAAM,KAAI,SAAQ,CAAC,KAAK,OAAO,IAAI,CAAC,CAAC;EACxE,OAAO;GACL,OAAO,QAAQ;GACH;GACZ;EACF;CACF;CAEA,cAAsB,SAAuC;EAC3D,MAAM,WAAW,IAAI,eAAe;EACpC,KAAK,MAAM,QAAQ,QAAQ,OAAO;GAChC,IAAI,KAAK,YAAY,QAAQ,MAC3B,SAAS,QAAQ,KAAK,KAAK;GAE7B,SAAS,UACP,KAAK,OACL,KAAK,SAAS,MACd,KAAK,SAAS,UAChB;EACF;EACA,OAAO;CACT;AACF"}
@@ -1,23 +1,22 @@
1
- import { ValueClass } from '@rsconcept/domain/rslang';
2
- import { AnalysisResult } from '../models/analysis.js';
3
- import { RSToolErrorDescription } from '../models/common.js';
4
- import '@rsconcept/domain/library/rsform';
5
- import '@rsconcept/domain/library/rsmodel';
6
- import '@rsconcept/domain/rslang/error';
1
+ import { a as RSToolErrorDescription } from "../common-DxLg3eXX.js";
2
+ import { t as AnalysisResult } from "../analysis-JiwOYDKx.js";
3
+ import { ValueClass } from "@rsconcept/domain/rslang";
7
4
 
5
+ //#region src/mappers/types.d.ts
8
6
  interface DomainErrorLike {
9
- code: number;
10
- from: number;
11
- to: number;
12
- params?: readonly string[];
7
+ code: number;
8
+ from: number;
9
+ to: number;
10
+ params?: readonly string[];
13
11
  }
14
12
  interface DomainAnalysisLike {
15
- success: boolean;
16
- type: Record<string, unknown> | null;
17
- valueClass: ValueClass | null;
18
- errors: DomainErrorLike[];
13
+ success: boolean;
14
+ type: Record<string, unknown> | null;
15
+ valueClass: ValueClass | null;
16
+ errors: DomainErrorLike[];
19
17
  }
20
18
  declare function toPublicError(error: DomainErrorLike): RSToolErrorDescription;
21
19
  declare function toPublicAnalysis(analysis: DomainAnalysisLike): AnalysisResult;
22
-
23
- export { type DomainAnalysisLike, type DomainErrorLike, toPublicAnalysis, toPublicError };
20
+ //#endregion
21
+ export { DomainAnalysisLike, DomainErrorLike, toPublicAnalysis, toPublicError };
22
+ //# sourceMappingURL=types.d.ts.map
@@ -1,22 +1,21 @@
1
- // src/mappers/types.ts
1
+ //#region src/mappers/types.ts
2
2
  function toPublicError(error) {
3
- return {
4
- code: error.code,
5
- from: error.from,
6
- to: error.to,
7
- params: error.params
8
- };
3
+ return {
4
+ code: error.code,
5
+ from: error.from,
6
+ to: error.to,
7
+ params: error.params
8
+ };
9
9
  }
10
10
  function toPublicAnalysis(analysis) {
11
- return {
12
- success: analysis.success,
13
- type: analysis.type,
14
- valueClass: analysis.valueClass,
15
- diagnostics: analysis.errors.map(toPublicError)
16
- };
11
+ return {
12
+ success: analysis.success,
13
+ type: analysis.type,
14
+ valueClass: analysis.valueClass,
15
+ diagnostics: analysis.errors.map(toPublicError)
16
+ };
17
17
  }
18
- export {
19
- toPublicAnalysis,
20
- toPublicError
21
- };
18
+ //#endregion
19
+ export { toPublicAnalysis, toPublicError };
20
+
22
21
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/mappers/types.ts"],"sourcesContent":["import { type ValueClass } from '@rsconcept/domain/rslang';\n\nimport { type AnalysisResult, type RSToolErrorDescription } from '../models';\n\nexport interface DomainErrorLike {\n code: number;\n from: number;\n to: number;\n params?: readonly string[];\n}\n\nexport interface DomainAnalysisLike {\n success: boolean;\n type: Record<string, unknown> | null;\n valueClass: ValueClass | null;\n errors: DomainErrorLike[];\n}\n\nexport function toPublicError(error: DomainErrorLike): RSToolErrorDescription {\n return {\n code: error.code,\n from: error.from,\n to: error.to,\n params: error.params\n };\n}\n\nexport function toPublicAnalysis(analysis: DomainAnalysisLike): AnalysisResult {\n return {\n success: analysis.success,\n type: analysis.type,\n valueClass: analysis.valueClass,\n diagnostics: analysis.errors.map(toPublicError)\n };\n}\n"],"mappings":";AAkBO,SAAS,cAAc,OAAgD;AAC5E,SAAO;AAAA,IACL,MAAM,MAAM;AAAA,IACZ,MAAM,MAAM;AAAA,IACZ,IAAI,MAAM;AAAA,IACV,QAAQ,MAAM;AAAA,EAChB;AACF;AAEO,SAAS,iBAAiB,UAA8C;AAC7E,SAAO;AAAA,IACL,SAAS,SAAS;AAAA,IAClB,MAAM,SAAS;AAAA,IACf,YAAY,SAAS;AAAA,IACrB,aAAa,SAAS,OAAO,IAAI,aAAa;AAAA,EAChD;AACF;","names":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/mappers/types.ts"],"sourcesContent":["import { type ValueClass } from '@rsconcept/domain/rslang';\n\nimport { type AnalysisResult, type RSToolErrorDescription } from '../models';\n\nexport interface DomainErrorLike {\n code: number;\n from: number;\n to: number;\n params?: readonly string[];\n}\n\nexport interface DomainAnalysisLike {\n success: boolean;\n type: Record<string, unknown> | null;\n valueClass: ValueClass | null;\n errors: DomainErrorLike[];\n}\n\nexport function toPublicError(error: DomainErrorLike): RSToolErrorDescription {\n return {\n code: error.code,\n from: error.from,\n to: error.to,\n params: error.params\n };\n}\n\nexport function toPublicAnalysis(analysis: DomainAnalysisLike): AnalysisResult {\n return {\n success: analysis.success,\n type: analysis.type,\n valueClass: analysis.valueClass,\n diagnostics: analysis.errors.map(toPublicError)\n };\n}\n"],"mappings":";AAkBA,SAAgB,cAAc,OAAgD;CAC5E,OAAO;EACL,MAAM,MAAM;EACZ,MAAM,MAAM;EACZ,IAAI,MAAM;EACV,QAAQ,MAAM;CAChB;AACF;AAEA,SAAgB,iBAAiB,UAA8C;CAC7E,OAAO;EACL,SAAS,SAAS;EAClB,MAAM,SAAS;EACf,YAAY,SAAS;EACrB,aAAa,SAAS,OAAO,IAAI,aAAa;CAChD;AACF"}
@@ -0,0 +1,35 @@
1
+ import { o as RSToolValue, r as EvalStatus, t as BasicBinding } from "./common-DxLg3eXX.js";
2
+
3
+ //#region src/models/model-value.d.ts
4
+ interface ModelValueState {
5
+ id: number;
6
+ /** Frontend type string: `basic` or normalized effective typification. */
7
+ type: string;
8
+ value: RSToolValue | BasicBinding;
9
+ }
10
+ interface SessionModelState {
11
+ items: ModelValueState[];
12
+ }
13
+ interface SetConstituentaValueInput {
14
+ target: number;
15
+ /** Optional type override; inferred from schema when omitted. */
16
+ type?: string;
17
+ value: RSToolValue | BasicBinding;
18
+ }
19
+ interface SetConstituentaValuesInput {
20
+ items: SetConstituentaValueInput[];
21
+ }
22
+ interface ClearConstituentaValuesInput {
23
+ items: number[];
24
+ }
25
+ interface RecalculateModelResult {
26
+ items: Array<{
27
+ id: number;
28
+ alias: string;
29
+ value: RSToolValue | null;
30
+ status: EvalStatus;
31
+ }>;
32
+ }
33
+ //#endregion
34
+ export { SetConstituentaValueInput as a, SessionModelState as i, ModelValueState as n, SetConstituentaValuesInput as o, RecalculateModelResult as r, ClearConstituentaValuesInput as t };
35
+ //# sourceMappingURL=model-value-SFAVj0dw.d.ts.map
@@ -1,18 +1,2 @@
1
- import { RSToolErrorDescription } from './common.js';
2
- import { ValueClass } from '@rsconcept/domain/rslang';
3
- import { CstType } from '@rsconcept/domain/library/rsform';
4
- import '@rsconcept/domain/library/rsmodel';
5
- import '@rsconcept/domain/rslang/error';
6
-
7
- interface AnalyzeExpressionInput {
8
- expression: string;
9
- cstType: CstType;
10
- }
11
- interface AnalysisResult {
12
- success: boolean;
13
- type: Record<string, unknown> | null;
14
- valueClass: ValueClass | null;
15
- diagnostics: RSToolErrorDescription[];
16
- }
17
-
18
- export type { AnalysisResult, AnalyzeExpressionInput };
1
+ import { n as AnalyzeExpressionInput, t as AnalysisResult } from "../analysis-JiwOYDKx.js";
2
+ export { AnalysisResult, AnalyzeExpressionInput };
@@ -1 +1 @@
1
- //# sourceMappingURL=analysis.js.map
1
+ export {};
@@ -1,15 +1,2 @@
1
- export { CstType } from '@rsconcept/domain/library/rsform';
2
- export { BasicBinding, EvalStatus } from '@rsconcept/domain/library/rsmodel';
3
- export { ValueClass } from '@rsconcept/domain/rslang';
4
- export { RSErrorCode } from '@rsconcept/domain/rslang/error';
5
-
6
- /** Runtime evaluation value: number, nested array (set/tuple), or boolean 0/1. */
7
- type RSToolValue = number | RSToolValue[];
8
- interface RSToolErrorDescription {
9
- code: number;
10
- from: number;
11
- to: number;
12
- params?: readonly string[];
13
- }
14
-
15
- export type { RSToolErrorDescription, RSToolValue };
1
+ import { a as RSToolErrorDescription, i as RSErrorCode, n as CstType, o as RSToolValue, r as EvalStatus, s as ValueClass, t as BasicBinding } from "../common-DxLg3eXX.js";
2
+ export { type BasicBinding, CstType, EvalStatus, RSErrorCode, RSToolErrorDescription, RSToolValue, ValueClass };
@@ -1,12 +1,5 @@
1
- // src/models/common.ts
2
1
  import { CstType } from "@rsconcept/domain/library/rsform";
3
2
  import { EvalStatus } from "@rsconcept/domain/library/rsmodel";
4
3
  import { ValueClass } from "@rsconcept/domain/rslang";
5
4
  import { RSErrorCode } from "@rsconcept/domain/rslang/error";
6
- export {
7
- CstType,
8
- EvalStatus,
9
- RSErrorCode,
10
- ValueClass
11
- };
12
- //# sourceMappingURL=common.js.map
5
+ export { CstType, EvalStatus, RSErrorCode, ValueClass };
@@ -1,38 +1,2 @@
1
- import { AnalysisResult } from './analysis.js';
2
- import { CstType } from '@rsconcept/domain/library/rsform';
3
- import { DiagnosticRecord } from './diagnostic.js';
4
- import './common.js';
5
- import '@rsconcept/domain/library/rsmodel';
6
- import '@rsconcept/domain/rslang';
7
- import '@rsconcept/domain/rslang/error';
8
-
9
- interface ConstituentaDraft {
10
- id: number;
11
- /** Alias */
12
- alias: string;
13
- /** CST type */
14
- cstType: CstType;
15
- /** Formal definition */
16
- definitionFormal: string;
17
- /** Natural-language term */
18
- term?: string;
19
- /** Natural-language definition */
20
- definitionText?: string;
21
- /** Convention or comment */
22
- convention?: string;
23
- }
24
- interface ConstituentaState extends Omit<ConstituentaDraft, 'term' | 'definitionText' | 'convention'> {
25
- term: string;
26
- definitionText: string;
27
- convention: string;
28
- analysis: AnalysisResult;
29
- }
30
- interface AddOrUpdateConstituentaInput {
31
- draft: ConstituentaDraft;
32
- }
33
- interface AddOrUpdateConstituentaResult {
34
- state: ConstituentaState;
35
- diagnostics: DiagnosticRecord[];
36
- }
37
-
38
- export type { AddOrUpdateConstituentaInput, AddOrUpdateConstituentaResult, ConstituentaDraft, ConstituentaState };
1
+ import { i as ConstituentaState, n as AddOrUpdateConstituentaResult, r as ConstituentaDraft, t as AddOrUpdateConstituentaInput } from "../constituenta-Dnd6iToB.js";
2
+ export { AddOrUpdateConstituentaInput, AddOrUpdateConstituentaResult, ConstituentaDraft, ConstituentaState };
@@ -1 +1 @@
1
- //# sourceMappingURL=constituenta.js.map
1
+ export {};
@@ -1,17 +1,2 @@
1
- import { RSToolErrorDescription } from './common.js';
2
- import '@rsconcept/domain/library/rsform';
3
- import '@rsconcept/domain/library/rsmodel';
4
- import '@rsconcept/domain/rslang';
5
- import '@rsconcept/domain/rslang/error';
6
-
7
- interface DiagnosticRecord {
8
- sessionId: string;
9
- constituentId?: number;
10
- expression: string;
11
- error: RSToolErrorDescription;
12
- }
13
- interface ListDiagnosticsFilters {
14
- constituentId?: number;
15
- }
16
-
17
- export type { DiagnosticRecord, ListDiagnosticsFilters };
1
+ import { n as ListDiagnosticsFilters, t as DiagnosticRecord } from "../diagnostic-BMYvciz8.js";
2
+ export { DiagnosticRecord, ListDiagnosticsFilters };
@@ -1 +1 @@
1
- //# sourceMappingURL=diagnostic.js.map
1
+ export {};
@@ -1,23 +1,2 @@
1
- import { RSToolValue, RSToolErrorDescription } from './common.js';
2
- import { CstType } from '@rsconcept/domain/library/rsform';
3
- import { BasicBinding, EvalStatus } from '@rsconcept/domain/library/rsmodel';
4
- import '@rsconcept/domain/rslang';
5
- import '@rsconcept/domain/rslang/error';
6
-
7
- interface EvaluateExpressionInput {
8
- expression: string;
9
- cstType: CstType;
10
- }
11
- interface EvaluateConstituentaInput {
12
- constituentId: number;
13
- }
14
- interface EvaluationResult {
15
- success: boolean;
16
- value: RSToolValue | BasicBinding | null;
17
- status: EvalStatus;
18
- iterations: number;
19
- cacheHits: number;
20
- diagnostics: RSToolErrorDescription[];
21
- }
22
-
23
- export type { EvaluateConstituentaInput, EvaluateExpressionInput, EvaluationResult };
1
+ import { n as EvaluateExpressionInput, r as EvaluationResult, t as EvaluateConstituentaInput } from "../evaluation-CCVYH0wA.js";
2
+ export { EvaluateConstituentaInput, EvaluateExpressionInput, EvaluationResult };
@@ -1 +1 @@
1
- //# sourceMappingURL=evaluation.js.map
1
+ export {};
@@ -1,13 +1,10 @@
1
- export { AnalysisResult, AnalyzeExpressionInput } from './analysis.js';
2
- export { RSToolErrorDescription, RSToolValue } from './common.js';
3
- export { AddOrUpdateConstituentaInput, AddOrUpdateConstituentaResult, ConstituentaDraft, ConstituentaState } from './constituenta.js';
4
- export { DiagnosticRecord, ListDiagnosticsFilters } from './diagnostic.js';
5
- export { EvaluateConstituentaInput, EvaluateExpressionInput, EvaluationResult } from './evaluation.js';
6
- export { ClearConstituentaValuesInput, ModelValueState, RecalculateModelResult, SessionModelState, SetConstituentaValueInput, SetConstituentaValuesInput } from './model-value.js';
7
- export { RSToolAgent } from './rstool-agent.js';
8
- export { SessionHandle, SessionRevision, SessionState } from './session.js';
9
- export { CONTRACT_VERSION, RSToolAgentContract } from './tool-contract.js';
10
- export { BasicBinding, EvalStatus } from '@rsconcept/domain/library/rsmodel';
11
- export { CstType } from '@rsconcept/domain/library/rsform';
12
- export { RSErrorCode } from '@rsconcept/domain/rslang/error';
13
- export { ValueClass } from '@rsconcept/domain/rslang';
1
+ import { a as RSToolErrorDescription, i as RSErrorCode, n as CstType, o as RSToolValue, r as EvalStatus, s as ValueClass, t as BasicBinding } from "../common-DxLg3eXX.js";
2
+ import { n as AnalyzeExpressionInput, t as AnalysisResult } from "../analysis-JiwOYDKx.js";
3
+ import { n as ListDiagnosticsFilters, t as DiagnosticRecord } from "../diagnostic-BMYvciz8.js";
4
+ import { i as ConstituentaState, n as AddOrUpdateConstituentaResult, r as ConstituentaDraft, t as AddOrUpdateConstituentaInput } from "../constituenta-Dnd6iToB.js";
5
+ import { n as EvaluateExpressionInput, r as EvaluationResult, t as EvaluateConstituentaInput } from "../evaluation-CCVYH0wA.js";
6
+ import { a as SetConstituentaValueInput, i as SessionModelState, n as ModelValueState, o as SetConstituentaValuesInput, r as RecalculateModelResult, t as ClearConstituentaValuesInput } from "../model-value-SFAVj0dw.js";
7
+ import { n as SessionRevision, r as SessionState, t as SessionHandle } from "../session-BHGCCLfQ.js";
8
+ import { n as RSToolAgentContract, t as CONTRACT_VERSION } from "../tool-contract-CsGqg_0P.js";
9
+ import { t as RSToolAgent } from "../rstool-agent-DkeH5Qml.js";
10
+ export { type AddOrUpdateConstituentaInput, type AddOrUpdateConstituentaResult, type AnalysisResult, type AnalyzeExpressionInput, type BasicBinding, CONTRACT_VERSION, type ClearConstituentaValuesInput, type ConstituentaDraft, type ConstituentaState, CstType, type DiagnosticRecord, EvalStatus, type EvaluateConstituentaInput, type EvaluateExpressionInput, type EvaluationResult, type ListDiagnosticsFilters, type ModelValueState, RSErrorCode, RSToolAgent, type RSToolAgentContract, type RSToolErrorDescription, type RSToolValue, type RecalculateModelResult, type SessionHandle, type SessionModelState, type SessionRevision, type SessionState, type SetConstituentaValueInput, type SetConstituentaValuesInput, ValueClass };