@plurnk/plurnk-grammar 0.65.0 → 0.67.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/dist/schema/SchemeRegistration.json +1 -1
- package/dist/src/Validator.d.ts +0 -8
- package/dist/src/Validator.d.ts.map +1 -1
- package/dist/src/Validator.js +0 -34
- package/dist/src/Validator.js.map +1 -1
- package/dist/src/types.generated.d.ts +112 -365
- package/dist/src/types.generated.d.ts.map +1 -1
- package/dist/src/types.generated.js +0 -3
- package/dist/src/types.generated.js.map +1 -1
- package/package.json +1 -1
- package/plurnk.md +1 -1
- package/dist/schema/Agent.json +0 -18
- package/dist/schema/Entry.json +0 -51
- package/dist/schema/LogEntry.json +0 -118
- package/dist/schema/Loop.json +0 -20
- package/dist/schema/Packet.json +0 -72
- package/dist/schema/Run.json +0 -26
- package/dist/schema/Session.json +0 -20
- package/dist/schema/Turn.json +0 -39
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"model_visible": { "type": "boolean" },
|
|
16
16
|
"category": { "type": "string", "minLength": 1 },
|
|
17
|
-
"default_scope": { "enum": ["
|
|
17
|
+
"default_scope": { "enum": ["session", "run"] },
|
|
18
18
|
"default_channel": {
|
|
19
19
|
"type": "string",
|
|
20
20
|
"pattern": "^[a-z][a-z0-9_-]*$",
|
package/dist/src/Validator.d.ts
CHANGED
|
@@ -12,17 +12,9 @@ export default class Validator {
|
|
|
12
12
|
static validateParsedPath(obj: unknown): ValidationResult;
|
|
13
13
|
static validateMatcherBody(obj: unknown): ValidationResult;
|
|
14
14
|
static validateSendBody(obj: unknown): ValidationResult;
|
|
15
|
-
static validateEntry(obj: unknown): ValidationResult;
|
|
16
15
|
static validateSchemeRegistration(obj: unknown): ValidationResult;
|
|
17
16
|
static validateProviderDeclaration(obj: unknown): ValidationResult;
|
|
18
|
-
static validateLogEntry(obj: unknown): ValidationResult;
|
|
19
17
|
static validatePlurnkStatement(obj: unknown): ValidationResult;
|
|
20
|
-
static validateTurn(obj: unknown): ValidationResult;
|
|
21
|
-
static validateLoop(obj: unknown): ValidationResult;
|
|
22
|
-
static validateRun(obj: unknown): ValidationResult;
|
|
23
|
-
static validateSession(obj: unknown): ValidationResult;
|
|
24
|
-
static validateAgent(obj: unknown): ValidationResult;
|
|
25
|
-
static validatePacket(obj: unknown): ValidationResult;
|
|
26
18
|
static validateTelemetryEvent(obj: unknown): ValidationResult;
|
|
27
19
|
}
|
|
28
20
|
//# sourceMappingURL=Validator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Validator.d.ts","sourceRoot":"","sources":["../../src/Validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,UAAU,EAAe,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"Validator.d.ts","sourceRoot":"","sources":["../../src/Validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,UAAU,EAAe,MAAM,uBAAuB,CAAC;AAa/F,MAAM,MAAM,gBAAgB,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,UAAU,EAAE,CAAA;CAAE,CAAC;AAExE,MAAM,CAAC,OAAO,OAAO,SAAS;;IA2B1B,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB;IACvD,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB;IACzD,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB;IACrD,MAAM,CAAC,sBAAsB,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB;IAC7D,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB;IACzD,MAAM,CAAC,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB;IAC1D,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB;IACvD,MAAM,CAAC,0BAA0B,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB;IACjE,MAAM,CAAC,2BAA2B,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB;IAClE,MAAM,CAAC,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB;IAC9D,MAAM,CAAC,sBAAsB,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB;CAMhE"}
|
package/dist/src/Validator.js
CHANGED
|
@@ -6,28 +6,10 @@ import channelContentSchema from "../schema/ChannelContent.json" with { type: "j
|
|
|
6
6
|
import parsedPathSchema from "../schema/ParsedPath.json" with { type: "json" };
|
|
7
7
|
import matcherBodySchema from "../schema/MatcherBody.json" with { type: "json" };
|
|
8
8
|
import sendBodySchema from "../schema/SendBody.json" with { type: "json" };
|
|
9
|
-
import entrySchema from "../schema/Entry.json" with { type: "json" };
|
|
10
9
|
import schemeRegistrationSchema from "../schema/SchemeRegistration.json" with { type: "json" };
|
|
11
10
|
import providerDeclarationSchema from "../schema/ProviderDeclaration.json" with { type: "json" };
|
|
12
|
-
import logEntrySchema from "../schema/LogEntry.json" with { type: "json" };
|
|
13
11
|
import plurnkStatementSchema from "../schema/PlurnkStatement.json" with { type: "json" };
|
|
14
|
-
import turnSchema from "../schema/Turn.json" with { type: "json" };
|
|
15
|
-
import loopSchema from "../schema/Loop.json" with { type: "json" };
|
|
16
|
-
import runSchema from "../schema/Run.json" with { type: "json" };
|
|
17
|
-
import sessionSchema from "../schema/Session.json" with { type: "json" };
|
|
18
|
-
import agentSchema from "../schema/Agent.json" with { type: "json" };
|
|
19
|
-
import packetSchema from "../schema/Packet.json" with { type: "json" };
|
|
20
12
|
import telemetryEventSchema from "../schema/TelemetryEvent.json" with { type: "json" };
|
|
21
|
-
// All foundational schemas — handy when a top-level shape transitively references many others.
|
|
22
|
-
const FOUNDATIONAL = [
|
|
23
|
-
positionSchema, lineMarkerSchema, paramsSchema, channelContentSchema,
|
|
24
|
-
parsedPathSchema, matcherBodySchema, sendBodySchema,
|
|
25
|
-
plurnkStatementSchema,
|
|
26
|
-
entrySchema, logEntrySchema,
|
|
27
|
-
schemeRegistrationSchema, providerDeclarationSchema,
|
|
28
|
-
telemetryEventSchema,
|
|
29
|
-
packetSchema,
|
|
30
|
-
];
|
|
31
13
|
export default class Validator {
|
|
32
14
|
static #position = new CfValidator(positionSchema, "2020-12");
|
|
33
15
|
static #lineMarker = new CfValidator(lineMarkerSchema, "2020-12");
|
|
@@ -36,17 +18,9 @@ export default class Validator {
|
|
|
36
18
|
static #parsedPath = Validator.#buildWithRefs(parsedPathSchema, [paramsSchema]);
|
|
37
19
|
static #matcherBody = new CfValidator(matcherBodySchema, "2020-12");
|
|
38
20
|
static #sendBody = new CfValidator(sendBodySchema, "2020-12");
|
|
39
|
-
static #entry = Validator.#buildWithRefs(entrySchema, [paramsSchema, channelContentSchema]);
|
|
40
21
|
static #schemeRegistration = new CfValidator(schemeRegistrationSchema, "2020-12");
|
|
41
22
|
static #providerDeclaration = new CfValidator(providerDeclarationSchema, "2020-12");
|
|
42
|
-
static #logEntry = Validator.#buildWithRefs(logEntrySchema, [paramsSchema, lineMarkerSchema]);
|
|
43
23
|
static #plurnkStatement = Validator.#buildWithRefs(plurnkStatementSchema, [positionSchema, lineMarkerSchema, paramsSchema, parsedPathSchema, matcherBodySchema, sendBodySchema]);
|
|
44
|
-
static #turn = Validator.#buildWithRefs(turnSchema, FOUNDATIONAL);
|
|
45
|
-
static #loop = new CfValidator(loopSchema, "2020-12");
|
|
46
|
-
static #run = new CfValidator(runSchema, "2020-12");
|
|
47
|
-
static #session = Validator.#buildWithRefs(sessionSchema, [schemeRegistrationSchema]);
|
|
48
|
-
static #agent = Validator.#buildWithRefs(agentSchema, [providerDeclarationSchema, schemeRegistrationSchema]);
|
|
49
|
-
static #packet = Validator.#buildWithRefs(packetSchema, FOUNDATIONAL);
|
|
50
24
|
static #telemetryEvent = new CfValidator(telemetryEventSchema, "2020-12");
|
|
51
25
|
static #buildWithRefs(mainSchema, refSchemas) {
|
|
52
26
|
const validator = new CfValidator(mainSchema, "2020-12");
|
|
@@ -66,17 +40,9 @@ export default class Validator {
|
|
|
66
40
|
static validateParsedPath(obj) { return Validator.#run_(Validator.#parsedPath, obj); }
|
|
67
41
|
static validateMatcherBody(obj) { return Validator.#run_(Validator.#matcherBody, obj); }
|
|
68
42
|
static validateSendBody(obj) { return Validator.#run_(Validator.#sendBody, obj); }
|
|
69
|
-
static validateEntry(obj) { return Validator.#run_(Validator.#entry, obj); }
|
|
70
43
|
static validateSchemeRegistration(obj) { return Validator.#run_(Validator.#schemeRegistration, obj); }
|
|
71
44
|
static validateProviderDeclaration(obj) { return Validator.#run_(Validator.#providerDeclaration, obj); }
|
|
72
|
-
static validateLogEntry(obj) { return Validator.#run_(Validator.#logEntry, obj); }
|
|
73
45
|
static validatePlurnkStatement(obj) { return Validator.#run_(Validator.#plurnkStatement, obj); }
|
|
74
|
-
static validateTurn(obj) { return Validator.#run_(Validator.#turn, obj); }
|
|
75
|
-
static validateLoop(obj) { return Validator.#run_(Validator.#loop, obj); }
|
|
76
|
-
static validateRun(obj) { return Validator.#run_(Validator.#run, obj); }
|
|
77
|
-
static validateSession(obj) { return Validator.#run_(Validator.#session, obj); }
|
|
78
|
-
static validateAgent(obj) { return Validator.#run_(Validator.#agent, obj); }
|
|
79
|
-
static validatePacket(obj) { return Validator.#run_(Validator.#packet, obj); }
|
|
80
46
|
static validateTelemetryEvent(obj) { return Validator.#run_(Validator.#telemetryEvent, obj); }
|
|
81
47
|
static #run_(validator, obj) {
|
|
82
48
|
const result = validator.validate(obj);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Validator.js","sourceRoot":"","sources":["../../src/Validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,WAAW,EAAgC,MAAM,uBAAuB,CAAC;AAC/F,OAAO,cAAc,MAAM,yBAAyB,CAAC,OAAO,IAAI,EAAE,MA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C,CAAC,CAAC,CAAC;IACnH,MAAM,CAAC,gBAAgB,CAAC,GAAY,IAAsB,OAAO,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IAC7G,MAAM,CAAC,0BAA0B,CAAC,GAAY,IAAsB,OAAO,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IACjI,MAAM,CAAC,2BAA2B,CAAC,GAAY,IAAsB,OAAO,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IACnI,MAAM,CAAC,uBAAuB,CAAC,GAAY,IAAsB,OAAO,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IAC3H,MAAM,CAAC,sBAAsB,CAAC,GAAY,IAAsB,OAAO,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IAEzH,MAAM,CAAC,KAAK,CAAC,SAAsB,EAAE,GAAY;QAC7C,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QACvC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;IAC1D,CAAC"}
|
|
@@ -1,61 +1,3 @@
|
|
|
1
|
-
export interface Agent {
|
|
2
|
-
version: number;
|
|
3
|
-
provider: ProviderDeclaration;
|
|
4
|
-
/**
|
|
5
|
-
* Agent-wide default scheme registrations. The v0 inventory ships with `plurnk`, `known`, `unknown`; everything else is plugin-registered.
|
|
6
|
-
*/
|
|
7
|
-
scheme_registry: SchemeRegistration[];
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Declaration of the active provider for an agent. The grammar package owns these four fields; auth/connection config lives in the agent repo.
|
|
11
|
-
*/
|
|
12
|
-
export interface ProviderDeclaration {
|
|
13
|
-
/**
|
|
14
|
-
* API vendor identifier (e.g. "local", "openrouter", "anthropic", "openai").
|
|
15
|
-
*/
|
|
16
|
-
provider: string;
|
|
17
|
-
/**
|
|
18
|
-
* Model family (e.g. "gemma", "llama", "qwen", "claude", "gpt", "gemini").
|
|
19
|
-
*/
|
|
20
|
-
family: string;
|
|
21
|
-
/**
|
|
22
|
-
* Specific model id (e.g. "gemma3-12b").
|
|
23
|
-
*/
|
|
24
|
-
model: string;
|
|
25
|
-
/**
|
|
26
|
-
* Total context window in tokens.
|
|
27
|
-
*/
|
|
28
|
-
contextSize: number;
|
|
29
|
-
/**
|
|
30
|
-
* ISO 4217 code; the unit `cost_pico` is denominated in.
|
|
31
|
-
*/
|
|
32
|
-
currency: string;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* A scheme entry in the agent's scheme registry. Defines what `<name>://` resolves to and how it's accessible.
|
|
36
|
-
*/
|
|
37
|
-
export interface SchemeRegistration {
|
|
38
|
-
/**
|
|
39
|
-
* Scheme name without `://`. Matches the URL scheme character class.
|
|
40
|
-
*/
|
|
41
|
-
name: string;
|
|
42
|
-
model_visible: boolean;
|
|
43
|
-
category: string;
|
|
44
|
-
default_scope: ("agent" | "session");
|
|
45
|
-
/**
|
|
46
|
-
* Channel name selected when an op against this scheme has no fragment. Conventionally `body`; executor schemes (`{tag}://`) typically declare `stdout`.
|
|
47
|
-
*/
|
|
48
|
-
default_channel: string;
|
|
49
|
-
/**
|
|
50
|
-
* Per-channel content-orientation hints. `head` = whole-document or front-anchored (readers care about the beginning); `tail` = append-temporal stream (readers care about the latest content). Channels not listed default to `head`. Renderers use this to pick truncation direction; the amount to render is a core/runtime concern, not a contract field.
|
|
51
|
-
*/
|
|
52
|
-
channel_orientations?: {
|
|
53
|
-
[k: string]: ("head" | "tail");
|
|
54
|
-
};
|
|
55
|
-
writable_by: ("model" | "client" | "system" | "plugin")[];
|
|
56
|
-
volatile: boolean;
|
|
57
|
-
handler: (string | null);
|
|
58
|
-
}
|
|
59
1
|
export interface ChannelContent {
|
|
60
2
|
/**
|
|
61
3
|
* Raw content bytes/string for this channel. Binary content awaits a future encoding pass (see AGENTS.md).
|
|
@@ -67,117 +9,12 @@ export interface ChannelContent {
|
|
|
67
9
|
*/
|
|
68
10
|
tokens: number;
|
|
69
11
|
}
|
|
70
|
-
export type Entry = ({
|
|
71
|
-
[k: string]: unknown;
|
|
72
|
-
} & {
|
|
73
|
-
id: number;
|
|
74
|
-
version: number;
|
|
75
|
-
scope: ("agent" | "session");
|
|
76
|
-
session_id: (number | null);
|
|
77
|
-
scheme: (string | null);
|
|
78
|
-
username: (string | null);
|
|
79
|
-
password: (string | null);
|
|
80
|
-
hostname: (string | null);
|
|
81
|
-
port: (number | null);
|
|
82
|
-
pathname: string;
|
|
83
|
-
params: (Params | null);
|
|
84
|
-
/**
|
|
85
|
-
* Named channels on this entry. Keys are channel names (lowercase identifiers); values are ChannelContent. Must be non-empty. The scheme registry declares which channel is the default for unspecified ops.
|
|
86
|
-
*/
|
|
87
|
-
channels: {
|
|
88
|
-
[k: string]: ChannelContent;
|
|
89
|
-
};
|
|
90
|
-
attributes: {};
|
|
91
|
-
tags: string[];
|
|
92
|
-
});
|
|
93
|
-
/**
|
|
94
|
-
* URL query parameters parsed into a JSON object. Single-value keys map to strings; multi-value keys (repeated in the original query string) map to arrays of strings. Empty object when the URL has no query string; nullable usages wrap this schema in a oneOf with null.
|
|
95
|
-
*/
|
|
96
|
-
export interface Params {
|
|
97
|
-
[k: string]: (string | string[]);
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* One named stream of content on an entry. Channels carry distinct, parallel views of an entry (e.g. `stdout` and `stderr` on an executor scheme like `node://`/`sh://`; `body` and `headers` on `https://`; `body` and `symbols` on a code file). Each channel has its own content bytes, mimetype, and token count.
|
|
101
|
-
*/
|
|
102
12
|
export interface LineMarker {
|
|
103
13
|
/**
|
|
104
14
|
* @minItems 1
|
|
105
15
|
*/
|
|
106
16
|
marks: [number, ...(number)[]];
|
|
107
17
|
}
|
|
108
|
-
export type LogEntry = ({
|
|
109
|
-
[k: string]: unknown;
|
|
110
|
-
} & {
|
|
111
|
-
id: number;
|
|
112
|
-
version: number;
|
|
113
|
-
run_id: number;
|
|
114
|
-
loop_id: number;
|
|
115
|
-
turn_id: number;
|
|
116
|
-
/**
|
|
117
|
-
* 1-based within the turn; resets at each new turn.
|
|
118
|
-
*/
|
|
119
|
-
sequence: number;
|
|
120
|
-
at: string;
|
|
121
|
-
origin: ("model" | "client" | "system" | "plugin");
|
|
122
|
-
op: ("FIND" | "READ" | "EDIT" | "COPY" | "MOVE" | "OPEN" | "FOLD" | "SEND" | "EXEC" | "KILL" | "PLAN");
|
|
123
|
-
suffix: string;
|
|
124
|
-
signal: (string[] | number | string | null);
|
|
125
|
-
scheme: (string | null);
|
|
126
|
-
username: (string | null);
|
|
127
|
-
password: (string | null);
|
|
128
|
-
hostname: (string | null);
|
|
129
|
-
port: (number | null);
|
|
130
|
-
pathname: (string | null);
|
|
131
|
-
params: (Params | null);
|
|
132
|
-
/**
|
|
133
|
-
* Channel selector at request time. Names the channel the op targeted; null when the op used the scheme's default channel.
|
|
134
|
-
*/
|
|
135
|
-
fragment: (string | null);
|
|
136
|
-
lineMarker: (LineMarker | null);
|
|
137
|
-
/**
|
|
138
|
-
* Raw request payload. For origin=model: the literal plurnk DSL substring of assistant.content. For origin=system/client/plugin: whatever the originator emitted, with `mimetype_tx` declaring the structure.
|
|
139
|
-
*/
|
|
140
|
-
tx: string;
|
|
141
|
-
/**
|
|
142
|
-
* Mimetype of `tx`. Typically `text/vnd.plurnk` for model-origin rows; arbitrary per-origin for system/client/plugin.
|
|
143
|
-
*/
|
|
144
|
-
mimetype_tx: string;
|
|
145
|
-
/**
|
|
146
|
-
* Raw response payload bytes/string.
|
|
147
|
-
*/
|
|
148
|
-
rx: string;
|
|
149
|
-
mimetype_rx: string;
|
|
150
|
-
status_rx: number;
|
|
151
|
-
/**
|
|
152
|
-
* Lifecycle position; orthogonal to status_rx. status_rx is the HTTP-aligned outcome of the network call; state is where the entry sits in the proposal lifecycle. Side-effecting ops that route through a proposal flow transition proposed → {resolved | failed | cancelled}; non-proposing ops settle at 'resolved' on first write.
|
|
153
|
-
*/
|
|
154
|
-
state: ("proposed" | "resolved" | "failed" | "cancelled");
|
|
155
|
-
/**
|
|
156
|
-
* Short reason string when state ∈ {failed, cancelled}; null otherwise. Common values: rejected, loop_aborted, timeout, policy_veto, apply_failed, write_failed. Open vocabulary — schemes mint their own as needed.
|
|
157
|
-
*/
|
|
158
|
-
outcome: (string | null);
|
|
159
|
-
tokens: number;
|
|
160
|
-
});
|
|
161
|
-
/**
|
|
162
|
-
* URL query parameters parsed into a JSON object. Single-value keys map to strings; multi-value keys (repeated in the original query string) map to arrays of strings. Empty object when the URL has no query string; nullable usages wrap this schema in a oneOf with null.
|
|
163
|
-
*/
|
|
164
|
-
export interface Loop {
|
|
165
|
-
id: number;
|
|
166
|
-
version: number;
|
|
167
|
-
run_id: number;
|
|
168
|
-
/**
|
|
169
|
-
* 1-based within the run.
|
|
170
|
-
*/
|
|
171
|
-
sequence: number;
|
|
172
|
-
/**
|
|
173
|
-
* Persisted loop status. Model-emittable: 100 = created (not yet started); 102 = continuing; 200 = terminal success; 499 = terminal give-up/cancellation. Engine-imposed (never a model SEND): 413 = budget overflow; 429 = max turns; 500 = failed (strike-out); 508 = loop detected (cycle).
|
|
174
|
-
*/
|
|
175
|
-
status: (100 | 102 | 200 | 413 | 429 | 499 | 500 | 508);
|
|
176
|
-
/**
|
|
177
|
-
* The original user prompt for this loop, replayed on every turn.
|
|
178
|
-
*/
|
|
179
|
-
prompt: string;
|
|
180
|
-
}
|
|
181
18
|
export type MatcherBody = (XPathBody | RegexBody | JsonPathBody | SemanticBody | GraphBody | GlobBody);
|
|
182
19
|
/**
|
|
183
20
|
* XPath 1.0 expression. Validated at parse time via the xpath library.
|
|
@@ -223,119 +60,10 @@ export interface GlobBody {
|
|
|
223
60
|
dialect: "glob";
|
|
224
61
|
raw: string;
|
|
225
62
|
}
|
|
226
|
-
export
|
|
227
|
-
|
|
228
|
-
* A parsed path slot from a plurnk statement. Discriminated on `kind`: a bare local path (no scheme), a fully decomposed URL, or a path-name regex (`#pattern#flags`) that matches entries by path rather than addressing one.
|
|
229
|
-
*/
|
|
230
|
-
export type ParsedPath = (LocalPath | UrlPath | RegexPath);
|
|
231
|
-
/**
|
|
232
|
-
* 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/flags split out of the `#pattern#flags` literal; the compiled `RegExp` object on the in-memory AST is a runtime ergonomic only and is not part of the persisted/wire contract.
|
|
233
|
-
*/
|
|
234
|
-
export interface Packet {
|
|
235
|
-
/**
|
|
236
|
-
* Total packet tokens — sum of section subtotals.
|
|
237
|
-
*/
|
|
238
|
-
tokens: number;
|
|
239
|
-
system: {
|
|
240
|
-
tokens: number;
|
|
241
|
-
/**
|
|
242
|
-
* text/markdown — plurnk grammar + scheme registry refs.
|
|
243
|
-
*/
|
|
244
|
-
system_definition: string;
|
|
245
|
-
/**
|
|
246
|
-
* text/markdown — identity / mission.
|
|
247
|
-
*/
|
|
248
|
-
persona: string;
|
|
249
|
-
log: LogEntry[];
|
|
250
|
-
};
|
|
251
|
-
user: {
|
|
252
|
-
tokens: number;
|
|
253
|
-
/**
|
|
254
|
-
* Copy of loop.prompt — never null on a continuation turn.
|
|
255
|
-
*/
|
|
256
|
-
prompt: string;
|
|
257
|
-
/**
|
|
258
|
-
* Per-turn instrumentation surfaced to the model. `budget` is renderer-provided markdown describing remaining context / cost / etc. `events` carries the cross-ecosystem error/telemetry stream (parser errors, scheme dispatch failures, engine rail signals, provider faults) — consumers route on each event's `source` + `kind` discriminator.
|
|
259
|
-
*/
|
|
260
|
-
telemetry: {
|
|
261
|
-
/**
|
|
262
|
-
* text/markdown — budget surface (token/cost/etc. left to spend). Empty string when nothing to surface.
|
|
263
|
-
*/
|
|
264
|
-
budget: string;
|
|
265
|
-
/**
|
|
266
|
-
* TelemetryEvent[]. Empty array when nothing to surface.
|
|
267
|
-
*/
|
|
268
|
-
events: TelemetryEvent[];
|
|
269
|
-
};
|
|
270
|
-
/**
|
|
271
|
-
* text/markdown — per-turn rules.
|
|
272
|
-
*/
|
|
273
|
-
system_requirements: string;
|
|
274
|
-
};
|
|
275
|
-
assistant: {
|
|
276
|
-
/**
|
|
277
|
-
* Raw DSL string emitted by the model.
|
|
278
|
-
*/
|
|
279
|
-
content: string;
|
|
280
|
-
/**
|
|
281
|
-
* Parsed PlurnkStatement[] derived from `content`.
|
|
282
|
-
*/
|
|
283
|
-
ops: PlurnkStatement[];
|
|
284
|
-
/**
|
|
285
|
-
* text/plain — provider-exposed CoT when present, null otherwise.
|
|
286
|
-
*/
|
|
287
|
-
reasoning: (string | null);
|
|
288
|
-
[k: string]: unknown;
|
|
289
|
-
};
|
|
290
|
-
assistantRaw: unknown;
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* URL query parameters parsed into a JSON object. Single-value keys map to strings; multi-value keys (repeated in the original query string) map to arrays of strings. Empty object when the URL has no query string; nullable usages wrap this schema in a oneOf with null.
|
|
294
|
-
*/
|
|
295
|
-
export interface TelemetryEvent {
|
|
296
|
-
/**
|
|
297
|
-
* Producer identifier. Top-level for self-contained subsystems (`grammar`, `engine:rail`); colon-namespaced for parameterized producers (`scheme:wiki`, `provider:openai`).
|
|
298
|
-
*/
|
|
299
|
-
source: string;
|
|
300
|
-
/**
|
|
301
|
-
* Discriminator within a source. Open vocabulary — each producer mints kinds as needed. Examples: `parse_error` (grammar), `strike`/`cycle`/`sudden_death`/`no_ops`/`max_commands_exceeded` (engine:rail), `dispatch_failure` (scheme:*), `rate_limit` (provider:*).
|
|
302
|
-
*/
|
|
303
|
-
kind: string;
|
|
304
|
-
/**
|
|
305
|
-
* Terse, factual message when present. Optional — engine rail kinds (strike, cycle) carry no human-meaningful message; the kind discriminator is the signal. Grammar/scheme/provider kinds typically include a message.
|
|
306
|
-
*/
|
|
307
|
-
message?: (string | null);
|
|
308
|
-
/**
|
|
309
|
-
* Optional typed position. ContentOffset points into the model's prior assistant.content (parser errors); LogCoordinate points at a specific log row (action failures). Tagged union extensible: future variants for entry-coordinate, channel-coordinate, range-coordinate.
|
|
310
|
-
*/
|
|
311
|
-
position?: (ContentOffset | LogCoordinate | null);
|
|
312
|
-
[k: string]: unknown;
|
|
313
|
-
}
|
|
314
|
-
export interface ContentOffset {
|
|
315
|
-
type: "content-offset";
|
|
316
|
-
line: number;
|
|
317
|
-
column: number;
|
|
318
|
-
}
|
|
319
|
-
export interface LogCoordinate {
|
|
320
|
-
type: "log-coordinate";
|
|
321
|
-
/**
|
|
322
|
-
* Log row identity, typically `log://<loop>/<turn>/<sequence>`.
|
|
323
|
-
*/
|
|
324
|
-
coordinate: string;
|
|
325
|
-
/**
|
|
326
|
-
* Optional op token (FIND/READ/EDIT/...) at the coordinate, for human-readable rendering.
|
|
327
|
-
*/
|
|
328
|
-
op?: string;
|
|
329
|
-
}
|
|
330
|
-
export interface FindStatement {
|
|
331
|
-
op: "FIND";
|
|
332
|
-
suffix: string;
|
|
333
|
-
signal: (string[] | null);
|
|
334
|
-
target: (ParsedPath | null);
|
|
335
|
-
lineMarker: (LineMarker | null);
|
|
336
|
-
body: (MatcherBody | null);
|
|
337
|
-
position: Position;
|
|
63
|
+
export interface Params {
|
|
64
|
+
[k: string]: (string | string[]);
|
|
338
65
|
}
|
|
66
|
+
export type ParsedPath = (LocalPath | UrlPath | RegexPath);
|
|
339
67
|
/**
|
|
340
68
|
* A bare local path with no `scheme://` prefix. The raw string is stored verbatim; resolution is the runtime's job.
|
|
341
69
|
*/
|
|
@@ -359,7 +87,7 @@ export interface UrlPath {
|
|
|
359
87
|
fragment: (string | null);
|
|
360
88
|
}
|
|
361
89
|
/**
|
|
362
|
-
*
|
|
90
|
+
* URL query parameters parsed into a JSON object. Single-value keys map to strings; multi-value keys (repeated in the original query string) map to arrays of strings. Empty object when the URL has no query string; nullable usages wrap this schema in a oneOf with null.
|
|
363
91
|
*/
|
|
364
92
|
export interface RegexPath {
|
|
365
93
|
kind: "regex";
|
|
@@ -367,8 +95,29 @@ export interface RegexPath {
|
|
|
367
95
|
pattern: string;
|
|
368
96
|
flags: string;
|
|
369
97
|
}
|
|
98
|
+
export type PlurnkStatement = (FindStatement | ReadStatement | OpenStatement | FoldStatement | EditStatement | CopyStatement | MoveStatement | SendStatement | ExecStatement | KillStatement | PlanStatement);
|
|
99
|
+
export type TagSignal = (string[] | null);
|
|
100
|
+
export type PathOrNull = (ParsedPath | null);
|
|
370
101
|
/**
|
|
371
|
-
*
|
|
102
|
+
* A parsed path slot from a plurnk statement. Discriminated on `kind`: a bare local path (no scheme), a fully decomposed URL, or a path-name regex (`#pattern#flags`) that matches entries by path rather than addressing one.
|
|
103
|
+
*/
|
|
104
|
+
export type LineMarkerOrNull = (LineMarker | null);
|
|
105
|
+
export type MatcherBodyOrNull = (MatcherBody | null);
|
|
106
|
+
/**
|
|
107
|
+
* 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/flags split out of the `#pattern#flags` literal; the compiled `RegExp` object on the in-memory AST is a runtime ergonomic only and is not part of the persisted/wire contract.
|
|
108
|
+
*/
|
|
109
|
+
export type SendBodyOrNull = (SendBody | null);
|
|
110
|
+
export interface FindStatement {
|
|
111
|
+
op: "FIND";
|
|
112
|
+
suffix: string;
|
|
113
|
+
signal: TagSignal;
|
|
114
|
+
target: PathOrNull;
|
|
115
|
+
lineMarker: LineMarkerOrNull;
|
|
116
|
+
body: MatcherBodyOrNull;
|
|
117
|
+
position: Position;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* A bare local path with no `scheme://` prefix. The raw string is stored verbatim; resolution is the runtime's job.
|
|
372
121
|
*/
|
|
373
122
|
export interface Position {
|
|
374
123
|
line: number;
|
|
@@ -377,64 +126,64 @@ export interface Position {
|
|
|
377
126
|
export interface ReadStatement {
|
|
378
127
|
op: "READ";
|
|
379
128
|
suffix: string;
|
|
380
|
-
signal:
|
|
381
|
-
target:
|
|
382
|
-
lineMarker:
|
|
383
|
-
body:
|
|
129
|
+
signal: TagSignal;
|
|
130
|
+
target: PathOrNull;
|
|
131
|
+
lineMarker: LineMarkerOrNull;
|
|
132
|
+
body: MatcherBodyOrNull;
|
|
384
133
|
position: Position;
|
|
385
134
|
}
|
|
386
135
|
export interface OpenStatement {
|
|
387
136
|
op: "OPEN";
|
|
388
137
|
suffix: string;
|
|
389
|
-
signal:
|
|
390
|
-
target:
|
|
391
|
-
lineMarker:
|
|
392
|
-
body:
|
|
138
|
+
signal: TagSignal;
|
|
139
|
+
target: PathOrNull;
|
|
140
|
+
lineMarker: LineMarkerOrNull;
|
|
141
|
+
body: MatcherBodyOrNull;
|
|
393
142
|
position: Position;
|
|
394
143
|
}
|
|
395
144
|
export interface FoldStatement {
|
|
396
145
|
op: "FOLD";
|
|
397
146
|
suffix: string;
|
|
398
|
-
signal:
|
|
399
|
-
target:
|
|
400
|
-
lineMarker:
|
|
401
|
-
body:
|
|
147
|
+
signal: TagSignal;
|
|
148
|
+
target: PathOrNull;
|
|
149
|
+
lineMarker: LineMarkerOrNull;
|
|
150
|
+
body: MatcherBodyOrNull;
|
|
402
151
|
position: Position;
|
|
403
152
|
}
|
|
404
153
|
export interface EditStatement {
|
|
405
154
|
op: "EDIT";
|
|
406
155
|
suffix: string;
|
|
407
|
-
signal:
|
|
408
|
-
target:
|
|
409
|
-
lineMarker:
|
|
156
|
+
signal: TagSignal;
|
|
157
|
+
target: PathOrNull;
|
|
158
|
+
lineMarker: LineMarkerOrNull;
|
|
410
159
|
body: (string | null);
|
|
411
160
|
position: Position;
|
|
412
161
|
}
|
|
413
162
|
export interface CopyStatement {
|
|
414
163
|
op: "COPY";
|
|
415
164
|
suffix: string;
|
|
416
|
-
signal:
|
|
417
|
-
target:
|
|
418
|
-
lineMarker:
|
|
165
|
+
signal: TagSignal;
|
|
166
|
+
target: PathOrNull;
|
|
167
|
+
lineMarker: LineMarkerOrNull;
|
|
419
168
|
body: (string | null);
|
|
420
169
|
position: Position;
|
|
421
170
|
}
|
|
422
171
|
export interface MoveStatement {
|
|
423
172
|
op: "MOVE";
|
|
424
173
|
suffix: string;
|
|
425
|
-
signal:
|
|
426
|
-
target:
|
|
427
|
-
lineMarker:
|
|
428
|
-
body:
|
|
174
|
+
signal: TagSignal;
|
|
175
|
+
target: PathOrNull;
|
|
176
|
+
lineMarker: LineMarkerOrNull;
|
|
177
|
+
body: PathOrNull;
|
|
429
178
|
position: Position;
|
|
430
179
|
}
|
|
431
180
|
export interface SendStatement {
|
|
432
181
|
op: "SEND";
|
|
433
182
|
suffix: string;
|
|
434
183
|
signal: (number | null);
|
|
435
|
-
target:
|
|
184
|
+
target: PathOrNull;
|
|
436
185
|
lineMarker: null;
|
|
437
|
-
body:
|
|
186
|
+
body: SendBodyOrNull;
|
|
438
187
|
position: Position;
|
|
439
188
|
}
|
|
440
189
|
/**
|
|
@@ -448,7 +197,7 @@ export interface ExecStatement {
|
|
|
448
197
|
op: "EXEC";
|
|
449
198
|
suffix: string;
|
|
450
199
|
signal: (string | null);
|
|
451
|
-
target:
|
|
200
|
+
target: PathOrNull;
|
|
452
201
|
lineMarker: null;
|
|
453
202
|
body: (string | null);
|
|
454
203
|
position: Position;
|
|
@@ -457,7 +206,7 @@ export interface KillStatement {
|
|
|
457
206
|
op: "KILL";
|
|
458
207
|
suffix: string;
|
|
459
208
|
signal: (number | null);
|
|
460
|
-
target:
|
|
209
|
+
target: PathOrNull;
|
|
461
210
|
lineMarker: null;
|
|
462
211
|
body: (string | null);
|
|
463
212
|
position: Position;
|
|
@@ -465,91 +214,89 @@ export interface KillStatement {
|
|
|
465
214
|
export interface PlanStatement {
|
|
466
215
|
op: "PLAN";
|
|
467
216
|
suffix: string;
|
|
468
|
-
signal:
|
|
469
|
-
target:
|
|
470
|
-
lineMarker:
|
|
217
|
+
signal: TagSignal;
|
|
218
|
+
target: PathOrNull;
|
|
219
|
+
lineMarker: LineMarkerOrNull;
|
|
471
220
|
body: (string | null);
|
|
472
221
|
position: Position;
|
|
473
222
|
}
|
|
474
|
-
export
|
|
475
|
-
export type PathOrNull = (ParsedPath | null);
|
|
476
|
-
/**
|
|
477
|
-
* A parsed path slot from a plurnk statement. Discriminated on `kind`: a bare local path (no scheme), a fully decomposed URL, or a path-name regex (`#pattern#flags`) that matches entries by path rather than addressing one.
|
|
478
|
-
*/
|
|
479
|
-
export type LineMarkerOrNull = (LineMarker | null);
|
|
480
|
-
export type MatcherBodyOrNull = (MatcherBody | null);
|
|
481
|
-
/**
|
|
482
|
-
* 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/flags split out of the `#pattern#flags` literal; the compiled `RegExp` object on the in-memory AST is a runtime ergonomic only and is not part of the persisted/wire contract.
|
|
483
|
-
*/
|
|
484
|
-
export type SendBodyOrNull = (SendBody | null);
|
|
485
|
-
export interface Run {
|
|
486
|
-
id: number;
|
|
487
|
-
version: number;
|
|
488
|
-
session_id: number;
|
|
223
|
+
export interface ProviderDeclaration {
|
|
489
224
|
/**
|
|
490
|
-
*
|
|
225
|
+
* API vendor identifier (e.g. "local", "openrouter", "anthropic", "openai").
|
|
491
226
|
*/
|
|
492
|
-
|
|
493
|
-
|
|
227
|
+
provider: string;
|
|
228
|
+
/**
|
|
229
|
+
* Model family (e.g. "gemma", "llama", "qwen", "claude", "gpt", "gemini").
|
|
230
|
+
*/
|
|
231
|
+
family: string;
|
|
494
232
|
/**
|
|
495
|
-
*
|
|
233
|
+
* Specific model id (e.g. "gemma3-12b").
|
|
234
|
+
*/
|
|
235
|
+
model: string;
|
|
236
|
+
/**
|
|
237
|
+
* Total context window in tokens.
|
|
496
238
|
*/
|
|
497
|
-
|
|
239
|
+
contextSize: number;
|
|
498
240
|
/**
|
|
499
|
-
*
|
|
241
|
+
* ISO 4217 code; the unit `cost_pico` is denominated in.
|
|
500
242
|
*/
|
|
501
|
-
|
|
243
|
+
currency: string;
|
|
502
244
|
}
|
|
503
|
-
export interface
|
|
504
|
-
id: number;
|
|
505
|
-
version: number;
|
|
245
|
+
export interface SchemeRegistration {
|
|
506
246
|
/**
|
|
507
|
-
*
|
|
247
|
+
* Scheme name without `://`. Matches the URL scheme character class.
|
|
508
248
|
*/
|
|
509
249
|
name: string;
|
|
510
|
-
|
|
250
|
+
model_visible: boolean;
|
|
251
|
+
category: string;
|
|
252
|
+
default_scope: ("session" | "run");
|
|
253
|
+
/**
|
|
254
|
+
* Channel name selected when an op against this scheme has no fragment. Conventionally `body`; executor schemes (`{tag}://`) typically declare `stdout`.
|
|
255
|
+
*/
|
|
256
|
+
default_channel: string;
|
|
511
257
|
/**
|
|
512
|
-
*
|
|
258
|
+
* Per-channel content-orientation hints. `head` = whole-document or front-anchored (readers care about the beginning); `tail` = append-temporal stream (readers care about the latest content). Channels not listed default to `head`. Renderers use this to pick truncation direction; the amount to render is a core/runtime concern, not a contract field.
|
|
513
259
|
*/
|
|
514
|
-
|
|
515
|
-
|
|
260
|
+
channel_orientations?: {
|
|
261
|
+
[k: string]: ("head" | "tail");
|
|
262
|
+
};
|
|
263
|
+
writable_by: ("model" | "client" | "system" | "plugin")[];
|
|
264
|
+
volatile: boolean;
|
|
265
|
+
handler: (string | null);
|
|
516
266
|
}
|
|
517
|
-
|
|
518
|
-
* A scheme entry in the agent's scheme registry. Defines what `<name>://` resolves to and how it's accessible.
|
|
519
|
-
*/
|
|
520
|
-
export interface Turn {
|
|
521
|
-
id: number;
|
|
522
|
-
version: number;
|
|
523
|
-
loop_id: number;
|
|
267
|
+
export interface TelemetryEvent {
|
|
524
268
|
/**
|
|
525
|
-
*
|
|
269
|
+
* Producer identifier. Top-level for self-contained subsystems (`grammar`, `engine:rail`); colon-namespaced for parameterized producers (`scheme:wiki`, `provider:openai`).
|
|
526
270
|
*/
|
|
527
|
-
|
|
528
|
-
timestamp: string;
|
|
529
|
-
status: number;
|
|
271
|
+
source: string;
|
|
530
272
|
/**
|
|
531
|
-
*
|
|
273
|
+
* Discriminator within a source. Open vocabulary — each producer mints kinds as needed. Examples: `parse_error` (grammar), `strike`/`cycle`/`sudden_death`/`no_ops`/`max_commands_exceeded` (engine:rail), `dispatch_failure` (scheme:*), `rate_limit` (provider:*).
|
|
532
274
|
*/
|
|
533
|
-
|
|
534
|
-
prompt: number;
|
|
535
|
-
completion: number;
|
|
536
|
-
cached: number;
|
|
537
|
-
/**
|
|
538
|
-
* Per-turn cost in pico-units of the active provider's currency.
|
|
539
|
-
*/
|
|
540
|
-
cost_pico: number;
|
|
541
|
-
};
|
|
275
|
+
kind: string;
|
|
542
276
|
/**
|
|
543
|
-
*
|
|
277
|
+
* Terse, factual message when present. Optional — engine rail kinds (strike, cycle) carry no human-meaningful message; the kind discriminator is the signal. Grammar/scheme/provider kinds typically include a message.
|
|
544
278
|
*/
|
|
545
|
-
|
|
279
|
+
message?: (string | null);
|
|
546
280
|
/**
|
|
547
|
-
*
|
|
281
|
+
* Optional typed position. ContentOffset points into the model's prior assistant.content (parser errors); LogCoordinate points at a specific log row (action failures). Tagged union extensible: future variants for entry-coordinate, channel-coordinate, range-coordinate.
|
|
548
282
|
*/
|
|
549
|
-
|
|
550
|
-
|
|
283
|
+
position?: (ContentOffset | LogCoordinate | null);
|
|
284
|
+
[k: string]: unknown;
|
|
285
|
+
}
|
|
286
|
+
export interface ContentOffset {
|
|
287
|
+
type: "content-offset";
|
|
288
|
+
line: number;
|
|
289
|
+
column: number;
|
|
290
|
+
}
|
|
291
|
+
export interface LogCoordinate {
|
|
292
|
+
type: "log-coordinate";
|
|
293
|
+
/**
|
|
294
|
+
* Log row identity, typically `log://<loop>/<turn>/<sequence>`.
|
|
295
|
+
*/
|
|
296
|
+
coordinate: string;
|
|
297
|
+
/**
|
|
298
|
+
* Optional op token (FIND/READ/EDIT/...) at the coordinate, for human-readable rendering.
|
|
299
|
+
*/
|
|
300
|
+
op?: string;
|
|
551
301
|
}
|
|
552
|
-
/**
|
|
553
|
-
* One turn's full exchange with the provider: { system, user, assistant, assistantRaw }. system aggregates durable + accumulating context (definition, persona, in-scope log rows). user carries the per-turn ephemera. assistant is the provider-normalized output. assistantRaw is opaque.
|
|
554
|
-
*/
|
|
555
302
|
//# sourceMappingURL=types.generated.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.generated.d.ts","sourceRoot":"","sources":["../../src/types.generated.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,KAAK;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,mBAAmB,CAAA;IAC7B;;OAEG;IACH,eAAe,EAAE,kBAAkB,EAAE,CAAA;CACpC;AACD;;GAEG;AAEH,MAAM,WAAW,mBAAmB;IACpC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CACf;AACD;;GAEG;AAEH,MAAM,WAAW,kBAAkB;IACnC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,OAAO,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,CAAC,OAAO,GAAG,SAAS,CAAC,CAAA;IACpC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,oBAAoB,CAAC,EAAE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AAC,CAAA;IAC9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,OAAO;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB,yBAAyB,EAAE,kBAAkB,EAAE,CAAA;CAC9C;AACD;;GAEG;AAEH,MAAM,WAAW,IAAI;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,KAAK,EAAE;QACP,MAAM,EAAE,MAAM,CAAA;QACd,UAAU,EAAE,MAAM,CAAA;QAClB,MAAM,EAAE,MAAM,CAAA;QACd;;WAEG;QACH,SAAS,EAAE,MAAM,CAAA;KAChB,CAAA;IACD;;OAEG;IACH,aAAa,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACb;AACD;;GAEG"}
|
|
1
|
+
{"version":3,"file":"types.generated.d.ts","sourceRoot":"","sources":["../../src/types.generated.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,UAAU;IAC3B;;OAEG;IACH,KAAK,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;CAC7B;AAED,MAAM,MAAM,WAAW,GAAG,C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AAE,MAAM,CAAA;IACZ;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,aAAa,GAAG,aAAa,GAAG,IAAI,CAAC,CAAA;IACjD,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,aAAa;IAC9B,IAAI,EAAE,gBAAgB,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,aAAa;IAC9B,IAAI,EAAE,gBAAgB,CAAA;IACtB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;CACV"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// @generated by scriptify/generate-types.ts from schema/*.json
|
|
2
2
|
// DO NOT EDIT — run `npm run build:types` to regenerate.
|
|
3
3
|
export {};
|
|
4
|
-
/**
|
|
5
|
-
* One turn's full exchange with the provider: { system, user, assistant, assistantRaw }. system aggregates durable + accumulating context (definition, persona, in-scope log rows). user carries the per-turn ephemera. assistant is the provider-normalized output. assistantRaw is opaque.
|
|
6
|
-
*/
|
|
7
4
|
//# sourceMappingURL=types.generated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.generated.js","sourceRoot":"","sources":["../../src/types.generated.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,yDAAyD
|
|
1
|
+
{"version":3,"file":"types.generated.js","sourceRoot":"","sources":["../../src/types.generated.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,yDAAyD"}
|
package/package.json
CHANGED
package/plurnk.md
CHANGED
|
@@ -26,7 +26,6 @@ Slots between `<<OPsuffix` and `:body:` are all optional. `:body:` fences are re
|
|
|
26
26
|
Operations emit their status and/or results on the subsequent turn.
|
|
27
27
|
READ output prefixes every line with line numbers and a hard tab, `N: `. The prefix is not part of the source.
|
|
28
28
|
EDIT is only for entries. Do not attempt to edit log items.
|
|
29
|
-
SEND broadcasts to uri when a path is included and messages the user when no path is included.
|
|
30
29
|
EXEC defaults to `sh`; override with an optional executor (`sqlite`, `node`, etc.).
|
|
31
30
|
|
|
32
31
|
## Context
|
|
@@ -150,6 +149,7 @@ chmod +x ./example.sh
|
|
|
150
149
|
|
|
151
150
|
YOU MUST ONLY use EXEC commands for actions that can't be performed with Extended HEREDOC Plurnk Operations.
|
|
152
151
|
YOU MUST ONLY communicate with SEND, not with free text between operations.
|
|
152
|
+
YOU SHOULD NOT leak internal resource information when SENDing user messages.
|
|
153
153
|
YOU MUST document all relevant questions and uncertainties into taxonomized, tagged, and topical unknown entries.
|
|
154
154
|
YOU MUST ONLY populate known entries with source entry information, never with model training.
|
|
155
155
|
YOU SHOULD manage your own context to maximize signal, as irrelevant tokens degrade reasoning.
|
package/dist/schema/Agent.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schemas.plurnk.dev/v0/Agent.json",
|
|
4
|
-
"title": "Agent",
|
|
5
|
-
"description": "Top-level singleton. Owns the default scheme registry and the active provider declaration. Sessions, runs, and below derive from their own tables (queried by FK to the singleton agent).",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["version", "provider", "scheme_registry"],
|
|
8
|
-
"additionalProperties": false,
|
|
9
|
-
"properties": {
|
|
10
|
-
"version": { "type": "integer", "minimum": 0 },
|
|
11
|
-
"provider": { "$ref": "https://schemas.plurnk.dev/v0/ProviderDeclaration.json" },
|
|
12
|
-
"scheme_registry": {
|
|
13
|
-
"type": "array",
|
|
14
|
-
"items": { "$ref": "https://schemas.plurnk.dev/v0/SchemeRegistration.json" },
|
|
15
|
-
"description": "Agent-wide default scheme registrations. The v0 inventory ships with `plurnk`, `known`, `unknown`; everything else is plugin-registered."
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
package/dist/schema/Entry.json
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schemas.plurnk.dev/v0/Entry.json",
|
|
4
|
-
"title": "Entry",
|
|
5
|
-
"description": "The unit of canonical state at agent or session scope. Pure state — no interaction forensics. Identity is `(scope, scheme, pathname)`; `session_id` discriminates session-scoped rows. Content lives in one or more named channels (e.g. `body`, `stdout`/`stderr` for exec, `body`/`headers` for https). The scheme registry declares each scheme's default channel.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": [
|
|
8
|
-
"id", "version", "scope", "session_id",
|
|
9
|
-
"scheme", "username", "password", "hostname", "port", "pathname", "params",
|
|
10
|
-
"channels",
|
|
11
|
-
"attributes", "tags"
|
|
12
|
-
],
|
|
13
|
-
"additionalProperties": false,
|
|
14
|
-
"properties": {
|
|
15
|
-
"id": { "type": "integer", "minimum": 1 },
|
|
16
|
-
"version": { "type": "integer", "minimum": 0 },
|
|
17
|
-
"scope": { "enum": ["agent", "session"] },
|
|
18
|
-
"session_id": { "type": ["integer", "null"], "minimum": 1 },
|
|
19
|
-
"scheme": { "type": ["string", "null"], "minLength": 1 },
|
|
20
|
-
"username": { "type": ["string", "null"] },
|
|
21
|
-
"password": { "type": ["string", "null"] },
|
|
22
|
-
"hostname": { "type": ["string", "null"] },
|
|
23
|
-
"port": { "type": ["integer", "null"], "minimum": 0, "maximum": 65535 },
|
|
24
|
-
"pathname": { "type": "string" },
|
|
25
|
-
"params": {
|
|
26
|
-
"oneOf": [
|
|
27
|
-
{ "$ref": "https://schemas.plurnk.dev/v0/Params.json" },
|
|
28
|
-
{ "type": "null" }
|
|
29
|
-
]
|
|
30
|
-
},
|
|
31
|
-
"channels": {
|
|
32
|
-
"type": "object",
|
|
33
|
-
"description": "Named channels on this entry. Keys are channel names (lowercase identifiers); values are ChannelContent. Must be non-empty. The scheme registry declares which channel is the default for unspecified ops.",
|
|
34
|
-
"minProperties": 1,
|
|
35
|
-
"propertyNames": { "pattern": "^[a-z][a-z0-9_-]*$" },
|
|
36
|
-
"additionalProperties": { "$ref": "https://schemas.plurnk.dev/v0/ChannelContent.json" }
|
|
37
|
-
},
|
|
38
|
-
"attributes": { "type": "object" },
|
|
39
|
-
"tags": { "type": "array", "items": { "type": "string" } }
|
|
40
|
-
},
|
|
41
|
-
"allOf": [
|
|
42
|
-
{
|
|
43
|
-
"if": { "properties": { "scope": { "const": "session" } } },
|
|
44
|
-
"then": { "properties": { "session_id": { "type": "integer" } } }
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"if": { "properties": { "scope": { "const": "agent" } } },
|
|
48
|
-
"then": { "properties": { "session_id": { "type": "null" } } }
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schemas.plurnk.dev/v0/LogEntry.json",
|
|
4
|
-
"title": "LogEntry",
|
|
5
|
-
"description": "An immutable, append-only event log row. Structured as the parsed AST of one executed plurnk statement plus turn-coordinate context plus the response. Addressable via log://<loop>/<turn>/<action>.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": [
|
|
8
|
-
"id", "version",
|
|
9
|
-
"run_id", "loop_id", "turn_id", "sequence",
|
|
10
|
-
"at", "origin",
|
|
11
|
-
"op", "suffix", "signal",
|
|
12
|
-
"scheme", "username", "password", "hostname", "port", "pathname", "params", "fragment",
|
|
13
|
-
"lineMarker",
|
|
14
|
-
"tx", "mimetype_tx",
|
|
15
|
-
"rx", "mimetype_rx", "status_rx",
|
|
16
|
-
"state", "outcome",
|
|
17
|
-
"tokens"
|
|
18
|
-
],
|
|
19
|
-
"additionalProperties": false,
|
|
20
|
-
"properties": {
|
|
21
|
-
"id": { "type": "integer", "minimum": 1 },
|
|
22
|
-
"version": { "type": "integer", "minimum": 0 },
|
|
23
|
-
"run_id": { "type": "integer", "minimum": 1 },
|
|
24
|
-
"loop_id": { "type": "integer", "minimum": 1 },
|
|
25
|
-
"turn_id": { "type": "integer", "minimum": 1 },
|
|
26
|
-
"sequence": { "type": "integer", "minimum": 1, "description": "1-based within the turn; resets at each new turn." },
|
|
27
|
-
"at": { "type": "string", "format": "date-time" },
|
|
28
|
-
"origin": { "enum": ["model", "client", "system", "plugin"] },
|
|
29
|
-
"op": { "enum": ["FIND", "READ", "EDIT", "COPY", "MOVE", "OPEN", "FOLD", "SEND", "EXEC", "KILL", "PLAN"] },
|
|
30
|
-
"suffix": { "type": "string" },
|
|
31
|
-
"signal": {
|
|
32
|
-
"oneOf": [
|
|
33
|
-
{ "type": "array", "items": { "type": "string" } },
|
|
34
|
-
{ "type": "number" },
|
|
35
|
-
{ "type": "string" },
|
|
36
|
-
{ "type": "null" }
|
|
37
|
-
]
|
|
38
|
-
},
|
|
39
|
-
"scheme": { "type": ["string", "null"], "minLength": 1 },
|
|
40
|
-
"username": { "type": ["string", "null"] },
|
|
41
|
-
"password": { "type": ["string", "null"] },
|
|
42
|
-
"hostname": { "type": ["string", "null"] },
|
|
43
|
-
"port": { "type": ["integer", "null"], "minimum": 0, "maximum": 65535 },
|
|
44
|
-
"pathname": { "type": ["string", "null"] },
|
|
45
|
-
"params": {
|
|
46
|
-
"oneOf": [
|
|
47
|
-
{ "$ref": "https://schemas.plurnk.dev/v0/Params.json" },
|
|
48
|
-
{ "type": "null" }
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
"fragment": {
|
|
52
|
-
"type": ["string", "null"],
|
|
53
|
-
"description": "Channel selector at request time. Names the channel the op targeted; null when the op used the scheme's default channel."
|
|
54
|
-
},
|
|
55
|
-
"lineMarker": {
|
|
56
|
-
"oneOf": [
|
|
57
|
-
{ "$ref": "https://schemas.plurnk.dev/v0/LineMarker.json" },
|
|
58
|
-
{ "type": "null" }
|
|
59
|
-
]
|
|
60
|
-
},
|
|
61
|
-
"tx": { "type": "string", "description": "Raw request payload. For origin=model: the literal plurnk DSL substring of assistant.content. For origin=system/client/plugin: whatever the originator emitted, with `mimetype_tx` declaring the structure." },
|
|
62
|
-
"mimetype_tx": { "type": "string", "minLength": 1, "description": "Mimetype of `tx`. Typically `text/vnd.plurnk` for model-origin rows; arbitrary per-origin for system/client/plugin." },
|
|
63
|
-
"rx": { "type": "string", "description": "Raw response payload bytes/string." },
|
|
64
|
-
"mimetype_rx": { "type": "string", "minLength": 1 },
|
|
65
|
-
"status_rx": { "type": "integer", "minimum": 100, "maximum": 599 },
|
|
66
|
-
"state": {
|
|
67
|
-
"enum": ["proposed", "resolved", "failed", "cancelled"],
|
|
68
|
-
"description": "Lifecycle position; orthogonal to status_rx. status_rx is the HTTP-aligned outcome of the network call; state is where the entry sits in the proposal lifecycle. Side-effecting ops that route through a proposal flow transition proposed → {resolved | failed | cancelled}; non-proposing ops settle at 'resolved' on first write."
|
|
69
|
-
},
|
|
70
|
-
"outcome": {
|
|
71
|
-
"type": ["string", "null"],
|
|
72
|
-
"description": "Short reason string when state ∈ {failed, cancelled}; null otherwise. Common values: rejected, loop_aborted, timeout, policy_veto, apply_failed, write_failed. Open vocabulary — schemes mint their own as needed."
|
|
73
|
-
},
|
|
74
|
-
"tokens": { "type": "integer", "minimum": 0 }
|
|
75
|
-
},
|
|
76
|
-
"allOf": [
|
|
77
|
-
{
|
|
78
|
-
"if": { "properties": { "op": { "const": "SEND" } } },
|
|
79
|
-
"then": {
|
|
80
|
-
"properties": {
|
|
81
|
-
"signal": { "type": ["number", "null"] },
|
|
82
|
-
"lineMarker": { "type": "null" }
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"if": { "properties": { "op": { "const": "EXEC" } } },
|
|
88
|
-
"then": {
|
|
89
|
-
"properties": {
|
|
90
|
-
"signal": { "type": ["string", "null"] },
|
|
91
|
-
"lineMarker": { "type": "null" }
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"if": { "properties": { "op": { "const": "KILL" } } },
|
|
97
|
-
"then": {
|
|
98
|
-
"properties": {
|
|
99
|
-
"signal": { "type": ["number", "null"] },
|
|
100
|
-
"lineMarker": { "type": "null" }
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"if": { "properties": { "op": { "enum": ["FIND", "READ", "EDIT", "COPY", "MOVE", "OPEN", "FOLD", "PLAN"] } } },
|
|
106
|
-
"then": {
|
|
107
|
-
"properties": {
|
|
108
|
-
"signal": {
|
|
109
|
-
"oneOf": [
|
|
110
|
-
{ "type": "array", "items": { "type": "string" } },
|
|
111
|
-
{ "type": "null" }
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
]
|
|
118
|
-
}
|
package/dist/schema/Loop.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schemas.plurnk.dev/v0/Loop.json",
|
|
4
|
-
"title": "Loop",
|
|
5
|
-
"description": "An iteration within a run. The persisted status domain is a superset of the model-emittable terminals (the model emits 102/200/202/499; the engine also imposes 413/429/500/508 via direct write, and 100 marks a created-but-unstarted loop). The loop's prompt is replayed on every turn within it; turn.packet.user.prompt is a copy.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["id", "version", "run_id", "sequence", "status", "prompt"],
|
|
8
|
-
"additionalProperties": false,
|
|
9
|
-
"properties": {
|
|
10
|
-
"id": { "type": "integer", "minimum": 1 },
|
|
11
|
-
"version": { "type": "integer", "minimum": 0 },
|
|
12
|
-
"run_id": { "type": "integer", "minimum": 1 },
|
|
13
|
-
"sequence": { "type": "integer", "minimum": 1, "description": "1-based within the run." },
|
|
14
|
-
"status": {
|
|
15
|
-
"enum": [100, 102, 200, 413, 429, 499, 500, 508],
|
|
16
|
-
"description": "Persisted loop status. Model-emittable: 100 = created (not yet started); 102 = continuing; 200 = terminal success; 499 = terminal give-up/cancellation. Engine-imposed (never a model SEND): 413 = budget overflow; 429 = max turns; 500 = failed (strike-out); 508 = loop detected (cycle)."
|
|
17
|
-
},
|
|
18
|
-
"prompt": { "type": "string", "description": "The original user prompt for this loop, replayed on every turn." }
|
|
19
|
-
}
|
|
20
|
-
}
|
package/dist/schema/Packet.json
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schemas.plurnk.dev/v0/Packet.json",
|
|
4
|
-
"title": "Packet",
|
|
5
|
-
"description": "One turn's full exchange with the provider: { system, user, assistant, assistantRaw }. system aggregates durable + accumulating context (definition, persona, in-scope log rows). user carries the per-turn ephemera. assistant is the provider-normalized output. assistantRaw is opaque.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["tokens", "system", "user", "assistant", "assistantRaw"],
|
|
8
|
-
"additionalProperties": false,
|
|
9
|
-
"properties": {
|
|
10
|
-
"tokens": {
|
|
11
|
-
"type": "integer",
|
|
12
|
-
"minimum": 0,
|
|
13
|
-
"description": "Total packet tokens — sum of section subtotals."
|
|
14
|
-
},
|
|
15
|
-
"system": {
|
|
16
|
-
"type": "object",
|
|
17
|
-
"required": ["tokens", "system_definition", "persona", "log"],
|
|
18
|
-
"additionalProperties": false,
|
|
19
|
-
"properties": {
|
|
20
|
-
"tokens": { "type": "integer", "minimum": 0 },
|
|
21
|
-
"system_definition": { "type": "string", "description": "text/markdown — plurnk grammar + scheme registry refs." },
|
|
22
|
-
"persona": { "type": "string", "description": "text/markdown — identity / mission." },
|
|
23
|
-
"log": {
|
|
24
|
-
"type": "array",
|
|
25
|
-
"items": { "$ref": "https://schemas.plurnk.dev/v0/LogEntry.json" }
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"user": {
|
|
30
|
-
"type": "object",
|
|
31
|
-
"required": ["tokens", "prompt", "telemetry", "system_requirements"],
|
|
32
|
-
"additionalProperties": false,
|
|
33
|
-
"properties": {
|
|
34
|
-
"tokens": { "type": "integer", "minimum": 0 },
|
|
35
|
-
"prompt": { "type": "string", "description": "Copy of loop.prompt — never null on a continuation turn." },
|
|
36
|
-
"telemetry": {
|
|
37
|
-
"type": "object",
|
|
38
|
-
"description": "Per-turn instrumentation surfaced to the model. `budget` is renderer-provided markdown describing remaining context / cost / etc. `events` carries the cross-ecosystem error/telemetry stream (parser errors, scheme dispatch failures, engine rail signals, provider faults) — consumers route on each event's `source` + `kind` discriminator.",
|
|
39
|
-
"required": ["budget", "events"],
|
|
40
|
-
"additionalProperties": false,
|
|
41
|
-
"properties": {
|
|
42
|
-
"budget": { "type": "string", "description": "text/markdown — budget surface (token/cost/etc. left to spend). Empty string when nothing to surface." },
|
|
43
|
-
"events": {
|
|
44
|
-
"type": "array",
|
|
45
|
-
"items": { "$ref": "https://schemas.plurnk.dev/v0/TelemetryEvent.json" },
|
|
46
|
-
"description": "TelemetryEvent[]. Empty array when nothing to surface."
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"system_requirements": { "type": "string", "description": "text/markdown — per-turn rules." }
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"assistant": {
|
|
54
|
-
"type": "object",
|
|
55
|
-
"required": ["content", "ops", "reasoning"],
|
|
56
|
-
"additionalProperties": true,
|
|
57
|
-
"properties": {
|
|
58
|
-
"content": { "type": "string", "description": "Raw DSL string emitted by the model." },
|
|
59
|
-
"ops": {
|
|
60
|
-
"type": "array",
|
|
61
|
-
"items": { "$ref": "https://schemas.plurnk.dev/v0/PlurnkStatement.json" },
|
|
62
|
-
"description": "Parsed PlurnkStatement[] derived from `content`."
|
|
63
|
-
},
|
|
64
|
-
"reasoning": {
|
|
65
|
-
"type": ["string", "null"],
|
|
66
|
-
"description": "text/plain — provider-exposed CoT when present, null otherwise."
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
"assistantRaw": true
|
|
71
|
-
}
|
|
72
|
-
}
|
package/dist/schema/Run.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schemas.plurnk.dev/v0/Run.json",
|
|
4
|
-
"title": "Run",
|
|
5
|
-
"description": "A stretch of work within a session. Forkable via parent_run_id. Owns per-run logs.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["id", "version", "session_id", "name", "created_at", "parent_run_id", "cost_pico"],
|
|
8
|
-
"additionalProperties": false,
|
|
9
|
-
"properties": {
|
|
10
|
-
"id": { "type": "integer", "minimum": 1 },
|
|
11
|
-
"version": { "type": "integer", "minimum": 0 },
|
|
12
|
-
"session_id": { "type": "integer", "minimum": 1 },
|
|
13
|
-
"name": {
|
|
14
|
-
"type": "string",
|
|
15
|
-
"minLength": 1,
|
|
16
|
-
"description": "Unique within the session. Auto-populated default form `run-{unixtime}` until renamed. Clients display this; cross-table references use `id` so renames don't cascade-break."
|
|
17
|
-
},
|
|
18
|
-
"created_at": { "type": "string", "format": "date-time" },
|
|
19
|
-
"parent_run_id": {
|
|
20
|
-
"type": ["integer", "null"],
|
|
21
|
-
"minimum": 1,
|
|
22
|
-
"description": "FK to parent run when this is a fork; null for the trunk run."
|
|
23
|
-
},
|
|
24
|
-
"cost_pico": { "type": "integer", "minimum": 0, "description": "Cumulative cost across this run's turns, in pico-units of the active provider's currency." }
|
|
25
|
-
}
|
|
26
|
-
}
|
package/dist/schema/Session.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schemas.plurnk.dev/v0/Session.json",
|
|
4
|
-
"title": "Session",
|
|
5
|
-
"description": "A durable user-named workspace. Never ends except by explicit removal. Shares session-scoped entries and any scheme-registry additions across all its runs.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["id", "version", "name", "created_at", "cost_pico", "scheme_registry_additions"],
|
|
8
|
-
"additionalProperties": false,
|
|
9
|
-
"properties": {
|
|
10
|
-
"id": { "type": "integer", "minimum": 1 },
|
|
11
|
-
"version": { "type": "integer", "minimum": 0 },
|
|
12
|
-
"name": { "type": "string", "minLength": 1, "description": "Unique within the agent. Auto-populated default form `session-{unixtime}` until renamed. Clients display this; cross-table references use `id` so renames don't cascade-break." },
|
|
13
|
-
"created_at": { "type": "string", "format": "date-time" },
|
|
14
|
-
"cost_pico": { "type": "integer", "minimum": 0, "description": "Cumulative cost across this session's runs." },
|
|
15
|
-
"scheme_registry_additions": {
|
|
16
|
-
"type": "array",
|
|
17
|
-
"items": { "$ref": "https://schemas.plurnk.dev/v0/SchemeRegistration.json" }
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
package/dist/schema/Turn.json
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schemas.plurnk.dev/v0/Turn.json",
|
|
4
|
-
"title": "Turn",
|
|
5
|
-
"description": "The leaf of the envelope hierarchy. One model-provider exchange. Persists the full packet plus provider-returned usage and the turn-level status.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["id", "version", "loop_id", "sequence", "timestamp", "status", "usage", "finish_reason", "model", "packet"],
|
|
8
|
-
"additionalProperties": false,
|
|
9
|
-
"properties": {
|
|
10
|
-
"id": { "type": "integer", "minimum": 1 },
|
|
11
|
-
"version": { "type": "integer", "minimum": 0 },
|
|
12
|
-
"loop_id": { "type": "integer", "minimum": 1 },
|
|
13
|
-
"sequence": { "type": "integer", "minimum": 1, "description": "1-based within the loop; resets at each new loop." },
|
|
14
|
-
"timestamp": { "type": "string", "format": "date-time" },
|
|
15
|
-
"status": { "type": "integer", "minimum": 100, "maximum": 599 },
|
|
16
|
-
"usage": {
|
|
17
|
-
"type": "object",
|
|
18
|
-
"description": "Provider-returned token counts and computed cost.",
|
|
19
|
-
"required": ["prompt", "completion", "cached", "cost_pico"],
|
|
20
|
-
"additionalProperties": false,
|
|
21
|
-
"properties": {
|
|
22
|
-
"prompt": { "type": "integer", "minimum": 0 },
|
|
23
|
-
"completion": { "type": "integer", "minimum": 0 },
|
|
24
|
-
"cached": { "type": "integer", "minimum": 0 },
|
|
25
|
-
"cost_pico": { "type": "integer", "minimum": 0, "description": "Per-turn cost in pico-units of the active provider's currency." }
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"finish_reason": {
|
|
29
|
-
"type": ["string", "null"],
|
|
30
|
-
"description": "Provider-reported completion-state token (`stop` | `length` | `tool_calls` | `content_filter` | provider-specific). Null when not reported. Distinct from `status` (HTTP-aligned turn outcome); `finish_reason` describes how the model stopped, `status` describes how the turn resolved."
|
|
31
|
-
},
|
|
32
|
-
"model": {
|
|
33
|
-
"type": "string",
|
|
34
|
-
"minLength": 1,
|
|
35
|
-
"description": "Wire-reported model identifier. May differ from `agent.provider.model` for routing-relay providers (OpenRouter, etc.); the verification surface for served-vs-requested alignment."
|
|
36
|
-
},
|
|
37
|
-
"packet": { "$ref": "https://schemas.plurnk.dev/v0/Packet.json" }
|
|
38
|
-
}
|
|
39
|
-
}
|