@unbrained/pm-cli 2026.8.24 → 2026.8.26
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/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +46 -0
- package/dist/cli-bundle/bundle-manifest.json +149 -149
- package/dist/cli-bundle/chunks/chunk-E2GCFJSU.js +35 -0
- package/dist/cli-bundle/chunks/{chunk-TEQDR5KI.js → chunk-ES25LX3D.js} +62 -62
- package/dist/cli-bundle/chunks/{chunk-I5Q7QSZX.js → chunk-FRDWWB6R.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-X7WWQDYQ.js → chunk-ICQ3RVIY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YOLLRCLY.js → chunk-IV64RJVE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-L22NP5MA.js → chunk-KBFP3E4E.js} +86 -86
- package/dist/cli-bundle/chunks/{chunk-AGUL3HUT.js → chunk-MVYLQ67M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DJNJBWAQ.js → chunk-S4U76VZF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IW72J5FW.js → chunk-UKBCRPA2.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-WRHJ3MB6.js +8 -0
- package/dist/cli-bundle/chunks/{chunk-ZAVCS2GH.js → chunk-ZNRLJ54C.js} +60 -60
- package/dist/cli-bundle/chunks/{register-list-query-37A4P6O4.js → register-list-query-EMCPMICY.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-TBJDHYIT.js → register-mutation-OJ67ABCB.js} +3 -3
- package/dist/cli-bundle/chunks/{register-operations-WRZNEBUM.js → register-operations-H2GLP7LT.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-H4PDLACD.js → register-setup-GLZAHLVI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-IMWTYKII.js → chunk-4K2II4TV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-4XNH2HM7.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-GJR6YEMR.js → chunk-57XY346D.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-4WP7LNE3.js → chunk-66VGB23P.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-72T6JGAE.js +50 -0
- package/dist/cli-bundle/focused-chunks/{chunk-BFA6KKCI.js → chunk-7I23XGWO.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-6Z24ZMU3.js → chunk-7YCDTCBC.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-O4ZXNJMT.js → chunk-A644DUFQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-FXDLT6FL.js +16 -0
- package/dist/cli-bundle/focused-chunks/{chunk-RASVBJX5.js → chunk-IBHXMFE7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-LMKG3DFE.js +5 -0
- package/dist/cli-bundle/focused-chunks/{chunk-6MUTDXMP.js → chunk-LV5N3LK5.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-CWCN5RLO.js → chunk-MMXUPDDJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-WZLSSGEU.js → chunk-OHIHZ7HS.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-P2E6LDAE.js +19 -0
- package/dist/cli-bundle/focused-chunks/{chunk-IZNRRCU3.js → chunk-TMJDFHVD.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-QBP5FSBX.js → chunk-UYBA57GY.js} +4 -4
- package/dist/cli-bundle/focused-chunks/{chunk-MNPECIRL.js → chunk-YO3ZF3FI.js} +2 -2
- package/dist/cli-bundle/main.js +2 -2
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +2 -2
- package/dist/cli-bundle/sdk-core.js +41 -41
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +32 -33
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +7 -6
- package/dist/core/diagnostics/remediation.js +17 -2
- package/dist/core/extensions/manifest-schema.d.ts +20 -0
- package/dist/core/extensions/manifest-schema.js +28 -10
- package/dist/mcp/http-server.d.ts +60 -0
- package/dist/mcp/http-server.js +451 -0
- package/dist/mcp/legacy-adapter.d.ts +50 -0
- package/dist/mcp/legacy-adapter.js +64 -0
- package/dist/mcp/server.d.ts +42 -9
- package/dist/mcp/server.js +457 -58
- package/dist/sdk/agent/refusal-closure-census.d.ts +6 -2
- package/dist/sdk/agent/refusal-closure-census.js +16 -8
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +10 -0
- package/dist/sdk/cli-contracts/runtime-contracts.js +20 -3
- package/dist/sdk/compose.d.ts +4 -1
- package/dist/sdk/compose.js +23 -36
- package/dist/sdk/extension/author-manifest.d.ts +22 -0
- package/dist/sdk/extension/author-manifest.js +93 -0
- package/dist/sdk/extension.js +6 -3
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +67 -28
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +30 -3
- package/dist/sdk/governance/health.js +103 -11
- package/dist/sdk/governance/validate.js +15 -9
- package/dist/sdk/history-repair.d.ts +24 -0
- package/dist/sdk/history-repair.js +145 -4
- package/dist/sdk/index.d.ts +6 -0
- package/dist/sdk/index.js +8 -2
- package/dist/sdk/mcp/authorization.d.ts +134 -0
- package/dist/sdk/mcp/authorization.js +405 -0
- package/dist/sdk/mcp/interactions.d.ts +118 -0
- package/dist/sdk/mcp/interactions.js +337 -0
- package/dist/sdk/mcp/protocol.d.ts +142 -0
- package/dist/sdk/mcp/protocol.js +174 -0
- package/dist/sdk/mcp/subscriptions.d.ts +65 -0
- package/dist/sdk/mcp/subscriptions.js +212 -0
- package/dist/sdk/mcp/tasks.d.ts +107 -0
- package/dist/sdk/mcp/tasks.js +431 -0
- package/dist/sdk/mcp/transport.d.ts +30 -0
- package/dist/sdk/mcp/transport.js +261 -0
- package/dist/sdk/merge/driver.js +25 -4
- package/dist/sdk/merge/receipt-file-boundary.d.ts +21 -0
- package/dist/sdk/merge/receipt-file-boundary.js +47 -0
- package/dist/sdk/merge/receipts.d.ts +40 -1
- package/dist/sdk/merge/receipts.js +343 -36
- package/dist/sdk/merge/reconcile.js +117 -47
- package/dist/sdk/read-output/continuation.d.ts +15 -2
- package/dist/sdk/read-output/continuation.js +86 -6
- package/dist/sdk/read-output-contracts.d.ts +4 -1
- package/dist/sdk/read-output-contracts.js +9 -6
- package/dist/sdk/runtime-primitives.d.ts +1 -1
- package/dist/sdk/runtime-primitives.js +3 -3
- package/dist/sdk/test/execution.d.ts +6 -0
- package/dist/sdk/test/execution.js +32 -3
- package/docs/AGENT_PROVENANCE_ADR.md +6 -4
- package/docs/AGENT_RUNTIME_PRIMITIVES.md +6 -5
- package/docs/CLAUDE_CODE_PLUGIN.md +12 -5
- package/docs/DIAGNOSTIC_OUTPUT_CONTRACTS.md +8 -0
- package/docs/EXTENSIONS.md +3 -4
- package/docs/MCP_2026_07_28.md +138 -0
- package/docs/MCP_2026_07_28_CONFORMANCE.md +30 -0
- package/docs/MCP_REMOTE_TRANSPORT_SECURITY.md +180 -0
- package/docs/MERGE_SAFETY.md +34 -5
- package/docs/OUTPUT_PROJECTION_CONTRACTS.md +13 -1
- package/docs/README.md +4 -0
- package/docs/READ_OUTPUT_CONTRACTS.md +25 -2
- package/docs/RELEASING.md +3 -2
- package/docs/SDK.md +22 -1
- package/docs/SDK_AGENT_SESSION_CONTEXT.md +18 -13
- package/docs/SDK_MCP_INTERACTIONS.md +227 -0
- package/docs/TESTING.md +4 -0
- package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +13 -8
- package/marketplace.json +2 -2
- package/package.json +7 -5
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/scripts/finalize-build.mjs +1 -0
- package/sdk/public-surface.json +762 -15
- package/dist/cli-bundle/chunks/chunk-MKE6MD2K.js +0 -36
- package/dist/cli-bundle/chunks/chunk-NXBFO63A.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-FCTT4CZU.js +0 -5
- package/dist/cli-bundle/focused-chunks/chunk-Q63PSLO4.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-QV5UP27O.js +0 -51
- package/dist/cli-bundle/focused-chunks/chunk-RPRLENVA.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-TOFVXBWA.js +0 -19
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# MCP Interaction and Task SDK
|
|
2
|
+
|
|
3
|
+
Tracker references: [pm-rz9gep](../.agents/pm/features/pm-rz9gep.toon),
|
|
4
|
+
[pm-rzs24j](../.agents/pm/features/pm-rzs24j.toon), and
|
|
5
|
+
[pm-hv1x1x](../.agents/pm/features/pm-hv1x1x.toon). Transport and remote
|
|
6
|
+
trust primitives are tracked by
|
|
7
|
+
[pm-v7e337](../.agents/pm/features/pm-v7e337.toon) and
|
|
8
|
+
[pm-3zh9s4](../.agents/pm/features/pm-3zh9s4.toon).
|
|
9
|
+
|
|
10
|
+
The aggregate `@unbrained/pm-cli/sdk` entrypoint exposes transport-neutral
|
|
11
|
+
contracts for MCP 2026-07-28 multi round-trip requests (MRTR), explicit cache
|
|
12
|
+
policy, bounded JSON Schema 2020-12 validation, and the official durable tasks
|
|
13
|
+
extension. A custom stdio or HTTP host can reuse these primitives without
|
|
14
|
+
importing pm's executable server.
|
|
15
|
+
|
|
16
|
+
## Request more host input
|
|
17
|
+
|
|
18
|
+
Throw `PmMcpInputRequiredError` from domain code. The host adapter converts the
|
|
19
|
+
signal into an `input_required` result after validating request method,
|
|
20
|
+
payload bounds, and the request-local client capability.
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import {
|
|
24
|
+
PmMcpInputRequiredError,
|
|
25
|
+
digestMcpRequestParameters,
|
|
26
|
+
sealMcpRequestState,
|
|
27
|
+
} from "@unbrained/pm-cli/sdk";
|
|
28
|
+
|
|
29
|
+
const requestState = sealMcpRequestState(
|
|
30
|
+
{
|
|
31
|
+
expiresAt: Date.now() + 5 * 60_000,
|
|
32
|
+
method: "tools/call",
|
|
33
|
+
parameterDigest: digestMcpRequestParameters({ name: "pm_mutate" }),
|
|
34
|
+
principal: "host-user-42",
|
|
35
|
+
state: { phase: "confirm" },
|
|
36
|
+
},
|
|
37
|
+
process.env.MCP_REQUEST_STATE_KEY!, // at least 32 bytes
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
throw new PmMcpInputRequiredError({
|
|
41
|
+
requestState,
|
|
42
|
+
inputRequests: {
|
|
43
|
+
confirmation: {
|
|
44
|
+
method: "elicitation/create",
|
|
45
|
+
params: {
|
|
46
|
+
mode: "form",
|
|
47
|
+
message: "Apply the proposed PM mutations?",
|
|
48
|
+
requestedSchema: {
|
|
49
|
+
type: "object",
|
|
50
|
+
properties: { approved: { type: "boolean" } },
|
|
51
|
+
required: ["approved"],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Use `openMcpRequestState()` on retry to verify signature, expiry, original
|
|
60
|
+
method, parameter digest, and principal. Call
|
|
61
|
+
`PmMcpRequestStateReplayGuard.consume()` only after successful verification.
|
|
62
|
+
The bundled guard provides bounded single-process replay detection; a
|
|
63
|
+
multi-process host should persist the consumed state digest in its shared
|
|
64
|
+
store. `parseMcpInputResponses()` validates and clones retry responses.
|
|
65
|
+
|
|
66
|
+
The permitted input request methods are
|
|
67
|
+
`elicitation/create`, `roots/list`, and `sampling/createMessage`. The client
|
|
68
|
+
must advertise the corresponding capability on that same request.
|
|
69
|
+
|
|
70
|
+
## Validate schemas and attach cache policy
|
|
71
|
+
|
|
72
|
+
`validateMcpJsonSchema()` accepts object and boolean JSON Schema 2020-12 roots,
|
|
73
|
+
resolves local JSON Pointer references, and applies byte, depth, and node work
|
|
74
|
+
bounds. It returns a clone so callers cannot mutate the validated input by
|
|
75
|
+
alias. External references remain identifiers; this validator does not perform
|
|
76
|
+
network retrieval.
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
import {
|
|
80
|
+
validateMcpJsonSchema,
|
|
81
|
+
withMcpCachePolicy,
|
|
82
|
+
} from "@unbrained/pm-cli/sdk";
|
|
83
|
+
|
|
84
|
+
const inputSchema = validateMcpJsonSchema({
|
|
85
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
86
|
+
type: "object",
|
|
87
|
+
properties: { id: { type: "string" } },
|
|
88
|
+
required: ["id"],
|
|
89
|
+
additionalProperties: false,
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const result = withMcpCachePolicy(
|
|
93
|
+
{ tools: [{ name: "get_item", inputSchema }] },
|
|
94
|
+
{ ttlMs: 30_000, cacheScope: "private" },
|
|
95
|
+
);
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Use `cacheScope: "private"` whenever a result depends on a workspace,
|
|
99
|
+
principal, authorization decision, or user data. A `public` result must be
|
|
100
|
+
safe for shared intermediaries and all principals for its full TTL.
|
|
101
|
+
|
|
102
|
+
## Run durable extension tasks
|
|
103
|
+
|
|
104
|
+
`createMcpTaskStore()` persists task records below the supplied tracker root's
|
|
105
|
+
ignored `runtime/mcp-tasks` directory. It creates the durable record before
|
|
106
|
+
returning a handle and serializes mutations with pm's cross-process lock.
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
import { createMcpTaskStore } from "@unbrained/pm-cli/sdk";
|
|
110
|
+
|
|
111
|
+
const tasks = createMcpTaskStore({
|
|
112
|
+
pmRoot: "/workspace/project/.agents/pm",
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
const handle = await tasks.create({
|
|
116
|
+
principal: "host-user-42",
|
|
117
|
+
ttlMs: 60 * 60_000,
|
|
118
|
+
statusMessage: "Validating the workspace.",
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
try {
|
|
122
|
+
const result = await validateWorkspace();
|
|
123
|
+
await tasks.complete(handle.taskId, "host-user-42", result);
|
|
124
|
+
} catch (error) {
|
|
125
|
+
await tasks.fail(handle.taskId, "host-user-42", {
|
|
126
|
+
code: -32603,
|
|
127
|
+
message: error instanceof Error ? error.message : "Validation failed",
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
The lifecycle is `working` to `input_required`, `completed`, `failed`, or
|
|
133
|
+
`cancelled`. `get()` applies retention expiry and restart recovery;
|
|
134
|
+
`requireInput()` records MRTR requests; `update()` accepts matching responses;
|
|
135
|
+
`takeInputResponses()` transfers them to a resumed worker; and `cancel()` is a
|
|
136
|
+
cooperative state transition. Completed, failed, and cancelled records are
|
|
137
|
+
immutable. Task ids and principal mismatches intentionally return the same
|
|
138
|
+
not-found refusal to avoid disclosing another principal's work.
|
|
139
|
+
|
|
140
|
+
The bundled `pm-mcp` server negotiates the extension through
|
|
141
|
+
`io.modelcontextprotocol/tasks`. Eligible validation, health, graph, import,
|
|
142
|
+
reindex, and test operations may return a task handle when the client requests
|
|
143
|
+
asynchronous execution. Clients retrieve state with `tasks/get`, provide MRTR
|
|
144
|
+
answers with `tasks/update`, and request cancellation with `tasks/cancel`.
|
|
145
|
+
|
|
146
|
+
Task progress notifications and cross-transport request-scoped streams are a
|
|
147
|
+
separate concern from change subscriptions. A client polls at `pollIntervalMs`
|
|
148
|
+
for task state; `subscriptions/listen` carries only explicitly acknowledged
|
|
149
|
+
tool, prompt, and resource changes.
|
|
150
|
+
|
|
151
|
+
## Open change subscriptions
|
|
152
|
+
|
|
153
|
+
`PmMcpSubscriptionRegistry` is transport-neutral. A stdio or HTTP adapter
|
|
154
|
+
opens a record with the `subscriptions/listen` JSON-RPC id, requested filter,
|
|
155
|
+
and an asynchronous sink. The registry sends the acknowledgment before any
|
|
156
|
+
other notification, intersects filters with advertised server capabilities,
|
|
157
|
+
tags every notification with the subscription id, and awaits each sink so
|
|
158
|
+
transport backpressure is visible.
|
|
159
|
+
|
|
160
|
+
```ts
|
|
161
|
+
import { PmMcpSubscriptionRegistry } from "@unbrained/pm-cli/sdk";
|
|
162
|
+
|
|
163
|
+
const subscriptions = new PmMcpSubscriptionRegistry({
|
|
164
|
+
capabilities: { resources: { listChanged: true, subscribe: true } },
|
|
165
|
+
serverInfo: { name: "custom-pm-host", version: "1.0.0" },
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
await subscriptions.open({
|
|
169
|
+
id: "workspace-changes",
|
|
170
|
+
notifications: {
|
|
171
|
+
resourcesListChanged: true,
|
|
172
|
+
resourceSubscriptions: ["pm://workspace/context"],
|
|
173
|
+
},
|
|
174
|
+
sink: async (notification) => sendOnTransport(notification),
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
await subscriptions.emitResourceUpdated("pm://workspace/context");
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Closing returns the final modern result envelope. Abrupt disconnects should
|
|
181
|
+
delete the record without fabricating a replay cursor or redelivery promise.
|
|
182
|
+
|
|
183
|
+
## Project and validate HTTP headers
|
|
184
|
+
|
|
185
|
+
`buildMcpHttpRequestHeaders()` constructs the required protocol, method, and
|
|
186
|
+
name headers from a request. `validateMcpHttpRequestHeaders()` checks the
|
|
187
|
+
received headers against both the JSON-RPC body and a tool's input schema.
|
|
188
|
+
`collectMcpHeaderAnnotations()` exposes the validated `x-mcp-header` mapping
|
|
189
|
+
when a custom adapter needs to inspect it.
|
|
190
|
+
|
|
191
|
+
Header values are strings, numbers, or booleans. The SDK Base64-encodes values
|
|
192
|
+
that cannot be represented unambiguously and rejects control bytes, reserved
|
|
193
|
+
MCP names, duplicate mappings, undeclared arguments, and body/header
|
|
194
|
+
mismatches. Never copy arbitrary client headers into tool arguments.
|
|
195
|
+
|
|
196
|
+
## Compose remote authorization
|
|
197
|
+
|
|
198
|
+
Use `buildMcpProtectedResourceMetadata()` for RFC 9728 metadata,
|
|
199
|
+
`buildMcpAuthorizationDiscoveryUrls()` and
|
|
200
|
+
`validateMcpAuthorizationServerMetadata()` for exact issuer discovery, and
|
|
201
|
+
`selectMcpClientRegistrationMode()` to prefer Client ID Metadata Documents
|
|
202
|
+
over deprecated Dynamic Client Registration. Store credentials with
|
|
203
|
+
`PmMcpIssuerCredentialStore`; its exact issuer key prevents cross-issuer
|
|
204
|
+
reuse and its cloned values prevent alias mutation.
|
|
205
|
+
|
|
206
|
+
At the resource boundary, `authorizeMcpHttpRequest()` accepts bearer tokens
|
|
207
|
+
only in the Authorization header and verifies issuer, audience, and required
|
|
208
|
+
scopes through a host-provided verifier. `extractMcpTraceContext()` validates
|
|
209
|
+
W3C trace fields and retains only allowlisted baggage before
|
|
210
|
+
`runWithMcpTraceContext()` creates a concurrent-request-local scope.
|
|
211
|
+
|
|
212
|
+
See [MCP remote transport, authorization, and migration](MCP_REMOTE_TRANSPORT_SECURITY.md)
|
|
213
|
+
for executable configuration, lifecycle policy, and the threat model.
|
|
214
|
+
|
|
215
|
+
## Failure and trust boundaries
|
|
216
|
+
|
|
217
|
+
- Keep signing keys outside request data and logs; rotate them using a bounded
|
|
218
|
+
overlap strategy owned by the host.
|
|
219
|
+
- Bind continuation state and tasks to an authenticated principal chosen by
|
|
220
|
+
the host, never to a caller-supplied display name.
|
|
221
|
+
- Treat `ttlMs` as retention/freshness policy, not proof that underlying data
|
|
222
|
+
is unchanged.
|
|
223
|
+
- A worker lost across process restart becomes a terminal, non-recoverable task
|
|
224
|
+
result. Create a new task instead of replaying side effects implicitly.
|
|
225
|
+
- The task store is durable local coordination, not a distributed queue. A
|
|
226
|
+
multi-host deployment should implement the same public lifecycle on a
|
|
227
|
+
shared transactional backend.
|
package/docs/TESTING.md
CHANGED
|
@@ -443,6 +443,10 @@ context. This preserves source isolation without copying an unrelated tracker
|
|
|
443
443
|
into constrained temporary storage.
|
|
444
444
|
Capacity, permission, and resource failures while seeding a required tracker
|
|
445
445
|
surface as typed, path-redacted host-environment refusals with recovery steps.
|
|
446
|
+
When a legacy source tracker has settings but no `_workspace` history, tracker
|
|
447
|
+
mode creates the sandbox's initial audited settings snapshot from the exact
|
|
448
|
+
source bytes. Existing source workspace history is copied unchanged, including
|
|
449
|
+
real drift, so linked validation never masks a source integrity failure.
|
|
446
450
|
|
|
447
451
|
## Source Workspace Modes
|
|
448
452
|
|
|
@@ -4,12 +4,12 @@ Tracker: `pm-f05lsg`.
|
|
|
4
4
|
|
|
5
5
|
Every catalog code is listed. An `uncovered` row is an explicit closure obligation, never an omission or implied approval.
|
|
6
6
|
|
|
7
|
-
- Catalog error codes:
|
|
8
|
-
- Executable error codes:
|
|
9
|
-
- Executable-code ratchet floor:
|
|
10
|
-
- Required executable canonical codes: `bulk_ids_input_empty`, `bulk_ids_input_missing_path`, `bulk_ids_input_unreadable`, `invalid_argument_value`, `missing_lifecycle_target`, `missing_required_argument`, `projection_options_mutually_exclusive`, `tracker_not_initialized`, `tracker_root_missing`, `tracker_root_not_directory`, `tracker_root_unreadable`, `unknown_context_intent`, `unknown_field_projection`, `unknown_option`, `unknown_subcommand`
|
|
11
|
-
- Uncovered error codes:
|
|
12
|
-
- Coverage fraction: 0.
|
|
7
|
+
- Catalog error codes: 343
|
|
8
|
+
- Executable error codes: 18
|
|
9
|
+
- Executable-code ratchet floor: 18
|
|
10
|
+
- Required executable canonical codes: `bulk_ids_input_empty`, `bulk_ids_input_missing_path`, `bulk_ids_input_unreadable`, `invalid_argument_value`, `manifest_unknown_key`, `missing_lifecycle_target`, `missing_required_argument`, `no_version_bounds_declared`, `projection_options_mutually_exclusive`, `tracker_not_initialized`, `tracker_root_missing`, `tracker_root_not_directory`, `tracker_root_unreadable`, `unknown_context_intent`, `unknown_field_projection`, `unknown_option`, `unknown_subcommand`
|
|
11
|
+
- Uncovered error codes: 325
|
|
12
|
+
- Coverage fraction: 0.052478
|
|
13
13
|
- Closed-domain probes: 18
|
|
14
14
|
- Grammar probes: 95
|
|
15
15
|
|
|
@@ -111,6 +111,7 @@ Every catalog code is listed. An `uncovered` row is an explicit closure obligati
|
|
|
111
111
|
| `history_author_acknowledge_target_unreadable` | `history_author_acknowledge_target_unreadable` | uncovered | none | 0 |
|
|
112
112
|
| `history_drift_chain_mismatch` | `history_drift_chain_mismatch` | uncovered | none | 0 |
|
|
113
113
|
| `history_drift_hash_mismatch` | `history_drift_hash_mismatch` | uncovered | none | 0 |
|
|
114
|
+
| `history_drift_merge_receipt` | `history_drift_merge_receipt` | uncovered | none | 0 |
|
|
114
115
|
| `history_drift_missing_stream` | `history_drift_missing_stream` | uncovered | none | 0 |
|
|
115
116
|
| `history_drift_unreadable_stream` | `history_drift_unreadable_stream` | uncovered | none | 0 |
|
|
116
117
|
| `history_merge_conflict_markers_detected` | `merge_conflict_markers_detected` | uncovered | none | 0 |
|
|
@@ -174,13 +175,17 @@ Every catalog code is listed. An `uncovered` row is an explicit closure obligati
|
|
|
174
175
|
| `locks_unreadable` | `locks_unreadable` | uncovered | none | 0 |
|
|
175
176
|
| `malformed_plan_step_evidence` | `malformed_plan_step_evidence` | uncovered | none | 0 |
|
|
176
177
|
| `manifest_capabilities_absent` | `manifest_capabilities_absent` | uncovered | none | 0 |
|
|
177
|
-
| `manifest_unknown_key` | `manifest_unknown_key` |
|
|
178
|
+
| `manifest_unknown_key` | `manifest_unknown_key` | executable | owned_state | 1 |
|
|
178
179
|
| `mcp_annotation_file_unavailable` | `mcp_annotation_file_unavailable` | uncovered | none | 0 |
|
|
179
180
|
| `mcp_stdin_unavailable` | `mcp_stdin_unavailable` | uncovered | none | 0 |
|
|
181
|
+
| `mcp_task_not_found_or_not_authorized` | `mcp_task_not_found_or_not_authorized` | uncovered | none | 0 |
|
|
180
182
|
| `merge_conflict_markers_detected` | `merge_conflict_markers_detected` | uncovered | none | 0 |
|
|
181
183
|
| `merge_decisions_unreviewed` | `merge_decisions_unreviewed` | uncovered | none | 0 |
|
|
182
184
|
| `merge_git_config_unwritable` | `merge_git_config_unwritable` | uncovered | none | 0 |
|
|
185
|
+
| `merge_receipt_evidence_invalid` | `merge_receipt_evidence_invalid` | uncovered | none | 0 |
|
|
186
|
+
| `merge_receipts_pending` | `merge_receipts_pending` | uncovered | none | 0 |
|
|
183
187
|
| `merge_reconcile_discards_require_acceptance` | `merge_reconcile_discards_require_acceptance` | uncovered | none | 0 |
|
|
188
|
+
| `merge_reconcile_receipt_evidence_untrusted` | `merge_reconcile_receipt_evidence_untrusted` | uncovered | none | 0 |
|
|
184
189
|
| `merge_root_not_found` | `merge_root_not_found` | uncovered | none | 0 |
|
|
185
190
|
| `missing_allowed_values` | `missing_allowed_values` | uncovered | none | 0 |
|
|
186
191
|
| `missing_budget` | `missing_budget` | uncovered | none | 0 |
|
|
@@ -206,7 +211,7 @@ Every catalog code is listed. An `uncovered` row is an explicit closure obligati
|
|
|
206
211
|
| `no_test_files_found` | `no_test_files_found` | uncovered | none | 0 |
|
|
207
212
|
| `no_tests_found` | `no_tests_found` | uncovered | none | 0 |
|
|
208
213
|
| `no_update_fields` | `no_update_fields` | uncovered | none | 0 |
|
|
209
|
-
| `no_version_bounds_declared` | `no_version_bounds_declared` |
|
|
214
|
+
| `no_version_bounds_declared` | `no_version_bounds_declared` | executable | owned_state | 1 |
|
|
210
215
|
| `non_refusal_exit` | `non_refusal_exit` | uncovered | none | 0 |
|
|
211
216
|
| `npm_package_not_found` | `npm_package_not_found` | uncovered | none | 0 |
|
|
212
217
|
| `ownership_conflict` | `ownership_conflict` | uncovered | none | 0 |
|
package/marketplace.json
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Official marketplace for pm CLI — native git-based project management for Claude Code and AI coding agents.",
|
|
9
|
-
"version": "2026.8.
|
|
9
|
+
"version": "2026.8.26"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "pm-claude",
|
|
14
14
|
"source": "./plugins/pm-claude",
|
|
15
15
|
"description": "Native pm CLI integration for Claude Code — 28 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents, hybrid TUI task tracking, session context injection, and coordination subagents for git-based project management without leaving Claude Code.",
|
|
16
|
-
"version": "2026.8.
|
|
16
|
+
"version": "2026.8.26",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "unbrained",
|
|
19
19
|
"url": "https://github.com/unbraind/pm-cli"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unbrained/pm-cli",
|
|
3
|
-
"version": "2026.8.
|
|
3
|
+
"version": "2026.8.26",
|
|
4
4
|
"description": "Git-native project management CLI for humans and agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@11.10.0",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"bin": {
|
|
17
17
|
"pm-cli": "dist/cli.js",
|
|
18
18
|
"pm": "dist/cli.js",
|
|
19
|
-
"pm-mcp": "dist/mcp/server.js"
|
|
19
|
+
"pm-mcp": "dist/mcp/server.js",
|
|
20
|
+
"pm-mcp-http": "dist/mcp/http-server.js"
|
|
20
21
|
},
|
|
21
22
|
"types": "dist/sdk/index.d.ts",
|
|
22
23
|
"exports": {
|
|
@@ -120,7 +121,7 @@
|
|
|
120
121
|
"lint:complexity:baseline": "eslint . --suppress-rule complexity --suppress-rule sonarjs/cognitive-complexity",
|
|
121
122
|
"lint:duplicates": "jscpd --config .jscpd.json",
|
|
122
123
|
"lint:codefactor": "pnpm quality:static",
|
|
123
|
-
"quality:static": "pnpm build && node scripts/contracts-snapshot.mjs --check && node scripts/generate-agent-capability-surfaces.mjs --check && node scripts/generate-error-code-catalog.mjs --check && node scripts/release/repository-assurance.mjs repository-static-quality --trigger ci --json && node scripts/release/audit-package-boundary.mjs && node scripts/release/package-sdk-contract-parity.mjs && node scripts/release/surface-replication-gate.mjs && node scripts/release/command-grammar-gate.mjs && node scripts/release/flag-invocation-parity.mjs && node scripts/release/flag-lexicon-gate.mjs && node scripts/release/refusal-closure-gate.mjs && node dist/cli.js assurance run tracker-context-quality --trigger ci --dry-run --json --output-budget unbounded && node scripts/release/gate-registry.mjs && node scripts/sdk-surface-snapshot.mjs --check && node scripts/bench/sdk-entrypoint-costs.mjs --check && node scripts/bench/cli-transport-floor.mjs --check && node dist/cli.js assurance run graph-composition --trigger ci --dry-run --json --output-budget unbounded && node dist/cli.js assurance run record-integrity --trigger ci --dry-run --json --output-budget unbounded",
|
|
124
|
+
"quality:static": "pnpm build && node scripts/contracts-snapshot.mjs --check && node scripts/generate-agent-capability-surfaces.mjs --check && node scripts/generate-error-code-catalog.mjs --check && node scripts/release/repository-assurance.mjs repository-static-quality --trigger ci --json && node scripts/release/audit-package-boundary.mjs && node scripts/release/package-sdk-contract-parity.mjs && node scripts/release/surface-replication-gate.mjs && node scripts/release/command-grammar-gate.mjs && node scripts/release/flag-invocation-parity.mjs && node scripts/release/flag-lexicon-gate.mjs && node scripts/release/refusal-closure-gate.mjs && pnpm quality:mcp-deprecations && node dist/cli.js assurance run tracker-context-quality --trigger ci --dry-run --json --output-budget unbounded && node scripts/release/gate-registry.mjs && node scripts/sdk-surface-snapshot.mjs --check && node scripts/bench/sdk-entrypoint-costs.mjs --check && node scripts/bench/cli-transport-floor.mjs --check && node dist/cli.js assurance run graph-composition --trigger ci --dry-run --json --output-budget unbounded && node dist/cli.js assurance run record-integrity --trigger ci --dry-run --json --output-budget unbounded",
|
|
124
125
|
"quality:command-grammar": "pnpm build && node scripts/release/command-grammar-gate.mjs && node scripts/release/flag-invocation-parity.mjs && node scripts/release/flag-lexicon-gate.mjs",
|
|
125
126
|
"quality:recovery-closure": "pnpm build && node scripts/release/refusal-closure-gate.mjs",
|
|
126
127
|
"quality:token-budget": "node scripts/release/token-budget-gate.mjs",
|
|
@@ -139,6 +140,7 @@
|
|
|
139
140
|
"quality:absence-tolerance": "node scripts/release/absence-tolerance-gate.mjs",
|
|
140
141
|
"quality:docs-skills": "node scripts/release/docs-skills-gate.mjs",
|
|
141
142
|
"quality:docs-links": "node scripts/release/docs-skills-gate.mjs --links-only",
|
|
143
|
+
"quality:mcp-deprecations": "node --input-type=module --eval 'import { main } from \"./scripts/release/mcp-deprecation-inventory.mjs\"; await main()'",
|
|
142
144
|
"quality:defect-evidence": "pnpm build && node scripts/release/defect-evidence-gate.mjs",
|
|
143
145
|
"quality:hosted-analysis": "node scripts/release/hosted-analysis-gate.mjs",
|
|
144
146
|
"benchmark:scale:generate": "node scripts/bench/scale-workspace.mjs",
|
|
@@ -203,7 +205,7 @@
|
|
|
203
205
|
"node": ">=22.18.0"
|
|
204
206
|
},
|
|
205
207
|
"dependencies": {
|
|
206
|
-
"@sentry/node": "10.
|
|
208
|
+
"@sentry/node": "10.71.0",
|
|
207
209
|
"@toon-format/toon": "^4.1.1",
|
|
208
210
|
"@types/node": ">=22",
|
|
209
211
|
"commander": "^15.0.0",
|
|
@@ -228,7 +230,7 @@
|
|
|
228
230
|
"jscpd": "^5.0.16",
|
|
229
231
|
"tsx": "^4.23.12",
|
|
230
232
|
"typescript": "^6.0.3",
|
|
231
|
-
"typescript-eslint": "^8.
|
|
233
|
+
"typescript-eslint": "^8.68.0",
|
|
232
234
|
"vitest": "^4.1.11",
|
|
233
235
|
"yaml": "^2.9.0"
|
|
234
236
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unbrained/pm-digital-twin",
|
|
3
|
-
"version": "2026.8.
|
|
3
|
+
"version": "2026.8.26",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Beyond-PM exemplar: a temporal production-facility digital twin built entirely on public pm SDK and extension primitives.",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pm-claude",
|
|
3
3
|
"description": "Native pm CLI integration for Claude Code — 28 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents (coordinator, delivery-chain, triage, verification), hybrid TUI task tracking (pm as persistent store + Claude Code task panel as live view), session context injection, and full git-based project management without leaving Claude Code.",
|
|
4
|
-
"version": "2026.8.
|
|
4
|
+
"version": "2026.8.26",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "unbrained",
|
|
7
7
|
"url": "https://github.com/unbraind/pm-cli"
|
|
@@ -20,6 +20,7 @@ export async function main(repoRoot = process.cwd()) {
|
|
|
20
20
|
const executableOutputs = [
|
|
21
21
|
path.join(repoRoot, "dist", "cli.js"),
|
|
22
22
|
path.join(repoRoot, "dist", "mcp", "server.js"),
|
|
23
|
+
path.join(repoRoot, "dist", "mcp", "http-server.js"),
|
|
23
24
|
];
|
|
24
25
|
|
|
25
26
|
for (const outputPath of executableOutputs) {
|