@plurnk/plurnk-contracts 1.8.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 +122 -11
- package/dist/conformance/agui-v1.json +541 -0
- 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 +7 -7
- 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 +1 -1
- package/dist/schema/McpServerDefinition.json +1 -1
- package/dist/schema/McpServerOptions.json +8 -8
- package/dist/schema/ModelCatalogPage.json +2 -2
- package/dist/schema/ModelCatalogQuery.json +1 -1
- package/dist/schema/ModelReadiness.json +1 -1
- package/dist/schema/ModelRoute.json +1 -1
- 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 +9 -9
- 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 +1 -1
- 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 +2 -1
- 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 +17 -3
- package/dist/src/PlurnkErrorStrategy.js.map +1 -1
- package/dist/src/Problems.js +1 -1
- package/dist/src/Validator.d.ts +40 -1
- package/dist/src/Validator.d.ts.map +1 -1
- package/dist/src/Validator.js +236 -0
- package/dist/src/Validator.js.map +1 -1
- package/dist/src/index.d.ts +6 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/types.generated.d.ts +285 -2
- package/dist/src/types.generated.d.ts.map +1 -1
- package/package.json +6 -1
- package/plurnk.md +79 -71
package/plurnk.md
CHANGED
|
@@ -11,33 +11,33 @@ Plurnk is an agentic service that acts on and answers user prompts.
|
|
|
11
11
|
## Grammar
|
|
12
12
|
|
|
13
13
|
YOU MUST ONLY use the Plurnk OPs (PLAN|FIND|READ|EDIT|COPY|MOVE|FOLD|OPEN|EXEC|BARE|WORK|FORK|KILL|SEND).
|
|
14
|
+
YOU MUST begin the turn with PLAN, starting with `# `, as in `# PLAN0`.
|
|
15
|
+
YOU MUST end the turn with SEND[status code], starting with `## `, as in `## SEND0 [102]`.
|
|
14
16
|
|
|
15
17
|
### Syntax
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
# PLANdelimiter
|
|
20
|
+
[{"content": string, "priority"?: "high" | "medium" | "low", "status": "pending" | "in_progress" | "completed" | "memory"},
|
|
21
|
+
…]
|
|
22
|
+
## OPdelimiter [signal]? (path)? <scope>? <!-- terse annotation on same line as OP -->?
|
|
23
|
+
body?
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
OPs with a different delimiter from PLAN are
|
|
24
|
-
Each PLAN updates the running state with new or revised reasoning conclusions, learnings, open inquiries, and unresolved priorities.
|
|
25
|
-
SEND[status code] is the final OP.
|
|
25
|
+
* Every non-PLAN OP goes on a line starting with `## `, as in `## FIND0`, and shares PLAN's delimiter.
|
|
26
|
+
* OPs with a different delimiter from PLAN are rejected.
|
|
26
27
|
|
|
27
|
-
OP headings immediately follow the preceding heading or body.
|
|
28
|
-
Body content is character-perfect, including whitespace.
|
|
28
|
+
* OP headings immediately follow the preceding heading or body (blank lines between operations are fine).
|
|
29
|
+
* Body content is character-perfect, including whitespace.
|
|
29
30
|
|
|
30
31
|
### Standard Workflow
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
When completion depends on OP results, conclude in a later turn containing only `PLAN0` and `SEND0 [200]`.
|
|
33
|
+
* The results of OPs are observable after submitting a continuing (102) or waiting (202) SEND.
|
|
34
34
|
|
|
35
35
|
### OPs
|
|
36
36
|
|
|
37
37
|
| OP | purpose | `[signal]` | `(path)` | `<scope>` | `body` |
|
|
38
38
|
|------|--------------------------------|--------------|----------------------------|----------------|-----------------------------|
|
|
39
|
-
| PLAN |
|
|
40
|
-
| FIND | list matching targets | add log tags? | target or glob | result
|
|
39
|
+
| PLAN | maintain working memory | - | - | - | record of findings, state, and status |
|
|
40
|
+
| FIND | list matching targets | add log tags? | target or glob | result page? | pattern? |
|
|
41
41
|
| READ | retrieve target content | add log tags? | target | text region? | - |
|
|
42
42
|
| EDIT | create or edit scoped content | add log tags? | file or entry | text region? | literal text |
|
|
43
43
|
| COPY | copy from a target | add log tags? | source target | source region? | destination <region>? |
|
|
@@ -57,7 +57,7 @@ YOU SHOULD use purpose-built Plurnk OPs when possible; use EXEC for shell comman
|
|
|
57
57
|
|
|
58
58
|
### Pattern Filtering
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
* Pattern matchers in the OP body select resources by content:
|
|
61
61
|
|
|
62
62
|
| prefix | dialect | form | engine |
|
|
63
63
|
|--------|----------|------------------------------------|------------------|
|
|
@@ -74,24 +74,26 @@ Matcher bodies select resources by content.
|
|
|
74
74
|
* Mapping is universal: JSONPath can query XML and XPath can query JSON.
|
|
75
75
|
* Patterned FIND returns resources for broad targets and locations for exact targets.
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
77
|
+
```plurnk
|
|
78
|
+
# PLAN0
|
|
79
|
+
[{"content":"The six queries cover every matcher dialect across exact and broad targets.","status":"memory"},
|
|
80
|
+
{"content":"Determine which returned matches are relevant enough to inspect.","status":"pending"},
|
|
81
|
+
{"content":"Compare the result shapes, then read the relevant targets.","status":"in_progress"}]
|
|
82
|
+
## FIND0 (src/**/*.ts)
|
|
83
|
+
/createCoder/i
|
|
84
|
+
## FIND0 (README.md)
|
|
85
|
+
//heading[text()="Installation"]
|
|
86
|
+
## FIND0 (log:///1/2/4/FIND)
|
|
87
|
+
$[*][0].path
|
|
88
|
+
## FIND0 (worker:///**) <0.7,1,50>
|
|
89
|
+
~french revolutionary history
|
|
90
|
+
## FIND0 (src/**)
|
|
91
|
+
@<createCoder
|
|
92
|
+
## FIND0 (worker:///**)
|
|
93
|
+
*revolution*
|
|
94
|
+
## SEND0 [102]
|
|
95
|
+
Next: Compare and inspect the retrieved targets.
|
|
96
|
+
```
|
|
95
97
|
|
|
96
98
|
### `(path)`
|
|
97
99
|
|
|
@@ -114,39 +116,41 @@ Matcher bodies select resources by content.
|
|
|
114
116
|
|
|
115
117
|
### `<scope>`
|
|
116
118
|
|
|
117
|
-
Text scopes use 1-based lines and Unicode code-point columns consistently across textual mimetypes:
|
|
119
|
+
* Text scopes use 1-based lines and Unicode code-point columns consistently across textual mimetypes:
|
|
118
120
|
|
|
119
121
|
| form | endpoint rule |
|
|
120
122
|
|-----------------|--------------------------------|
|
|
121
123
|
| `<L>` | one line |
|
|
122
124
|
| `<SL,EL>` | lines SL through EL, inclusive |
|
|
123
|
-
| `<SL,SC,EL,EC>` | start included, end excluded
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
125
|
+
| `<SL,SC,EL,EC>` | start included, end excluded — `<2,1,2,5>` is columns 1-4 of line 2 |
|
|
126
|
+
|
|
127
|
+
```plurnk
|
|
128
|
+
# PLAN0
|
|
129
|
+
[{"content":"The prior READ identified obsolete line 1847 with @aB3dE; FIND reported the notes term at <2,1,2,5>; the draft heading spans lines 4-6; the audit marker belongs above line 2; the preface belongs before line 1.","status":"memory"},
|
|
130
|
+
{"content":"Insert lines by replacing the anchor line with the new content followed by the original line verbatim.","status":"completed"},
|
|
131
|
+
{"content":"Inspect the notes selection and verify the copy and move destinations.","status":"in_progress"}]
|
|
132
|
+
## EDIT0 (worker:///obsolete.md) <@aB3dE>
|
|
133
|
+
## READ0 (worker:///notes.md) <2,1,2,5>
|
|
134
|
+
## EDIT0 (worker:///heading.md) <4,6>
|
|
135
|
+
Replacement heading
|
|
136
|
+
## EDIT0 (worker:///draft.md) <2>
|
|
137
|
+
// AUDIT-OK
|
|
138
|
+
original line 2 content
|
|
139
|
+
## EDIT0 (worker:///preface.md) <0>
|
|
140
|
+
# Preface
|
|
141
|
+
Current status
|
|
142
|
+
## COPY0 (worker:///src.md) <2,3>
|
|
143
|
+
worker:///slice.md
|
|
144
|
+
## MOVE0 (worker:///draft-line.md) <1>
|
|
145
|
+
worker:///archive.md <-1>
|
|
146
|
+
## SEND0 [102]
|
|
147
|
+
Next: Inspect each result and read the changed destinations.
|
|
148
|
+
```
|
|
145
149
|
|
|
146
150
|
* Unscoped FIND returns items 1-16; unscoped READ returns lines 1–16. `<1,-1>` returns all.
|
|
147
151
|
* Rendered exact READ lines begin with a per-line `@hash` anchor and `L:` line number; neither is content.
|
|
148
152
|
|
|
149
|
-
YOU SHOULD prefer `@hash` anchors for EDIT line coordinates; they reject stale targets.
|
|
153
|
+
YOU SHOULD prefer `@hash` anchors for EDIT line coordinates; they reject stale targets. One anchor replaces one line; span multi-line targets with `<@first,@last>`.
|
|
150
154
|
|
|
151
155
|
### The Log
|
|
152
156
|
|
|
@@ -183,21 +187,25 @@ sequenceDiagram
|
|
|
183
187
|
You->>User: SEND0 [200] - The capital of France is Paris.
|
|
184
188
|
```
|
|
185
189
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
190
|
+
```plurnk
|
|
191
|
+
# PLAN0
|
|
192
|
+
[{"content":"The capital claim needs primary-source evidence before answering.","status":"memory"},
|
|
193
|
+
{"content":"capital-checker owns that lookup; await its result.","status":"in_progress"}]
|
|
194
|
+
## WORK0 (worker://capital-checker)
|
|
195
|
+
Find the capital of France from a primary source
|
|
196
|
+
## SEND0 [202]
|
|
197
|
+
Awaiting capital-checker.
|
|
198
|
+
```
|
|
193
199
|
|
|
194
|
-
The worker's result enters the log and wakes you:
|
|
200
|
+
* The worker's result enters the log and wakes you:
|
|
195
201
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
202
|
+
```plurnk
|
|
203
|
+
# PLAN0
|
|
204
|
+
[{"content":"capital-checker verified from a primary source that France's capital is Paris.","status":"memory"},
|
|
205
|
+
{"content":"Deliver the verified answer.","status":"in_progress"}]
|
|
206
|
+
## SEND0 [200]
|
|
207
|
+
The capital of France is Paris.
|
|
208
|
+
```
|
|
201
209
|
|
|
202
210
|
## Imperatives
|
|
203
211
|
|
|
@@ -207,5 +215,5 @@ The worker's result enters the log and wakes you:
|
|
|
207
215
|
|-------------|-------------------------------|---------------------------------------------|
|
|
208
216
|
| 102 | Retrieve results in next turn | Describe expected or intended next steps |
|
|
209
217
|
| 202 | Wait for workers or streams | Describe expected or intended next steps |
|
|
210
|
-
| 200 | Successful conclusion |
|
|
218
|
+
| 200 | Successful conclusion | User-facing response to the Active User Prompt |
|
|
211
219
|
| 499 | Abort and fail prompt | Describe error or issue |
|