@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,491 +1,4 @@
1
- // src/models/common.ts
2
- import { CstType } from "@rsconcept/domain/library/rsform";
3
- import { EvalStatus } from "@rsconcept/domain/library/rsmodel";
4
- import { ValueClass } from "@rsconcept/domain/rslang";
5
- import { RSErrorCode } from "@rsconcept/domain/rslang/error";
6
-
7
- // src/mappers/model-adapter.ts
8
- import { Graph } from "@rsconcept/domain/graph/graph";
9
- import { extractGlobals } from "@rsconcept/domain/rslang/api";
10
- import { RSLangAnalyzer } from "@rsconcept/domain/rslang";
11
- import { isBaseSet } from "@rsconcept/domain/library/rsform-api";
12
- import { CstType as CstType2 } from "@rsconcept/domain/library/rsform";
13
- import { RSEngine } from "@rsconcept/domain/library/rsengine";
14
- import { EvalStatus as EvalStatus2 } from "@rsconcept/domain/library/rsmodel";
15
- import {
16
- isInferrable,
17
- isInterpretable,
18
- toBasicBinding,
19
- validateBasicBindingData,
20
- validateValueData
21
- } from "@rsconcept/domain/library/rsmodel-api";
22
-
23
- // src/mappers/types.ts
24
- function toPublicError(error) {
25
- return {
26
- code: error.code,
27
- from: error.from,
28
- to: error.to,
29
- params: error.params
30
- };
31
- }
32
- function toPublicAnalysis(analysis) {
33
- return {
34
- success: analysis.success,
35
- type: analysis.type,
36
- valueClass: analysis.valueClass,
37
- diagnostics: analysis.errors.map(toPublicError)
38
- };
39
- }
40
-
41
- // src/mappers/model-adapter.ts
42
- var SESSION_MODEL_ID = 0;
43
- var ModelAdapter = class {
44
- async setConstituentaValue(session, input) {
45
- this.validateSetInput(session, input);
46
- const engine = this.createEngine(session);
47
- const cst = session.items.find((item) => item.id === input.target);
48
- const frontendType = cst.cstType;
49
- if (isBaseSet(frontendType)) {
50
- const binding = toBasicBinding(input.value);
51
- await engine.setBasicValue(input.target, binding);
52
- } else {
53
- await engine.setStructureValue(input.target, input.value);
54
- }
55
- session.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
56
- return structuredClone(session.model);
57
- }
58
- async setConstituentaValues(session, input) {
59
- for (const item of input.items) {
60
- await this.setConstituentaValue(session, item);
61
- }
62
- return structuredClone(session.model);
63
- }
64
- async clearConstituentaValues(session, ids) {
65
- const engine = this.createEngine(session);
66
- for (const id of ids) {
67
- await engine.resetValue(id);
68
- session.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
69
- }
70
- return structuredClone(session.model);
71
- }
72
- evaluateExpression(session, expression, cstType) {
73
- const engine = this.createEngine(session);
74
- const result = engine.evaluateExpression(expression, cstType);
75
- const status = result.value === null ? result.errors.length > 0 ? EvalStatus2.EVAL_FAIL : EvalStatus2.EMPTY : EvalStatus2.HAS_DATA;
76
- return toPublicEvaluationResult(result.value, result.errors, result.iterations, result.cacheHits, status);
77
- }
78
- evaluateConstituenta(session, constituentId) {
79
- const cst = session.items.find((item) => item.id === constituentId);
80
- if (!cst) {
81
- throw new Error(`Unknown constituent: ${constituentId}`);
82
- }
83
- const engine = this.createEngine(session);
84
- const result = engine.calculateCst(constituentId);
85
- const status = engine.getCstStatus(constituentId);
86
- return toPublicEvaluationResult(result.value, result.errors, result.iterations, result.cacheHits, status);
87
- }
88
- recalculateModel(session) {
89
- const engine = this.createEngine(session);
90
- engine.recalculateAll();
91
- const items = session.items.map((item) => ({
92
- id: item.id,
93
- alias: item.alias,
94
- value: engine.getCstValue(item.id),
95
- status: engine.getCstStatus(item.id)
96
- }));
97
- return { items };
98
- }
99
- createEngine(session) {
100
- const schema = buildRSFormFromSession(session);
101
- const model = buildRSModelFromSession(session);
102
- const engine = new RSEngine(SESSION_MODEL_ID, createInMemoryServices(session));
103
- engine.loadData(schema, model);
104
- return engine;
105
- }
106
- validateSetInput(session, input) {
107
- const cst = session.items.find((item) => item.id === input.target);
108
- if (!cst) {
109
- throw new Error(`Unknown constituent: ${input.target}`);
110
- }
111
- const frontendType = cst.cstType;
112
- if (!isInterpretable(frontendType)) {
113
- throw new Error(`Constituent ${cst.alias} is not interpretable`);
114
- }
115
- if (isInferrable(frontendType)) {
116
- throw new Error(`Constituent ${cst.alias} is inferrable and cannot be set directly`);
117
- }
118
- if (isBaseSet(frontendType)) {
119
- if (!validateBasicBindingData(input.value)) {
120
- throw new Error(`Invalid basic binding for ${cst.alias}`);
121
- }
122
- return;
123
- }
124
- if (!validateValueData(input.value)) {
125
- throw new Error(`Invalid structured value for ${cst.alias}`);
126
- }
127
- }
128
- };
129
- function createInMemoryServices(session) {
130
- return {
131
- setCstValue: async ({ data }) => {
132
- for (const item of data) {
133
- const entry = {
134
- id: item.target,
135
- type: item.type,
136
- value: item.data
137
- };
138
- const index = session.model.items.findIndex((existing) => existing.id === item.target);
139
- if (index === -1) {
140
- session.model.items.push(entry);
141
- } else {
142
- session.model.items[index] = entry;
143
- }
144
- }
145
- },
146
- clearValues: async ({ data }) => {
147
- const ids = new Set(data.items);
148
- session.model.items = session.model.items.filter((item) => !ids.has(item.id));
149
- }
150
- };
151
- }
152
- function buildRSFormFromSession(session) {
153
- const graph = new Graph();
154
- const cstByAlias = /* @__PURE__ */ new Map();
155
- const cstByID = /* @__PURE__ */ new Map();
156
- const analyzer = new RSLangAnalyzer();
157
- const items = session.items.map((item) => {
158
- const cst = toFrontendConstituenta(item);
159
- cstByAlias.set(cst.alias, cst);
160
- cstByID.set(cst.id, cst);
161
- graph.addNode(cst.id);
162
- if (item.cstType === CstType2.BASE) {
163
- analyzer.addBase(cst.alias);
164
- }
165
- if (cst.effectiveType) {
166
- analyzer.setGlobal(cst.alias, cst.effectiveType, cst.analysis.valueClass);
167
- }
168
- return cst;
169
- });
170
- for (const cst of items) {
171
- for (const alias of extractGlobals(cst.definition_formal)) {
172
- const source = cstByAlias.get(alias);
173
- if (source) {
174
- graph.addEdge(source.id, cst.id);
175
- }
176
- }
177
- }
178
- return {
179
- id: 0,
180
- items,
181
- cstByAlias,
182
- cstByID,
183
- graph,
184
- analyzer,
185
- inheritance: [],
186
- attribution: [],
187
- attribution_graph: graph.clone(),
188
- oss: [],
189
- models: [],
190
- editors: [],
191
- versions: [],
192
- is_produced: false,
193
- is_attributive: false,
194
- version: "latest"
195
- };
196
- }
197
- function buildRSModelFromSession(session) {
198
- return {
199
- id: SESSION_MODEL_ID,
200
- schema: 0,
201
- editors: [],
202
- items: session.model.items.map((item) => ({
203
- id: item.id,
204
- type: item.type,
205
- value: item.value
206
- }))
207
- };
208
- }
209
- function toFrontendConstituenta(item) {
210
- const effectiveType = item.analysis.type ?? null;
211
- return {
212
- id: item.id,
213
- alias: item.alias,
214
- cst_type: item.cstType,
215
- definition_formal: item.definitionFormal,
216
- definition_raw: item.definitionFormal,
217
- definition_resolved: item.definitionFormal,
218
- term_raw: item.term,
219
- term_resolved: item.term,
220
- term_forms: [],
221
- convention: item.convention,
222
- typification_manual: "",
223
- value_is_property: false,
224
- crucial: false,
225
- attributes: [],
226
- homonyms: [],
227
- formalDuplicates: [],
228
- analysis: {
229
- success: item.analysis.success,
230
- type: effectiveType,
231
- valueClass: item.analysis.valueClass
232
- },
233
- effectiveType,
234
- is_type_mismatch: false,
235
- schema: 0,
236
- cst_class: "derived",
237
- status: item.analysis.success ? "verified" : "incorrect",
238
- is_template: false,
239
- is_simple_expression: true,
240
- parent_schema_index: 0,
241
- parent_schema: null,
242
- is_inherited: false,
243
- has_inherited_children: false,
244
- spawn: [],
245
- spawn_alias: []
246
- };
247
- }
248
- function toPublicEvaluationResult(value, errors, iterations, cacheHits, status) {
249
- const diagnostics = errors.map(toPublicError);
250
- return {
251
- success: diagnostics.length === 0 && value !== null,
252
- value,
253
- status,
254
- iterations,
255
- cacheHits,
256
- diagnostics
257
- };
258
- }
259
-
260
- // src/mappers/schema-adapter.ts
261
- import { RSLangAnalyzer as RSLangAnalyzer2 } from "@rsconcept/domain/rslang";
262
- import { getAnalysisFor } from "@rsconcept/domain/library/rsform-api";
263
- import { CstType as CstType3 } from "@rsconcept/domain/library/rsform";
264
- var SchemaAdapter = class {
265
- analyzeAgainstSession(session, draft) {
266
- const analyzer = this.buildAnalyzer(session);
267
- const schema = this.toPseudoRSFormState(session, analyzer);
268
- const analysis = getAnalysisFor(draft.definitionFormal, draft.cstType, schema, draft.alias);
269
- const result = toPublicAnalysis({
270
- success: analysis.success,
271
- type: analysis.type,
272
- valueClass: analysis.valueClass,
273
- errors: analysis.errors
274
- });
275
- return {
276
- result,
277
- diagnostics: analysis.errors.map((error) => ({
278
- sessionId: session.sessionId,
279
- constituentId: draft.id,
280
- expression: draft.definitionFormal,
281
- error: toPublicError(error)
282
- }))
283
- };
284
- }
285
- mergeStateWithDraft(session, draft, analysis) {
286
- const state = {
287
- ...draft,
288
- term: draft.term ?? "",
289
- definitionText: draft.definitionText ?? "",
290
- convention: draft.convention ?? "",
291
- analysis
292
- };
293
- const index = session.items.findIndex((item) => item.id === draft.id);
294
- if (index === -1) {
295
- session.items.push(state);
296
- } else {
297
- session.items[index] = state;
298
- }
299
- session.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
300
- return state;
301
- }
302
- toPseudoRSFormState(session, analyzer) {
303
- const cstByAlias = new Map(session.items.map((item) => [item.alias, item]));
304
- return {
305
- items: session.items,
306
- cstByAlias,
307
- analyzer
308
- };
309
- }
310
- buildAnalyzer(session) {
311
- const analyzer = new RSLangAnalyzer2();
312
- for (const item of session.items) {
313
- if (item.cstType === CstType3.BASE) {
314
- analyzer.addBase(item.alias);
315
- }
316
- analyzer.setGlobal(
317
- item.alias,
318
- item.analysis.type,
319
- item.analysis.valueClass
320
- );
321
- }
322
- return analyzer;
323
- }
324
- };
325
-
326
- // src/session/session-store.ts
327
- import { randomUUID } from "crypto";
328
- var SessionStore = class {
329
- sessions = /* @__PURE__ */ new Map();
330
- create(initial, contractVersion) {
331
- const now = (/* @__PURE__ */ new Date()).toISOString();
332
- const sessionId = initial?.sessionId ?? randomUUID();
333
- const state = {
334
- sessionId,
335
- createdAt: initial?.createdAt ?? now,
336
- updatedAt: now,
337
- revisions: initial?.revisions ?? [],
338
- items: initial?.items ?? [],
339
- model: initial?.model ?? { items: [] }
340
- };
341
- this.sessions.set(sessionId, {
342
- state,
343
- diagnostics: []
344
- });
345
- return {
346
- sessionId,
347
- contractVersion: contractVersion ?? "1.0.0"
348
- };
349
- }
350
- get(sessionId) {
351
- const found = this.sessions.get(sessionId);
352
- if (!found) {
353
- throw new Error(`Unknown session: ${sessionId}`);
354
- }
355
- return found;
356
- }
357
- replaceState(sessionId, nextState) {
358
- const found = this.get(sessionId);
359
- found.state = {
360
- ...nextState,
361
- updatedAt: (/* @__PURE__ */ new Date()).toISOString()
362
- };
363
- }
364
- addRevision(sessionId, message) {
365
- const found = this.get(sessionId);
366
- const revision = {
367
- revisionId: randomUUID(),
368
- at: (/* @__PURE__ */ new Date()).toISOString(),
369
- message
370
- };
371
- found.state.revisions.push(revision);
372
- found.state.updatedAt = revision.at;
373
- return revision;
374
- }
375
- appendDiagnostics(sessionId, records) {
376
- const found = this.get(sessionId);
377
- found.diagnostics.push(...records);
378
- found.state.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
379
- }
380
- listDiagnostics(sessionId, filters) {
381
- const found = this.get(sessionId);
382
- if (!filters?.constituentId) {
383
- return [...found.diagnostics];
384
- }
385
- return found.diagnostics.filter((record) => record.constituentId === filters.constituentId);
386
- }
387
- };
388
-
389
- // src/models/tool-contract.ts
390
- var CONTRACT_VERSION = "1.2.0";
391
-
392
- // src/models/rstool-agent.ts
393
- var RSToolAgent = class {
394
- contractVersion = CONTRACT_VERSION;
395
- sessions = new SessionStore();
396
- adapter = new SchemaAdapter();
397
- evaluation = new ModelAdapter();
398
- createSession(initial) {
399
- return this.sessions.create(initial, this.contractVersion);
400
- }
401
- addOrUpdateConstituenta(sessionId, input) {
402
- const envelope = this.sessions.get(sessionId);
403
- const { result, diagnostics } = this.adapter.analyzeAgainstSession(envelope.state, input.draft);
404
- const state = this.adapter.mergeStateWithDraft(envelope.state, input.draft, result);
405
- this.sessions.appendDiagnostics(sessionId, diagnostics);
406
- return {
407
- state,
408
- diagnostics
409
- };
410
- }
411
- analyzeExpression(sessionId, input) {
412
- const envelope = this.sessions.get(sessionId);
413
- const { result, diagnostics } = this.adapter.analyzeAgainstSession(envelope.state, {
414
- id: -1,
415
- alias: "_analysis",
416
- cstType: input.cstType,
417
- definitionFormal: input.expression
418
- });
419
- this.sessions.appendDiagnostics(
420
- sessionId,
421
- diagnostics.map((item) => ({ ...item, constituentId: void 0 }))
422
- );
423
- return result;
424
- }
425
- getFormState(sessionId) {
426
- const envelope = this.sessions.get(sessionId);
427
- return structuredClone(envelope.state);
428
- }
429
- listDiagnostics(sessionId, filters) {
430
- return this.sessions.listDiagnostics(sessionId, filters);
431
- }
432
- commitStep(sessionId, message) {
433
- return this.sessions.addRevision(sessionId, message);
434
- }
435
- exportSession(sessionId) {
436
- const envelope = this.sessions.get(sessionId);
437
- return JSON.stringify(
438
- {
439
- contractVersion: this.contractVersion,
440
- state: envelope.state,
441
- diagnostics: envelope.diagnostics
442
- },
443
- null,
444
- 2
445
- );
446
- }
447
- importSession(payload) {
448
- const parsed = JSON.parse(payload);
449
- if (!parsed.state.model) {
450
- parsed.state.model = { items: [] };
451
- }
452
- return this.sessions.create(parsed.state, this.contractVersion);
453
- }
454
- async setConstituentaValue(sessionId, input) {
455
- const envelope = this.sessions.get(sessionId);
456
- return this.evaluation.setConstituentaValue(envelope.state, input);
457
- }
458
- async setConstituentaValues(sessionId, input) {
459
- const envelope = this.sessions.get(sessionId);
460
- return this.evaluation.setConstituentaValues(envelope.state, input);
461
- }
462
- async clearConstituentaValues(sessionId, input) {
463
- const envelope = this.sessions.get(sessionId);
464
- return this.evaluation.clearConstituentaValues(envelope.state, input.items);
465
- }
466
- getModelState(sessionId) {
467
- const envelope = this.sessions.get(sessionId);
468
- return structuredClone(envelope.state.model);
469
- }
470
- evaluateExpression(sessionId, input) {
471
- const envelope = this.sessions.get(sessionId);
472
- return this.evaluation.evaluateExpression(envelope.state, input.expression, input.cstType);
473
- }
474
- evaluateConstituenta(sessionId, input) {
475
- const envelope = this.sessions.get(sessionId);
476
- return this.evaluation.evaluateConstituenta(envelope.state, input.constituentId);
477
- }
478
- recalculateModel(sessionId) {
479
- const envelope = this.sessions.get(sessionId);
480
- return this.evaluation.recalculateModel(envelope.state);
481
- }
482
- };
483
- export {
484
- CONTRACT_VERSION,
485
- CstType,
486
- EvalStatus,
487
- RSErrorCode,
488
- RSToolAgent,
489
- ValueClass
490
- };
491
- //# sourceMappingURL=index.js.map
1
+ import { CstType, EvalStatus, RSErrorCode, ValueClass } from "./common.js";
2
+ import { CONTRACT_VERSION } from "./tool-contract.js";
3
+ import { RSToolAgent } from "./rstool-agent.js";
4
+ export { CONTRACT_VERSION, CstType, EvalStatus, RSErrorCode, RSToolAgent, ValueClass };
@@ -1,37 +1,2 @@
1
- import { RSToolValue } from './common.js';
2
- import { BasicBinding, EvalStatus } from '@rsconcept/domain/library/rsmodel';
3
- import '@rsconcept/domain/library/rsform';
4
- import '@rsconcept/domain/rslang';
5
- import '@rsconcept/domain/rslang/error';
6
-
7
- interface ModelValueState {
8
- id: number;
9
- /** Frontend type string: `basic` or normalized effective typification. */
10
- type: string;
11
- value: RSToolValue | BasicBinding;
12
- }
13
- interface SessionModelState {
14
- items: ModelValueState[];
15
- }
16
- interface SetConstituentaValueInput {
17
- target: number;
18
- /** Optional type override; inferred from schema when omitted. */
19
- type?: string;
20
- value: RSToolValue | BasicBinding;
21
- }
22
- interface SetConstituentaValuesInput {
23
- items: SetConstituentaValueInput[];
24
- }
25
- interface ClearConstituentaValuesInput {
26
- items: number[];
27
- }
28
- interface RecalculateModelResult {
29
- items: Array<{
30
- id: number;
31
- alias: string;
32
- value: RSToolValue | null;
33
- status: EvalStatus;
34
- }>;
35
- }
36
-
37
- export type { ClearConstituentaValuesInput, ModelValueState, RecalculateModelResult, SessionModelState, SetConstituentaValueInput, SetConstituentaValuesInput };
1
+ import { a as SetConstituentaValueInput, i as SessionModelState, n as ModelValueState, o as SetConstituentaValuesInput, r as RecalculateModelResult, t as ClearConstituentaValuesInput } from "../model-value-SFAVj0dw.js";
2
+ export { ClearConstituentaValuesInput, ModelValueState, RecalculateModelResult, SessionModelState, SetConstituentaValueInput, SetConstituentaValuesInput };
@@ -1 +1 @@
1
- //# sourceMappingURL=model-value.js.map
1
+ export {};
@@ -1,36 +1,2 @@
1
- import { AnalyzeExpressionInput, AnalysisResult } from './analysis.js';
2
- import './common.js';
3
- import { AddOrUpdateConstituentaInput, AddOrUpdateConstituentaResult } from './constituenta.js';
4
- import { ListDiagnosticsFilters, DiagnosticRecord } from './diagnostic.js';
5
- import { EvaluateExpressionInput, EvaluationResult, EvaluateConstituentaInput } from './evaluation.js';
6
- import { SetConstituentaValueInput, SessionModelState, SetConstituentaValuesInput, ClearConstituentaValuesInput, RecalculateModelResult } from './model-value.js';
7
- import { SessionState, SessionHandle, SessionRevision } from './session.js';
8
- import { RSToolAgentContract } from './tool-contract.js';
9
- import '@rsconcept/domain/library/rsmodel';
10
- import '@rsconcept/domain/library/rsform';
11
- import '@rsconcept/domain/rslang/error';
12
- import '@rsconcept/domain/rslang';
13
-
14
- declare class RSToolAgent implements RSToolAgentContract {
15
- readonly contractVersion = "1.2.0";
16
- private readonly sessions;
17
- private readonly adapter;
18
- private readonly evaluation;
19
- createSession(initial?: Partial<SessionState>): SessionHandle;
20
- addOrUpdateConstituenta(sessionId: string, input: AddOrUpdateConstituentaInput): AddOrUpdateConstituentaResult;
21
- analyzeExpression(sessionId: string, input: AnalyzeExpressionInput): AnalysisResult;
22
- getFormState(sessionId: string): SessionState;
23
- listDiagnostics(sessionId: string, filters?: ListDiagnosticsFilters): DiagnosticRecord[];
24
- commitStep(sessionId: string, message?: string): SessionRevision;
25
- exportSession(sessionId: string): string;
26
- importSession(payload: string): SessionHandle;
27
- setConstituentaValue(sessionId: string, input: SetConstituentaValueInput): Promise<SessionModelState>;
28
- setConstituentaValues(sessionId: string, input: SetConstituentaValuesInput): Promise<SessionModelState>;
29
- clearConstituentaValues(sessionId: string, input: ClearConstituentaValuesInput): Promise<SessionModelState>;
30
- getModelState(sessionId: string): SessionModelState;
31
- evaluateExpression(sessionId: string, input: EvaluateExpressionInput): EvaluationResult;
32
- evaluateConstituenta(sessionId: string, input: EvaluateConstituentaInput): EvaluationResult;
33
- recalculateModel(sessionId: string): RecalculateModelResult;
34
- }
35
-
36
- export { RSToolAgent };
1
+ import { t as RSToolAgent } from "../rstool-agent-DkeH5Qml.js";
2
+ export { RSToolAgent };