@plurnk/plurnk-contracts 3.2.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/.env.defaults +17 -0
  2. package/README.md +3 -1
  3. package/SPEC.md +71 -51
  4. package/dist/conformance/agui-v1.json +308 -183
  5. package/dist/schema/A2aAgentDefinition.json +42 -10
  6. package/dist/schema/AguiDiscovery.json +1 -1
  7. package/dist/schema/FunctionalityMutationResult.json +9 -2
  8. package/dist/schema/ProposalProjection.json +90 -14
  9. package/dist/schema/RollbackReport.json +53 -0
  10. package/dist/src/Application.d.ts +253 -0
  11. package/dist/src/Application.d.ts.map +1 -0
  12. package/dist/src/Application.js +2 -0
  13. package/dist/src/Application.js.map +1 -0
  14. package/dist/src/ApplicationPort.d.ts +73 -147
  15. package/dist/src/ApplicationPort.d.ts.map +1 -1
  16. package/dist/src/Functionality.d.ts +3 -2
  17. package/dist/src/Functionality.d.ts.map +1 -1
  18. package/dist/src/HttpOrigin.d.ts +16 -0
  19. package/dist/src/HttpOrigin.d.ts.map +1 -0
  20. package/dist/src/HttpOrigin.js +15 -0
  21. package/dist/src/HttpOrigin.js.map +1 -0
  22. package/dist/src/Validator.d.ts +5 -2
  23. package/dist/src/Validator.d.ts.map +1 -1
  24. package/dist/src/Validator.js +14 -14
  25. package/dist/src/Validator.js.map +1 -1
  26. package/dist/src/index.d.ts +4 -2
  27. package/dist/src/index.d.ts.map +1 -1
  28. package/dist/src/index.js +2 -1
  29. package/dist/src/index.js.map +1 -1
  30. package/dist/src/types.d.ts +11 -7
  31. package/dist/src/types.d.ts.map +1 -1
  32. package/dist/src/types.generated.d.ts +88 -25
  33. package/dist/src/types.generated.d.ts.map +1 -1
  34. package/dist/src/types.js.map +1 -1
  35. package/package.json +7 -3
  36. package/plurnk.md +21 -26
  37. package/dist/schema/ClientStatement.json +0 -104
package/plurnk.md CHANGED
@@ -1,13 +1,7 @@
1
1
  # Plurnk Operation Protocol
2
2
 
3
3
  > [!IMPORTANT]
4
- > YOU MUST ONLY emit fenced operations; with the parameters, pattern, and terse aside on the fenced Operation line.
5
-
6
- > [!IMPORTANT]
7
- > YOU MUST record at least one NOTE along with other operations.
8
-
9
- > [!TIP]
10
- > All operations (except NOTE) are converted into log items.
4
+ > YOU MUST ONLY emit fenced operations; with the parameters, pattern, and terse aside on the fenced operation line.
11
5
 
12
6
  ## Syntax
13
7
 
@@ -17,7 +11,7 @@ body?
17
11
 
18
12
  ## Core Operations
19
13
 
20
- * NOTE: Persistent Detailed Internal Register. Emit NOTE for every summary, finding, decision, and plan (and why).
14
+ * NOTE: Internal Working Memory Register recording **every** plan, finding, decision, and next action.
21
15
  * FIND: List matching paths, or the match locations inside one path.
22
16
  * READ: Read files, entries, streams, or only the lines a pattern selects.
23
17
  * EDIT: Create a file or entry; replace existing text by scope or by pattern.
@@ -26,40 +20,40 @@ body?
26
20
  * KILL: Delete an entry, stop a process, or retire log items.
27
21
  * WORK: Delegate to a child worker (fresh log).
28
22
  * FORK: Delegate to a child worker (copied log).
29
- * WAIT: Yield to child workers and streams (not the user). You may include `[60]` to check in after 60 seconds.
23
+ * WAIT: Yield to child workers or streams. You may include `[60]` to check in after 60 seconds. Not for awaiting user input.
30
24
  * SEND: Message endpoints, workers, or Open Messages (when the path is omitted, the oldest Open Message).
31
25
 
32
26
  ## Loop Protocol
33
27
 
34
- ```NOTE <!-- summary -->
35
- Configuration exampleLoader.py load-order bug identified; fix and regression test pending.
28
+ > [!TIP]
29
+ > YOU SHOULD record every plan, finding, decision, and next action in detailed NOTEs to avoid permanent loss of information.
30
+
31
+ ```NOTE <!-- plan -->
32
+ the steps ahead and why
36
33
  ```
37
34
 
38
35
  ```NOTE <!-- finding -->
39
- exampleLoader.py:58 reads the config before exampleInit() sets its path, so every test sees the defaults.
36
+ a finding and its evidence
40
37
  ```
41
38
 
42
39
  ```NOTE <!-- decision -->
43
- Move configuration reading in exampleLoader.py into exampleInit() so it uses the initialized path. Plugin dependence on the old order is still unverified.
40
+ a decision and its reasons
44
41
  ```
45
42
 
46
- ```NOTE <!-- plan -->
47
- Edit exampleLoader.py, then rerun exampleTest.py.
43
+ ```NOTE <!-- next -->
44
+ the next action and what it needs
48
45
  ```
49
46
 
50
47
  ```SEND
51
- This is an example of a continuing progress update response.
48
+ a continuing progress update response
52
49
  ```
53
50
 
54
51
  ```SEND [200]
55
- This is an example of a final deliverable response.
52
+ a final deliverable response
56
53
  ```
57
54
 
58
- > [!TIP]
59
- > YOU SHOULD include the Open Message's (path) to complete `[200]` or cancel `[499]` specific Open Messages.
60
-
61
55
  > [!CAUTION]
62
- > The loop continues until every Open Message has a `[200]` or `[499]` reply, operation results have been observed, and work held by the loop has settled.
56
+ > The loop continues until all Open Messages receive a `[200]` or `[499]` response and all Open Work is completed.
63
57
 
64
58
  ## Delegation (worker:///_plurnk/plurnk/delegation.md)
65
59
 
@@ -89,6 +83,10 @@ Describe the child's complete task in the body.
89
83
  ```COPY (sh:///ab3d5678) (build.log) <!-- the command's output lands in a file, never in your context -->
90
84
  ```
91
85
 
86
+ ```members (add) <!-- adding membership tracking for files outside of the project folder -->
87
+ {"files": ["../exampleSisterProject/*.md", "../exampleSisterProject/example.json"]}
88
+ ```
89
+
92
90
  * `(path)` may be a glob/extglob, permitting bulk operations.
93
91
  * Log item paths nest: `log:///1/2/3/READ` is loop/turn/item/OP.
94
92
  * FIND results hold one inner array per path: its channels, default first; append `#channel` to the path to select another: `(sh:///ab3d5678#stderr)`.
@@ -147,14 +145,11 @@ Nesting can be resolved with increased outer fences.
147
145
 
148
146
  ## Context Curation
149
147
 
150
- > [!WARNING]
151
- > YOU MUST NOT exceed budget.
152
-
153
- ```READ (largeExampleFile.txt) <101,200> <!-- READing in chunks to not exceed budget -->
148
+ ```READ (largeExampleFile.txt) <101,200> <!-- READing in chunks if budget constrained -->
154
149
  ```
155
150
 
156
151
  ```KILL (log:///1/[1-7]/*/{READ,emission}) <!-- old results and your own old programs, in bulk; the body survives as a NOTE -->
157
- exampleModule.py: exampleFunction() returns 42 on empty input (lines 12–40); both callers in exampleTest.py expect it.
152
+ example distillation or summarization
158
153
  ```
159
154
 
160
155
  ## Environment (worker:///_plurnk/plurnk/env.md)
@@ -1,104 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://schemas.plurnk.xyz/v0/ClientStatement.json",
4
- "title": "ClientStatement",
5
- "description": "The client-tier AST returned by PlurnkParser.parseClient: the closed protocol PlurnkStatement union plus the read-shaped LOOK utility statement.",
6
- "oneOf": [
7
- {
8
- "$ref": "https://schemas.plurnk.xyz/v0/PlurnkStatement.json"
9
- },
10
- {
11
- "$ref": "#/$defs/LookStatement"
12
- }
13
- ],
14
- "$defs": {
15
- "AsideOrNull": {
16
- "type": [
17
- "string",
18
- "null"
19
- ]
20
- },
21
- "SchemeMetadataOrNull": {
22
- "oneOf": [
23
- {
24
- "type": "array",
25
- "items": {
26
- "type": "string"
27
- }
28
- },
29
- {
30
- "type": "null"
31
- }
32
- ]
33
- },
34
- "PathOrNull": {
35
- "oneOf": [
36
- {
37
- "$ref": "https://schemas.plurnk.xyz/v0/ParsedPath.json"
38
- },
39
- {
40
- "type": "null"
41
- }
42
- ]
43
- },
44
- "TextLineMarkerOrNull": {
45
- "oneOf": [
46
- {
47
- "$ref": "https://schemas.plurnk.xyz/v0/TextLineMarker.json"
48
- },
49
- {
50
- "type": "null"
51
- }
52
- ]
53
- },
54
- "MatcherBodyOrNull": {
55
- "oneOf": [
56
- {
57
- "$ref": "https://schemas.plurnk.xyz/v0/MatcherBody.json"
58
- },
59
- {
60
- "type": "null"
61
- }
62
- ]
63
- },
64
- "PositionRef": {
65
- "$ref": "https://schemas.plurnk.xyz/v0/Position.json"
66
- },
67
- "LookStatement": {
68
- "type": "object",
69
- "required": [
70
- "op",
71
- "aside",
72
- "metadata",
73
- "target",
74
- "lineMarker",
75
- "body",
76
- "position"
77
- ],
78
- "additionalProperties": false,
79
- "properties": {
80
- "op": {
81
- "const": "LOOK"
82
- },
83
- "aside": {
84
- "$ref": "#/$defs/AsideOrNull"
85
- },
86
- "metadata": {
87
- "$ref": "#/$defs/SchemeMetadataOrNull"
88
- },
89
- "target": {
90
- "$ref": "#/$defs/PathOrNull"
91
- },
92
- "lineMarker": {
93
- "$ref": "#/$defs/TextLineMarkerOrNull"
94
- },
95
- "body": {
96
- "$ref": "#/$defs/MatcherBodyOrNull"
97
- },
98
- "position": {
99
- "$ref": "#/$defs/PositionRef"
100
- }
101
- }
102
- }
103
- }
104
- }