@plurnk/plurnk-contracts 1.23.0 → 1.25.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 CHANGED
@@ -17,10 +17,10 @@ runtime-neutral wire envelopes; `@plurnk/plurnk-parser` implements the language
17
17
  | Client-owned interaction contract | `ClientInteractionRequest`, `ClientInteractionProjection`, `ClientInteractionResolution` |
18
18
  | Client capability presentation | `ClientDisplayCapabilities` |
19
19
  | Exterior adapter application calls | `ApplicationPort` |
20
- | Workspace MCP configuration | `McpServerDefinition`, `McpServerOptions`, `McpConfigurationOverlay` |
20
+ | Workspace MCP configuration | `McpServerDefinition`, `McpOAuth` |
21
21
  | Worker Agent Skills definition | `SkillDefinition` |
22
22
  | Worker outbound A2A agent definition | `A2aAgentDefinition` |
23
- | Worker Functionality lifecycle projections (family-neutral) | `FunctionalityCandidate`, `FunctionalityDiscoverQuery`, `FunctionalityDiscoverResult`, `FunctionalityDefinitionState`, `FunctionalityListResult`, `FunctionalityMutationResult` |
23
+ | Worker Functionality lifecycle projections (family-neutral) | `FunctionalityProvenance`, `FunctionalityCandidate`, `FunctionalityDiscoverQuery`, `FunctionalityDiscoverResult`, `FunctionalityDefinitionState`, `FunctionalityListResult`, `FunctionalityMutationResult` |
24
24
  | AG-UI discovery, client accounting, and shared conformance specimens | `AguiDiscovery`, `AguiClientConformance`, `AguiConformanceKit` |
25
25
  | JSON Schemas | `@plurnk/plurnk-contracts/schema/*.json` |
26
26
  | Generated JSON result rendering | `renderJsonResult` |
@@ -178,7 +178,7 @@ vocabulary of `proposals`. Capability admission precedes effect
178
178
  classification and proposal settlement.
179
179
 
180
180
  §effort-wire `Effort` is exactly `off | adaptive | low |
181
- medium | high`. The schema owns this shared wire vocabulary. Providers own the
181
+ medium | high | xhigh | max`. The schema owns this shared wire vocabulary. Providers own the
182
182
  supported subset and native projection for a selected route; core owns the
183
183
  durable worker value.
184
184
 
@@ -964,8 +964,9 @@ Mutation semantics:
964
964
  | KILL | Status of deletion or termination |
965
965
  | NOTE / WAIT | Literal memory or wait explanation |
966
966
 
967
- §find-result-unit For FIND, authored target shape fixes the paginated result
968
- unit. An exact target with a matcher pages flat match locations; a glob or
967
+ §find-result-unit For FIND, target selection fixes the paginated result
968
+ unit after scheme address resolution ({§entry-address-resolution}). An exact
969
+ resource target with a matcher pages flat match locations; a glob or
969
970
  folder target, and every matcher-less FIND, pages resources. Resolving a glob to
970
971
  one resource does not make it exact. The same `<N>`, inclusive `<N,M>`,
971
972
  configured markerless first page ({§markerless-first-page}), and explicit-all
@@ -1185,11 +1186,11 @@ operation receives empty-turn recovery, not successful completion ({§empty-turn
1185
1186
 
1186
1187
  | Intent | Nominal status | Meaning |
1187
1188
  |---|---|---|
1188
- | Unanswered messages or unobserved results | 102 | Continue silently |
1189
+ | Unobserved messages or results | 102 | Continue silently |
1189
1190
  | No authored response operations or fresh operation/parser failure, without WAIT | 102 | Recover before automatic parking |
1190
1191
  | WAIT | 202 | Park when a live obligation exists; otherwise continue at 102 |
1191
1192
  | Eligible parameterless KILL ({§kill-conclusion}), live work remains, no fresh failure | 202 | Join the held work without delivering its body |
1192
- | Eligible parameterless KILL, results observed, no held work, messages answered or answered by its body | 200 | Deliver the answer and conclude under {§kill-conclusion}; an empty KILL need not repeat a delivered response |
1193
+ | Eligible parameterless KILL, messages and results observed, no held work | 200 | Conclude under {§kill-conclusion}; deliver a nonempty body, or finish silently without inventing or repeating a reply |
1193
1194
  | Other admitted program | 102 | Continue regardless of earlier replies or live work |
1194
1195
  | KILL own worker | 499 | Cancel unfinished work in that worker and its descendants |
1195
1196
  | Runtime or infrastructure failure | 5xx | Not a model-authored task status |
@@ -1553,42 +1554,29 @@ model-language syntax or model packet teaching.
1553
1554
 
1554
1555
  ### §mcp-server-definition 13.8 MCP server definitions
1555
1556
 
1556
- `McpServerDefinition` is the transport-neutral normalized definition of one
1557
- workspace MCP server. It is a closed `stdio`/`http` union. The schema
1558
- owns transport-specific fields, enabled/read tool sets, supported HTTP
1559
- authorization choices, and symbolic credential references; it carries no
1560
- workspace identifier, connection state, discovered catalog, or secret value.
1561
- `Validator.assertMcpServerDefinition` is the MCP host's admission boundary
1562
- before persistence or connection work.
1563
-
1564
- §mcp-server-options `McpServerOptions` is the closed client/daemon-shared
1565
- supplement accepted when adding an MCP server by alias and target. It reuses
1566
- only `McpServerDefinition` option fields and cannot repeat identity, target, or
1567
- transport. The target determines the transport; normalization through
1568
- `McpServerDefinition` rejects options belonging to the other transport.
1569
-
1570
- Interactive OAuth always requires a callback URL. Its structurally exclusive
1571
- identity modes are an HTTPS Client ID Metadata Document URL, a pre-registered
1572
- client ID plus symbolic secret, or neither for server-advertised Dynamic Client
1573
- Registration fallback. A definition cannot combine those identity modes.
1574
-
1575
- §mcp-configuration-overlay `McpConfigurationOverlay` is the bounded raw
1576
- configuration projection a client may carry to MCP list and enable actions: its
1577
- string-valued `PLURNK_MCP_*` variables, whole. Which of those names are the
1578
- host's own controls is the host's fact alone — its parser skips every control
1579
- it owns, so a carried timeout or enabled list has no effect and no client or
1580
- contract restates that vocabulary.
1581
- The client does not interpret this map. The MCP host composes it over the
1582
- lower normalized definition through the same parser that admits service
1583
- environment declarations, then validates the resulting
1584
- `McpServerDefinition`. Carrying the overlay does not connect, persist, or
1585
- expand credentials by itself.
1557
+ `McpServerDefinition` is the one definition the workspace `mcp` Functionality family
1558
+ accepts and persists: one complete connection definition with its alias `name`.
1559
+ It is a closed union of the two supported transports, `stdio`
1560
+ (`command`, optional `args`, `env`, `cwd`) and `streamable-http` (`url`, optional
1561
+ `headers` and `authorization`). Source provenance, workspace scope, connection
1562
+ state, catalog and resolved credentials are not definition fields. Adding or
1563
+ removing a definition does not install or remove a plugin. Transport and
1564
+ authentication fields replace together ({§configuration-definition-resolution}).
1565
+
1566
+ §mcp-oauth `McpOAuth` is the client-managed OAuth plurnk holds for one Streamable
1567
+ HTTP server, included in that server's `authorization`. Interactive OAuth always requires a callback URL, and
1568
+ its structurally exclusive identity modes are an HTTPS Client ID Metadata Document URL,
1569
+ a pre-registered client ID with a symbolic secret, or neither for server-advertised
1570
+ Dynamic Client Registration. A client-credentials grant names its client ID and
1571
+ symbolic secret, optionally binding an issuer. Every secret is one complete `${NAME}`
1572
+ reference to the operator environment; `Validator.assertMcpOAuth` validates the shape.
1586
1573
 
1587
1574
  `SkillDefinition` is the one definition the workspace `skills` Functionality
1588
- family accepts and persists: the standard `name`, source `scope`, and optional
1589
- installer `source`. `Validator.assertSkillDefinition` validates the wire shape;
1575
+ family accepts and persists: the standard `name`, its `source`, an optional git
1576
+ `ref`, and the `commit` the service recorded. Only host-provided trees omit
1577
+ `source`; installation scopes are not part of this shape. `Validator.assertSkillDefinition` validates the wire shape;
1590
1578
  the schema's name grammar is exposed as `SKILL_NAME` for loaders and discovery
1591
- ({§agent-skills-name}). Core owns installation truth and lifecycle
1579
+ ({§agent-skills-name}). Core owns source resolution and lifecycle
1592
1580
  ({§skills-functionality}).
1593
1581
 
1594
1582
  `A2aAgentDefinition` is the one definition the Worker `a2a` Functionality
@@ -1609,6 +1597,11 @@ An exterior adapter owns its own protocol validation, identity binding, and
1609
1597
  projection while reusing the same workspace, worker, loop, operation, proposal,
1610
1598
  interaction, and event owners through this port.
1611
1599
 
1600
+ `configurationNotices` exposes current launcher-owned configuration diagnostics
1601
+ without acquiring a workspace or provider. Adapters use the existing Notice
1602
+ projection; model turns combine these with workspace diagnostics according to
1603
+ {§configuration-repair-path}.
1604
+
1612
1605
  `runLoop.source` is trusted causal provenance supplied by an adapter, distinct
1613
1606
  from user-authored prompt content. An adapter may expose no public means to set
1614
1607
  it; Core validates and records it through the same prompt admission path.
@@ -70,6 +70,7 @@
70
70
  "model": null,
71
71
  "loopId": null,
72
72
  "packetCount": 0,
73
+ "preparation": [],
73
74
  "activity": null
74
75
  }
75
76
  },
@@ -79,6 +80,15 @@
79
80
  {
80
81
  "type": "STATE_DELTA",
81
82
  "delta": [
83
+ { "op": "replace", "path": "/plurnk/status/preparation", "value": [
84
+ { "family": "mcp", "alias": "search", "phase": "preparing", "since": "2026-09-29T00:00:00.000Z" }
85
+ ] }
86
+ ]
87
+ },
88
+ {
89
+ "type": "STATE_DELTA",
90
+ "delta": [
91
+ { "op": "replace", "path": "/plurnk/status/preparation", "value": [] },
82
92
  { "op": "replace", "path": "/plurnk/status/lifecycle", "value": "running" },
83
93
  { "op": "replace", "path": "/plurnk/status/loopId", "value": 1 },
84
94
  { "op": "replace", "path": "/plurnk/status/packetCount", "value": 1 }
@@ -134,7 +144,7 @@
134
144
  ],
135
145
  "expect": {
136
146
  "completion": "success",
137
- "families": ["log/entry", "loop/packet", "loop/terminated"],
147
+ "families": ["log/entry", "loop/packet", "loop/terminated", "workspace/preparation"],
138
148
  "status": 200
139
149
  }
140
150
  },
@@ -19,15 +19,6 @@
19
19
  "description": "The exact family definition, conforming to the family's definition schema.",
20
20
  "type": "object"
21
21
  },
22
- "provenance": {
23
- "type": "object",
24
- "additionalProperties": false,
25
- "required": ["kind", "source"],
26
- "properties": {
27
- "kind": { "type": "string", "minLength": 1 },
28
- "source": { "type": "string", "minLength": 1 },
29
- "reference": { "type": "string", "minLength": 1 }
30
- }
31
- }
22
+ "provenance": { "$ref": "https://schemas.plurnk.xyz/v0/FunctionalityProvenance.json" }
32
23
  }
33
24
  }
@@ -13,10 +13,14 @@
13
13
  "enum": ["service", "workspace", "worker"]
14
14
  },
15
15
  "state": {
16
- "description": "disabled: available, model-invisible. active: enabled and prepared. unavailable: enabled but preparation has an exact Problem. authorization-required: enabled and awaiting a protocol continuation.",
17
- "enum": ["disabled", "active", "unavailable", "authorization-required"]
16
+ "description": "disabled: available, model-invisible. dormant: enabled without a resident publication. active: enabled and prepared. unavailable: enabled but preparation has an exact Problem. authorization-required: enabled and awaiting a protocol continuation.",
17
+ "enum": ["disabled", "dormant", "active", "unavailable", "authorization-required"]
18
18
  },
19
19
  "definition": { "type": "object" },
20
+ "provenance": {
21
+ "description": "The winning configuration input, when supplied by a source reader. Independent of origin and readiness; absent for locally owned definitions or host-provided resources without a configuration input.",
22
+ "$ref": "https://schemas.plurnk.xyz/v0/FunctionalityProvenance.json"
23
+ },
20
24
  "inherited": {
21
25
  "description": "The Worker this entry was copied from when this Worker was created (WORK or FORK), preserved across generations until this Worker changes the entry. Absent for an entry this Worker set itself. Worker-scoped families only.",
22
26
  "type": "string",
@@ -9,7 +9,7 @@
9
9
  "query": { "type": "string", "minLength": 1 },
10
10
  "source": { "type": "string", "minLength": 1 },
11
11
  "configuration": {
12
- "description": "Caller-supplied configuration material the family interprets as candidates (a client's own PLURNK_MCP_* environment, a local directory list). It contributes candidates with client-configuration provenance; it never becomes durable authority.",
12
+ "description": "Caller-supplied configuration material the family interprets as candidates (a client's own PLURNK_A2A_* environment, a local directory list). It contributes candidates with client-configuration provenance; it never becomes durable authority.",
13
13
  "type": "object"
14
14
  }
15
15
  }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.plurnk.xyz/v0/FunctionalityPreparationActivity.json",
4
+ "title": "FunctionalityPreparationActivity",
5
+ "description": "Current workspace capability preparation, not a published outcome. No definitions or credentials.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["family", "alias", "phase", "since"],
9
+ "properties": {
10
+ "family": { "type": "string", "minLength": 1 },
11
+ "alias": { "type": ["string", "null"], "minLength": 1 },
12
+ "phase": { "enum": ["preparing", "publishing"] },
13
+ "since": { "type": "string", "format": "date-time" }
14
+ }
15
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.plurnk.xyz/v0/FunctionalityProvenance.json",
4
+ "title": "FunctionalityProvenance",
5
+ "description": "The input supplying a definition or discovery candidate, separate from ownership, preparation and authority.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["kind", "source"],
9
+ "properties": {
10
+ "kind": { "type": "string", "minLength": 1 },
11
+ "source": { "type": "string", "minLength": 1 },
12
+ "reference": { "type": "string", "minLength": 1 }
13
+ }
14
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.plurnk.xyz/v0/McpOAuth.json",
4
+ "title": "McpOAuth",
5
+ "description": "OAuth configuration within one Streamable HTTP MCP server definition. Every secret is a ${NAME} reference to the operator environment.",
6
+ "oneOf": [
7
+ {
8
+ "type": "object",
9
+ "description": "Interactive OAuth identified by an HTTPS Client ID Metadata Document.",
10
+ "additionalProperties": false,
11
+ "required": ["type", "redirectUrl", "clientMetadataUrl"],
12
+ "properties": {
13
+ "type": { "const": "oauth" },
14
+ "redirectUrl": { "type": "string", "format": "uri" },
15
+ "clientMetadataUrl": { "type": "string", "format": "uri", "pattern": "^https://.+/.+" },
16
+ "scope": { "type": "string", "minLength": 1 }
17
+ }
18
+ },
19
+ {
20
+ "type": "object",
21
+ "description": "Interactive OAuth with a pre-registered client ID and secret.",
22
+ "additionalProperties": false,
23
+ "required": ["type", "redirectUrl", "clientId", "clientSecret"],
24
+ "properties": {
25
+ "type": { "const": "oauth" },
26
+ "redirectUrl": { "type": "string", "format": "uri" },
27
+ "clientId": { "type": "string", "minLength": 1 },
28
+ "clientSecret": { "$ref": "#/$defs/environmentReference" },
29
+ "scope": { "type": "string", "minLength": 1 }
30
+ }
31
+ },
32
+ {
33
+ "type": "object",
34
+ "description": "Interactive OAuth through server-advertised Dynamic Client Registration.",
35
+ "additionalProperties": false,
36
+ "required": ["type", "redirectUrl"],
37
+ "properties": {
38
+ "type": { "const": "oauth" },
39
+ "redirectUrl": { "type": "string", "format": "uri" },
40
+ "scope": { "type": "string", "minLength": 1 }
41
+ }
42
+ },
43
+ {
44
+ "type": "object",
45
+ "description": "A noninteractive client-credentials grant; issuer optionally binds the credentials to one authorization server.",
46
+ "additionalProperties": false,
47
+ "required": ["type", "clientId", "clientSecret"],
48
+ "properties": {
49
+ "type": { "const": "client-credentials" },
50
+ "clientId": { "type": "string", "minLength": 1 },
51
+ "clientSecret": { "$ref": "#/$defs/environmentReference" },
52
+ "scope": { "type": "string", "minLength": 1 },
53
+ "issuer": { "type": "string", "minLength": 1 }
54
+ }
55
+ }
56
+ ],
57
+ "$defs": {
58
+ "environmentReference": {
59
+ "description": "An operator environment variable reference such as ${GITEA_TOKEN}, never a literal secret.",
60
+ "type": "string",
61
+ "pattern": "^\\$\\{[A-Za-z_][A-Za-z0-9_]*\\}$"
62
+ }
63
+ }
64
+ }
@@ -2,171 +2,120 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schemas.plurnk.xyz/v0/McpServerDefinition.json",
4
4
  "title": "McpServerDefinition",
5
- "type": "object",
6
- "additionalProperties": false,
7
- "required": ["name", "transport"],
8
- "properties": {
5
+ "description": "One complete MCP connection definition. Configuration sources supply it; workspace management persists it without installing a plugin.",
6
+ "oneOf": [
7
+ {
8
+ "$ref": "#/$defs/stdio"
9
+ },
10
+ {
11
+ "$ref": "#/$defs/streamableHttp"
12
+ }
13
+ ],
14
+ "$defs": {
9
15
  "name": {
10
- "description": "Server alias: the runtime tag whose fence invokes it, and its resource scheme.",
16
+ "title": "McpServerName",
17
+ "description": "The server's alias: the runtime tag whose fence invokes it and its resource scheme.",
11
18
  "type": "string",
12
19
  "pattern": "^[a-z][a-z0-9-]*$"
13
20
  },
14
- "transport": {
15
- "description": "stdio launches a local command; http connects to a remote MCP endpoint.",
16
- "enum": ["stdio", "http"]
17
- },
18
- "command": {
19
- "description": "Executable to launch for stdio; arguments belong in args.",
20
- "type": "string",
21
- "minLength": 1
22
- },
23
- "args": {
24
- "description": "Arguments passed to the stdio executable in order.",
25
- "type": "array",
26
- "items": { "type": "string" }
27
- },
28
- "cwd": {
29
- "description": "Working directory for the stdio process.",
30
- "type": "string",
31
- "minLength": 1
32
- },
33
- "env": {
34
- "description": "Environment overrides for the stdio process; values may reference ${ENV_NAME}.",
21
+ "stdio": {
22
+ "title": "McpStdioServerDefinition",
35
23
  "type": "object",
36
- "additionalProperties": { "type": "string" }
37
- },
38
- "url": {
39
- "description": "HTTP MCP endpoint URL.",
40
- "type": "string",
41
- "format": "uri",
42
- "pattern": "^https?://"
43
- },
44
- "headers": {
45
- "description": "HTTP request headers; values may reference ${ENV_NAME}. Authorization cannot also be configured here when authorization is set.",
46
- "type": "object",
47
- "additionalProperties": { "type": "string" }
48
- },
49
- "authorization": {
50
- "description": "HTTP authentication. Secret fields reference the operator environment rather than embedding credentials.",
51
- "oneOf": [
52
- {
53
- "type": "object",
54
- "description": "Use a bearer token from the operator environment.",
55
- "additionalProperties": false,
56
- "required": ["type", "token"],
57
- "properties": {
58
- "type": { "const": "bearer" },
59
- "token": { "$ref": "#/$defs/environmentReference" }
60
- }
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "name",
27
+ "type",
28
+ "command"
29
+ ],
30
+ "properties": {
31
+ "name": {
32
+ "$ref": "#/$defs/name"
61
33
  },
62
- {
63
- "type": "object",
64
- "description": "Interactive OAuth using an HTTPS Client ID Metadata Document.",
65
- "additionalProperties": false,
66
- "required": ["type", "redirectUrl", "clientMetadataUrl"],
67
- "properties": {
68
- "type": { "const": "oauth" },
69
- "redirectUrl": { "type": "string", "format": "uri" },
70
- "clientMetadataUrl": {
71
- "type": "string",
72
- "format": "uri",
73
- "pattern": "^https://.+/.+"
74
- },
75
- "scope": { "type": "string", "minLength": 1 }
76
- }
34
+ "type": {
35
+ "description": "A local server: a subprocess speaking MCP over its standard input and output.",
36
+ "const": "stdio"
77
37
  },
78
- {
79
- "type": "object",
80
- "description": "Interactive OAuth using a pre-registered client ID and secret.",
81
- "additionalProperties": false,
82
- "required": ["type", "redirectUrl", "clientId", "clientSecret"],
83
- "properties": {
84
- "type": { "const": "oauth" },
85
- "redirectUrl": { "type": "string", "format": "uri" },
86
- "clientId": { "type": "string", "minLength": 1 },
87
- "clientSecret": { "$ref": "#/$defs/environmentReference" },
88
- "scope": { "type": "string", "minLength": 1 }
89
- }
38
+ "command": {
39
+ "description": "An executable name or path, without a shell. Relative paths resolve against the working directory.",
40
+ "type": "string",
41
+ "minLength": 1
90
42
  },
91
- {
92
- "type": "object",
93
- "description": "Interactive OAuth using dynamic client registration.",
94
- "additionalProperties": false,
95
- "required": ["type", "redirectUrl"],
96
- "properties": {
97
- "type": { "const": "oauth" },
98
- "redirectUrl": { "type": "string", "format": "uri" },
99
- "scope": { "type": "string", "minLength": 1 }
43
+ "args": {
44
+ "description": "Exact arguments; ${NAME} environment references expand once.",
45
+ "type": "array",
46
+ "items": {
47
+ "type": "string"
100
48
  }
101
49
  },
102
- {
50
+ "env": {
51
+ "description": "Process environment additions; ${NAME} references resolve against the workspace-composed operator environment.",
103
52
  "type": "object",
104
- "description": "Noninteractive OAuth client-credentials grant; issuer optionally binds the credentials to an authorization server.",
105
- "additionalProperties": false,
106
- "required": ["type", "clientId", "clientSecret"],
107
- "properties": {
108
- "type": { "const": "client-credentials" },
109
- "clientId": { "type": "string", "minLength": 1 },
110
- "clientSecret": { "$ref": "#/$defs/environmentReference" },
111
- "scope": { "type": "string", "minLength": 1 },
112
- "issuer": { "type": "string", "minLength": 1 }
53
+ "additionalProperties": {
54
+ "type": "string"
113
55
  }
114
- }
115
- ]
116
- },
117
- "tools": {
118
- "description": "Exact enabled tool names; omitted enables all tools, an empty array enables none.",
119
- "type": "array",
120
- "uniqueItems": true,
121
- "items": { "type": "string", "minLength": 1 }
122
- },
123
- "read": {
124
- "description": "Exact tool names the operator designates as read effects rather than host effects requiring proposal review.",
125
- "type": "array",
126
- "uniqueItems": true,
127
- "items": { "type": "string", "minLength": 1 }
128
- }
129
- },
130
- "$defs": {
131
- "environmentReference": {
132
- "description": "An operator environment variable reference such as ${GITEA_TOKEN}, never a literal secret.",
133
- "type": "string",
134
- "pattern": "^\\$\\{[A-Za-z_][A-Za-z0-9_]*\\}$"
135
- }
136
- },
137
- "allOf": [
138
- {
139
- "if": {
140
- "properties": { "transport": { "const": "stdio" } },
141
- "required": ["transport"]
142
- },
143
- "then": {
144
- "required": ["command"],
145
- "not": {
146
- "anyOf": [
147
- { "required": ["url"] },
148
- { "required": ["headers"] },
149
- { "required": ["authorization"] }
150
- ]
56
+ },
57
+ "cwd": {
58
+ "description": "An absolute working directory, optionally using ${NAME} references. When absent the host supplies a workspace-owned state directory outside the project.",
59
+ "type": "string",
60
+ "minLength": 1
151
61
  }
152
62
  }
153
63
  },
154
- {
155
- "if": {
156
- "properties": { "transport": { "const": "http" } },
157
- "required": ["transport"]
158
- },
159
- "then": {
160
- "required": ["url"],
161
- "not": {
162
- "anyOf": [
163
- { "required": ["command"] },
164
- { "required": ["args"] },
165
- { "required": ["cwd"] },
166
- { "required": ["env"] }
64
+ "streamableHttp": {
65
+ "title": "McpStreamableHttpServerDefinition",
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": [
69
+ "name",
70
+ "type",
71
+ "url"
72
+ ],
73
+ "properties": {
74
+ "name": {
75
+ "$ref": "#/$defs/name"
76
+ },
77
+ "type": {
78
+ "description": "A remote server: an MCP endpoint over Streamable HTTP.",
79
+ "const": "streamable-http"
80
+ },
81
+ "url": {
82
+ "description": "The explicitly configured HTTP(S) MCP endpoint. OAuth has its own transport-security requirements.",
83
+ "type": "string",
84
+ "pattern": "^https?://"
85
+ },
86
+ "headers": {
87
+ "description": "Headers sent only to this endpoint; ${NAME} references expand at connection time. Protocol-owned headers are supplied by the client. Authorization cannot also be declared as a header when authorization is configured.",
88
+ "type": "object",
89
+ "additionalProperties": {
90
+ "type": "string"
91
+ }
92
+ },
93
+ "authorization": {
94
+ "title": "McpAuthorization",
95
+ "description": "This endpoint's bearer or OAuth configuration. Secrets remain symbolic environment references.",
96
+ "oneOf": [
97
+ {
98
+ "type": "object",
99
+ "additionalProperties": false,
100
+ "required": [
101
+ "type",
102
+ "token"
103
+ ],
104
+ "properties": {
105
+ "type": {
106
+ "const": "bearer"
107
+ },
108
+ "token": {
109
+ "$ref": "https://schemas.plurnk.xyz/v0/McpOAuth.json#/$defs/environmentReference"
110
+ }
111
+ }
112
+ },
113
+ {
114
+ "$ref": "https://schemas.plurnk.xyz/v0/McpOAuth.json"
115
+ }
167
116
  ]
168
117
  }
169
118
  }
170
119
  }
171
- ]
120
+ }
172
121
  }
@@ -2,10 +2,10 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schemas.plurnk.xyz/v0/SkillDefinition.json",
4
4
  "title": "SkillDefinition",
5
- "description": "One standard Agent Skill: its name, source scope, and — for a workspace-installed skill — the standard installer package reference.",
5
+ "description": "One standard Agent Skill and its source. Source locations are inputs, not installation scopes.",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
- "required": ["name", "scope"],
8
+ "required": ["name"],
9
9
  "properties": {
10
10
  "name": {
11
11
  "description": "The standard Agent Skills name: Unicode lowercase or uncased letters and numbers joined by single hyphens, equal to the skill's directory name.",
@@ -13,14 +13,20 @@
13
13
  "pattern": "^(?!.*[\\p{Uppercase}\\p{Lt}])[\\p{L}\\p{N}]+(?:-[\\p{L}\\p{N}]+)*$",
14
14
  "maxLength": 64
15
15
  },
16
- "scope": {
17
- "description": "Source: project `.agents/skills`, global `~/.agents/skills`, or a service-provided resource tree. Service sources are not installer targets.",
18
- "enum": ["project", "global", "service"]
19
- },
20
16
  "source": {
21
- "description": "The standard installer package reference (`owner/repo`, a git URL, or a local path) that provides the skill; required to add a skill that is not yet installed.",
17
+ "description": "A local skill folder or its SKILL.md (read in place), a Git remote, or an archive (materialized into workspace storage). Required for configured and added skills; omitted only for a host-provided tree.",
18
+ "type": "string",
19
+ "minLength": 1
20
+ },
21
+ "ref": {
22
+ "description": "The branch or tag of a git source; the remote's default branch when absent.",
22
23
  "type": "string",
23
24
  "minLength": 1
25
+ },
26
+ "commit": {
27
+ "description": "The commit a git source's ref named when the skill was added. The service records it; a client never supplies it.",
28
+ "type": "string",
29
+ "pattern": "^[0-9a-f]{40}(?:[0-9a-f]{24})?$"
24
30
  }
25
31
  }
26
32
  }