@plurnk/plurnk-contracts 6.0.1 → 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 +16 -16
  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
@@ -1,76 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://schemas.plurnk.xyz/v0/A2aAgentDefinition.json",
4
- "title": "A2aAgentDefinition",
5
- "description": "One outbound A2A agent as the Worker Functionality coordinator persists it: the local alias, the remote base URL whose standard Agent Card is authoritative, and optional local connection facts. Secrets stay symbolic environment references.",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "required": ["name", "url"],
9
- "properties": {
10
- "name": {
11
- "description": "The local alias: the `a2a://<name>` authority.",
12
- "type": "string",
13
- "pattern": "^[a-z][a-z0-9-]*$"
14
- },
15
- "url": {
16
- "description": "The remote agent's absolute HTTP(S) base URL; its Agent Card is discovered at the standard well-known path unless `cardPath` names another.",
17
- "type": "string",
18
- "pattern": "^https?://"
19
- },
20
- "cardPath": {
21
- "description": "An absolute URL pathname replacing the standard Agent Card path.",
22
- "type": "string",
23
- "pattern": "^/[^?#]*$"
24
- },
25
- "headers": {
26
- "description": "Extra request headers; values may be symbolic `${NAME}` environment references.",
27
- "type": "object",
28
- "additionalProperties": { "type": "string" }
29
- },
30
- "authorization": {
31
- "description": "How the daemon authenticates to the agent: a fixed bearer, or OAuth 2.0 client credentials obtained from the agent's declared token endpoint.",
32
- "oneOf": [
33
- {
34
- "type": "object",
35
- "additionalProperties": false,
36
- "required": ["type", "token"],
37
- "properties": {
38
- "type": { "const": "bearer" },
39
- "token": {
40
- "description": "A symbolic `${NAME}` environment reference; the secret is never persisted.",
41
- "type": "string",
42
- "pattern": "^\\$\\{[A-Za-z_][A-Za-z0-9_]*\\}$"
43
- }
44
- }
45
- },
46
- {
47
- "type": "object",
48
- "additionalProperties": false,
49
- "required": ["type", "clientId", "clientSecret"],
50
- "properties": {
51
- "type": { "const": "oauth2" },
52
- "clientId": {
53
- "description": "The client id the agent's authorization server knows this daemon by.",
54
- "type": "string",
55
- "minLength": 1
56
- },
57
- "clientSecret": {
58
- "description": "A symbolic `${NAME}` environment reference to the client secret; the secret is never persisted.",
59
- "type": "string",
60
- "pattern": "^\\$\\{[A-Za-z_][A-Za-z0-9_]*\\}$"
61
- },
62
- "tokenUrl": {
63
- "description": "The token endpoint; omitted, the Agent Card's clientCredentials flow names it.",
64
- "type": "string",
65
- "pattern": "^https?://"
66
- },
67
- "scope": {
68
- "description": "The scope to request, space-separated; omitted, every scope the card's flow offers.",
69
- "type": "string"
70
- }
71
- }
72
- }
73
- ]
74
- }
75
- }
76
- }
@@ -1,74 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://schemas.plurnk.xyz/v0/AguiClientConformance.json",
4
- "title": "AguiClientConformance",
5
- "description": "One client's exhaustive, evidence-bearing disposition for an installed AG-UI discovery surface.",
6
- "type": "object",
7
- "required": ["schemaVersion", "client", "actions", "notifications"],
8
- "additionalProperties": false,
9
- "properties": {
10
- "schemaVersion": { "const": 1 },
11
- "client": { "type": "string", "minLength": 1 },
12
- "actions": {
13
- "type": "object",
14
- "propertyNames": { "type": "string", "minLength": 1 },
15
- "additionalProperties": { "$ref": "#/$defs/disposition" }
16
- },
17
- "notifications": {
18
- "type": "object",
19
- "propertyNames": { "type": "string", "minLength": 1 },
20
- "additionalProperties": { "$ref": "#/$defs/disposition" }
21
- }
22
- },
23
- "$defs": {
24
- "evidence": {
25
- "type": "array",
26
- "minItems": 1,
27
- "uniqueItems": true,
28
- "items": { "type": "string", "minLength": 1 }
29
- },
30
- "dimensions": {
31
- "type": "array",
32
- "minItems": 1,
33
- "uniqueItems": true,
34
- "items": {
35
- "enum": [
36
- "admission",
37
- "projection",
38
- "framing",
39
- "success",
40
- "failure",
41
- "lifecycle",
42
- "durability",
43
- "composition",
44
- "presentation"
45
- ]
46
- }
47
- },
48
- "disposition": {
49
- "oneOf": [
50
- {
51
- "type": "object",
52
- "required": ["posture", "dimensions", "evidence"],
53
- "additionalProperties": false,
54
- "properties": {
55
- "posture": { "enum": ["native", "generic"] },
56
- "dimensions": { "$ref": "#/$defs/dimensions" },
57
- "evidence": { "$ref": "#/$defs/evidence" }
58
- }
59
- },
60
- {
61
- "type": "object",
62
- "required": ["posture", "reason", "dimensions", "evidence"],
63
- "additionalProperties": false,
64
- "properties": {
65
- "posture": { "const": "unsupported" },
66
- "reason": { "type": "string", "minLength": 1 },
67
- "dimensions": { "$ref": "#/$defs/dimensions" },
68
- "evidence": { "$ref": "#/$defs/evidence" }
69
- }
70
- }
71
- ]
72
- }
73
- }
74
- }
@@ -1,111 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://schemas.plurnk.xyz/v0/AguiConformanceKit.json",
4
- "title": "AguiConformanceKit",
5
- "description": "Language-neutral raw SSE and AG-UI lifecycle specimens consumed by every Plurnk client.",
6
- "type": "object",
7
- "required": ["schemaVersion", "transport", "lifecycles"],
8
- "additionalProperties": false,
9
- "properties": {
10
- "schemaVersion": { "const": 1 },
11
- "transport": {
12
- "type": "array",
13
- "minItems": 1,
14
- "items": { "$ref": "#/$defs/transportSpecimen" }
15
- },
16
- "lifecycles": {
17
- "type": "array",
18
- "minItems": 1,
19
- "items": { "$ref": "#/$defs/lifecycleSpecimen" }
20
- }
21
- },
22
- "$defs": {
23
- "name": {
24
- "type": "string",
25
- "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
26
- },
27
- "event": {
28
- "type": "object",
29
- "required": ["type"],
30
- "properties": { "type": { "type": "string", "minLength": 1 } },
31
- "additionalProperties": true
32
- },
33
- "transportSpecimen": {
34
- "type": "object",
35
- "required": ["name", "chunks", "eof", "expect"],
36
- "additionalProperties": false,
37
- "properties": {
38
- "name": { "$ref": "#/$defs/name" },
39
- "chunks": {
40
- "type": "array",
41
- "minItems": 1,
42
- "items": { "type": "string", "minLength": 1 }
43
- },
44
- "eof": { "type": "boolean" },
45
- "expect": {
46
- "oneOf": [
47
- {
48
- "type": "object",
49
- "required": ["events"],
50
- "additionalProperties": false,
51
- "properties": {
52
- "events": {
53
- "type": "array",
54
- "items": { "$ref": "#/$defs/event" }
55
- }
56
- }
57
- },
58
- {
59
- "type": "object",
60
- "required": ["error"],
61
- "additionalProperties": false,
62
- "properties": {
63
- "error": { "enum": ["invalid-json"] }
64
- }
65
- }
66
- ]
67
- }
68
- }
69
- },
70
- "actionExpectation": {
71
- "type": "object",
72
- "required": ["kind", "ok"],
73
- "additionalProperties": false,
74
- "properties": {
75
- "kind": { "type": "string", "minLength": 1 },
76
- "ok": { "type": "boolean" },
77
- "status": { "type": "integer", "minimum": 100, "maximum": 599 }
78
- }
79
- },
80
- "lifecycleExpectation": {
81
- "type": "object",
82
- "required": ["completion", "families"],
83
- "additionalProperties": false,
84
- "properties": {
85
- "completion": { "enum": ["success", "interrupt", "error", "dead-stream"] },
86
- "families": {
87
- "type": "array",
88
- "uniqueItems": true,
89
- "items": { "type": "string", "minLength": 1 }
90
- },
91
- "status": { "type": "integer", "minimum": 100, "maximum": 599 },
92
- "interrupt": { "enum": ["proposal", "interaction"] },
93
- "action": { "$ref": "#/$defs/actionExpectation" }
94
- }
95
- },
96
- "lifecycleSpecimen": {
97
- "type": "object",
98
- "required": ["name", "events", "expect"],
99
- "additionalProperties": false,
100
- "properties": {
101
- "name": { "$ref": "#/$defs/name" },
102
- "events": {
103
- "type": "array",
104
- "minItems": 1,
105
- "items": { "$ref": "#/$defs/event" }
106
- },
107
- "expect": { "$ref": "#/$defs/lifecycleExpectation" }
108
- }
109
- }
110
- }
111
- }
@@ -1,11 +0,0 @@
1
- import type { Dimensions } from "./types.generated.ts";
2
- export interface AguiConformanceRow {
3
- readonly kind: "action" | "notification";
4
- readonly name: string;
5
- readonly posture: "native" | "generic" | "unsupported";
6
- readonly dimensions: Dimensions;
7
- readonly evidence: readonly string[];
8
- readonly reason?: string;
9
- }
10
- export declare const aguiConformanceReport: (discoveryValue: unknown, conformanceValue: unknown) => AguiConformanceRow[];
11
- //# sourceMappingURL=AguiConformance.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AguiConformance.d.ts","sourceRoot":"","sources":["../../src/AguiConformance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,cAAc,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,QAAQ,GAAG,SAAS,GAAG,aAAa,CAAC;IACvD,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,qBAAqB,mBACd,OAAO,oBACL,OAAO,KAC1B,kBAAkB,EAmBpB,CAAC"}
@@ -1,16 +0,0 @@
1
- import Validator from "./Validator.js";
2
- export const aguiConformanceReport = (discoveryValue, conformanceValue) => {
3
- const conformance = Validator.assertAguiClientConformance(discoveryValue, conformanceValue);
4
- const rows = (kind, label) => Object.entries(conformance[kind])
5
- .toSorted(([left], [right]) => left.localeCompare(right))
6
- .map(([name, disposition]) => ({
7
- kind: label,
8
- name,
9
- posture: disposition.posture,
10
- dimensions: disposition.dimensions,
11
- evidence: disposition.evidence,
12
- ...(disposition.posture === "unsupported" ? { reason: disposition.reason } : {}),
13
- }));
14
- return [...rows("actions", "action"), ...rows("notifications", "notification")];
15
- };
16
- //# sourceMappingURL=AguiConformance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AguiConformance.js","sourceRoot":"","sources":["../../src/AguiConformance.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAYvC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACjC,cAAuB,EACvB,gBAAyB,EACL,EAAE;IACtB,MAAM,WAAW,GAAG,SAAS,CAAC,2BAA2B,CACrD,cAAc,EACd,gBAAgB,CACnB,CAAC;IACF,MAAM,IAAI,GAAG,CACT,IAAiC,EACjC,KAAiC,EACb,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SACvD,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SACxD,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC;QAC3B,IAAI,EAAE,KAAK;QACX,IAAI;QACJ,OAAO,EAAE,WAAW,CAAC,OAAO;QAC5B,UAAU,EAAE,WAAW,CAAC,UAAU;QAClC,QAAQ,EAAE,WAAW,CAAC,QAAQ;QAC9B,GAAG,CAAC,WAAW,CAAC,OAAO,KAAK,aAAa,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACnF,CAAC,CAAC,CAAC;IACR,OAAO,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,GAAG,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC,CAAC;AACpF,CAAC,CAAC"}