@plurnk/plurnk-contracts 6.0.0 → 7.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 (97) hide show
  1. package/.env.defaults +5 -5
  2. package/README.md +4 -4
  3. package/SPEC.md +158 -2054
  4. package/dist/schema/{AguiDiscovery.json → AcpDiscovery.json} +4 -4
  5. package/dist/schema/ApplicationOperationEvent.json +2 -2
  6. package/dist/schema/CapabilityDescriptor.json +3 -3
  7. package/dist/schema/CapabilityPolicy.json +5 -1
  8. package/dist/schema/CapabilitySelector.json +3 -3
  9. package/dist/schema/ClientInteractionProjection.json +2 -2
  10. package/dist/schema/ClientInteractionRequest.json +26 -10
  11. package/dist/schema/ClientInteractionResolution.json +14 -6
  12. package/dist/schema/FunctionalityDefinitionState.json +3 -3
  13. package/dist/schema/FunctionalityDiscoverQuery.json +2 -1
  14. package/dist/schema/FunctionalityMutationResult.json +1 -1
  15. package/dist/schema/MatcherBody.json +2 -2
  16. package/dist/schema/McpServerDefinition.json +35 -9
  17. package/dist/schema/ModelCatalogPage.json +1 -1
  18. package/dist/schema/ModelRoute.json +2 -2
  19. package/dist/schema/Notice.json +1 -1
  20. package/dist/schema/PlurnkStatement.json +8 -8
  21. package/dist/schema/ProposalDisposition.json +1 -1
  22. package/dist/schema/ProposalPolicy.json +1 -1
  23. package/dist/schema/ProposalProjection.json +57 -6
  24. package/dist/schema/ResourceSelection.json +1 -1
  25. package/dist/schema/RollbackReport.json +1 -1
  26. package/dist/schema/{WorkerOwner.json → SessionOwner.json} +2 -2
  27. package/dist/schema/SkillDefinition.json +8 -7
  28. package/dist/src/Application.d.ts +97 -66
  29. package/dist/src/Application.d.ts.map +1 -1
  30. package/dist/src/Application.js +198 -1
  31. package/dist/src/Application.js.map +1 -1
  32. package/dist/src/ApplicationNotifications.d.ts +52 -0
  33. package/dist/src/ApplicationNotifications.d.ts.map +1 -0
  34. package/dist/src/ApplicationNotifications.js +2 -0
  35. package/dist/src/ApplicationNotifications.js.map +1 -0
  36. package/dist/src/ApplicationPort.d.ts +84 -75
  37. package/dist/src/ApplicationPort.d.ts.map +1 -1
  38. package/dist/src/ApplicationStream.d.ts +4 -4
  39. package/dist/src/ApplicationStream.d.ts.map +1 -1
  40. package/dist/src/CapabilityAdmission.d.ts +2 -0
  41. package/dist/src/CapabilityAdmission.d.ts.map +1 -1
  42. package/dist/src/CapabilityAdmission.js +14 -2
  43. package/dist/src/CapabilityAdmission.js.map +1 -1
  44. package/dist/src/Excerpt.js +1 -1
  45. package/dist/src/Excerpt.js.map +1 -1
  46. package/dist/src/Functionality.d.ts +3 -6
  47. package/dist/src/Functionality.d.ts.map +1 -1
  48. package/dist/src/HttpOrigin.d.ts +3 -3
  49. package/dist/src/HttpOrigin.js +1 -1
  50. package/dist/src/JsonDocument.js +1 -1
  51. package/dist/src/JsonDocument.js.map +1 -1
  52. package/dist/src/JsonResult.js +1 -1
  53. package/dist/src/JsonResult.js.map +1 -1
  54. package/dist/src/LogRow.d.ts +31 -0
  55. package/dist/src/LogRow.d.ts.map +1 -0
  56. package/dist/src/LogRow.js +46 -0
  57. package/dist/src/LogRow.js.map +1 -0
  58. package/dist/src/LoopLifecycle.d.ts +1 -1
  59. package/dist/src/LoopLifecycle.d.ts.map +1 -1
  60. package/dist/src/LoopLifecycle.js +2 -2
  61. package/dist/src/LoopLifecycle.js.map +1 -1
  62. package/dist/src/MessageResource.d.ts +4 -4
  63. package/dist/src/MessageResource.d.ts.map +1 -1
  64. package/dist/src/PathSyntax.js +2 -2
  65. package/dist/src/PathSyntax.js.map +1 -1
  66. package/dist/src/PlurnkParseError.js +1 -1
  67. package/dist/src/PlurnkParseError.js.map +1 -1
  68. package/dist/src/Problems.js +1 -1
  69. package/dist/src/Problems.js.map +1 -1
  70. package/dist/src/TurnDisposition.js +1 -1
  71. package/dist/src/TurnDisposition.js.map +1 -1
  72. package/dist/src/Validator.d.ts +5 -108
  73. package/dist/src/Validator.d.ts.map +1 -1
  74. package/dist/src/Validator.js +97 -518
  75. package/dist/src/Validator.js.map +1 -1
  76. package/dist/src/guards.js +1 -1
  77. package/dist/src/guards.js.map +1 -1
  78. package/dist/src/index.d.ts +6 -5
  79. package/dist/src/index.d.ts.map +1 -1
  80. package/dist/src/index.js +7 -5
  81. package/dist/src/index.js.map +1 -1
  82. package/dist/src/types.d.ts +1 -1
  83. package/dist/src/types.d.ts.map +1 -1
  84. package/dist/src/types.generated.d.ts +91 -187
  85. package/dist/src/types.generated.d.ts.map +1 -1
  86. package/dist/src/types.js +7 -7
  87. package/dist/src/types.js.map +1 -1
  88. package/package.json +5 -9
  89. package/plurnk.md +22 -22
  90. package/dist/conformance/agui-v1.json +0 -716
  91. package/dist/schema/A2aAgentDefinition.json +0 -76
  92. package/dist/schema/AguiClientConformance.json +0 -74
  93. package/dist/schema/AguiConformanceKit.json +0 -111
  94. package/dist/src/AguiConformance.d.ts +0 -11
  95. package/dist/src/AguiConformance.d.ts.map +0 -1
  96. package/dist/src/AguiConformance.js +0 -16
  97. package/dist/src/AguiConformance.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-contracts",
3
- "version": "6.0.0",
3
+ "version": "7.0.0",
4
4
  "description": "Canonical PLURNK language contract, schemas, generated types, and runtime-neutral wire contracts",
5
5
  "keywords": [
6
6
  "plurnk",
@@ -37,9 +37,6 @@
37
37
  "./package.json": "./package.json",
38
38
  "./schema/*.json": {
39
39
  "default": "./dist/schema/*.json"
40
- },
41
- "./conformance/*.json": {
42
- "default": "./dist/conformance/*.json"
43
40
  }
44
41
  },
45
42
  "files": [
@@ -56,21 +53,20 @@
56
53
  "build:schemas": "node --conditions=plurnk-dev scriptify/copy-schemas.ts",
57
54
  "build": "npm run build:clean && npm run build:types && npm run build:dist && npm run build:schemas",
58
55
  "test:lint": "tsc --noEmit && tsc --noEmit -p tsconfig.browser.json",
59
- "test:unit": "node --conditions=plurnk-dev --env-file=.env.defaults --test ${PLURNK_TEST_CONCURRENCY:+--test-concurrency=$PLURNK_TEST_CONCURRENCY} src/*.test.ts test/unit/*.test.ts",
60
- "test:intg": "node --conditions=plurnk-dev --env-file=.env.defaults --test ${PLURNK_TEST_CONCURRENCY:+--test-concurrency=$PLURNK_TEST_CONCURRENCY} test/integration/*.test.ts",
56
+ "test:unit": "node --conditions=plurnk-dev --env-file=.env.defaults --experimental-test-coverage --test-coverage-include-all '--test-coverage-include=src/**' --test ${PLURNK_TEST_CONCURRENCY:+--test-concurrency=$PLURNK_TEST_CONCURRENCY} src/*.test.ts test/unit/*.test.ts",
57
+ "test:intg": "node --conditions=plurnk-dev --env-file=.env.defaults --experimental-test-coverage --test-coverage-include-all '--test-coverage-include=src/**' --test ${PLURNK_TEST_CONCURRENCY:+--test-concurrency=$PLURNK_TEST_CONCURRENCY} test/integration/*.test.ts",
61
58
  "test:installation": "node --conditions=plurnk-dev scriptify/smoke-test.ts",
62
- "conformance:report": "node --conditions=plurnk-dev scriptify/agui-conformance-report.ts",
63
59
  "test": "npm run test:lint && npm run test:unit && npm run test:intg",
64
60
  "release:check": "npm run test:installation",
65
61
  "prepublishOnly": "npm audit && npm run build && npm test && npm run test:installation",
66
62
  "prepack": "npm run build"
67
63
  },
68
64
  "dependencies": {
69
- "@cfworker/json-schema": "^4.1.1",
65
+ "@cfworker/json-schema": "^4.1.4",
70
66
  "jsonc-parser": "^3.3.1"
71
67
  },
72
68
  "devDependencies": {
73
69
  "json-schema-to-typescript": "^16.0.0"
74
70
  },
75
- "gitHead": "d2647f7ec0d352b276714f22a93267aac04634b3"
71
+ "gitHead": "db65532b51408a2014f7ff53a288d834ff6694f2"
76
72
  }
package/plurnk.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Plurnk Operation Protocol
2
2
 
3
3
  > [!IMPORTANT]
4
- > YOU MUST ONLY emit fenced operation batches; with the parameters, pattern, and terse aside on the fenced operation line.
4
+ > YOU MUST ONLY emit fenced operation batches, with the parameters, pattern, and terse aside on the fenced operation line.
5
5
 
6
6
  ## Syntax
7
7
 
@@ -18,13 +18,13 @@ body?
18
18
  * FIND: List matching paths, or the match locations inside one path.
19
19
  * READ: Read files, entries, streams, or only the lines a pattern selects.
20
20
  * EDIT: Create a file or entry; replace existing text by scope or by pattern.
21
- * COPY: Copy files, entries, streams, or text regions.
22
- * MOVE: Move files, entries, streams, or text regions.
21
+ * COPY (source) <scope>? (destination) <scope>?: Copy files, entries, streams, or text regions (no body).
22
+ * MOVE (source) <scope>? (destination) <scope>?: Move files, entries, streams, or text regions (no body).
23
23
  * KILL: Delete an entry, stop a process, or retire log items.
24
- * WORK: Delegate to a child worker (fresh log).
25
- * FORK: Delegate to a child worker (copied log).
26
- * WAIT: Yield to child workers or streams. You may include `[60]` to check in after 60 seconds. Not for awaiting user input.
27
- * SEND: Message endpoints, workers, or Open Messages (when the path is omitted, the oldest Open Message).
24
+ * WORK: Delegate to a child session (fresh log).
25
+ * FORK: Delegate to a child session (copied log).
26
+ * WAIT: Yield to child sessions or streams. You may include `[60]` to check in after 60 seconds.
27
+ * SEND: Message endpoints, sessions, or Open Messages (when the path is omitted, the oldest Open Message).
28
28
 
29
29
  ## Loop Protocol
30
30
 
@@ -57,13 +57,13 @@ a final deliverable response
57
57
  > [!TIP]
58
58
  > YOU SHOULD NOT deliberate while discovering. Submit necessary NOTE, FIND and READ operations, then deliberate on the next turn.
59
59
 
60
- ## Delegation (worker:///_plurnk/plurnk/delegation.md)
60
+ ## Delegation (plurnk:///delegation.md)
61
61
 
62
- ```WORK (worker://exampleWorkerName) <!-- the child's result lands in your log -->
62
+ ```WORK (session://exampleSessionName) <!-- the child's result lands in your log -->
63
63
  Describe the child's complete task in the body.
64
64
  ```
65
65
 
66
- ## `pattern` (worker:///_plurnk/plurnk/pattern.md)
66
+ ## `pattern` (plurnk:///pattern.md)
67
67
 
68
68
  | prefix | dialect | example |
69
69
  |--------|-----------------------------|---------------------------------|
@@ -82,7 +82,7 @@ Describe the child's complete task in the body.
82
82
  ## `<scope|range>`
83
83
 
84
84
  > [!TIP]
85
- > Text scopes use 1-based lines and Unicode code-point columns across textual mimetypes:
85
+ > Text scopes use 1-based lines and Unicode code-point columns across textual mimetypes.
86
86
 
87
87
  | form | endpoint rule |
88
88
  |-----------------|--------------------------------|
@@ -108,19 +108,19 @@ Describe the child's complete task in the body.
108
108
  * FIND results hold one inner array per path: its channels, default first; append `#channel` to the path to select another: `(sh:///ab3d5678#stderr)`.
109
109
  * Percent-encode in paths `(` as `%28` and `)` as `%29`.
110
110
 
111
- ## Membership (worker:///_plurnk/plurnk/members.md)
111
+ ## Membership (mcp:///plurnk_members.md)
112
112
 
113
- ```members (add) <!-- adding membership tracking for files outside of the project folder -->
113
+ ```plurnk_members (add) <!-- adding membership tracking for files outside of the project folder -->
114
114
  {"files": ["../exampleSisterProject/*.md", "../exampleSisterProject/example.json"]}
115
115
  ```
116
116
 
117
117
  ## Editing
118
118
 
119
- ```EDIT (example.md) <@abcde> <!-- READ showed 42<@abcde>foo; the body replaces line 42 -->
119
+ ```EDIT (example.md) <@abcde> <!-- READ showed 42<@abcde>foo bar baz; the body replaces line 42 -->
120
120
  bar
121
121
  ```
122
122
 
123
- ```EDIT (example.md) <@abcde,@fghij> <!-- the body replaces lines 42 through 44 -->
123
+ ```EDIT (example.md) <@abcde,@fghij> <!-- the body replaces lines 42 through 43 -->
124
124
  bar
125
125
  ```
126
126
 
@@ -151,16 +151,16 @@ bar
151
151
  ```READ (largeExampleFile.txt) <101,200> <!-- READing in chunks if budget constrained -->
152
152
  ```
153
153
 
154
- ```KILL (log:///1/[1-7]/*/{READ,emission}) <!-- old results and your own old programs, in bulk; the body survives as a NOTE -->
155
- example distillation or summarization
154
+ ```KILL (log:///1/[1-7]/*/{READ,emission,reasoning}) <!-- old results, programs, and reasoning, in bulk; the body survives as a NOTE -->
155
+ optional distillation or summarization
156
156
  ```
157
157
 
158
- ## Environment (worker:///_plurnk/plurnk/env.md)
158
+ ## Environment (mcp:///plurnk_env.md)
159
159
 
160
- ```env (add) <!-- persists for this worker's commands -->
161
- {"alias":"PLANET","definition":{"value":"world"}}
160
+ ```plurnk_env (add) <!-- persists for this session's commands -->
161
+ {"alias":"PLANET","value":"world"}
162
162
  ```
163
163
 
164
- ```sh [{"env":{"GREETING":"Hello"}}]
165
- echo "$GREETING, $PLANET."
164
+ ```sh
165
+ echo "Hello, $PLANET."
166
166
  ```