@plurnk/plurnk-contracts 1.17.0 → 1.19.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.
Files changed (93) hide show
  1. package/.env.defaults +11 -0
  2. package/README.md +10 -43
  3. package/SPEC.md +363 -280
  4. package/dist/conformance/agui-v1.json +3 -50
  5. package/dist/schema/CapabilityDescriptor.json +6 -1
  6. package/dist/schema/CapabilitySelector.json +6 -1
  7. package/dist/schema/ClientStatement.json +0 -10
  8. package/dist/schema/FunctionalityDefinitionState.json +9 -1
  9. package/dist/schema/LoopPolicy.json +32 -3
  10. package/dist/schema/LoopPolicyRequest.json +16 -0
  11. package/dist/schema/McpConfigurationOverlay.json +1 -14
  12. package/dist/schema/McpServerDefinition.json +1 -1
  13. package/dist/schema/PlurnkStatement.json +30 -41
  14. package/dist/schema/ProposalProjection.json +6 -2
  15. package/dist/schema/SkillDefinition.json +3 -3
  16. package/dist/schema/TextLineMarker.json +1 -1
  17. package/dist/src/ApplicationPort.d.ts +38 -10
  18. package/dist/src/ApplicationPort.d.ts.map +1 -1
  19. package/dist/src/LoopLifecycle.d.ts +5 -0
  20. package/dist/src/LoopLifecycle.d.ts.map +1 -1
  21. package/dist/src/LoopLifecycle.js +15 -0
  22. package/dist/src/LoopLifecycle.js.map +1 -1
  23. package/dist/src/MessageResource.d.ts +30 -0
  24. package/dist/src/MessageResource.d.ts.map +1 -0
  25. package/dist/src/MessageResource.js +2 -0
  26. package/dist/src/MessageResource.js.map +1 -0
  27. package/dist/src/PlurnkParseError.d.ts +1 -3
  28. package/dist/src/PlurnkParseError.d.ts.map +1 -1
  29. package/dist/src/PlurnkParseError.js +1 -4
  30. package/dist/src/PlurnkParseError.js.map +1 -1
  31. package/dist/src/Problems.d.ts +1 -0
  32. package/dist/src/Problems.d.ts.map +1 -1
  33. package/dist/src/Problems.js +19 -1
  34. package/dist/src/Problems.js.map +1 -1
  35. package/dist/src/TurnDisposition.d.ts +3 -4
  36. package/dist/src/TurnDisposition.d.ts.map +1 -1
  37. package/dist/src/TurnDisposition.js +5 -21
  38. package/dist/src/TurnDisposition.js.map +1 -1
  39. package/dist/src/Validator.d.ts +3 -3
  40. package/dist/src/Validator.d.ts.map +1 -1
  41. package/dist/src/Validator.js +14 -15
  42. package/dist/src/Validator.js.map +1 -1
  43. package/dist/src/index.d.ts +3 -7
  44. package/dist/src/index.d.ts.map +1 -1
  45. package/dist/src/index.js +4 -7
  46. package/dist/src/index.js.map +1 -1
  47. package/dist/src/types.d.ts +15 -6
  48. package/dist/src/types.d.ts.map +1 -1
  49. package/dist/src/types.generated.d.ts +60 -76
  50. package/dist/src/types.generated.d.ts.map +1 -1
  51. package/dist/src/types.js +19 -12
  52. package/dist/src/types.js.map +1 -1
  53. package/package.json +7 -20
  54. package/plurnk.md +49 -73
  55. package/bin/plurnk-contracts.js +0 -43
  56. package/dist/schema/AcpPlan.json +0 -63
  57. package/dist/schema/Plan.json +0 -65
  58. package/dist/src/AcpPlanValue.d.ts +0 -6
  59. package/dist/src/AcpPlanValue.d.ts.map +0 -1
  60. package/dist/src/AcpPlanValue.js +0 -36
  61. package/dist/src/AcpPlanValue.js.map +0 -1
  62. package/dist/src/AstBuilder.d.ts +0 -21
  63. package/dist/src/AstBuilder.d.ts.map +0 -1
  64. package/dist/src/AstBuilder.js +0 -876
  65. package/dist/src/AstBuilder.js.map +0 -1
  66. package/dist/src/PlanValue.d.ts +0 -9
  67. package/dist/src/PlanValue.d.ts.map +0 -1
  68. package/dist/src/PlanValue.js +0 -63
  69. package/dist/src/PlanValue.js.map +0 -1
  70. package/dist/src/PlurnkErrorStrategy.d.ts +0 -11
  71. package/dist/src/PlurnkErrorStrategy.d.ts.map +0 -1
  72. package/dist/src/PlurnkErrorStrategy.js +0 -253
  73. package/dist/src/PlurnkErrorStrategy.js.map +0 -1
  74. package/dist/src/PlurnkParser.d.ts +0 -15
  75. package/dist/src/PlurnkParser.d.ts.map +0 -1
  76. package/dist/src/PlurnkParser.js +0 -330
  77. package/dist/src/PlurnkParser.js.map +0 -1
  78. package/dist/src/RecordingListener.d.ts +0 -9
  79. package/dist/src/RecordingListener.d.ts.map +0 -1
  80. package/dist/src/RecordingListener.js +0 -37
  81. package/dist/src/RecordingListener.js.map +0 -1
  82. package/dist/src/generated/plurnkLexer.d.ts +0 -162
  83. package/dist/src/generated/plurnkLexer.d.ts.map +0 -1
  84. package/dist/src/generated/plurnkLexer.js +0 -1060
  85. package/dist/src/generated/plurnkLexer.js.map +0 -1
  86. package/dist/src/generated/plurnkParser.d.ts +0 -436
  87. package/dist/src/generated/plurnkParser.d.ts.map +0 -1
  88. package/dist/src/generated/plurnkParser.js +0 -2972
  89. package/dist/src/generated/plurnkParser.js.map +0 -1
  90. package/dist/src/generated/plurnkParserVisitor.d.ts +0 -263
  91. package/dist/src/generated/plurnkParserVisitor.d.ts.map +0 -1
  92. package/dist/src/generated/plurnkParserVisitor.js +0 -227
  93. package/dist/src/generated/plurnkParserVisitor.js.map +0 -1
package/plurnk.md CHANGED
@@ -1,53 +1,40 @@
1
1
  # Plurnk Harness
2
2
 
3
- ## Harness Operation Syntax
3
+ Pattern Lookup Universal Resource NetworK: find anything by pattern, read it by address, change it by operation.
4
+
5
+ ## Operation Syntax
4
6
 
5
7
  ````OP (path)? <scope|range>? [metadata]? pattern? <!-- aside -->?
6
8
  body?
7
9
  ````
8
10
 
9
11
  > [!IMPORTANT]
10
- > YOU MUST ONLY perform OPs (helper operations, registered executors, or enabled MCP services).
11
-
12
- > [!IMPORTANT]
13
- > YOU MUST include the OP and its parameters on the opening fence line.
14
-
15
- * `[metadata]`: optional one-line JSON array of option objects.
16
- * `<!-- aside -->`: optional terse note beside (never below) the operation line.
17
-
18
- ## Helper Operations
19
-
20
- * FIND: list matching paths, or the match locations inside one path
21
- * READ: read files, entries, streams, or only the lines a pattern selects
22
- * EDIT: create a file or entry; replace existing text by scope or by pattern
23
- * COPY (from) (to): copy files, entries, streams, or text regions
24
- * MOVE (from) (to): move files, entries, streams, or text regions
25
- * SEND: message workers or endpoints; without a path, respond to Active Prompts
26
- * WORK: deploy a child worker (fresh log)
27
- * FORK: deploy a forked worker (forked log)
28
- * BARE: deploy an isolated inference query (no log or tools)
29
- * KILL: delete, terminate, or curate the log
30
- * TASK: task inventory
12
+ > YOU MUST ONLY respond with either valid Operation Syntax OPs or prose (concludes loop, may contain GFM). Not both.
13
+
14
+ * `[metadata]`: optional one-line JSON array of special configuration.
15
+ * `<!-- aside -->`: optional terse note.
16
+ * All parameters and the aside must appear on the same line as OP.
17
+ * OP may be either a Plurnk Operation or one of the tools.
18
+
19
+ ## Plurnk Operations
20
+
21
+ * NOTE: Retain conclusions, decisions, and working memory (also works inside reasoning).
22
+ * FIND: List matching paths, or the match locations inside one path.
23
+ * READ: Read files, entries, streams, or only the lines a pattern selects.
24
+ * EDIT: Create a file or entry; replace existing text by scope or by pattern.
25
+ * COPY: (path) <scope>? (path) <scope>? - Copy files, entries, streams, or text regions.
26
+ * MOVE: (path) <scope>? (path) <scope>? - Move files, entries, streams, or text regions.
27
+ * KILL: Delete, terminate, or curate the log.
28
+ * SEND: Message workers and endpoints, not tools.
29
+ * WORK: Deploy a child worker (fresh log).
30
+ * FORK: Deploy a forked worker (forked log).
31
+ * BARE: Deploy an isolated inference query (no log or tools).
32
+ * WAIT: Yield until the next wake: a child's result, a message, a stream's end.
31
33
 
32
34
  ## Workflow Management
33
35
 
34
- ````TASK <!-- status of tasks necessary to resolve Active Prompts -->
35
- [{"content": string, "status": "pending" | "waiting" | "in_progress" | "completed" | "failed"}]
36
- ````
37
-
38
- * `pending`: blocked until a task it depends on is `completed`.
39
- * `waiting`: parked until a stream or worker finishes (doesn't block other in_progress work).
40
- * `in_progress`: active work.
41
- * `completed`, `failed`: resolved, successfully or not.
42
-
43
- > [!IMPORTANT]
44
- > YOU SHOULD conclude every turn with one TASK operation.
45
-
46
- > [!IMPORTANT]
47
- > A turn holding only the final response SEND and a TASK with every task `completed` or `failed` finishes the loop.
48
-
49
- > [!IMPORTANT]
50
- > YOU MAY NOT finish the loop while a task, worker, or stream is unfinished.
36
+ > [!INFO]
37
+ > To cancel all unfinished work in your worker and its descendants, KILL your own worker address.
51
38
 
52
39
  ## Workspace Navigation
53
40
 
@@ -57,9 +44,6 @@
57
44
  ````READ (belfry.md) /\bbats?\b/i <!-- only the lines matching "bat" or "bats" -->
58
45
  ````
59
46
 
60
- > [!TIP]
61
- > Locate with FIND, then READ a scope or a pattern; prefer glob-filtered paths over broad scans.
62
-
63
47
  * `(path)` may be a glob, permitting bulk operations.
64
48
  * Log item paths nest: `log:///1/2/3/READ` is loop/turn/item/operation.
65
49
  * FIND results hold one inner array per path: its channels, default first; append `#channel` to select another.
@@ -77,26 +61,16 @@
77
61
 
78
62
  ````42EDIT (edit-example.md) <!-- resolve nested OP conflicts with matching numeric delimiters after fencing -->
79
63
  ````EDIT (edit-example.md)
80
- An edit example.
64
+ OPs always begin and end with exactly four backticks, both immediately after a newline.
81
65
  ````
82
66
  ````42
83
67
 
84
68
  > [!TIP]
85
69
  > The EDIT body is literal text. YOU SHOULD address lines by `<@hash>` or `<@start,@end>`; stale targets are rejected.
86
70
 
87
- ## Messaging
88
-
89
- ````SEND (node:///c4e56789) <!-- SEND with a (path) sends the message to the path -->
90
- With a running node script, SEND passes this message to stdin.
91
- ````
92
-
93
- ````SEND <!-- SEND without a (path) responds to Active Prompts -->
94
- YOU SHOULD format responses to the Active Prompts in Markdown, using Mermaid diagrams, tables, lists, or prose.
95
- ````
96
-
97
71
  ## Delegation
98
72
 
99
- ````WORK (worker://reviewer) <!-- the child's result lands in your log -->
73
+ ````WORK (worker://reviewer) [{"env": {"NODE_ENV": "test"}}] <!-- the child's result lands in your log -->
100
74
  Review src/ for unhandled promise rejections.
101
75
  ````
102
76
 
@@ -104,18 +78,18 @@
104
78
  ````
105
79
 
106
80
  > [!TIP]
107
- > `SEND (worker://name)` messages a live worker. The packet's `## Delegation` lists your live workers and streams.
81
+ > `SEND (worker://name)` messages a live worker.
108
82
 
109
83
  ## Context Curation
110
84
 
111
- ````KILL (log:///1/[1-7]/*/{TASK,READ}) <!-- removes matching log items -->
112
- ````
85
+ > [!CAUTION]
86
+ > logTokensTotal must not exceed logTokensMax. Successful log KILL receipts are not shown; one that matched nothing says so, once.
113
87
 
114
- ````KILL (log:///**/READ) <17,-1> <!-- trims each item's log lines from 17 on -->
88
+ ````KILL (log:///1/[1-7]/*/{NOTE,READ}) <!-- removes matching log items, recovering context -->
115
89
  ````
116
90
 
117
- > [!CAUTION]
118
- > logTokensTotal must not exceed logTokensMax. KILL on log items and lines hides them from your context without deleting anything; successful log KILL receipts are not shown.
91
+ ````KILL (log:///**/READ) <17,-1> <!-- trims each item's log lines from 17 on, recovering context -->
92
+ ````
119
93
 
120
94
  ## `<scope|range>`
121
95
 
@@ -125,23 +99,25 @@ Text scopes use 1-based lines and Unicode code-point columns across textual mime
125
99
  |-----------------|--------------------------------|
126
100
  | `<L>`, `<@hash>` | one line |
127
101
  | `<SL,EL>`, `<@start,@end>` | lines SL through EL, inclusive |
128
- | `<SL,SC,EL,EC>` | start included, end excluded — `<2,1,2,5>` is columns 1-4 of line 2 |
102
+ | `<SL,SC,EL,EC>` | start included, end excluded — `<2,3,3,6>` is line 2 column 3 through line 3 column 5 |
129
103
  | `<0>`, `<-1>` | prepend / append on mutations; as an end line, `-1` is the last line |
130
104
 
131
105
  > [!CAUTION]
132
106
  > The hash anchor and line number (`@abcde 42:`) shown on editable text are not content.
133
107
 
134
- ## `pattern`
108
+ > [!TIP]
109
+ > The log often presents partial preview ranges. READ more if it's relevant and you have the logTokensMax room for it.
135
110
 
136
- | prefix | dialect | example |
137
- |--------|--------------------------|---------------------------------|
138
- | `/` | regex (ECMAScript) | `/\btimeout\b/i` |
139
- | `^` | regex anchored to a line | `^Note:.*` |
140
- | `//` | xpath (1.0) | `//dependencies/*` |
141
- | `$` | jsonpath (RFC 9535) | `$.items[?(@.price>500)]` |
142
- | `~` | full-text (SQLite FTS5) | `~retry` |
143
- | `&` | graph: `&sym` all relations, `&<sym` referrers, `&>sym` referents | `&<parseTurn` |
144
- | none | glob, or a literal | `?(export )?(async )function *` |
111
+ ## `pattern`
145
112
 
146
- > [!TIP]
147
- > The `[metadata]` parameter accepts a `[{"pattern":"matcher"}]` option for patterns that cannot be inline.
113
+ All member files and entries are mapped, indexed, and universally pattern searchable.
114
+
115
+ | prefix | dialect | example |
116
+ |--------|-----------------------------|---------------------------------|
117
+ | `/` | regex (ECMAScript) | `/\btimeout\b/i` |
118
+ | `^` | regex anchored to a line | `^ERROR:.*` |
119
+ | `//` | xpath (1.0) | `//dependencies/*` |
120
+ | `$` | jsonpath (RFC 9535) | `$.items[?(@.price>500)]` |
121
+ | `~` | full-text (SQLite FTS5) | `~retry` |
122
+ | `&` | graph: (treesitter symbols) | `&sym`, `&<sym`, `&>sym` |
123
+ | none | literal or extglob | `?(export )?(async )function *` |
@@ -1,43 +0,0 @@
1
- #!/usr/bin/env node
2
- import { readFileSync } from "node:fs";
3
- import { parseArgs } from "node:util";
4
- import { PlurnkParser } from "../dist/src/index.js";
5
-
6
- const USAGE = `Usage:
7
- plurnk-contracts [file] Parse plurnk source from a file (or stdin if omitted or '-')
8
- and print the result as JSON.
9
- plurnk-contracts --help Show this message.
10
-
11
- Exit codes:
12
- 0 parse succeeded with no errors and no unparsed tail
13
- 1 parse produced one or more errors, or left an unparsed tail`;
14
-
15
- const { values, positionals } = parseArgs({
16
- args: process.argv.slice(2),
17
- options: {
18
- help: { type: "boolean", short: "h" },
19
- },
20
- allowPositionals: true,
21
- });
22
-
23
- if (values.help) {
24
- process.stdout.write(`${USAGE}\n`);
25
- process.exit(0);
26
- }
27
-
28
- const target = positionals[0];
29
- const input = !target || target === "-"
30
- ? readFileSync(0, "utf8")
31
- : readFileSync(target, "utf8");
32
-
33
- const result = PlurnkParser.parse(input);
34
-
35
- const serialized = JSON.stringify(
36
- result,
37
- (_key, value) => (value instanceof RegExp ? value.toString() : value),
38
- 2,
39
- );
40
- process.stdout.write(`${serialized}\n`);
41
-
42
- const hasIssues = result.items.some((i) => i.kind === "error") || result.unparsedTail !== undefined;
43
- process.exit(hasIssues ? 1 : 0);
@@ -1,63 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://schemas.plurnk.xyz/v0/AcpPlan.json",
4
- "$comment": "ACP v1 Plan, pinned to schema-v1.21.0 / 272bf799f35a258c6a4107a0410ed361e83683d3.",
5
- "title": "AcpPlan",
6
- "description": "The standards-facing ACP v1 execution plan.",
7
- "type": "object",
8
- "properties": {
9
- "entries": {
10
- "description": "The complete list of current plan entries.",
11
- "type": "array",
12
- "items": { "$ref": "#/$defs/AcpPlanEntry" }
13
- },
14
- "_meta": {
15
- "description": "Metadata reserved by ACP. Consumers must not assume meanings for its keys.",
16
- "type": ["object", "null"],
17
- "additionalProperties": true
18
- }
19
- },
20
- "required": ["entries"],
21
- "$defs": {
22
- "AcpPlanEntry": {
23
- "description": "One task or goal in an ACP execution plan.",
24
- "type": "object",
25
- "properties": {
26
- "content": {
27
- "description": "Human-readable description of what this task aims to accomplish.",
28
- "type": "string"
29
- },
30
- "priority": {
31
- "description": "The relative importance of this task.",
32
- "$ref": "#/$defs/AcpPlanEntryPriority"
33
- },
34
- "status": {
35
- "description": "The current execution status of this task.",
36
- "$ref": "#/$defs/AcpPlanEntryStatus"
37
- },
38
- "_meta": {
39
- "description": "Metadata reserved by ACP. Consumers must not assume meanings for its keys.",
40
- "type": ["object", "null"],
41
- "additionalProperties": true
42
- }
43
- },
44
- "required": ["content", "priority", "status"]
45
- },
46
- "AcpPlanEntryPriority": {
47
- "description": "ACP v1 priority levels.",
48
- "oneOf": [
49
- { "type": "string", "const": "high" },
50
- { "type": "string", "const": "medium" },
51
- { "type": "string", "const": "low" }
52
- ]
53
- },
54
- "AcpPlanEntryStatus": {
55
- "description": "ACP v1 plan-entry lifecycle states.",
56
- "oneOf": [
57
- { "type": "string", "const": "pending" },
58
- { "type": "string", "const": "in_progress" },
59
- { "type": "string", "const": "completed" }
60
- ]
61
- }
62
- }
63
- }
@@ -1,65 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://schemas.plurnk.xyz/v0/Plan.json",
4
- "$comment": "Plurnk's model-native Plan is a bare array of {content, status} task entries. ACP projection (separately owned by AcpPlan.json) supplies the required priority at the edge.",
5
- "title": "Plan",
6
- "description": "Plurnk's model-native task inventory.",
7
- "type": "array",
8
- "items": {
9
- "$ref": "#/$defs/PlanEntry"
10
- },
11
- "$defs": {
12
- "PlanEntry": {
13
- "description": "One task or goal in the model's plan.",
14
- "type": "object",
15
- "properties": {
16
- "content": {
17
- "description": "Human-readable description of what this task aims to accomplish.",
18
- "type": "string"
19
- },
20
- "status": {
21
- "description": "The current execution status of this task.",
22
- "$ref": "#/$defs/PlanEntryStatus"
23
- },
24
- "_meta": {
25
- "description": "Opaque entry metadata preserved through standards projection.",
26
- "type": [
27
- "object",
28
- "null"
29
- ],
30
- "additionalProperties": true
31
- }
32
- },
33
- "required": [
34
- "content",
35
- "status"
36
- ],
37
- "additionalProperties": false
38
- },
39
- "PlanEntryStatus": {
40
- "description": "Model-native task states; ACP projection is separately owned.",
41
- "oneOf": [
42
- {
43
- "type": "string",
44
- "const": "pending"
45
- },
46
- {
47
- "type": "string",
48
- "const": "in_progress"
49
- },
50
- {
51
- "type": "string",
52
- "const": "waiting"
53
- },
54
- {
55
- "type": "string",
56
- "const": "completed"
57
- },
58
- {
59
- "type": "string",
60
- "const": "failed"
61
- }
62
- ]
63
- }
64
- }
65
- }
@@ -1,6 +0,0 @@
1
- import type { AcpPlan } from "./types.ts";
2
- export default class AcpPlanValue {
3
- static project(value: unknown): AcpPlan;
4
- static assertCanonical(value: unknown): AcpPlan;
5
- }
6
- //# sourceMappingURL=AcpPlanValue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AcpPlanValue.d.ts","sourceRoot":"","sources":["../../src/AcpPlanValue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAK1C,MAAM,CAAC,OAAO,OAAO,YAAY;IAC7B,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAsBtC;IAED,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAK9C;CAEJ"}
@@ -1,36 +0,0 @@
1
- import PlanValue from "./PlanValue.js";
2
- import Validator from "./Validator.js";
3
- // {§plan-acp-projection}
4
- export default class AcpPlanValue {
5
- static project(value) {
6
- const plan = PlanValue.assertCanonical(value);
7
- const projected = {
8
- entries: plan.map((entry) => {
9
- const metadata = Object.fromEntries(Object.entries(entry._meta ?? {}).filter(([key]) => key !== "plurnk.xyz/status"));
10
- const { _meta: _ignored, ...fields } = entry;
11
- if (entry.status !== "waiting" && entry.status !== "failed")
12
- return {
13
- ...fields,
14
- status: entry.status,
15
- priority: "medium",
16
- ...(Object.keys(metadata).length === 0 ? {} : { _meta: metadata }),
17
- };
18
- return {
19
- ...entry,
20
- content: `${entry.status === "waiting" ? "Waiting" : "Failed"}: ${entry.content}`,
21
- status: entry.status === "waiting" ? "in_progress" : "completed",
22
- priority: "medium",
23
- _meta: { ...metadata, "plurnk.xyz/status": entry.status },
24
- };
25
- }),
26
- };
27
- return AcpPlanValue.assertCanonical(projected);
28
- }
29
- static assertCanonical(value) {
30
- if (!Validator.validateAcpPlan(value).valid) {
31
- throw new TypeError("Expected a canonical ACP Plan.");
32
- }
33
- return value;
34
- }
35
- }
36
- //# sourceMappingURL=AcpPlanValue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AcpPlanValue.js","sourceRoot":"","sources":["../../src/AcpPlanValue.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAEvC,yBAAyB;AACzB,MAAM,CAAC,OAAO,OAAO,YAAY;IAC7B,MAAM,CAAC,OAAO,CAAC,KAAc;QACzB,MAAM,IAAI,GAAG,SAAS,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAC9C,MAAM,SAAS,GAAG;YACd,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;gBACxB,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,mBAAmB,CAAC,CAAC,CAAC;gBACtH,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC;gBAC7C,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,QAAQ;oBAAE,OAAO;wBAChE,GAAG,MAAM;wBACT,MAAM,EAAE,KAAK,CAAC,MAAM;wBACpB,QAAQ,EAAE,QAAiB;wBAC3B,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;qBACrE,CAAC;gBACF,OAAO;oBACH,GAAG,KAAK;oBACR,OAAO,EAAE,GAAG,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,OAAO,EAAE;oBACjF,MAAM,EAAE,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,aAAsB,CAAC,CAAC,CAAC,WAAoB;oBAClF,QAAQ,EAAE,QAAiB;oBAC3B,KAAK,EAAE,EAAE,GAAG,QAAQ,EAAE,mBAAmB,EAAE,KAAK,CAAC,MAAM,EAAE;iBAC5D,CAAC;YACN,CAAC,CAAC;SACa,CAAC;QACpB,OAAO,YAAY,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,KAAc;QACjC,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC;YAC1C,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAC;QAC1D,CAAC;QACD,OAAO,KAAgB,CAAC;IAC5B,CAAC;CAEJ"}
@@ -1,21 +0,0 @@
1
- import type { ClientStatement, ParsedPath, PlurnkStatement, Position } from "./types.ts";
2
- import type { ClientStatementContext, StatementContext, MidStatementContext } from "./generated/plurnkParser.ts";
3
- import { DispositionStatementContext, SendStatementContext } from "./generated/plurnkParser.ts";
4
- import PlurnkParseError from "./PlurnkParseError.ts";
5
- declare module "xpath" {
6
- function parse(expression: string): unknown;
7
- }
8
- export default class AstBuilder {
9
- #private;
10
- static takeAdvisories(): PlurnkParseError[];
11
- static build(ctx: StatementContext | MidStatementContext | DispositionStatementContext | SendStatementContext): PlurnkStatement;
12
- static buildClient(ctx: ClientStatementContext): ClientStatement;
13
- static executorSpellings: ReadonlyMap<string, string>;
14
- /**
15
- * Apply target-slot decomposition without round-tripping through a statement.
16
- * Returns null for empty input and throws PlurnkParseError when a scheme URL
17
- * fails WHATWG admission. {§path-syntax}
18
- */
19
- static parsePath(raw: string, pos?: Position): ParsedPath | null;
20
- }
21
- //# sourceMappingURL=AstBuilder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AstBuilder.d.ts","sourceRoot":"","sources":["../../src/AstBuilder.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAER,eAAe,EAaf,UAAU,EACV,eAAe,EACf,QAAQ,EAOX,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAER,sBAAsB,EActB,gBAAgB,EAChB,mBAAmB,EACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAIH,2BAA2B,EAC3B,oBAAoB,EAGvB,MAAM,6BAA6B,CAAC;AAErC,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AAMrD,OAAO,QAAQ,OAAO,CAAC;IACnB,SAAgB,KAAK,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;CACtD;AAQD,MAAM,CAAC,OAAO,OAAO,UAAU;;IAK3B,MAAM,CAAC,cAAc,IAAI,gBAAgB,EAAE,CAI1C;IAwJD,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,gBAAgB,GAAG,mBAAmB,GAAG,2BAA2B,GAAG,oBAAoB,GAAG,eAAe,CAmB9H;IA8BD,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,sBAAsB,GAAG,eAAe,CAI/D;IA4ID,MAAM,CAAC,iBAAiB,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAa;IAgSlE;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,QAAiC,GAAG,UAAU,GAAG,IAAI,CAmCvF;CAiLJ"}