@unbrained/pm-cli 2026.8.15 → 2026.8.17
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 +56 -12
- package/README.md +13 -13
- package/dist/cli/error-guidance.d.ts +5 -0
- package/dist/cli/error-guidance.js +15 -2
- package/dist/cli/public.d.ts +2 -0
- package/dist/cli/public.js +21 -0
- package/dist/cli/register-history-author.js +16 -11
- package/dist/cli/register-mutation.js +4 -4
- package/dist/cli-bundle/bundle-manifest.json +143 -143
- package/dist/cli-bundle/chunks/{chunk-J42EGKDK.js → chunk-2QLOXC3V.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LJHOAVGI.js → chunk-3UEGXBMR.js} +49 -43
- package/dist/cli-bundle/chunks/chunk-4JPYF536.js +35 -0
- package/dist/cli-bundle/chunks/chunk-6VDLG2FC.js +13 -0
- package/dist/cli-bundle/chunks/chunk-7IBRGCHX.js +2 -0
- package/dist/cli-bundle/chunks/chunk-HBJAS566.js +8 -0
- package/dist/cli-bundle/chunks/chunk-ION3E43Q.js +197 -0
- package/dist/cli-bundle/chunks/{chunk-WLPDLNEZ.js → chunk-JOKATURE.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-MEM2ZS3O.js → chunk-TPXZIBIV.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-YM2YAMF7.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-CT3LFDDN.js → register-list-query-Q7KII4G5.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-NWEVA5YS.js → register-mutation-4WBRPXLV.js} +3 -3
- package/dist/cli-bundle/chunks/{register-operations-AHIAG5KM.js → register-operations-SSENDH5B.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-ZJZFVAKE.js → register-setup-DOSFBGKE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-WTSER4WJ.js → chunk-267MUUS6.js} +11 -11
- package/dist/cli-bundle/focused-chunks/chunk-2NNFLLNG.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-2QSAKMIH.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ZMFXQ7VF.js → chunk-ATEY76SX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-BUCG4ZI2.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-M67F5AIN.js → chunk-CYFK5UPB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-EHXIKD6K.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-EXZA4257.js → chunk-KGEXTMPG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-KP2VQQVQ.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-MHPIL773.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-POEEAD2V.js +4 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ITAUHSO6.js → chunk-SALH6B6K.js} +47 -47
- package/dist/cli-bundle/focused-chunks/{chunk-KLVUMNXJ.js → chunk-SYZENPIT.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-KTKH4IMG.js → chunk-XKAMP5OU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-NSPYTG6G.js → chunk-XPIC53VA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-6XKF3PGV.js → chunk-ZQPGZZWQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZT2DJS27.js +155 -0
- package/dist/cli-bundle/main.js +10 -10
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +31 -31
- 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 -32
- 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 +4 -2
- package/dist/core/extensions/loader.js +10 -6
- package/dist/core/extensions/manifest-schema.d.ts +20 -0
- package/dist/core/extensions/manifest-schema.js +52 -0
- package/dist/core/history/replay.js +32 -14
- package/dist/core/history/workspace-history.js +32 -10
- package/dist/core/output/output.js +6 -3
- package/dist/core/schema/fields-file.d.ts +1 -1
- package/dist/core/schema/fields-file.js +2 -2
- package/dist/core/schema/runtime-field-values.js +115 -9
- package/dist/core/schema/runtime-schema.d.ts +3 -1
- package/dist/core/schema/runtime-schema.js +124 -3
- package/dist/core/shared/errors.d.ts +12 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/time.d.ts +2 -0
- package/dist/core/shared/time.js +27 -2
- package/dist/core/store/item-store.js +28 -2
- package/dist/sdk/agent/refusal-reachability.d.ts +56 -8
- package/dist/sdk/agent/refusal-reachability.js +414 -4
- package/dist/sdk/author-attribution.d.ts +56 -11
- package/dist/sdk/author-attribution.js +174 -50
- package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +12 -4
- package/dist/sdk/cli-contracts/tool-schema.js +12 -4
- package/dist/sdk/completion.js +11 -4
- package/dist/sdk/compose.d.ts +6 -2
- package/dist/sdk/compose.js +33 -3
- package/dist/sdk/context-intent-contracts.d.ts +8 -4
- package/dist/sdk/context-intent-contracts.js +76 -31
- package/dist/sdk/dependency-flag-validation.d.ts +9 -2
- package/dist/sdk/dependency-flag-validation.js +101 -35
- package/dist/sdk/environment/host-environment-errors.js +25 -7
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +62 -14
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +50 -2
- package/dist/sdk/governance/assurance-action.d.ts +3 -7
- package/dist/sdk/governance/assurance-action.js +97 -2
- package/dist/sdk/governance/boundary-fixtures.d.ts +86 -0
- package/dist/sdk/governance/boundary-fixtures.js +201 -0
- package/dist/sdk/governance/coverage-assurance.d.ts +24 -0
- package/dist/sdk/governance/coverage-assurance.js +61 -0
- package/dist/sdk/governance/defect-recurrence-signals.d.ts +10 -0
- package/dist/sdk/governance/defect-recurrence-signals.js +25 -0
- package/dist/sdk/governance/defect-recurrence.d.ts +242 -0
- package/dist/sdk/governance/defect-recurrence.js +523 -0
- package/dist/sdk/governance/extension-host-version.js +20 -9
- package/dist/sdk/governance.d.ts +2 -0
- package/dist/sdk/governance.js +4 -2
- package/dist/sdk/graph/governance.js +3 -2
- package/dist/sdk/guide-topics.js +191 -2
- package/dist/sdk/index.d.ts +5 -1
- package/dist/sdk/index.js +6 -3
- package/dist/sdk/lifecycle/create.js +4 -2
- package/dist/sdk/lifecycle/update-many.js +15 -2
- package/dist/sdk/lifecycle/update.js +5 -2
- package/dist/sdk/linked-artifacts.js +63 -14
- package/dist/sdk/query/get.d.ts +2 -0
- package/dist/sdk/query/get.js +32 -7
- package/dist/sdk/read-output-contracts.js +5 -3
- package/dist/sdk/relationship-analytics.js +90 -14
- package/dist/sdk/relationship-kinds/contract.d.ts +4 -0
- package/dist/sdk/relationship-kinds/contract.js +3 -2
- package/dist/sdk/relationships.d.ts +1 -1
- package/dist/sdk/relationships.js +11 -2
- package/dist/sdk/runtime.d.ts +2 -5
- package/dist/sdk/runtime.js +3 -2
- package/dist/sdk/schema.d.ts +1 -0
- package/dist/sdk/schema.js +2 -2
- package/dist/sdk/test/execution.d.ts +6 -2
- package/dist/sdk/test/execution.js +39 -13
- package/dist/types.d.ts +29 -2
- package/dist/types.js +4 -2
- package/docs/CONFIGURATION.md +58 -1
- package/docs/CONTEXT_INTEGRITY_CONTRACTS.md +58 -0
- package/docs/DEFECT_RECURRENCE.md +134 -0
- package/docs/DEPENDENCY_KIND_CONTRACT.md +12 -2
- package/docs/README.md +2 -0
- package/docs/READ_OUTPUT_CONTRACTS.md +7 -1
- package/docs/RELATIONSHIP_GRAPH.md +16 -2
- package/docs/RELEASING.md +13 -7
- package/docs/SDK.md +38 -5
- package/docs/SDK_CONTEXT_INTEGRITY.md +33 -5
- package/docs/SDK_CONTEXT_TRUTH_CONTRACTS.md +13 -5
- package/docs/SDK_RUNTIME_BOUNDARIES.md +9 -1
- package/docs/TESTING.md +18 -1
- package/docs/TRUSTWORTHY_CONTEXT_EVIDENCE.md +1 -1
- package/marketplace.json +2 -2
- package/package.json +6 -4
- 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-claude/skills/pm-audit/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-developer/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-planner/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-release/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-workflow/SKILL.md +26 -0
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/skills/pm-auditor/SKILL.md +26 -0
- package/plugins/pm-codex/skills/pm-native/SKILL.md +26 -0
- package/plugins/pm-codex/skills/pm-release/SKILL.md +26 -0
- package/sdk/public-surface.json +716 -33
- package/dist/cli-bundle/chunks/chunk-24GAV7XL.js +0 -8
- package/dist/cli-bundle/chunks/chunk-AIM6VT2N.js +0 -13
- package/dist/cli-bundle/chunks/chunk-DSWDLTDR.js +0 -197
- package/dist/cli-bundle/chunks/chunk-KIEGUBYQ.js +0 -2
- package/dist/cli-bundle/chunks/chunk-KLKYLSDX.js +0 -2
- package/dist/cli-bundle/chunks/chunk-QHPCJWEJ.js +0 -35
- package/dist/cli-bundle/focused-chunks/chunk-4X57RE4U.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-7NJ4QYQ2.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-KT5XMYSX.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-OKA6ELTL.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-PUISBOPP.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-QLNMCESQ.js +0 -155
- package/dist/cli-bundle/focused-chunks/chunk-SLKC6QLJ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-U65UC4G3.js +0 -2
package/dist/sdk/guide-topics.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e791d84f-7d4c-59fa-9644-527109dbb596")}catch(e){}}();
|
|
3
3
|
function normalizeTopicToken(value) {
|
|
4
4
|
return value.trim().toLowerCase().replaceAll("_", "-");
|
|
5
5
|
}
|
|
@@ -338,6 +338,195 @@ const GUIDE_TOPICS = [
|
|
|
338
338
|
],
|
|
339
339
|
related: ["commands", "skills", "workflows"],
|
|
340
340
|
},
|
|
341
|
+
{
|
|
342
|
+
id: "tokens",
|
|
343
|
+
aliases: ["output", "budget", "context-cost", "projections"],
|
|
344
|
+
title: "Read Output and Token Budgets",
|
|
345
|
+
summary: "Bound what a read costs before it is emitted, and resume the part a budget withheld.",
|
|
346
|
+
intent: "Use this when an agent must keep context small: every read declares a token ceiling, degrades deterministically, and reports what it omitted.",
|
|
347
|
+
commands: [
|
|
348
|
+
"pm contracts --summary --json",
|
|
349
|
+
"pm list --status open --output-limit 20",
|
|
350
|
+
"pm get <ID> --output-include id,title,status,dependencies",
|
|
351
|
+
"pm context --limit 10 --token-accounting",
|
|
352
|
+
"pm notes <ID> --output-cursor <cursor>",
|
|
353
|
+
"pm list-closed --output-budget unbounded",
|
|
354
|
+
],
|
|
355
|
+
workflows: [
|
|
356
|
+
{
|
|
357
|
+
name: "Bound A Read Before Emitting It",
|
|
358
|
+
goal: "Never pay for rows the task does not need.",
|
|
359
|
+
prompt: "Choose the narrowest projection first, then a row limit, then a token budget. Read the omission receipt before concluding the result is complete.",
|
|
360
|
+
commands: [
|
|
361
|
+
"pm contracts --command list --flags-only --json",
|
|
362
|
+
"pm list --status open --output-limit 20 --output-format toon",
|
|
363
|
+
"pm list --status open --token-accounting",
|
|
364
|
+
],
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
name: "Recover A Truncated Read",
|
|
368
|
+
goal: "Continue a bounded read instead of re-running it unbounded.",
|
|
369
|
+
prompt: "When output_budget_truncation appears, prefer the declared continuation cursor. Only widen the budget when the response declares no cursor.",
|
|
370
|
+
commands: [
|
|
371
|
+
"pm notes <ID> --output-cursor <cursor>",
|
|
372
|
+
"pm get <ID> --output-budget 20000",
|
|
373
|
+
],
|
|
374
|
+
},
|
|
375
|
+
],
|
|
376
|
+
docs: [
|
|
377
|
+
{
|
|
378
|
+
path: "docs/READ_OUTPUT_CONTRACTS.md",
|
|
379
|
+
purpose: "Budget, truncation, continuation, and omission receipts.",
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
path: "docs/OUTPUT_PROJECTION_CONTRACTS.md",
|
|
383
|
+
purpose: "Field and section projection grammar for every read.",
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
path: "docs/OUTPUT_TOKEN_ACCOUNTING.md",
|
|
387
|
+
purpose: "Per-section token cost receipts.",
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
path: "docs/ITEM_READ_PROJECTIONS.md",
|
|
391
|
+
purpose: "Item-level projection defaults and restore hints.",
|
|
392
|
+
},
|
|
393
|
+
],
|
|
394
|
+
related: ["commands", "workflows", "quickstart"],
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
id: "graph",
|
|
398
|
+
aliases: ["relationships", "deps", "dependencies", "analytics"],
|
|
399
|
+
title: "Relationship Graph and Planning Analytics",
|
|
400
|
+
summary: "Type the relationships between items, then read the project as a graph rather than as a list.",
|
|
401
|
+
intent: "Use this when the question is about lineage, ordering, blast radius, bottlenecks, or which work reaches a declared outcome.",
|
|
402
|
+
commands: [
|
|
403
|
+
"pm deps <ID>",
|
|
404
|
+
'pm update <ID> --dep "id=<other>,kind=implements"',
|
|
405
|
+
"pm graph analyze",
|
|
406
|
+
"pm graph impact <ID> --direction downstream",
|
|
407
|
+
"pm graph paths <ID> <ID>",
|
|
408
|
+
"pm graph audit",
|
|
409
|
+
],
|
|
410
|
+
workflows: [
|
|
411
|
+
{
|
|
412
|
+
name: "Place New Work In The Ladder",
|
|
413
|
+
goal: "Every item resolves to an outcome through a typed, explainable path.",
|
|
414
|
+
prompt: "Set parent lineage first, then add typed edges that cite durable evidence. Never add an edge to satisfy a count.",
|
|
415
|
+
commands: [
|
|
416
|
+
"pm search \"<topic>\" --limit 10",
|
|
417
|
+
'pm update <ID> --dep "id=<parent-goal>,kind=implements"',
|
|
418
|
+
"pm graph ancestors <ID>",
|
|
419
|
+
],
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
name: "Assess Blast Radius Before Changing Something",
|
|
423
|
+
goal: "Know what derives from an item before touching it.",
|
|
424
|
+
prompt: "Walk the directed graph downstream from the item, then check whether any bottleneck node sits on the path.",
|
|
425
|
+
commands: [
|
|
426
|
+
"pm graph impact <ID> --direction downstream",
|
|
427
|
+
"pm graph dominators <ID>",
|
|
428
|
+
"pm graph articulation",
|
|
429
|
+
],
|
|
430
|
+
},
|
|
431
|
+
],
|
|
432
|
+
docs: [
|
|
433
|
+
{
|
|
434
|
+
path: "docs/RELATIONSHIP_GRAPH.md",
|
|
435
|
+
purpose: "Graph model, traversal verbs, and analytics surface.",
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
path: "docs/DEPENDENCY_KIND_CONTRACT.md",
|
|
439
|
+
purpose: "Every typed edge kind, its direction, and its semantics.",
|
|
440
|
+
},
|
|
441
|
+
],
|
|
442
|
+
related: ["commands", "workflows", "assurance"],
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
id: "assurance",
|
|
446
|
+
aliases: ["gates", "invariants", "measurements", "quality"],
|
|
447
|
+
title: "Declared Invariants and Gates",
|
|
448
|
+
summary: "Express a project's own quality rules as tracked data the SDK evaluates, instead of as scripts.",
|
|
449
|
+
intent: "Use this when a rule must hold over the record itself — a floor, a ceiling, or a monotone property — and must fail closed in CI.",
|
|
450
|
+
commands: [
|
|
451
|
+
"pm assurance list",
|
|
452
|
+
"pm assurance run <gate-id> --trigger ci --dry-run",
|
|
453
|
+
"pm validate --check-resolution --check-history-drift",
|
|
454
|
+
"pm health --summary",
|
|
455
|
+
],
|
|
456
|
+
workflows: [
|
|
457
|
+
{
|
|
458
|
+
name: "Add An Invariant Rather Than A Script",
|
|
459
|
+
goal: "A new enforcement gap becomes declared data, not a new bespoke gate script.",
|
|
460
|
+
prompt: "Define the measurement, bind an assertion with an explicit bound and polarity, prove a negative control, then attach it to a trigger.",
|
|
461
|
+
commands: [
|
|
462
|
+
"pm assurance list --json",
|
|
463
|
+
"pm assurance run <gate-id> --trigger ci --dry-run --json",
|
|
464
|
+
],
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
name: "Read A Verdict Before Believing It",
|
|
468
|
+
goal: "Know which population a passing assertion speaks for.",
|
|
469
|
+
prompt: "Read population_size and scope on every assertion. A gate that cannot fail for the reason it exists is not evidence.",
|
|
470
|
+
commands: [
|
|
471
|
+
"pm assurance run <gate-id> --trigger ci --dry-run --json --output-budget unbounded",
|
|
472
|
+
],
|
|
473
|
+
},
|
|
474
|
+
],
|
|
475
|
+
docs: [
|
|
476
|
+
{
|
|
477
|
+
path: "docs/ASSURANCE.md",
|
|
478
|
+
purpose: "Measurement, assertion, gate, and trigger vocabulary.",
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
path: "docs/MUTATION_INTEGRITY.md",
|
|
482
|
+
purpose: "What every mutation must record to remain provable.",
|
|
483
|
+
},
|
|
484
|
+
],
|
|
485
|
+
related: ["release", "graph", "workflows"],
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
id: "merge",
|
|
489
|
+
aliases: ["branches", "concurrency", "multi-agent", "fleet"],
|
|
490
|
+
title: "Branching, Merging, and Concurrent Agents",
|
|
491
|
+
summary: "Keep tracker data and history conflict-free while many agents work on separate branches.",
|
|
492
|
+
intent: "Use this when more than one agent or worktree mutates the same tracker and the results must merge without hand resolution.",
|
|
493
|
+
commands: [
|
|
494
|
+
"pm merge install",
|
|
495
|
+
"pm claim <ID>",
|
|
496
|
+
"pm release <ID>",
|
|
497
|
+
"pm validate --check-history-drift",
|
|
498
|
+
"pm health --check-only",
|
|
499
|
+
],
|
|
500
|
+
workflows: [
|
|
501
|
+
{
|
|
502
|
+
name: "Prepare A Clone For Field-Aware Merges",
|
|
503
|
+
goal: "The committed merge fence needs clone-local driver configuration once.",
|
|
504
|
+
prompt: "Run the merge installer in every fresh clone or worktree before the first branch merge of tracker data.",
|
|
505
|
+
commands: ["pm merge install", "pm health --check-only"],
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
name: "Hand Work Between Agents Safely",
|
|
509
|
+
goal: "Ownership and evidence survive the handoff.",
|
|
510
|
+
prompt: "Claim before substantial edits, record evidence as comments, and release the claim when pausing, handing off, closing, or canceling.",
|
|
511
|
+
commands: [
|
|
512
|
+
"pm claim <ID>",
|
|
513
|
+
'pm comments <ID> "Handoff: <state and next step>"',
|
|
514
|
+
"pm release <ID>",
|
|
515
|
+
],
|
|
516
|
+
},
|
|
517
|
+
],
|
|
518
|
+
docs: [
|
|
519
|
+
{
|
|
520
|
+
path: "docs/MERGE_SAFETY.md",
|
|
521
|
+
purpose: "Merge driver, field-aware resolution, and clone setup.",
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
path: "docs/SDK_CONTEXT_COORDINATION.md",
|
|
525
|
+
purpose: "Coordination primitives for concurrent agents.",
|
|
526
|
+
},
|
|
527
|
+
],
|
|
528
|
+
related: ["workflows", "assurance", "commands"],
|
|
529
|
+
},
|
|
341
530
|
];
|
|
342
531
|
const TOPIC_BY_TOKEN = new Map();
|
|
343
532
|
for (const topic of GUIDE_TOPICS) {
|
|
@@ -376,4 +565,4 @@ export function resolveGuideTopic(rawTopic) {
|
|
|
376
565
|
return TOPIC_BY_TOKEN.get(normalized) ?? null;
|
|
377
566
|
}
|
|
378
567
|
//# sourceMappingURL=guide-topics.js.map
|
|
379
|
-
//# debugId=
|
|
568
|
+
//# debugId=e791d84f-7d4c-59fa-9644-527109dbb596
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { PM_COMMAND_VISIBILITY_CONTRACTS, PM_MCP_PROMPT_CONTRACTS, PM_MCP_RESOUR
|
|
|
7
7
|
export * from "./agent-session-context.js";
|
|
8
8
|
export type { PmCommandVisibilityContract, PmCommandVisibilityTier, PmMcpPromptArgumentContract, PmMcpPromptContract, PmMcpResourceContract, PmMcpToolProfile, } from "./agent-capability-contracts.js";
|
|
9
9
|
export { isErrnoError, limitAnnotationEntries, parseAnnotationTextInput, readAnnotationEntries, normalizeAnnotationTransportOptions, resolveAnnotationInput, resolveAnnotationIndex, runAnnotationCommand, wrapOwnershipConflict, type AnnotationCommandConfig, type AnnotationCommandOptions, type AnnotationCommandResult, type AnnotationEntry, type AnnotationInput, type AnnotationHistoryRestoration, type AnnotationMutationReceipt, type AnnotationOmissionReceipt, type AnnotationSourceOptions, type OwnershipConflictGuidance, } from "./annotations.js";
|
|
10
|
-
export { acknowledgeUnknownAuthorHistoryEvents, acknowledgeUnknownAuthorHistoryEventsFromTransport, inspectHistoryAuthorStream, parseUnknownAuthorHistoryEventCoordinates, resolveUnknownAuthorAcknowledgmentSelector, scanHistoryAuthorAttribution, type AcknowledgeUnknownAuthorEventsOptions, type HistoryAuthorAttributionScan, type UnknownAuthorHistoryEvent, } from "./author-attribution.js";
|
|
10
|
+
export { acknowledgeUnknownAuthorHistoryEvents, acknowledgeUnknownAuthorHistoryEventsFromTransport, inspectHistoryAuthorStream, parseUnknownAuthorHistoryEventCoordinates, planUnknownAuthorHistoryAcknowledgment, resolveUnknownAuthorAcknowledgmentSelector, scanHistoryAuthorAttribution, type AcknowledgeUnknownAuthorEventsOptions, type HistoryAuthorAttributionScan, type UnknownAuthorAcknowledgmentPlan, type UnknownAuthorAcknowledgmentPlanCoordinate, type UnknownAuthorAcknowledgmentResult, type UnknownAuthorHistoryEvent, } from "./author-attribution.js";
|
|
11
11
|
export { BUILTIN_CORPUS_SHAPES, PM_CORPUS_SHAPE_SCHEMA, buildCorpusShapeItemPlan, createCorpusShapeMeasurement, defineCorpusShape, listBuiltinCorpusShapes, measureCorpusShapePlan, resolveBuiltinCorpusShape, type BuiltinCorpusShapeName, type CorpusShape, type CorpusShapeEdgeWeight, type CorpusShapeItemPlan, type CorpusShapeMeasurement, type CorpusShapeProfile, } from "./corpus-shape.js";
|
|
12
12
|
export * from "./core-governance.js";
|
|
13
13
|
export { createPmCliProgram } from "./cli-program.js";
|
|
@@ -22,6 +22,7 @@ export * from "./agent/command-suggestions.js";
|
|
|
22
22
|
export * from "./agent/item-addressing.js";
|
|
23
23
|
export * from "./agent/create-option-policy.js";
|
|
24
24
|
export { runGc, type GcCheckpointsSummary, type GcLocksSummary, } from "./governance/gc.js";
|
|
25
|
+
export { PM_EXACT_COVERAGE_METRICS, findCoverageDeficits, type PmCoverageDeficit, type PmExactCoverageMetric, } from "./governance/coverage-assurance.js";
|
|
25
26
|
export { _testOnlyHealthCommand, runHealth, type HealthCheck, } from "./governance/health.js";
|
|
26
27
|
export { _testOnlyValidateCommand, projectValidateCounts, runValidate, type ValidateCheck, type ValidateCountsFixesSummary, type ValidateCountsResult, type ValidateFixesSummary, type ValidateMutationServices, } from "./governance/validate.js";
|
|
27
28
|
export { runExtension, type ExtensionCommandAction } from "./extension.js";
|
|
@@ -35,6 +36,7 @@ export { isRuntimeRecord } from "./runtime-input.js";
|
|
|
35
36
|
export { resolveStartTaskInProgressStatus } from "./start-task-status.js";
|
|
36
37
|
export { auditMergeAttributeFence, buildMergeAttributePatterns, findGitWorkspaceRoot, installMergeFence, refreshMergeAttributeFenceIfInstalled, resolveMergeInstallContext, resolveProjectMergeTypeFolders, runMergeInstall, type MergeFenceAuditResult, type MergeFenceRefreshOutcome, type MergeInstallOptions, type MergeInstallContextResolution, type MergeInstallResult, } from "./merge/install.js";
|
|
37
38
|
export { deriveSchemaEvolutionMigrationId, formatSchemaEvolutionMigrationHuman, planSchemaEvolutionMigration, runSchemaEvolutionMigration, type PlanSchemaEvolutionMigrationOptions, type SchemaEvolutionFieldChange, type SchemaEvolutionItemPlan, type SchemaEvolutionMigrationPlan, } from "./schema-migration.js";
|
|
39
|
+
export type { RuntimeFieldDefinition, RuntimeFieldValueSchema, } from "./schema.js";
|
|
38
40
|
export { runWithActiveExtensions, type ActiveExtensionScopeOptions, } from "./runtime.js";
|
|
39
41
|
export { applyInvocationAuthorOverride } from "./invocation-author.js";
|
|
40
42
|
export { evaluateMutationGuard, getMutationActionContract, isMutationAction, listMutationActions, PM_MUTATION_ACTION_CONTRACTS, scanMutationSecrets, type EvaluateMutationGuardOptions, type MutationActionContract, type MutationGuardResult, type MutationGuardSettings, type MutationHistoryScope, type SecretGuardFinding, type SecretGuardMode, } from "./mutation-guard.js";
|
|
@@ -59,6 +61,8 @@ export * from "./governance/assurance.js";
|
|
|
59
61
|
export * from "./governance/assurance-action.js";
|
|
60
62
|
export * from "./governance/assurance-runtime.js";
|
|
61
63
|
export * from "./governance/assurance-presets.js";
|
|
64
|
+
export * from "./governance/boundary-fixtures.js";
|
|
65
|
+
export * from "./governance/defect-recurrence.js";
|
|
62
66
|
export * from "./compile-cache.js";
|
|
63
67
|
export * from "./environment/project-runtime-compatibility.js";
|
|
64
68
|
export * from "./environment/source-context.js";
|
package/dist/sdk/index.js
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* Defines public SDK APIs and package-author helpers for Index.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fe5e55c6-aabb-53c7-bdbb-16f2ea78f180")}catch(e){}}();
|
|
8
8
|
export { PM_COMMAND_VISIBILITY_CONTRACTS, PM_MCP_PROMPT_CONTRACTS, PM_MCP_RESOURCE_CONTRACTS, PM_MCP_TOOL_COMMAND_CONTRACTS, listPmCommandsForTier, listPmMcpToolsForProfile, renderPmCommandVisibilityMarkdown, resolvePmCommandVisibilityTier, } from "./agent-capability-contracts.js";
|
|
9
9
|
export * from "./agent-session-context.js";
|
|
10
10
|
export { isErrnoError, limitAnnotationEntries, parseAnnotationTextInput, readAnnotationEntries, normalizeAnnotationTransportOptions, resolveAnnotationInput, resolveAnnotationIndex, runAnnotationCommand, wrapOwnershipConflict, } from "./annotations.js";
|
|
11
|
-
export { acknowledgeUnknownAuthorHistoryEvents, acknowledgeUnknownAuthorHistoryEventsFromTransport, inspectHistoryAuthorStream, parseUnknownAuthorHistoryEventCoordinates, resolveUnknownAuthorAcknowledgmentSelector, scanHistoryAuthorAttribution, } from "./author-attribution.js";
|
|
11
|
+
export { acknowledgeUnknownAuthorHistoryEvents, acknowledgeUnknownAuthorHistoryEventsFromTransport, inspectHistoryAuthorStream, parseUnknownAuthorHistoryEventCoordinates, planUnknownAuthorHistoryAcknowledgment, resolveUnknownAuthorAcknowledgmentSelector, scanHistoryAuthorAttribution, } from "./author-attribution.js";
|
|
12
12
|
export { BUILTIN_CORPUS_SHAPES, PM_CORPUS_SHAPE_SCHEMA, buildCorpusShapeItemPlan, createCorpusShapeMeasurement, defineCorpusShape, listBuiltinCorpusShapes, measureCorpusShapePlan, resolveBuiltinCorpusShape, } from "./corpus-shape.js";
|
|
13
13
|
export * from "./core-governance.js";
|
|
14
14
|
export { createPmCliProgram } from "./cli-program.js";
|
|
@@ -23,6 +23,7 @@ export * from "./agent/command-suggestions.js";
|
|
|
23
23
|
export * from "./agent/item-addressing.js";
|
|
24
24
|
export * from "./agent/create-option-policy.js";
|
|
25
25
|
export { runGc, } from "./governance/gc.js";
|
|
26
|
+
export { PM_EXACT_COVERAGE_METRICS, findCoverageDeficits, } from "./governance/coverage-assurance.js";
|
|
26
27
|
export { _testOnlyHealthCommand, runHealth, } from "./governance/health.js";
|
|
27
28
|
export { _testOnlyValidateCommand, projectValidateCounts, runValidate, } from "./governance/validate.js";
|
|
28
29
|
export { runExtension } from "./extension.js";
|
|
@@ -57,6 +58,8 @@ export * from "./governance/assurance.js";
|
|
|
57
58
|
export * from "./governance/assurance-action.js";
|
|
58
59
|
export * from "./governance/assurance-runtime.js";
|
|
59
60
|
export * from "./governance/assurance-presets.js";
|
|
61
|
+
export * from "./governance/boundary-fixtures.js";
|
|
62
|
+
export * from "./governance/defect-recurrence.js";
|
|
60
63
|
export * from "./compile-cache.js";
|
|
61
64
|
export * from "./environment/project-runtime-compatibility.js";
|
|
62
65
|
export * from "./environment/source-context.js";
|
|
@@ -151,4 +154,4 @@ export * from "./governance.js";
|
|
|
151
154
|
export * from "./query.js";
|
|
152
155
|
export * from "./testing.js";
|
|
153
156
|
//# sourceMappingURL=index.js.map
|
|
154
|
-
//# debugId=
|
|
157
|
+
//# debugId=fe5e55c6-aabb-53c7-bdbb-16f2ea78f180
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm create command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7d69bb56-9fab-5059-9357-5b6bea2078b9")}catch(e){}}();
|
|
8
8
|
import { pathExists, removeFileIfExists, writeFileAtomic, appendHistoryEntry, createHistoryEntry, generateItemId, normalizeItemId, canonicalDocument, normalizeItemMetadata, serializeItemDocument, assertParentReferenceIsNotSelf, isPlaceholderReferenceToken, normalizeParentReferenceValue, validateMissingParentReference, validateSprintOrReleaseValue, assertNoUnknownCsvKeys, createStdinTokenResolver, looksLikeGenericKeyValueEntry, mergeAdditiveTags, parseCsvKv, parseOptionalNonNegativeInteger, parseOptionalNumber, parseTags, resolvePriority, getFocusedItem, normalizeStatusInput, canonicalizeCommandOptionKey, commandOptionFlagLabel, resolveItemTypeRegistry, resolveCommandOptionPolicyState, resolveTypeDefinition, resolveTypeName, validateTypeOptions, acquireLock, printError, buildInvalidTypeError, resolveTypeSynonym, collectRuntimeCreateFieldValues, resolveItemTypesFilePath, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, EXIT_CODE, ITEM_METADATA_KEY_ORDER, PmCliError, nowIso, resolveIsoOrRelative, getActiveExtensionRegistrations, projectAfterCommandItemSnapshot, recordAfterCommandAffectedItem, runActiveCommandHandler, runActiveBeforeMutationHooks, runActiveOnWriteHooks, collectRegisteredItemFieldNames, applyRegisteredItemFieldDefaultsAndValidation, parseRegisteredItemFieldAssignments, listAllItemMetadataLight, locateItem, createMutationGuardSdk, getHistoryPath, getItemPath, getSettingsPath, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
|
|
9
9
|
import { requireTerminalReasonWithRecovery } from "../lifecycle-policy.js";
|
|
10
10
|
import { evaluateSimilarityGovernance, similarityAdvisoryWarnings, } from "../similarity.js";
|
|
@@ -1700,6 +1700,8 @@ export async function runCreate(options, global) {
|
|
|
1700
1700
|
itemFormat: settings.item_format,
|
|
1701
1701
|
typeToFolder: typeRegistry.type_to_folder,
|
|
1702
1702
|
allowUnresolved: resolvedOptions.allowUnresolvedDeps,
|
|
1703
|
+
holders: [{ id, createdAt: nowValue }],
|
|
1704
|
+
schema: settings.schema,
|
|
1703
1705
|
})));
|
|
1704
1706
|
status = blockedByResolution.status;
|
|
1705
1707
|
const blockedReason = resolveUnsettableOptionalString(unsetKeys, "blocked_reason", resolvedOptions.blockedReason);
|
|
@@ -1888,4 +1890,4 @@ export const _testOnlyCreateCommand = {
|
|
|
1888
1890
|
typeOptionExampleValue,
|
|
1889
1891
|
};
|
|
1890
1892
|
//# sourceMappingURL=create.js.map
|
|
1891
|
-
//# debugId=
|
|
1893
|
+
//# debugId=7d69bb56-9fab-5059-9357-5b6bea2078b9
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm update many command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e797d654-df89-554b-876b-cb2faa350bd0")}catch(e){}}();
|
|
8
8
|
import { pathExists, createCheckpointId, loadMutationCheckpoint, restoreCheckpointItems, writeMutationCheckpoint, toItemRecord, applyAcceptanceCriteriaMutations, applyTagRemovals, mergeAdditiveTags, parseOptionalNonNegativeInteger, parseTags, splitAcceptanceCriteria, resolvePriority, normalizeStatusInput, resolveItemTypeRegistry, resolveTypeName, collectRuntimeUpdateFieldValues, buildInvalidTypeError, resolveItemTypesFilePath, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, EXIT_CODE, PmCliError, toErrorMessage, stableValueEquals, nowIso, resolveIsoOrRelative, getActiveExtensionRegistrations, getSettingsPath, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
|
|
9
9
|
import { assertDependencyTargetsResolvable } from "../dependency-flag-validation.js";
|
|
10
10
|
import { parseStatusFilterCsv } from "../../core/item/status-filter.js";
|
|
@@ -818,6 +818,19 @@ export const runUpdateMany = async (options, global) => {
|
|
|
818
818
|
updateSummary,
|
|
819
819
|
dependencyWarnings,
|
|
820
820
|
});
|
|
821
|
+
await assertDependencyTargetsResolvable({
|
|
822
|
+
pmRoot: runtime.pmRoot,
|
|
823
|
+
dependencies: parseDependencyAdditions(options.update.dep, runtime.settings.id_prefix, nowIso(), resolveAuthor(options.update.author, runtime.settings.author_default)).additions,
|
|
824
|
+
idPrefix: runtime.settings.id_prefix,
|
|
825
|
+
itemFormat: runtime.settings.item_format,
|
|
826
|
+
typeToFolder: resolveItemTypeRegistry(runtime.settings, getActiveExtensionRegistrations()).type_to_folder,
|
|
827
|
+
allowUnresolved: options.update.allowUnresolvedDeps,
|
|
828
|
+
holders: plan.listed.items.map((item) => ({
|
|
829
|
+
id: item.id,
|
|
830
|
+
createdAt: item.created_at,
|
|
831
|
+
})),
|
|
832
|
+
schema: runtime.settings.schema,
|
|
833
|
+
});
|
|
821
834
|
return options.dryRun === true
|
|
822
835
|
? buildUpdateManyDryRunResult(plan)
|
|
823
836
|
: applyUpdateManyPlan({ runtime, options, global, plan });
|
|
@@ -840,4 +853,4 @@ export const _testOnlyUpdateManyCommand = {
|
|
|
840
853
|
toComparablePreviewValue,
|
|
841
854
|
};
|
|
842
855
|
//# sourceMappingURL=update-many.js.map
|
|
843
|
-
//# debugId=
|
|
856
|
+
//# debugId=e797d654-df89-554b-876b-cb2faa350bd0
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm update command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a421c150-13a9-5334-85a4-5b3199a5d2c7")}catch(e){}}();
|
|
8
8
|
import { pathExists, COMMON_MUTATION_COMMAND_OPTION_KEYS, canonicalizeCommandOptionKey, commandOptionFlagLabel, resolveItemTypeRegistry, resolveCommandOptionPolicyState, resolveTypeDefinition, resolveTypeName, validateTypeOptions, normalizeItemId, toItemRecord, buildInvalidTypeError, assertParentReferenceIsNotSelf, normalizeParentReferenceValue, validateMissingParentReference, validateSprintOrReleaseValue, applyAcceptanceCriteriaMutations, applyTagRemovals, assertNoUnknownCsvKeys, createStdinTokenResolver, looksLikeGenericKeyValueEntry, mergeAdditiveTags, parseCsvKv, parseOptionalNonNegativeInteger, parseOptionalNumber, parseTags, splitAcceptanceCriteria, resolvePriority, normalizeStatusInput, isTerminalStatus, collectRuntimeUpdateFieldValues, resolveItemTypesFilePath, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, describeAllowedTransitions, evaluateTransition, resolveTypeWorkflows, EXIT_CODE, PmCliError, stableValueEquals, resolveIsoOrRelative, getActiveExtensionRegistrations, collectRegisteredItemFieldNames, applyRegisteredItemFieldDefaultsAndValidation, parseRegisteredItemFieldAssignments, buildItemNotFoundError, listAllItemMetadataLight, locateItem, mutateItem, readLocatedItem, getSettingsPath, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
|
|
9
9
|
import { runClose } from "./close.js";
|
|
10
10
|
import { normalizeRiskInput, normalizeSeverityInput, parseConfidenceInput, parseRegressionInput, } from "./metadata-normalizers.js";
|
|
@@ -1743,6 +1743,7 @@ export async function runUpdate(id, options, global) {
|
|
|
1743
1743
|
const nowValue = new Date();
|
|
1744
1744
|
const nowIso = nowValue.toISOString();
|
|
1745
1745
|
const dependencyUpdates = parseDependencyAdditions(options.dep, settings.id_prefix, nowIso, author);
|
|
1746
|
+
assertDependencyEdgesAllowed(id, dependencyUpdates.additions);
|
|
1746
1747
|
const dependencyTargetWarnings = await assertDependencyTargetsResolvable({
|
|
1747
1748
|
pmRoot,
|
|
1748
1749
|
dependencies: dependencyUpdates.additions,
|
|
@@ -1750,6 +1751,8 @@ export async function runUpdate(id, options, global) {
|
|
|
1750
1751
|
itemFormat: settings.item_format,
|
|
1751
1752
|
typeToFolder: typeRegistry.type_to_folder,
|
|
1752
1753
|
allowUnresolved: options.allowUnresolvedDeps,
|
|
1754
|
+
holders: [{ id }],
|
|
1755
|
+
schema: settings.schema,
|
|
1753
1756
|
});
|
|
1754
1757
|
const dependencyRemovals = parseDependencyRemovals(options.depRemove, settings.id_prefix);
|
|
1755
1758
|
const parsedCommentUpdates = parseLogSeed("--comment", options.comment, nowIso, author);
|
|
@@ -1897,4 +1900,4 @@ export const _testOnlyUpdateCommand = {
|
|
|
1897
1900
|
resolveRuntimeUnsetDefinition: (token, registry) => resolveRuntimeUnsetFieldDefinition(token, "update", registry),
|
|
1898
1901
|
};
|
|
1899
1902
|
//# sourceMappingURL=update.js.map
|
|
1900
|
-
//# debugId=
|
|
1903
|
+
//# debugId=a421c150-13a9-5334-85a4-5b3199a5d2c7
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm linked artifacts command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="72f57c4d-65c5-57f1-a16a-f6c970aca680")}catch(e){}}();
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import fg from "fast-glob";
|
|
@@ -83,24 +83,73 @@ function expandBareCommaSeparatedAddEntries(raw) {
|
|
|
83
83
|
return splitCommaList(trimmed);
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
+
/** Whether a Markdown destination contains only balanced parentheses. */
|
|
87
|
+
function hasBalancedParentheses(value) {
|
|
88
|
+
let depth = 0;
|
|
89
|
+
for (const character of value) {
|
|
90
|
+
if (character === "(")
|
|
91
|
+
depth += 1;
|
|
92
|
+
if (character === ")")
|
|
93
|
+
depth -= 1;
|
|
94
|
+
if (depth < 0)
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
return depth === 0;
|
|
98
|
+
}
|
|
99
|
+
/** Parse one lossless bare, Markdown, or CSV-label remote documentation reference. */
|
|
100
|
+
function parseDocumentationReference(trimmed) {
|
|
101
|
+
if (/^[A-Za-z][A-Za-z0-9+.-]*:\/\//u.test(trimmed) &&
|
|
102
|
+
!looksLikeStructuredPathEntry(trimmed)) {
|
|
103
|
+
return { path: trimmed, scope: "project", note: undefined };
|
|
104
|
+
}
|
|
105
|
+
const labelEnd = trimmed.indexOf("](");
|
|
106
|
+
if (trimmed.startsWith("[") && labelEnd > 0 && trimmed.endsWith(")")) {
|
|
107
|
+
const destination = trimmed.slice(labelEnd + 2, -1).trim();
|
|
108
|
+
if (destination.length > 0 && hasBalancedParentheses(destination)) {
|
|
109
|
+
return {
|
|
110
|
+
path: destination,
|
|
111
|
+
scope: "project",
|
|
112
|
+
note: trimmed.slice(1, labelEnd).trim() || undefined,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const delimiterIndex = trimmed.indexOf(",");
|
|
117
|
+
if (delimiterIndex < 0)
|
|
118
|
+
return undefined;
|
|
119
|
+
const label = trimmed.slice(0, delimiterIndex).trim();
|
|
120
|
+
const destination = trimmed.slice(delimiterIndex + 1).trim();
|
|
121
|
+
if (label.length === 0 ||
|
|
122
|
+
!/^[A-Za-z][A-Za-z0-9+.-]*:\/\//u.test(destination)) {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
return { path: destination, scope: "project", note: label };
|
|
126
|
+
}
|
|
86
127
|
/** Implements parse add entries for the public runtime surface of this module. */
|
|
87
128
|
export function parseAddEntries(raw, bareNoun) {
|
|
88
129
|
if (!raw)
|
|
89
130
|
return [];
|
|
90
|
-
return
|
|
131
|
+
return raw.flatMap((entry) => {
|
|
91
132
|
const trimmed = entry.trim();
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
if (!kv.path) {
|
|
97
|
-
throw new PmCliError(`--add requires path=<value> or a bare ${bareNoun} path`, EXIT_CODE.USAGE);
|
|
133
|
+
if (bareNoun === "doc") {
|
|
134
|
+
const reference = parseDocumentationReference(trimmed);
|
|
135
|
+
if (reference !== undefined)
|
|
136
|
+
return [reference];
|
|
98
137
|
}
|
|
99
|
-
return {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
138
|
+
return expandBareCommaSeparatedAddEntries([entry]).map((expanded) => {
|
|
139
|
+
const expandedTrimmed = expanded.trim();
|
|
140
|
+
const kv = looksLikeStructuredPathEntry(expandedTrimmed)
|
|
141
|
+
? parseCsvKv(expanded, "--add")
|
|
142
|
+
: { path: expandedTrimmed };
|
|
143
|
+
assertNoUnknownCsvKeys(kv, "--add", LINKED_ARTIFACT_ADD_KEYS);
|
|
144
|
+
if (!kv.path) {
|
|
145
|
+
throw new PmCliError(`--add requires path=<value> or a bare ${bareNoun} path`, EXIT_CODE.USAGE);
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
path: kv.path,
|
|
149
|
+
scope: ensureScope(kv.scope),
|
|
150
|
+
note: kv.note?.trim() || undefined,
|
|
151
|
+
};
|
|
152
|
+
});
|
|
104
153
|
});
|
|
105
154
|
}
|
|
106
155
|
/** Implements parse add glob entries for the public runtime surface of this module. */
|
|
@@ -490,4 +539,4 @@ export function renameArtifactsResultKey(result, key) {
|
|
|
490
539
|
return out;
|
|
491
540
|
}
|
|
492
541
|
//# sourceMappingURL=linked-artifacts.js.map
|
|
493
|
-
//# debugId=
|
|
542
|
+
//# debugId=72f57c4d-65c5-57f1-a16a-f6c970aca680
|
package/dist/sdk/query/get.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ interface ClaimStateContext {
|
|
|
19
19
|
last_release: ClaimHistoryContext | null;
|
|
20
20
|
}
|
|
21
21
|
type GetItemProjection = Partial<ItemMetadata> & {
|
|
22
|
+
/** Canonical item identity retained by every depth and field projection. */
|
|
23
|
+
id: string;
|
|
22
24
|
body?: string;
|
|
23
25
|
/** Number of notes omitted by a token-bounded projection. */
|
|
24
26
|
notes_count?: number;
|
package/dist/sdk/query/get.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the SDK-owned item query shared by every surface.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c35e787c-a9a1-5ffa-9dcf-62780fceed4c")}catch(e){}}();
|
|
8
8
|
import { pathExists, getActiveExtensionRegistrations, toItemRecord, resolveItemTypeRegistry, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, EXIT_CODE, ITEM_METADATA_KEY_ORDER, TYPE_TO_FOLDER, PmCliError, buildItemNotFoundError, listAllItemMetadataLight, locateItem, readLocatedItem, getHistoryPath, getSettingsPath, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
|
|
9
9
|
import { readHistoryEntries } from "../history-read.js";
|
|
10
10
|
import { recordContextUsageTouches } from "../context-usage.js";
|
|
@@ -44,7 +44,10 @@ function itemMaterialFieldGroups(item, body) {
|
|
|
44
44
|
return [
|
|
45
45
|
...(body.length > 0 ? ["body"] : []),
|
|
46
46
|
...Object.entries(collectionCounts).flatMap(([name, count]) => count > 0 ? [name] : []),
|
|
47
|
-
...(collectionCounts.files +
|
|
47
|
+
...(collectionCounts.files +
|
|
48
|
+
collectionCounts.tests +
|
|
49
|
+
collectionCounts.docs >
|
|
50
|
+
0
|
|
48
51
|
? ["linked"]
|
|
49
52
|
: []),
|
|
50
53
|
"children",
|
|
@@ -195,6 +198,30 @@ function validateGetFields(fields, runtimeMetadataKeys) {
|
|
|
195
198
|
});
|
|
196
199
|
}
|
|
197
200
|
}
|
|
201
|
+
const EMPTY_PROJECTED_COLLECTION_FIELDS = new Set([
|
|
202
|
+
"comments",
|
|
203
|
+
"notes",
|
|
204
|
+
"learnings",
|
|
205
|
+
"files",
|
|
206
|
+
"tests",
|
|
207
|
+
"test_runs",
|
|
208
|
+
"docs",
|
|
209
|
+
"reminders",
|
|
210
|
+
"events",
|
|
211
|
+
"dependencies",
|
|
212
|
+
"plan_steps",
|
|
213
|
+
"plan_decisions",
|
|
214
|
+
"plan_discoveries",
|
|
215
|
+
"plan_validation",
|
|
216
|
+
]);
|
|
217
|
+
/** Resolve one projected metadata value while distinguishing an empty requested collection from an omitted field. */
|
|
218
|
+
function projectedMetadataValue(source, counts, field) {
|
|
219
|
+
if (Object.hasOwn(counts, field))
|
|
220
|
+
return counts[field];
|
|
221
|
+
if (source[field] !== undefined)
|
|
222
|
+
return source[field];
|
|
223
|
+
return EMPTY_PROJECTED_COLLECTION_FIELDS.has(field) ? [] : undefined;
|
|
224
|
+
}
|
|
198
225
|
function projectItemForFields(item, fields) {
|
|
199
226
|
const source = toItemRecord(item);
|
|
200
227
|
const omittedCounts = {
|
|
@@ -202,7 +229,7 @@ function projectItemForFields(item, fields) {
|
|
|
202
229
|
tests_count: item.tests?.length ?? 0,
|
|
203
230
|
collection_counts: itemCollectionCounts(item),
|
|
204
231
|
};
|
|
205
|
-
const projected = {};
|
|
232
|
+
const projected = { id: item.id };
|
|
206
233
|
for (const field of fields) {
|
|
207
234
|
const normalized = normalizeGetField(field);
|
|
208
235
|
if (normalized === "body" ||
|
|
@@ -216,9 +243,7 @@ function projectItemForFields(item, fields) {
|
|
|
216
243
|
normalized.startsWith("schedule.")) {
|
|
217
244
|
continue;
|
|
218
245
|
}
|
|
219
|
-
projected[normalized] =
|
|
220
|
-
? omittedCounts[normalized]
|
|
221
|
-
: source[normalized];
|
|
246
|
+
projected[normalized] = projectedMetadataValue(source, omittedCounts, normalized);
|
|
222
247
|
}
|
|
223
248
|
return projected;
|
|
224
249
|
}
|
|
@@ -438,4 +463,4 @@ export const _testOnlyGetCommand = {
|
|
|
438
463
|
shouldAutoIncludeGetChildren,
|
|
439
464
|
};
|
|
440
465
|
//# sourceMappingURL=get.js.map
|
|
441
|
-
//# debugId=
|
|
466
|
+
//# debugId=c35e787c-a9a1-5ffa-9dcf-62780fceed4c
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* surface without coupling package authors to command-specific option names.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
8
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e9621264-0180-53cf-862f-b59640b971da")}catch(e){}}();
|
|
9
9
|
import { EXIT_CODE } from "../core/shared/constants.js";
|
|
10
10
|
import { PmCliError } from "../core/shared/errors.js";
|
|
11
11
|
import { compactReadOutputToBudget, estimateReadOutputTokens, updateReadOutputReceiptEstimate, } from "./read-output-budget.js";
|
|
@@ -499,7 +499,9 @@ export function resolveReadOutputDimensions(command, options) {
|
|
|
499
499
|
const encoding = resolveEncodingValue(options.outputFormat ?? options.output_format, legacyByDimension.encoding);
|
|
500
500
|
const explicitCost = resolveCostValue(options.outputBudget ?? options.output_budget, legacyByDimension.cost);
|
|
501
501
|
const completeResultIntent = command.trim().toLowerCase().replaceAll(/\s+/gu, " ").split(" ")[0] ===
|
|
502
|
-
"list-all" ||
|
|
502
|
+
"list-all" ||
|
|
503
|
+
legacyByDimension.amount?.flag === "--no-truncate" ||
|
|
504
|
+
legacyByDimension.include?.flag === "--full";
|
|
503
505
|
const budget = resolvePmCommandOutputBudget(command, {
|
|
504
506
|
generateFallback: true,
|
|
505
507
|
});
|
|
@@ -1056,4 +1058,4 @@ export function resolveReadOutputEncoding(command, options) {
|
|
|
1056
1058
|
: undefined;
|
|
1057
1059
|
}
|
|
1058
1060
|
//# sourceMappingURL=read-output-contracts.js.map
|
|
1059
|
-
//# debugId=
|
|
1061
|
+
//# debugId=e9621264-0180-53cf-862f-b59640b971da
|