@plurnk/plurnk-contracts 1.7.0 → 1.9.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/SPEC.md +227 -63
- package/dist/conformance/agui-v1.json +541 -0
- package/dist/plurnk.gemma.gbnf +26 -22
- package/dist/plurnk.qwen.gbnf +26 -22
- package/dist/schema/A2aAgentDefinition.json +44 -0
- package/dist/schema/AcpPlan.json +63 -0
- package/dist/schema/AguiClientConformance.json +74 -0
- package/dist/schema/AguiConformanceKit.json +111 -0
- package/dist/schema/AguiDiscovery.json +70 -0
- package/dist/schema/ClientDisplayCapabilities.json +1 -1
- package/dist/schema/ClientInteractionProjection.json +2 -2
- package/dist/schema/ClientInteractionRequest.json +1 -1
- package/dist/schema/ClientInteractionResolution.json +1 -1
- package/dist/schema/ClientStatement.json +16 -11
- package/dist/schema/EntryReadResult.json +2 -2
- package/dist/schema/FunctionalityCandidate.json +33 -0
- package/dist/schema/FunctionalityDefinitionState.json +33 -0
- package/dist/schema/FunctionalityDiscoverQuery.json +16 -0
- package/dist/schema/FunctionalityDiscoverResult.json +15 -0
- package/dist/schema/FunctionalityListResult.json +15 -0
- package/dist/schema/FunctionalityMutationResult.json +16 -0
- package/dist/schema/LineMarker.json +1 -1
- package/dist/schema/LoopFlags.json +1 -1
- package/dist/schema/MatcherBody.json +1 -1
- package/dist/schema/McpConfigurationOverlay.json +25 -0
- package/dist/schema/McpServerDefinition.json +3 -2
- package/dist/schema/McpServerOptions.json +36 -0
- package/dist/schema/ModelCatalogPage.json +122 -0
- package/dist/schema/ModelCatalogQuery.json +32 -0
- package/dist/schema/ModelReadiness.json +47 -0
- package/dist/schema/ModelRoute.json +23 -0
- package/dist/schema/Notice.json +1 -1
- package/dist/schema/OperationResult.json +3 -3
- package/dist/schema/ParsedPath.json +1 -1
- package/dist/schema/Plan.json +52 -0
- package/dist/schema/PlurnkStatement.json +57 -40
- package/dist/schema/Position.json +1 -1
- package/dist/schema/ProblemDetails.json +1 -1
- package/dist/schema/ProposalDisposition.json +1 -1
- package/dist/schema/ProposalProjection.json +5 -6
- package/dist/schema/ProviderAccounting.json +3 -3
- package/dist/schema/ProviderCost.json +1 -1
- package/dist/schema/ProviderRequestAccounting.json +3 -3
- package/dist/schema/ProviderUsage.json +1 -1
- package/dist/schema/RangeExtent.json +1 -1
- package/dist/schema/ReasoningPolicy.json +7 -0
- package/dist/schema/ResourceSelection.json +3 -3
- package/dist/schema/SendBody.json +1 -1
- package/dist/schema/SkillDefinition.json +26 -0
- package/dist/schema/TextLineMarker.json +1 -1
- package/dist/schema/TextRegion.json +1 -1
- package/dist/src/AcpPlanValue.d.ts +7 -0
- package/dist/src/AcpPlanValue.d.ts.map +1 -0
- package/dist/src/AcpPlanValue.js +32 -0
- package/dist/src/AcpPlanValue.js.map +1 -0
- package/dist/src/AguiConformance.d.ts +11 -0
- package/dist/src/AguiConformance.d.ts.map +1 -0
- package/dist/src/AguiConformance.js +16 -0
- package/dist/src/AguiConformance.js.map +1 -0
- package/dist/src/ApplicationPort.d.ts +271 -0
- package/dist/src/ApplicationPort.d.ts.map +1 -0
- package/dist/src/ApplicationPort.js +2 -0
- package/dist/src/ApplicationPort.js.map +1 -0
- package/dist/src/AstBuilder.d.ts.map +1 -1
- package/dist/src/AstBuilder.js +44 -22
- package/dist/src/AstBuilder.js.map +1 -1
- package/dist/src/PlanValue.d.ts +10 -0
- package/dist/src/PlanValue.d.ts.map +1 -0
- package/dist/src/PlanValue.js +58 -0
- package/dist/src/PlanValue.js.map +1 -0
- package/dist/src/PlurnkErrorStrategy.d.ts.map +1 -1
- package/dist/src/PlurnkErrorStrategy.js +33 -19
- package/dist/src/PlurnkErrorStrategy.js.map +1 -1
- package/dist/src/PlurnkParser.js +3 -3
- package/dist/src/PlurnkParser.js.map +1 -1
- package/dist/src/Problems.js +1 -1
- package/dist/src/Validator.d.ts +68 -1
- package/dist/src/Validator.d.ts.map +1 -1
- package/dist/src/Validator.js +373 -0
- package/dist/src/Validator.js.map +1 -1
- package/dist/src/generated/plurnkLexer.d.ts +30 -28
- package/dist/src/generated/plurnkLexer.d.ts.map +1 -1
- package/dist/src/generated/plurnkLexer.js +398 -381
- package/dist/src/generated/plurnkLexer.js.map +1 -1
- package/dist/src/generated/plurnkParser.d.ts +56 -39
- package/dist/src/generated/plurnkParser.d.ts.map +1 -1
- package/dist/src/generated/plurnkParser.js +644 -450
- package/dist/src/generated/plurnkParser.js.map +1 -1
- package/dist/src/generated/plurnkParserVisitor.d.ts +7 -7
- package/dist/src/generated/plurnkParserVisitor.d.ts.map +1 -1
- package/dist/src/generated/plurnkParserVisitor.js +6 -6
- package/dist/src/generated/plurnkParserVisitor.js.map +1 -1
- package/dist/src/index.d.ts +7 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/types.d.ts +2 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.generated.d.ts +430 -21
- package/dist/src/types.generated.d.ts.map +1 -1
- package/dist/src/types.js +4 -0
- package/dist/src/types.js.map +1 -1
- package/package.json +7 -3
- package/plurnk.md +67 -78
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import type { ClientDisplayCapabilities, ClientInteractionProjection, ClientInteractionResolution, EntryReadResult, JsonSchema, LoopFlags, ModelCatalogPage, ModelCatalogQuery, ModelRoute, OperationResult, PlurnkStatement, ProposalProjection, ReasoningPolicy } from "./types.ts";
|
|
2
|
+
export type ProposalDecision = "accept" | "reject" | "cancel";
|
|
3
|
+
export interface ProposalResolution {
|
|
4
|
+
readonly decision: ProposalDecision;
|
|
5
|
+
readonly body?: string;
|
|
6
|
+
readonly outcome?: string;
|
|
7
|
+
}
|
|
8
|
+
export type ApplicationActionContext = {
|
|
9
|
+
readonly scope: "worldless";
|
|
10
|
+
} | {
|
|
11
|
+
readonly scope: "workspace";
|
|
12
|
+
readonly workspaceId: number;
|
|
13
|
+
} | {
|
|
14
|
+
readonly scope: "worker";
|
|
15
|
+
readonly workspaceId: number;
|
|
16
|
+
readonly workerId: number;
|
|
17
|
+
};
|
|
18
|
+
export interface ApplicationActionDescriptor {
|
|
19
|
+
readonly name: string;
|
|
20
|
+
readonly scope: ApplicationActionContext["scope"];
|
|
21
|
+
readonly inputSchema: JsonSchema;
|
|
22
|
+
readonly outputSchema: JsonSchema;
|
|
23
|
+
}
|
|
24
|
+
export interface ClientEnvelope {
|
|
25
|
+
readonly workspaceId: number;
|
|
26
|
+
readonly workspaceName: string;
|
|
27
|
+
readonly projectRoot: string | null;
|
|
28
|
+
readonly workerId: number;
|
|
29
|
+
readonly workerName: string;
|
|
30
|
+
}
|
|
31
|
+
export type ApplicationWorkerOrigin = "model" | "client" | "_plurnk";
|
|
32
|
+
export interface ApplicationWorkerProjection {
|
|
33
|
+
readonly id: number;
|
|
34
|
+
readonly name: string;
|
|
35
|
+
readonly created_at: string;
|
|
36
|
+
readonly origin: ApplicationWorkerOrigin;
|
|
37
|
+
readonly parentWorkerId: number | null;
|
|
38
|
+
}
|
|
39
|
+
export interface ApplicationWorkerQuery {
|
|
40
|
+
readonly origin?: ApplicationWorkerOrigin;
|
|
41
|
+
/** Omitted means every lineage position; null means roots only. */
|
|
42
|
+
readonly parentWorkerId?: number | null;
|
|
43
|
+
}
|
|
44
|
+
export type ApplicationWorkerIdentity = {
|
|
45
|
+
readonly id: number;
|
|
46
|
+
readonly name?: never;
|
|
47
|
+
} | {
|
|
48
|
+
readonly id?: never;
|
|
49
|
+
readonly name: string;
|
|
50
|
+
};
|
|
51
|
+
export interface ApplicationLoopProjection {
|
|
52
|
+
readonly id: number;
|
|
53
|
+
readonly workerId: number;
|
|
54
|
+
readonly sequence: number;
|
|
55
|
+
readonly status: number;
|
|
56
|
+
readonly prompt: string;
|
|
57
|
+
readonly promptSource: string | null;
|
|
58
|
+
readonly terminatedAt: string | null;
|
|
59
|
+
readonly terminalResult: OperationResult | null;
|
|
60
|
+
}
|
|
61
|
+
export type LogEntryWire = Readonly<Record<string, unknown>>;
|
|
62
|
+
export type ApplicationEventHandler = (workspaceId: number | null, method: string, params: unknown) => void;
|
|
63
|
+
/** The transport-neutral application contract consumed by exterior adapters. */
|
|
64
|
+
export interface ApplicationPort {
|
|
65
|
+
listClientDisplayCapabilities(): Promise<ClientDisplayCapabilities>;
|
|
66
|
+
listModuleActions(): ApplicationActionDescriptor[];
|
|
67
|
+
invokeModuleAction(name: string, params: Readonly<Record<string, unknown>>, context: ApplicationActionContext): Promise<unknown>;
|
|
68
|
+
subscribeToEvents(handler: ApplicationEventHandler): () => void;
|
|
69
|
+
pendingProposals(workspaceId: number): Promise<ProposalProjection[]>;
|
|
70
|
+
resolveProposal(logEntryId: number, resolution: ProposalResolution): void;
|
|
71
|
+
pendingClientInteractions(workspaceId: number): Promise<ClientInteractionProjection[]>;
|
|
72
|
+
resolveClientInteraction(interactionId: number, resolution: ClientInteractionResolution): Promise<void>;
|
|
73
|
+
ensureModelWorker(workspaceId: number, settings?: {
|
|
74
|
+
readonly requestUserInput?: boolean;
|
|
75
|
+
}): Promise<number>;
|
|
76
|
+
runLoop(args: {
|
|
77
|
+
readonly workspaceId: number;
|
|
78
|
+
readonly workerId: number;
|
|
79
|
+
readonly prompt: string;
|
|
80
|
+
readonly source?: string;
|
|
81
|
+
readonly maxTurns?: number;
|
|
82
|
+
readonly flags?: Partial<LoopFlags>;
|
|
83
|
+
readonly openPaths?: string[];
|
|
84
|
+
readonly selector?: string;
|
|
85
|
+
readonly childSelector?: string | null;
|
|
86
|
+
}): Promise<OperationResult & {
|
|
87
|
+
readonly action: "injected_next_turn" | "enqueued_new_loop";
|
|
88
|
+
readonly loopId: number;
|
|
89
|
+
readonly turnSeq?: number;
|
|
90
|
+
}>;
|
|
91
|
+
cancelDrain(workerId: number, reason?: string): boolean;
|
|
92
|
+
cancelWorker(args: {
|
|
93
|
+
readonly workspaceId: number;
|
|
94
|
+
readonly workerId: number;
|
|
95
|
+
readonly reason?: string;
|
|
96
|
+
}): Promise<void>;
|
|
97
|
+
dispatchClientAction(args: {
|
|
98
|
+
readonly workspaceId: number;
|
|
99
|
+
readonly workerId: number;
|
|
100
|
+
readonly functionalityWorkerId: number;
|
|
101
|
+
readonly statements: PlurnkStatement[];
|
|
102
|
+
}): Promise<OperationResult[]>;
|
|
103
|
+
readLog(args: {
|
|
104
|
+
readonly workspaceId: number;
|
|
105
|
+
readonly workerId: number;
|
|
106
|
+
readonly loopId?: number;
|
|
107
|
+
readonly turnId?: number;
|
|
108
|
+
readonly sinceId?: number;
|
|
109
|
+
readonly limit?: number;
|
|
110
|
+
readonly loopSeq?: number;
|
|
111
|
+
readonly turnSeq?: number;
|
|
112
|
+
readonly sequence?: number;
|
|
113
|
+
}): Promise<LogEntryWire[]>;
|
|
114
|
+
listProviders(): {
|
|
115
|
+
readonly aliases: Array<{
|
|
116
|
+
readonly alias: string;
|
|
117
|
+
readonly provider: string;
|
|
118
|
+
readonly model: string;
|
|
119
|
+
readonly active: boolean;
|
|
120
|
+
readonly inputCapacity: number | null;
|
|
121
|
+
}>;
|
|
122
|
+
};
|
|
123
|
+
listModels(query: ModelCatalogQuery): ModelCatalogPage;
|
|
124
|
+
createWorkspace(args: {
|
|
125
|
+
readonly name?: string;
|
|
126
|
+
readonly projectRoot?: string | null;
|
|
127
|
+
readonly settings?: string | object;
|
|
128
|
+
readonly constraints?: Array<{
|
|
129
|
+
readonly effect: string;
|
|
130
|
+
readonly glob: string;
|
|
131
|
+
}>;
|
|
132
|
+
}): Promise<ClientEnvelope>;
|
|
133
|
+
attachWorkspace(args: {
|
|
134
|
+
readonly workspaceId: number;
|
|
135
|
+
readonly workerId?: number;
|
|
136
|
+
readonly workerName?: string;
|
|
137
|
+
}): Promise<ClientEnvelope>;
|
|
138
|
+
listWorkspaces(): Promise<Array<{
|
|
139
|
+
readonly id: number;
|
|
140
|
+
readonly name: string;
|
|
141
|
+
readonly project_root: string | null;
|
|
142
|
+
readonly created_at: string;
|
|
143
|
+
}>>;
|
|
144
|
+
listWorkers(workspaceId: number, query?: ApplicationWorkerQuery): Promise<ApplicationWorkerProjection[]>;
|
|
145
|
+
readWorker(args: {
|
|
146
|
+
readonly workspaceId: number;
|
|
147
|
+
readonly identity: ApplicationWorkerIdentity;
|
|
148
|
+
}): Promise<ApplicationWorkerProjection | null>;
|
|
149
|
+
listWorkerLoops(args: {
|
|
150
|
+
readonly workspaceId: number;
|
|
151
|
+
readonly workerId: number;
|
|
152
|
+
}): Promise<ApplicationLoopProjection[]>;
|
|
153
|
+
listPrompts(workspaceId: number, limit?: number): Promise<string[]>;
|
|
154
|
+
renameWorkspace(workspaceId: number, name: string): Promise<{
|
|
155
|
+
readonly id: number;
|
|
156
|
+
readonly name: string;
|
|
157
|
+
}>;
|
|
158
|
+
constrain(workspaceId: number, effect: string, glob: string): Promise<{
|
|
159
|
+
readonly effect: string;
|
|
160
|
+
readonly glob: string;
|
|
161
|
+
readonly source: "explicit";
|
|
162
|
+
}>;
|
|
163
|
+
unconstrain(workspaceId: number, effect: string, glob: string): Promise<{
|
|
164
|
+
readonly effect: string;
|
|
165
|
+
readonly glob: string;
|
|
166
|
+
}>;
|
|
167
|
+
listConstraints(workspaceId: number): Promise<Array<{
|
|
168
|
+
readonly effect: string;
|
|
169
|
+
readonly glob: string;
|
|
170
|
+
readonly source: "explicit" | "create";
|
|
171
|
+
}>> | Array<{
|
|
172
|
+
readonly effect: string;
|
|
173
|
+
readonly glob: string;
|
|
174
|
+
readonly source: "explicit" | "create";
|
|
175
|
+
}>;
|
|
176
|
+
workspaceDerivationStatus(workspaceId: number): {
|
|
177
|
+
readonly phase: "preparing" | "indexing" | "complete" | "failed";
|
|
178
|
+
readonly completed: number;
|
|
179
|
+
readonly total: number;
|
|
180
|
+
readonly percent: number;
|
|
181
|
+
readonly message: string;
|
|
182
|
+
readonly level: "info" | "error";
|
|
183
|
+
} | null;
|
|
184
|
+
listMembers(workspaceId: number): Promise<{
|
|
185
|
+
readonly members: Array<{
|
|
186
|
+
readonly path: string;
|
|
187
|
+
readonly effect: string;
|
|
188
|
+
}>;
|
|
189
|
+
readonly hidden: string[];
|
|
190
|
+
}>;
|
|
191
|
+
look(args: {
|
|
192
|
+
readonly workspaceId: number;
|
|
193
|
+
readonly workerId: number;
|
|
194
|
+
readonly functionalityWorkerId: number;
|
|
195
|
+
readonly statement: PlurnkStatement;
|
|
196
|
+
}): Promise<OperationResult>;
|
|
197
|
+
readEntry(args: {
|
|
198
|
+
readonly workspaceId: number;
|
|
199
|
+
readonly workerId: number;
|
|
200
|
+
readonly target: string;
|
|
201
|
+
readonly channel?: string;
|
|
202
|
+
readonly offset?: number;
|
|
203
|
+
}): Promise<EntryReadResult>;
|
|
204
|
+
forkWorker(args: {
|
|
205
|
+
readonly workspaceId: number;
|
|
206
|
+
readonly workerId: number;
|
|
207
|
+
readonly name?: string;
|
|
208
|
+
}): Promise<{
|
|
209
|
+
readonly workerId: number;
|
|
210
|
+
readonly workerName: string | null;
|
|
211
|
+
readonly parentWorkerId: number;
|
|
212
|
+
}>;
|
|
213
|
+
createConversationWorker(args: {
|
|
214
|
+
readonly workspaceId: number;
|
|
215
|
+
readonly name?: string;
|
|
216
|
+
readonly settings?: {
|
|
217
|
+
readonly requestUserInput?: boolean;
|
|
218
|
+
};
|
|
219
|
+
}): Promise<{
|
|
220
|
+
readonly workerId: number;
|
|
221
|
+
readonly workerName: string;
|
|
222
|
+
}>;
|
|
223
|
+
readWorkerModel(args: {
|
|
224
|
+
readonly workspaceId: number;
|
|
225
|
+
readonly workerId: number;
|
|
226
|
+
}): Promise<{
|
|
227
|
+
readonly model: ModelRoute | null;
|
|
228
|
+
readonly spawnModel: ModelRoute | null;
|
|
229
|
+
}>;
|
|
230
|
+
setWorkerModel(args: {
|
|
231
|
+
readonly workspaceId: number;
|
|
232
|
+
readonly workerId: number;
|
|
233
|
+
readonly selector: string;
|
|
234
|
+
}): Promise<ModelRoute>;
|
|
235
|
+
setWorkerSpawnModel(args: {
|
|
236
|
+
readonly workspaceId: number;
|
|
237
|
+
readonly workerId: number;
|
|
238
|
+
readonly selector: string | null;
|
|
239
|
+
}): Promise<ModelRoute | null>;
|
|
240
|
+
readWorkerReasoning(args: {
|
|
241
|
+
readonly workspaceId: number;
|
|
242
|
+
readonly workerId: number;
|
|
243
|
+
}): Promise<{
|
|
244
|
+
readonly policy: ReasoningPolicy | null;
|
|
245
|
+
readonly supportedPolicies: readonly ReasoningPolicy[];
|
|
246
|
+
}>;
|
|
247
|
+
setWorkerReasoning(args: {
|
|
248
|
+
readonly workspaceId: number;
|
|
249
|
+
readonly workerId: number;
|
|
250
|
+
readonly policy: unknown;
|
|
251
|
+
}): Promise<{
|
|
252
|
+
readonly policy: ReasoningPolicy;
|
|
253
|
+
readonly supportedPolicies: readonly ReasoningPolicy[];
|
|
254
|
+
}>;
|
|
255
|
+
readWorkerSettings(args: {
|
|
256
|
+
readonly workspaceId: number;
|
|
257
|
+
readonly workerId: number;
|
|
258
|
+
}): Promise<{
|
|
259
|
+
readonly requestUserInput: boolean;
|
|
260
|
+
}>;
|
|
261
|
+
setWorkerSettings(args: {
|
|
262
|
+
readonly workspaceId: number;
|
|
263
|
+
readonly workerId: number;
|
|
264
|
+
readonly settings: {
|
|
265
|
+
readonly requestUserInput?: boolean;
|
|
266
|
+
};
|
|
267
|
+
}): Promise<{
|
|
268
|
+
readonly requestUserInput: boolean;
|
|
269
|
+
}>;
|
|
270
|
+
}
|
|
271
|
+
//# sourceMappingURL=ApplicationPort.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplicationPort.d.ts","sourceRoot":"","sources":["../../src/ApplicationPort.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,eAAe,EACf,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,eAAe,EAClB,MAA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,OAAO,CAAC;KAC5B,GAAG,OAAO,CAAC;QACR,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;QACjC,QAAQ,CAAC,iBAAiB,EAAE,SAAS,eAAe,EAAE,CAAC;KAC1D,CAAC,CAAC;IACH,kBAAkB,CAAC,IAAI,EAAE;QACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;KAC7B,GAAG,OAAO,CAAC;QAAE,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACpD,iBAAiB,CAAC,IAAI,EAAE;QACpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,QAAQ,EAAE;YAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC;KAC9D,GAAG,OAAO,CAAC;QAAE,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CACvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplicationPort.js","sourceRoot":"","sources":["../../src/ApplicationPort.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AstBuilder.d.ts","sourceRoot":"","sources":["../../src/AstBuilder.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAIR,eAAe,EAaf,iBAAiB,EACjB,UAAU,EAGV,eAAe,EACf,QAAQ,EAOX,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAGR,sBAAsB,
|
|
1
|
+
{"version":3,"file":"AstBuilder.d.ts","sourceRoot":"","sources":["../../src/AstBuilder.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAIR,eAAe,EAaf,iBAAiB,EACjB,UAAU,EAGV,eAAe,EACf,QAAQ,EAOX,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAGR,sBAAsB,EAetB,gBAAgB,EAChB,mBAAmB,EAGtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAIH,oBAAoB,EACpB,oBAAoB,EAIvB,MAAM,6BAA6B,CAAC;AAQrC,OAAO,QAAQ,OAAO,CAAC;IACnB,SAAgB,KAAK,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;CACtD;AAUD,MAAM,CAAC,OAAO,OAAO,UAAU;;IAc3B,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,gBAAgB,GAAG,mBAAmB,GAAG,oBAAoB,GAAG,oBAAoB,GAAG,eAAe,CA6BvH;IAqBD,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,sBAAsB,GAAG,eAAe,CAK/D;IAucD;;;;OAIG;IACH,MAAM,CAAC,sBAAsB,CACzB,GAAG,EAAE,MAAM,EACX,GAAG,GAAE,QAAiC,GACvC,iBAAiB,GAAG,IAAI,CA6B1B;IAED;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,QAAiC,GAAG,UAAU,GAAG,IAAI,CAoCvF;CA2HJ"}
|
package/dist/src/AstBuilder.js
CHANGED
|
@@ -7,6 +7,7 @@ import { BodyContext, IdentSignalContext, LineMarkerContext, PlanStatementContex
|
|
|
7
7
|
import { plurnkLexer } from "./generated/plurnkLexer.js";
|
|
8
8
|
import PlurnkParseError from "./PlurnkParseError.js";
|
|
9
9
|
import PathSyntax from "./PathSyntax.js";
|
|
10
|
+
import PlanValue from "./PlanValue.js";
|
|
10
11
|
import TagSignal, { InvalidTagSignalError } from "./TagSignal.js";
|
|
11
12
|
export default class AstBuilder {
|
|
12
13
|
static #SCHEME_PATTERN = /^[a-z][a-z0-9+.-]*:\/\//i;
|
|
@@ -86,7 +87,8 @@ export default class AstBuilder {
|
|
|
86
87
|
const raw = AstBuilder.#bodyTextOf(ctx);
|
|
87
88
|
return {
|
|
88
89
|
op: "FIND",
|
|
89
|
-
|
|
90
|
+
delimiter: AstBuilder.#splitDelimiter(ctx.OPEN_FIND().getText(), "FIND"),
|
|
91
|
+
annotation: AstBuilder.#annotationOf(ctx),
|
|
90
92
|
...slots,
|
|
91
93
|
body: raw !== null ? AstBuilder.#parseMatcherBody(raw, position) : null,
|
|
92
94
|
position,
|
|
@@ -116,7 +118,8 @@ export default class AstBuilder {
|
|
|
116
118
|
const raw = AstBuilder.#bodyTextOf(ctx);
|
|
117
119
|
return {
|
|
118
120
|
op: "LOOK",
|
|
119
|
-
|
|
121
|
+
delimiter: AstBuilder.#splitDelimiter(ctx.OPEN_LOOK().getText(), "LOOK"),
|
|
122
|
+
annotation: AstBuilder.#annotationOf(ctx),
|
|
120
123
|
...slots,
|
|
121
124
|
body: raw !== null ? AstBuilder.#parseMatcherBody(raw, position) : null,
|
|
122
125
|
position,
|
|
@@ -128,7 +131,8 @@ export default class AstBuilder {
|
|
|
128
131
|
const raw = AstBuilder.#bodyTextOf(ctx);
|
|
129
132
|
return {
|
|
130
133
|
op: "BUFF",
|
|
131
|
-
|
|
134
|
+
delimiter: AstBuilder.#splitDelimiter(ctx.OPEN_BUFF().getText(), "BUFF"),
|
|
135
|
+
annotation: AstBuilder.#annotationOf(ctx),
|
|
132
136
|
...slots,
|
|
133
137
|
body: raw !== null ? AstBuilder.#parseMatcherBody(raw, position) : null,
|
|
134
138
|
position,
|
|
@@ -150,7 +154,8 @@ export default class AstBuilder {
|
|
|
150
154
|
const findSlots = slots;
|
|
151
155
|
return {
|
|
152
156
|
op: "FIND",
|
|
153
|
-
|
|
157
|
+
delimiter: AstBuilder.#splitDelimiter(ctx.OPEN_READ().getText(), "READ"),
|
|
158
|
+
annotation: AstBuilder.#annotationOf(ctx),
|
|
154
159
|
...findSlots,
|
|
155
160
|
body: hasMatcher ? AstBuilder.#parseMatcherBody(raw, position) : null,
|
|
156
161
|
position,
|
|
@@ -158,7 +163,8 @@ export default class AstBuilder {
|
|
|
158
163
|
}
|
|
159
164
|
return {
|
|
160
165
|
op: "READ",
|
|
161
|
-
|
|
166
|
+
delimiter: AstBuilder.#splitDelimiter(ctx.OPEN_READ().getText(), "READ"),
|
|
167
|
+
annotation: AstBuilder.#annotationOf(ctx),
|
|
162
168
|
...slots,
|
|
163
169
|
body: null,
|
|
164
170
|
position,
|
|
@@ -166,7 +172,7 @@ export default class AstBuilder {
|
|
|
166
172
|
}
|
|
167
173
|
static #buildOpen(ctx) {
|
|
168
174
|
const position = AstBuilder.#positionOf(ctx);
|
|
169
|
-
const slots = AstBuilder.#extractCurationSlots(ctx.
|
|
175
|
+
const slots = AstBuilder.#extractCurationSlots(ctx.tagOpModifiers(), position);
|
|
170
176
|
const raw = AstBuilder.#bodyTextOf(ctx);
|
|
171
177
|
const tags = AstBuilder.#curationTags(slots.signal, position);
|
|
172
178
|
if (slots.target === null && raw === null && tags.filter.length === 0 && (tags.add.length > 0 || tags.remove.length > 0)) {
|
|
@@ -174,7 +180,8 @@ export default class AstBuilder {
|
|
|
174
180
|
}
|
|
175
181
|
return {
|
|
176
182
|
op: "OPEN",
|
|
177
|
-
|
|
183
|
+
delimiter: AstBuilder.#splitDelimiter(ctx.OPEN_OPEN().getText(), "OPEN"),
|
|
184
|
+
annotation: AstBuilder.#annotationOf(ctx),
|
|
178
185
|
...slots,
|
|
179
186
|
body: raw !== null ? AstBuilder.#parseMatcherBody(raw, position) : null,
|
|
180
187
|
position,
|
|
@@ -182,7 +189,7 @@ export default class AstBuilder {
|
|
|
182
189
|
}
|
|
183
190
|
static #buildFold(ctx) {
|
|
184
191
|
const position = AstBuilder.#positionOf(ctx);
|
|
185
|
-
const slots = AstBuilder.#extractCurationSlots(ctx.
|
|
192
|
+
const slots = AstBuilder.#extractCurationSlots(ctx.tagOpModifiers(), position);
|
|
186
193
|
const raw = AstBuilder.#bodyTextOf(ctx);
|
|
187
194
|
const tags = AstBuilder.#curationTags(slots.signal, position);
|
|
188
195
|
if (slots.target === null && raw === null && tags.filter.length === 0 && (tags.add.length > 0 || tags.remove.length > 0)) {
|
|
@@ -190,7 +197,8 @@ export default class AstBuilder {
|
|
|
190
197
|
}
|
|
191
198
|
return {
|
|
192
199
|
op: "FOLD",
|
|
193
|
-
|
|
200
|
+
delimiter: AstBuilder.#splitDelimiter(ctx.OPEN_FOLD().getText(), "FOLD"),
|
|
201
|
+
annotation: AstBuilder.#annotationOf(ctx),
|
|
194
202
|
...slots,
|
|
195
203
|
body: raw !== null ? AstBuilder.#parseMatcherBody(raw, position) : null,
|
|
196
204
|
position,
|
|
@@ -202,7 +210,8 @@ export default class AstBuilder {
|
|
|
202
210
|
AstBuilder.#assertAppliedTags(slots.signal, position);
|
|
203
211
|
return {
|
|
204
212
|
op: "EDIT",
|
|
205
|
-
|
|
213
|
+
delimiter: AstBuilder.#splitDelimiter(ctx.OPEN_EDIT().getText(), "EDIT"),
|
|
214
|
+
annotation: AstBuilder.#annotationOf(ctx),
|
|
206
215
|
...slots,
|
|
207
216
|
body: AstBuilder.#bodyTextOf(ctx),
|
|
208
217
|
position,
|
|
@@ -215,7 +224,8 @@ export default class AstBuilder {
|
|
|
215
224
|
const raw = AstBuilder.#bodyTextOf(ctx);
|
|
216
225
|
return {
|
|
217
226
|
op: "COPY",
|
|
218
|
-
|
|
227
|
+
delimiter: AstBuilder.#splitDelimiter(ctx.OPEN_COPY().getText(), "COPY"),
|
|
228
|
+
annotation: AstBuilder.#annotationOf(ctx),
|
|
219
229
|
...slots,
|
|
220
230
|
body: raw === null ? null : AstBuilder.parseResourceSelection(raw, position),
|
|
221
231
|
position,
|
|
@@ -228,7 +238,8 @@ export default class AstBuilder {
|
|
|
228
238
|
const raw = AstBuilder.#bodyTextOf(ctx);
|
|
229
239
|
return {
|
|
230
240
|
op: "MOVE",
|
|
231
|
-
|
|
241
|
+
delimiter: AstBuilder.#splitDelimiter(ctx.OPEN_MOVE().getText(), "MOVE"),
|
|
242
|
+
annotation: AstBuilder.#annotationOf(ctx),
|
|
232
243
|
...slots,
|
|
233
244
|
body: raw !== null ? AstBuilder.parseResourceSelection(raw, position) : null,
|
|
234
245
|
position,
|
|
@@ -240,7 +251,8 @@ export default class AstBuilder {
|
|
|
240
251
|
const raw = AstBuilder.#bodyTextOf(ctx);
|
|
241
252
|
return {
|
|
242
253
|
op: "SEND",
|
|
243
|
-
|
|
254
|
+
delimiter: AstBuilder.#splitDelimiter(ctx.OPEN_SEND().getText(), "SEND"),
|
|
255
|
+
annotation: AstBuilder.#annotationOf(ctx),
|
|
244
256
|
...slots,
|
|
245
257
|
// Preserve a terminal wait scope; the dispatcher owns which disposition
|
|
246
258
|
// accepts it. Only the terminal rule carries a marker (midSend → null).
|
|
@@ -254,7 +266,8 @@ export default class AstBuilder {
|
|
|
254
266
|
const slots = AstBuilder.#extractExecSlots(ctx.execModifiers(), position);
|
|
255
267
|
return {
|
|
256
268
|
op: "EXEC",
|
|
257
|
-
|
|
269
|
+
delimiter: AstBuilder.#splitDelimiter(ctx.OPEN_EXEC().getText(), "EXEC"),
|
|
270
|
+
annotation: AstBuilder.#annotationOf(ctx),
|
|
258
271
|
...slots,
|
|
259
272
|
body: AstBuilder.#bodyTextOf(ctx),
|
|
260
273
|
position,
|
|
@@ -266,7 +279,8 @@ export default class AstBuilder {
|
|
|
266
279
|
AstBuilder.#assertAppliedTags(signal, position);
|
|
267
280
|
return {
|
|
268
281
|
op: "BARE",
|
|
269
|
-
|
|
282
|
+
delimiter: AstBuilder.#splitDelimiter(ctx.OPEN_BARE().getText(), "BARE"),
|
|
283
|
+
annotation: AstBuilder.#annotationOf(ctx),
|
|
270
284
|
signal,
|
|
271
285
|
target: null,
|
|
272
286
|
lineMarker: null,
|
|
@@ -279,9 +293,10 @@ export default class AstBuilder {
|
|
|
279
293
|
const slots = AstBuilder.#extractTagSlots(ctx.tagOpModifiers(), position);
|
|
280
294
|
return {
|
|
281
295
|
op: "PLAN",
|
|
282
|
-
|
|
296
|
+
delimiter: AstBuilder.#splitDelimiter(ctx.OPEN_PLAN().getText(), "PLAN"),
|
|
297
|
+
annotation: AstBuilder.#annotationOf(ctx),
|
|
283
298
|
...slots,
|
|
284
|
-
body: AstBuilder.#
|
|
299
|
+
body: PlanValue.admit(AstBuilder.#requiredBodyTextOf(ctx)),
|
|
285
300
|
position,
|
|
286
301
|
};
|
|
287
302
|
}
|
|
@@ -290,7 +305,8 @@ export default class AstBuilder {
|
|
|
290
305
|
const slots = AstBuilder.#extractIntSlots(ctx, position);
|
|
291
306
|
return {
|
|
292
307
|
op: "KILL",
|
|
293
|
-
|
|
308
|
+
delimiter: AstBuilder.#splitDelimiter(ctx.OPEN_KILL().getText(), "KILL"),
|
|
309
|
+
annotation: AstBuilder.#annotationOf(ctx),
|
|
294
310
|
...slots,
|
|
295
311
|
lineMarker: null,
|
|
296
312
|
body: AstBuilder.#bodyTextOf(ctx),
|
|
@@ -302,7 +318,8 @@ export default class AstBuilder {
|
|
|
302
318
|
const slots = AstBuilder.#extractBranchSlots(ctx.branchModifiers(), position);
|
|
303
319
|
return {
|
|
304
320
|
op: "WORK",
|
|
305
|
-
|
|
321
|
+
delimiter: AstBuilder.#splitDelimiter(ctx.OPEN_WORK().getText(), "WORK"),
|
|
322
|
+
annotation: AstBuilder.#annotationOf(ctx),
|
|
306
323
|
...slots,
|
|
307
324
|
lineMarker: null,
|
|
308
325
|
body: AstBuilder.#requiredBodyTextOf(ctx),
|
|
@@ -314,7 +331,8 @@ export default class AstBuilder {
|
|
|
314
331
|
const slots = AstBuilder.#extractBranchSlots(ctx.branchModifiers(), position);
|
|
315
332
|
return {
|
|
316
333
|
op: "FORK",
|
|
317
|
-
|
|
334
|
+
delimiter: AstBuilder.#splitDelimiter(ctx.OPEN_FORK().getText(), "FORK"),
|
|
335
|
+
annotation: AstBuilder.#annotationOf(ctx),
|
|
318
336
|
...slots,
|
|
319
337
|
lineMarker: null,
|
|
320
338
|
body: AstBuilder.#requiredBodyTextOf(ctx),
|
|
@@ -346,7 +364,7 @@ export default class AstBuilder {
|
|
|
346
364
|
return {
|
|
347
365
|
signal: AstBuilder.#tagsFromSignal(AstBuilder.#findFirst(modCtx, TagSignalContext)),
|
|
348
366
|
target: AstBuilder.#targetFromCtx(AstBuilder.#findFirst(modCtx, TargetContext), pos),
|
|
349
|
-
lineMarker:
|
|
367
|
+
lineMarker: AstBuilder.#textLineMarkerFromCtx(AstBuilder.#findFirst(modCtx, LineMarkerContext)),
|
|
350
368
|
};
|
|
351
369
|
}
|
|
352
370
|
// A SEND/KILL signal is one signed-integer literal, tokenized as INT (mid-comms SEND, KILL)
|
|
@@ -456,13 +474,17 @@ export default class AstBuilder {
|
|
|
456
474
|
const start = ctx.start;
|
|
457
475
|
return { line: start?.line ?? 0, column: start?.column ?? 0 };
|
|
458
476
|
}
|
|
477
|
+
static #annotationOf(ctx) {
|
|
478
|
+
const token = AstBuilder.#findToken(ctx, plurnkLexer.ANNOTATION);
|
|
479
|
+
return token === null ? null : token.slice("<!--".length, -"-->".length).trim();
|
|
480
|
+
}
|
|
459
481
|
static #bodyTextOf(ctx) {
|
|
460
482
|
return AstBuilder.#findFirst(ctx, BodyContext)?.getText() ?? null;
|
|
461
483
|
}
|
|
462
484
|
static #requiredBodyTextOf(ctx) {
|
|
463
485
|
return AstBuilder.#bodyTextOf(ctx) ?? "";
|
|
464
486
|
}
|
|
465
|
-
static #
|
|
487
|
+
static #splitDelimiter(headingText, op) {
|
|
466
488
|
const marker = op === "PLAN" ? "# " : "## ";
|
|
467
489
|
return headingText.slice(marker.length + op.length);
|
|
468
490
|
}
|