@plurnk/plurnk-contracts 1.4.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/LICENSE +21 -0
- package/README.md +119 -0
- package/SPEC.md +954 -0
- package/bin/plurnk-contracts.js +43 -0
- package/dist/plurnk.gbnf +394 -0
- package/dist/schema/ClientDisplayCapabilities.json +54 -0
- package/dist/schema/ClientStatement.json +68 -0
- package/dist/schema/EntryReadResult.json +101 -0
- package/dist/schema/LineMarker.json +16 -0
- package/dist/schema/LoopFlags.json +16 -0
- package/dist/schema/MatcherBody.json +84 -0
- package/dist/schema/Notice.json +67 -0
- package/dist/schema/OperationResult.json +44 -0
- package/dist/schema/ParsedPath.json +64 -0
- package/dist/schema/PlurnkStatement.json +264 -0
- package/dist/schema/Position.json +20 -0
- package/dist/schema/ProblemDetails.json +51 -0
- package/dist/schema/ProposalDisposition.json +26 -0
- package/dist/schema/ProposalProjection.json +44 -0
- package/dist/schema/ProviderCost.json +69 -0
- package/dist/schema/ResourceSelection.json +20 -0
- package/dist/schema/SendBody.json +13 -0
- package/dist/schema/TextRegion.json +31 -0
- package/dist/src/AstBuilder.d.ts +24 -0
- package/dist/src/AstBuilder.d.ts.map +1 -0
- package/dist/src/AstBuilder.js +609 -0
- package/dist/src/AstBuilder.js.map +1 -0
- package/dist/src/PathSyntax.d.ts +9 -0
- package/dist/src/PathSyntax.d.ts.map +1 -0
- package/dist/src/PathSyntax.js +36 -0
- package/dist/src/PathSyntax.js.map +1 -0
- package/dist/src/PlurnkErrorStrategy.d.ts +10 -0
- package/dist/src/PlurnkErrorStrategy.d.ts.map +1 -0
- package/dist/src/PlurnkErrorStrategy.js +147 -0
- package/dist/src/PlurnkErrorStrategy.js.map +1 -0
- package/dist/src/PlurnkParseError.d.ts +17 -0
- package/dist/src/PlurnkParseError.d.ts.map +1 -0
- package/dist/src/PlurnkParseError.js +24 -0
- package/dist/src/PlurnkParseError.js.map +1 -0
- package/dist/src/PlurnkParser.d.ts +9 -0
- package/dist/src/PlurnkParser.d.ts.map +1 -0
- package/dist/src/PlurnkParser.js +396 -0
- package/dist/src/PlurnkParser.js.map +1 -0
- package/dist/src/Problems.d.ts +8 -0
- package/dist/src/Problems.d.ts.map +1 -0
- package/dist/src/Problems.js +23 -0
- package/dist/src/Problems.js.map +1 -0
- package/dist/src/RecordingListener.d.ts +9 -0
- package/dist/src/RecordingListener.d.ts.map +1 -0
- package/dist/src/RecordingListener.js +19 -0
- package/dist/src/RecordingListener.js.map +1 -0
- package/dist/src/Validator.d.ts +49 -0
- package/dist/src/Validator.d.ts.map +1 -0
- package/dist/src/Validator.js +211 -0
- package/dist/src/Validator.js.map +1 -0
- package/dist/src/generated/plurnkLexer.d.ts +129 -0
- package/dist/src/generated/plurnkLexer.d.ts.map +1 -0
- package/dist/src/generated/plurnkLexer.js +808 -0
- package/dist/src/generated/plurnkLexer.js.map +1 -0
- package/dist/src/generated/plurnkParser.d.ts +525 -0
- package/dist/src/generated/plurnkParser.d.ts.map +1 -0
- package/dist/src/generated/plurnkParser.js +3896 -0
- package/dist/src/generated/plurnkParser.js.map +1 -0
- package/dist/src/generated/plurnkParserVisitor.d.ts +298 -0
- package/dist/src/generated/plurnkParserVisitor.d.ts.map +1 -0
- package/dist/src/generated/plurnkParserVisitor.js +257 -0
- package/dist/src/generated/plurnkParserVisitor.js.map +1 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +10 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/types.d.ts +29 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.generated.d.ts +450 -0
- package/dist/src/types.generated.d.ts.map +1 -0
- package/dist/src/types.generated.js +4 -0
- package/dist/src/types.generated.js.map +1 -0
- package/dist/src/types.js +23 -0
- package/dist/src/types.js.map +1 -0
- package/package.json +87 -0
- package/plurnk.md +220 -0
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
export type ClientDisplayCapabilities = (SchemeDisplayCapability | MimetypeDisplayCapability)[];
|
|
2
|
+
export interface SchemeDisplayCapability {
|
|
3
|
+
kind: "scheme";
|
|
4
|
+
scheme: string;
|
|
5
|
+
display: CapabilityDisplay;
|
|
6
|
+
}
|
|
7
|
+
export interface CapabilityDisplay {
|
|
8
|
+
glyph?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface MimetypeDisplayCapability {
|
|
11
|
+
kind: "mimetype";
|
|
12
|
+
mimetype: string;
|
|
13
|
+
display: CapabilityDisplay;
|
|
14
|
+
}
|
|
15
|
+
export type ClientStatement = (PlurnkStatement | LookStatement | BuffStatement);
|
|
16
|
+
/**
|
|
17
|
+
* The parsed AST union for one protocol statement, discriminated by `op`. Every variant has fixed signal, target, lineMarker, body, suffix, and source-position fields; operation-specific schemas constrain their types. A null field records an omitted tolerated slot and does not satisfy runtime requirements by itself.
|
|
18
|
+
*/
|
|
19
|
+
export type PlurnkStatement = (FindStatement | ReadStatement | OpenStatement | FoldStatement | EditStatement | CopyStatement | MoveStatement | SendStatement | ExecStatement | WorkStatement | ForkStatement | KillStatement | PlanStatement);
|
|
20
|
+
/**
|
|
21
|
+
* A parsed target slot from a plurnk statement. Discriminated on `kind`: a bare local path or a WHATWG-decomposed URL. Targets carry an exact address or a path glob; content matching belongs in the statement body.
|
|
22
|
+
*/
|
|
23
|
+
export type ParsedPath = (LocalPath | UrlPath);
|
|
24
|
+
/**
|
|
25
|
+
* Parsed body of a FIND/READ/OPEN/FOLD statement, discriminated on `dialect`. The dialect is determined by the body's leading characters (`//` xpath, `/` regex, `$` jsonpath, `~` semantic, `@` graph, else glob). The regex variant carries pattern and flags split out of the `/pattern/flags` literal; every variant remains JSON-serializable.
|
|
26
|
+
*/
|
|
27
|
+
export type MatcherBody = (XPathBody | RegexBody | JsonPathBody | SemanticBody | GraphBody | GlobBody);
|
|
28
|
+
export type TagSignal = (string[] | null);
|
|
29
|
+
export type PathOrNull = (ParsedPath | null);
|
|
30
|
+
export type LineMarkerOrNull = (LineMarker | null);
|
|
31
|
+
export type MatcherBodyOrNull = (MatcherBody | null);
|
|
32
|
+
export interface FindStatement {
|
|
33
|
+
op: "FIND";
|
|
34
|
+
suffix: string;
|
|
35
|
+
signal: (string[] | null);
|
|
36
|
+
target: (ParsedPath | null);
|
|
37
|
+
lineMarker: (LineMarker | null);
|
|
38
|
+
body: (MatcherBody | null);
|
|
39
|
+
position: Position;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A bare local path with no `scheme://` prefix. The raw string is stored verbatim; resolution is the runtime's job.
|
|
43
|
+
*/
|
|
44
|
+
export interface LocalPath {
|
|
45
|
+
kind: "local";
|
|
46
|
+
raw: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* A path with a `scheme://` prefix, fully decomposed via WHATWG URL.
|
|
50
|
+
*/
|
|
51
|
+
export interface UrlPath {
|
|
52
|
+
kind: "url";
|
|
53
|
+
raw: string;
|
|
54
|
+
scheme: string;
|
|
55
|
+
username: (string | null);
|
|
56
|
+
password: (string | null);
|
|
57
|
+
hostname: (string | null);
|
|
58
|
+
port: (number | null);
|
|
59
|
+
pathname: string;
|
|
60
|
+
/**
|
|
61
|
+
* Canonical serialized WHATWG query component without the leading `?`. Null means no query; the empty string means an explicit empty query (`?`). Ordering, duplicate names, and encoded spelling are preserved.
|
|
62
|
+
*/
|
|
63
|
+
query: (string | null);
|
|
64
|
+
fragment: (string | null);
|
|
65
|
+
/**
|
|
66
|
+
* Trailing `{key: value}` request-metadata blocks removed before WHATWG decomposition and preserved as ordered pairs. Order and duplicate names survive; the addressed scheme owns their meaning. Absent when no block was supplied.
|
|
67
|
+
*/
|
|
68
|
+
headers?: [string, string][];
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The ordered numeric components parsed from a `<scope>` slot. AstBuilder converts each lexical number to a JavaScript number; the operation owner assigns arity and meaning, including text coordinates, result positions, timing, mutation anchors, and an optional leading semantic threshold.
|
|
72
|
+
*/
|
|
73
|
+
export interface LineMarker {
|
|
74
|
+
/**
|
|
75
|
+
* @minItems 1
|
|
76
|
+
*/
|
|
77
|
+
marks: [number, ...(number)[]];
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* XPath 1.0 expression. Validated at parse time via the xpath library.
|
|
81
|
+
*/
|
|
82
|
+
export interface XPathBody {
|
|
83
|
+
dialect: "xpath";
|
|
84
|
+
raw: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* ECMAScript regex literal `/pattern/flags`. Escape a literal delimiter as `\/`. Pattern and flags are split out for direct use. `raw` preserves the literal form for round-tripping.
|
|
88
|
+
*/
|
|
89
|
+
export interface RegexBody {
|
|
90
|
+
dialect: "regex";
|
|
91
|
+
raw: string;
|
|
92
|
+
pattern: string;
|
|
93
|
+
flags: string;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* RFC 9535 JSONPath expression. Compiled at parse time with json-p3, the same engine used for runtime matching.
|
|
97
|
+
*/
|
|
98
|
+
export interface JsonPathBody {
|
|
99
|
+
dialect: "jsonpath";
|
|
100
|
+
raw: string;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Semantic similarity query. Body is `~phrase`: natural language after the tilde, with no parse step. Similarity thresholds and result ranges belong to the statement's scope; resolution happens service-side through the configured embedding implementation.
|
|
104
|
+
*/
|
|
105
|
+
export interface SemanticBody {
|
|
106
|
+
dialect: "semantic";
|
|
107
|
+
raw: string;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Code-graph reference query. Body is `@symbol` for a neighborhood, `@<symbol` for inbound references, or `@>symbol` for outbound references. Resolution happens service-side through the symbol index; no parse step occurs in the language parser.
|
|
111
|
+
*/
|
|
112
|
+
export interface GraphBody {
|
|
113
|
+
dialect: "graph";
|
|
114
|
+
raw: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Pattern with no dialect prefix; treated as a glob/literal match.
|
|
118
|
+
*/
|
|
119
|
+
export interface GlobBody {
|
|
120
|
+
dialect: "glob";
|
|
121
|
+
raw: string;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* A source point in parsed PLURNK input. Lines are 1-based; columns are 0-based Unicode code points. LF and CRLF delimit lines, while a lone CR occupies one column. The exact pair {line: 0, column: 0} is the sole unknown/degraded position.
|
|
125
|
+
*/
|
|
126
|
+
export interface Position {
|
|
127
|
+
line: number;
|
|
128
|
+
column: number;
|
|
129
|
+
}
|
|
130
|
+
export interface ReadStatement {
|
|
131
|
+
op: "READ";
|
|
132
|
+
suffix: string;
|
|
133
|
+
signal: (string[] | null);
|
|
134
|
+
target: (ParsedPath | null);
|
|
135
|
+
lineMarker: (LineMarker | null);
|
|
136
|
+
body: (MatcherBody | null);
|
|
137
|
+
position: Position;
|
|
138
|
+
}
|
|
139
|
+
export interface OpenStatement {
|
|
140
|
+
op: "OPEN";
|
|
141
|
+
suffix: string;
|
|
142
|
+
signal: (string[] | null);
|
|
143
|
+
target: (ParsedPath | null);
|
|
144
|
+
lineMarker: null;
|
|
145
|
+
body: (MatcherBody | null);
|
|
146
|
+
position: Position;
|
|
147
|
+
}
|
|
148
|
+
export interface FoldStatement {
|
|
149
|
+
op: "FOLD";
|
|
150
|
+
suffix: string;
|
|
151
|
+
signal: (string[] | null);
|
|
152
|
+
target: (ParsedPath | null);
|
|
153
|
+
lineMarker: null;
|
|
154
|
+
body: (MatcherBody | null);
|
|
155
|
+
position: Position;
|
|
156
|
+
}
|
|
157
|
+
export interface EditStatement {
|
|
158
|
+
op: "EDIT";
|
|
159
|
+
suffix: string;
|
|
160
|
+
signal: (string[] | null);
|
|
161
|
+
target: (ParsedPath | null);
|
|
162
|
+
lineMarker: (LineMarker | null);
|
|
163
|
+
body: (string | null);
|
|
164
|
+
position: Position;
|
|
165
|
+
}
|
|
166
|
+
export interface CopyStatement {
|
|
167
|
+
op: "COPY";
|
|
168
|
+
suffix: string;
|
|
169
|
+
signal: (string[] | null);
|
|
170
|
+
target: (ParsedPath | null);
|
|
171
|
+
lineMarker: (LineMarker | null);
|
|
172
|
+
body: (ResourceSelection | null);
|
|
173
|
+
position: Position;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* A COPY/MOVE destination target and optional text scope. A target without a fragment selects the scheme's default channel; a fragment selects a named channel; lineMarker scopes the selected destination content.
|
|
177
|
+
*/
|
|
178
|
+
export interface ResourceSelection {
|
|
179
|
+
target: ParsedPath;
|
|
180
|
+
lineMarker: (LineMarker | null);
|
|
181
|
+
}
|
|
182
|
+
export interface MoveStatement {
|
|
183
|
+
op: "MOVE";
|
|
184
|
+
suffix: string;
|
|
185
|
+
signal: (string[] | null);
|
|
186
|
+
target: (ParsedPath | null);
|
|
187
|
+
lineMarker: (LineMarker | null);
|
|
188
|
+
body: (ResourceSelection | null);
|
|
189
|
+
position: Position;
|
|
190
|
+
}
|
|
191
|
+
export interface SendStatement {
|
|
192
|
+
op: "SEND";
|
|
193
|
+
suffix: string;
|
|
194
|
+
signal: (number | null);
|
|
195
|
+
target: (ParsedPath | null);
|
|
196
|
+
lineMarker: (LineMarker | null);
|
|
197
|
+
body: (SendBody | null);
|
|
198
|
+
position: Position;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Parsed body of a SEND statement. `raw` is the literal body text; `json` is the best-effort `JSON.parse(raw)` result, or null when the body isn't valid JSON.
|
|
202
|
+
*/
|
|
203
|
+
export interface SendBody {
|
|
204
|
+
raw: string;
|
|
205
|
+
json: unknown;
|
|
206
|
+
}
|
|
207
|
+
export interface ExecStatement {
|
|
208
|
+
op: "EXEC";
|
|
209
|
+
suffix: string;
|
|
210
|
+
signal: (string | null);
|
|
211
|
+
target: (ParsedPath | null);
|
|
212
|
+
lineMarker: (LineMarker | null);
|
|
213
|
+
body: (string | null);
|
|
214
|
+
position: Position;
|
|
215
|
+
}
|
|
216
|
+
export interface WorkStatement {
|
|
217
|
+
op: "WORK";
|
|
218
|
+
suffix: string;
|
|
219
|
+
signal: (string | null);
|
|
220
|
+
target: (ParsedPath | null);
|
|
221
|
+
lineMarker: null;
|
|
222
|
+
body: string;
|
|
223
|
+
position: Position;
|
|
224
|
+
}
|
|
225
|
+
export interface ForkStatement {
|
|
226
|
+
op: "FORK";
|
|
227
|
+
suffix: string;
|
|
228
|
+
signal: (string | null);
|
|
229
|
+
target: (ParsedPath | null);
|
|
230
|
+
lineMarker: null;
|
|
231
|
+
body: string;
|
|
232
|
+
position: Position;
|
|
233
|
+
}
|
|
234
|
+
export interface KillStatement {
|
|
235
|
+
op: "KILL";
|
|
236
|
+
suffix: string;
|
|
237
|
+
signal: (number | null);
|
|
238
|
+
target: (ParsedPath | null);
|
|
239
|
+
lineMarker: null;
|
|
240
|
+
body: (string | null);
|
|
241
|
+
position: Position;
|
|
242
|
+
}
|
|
243
|
+
export interface PlanStatement {
|
|
244
|
+
op: "PLAN";
|
|
245
|
+
suffix: string;
|
|
246
|
+
signal: (string[] | null);
|
|
247
|
+
target: (ParsedPath | null);
|
|
248
|
+
lineMarker: (LineMarker | null);
|
|
249
|
+
body: (string | null);
|
|
250
|
+
position: Position;
|
|
251
|
+
}
|
|
252
|
+
export interface LookStatement {
|
|
253
|
+
op: "LOOK";
|
|
254
|
+
suffix: string;
|
|
255
|
+
signal: TagSignal;
|
|
256
|
+
target: PathOrNull;
|
|
257
|
+
lineMarker: LineMarkerOrNull;
|
|
258
|
+
body: MatcherBodyOrNull;
|
|
259
|
+
position: Position;
|
|
260
|
+
}
|
|
261
|
+
export interface BuffStatement {
|
|
262
|
+
op: "BUFF";
|
|
263
|
+
suffix: string;
|
|
264
|
+
signal: TagSignal;
|
|
265
|
+
target: PathOrNull;
|
|
266
|
+
lineMarker: LineMarkerOrNull;
|
|
267
|
+
body: MatcherBodyOrNull;
|
|
268
|
+
position: Position;
|
|
269
|
+
}
|
|
270
|
+
export type EntryReadResult = ({
|
|
271
|
+
status: 200;
|
|
272
|
+
entry: ClientEntry;
|
|
273
|
+
} | {
|
|
274
|
+
status: number;
|
|
275
|
+
problem: ProblemDetails;
|
|
276
|
+
entry: null;
|
|
277
|
+
});
|
|
278
|
+
export interface ClientEntry {
|
|
279
|
+
entryId: number;
|
|
280
|
+
target: string;
|
|
281
|
+
channels: {
|
|
282
|
+
[k: string]: ClientEntryChannel;
|
|
283
|
+
};
|
|
284
|
+
tags: string[];
|
|
285
|
+
}
|
|
286
|
+
export interface ClientEntryChannel {
|
|
287
|
+
content: string;
|
|
288
|
+
contentOffset: number;
|
|
289
|
+
contentLength: number;
|
|
290
|
+
mimetype: string;
|
|
291
|
+
tokens: number;
|
|
292
|
+
state: ("static" | "active" | "closed" | "errored");
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* PLURNK operation failure using RFC 9457 Problem Details. Extension members are permitted so an owning boundary can add structured causal and recovery facts without inventing a second error envelope.
|
|
296
|
+
*/
|
|
297
|
+
export interface ProblemDetails {
|
|
298
|
+
/**
|
|
299
|
+
* Absolute URI identifying the stable problem class.
|
|
300
|
+
*/
|
|
301
|
+
type: string;
|
|
302
|
+
/**
|
|
303
|
+
* Short, stable summary for this problem type.
|
|
304
|
+
*/
|
|
305
|
+
title: string;
|
|
306
|
+
/**
|
|
307
|
+
* Operation status. It must equal the containing result status.
|
|
308
|
+
*/
|
|
309
|
+
status: number;
|
|
310
|
+
/**
|
|
311
|
+
* Specific, causal explanation of this occurrence.
|
|
312
|
+
*/
|
|
313
|
+
detail: string;
|
|
314
|
+
/**
|
|
315
|
+
* Absolute URI identifying the failed durable operation, normally its log URI. Core adds it at persistence when a plugin cannot know the durable coordinate.
|
|
316
|
+
*/
|
|
317
|
+
instance?: string;
|
|
318
|
+
/**
|
|
319
|
+
* Stable producer-owned stage at which the operation failed, when the operation has multiple independently recoverable stages.
|
|
320
|
+
*/
|
|
321
|
+
stage?: string;
|
|
322
|
+
/**
|
|
323
|
+
* One generally valid next action. It is omitted when recovery depends on facts the producer does not know.
|
|
324
|
+
*/
|
|
325
|
+
recovery?: string;
|
|
326
|
+
/**
|
|
327
|
+
* Whether the producer recommends automatically retrying the identical request.
|
|
328
|
+
*/
|
|
329
|
+
retryable?: boolean;
|
|
330
|
+
[k: string]: unknown;
|
|
331
|
+
}
|
|
332
|
+
export interface LoopFlags {
|
|
333
|
+
mode: ("ask" | "act");
|
|
334
|
+
auto: boolean;
|
|
335
|
+
noWeb: boolean;
|
|
336
|
+
noInteraction: boolean;
|
|
337
|
+
noProposals: boolean;
|
|
338
|
+
}
|
|
339
|
+
export interface Notice {
|
|
340
|
+
/**
|
|
341
|
+
* Producer identifier. Top-level for self-contained subsystems; colon-namespaced for parameterized producers such as `provider:openai` or `exec:search`.
|
|
342
|
+
*/
|
|
343
|
+
source: string;
|
|
344
|
+
/**
|
|
345
|
+
* Open discriminator within a source. Examples include `grammar_unenforced`, `embed_progress`, `search_progress`, and `turn_awaiting_model`.
|
|
346
|
+
*/
|
|
347
|
+
kind: string;
|
|
348
|
+
/**
|
|
349
|
+
* Display severity set by the producer. It does not make the Notice a durable operation result.
|
|
350
|
+
*/
|
|
351
|
+
level: ("error" | "warn" | "info");
|
|
352
|
+
/**
|
|
353
|
+
* Optional terse, factual display message.
|
|
354
|
+
*/
|
|
355
|
+
message?: (string | null);
|
|
356
|
+
/**
|
|
357
|
+
* Optional typed position for an observation. ContentOffset points into model output; LogCoordinate points at a durable log row without replacing it.
|
|
358
|
+
*/
|
|
359
|
+
position?: (ContentOffset | LogCoordinate | null);
|
|
360
|
+
[k: string]: unknown;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* A point in model output using the parser-point convention: 1-based line and 0-based Unicode-code-point column. Absence or a null Notice.position represents an unknown location.
|
|
364
|
+
*/
|
|
365
|
+
export interface ContentOffset {
|
|
366
|
+
type: "content-offset";
|
|
367
|
+
line: number;
|
|
368
|
+
column: number;
|
|
369
|
+
}
|
|
370
|
+
export interface LogCoordinate {
|
|
371
|
+
type: "log-coordinate";
|
|
372
|
+
/**
|
|
373
|
+
* Log row identity, typically `log:///<loop>/<turn>/<sequence>`.
|
|
374
|
+
*/
|
|
375
|
+
coordinate: string;
|
|
376
|
+
/**
|
|
377
|
+
* Optional op token (FIND/READ/EDIT/...) at the coordinate, for human-readable rendering.
|
|
378
|
+
*/
|
|
379
|
+
op?: string;
|
|
380
|
+
}
|
|
381
|
+
export type OperationResult = ({
|
|
382
|
+
status: number;
|
|
383
|
+
problem?: ProblemDetails;
|
|
384
|
+
error?: never;
|
|
385
|
+
[k: string]: unknown;
|
|
386
|
+
} & {
|
|
387
|
+
status?: number;
|
|
388
|
+
});
|
|
389
|
+
/**
|
|
390
|
+
* PLURNK operation failure using RFC 9457 Problem Details. Extension members are permitted so an owning boundary can add structured causal and recovery facts without inventing a second error envelope.
|
|
391
|
+
*/
|
|
392
|
+
export type ResourceSelectionOrNull = (ResourceSelection | null);
|
|
393
|
+
export type SendBodyOrNull = (SendBody | null);
|
|
394
|
+
export type ProposalDisposition = ({
|
|
395
|
+
owner: "client";
|
|
396
|
+
} | {
|
|
397
|
+
owner: "loop";
|
|
398
|
+
decision: ("accept" | "reject");
|
|
399
|
+
outcome?: string;
|
|
400
|
+
});
|
|
401
|
+
export interface ProposalProjection {
|
|
402
|
+
logEntryId: number;
|
|
403
|
+
workerId: number;
|
|
404
|
+
loopId: number;
|
|
405
|
+
turnId: number;
|
|
406
|
+
op: ("FIND" | "READ" | "EDIT" | "COPY" | "MOVE" | "OPEN" | "FOLD" | "SEND" | "EXEC" | "WORK" | "FORK" | "KILL" | "PLAN");
|
|
407
|
+
target: {
|
|
408
|
+
scheme: (string | null);
|
|
409
|
+
pathname: (string | null);
|
|
410
|
+
};
|
|
411
|
+
body: string;
|
|
412
|
+
attrs: {
|
|
413
|
+
[k: string]: unknown;
|
|
414
|
+
};
|
|
415
|
+
flags: LoopFlags;
|
|
416
|
+
staleClobberRisk: boolean;
|
|
417
|
+
disposition: ProposalDisposition;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* The complete effective policy posture of one model loop. Persisted partial objects are expanded to this shape by the runtime owner before use or projection.
|
|
421
|
+
*/
|
|
422
|
+
export type ProviderCost = ({
|
|
423
|
+
kind: "authoritative";
|
|
424
|
+
amount: MonetaryAmount;
|
|
425
|
+
usdEquivalent: DecimalAmount;
|
|
426
|
+
source: NonEmptyString;
|
|
427
|
+
} | {
|
|
428
|
+
kind: "estimated";
|
|
429
|
+
usd: DecimalAmount;
|
|
430
|
+
source: NonEmptyString;
|
|
431
|
+
} | {
|
|
432
|
+
kind: "free";
|
|
433
|
+
source: NonEmptyString;
|
|
434
|
+
} | {
|
|
435
|
+
kind: "unknown";
|
|
436
|
+
reason: NonEmptyString;
|
|
437
|
+
});
|
|
438
|
+
export type DecimalAmount = string;
|
|
439
|
+
export type NonEmptyString = string;
|
|
440
|
+
export interface MonetaryAmount {
|
|
441
|
+
amount: DecimalAmount;
|
|
442
|
+
currency: string;
|
|
443
|
+
}
|
|
444
|
+
export interface TextRegion {
|
|
445
|
+
startLine: number;
|
|
446
|
+
startColumn: number;
|
|
447
|
+
endLine: number;
|
|
448
|
+
endColumn: number;
|
|
449
|
+
}
|
|
450
|
+
//# sourceMappingURL=types.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.generated.d.ts","sourceRoot":"","sources":["../../src/types.generated.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,yBAAyB,GAAG,CAAC,uBAAuB,GAAG,yBAAyB,CAAC,EAAE,CAAA;AAE/F,MAAM,WAAW,uBAAuB;IACxC,IAAI,EAAE,QAAQ,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,iBAAiB,CAAA;CACzB;AAED,MAAM,WAAW,iBAAiB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,yBAAyB;IAC1C,IAAI,EAAE,UAAU,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,iBAAiB,C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,EAAE,SAAS,CAAA;IACf,MAAM,EAAE,cAAc,CAAA;CACrB,CAAC,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAA;AAElC,MAAM,MAAM,cAAc,GAAG,MAAM,CAAA;AAEnC,MAAM,WAAW,cAAc;IAC/B,MAAM,EAAE,aAAa,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,UAAU;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.generated.js","sourceRoot":"","sources":["../../src/types.generated.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,yDAAyD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Schema-derived types are generated from schema/*.json — re-exported here as
|
|
2
|
+
// the single import surface for consumers. Run `npm run build:types` to regenerate.
|
|
3
|
+
export * from "./types.generated.js";
|
|
4
|
+
// Non-schema types — depend on the PlurnkParseError class and so can't be
|
|
5
|
+
// expressed in JSON Schema. Hand-maintained.
|
|
6
|
+
// Runtime protocol alphabet; PlurnkOp is structurally derived from this tuple. {§op-shapes}
|
|
7
|
+
export const PLURNK_OPS = [
|
|
8
|
+
"FIND", "READ", "EDIT", "COPY", "MOVE", "OPEN", "FOLD", "SEND", "EXEC", "WORK", "FORK", "KILL", "PLAN",
|
|
9
|
+
];
|
|
10
|
+
export const DEFAULT_LOOP_FLAGS = Object.freeze({
|
|
11
|
+
mode: "act",
|
|
12
|
+
auto: false,
|
|
13
|
+
noWeb: false,
|
|
14
|
+
noInteraction: false,
|
|
15
|
+
noProposals: false,
|
|
16
|
+
});
|
|
17
|
+
// Minting predicate only; URL ingestion deliberately remains permissive. {§worker-name}
|
|
18
|
+
export const WORKER_NAME = /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/;
|
|
19
|
+
// Authority-shaped internal worker names excluded from minting. {§worker-name}
|
|
20
|
+
export const RESERVED_AUTHORITIES = Object.freeze(["commons", "plurnk"]);
|
|
21
|
+
// Structurally synthesized statements have no parsed source point. {§parser-position}
|
|
22
|
+
export const UNKNOWN_POSITION = Object.freeze({ line: 0, column: 0 });
|
|
23
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,oFAAoF;AACpF,cAAc,sBAAsB,CAAC;AAKrC,0EAA0E;AAC1E,6CAA6C;AAE7C,4FAA4F;AAC5F,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAChG,CAAC;AAIX,MAAM,CAAC,MAAM,kBAAkB,GAAc,MAAM,CAAC,MAAM,CAAC;IACvD,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,KAAK;IACZ,aAAa,EAAE,KAAK;IACpB,WAAW,EAAE,KAAK;CACrB,CAAC,CAAC;AAEH,wFAAwF;AACxF,MAAM,CAAC,MAAM,WAAW,GAAG,sCAAsC,CAAC;AAElE,+EAA+E;AAC/E,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAU,CAAC,CAAC;AAElF,sFAAsF;AACtF,MAAM,CAAC,MAAM,gBAAgB,GAAuB,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@plurnk/plurnk-contracts",
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "Canonical PLURNK language, schemas, generated types, parser, rails, and runtime-neutral wire contracts",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"plurnk",
|
|
7
|
+
"antlr",
|
|
8
|
+
"gbnf",
|
|
9
|
+
"rfc-9457",
|
|
10
|
+
"protocol"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/plurnk/plurnk-service/tree/main/plurnk-contracts#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://repo.possumtech.com/plurnk/plurnk-service/issues"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/plurnk/plurnk-service.git",
|
|
19
|
+
"directory": "plurnk-contracts"
|
|
20
|
+
},
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=26"
|
|
23
|
+
},
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"author": "@wikitopian",
|
|
26
|
+
"type": "module",
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"plurnk-dev": "./src/index.ts",
|
|
33
|
+
"types": "./dist/src/index.d.ts",
|
|
34
|
+
"default": "./dist/src/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./package.json": "./package.json",
|
|
37
|
+
"./plurnk.gbnf": "./dist/plurnk.gbnf",
|
|
38
|
+
"./schema/*.json": {
|
|
39
|
+
"plurnk-dev": "./schema/*.json",
|
|
40
|
+
"default": "./dist/schema/*.json"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"bin": {
|
|
44
|
+
"plurnk-contracts": "./bin/plurnk-contracts.js"
|
|
45
|
+
},
|
|
46
|
+
"files": [
|
|
47
|
+
"bin/plurnk-contracts.js",
|
|
48
|
+
"dist/**/*",
|
|
49
|
+
"plurnk.md",
|
|
50
|
+
"README.md",
|
|
51
|
+
"SPEC.md"
|
|
52
|
+
],
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build:grammar": "antlr-ng -D language=TypeScript -o src/generated --generate-visitor true --generate-listener false plurnkLexer.g4 plurnkParser.g4 && node --conditions=plurnk-dev scriptify/fix-generated-imports.ts",
|
|
55
|
+
"build:types": "node --conditions=plurnk-dev scriptify/generate-types.ts",
|
|
56
|
+
"build:clean": "rm -rf dist",
|
|
57
|
+
"build:dist": "tsc -p tsconfig.build.json",
|
|
58
|
+
"build:gbnf": "node --conditions=plurnk-dev scriptify/generate-gbnf.ts",
|
|
59
|
+
"build:schemas": "node --conditions=plurnk-dev scriptify/copy-schemas.ts",
|
|
60
|
+
"build": "npm run build:clean && npm run build:grammar && npm run build:types && npm run build:dist && npm run build:gbnf && npm run build:schemas",
|
|
61
|
+
"antlr:tokens": "testrig src/generated/plurnk document --tokens",
|
|
62
|
+
"antlr:trace": "testrig src/generated/plurnk document --trace",
|
|
63
|
+
"antlr:parse": "testrig src/generated/plurnk document --tree",
|
|
64
|
+
"test:lint": "tsc --noEmit",
|
|
65
|
+
"test:unit": "node --conditions=plurnk-dev --test src/*.test.ts test/unit/*.test.ts",
|
|
66
|
+
"test:intg": "node --conditions=plurnk-dev --test test/integration/*.test.ts",
|
|
67
|
+
"test:demo": "node --conditions=plurnk-dev --test test/demo/*.test.ts",
|
|
68
|
+
"test:smoke": "node --conditions=plurnk-dev scriptify/smoke-test.ts",
|
|
69
|
+
"test:llama": "node --conditions=plurnk-dev --test test/llama/*.test.ts",
|
|
70
|
+
"test:all": "npm run test:lint && npm run test:unit && npm run test:intg && npm run test:demo",
|
|
71
|
+
"test": "npm run test:all",
|
|
72
|
+
"prepublishOnly": "npm audit && npm run build && npm run test:all && npm run test:smoke",
|
|
73
|
+
"prepack": "npm run build",
|
|
74
|
+
"prepare": "npm run build"
|
|
75
|
+
},
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"@cfworker/json-schema": "^4.1.1",
|
|
78
|
+
"antlr4ng": "^3.0.0",
|
|
79
|
+
"json-p3": "^2.2.2",
|
|
80
|
+
"xpath": "^0.0.34"
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"antlr-ng": "^1.0.10",
|
|
84
|
+
"esbuild": "^0.28.1",
|
|
85
|
+
"json-schema-to-typescript": "^15.0.4"
|
|
86
|
+
}
|
|
87
|
+
}
|