@cotal-ai/lang 0.22.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -0
- package/dist/effects.d.ts +19 -0
- package/dist/effects.d.ts.map +1 -1
- package/dist/effects.js +23 -0
- package/dist/effects.js.map +1 -1
- package/dist/errors.d.ts +48 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +90 -2
- package/dist/errors.js.map +1 -1
- package/dist/grammar.d.ts.map +1 -1
- package/dist/grammar.js +561 -128
- package/dist/grammar.js.map +1 -1
- package/dist/index.d.ts +10 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/dist/interpret.d.ts +81 -3
- package/dist/interpret.d.ts.map +1 -1
- package/dist/interpret.js +1446 -270
- package/dist/interpret.js.map +1 -1
- package/dist/journal.d.ts +218 -9
- package/dist/journal.d.ts.map +1 -1
- package/dist/journal.js +232 -12
- package/dist/journal.js.map +1 -1
- package/dist/keys.d.ts +39 -1
- package/dist/keys.d.ts.map +1 -1
- package/dist/keys.js +61 -0
- package/dist/keys.js.map +1 -1
- package/dist/library.d.ts +65 -0
- package/dist/library.d.ts.map +1 -0
- package/dist/library.js +525 -0
- package/dist/library.js.map +1 -0
- package/dist/notify-fact.d.ts +8 -0
- package/dist/notify-fact.d.ts.map +1 -0
- package/dist/notify-fact.js +69 -0
- package/dist/notify-fact.js.map +1 -0
- package/dist/pins.d.ts +82 -0
- package/dist/pins.d.ts.map +1 -0
- package/dist/pins.js +87 -0
- package/dist/pins.js.map +1 -0
- package/dist/primitives.d.ts +14 -0
- package/dist/primitives.d.ts.map +1 -1
- package/dist/primitives.js +45 -5
- package/dist/primitives.js.map +1 -1
- package/dist/sim.d.ts +9 -1
- package/dist/sim.d.ts.map +1 -1
- package/dist/sim.js +9 -1
- package/dist/sim.js.map +1 -1
- package/dist/syntax.d.ts +34 -0
- package/dist/syntax.d.ts.map +1 -0
- package/dist/syntax.js +178 -0
- package/dist/syntax.js.map +1 -0
- package/dist/values.d.ts +20 -1
- package/dist/values.d.ts.map +1 -1
- package/dist/values.js +0 -0
- package/dist/values.js.map +1 -1
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# @cotal-ai/lang
|
|
2
|
+
|
|
3
|
+
Cotal Lang, the workflow language a durable Cotal run executes: a small subset of JavaScript in
|
|
4
|
+
which every interaction with the world is one of a dozen effects and everything else is pure. This
|
|
5
|
+
package is the validator, the interpreter, the step journal, the effect interface a host
|
|
6
|
+
implements, and the simulator and dry run that exercise a program with no broker.
|
|
7
|
+
|
|
8
|
+
**Tier:** `packages/` (the standard). Depends on nothing else in the repo; it knows about effects,
|
|
9
|
+
not about NATS. The host that runs a program on the mesh is `@cotal-ai/runtime`.
|
|
10
|
+
|
|
11
|
+
The language is defined by [`spec/cotal-lang.md`](../../spec/cotal-lang.md) (normative; every
|
|
12
|
+
`js` block in it is validated by this package's surface suite) and its wire footprint by
|
|
13
|
+
[SPEC.md §14](../../SPEC.md#14-workflow-runs-v05). The guide is
|
|
14
|
+
[docs/workflows.md](../../docs/workflows.md).
|
|
15
|
+
|
|
16
|
+
## Use
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { validate, run, dryRun, SimHandler, Journal } from "@cotal-ai/lang";
|
|
20
|
+
|
|
21
|
+
const source = `
|
|
22
|
+
const builder = await spawn("builder")
|
|
23
|
+
const r = await turn(builder, { name: "build", deadline: "30m" })
|
|
24
|
+
log(r.status)
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
validate(source); // throws LangErrors, every refusal with code, cause, fix
|
|
28
|
+
|
|
29
|
+
const script = { turns: { build: { status: "done", at: 1 } } };
|
|
30
|
+
const plan = await dryRun(source, script); // what it would do, with no agent touched
|
|
31
|
+
|
|
32
|
+
const first = await run(source, { runId: "r-1", handler: new SimHandler(script) });
|
|
33
|
+
// first.journal.entries() is the step journal; first.pins is what a resume must be handed back.
|
|
34
|
+
|
|
35
|
+
const again = await run(source, {
|
|
36
|
+
runId: "r-1",
|
|
37
|
+
pins: first.pins,
|
|
38
|
+
journal: new Journal({ run: "r-1", entries: first.journal.entries() }),
|
|
39
|
+
handler: new SimHandler({}), // nothing is scripted: every step replays
|
|
40
|
+
});
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`run` performs effects through the `EffectHandler` you pass and records each in the `Journal`;
|
|
44
|
+
hand the same journal and pins back and the same program resumes. `SimHandler` scripts turns, asks,
|
|
45
|
+
checkpoints and events and refuses anything unscripted (L6001), so a simulation cannot silently
|
|
46
|
+
invent an answer. It does advance ONE virtual clock in the order effects are asked, so a `race` under
|
|
47
|
+
it is decided by that order and declaration order rather than by the durations the arms wrote; the
|
|
48
|
+
rule (least recorded clock, ties by declaration order) is what is applied, the clocks are the
|
|
49
|
+
simulator's.
|
|
50
|
+
|
|
51
|
+
## Suites
|
|
52
|
+
|
|
53
|
+
`pnpm test` in this directory runs every smoke: grammar, keys, journal, pins, scopes, sim,
|
|
54
|
+
interpret, fuel, dryrun, examples, options, notify-fact, migrate, semantics (the pure fragment
|
|
55
|
+
against node) and surface (the syntax table, the library tables, and that every example in the
|
|
56
|
+
reference and the guide validates).
|
|
57
|
+
`smoke/mutations/*.json` are the `pnpm mutation-proof` targets.
|
package/dist/effects.d.ts
CHANGED
|
@@ -154,6 +154,25 @@ export declare class Cancelled extends Error {
|
|
|
154
154
|
readonly reason: string;
|
|
155
155
|
constructor(reason: string);
|
|
156
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* The host is stopping before the next effect, and the program is not at fault.
|
|
159
|
+
*
|
|
160
|
+
* A driver holds a run under a lease with an absolute horizon, and it may be asked to hand the run
|
|
161
|
+
* back. Neither is a fact about the workflow: it has not failed and it has not finished, it is
|
|
162
|
+
* exactly where its journal says it is. So this is raised BEFORE an effect is begun — never once a
|
|
163
|
+
* handler has been dispatched — and it travels like {@link Cancelled} and `JournalAppendRejected`:
|
|
164
|
+
* a workflow's `try` cannot catch it. A program that could catch its host's shutdown could carry on
|
|
165
|
+
* performing effects after the horizon it was granted, which is the thing the stop exists to end.
|
|
166
|
+
*
|
|
167
|
+
* The language raises it; it never accepts it from outside. A caller answers only "should I stop,
|
|
168
|
+
* and why" — if a driver could throw the class itself it could also throw something catchable, and
|
|
169
|
+
* the guarantee would be the caller's to keep rather than the language's.
|
|
170
|
+
*/
|
|
171
|
+
export declare class RunReleased extends Error {
|
|
172
|
+
readonly reason: string;
|
|
173
|
+
readonly code = "L5012";
|
|
174
|
+
constructor(reason: string);
|
|
175
|
+
}
|
|
157
176
|
/**
|
|
158
177
|
* Raw outcome to what the program sees, computed from TODAY's source.
|
|
159
178
|
*
|
package/dist/effects.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effects.d.ts","sourceRoot":"","sources":["../src/effects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;AAExD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,EAAE,gBAAgB,CAAC;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ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IAC9D,OAAO,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,YAAY,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACpF,aAAa,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxE"}
|
package/dist/effects.js
CHANGED
|
@@ -32,6 +32,29 @@ export class Cancelled extends Error {
|
|
|
32
32
|
this.name = "Cancelled";
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* The host is stopping before the next effect, and the program is not at fault.
|
|
37
|
+
*
|
|
38
|
+
* A driver holds a run under a lease with an absolute horizon, and it may be asked to hand the run
|
|
39
|
+
* back. Neither is a fact about the workflow: it has not failed and it has not finished, it is
|
|
40
|
+
* exactly where its journal says it is. So this is raised BEFORE an effect is begun — never once a
|
|
41
|
+
* handler has been dispatched — and it travels like {@link Cancelled} and `JournalAppendRejected`:
|
|
42
|
+
* a workflow's `try` cannot catch it. A program that could catch its host's shutdown could carry on
|
|
43
|
+
* performing effects after the horizon it was granted, which is the thing the stop exists to end.
|
|
44
|
+
*
|
|
45
|
+
* The language raises it; it never accepts it from outside. A caller answers only "should I stop,
|
|
46
|
+
* and why" — if a driver could throw the class itself it could also throw something catchable, and
|
|
47
|
+
* the guarantee would be the caller's to keep rather than the language's.
|
|
48
|
+
*/
|
|
49
|
+
export class RunReleased extends Error {
|
|
50
|
+
reason;
|
|
51
|
+
code = "L5012";
|
|
52
|
+
constructor(reason) {
|
|
53
|
+
super(`this run was released before its next effect: ${reason}`);
|
|
54
|
+
this.reason = reason;
|
|
55
|
+
this.name = "RunReleased";
|
|
56
|
+
}
|
|
57
|
+
}
|
|
35
58
|
/**
|
|
36
59
|
* Raw outcome to what the program sees, computed from TODAY's source.
|
|
37
60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AAE,CAAC,CAAC;QAD9C,WAAM,GAAN,MAAM,CAAQ;QAEjC,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC5B,CAAC;CACF;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CACnC,GAAkB,EAClB,QAAqD;IAErD,IAAI,GAAG,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;QAC/B,OAAO;YACL,MAAM,EAAE,UAAU;YAClB,GAAG,CAAC,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACxD,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/C,GAAG,CAAC,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACjE,EAAE,EAAE,GAAG,CAAC,EAAE;SACX,CAAC;IACJ,CAAC;IACD,8FAA8F;IAC9F,8FAA8F;IAC9F,gGAAgG;IAChG,mDAAmD;IACnD,MAAM,WAAW,GAAG,QAAQ,IAAI,MAAM,CAAC;IACvC,IAAI,WAAW,KAAK,SAAS,IAAI,WAAW,KAAK,UAAU;QAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC;IACtG,MAAM,IAAI,WAAW,CACnB,OAAO,EACP,oBAAoB,EACpB,8RAA8R,CAC/R,CAAC;AACJ,CAAC"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare const CATALOG: {
|
|
|
16
16
|
readonly L1005: "Forbidden syntax: generator";
|
|
17
17
|
readonly L1006: "Forbidden syntax: `eval` or `Function`";
|
|
18
18
|
readonly L1007: "Forbidden syntax: regular expression literal";
|
|
19
|
-
readonly L1008: "
|
|
19
|
+
readonly L1008: "Newline hazard";
|
|
20
20
|
readonly L1009: "Unbraced branch";
|
|
21
21
|
readonly L1010: "`switch` case does not terminate";
|
|
22
22
|
readonly L1011: "Computed property name";
|
|
@@ -33,13 +33,21 @@ export declare const CATALOG: {
|
|
|
33
33
|
readonly L1022: "Forbidden syntax: `do...while`";
|
|
34
34
|
readonly L1023: "Forbidden syntax: `await` outside an async function";
|
|
35
35
|
readonly L1024: "`return` outside a function";
|
|
36
|
+
readonly L1025: "Forbidden syntax: loose equality";
|
|
37
|
+
readonly L1026: "Forbidden syntax: comma operator";
|
|
38
|
+
readonly L1027: "Forbidden syntax: `void`";
|
|
39
|
+
readonly L1028: "Forbidden property name";
|
|
40
|
+
readonly L1029: "Syntax outside the language";
|
|
41
|
+
readonly L1030: "Forbidden literal: bigint";
|
|
36
42
|
readonly L2001: "Unknown identifier";
|
|
37
43
|
readonly L2002: "Shadows a builtin or a primitive";
|
|
38
44
|
readonly L2003: "Assignment to a `const` binding";
|
|
45
|
+
readonly L2004: "Use before declaration";
|
|
39
46
|
readonly L2011: "The Promise API is not available";
|
|
40
47
|
readonly L2013: "An async call is not awaited";
|
|
41
48
|
readonly L2012: "Host global is not available";
|
|
42
49
|
readonly L2031: "Mutation of a frozen value";
|
|
50
|
+
readonly L2032: "Write from a concurrent branch to something declared outside it";
|
|
43
51
|
readonly L3011: "Unknown option key";
|
|
44
52
|
readonly L3012: "Missing required step name";
|
|
45
53
|
readonly L3013: "Step name is not a literal";
|
|
@@ -48,6 +56,7 @@ export declare const CATALOG: {
|
|
|
48
56
|
readonly L3022: "Two agents share a worktree concurrently";
|
|
49
57
|
readonly L3023: "Array-form `parallel` holds named effects";
|
|
50
58
|
readonly L3024: "`fanOut` branch keys are not unique";
|
|
59
|
+
readonly L3025: "Branch key contains a reserved step-key character";
|
|
51
60
|
readonly L3041: "Value cannot cross an effect boundary";
|
|
52
61
|
readonly L3042: "Function passed as effect data";
|
|
53
62
|
readonly L3043: "`notify` fact is not a bounded decision record";
|
|
@@ -61,14 +70,39 @@ export declare const CATALOG: {
|
|
|
61
70
|
readonly L4007: "Checkpoint expired";
|
|
62
71
|
readonly L4008: "Concurrent worktree write";
|
|
63
72
|
readonly L4009: "Run effect ceiling reached";
|
|
73
|
+
readonly L4010: "Field access on `null` or `undefined`";
|
|
74
|
+
readonly L4011: "Call of a value that is not a function";
|
|
75
|
+
readonly L4012: "Assertion failed";
|
|
64
76
|
readonly L4013: "Step budget exhausted";
|
|
77
|
+
readonly L4014: "Unknown member";
|
|
78
|
+
readonly L4015: "Not iterable";
|
|
79
|
+
readonly L4016: "Builtin failed";
|
|
80
|
+
readonly L4017: "Invalid array length";
|
|
81
|
+
readonly L4018: "No implicit conversion";
|
|
82
|
+
readonly L4019: "Array write past the end";
|
|
83
|
+
readonly L4020: "A method is not a value";
|
|
65
84
|
readonly L5001: "Run divergence";
|
|
66
85
|
readonly L5002: "Program hash not available";
|
|
67
86
|
readonly L5003: "Orphaned `spawn` on migrate";
|
|
68
87
|
readonly L5004: "Orphaned resolved checkpoint on migrate";
|
|
69
|
-
readonly L5005: "
|
|
88
|
+
readonly L5005: "A pending effect cannot be recovered";
|
|
70
89
|
readonly L5006: "Effect result too large";
|
|
71
90
|
readonly L5007: "Lease lost";
|
|
91
|
+
readonly L5008: "Resume under a different language version";
|
|
92
|
+
readonly L5009: "Resume pin mismatch";
|
|
93
|
+
readonly L5010: "Journal append rejected";
|
|
94
|
+
readonly L5011: "Journal belongs to a different run";
|
|
95
|
+
readonly L5012: "Run released before the next effect";
|
|
96
|
+
readonly L5013: "Orphaned undelivered `notice` on migrate";
|
|
97
|
+
readonly L5014: "Orphaned open `conclave` on migrate";
|
|
98
|
+
readonly L5015: "No orphan policy for this entry kind on migrate";
|
|
99
|
+
readonly L5016: "Effect not durable on this host";
|
|
100
|
+
readonly L5017: "Fork cut step is not in the journal";
|
|
101
|
+
readonly L5018: "Fork cut was never reached";
|
|
102
|
+
readonly L5020: "A fork cut lies inside a scope whose outcome was already decided";
|
|
103
|
+
readonly L5019: "Fork cannot honour `onFork` on this host";
|
|
104
|
+
readonly L5021: "Resume over a journal without the run's pins";
|
|
105
|
+
readonly L5022: "A recorded branch is not in the migrated source";
|
|
72
106
|
readonly L6001: "Unscripted effect in simulation";
|
|
73
107
|
readonly L6002: "Simulation script entry unused";
|
|
74
108
|
};
|
|
@@ -138,4 +172,16 @@ export declare class LangErrors extends Error {
|
|
|
138
172
|
toJSON(): readonly LangErrorJson[];
|
|
139
173
|
render(): string;
|
|
140
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* A refusal raised while a program RUNS, carrying its `L` code as a field so a caller can branch on
|
|
177
|
+
* it rather than parse prose.
|
|
178
|
+
*
|
|
179
|
+
* It lives here rather than in `interpret.ts` because `keys.ts` raises one too — a computed step
|
|
180
|
+
* name is only knowable at key-construction time — and `keys.ts` cannot import the interpreter that
|
|
181
|
+
* imports it. The error vocabulary is the one module in this package that depends on nothing.
|
|
182
|
+
*/
|
|
183
|
+
export declare class RuntimeFault extends Error {
|
|
184
|
+
readonly code: string;
|
|
185
|
+
constructor(code: string, message: string);
|
|
186
|
+
}
|
|
141
187
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,wFAAwF;AACxF,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,wFAAwF;AACxF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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oF;AACpF,qBAAa,SAAU,SAAQ,KAAK;IAClC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;gBAEhB,IAAI,EAAE,aAAa;IAW/B,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa;IAWrC,uFAAuF;IACvF,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CAe/B;AAED;;;GAGG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACnC,QAAQ,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,MAAM,EAAE,SAAS,SAAS,EAAE,EAAE,MAAM,EAAE,MAAM;IAOxD,MAAM,IAAI,SAAS,aAAa,EAAE;IAIlC,MAAM,IAAI,MAAM;CAGjB;AAED;;;;;;;GAOG;AACH,qBAAa,YAAa,SAAQ,KAAK;IAEnC,QAAQ,CAAC,IAAI,EAAE,MAAM;gBAAZ,IAAI,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM;CAKlB"}
|
package/dist/errors.js
CHANGED
|
@@ -17,7 +17,10 @@ export const CATALOG = {
|
|
|
17
17
|
L1005: "Forbidden syntax: generator",
|
|
18
18
|
L1006: "Forbidden syntax: `eval` or `Function`",
|
|
19
19
|
L1007: "Forbidden syntax: regular expression literal",
|
|
20
|
-
|
|
20
|
+
// ASI itself is ALLOWED. The error is the two constructs where a newline changes what the code
|
|
21
|
+
// MEANS: a value on the line after a bare `return`, and a line opening with `(` or `[` that
|
|
22
|
+
// continues the statement above it. "Missing semicolon" named a rule this language does not have.
|
|
23
|
+
L1008: "Newline hazard",
|
|
21
24
|
L1009: "Unbraced branch",
|
|
22
25
|
L1010: "`switch` case does not terminate",
|
|
23
26
|
L1011: "Computed property name",
|
|
@@ -34,14 +37,25 @@ export const CATALOG = {
|
|
|
34
37
|
L1022: "Forbidden syntax: `do...while`",
|
|
35
38
|
L1023: "Forbidden syntax: `await` outside an async function",
|
|
36
39
|
L1024: "`return` outside a function",
|
|
40
|
+
L1025: "Forbidden syntax: loose equality",
|
|
41
|
+
L1026: "Forbidden syntax: comma operator",
|
|
42
|
+
L1027: "Forbidden syntax: `void`",
|
|
43
|
+
L1028: "Forbidden property name",
|
|
44
|
+
// The catch-all behind the admitted-node table: syntax that is valid JavaScript, is on no
|
|
45
|
+
// forbidden row of its own, and is not in the language either. Naming it here is what lets the
|
|
46
|
+
// interpreter's own "unsupported" fault stay unreachable from a validated program.
|
|
47
|
+
L1029: "Syntax outside the language",
|
|
48
|
+
L1030: "Forbidden literal: bigint",
|
|
37
49
|
// ---- L2xxx: name resolution and static rules ----------------------------------------------
|
|
38
50
|
L2001: "Unknown identifier",
|
|
39
51
|
L2002: "Shadows a builtin or a primitive",
|
|
40
52
|
L2003: "Assignment to a `const` binding",
|
|
53
|
+
L2004: "Use before declaration",
|
|
41
54
|
L2011: "The Promise API is not available",
|
|
42
55
|
L2013: "An async call is not awaited",
|
|
43
56
|
L2012: "Host global is not available",
|
|
44
57
|
L2031: "Mutation of a frozen value",
|
|
58
|
+
L2032: "Write from a concurrent branch to something declared outside it",
|
|
45
59
|
// ---- L3xxx: effect call shape --------------------------------------------------------------
|
|
46
60
|
L3011: "Unknown option key",
|
|
47
61
|
L3012: "Missing required step name",
|
|
@@ -51,6 +65,7 @@ export const CATALOG = {
|
|
|
51
65
|
L3022: "Two agents share a worktree concurrently",
|
|
52
66
|
L3023: "Array-form `parallel` holds named effects",
|
|
53
67
|
L3024: "`fanOut` branch keys are not unique",
|
|
68
|
+
L3025: "Branch key contains a reserved step-key character",
|
|
54
69
|
L3041: "Value cannot cross an effect boundary",
|
|
55
70
|
L3042: "Function passed as effect data",
|
|
56
71
|
L3043: "`notify` fact is not a bounded decision record",
|
|
@@ -65,15 +80,72 @@ export const CATALOG = {
|
|
|
65
80
|
L4007: "Checkpoint expired",
|
|
66
81
|
L4008: "Concurrent worktree write",
|
|
67
82
|
L4009: "Run effect ceiling reached",
|
|
83
|
+
L4010: "Field access on `null` or `undefined`",
|
|
84
|
+
L4011: "Call of a value that is not a function",
|
|
85
|
+
L4012: "Assertion failed",
|
|
68
86
|
L4013: "Step budget exhausted",
|
|
87
|
+
L4014: "Unknown member",
|
|
88
|
+
L4015: "Not iterable",
|
|
89
|
+
L4016: "Builtin failed",
|
|
90
|
+
L4017: "Invalid array length",
|
|
91
|
+
L4018: "No implicit conversion",
|
|
92
|
+
L4019: "Array write past the end",
|
|
93
|
+
L4020: "A method is not a value",
|
|
69
94
|
// ---- L5xxx: durability -----------------------------------------------------------------------
|
|
70
95
|
L5001: "Run divergence",
|
|
71
96
|
L5002: "Program hash not available",
|
|
72
97
|
L5003: "Orphaned `spawn` on migrate",
|
|
73
98
|
L5004: "Orphaned resolved checkpoint on migrate",
|
|
74
|
-
L5005: "
|
|
99
|
+
L5005: "A pending effect cannot be recovered",
|
|
75
100
|
L5006: "Effect result too large",
|
|
76
101
|
L5007: "Lease lost",
|
|
102
|
+
L5008: "Resume under a different language version",
|
|
103
|
+
L5009: "Resume pin mismatch",
|
|
104
|
+
// The log said no, which is not the world saying no. Recorded separately because a run that
|
|
105
|
+
// cannot append has no result to report, and reporting one anyway is how a completed effect
|
|
106
|
+
// comes to be replayed as a failure.
|
|
107
|
+
L5010: "Journal append rejected",
|
|
108
|
+
// A journal belongs to ONE run. The keys are structural, so another run's entry with the same
|
|
109
|
+
// scope and name MATCHES: a mismatch is not a mislabelling, it is one run resuming from another
|
|
110
|
+
// run's history and returning its results as its own.
|
|
111
|
+
L5011: "Journal belongs to a different run",
|
|
112
|
+
// The DRIVER stopped, and the program did not. A run whose host must stop before the next effect
|
|
113
|
+
// — its work horizon reached, a pause requested — has not failed and has not finished: it is
|
|
114
|
+
// exactly where its journal says it is, and someone else can pick it up there. Recorded as its
|
|
115
|
+
// own code because settling the entry instead would write down a failure for work nobody
|
|
116
|
+
// attempted.
|
|
117
|
+
L5012: "Run released before the next effect",
|
|
118
|
+
// The three refusals design 8.4's orphan table needs and does not number. Allocated here rather
|
|
119
|
+
// than reused, because a code that means two things is worse than a code that means nothing: the
|
|
120
|
+
// first three numbers this table wanted — L5005, L5006, L5007 — were already a pending effect, an
|
|
121
|
+
// oversized result, and a lost lease, and a reader acting on one of those would act on the wrong
|
|
122
|
+
// fact entirely.
|
|
123
|
+
L5013: "Orphaned undelivered `notice` on migrate",
|
|
124
|
+
L5014: "Orphaned open `conclave` on migrate",
|
|
125
|
+
L5015: "No orphan policy for this entry kind on migrate",
|
|
126
|
+
// A durable run reached an effect whose substrate has not landed on this host. Its own code
|
|
127
|
+
// because the alternative — a generic handler fault — records "the handler broke" for a step
|
|
128
|
+
// nothing ever attempted, and a reader of the journal cannot tell the two apart afterwards.
|
|
129
|
+
L5016: "Effect not durable on this host",
|
|
130
|
+
// The fork's three refusals, allocated from THIS FILE rather than from memory — the rule the
|
|
131
|
+
// orphan table's L5005/L5006/L5007 collision bought. Note what is NOT here: a fork asked to pin a
|
|
132
|
+
// new program hash reuses L5002, which already says exactly that and had no user. A synonym would
|
|
133
|
+
// have been a second name for one fact, which is the same defect as a reused number, wearing a
|
|
134
|
+
// nicer face.
|
|
135
|
+
L5017: "Fork cut step is not in the journal",
|
|
136
|
+
L5018: "Fork cut was never reached",
|
|
137
|
+
L5020: "A fork cut lies inside a scope whose outcome was already decided",
|
|
138
|
+
L5019: "Fork cannot honour `onFork` on this host",
|
|
139
|
+
// Allocated from THIS FILE, same rule. A resume that is handed history but not the pins that
|
|
140
|
+
// history was written under does not fail anywhere: it re-resolves them, takes this host's clock
|
|
141
|
+
// as the run's epoch and this interpreter's default as the seed, and carries on. Nothing in the
|
|
142
|
+
// journal disagrees, because pure draws are not journalled and the clock is not a recorded fact.
|
|
143
|
+
L5021: "Resume over a journal without the run's pins",
|
|
144
|
+
// The hole the "losers only" branch digest left open, and it did not fail quietly: the walk was
|
|
145
|
+
// sent into a recorded winning arm the edited source had RENAMED away, entered nothing, and
|
|
146
|
+
// awaited `Promise.race([])`, which never settles. Its own code and not L5001 because that one is
|
|
147
|
+
// a hash comparison down to its field names, and this is a comparison of branch NAMES.
|
|
148
|
+
L5022: "A recorded branch is not in the migrated source",
|
|
77
149
|
// ---- L6xxx: simulation -------------------------------------------------------------------------
|
|
78
150
|
L6001: "Unscripted effect in simulation",
|
|
79
151
|
L6002: "Simulation script entry unused",
|
|
@@ -160,4 +232,20 @@ export class LangErrors extends Error {
|
|
|
160
232
|
return this.errors.map((e) => e.render(this.source)).join("\n\n");
|
|
161
233
|
}
|
|
162
234
|
}
|
|
235
|
+
/**
|
|
236
|
+
* A refusal raised while a program RUNS, carrying its `L` code as a field so a caller can branch on
|
|
237
|
+
* it rather than parse prose.
|
|
238
|
+
*
|
|
239
|
+
* It lives here rather than in `interpret.ts` because `keys.ts` raises one too — a computed step
|
|
240
|
+
* name is only knowable at key-construction time — and `keys.ts` cannot import the interpreter that
|
|
241
|
+
* imports it. The error vocabulary is the one module in this package that depends on nothing.
|
|
242
|
+
*/
|
|
243
|
+
export class RuntimeFault extends Error {
|
|
244
|
+
code;
|
|
245
|
+
constructor(code, message) {
|
|
246
|
+
super(`${code} ${message}`);
|
|
247
|
+
this.code = code;
|
|
248
|
+
this.name = "RuntimeFault";
|
|
249
|
+
}
|
|
250
|
+
}
|
|
163
251
|
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,wFAAwF;AACxF,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,8FAA8F;IAC9F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AAM,CAAS;IAExB,YAAY,MAA4B,EAAE,MAAc;QACtD,KAAK,CAAC,GAAG,MAAM,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC;QAC5E,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACvD,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpE,CAAC;CACF;AAED;;;;;;;GAOG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IAE1B;IADX,YACW,IAAY,EACrB,OAAe;QAEf,KAAK,CAAC,GAAG,IAAI,IAAI,OAAO,EAAE,CAAC,CAAC;QAHnB,SAAI,GAAJ,IAAI,CAAQ;QAIrB,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF"}
|
package/dist/grammar.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grammar.d.ts","sourceRoot":"","sources":["../src/grammar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,SAAS,EAAmD,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"grammar.d.ts","sourceRoot":"","sources":["../src/grammar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,SAAS,EAAmD,MAAM,aAAa,CAAC;AAgBzF,yEAAyE;AACzE,KAAK,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAY9C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,SAAS,SAAS,EAAE,CAAC;CACzC;AAs5CD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,SAAqB,GAAG,cAAc,CA4ClF"}
|