@unbrained/pm-cli 2026.9.23 → 2026.9.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/.agents/skills/README.md +1 -0
- package/.agents/skills/pm-developer/SKILL.md +3 -0
- package/.agents/skills/pm-test-audit/LICENSE.txt +21 -0
- package/.agents/skills/pm-test-audit/SKILL.md +103 -0
- package/.agents/skills/pm-test-audit/references/AUDIT.md +54 -0
- package/.agents/skills/pm-test-audit/references/CAMPAIGN.md +47 -0
- package/.claude-plugin/marketplace.json +2 -2
- package/AGENTS.md +6 -20
- package/CHANGELOG.md +49 -1
- package/dist/cli/error-guidance.d.ts +9 -0
- package/dist/cli/error-guidance.js +1 -1
- package/dist/cli/help-content.js +1 -1
- package/dist/cli/register-list-query.js +2 -2
- package/dist/cli/schema/registration.js +2 -2
- package/dist/cli-bundle/bundle-manifest.json +149 -149
- package/dist/cli-bundle/chunks/{chunk-NBGSRFZE.js → chunk-4ODHIX7N.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VO7DHENB.js → chunk-FOTXRNY6.js} +39 -39
- package/dist/cli-bundle/chunks/chunk-GRWPZR7F.js +29 -0
- package/dist/cli-bundle/chunks/{chunk-E6ZES2X7.js → chunk-HTHTX6E6.js} +6 -6
- package/dist/cli-bundle/chunks/chunk-IYN4MJ2C.js +238 -0
- package/dist/cli-bundle/chunks/{chunk-6WBR6GMW.js → chunk-MJWKR7YA.js} +63 -62
- package/dist/cli-bundle/chunks/{chunk-ZSVINTXT.js → chunk-QQD3VRMZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SXRMM72R.js → chunk-SZQCHJI4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZWSWR2GX.js → chunk-TC74K7SS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PFWCAI4X.js → chunk-TYJXMT3Q.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KOUT5SAA.js → chunk-U55RYT3I.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WBB5B7G5.js → chunk-VMO4P5MX.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-IFPQ4YRD.js → register-list-query-426QTRET.js} +4 -4
- package/dist/cli-bundle/chunks/{register-mutation-C3O7OSXW.js → register-mutation-FLI3HHMP.js} +4 -4
- package/dist/cli-bundle/chunks/{register-operations-LGO7DBZ7.js → register-operations-TP7ZG4MK.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-4EW2PPZD.js → register-setup-574SIVQZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-25BBHWMH.js +20 -0
- package/dist/cli-bundle/focused-chunks/{chunk-YE6F5HGF.js → chunk-ABA3KRPY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-H3BI4EDO.js +75 -0
- package/dist/cli-bundle/focused-chunks/chunk-HNHMK5JI.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-S5JYIFFS.js → chunk-HQPTDJLF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-LZOEUNHR.js → chunk-MK5AKKHK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-6CWR2QFM.js → chunk-NRHTXBTI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-L554BKFH.js → chunk-NVVB2HJC.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-PIHQNL32.js → chunk-O7MIBEMK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-BKXYQQDT.js → chunk-OY3VHCTX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-N2JYYEHM.js → chunk-PMPFLA6X.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-HJA6OHWT.js → chunk-Q355NPLH.js} +28 -28
- package/dist/cli-bundle/focused-chunks/{chunk-BQSKFRL2.js → chunk-TLF6N56J.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-QREDJ77O.js → chunk-UIFVIE5F.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-E5AOEXF5.js → chunk-XKH2FC5D.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-FIQYVDLL.js → chunk-XVBWZTU2.js} +11 -11
- package/dist/cli-bundle/main.js +22 -22
- 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 +30 -45
- 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 +58 -42
- 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 +9 -10
- package/dist/core/policy/workflow-policy-store.js +1 -1
- package/dist/core/search/embedding-batches.d.ts +47 -15
- package/dist/core/search/embedding-batches.js +1 -1
- package/dist/core/search/eval-thresholds.d.ts +14 -0
- package/dist/core/search/eval-thresholds.js +2 -0
- package/dist/core/search/eval.d.ts +4 -1
- package/dist/core/search/eval.js +1 -1
- package/dist/core/search/http-client.d.ts +7 -0
- package/dist/core/search/http-client.js +1 -1
- package/dist/core/shared/errors.d.ts +13 -0
- package/dist/core/shared/errors.js +1 -1
- package/dist/sdk/completion/bash.js +1 -1
- package/dist/sdk/eval.d.ts +19 -17
- package/dist/sdk/eval.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/governance/health.d.ts +1 -1
- package/dist/sdk/governance/health.js +1 -1
- package/dist/sdk/governance/reindex.d.ts +4 -1
- package/dist/sdk/governance/reindex.js +2 -2
- package/dist/sdk/init-agent-guidance.d.ts +2 -1
- package/dist/sdk/init-agent-guidance.js +2 -2
- package/dist/sdk/merge/install.js +2 -2
- package/dist/sdk/merge/worktree-config.d.ts +9 -0
- package/dist/sdk/merge/worktree-config.js +2 -0
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query.d.ts +3 -0
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/runtime/schema-preview.d.ts +2 -0
- package/dist/sdk/runtime/schema-preview.js +2 -0
- package/dist/sdk/runtime/schema.js +1 -1
- package/dist/sdk/runtime-primitives.d.ts +2 -1
- package/dist/sdk/runtime-primitives.js +1 -1
- package/docs/AGENT_RECOVERY_AND_GUIDANCE.md +49 -0
- package/docs/CHATGPT_CODEX_PLUGIN_IMPLEMENTATION.md +2 -0
- package/docs/CLAUDE_CODE_PLUGIN.md +18 -7
- package/docs/CODEX_PLUGIN.md +5 -12
- package/docs/DEFECT_RECURRENCE.md +8 -1
- package/docs/DEPENDENCY_KIND_CONTRACT.md +27 -0
- package/docs/MERGE_SAFETY.md +28 -5
- package/docs/README.md +2 -0
- package/docs/RELEASE_RELIABILITY.md +70 -0
- package/docs/RELEASING.md +9 -1
- package/docs/SEARCH_QUALITY.md +116 -0
- package/docs/TESTING.md +17 -0
- package/docs/VALIDATION_PORTABILITY.md +20 -11
- package/marketplace.json +2 -2
- package/package.json +6 -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-claude/README.md +6 -5
- package/plugins/pm-claude/hooks/hooks.json +1 -1
- package/plugins/pm-claude/hooks/session-start.mjs +9 -6
- package/plugins/pm-claude/package.json +9 -0
- package/plugins/pm-claude/scripts/plugin-runtime.mjs +84 -0
- package/plugins/pm-claude/scripts/pm-mcp-server.mjs +39 -96
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.mcp.json +0 -3
- package/plugins/pm-codex/README.md +1 -1
- package/plugins/pm-codex/package.json +9 -0
- package/plugins/pm-codex/scripts/plugin-runtime.mjs +84 -0
- package/plugins/pm-codex/scripts/pm-mcp-server.mjs +38 -99
- package/dist/cli-bundle/chunks/chunk-7IABMUB6.js +0 -238
- package/dist/cli-bundle/chunks/chunk-OBTHQ6UX.js +0 -29
- package/dist/cli-bundle/focused-chunks/chunk-3JAEZ7WI.js +0 -59
- package/dist/cli-bundle/focused-chunks/chunk-BULUJEOL.js +0 -20
- package/dist/cli-bundle/focused-chunks/chunk-KMNH4G6Y.js +0 -2
package/dist/sdk/query.d.ts
CHANGED
|
@@ -28,5 +28,8 @@ export * from "./context-signal-store.js";
|
|
|
28
28
|
export * from "./context-usage.js";
|
|
29
29
|
export * from "./workspace-memory.js";
|
|
30
30
|
export * from "./duplicates.js";
|
|
31
|
+
export { evaluateMetricFloors, parseEvalMetricFloors, EVAL_METRIC_NAMES, type EvalMetricFloors, } from "../core/search/eval-thresholds.js";
|
|
31
32
|
export { analyzeDuplicateItems, type DuplicateItemInput, type DuplicateItemsAnalysis } from "./similarity.js";
|
|
32
33
|
export { measureItemMetadataReadWork, type ItemMetadataReadWork } from "../core/store/item-metadata-read-work.js";
|
|
34
|
+
export { executeEmbeddingBatchesWithRetry, type EmbeddingBatchReceipt, type EmbeddingBatchExecutionOptions, type EmbeddingBatchExecutionResult, type EmbeddingBatchProgressEvent, } from "../core/search/embedding-batches.js";
|
|
35
|
+
export type { EmbeddingProviderConfig } from "../core/search/providers.js";
|
package/dist/sdk/query.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!(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]="
|
|
1
|
+
!(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]="d007edcb-46f0-5546-b804-27d86afe23e7")}catch(e2){}})();export*from"./query/list.js";export*from"./query/complete-list.js";export*from"./query/search.js";import{runActivity}from"./query/activity.js";export*from"./query/aggregate.js";export*from"./query/calendar.js";import{CONTEXT_OUTPUT_VALUES,applyContextTagProjection,buildChildrenByParent,collectSubtreeIds,compareCriticalItems,mergeSortedWarnings,packRankedContextItems,parseContextDepth,parseContextFocusFields,parseContextSections,projectContextFocusRows,renderContextMarkdown,resolveContextOutputFormat,resolveContextTokenBudget,runContext,toContextFocusItem,toContextPackingSummary,toContextRankingSummary}from"./query/context.js";export*from"./query/get.js";export*from"./query/history.js";export*from"./query/next.js";export*from"./actionability.js";export*from"./query/search-pagination.js";export*from"./query/search-rendering.js";export*from"./query/item-filter-options.js";export*from"./query/multi-value-filters.js";export*from"./query/parsers.js";export*from"./pagination.js";export*from"./item-children.js";export*from"./item-metadata-index.js";export*from"./context-packing.js";export*from"./context-relevance.js";export*from"./context-signal-store.js";export*from"./context-usage.js";export*from"./workspace-memory.js";export*from"./duplicates.js";import{evaluateMetricFloors,parseEvalMetricFloors,EVAL_METRIC_NAMES}from"../core/search/eval-thresholds.js";import{analyzeDuplicateItems}from"./similarity.js";import{measureItemMetadataReadWork}from"../core/store/item-metadata-read-work.js";import{executeEmbeddingBatchesWithRetry}from"../core/search/embedding-batches.js";export{CONTEXT_OUTPUT_VALUES,EVAL_METRIC_NAMES,analyzeDuplicateItems,applyContextTagProjection,buildChildrenByParent,collectSubtreeIds,compareCriticalItems,evaluateMetricFloors,executeEmbeddingBatchesWithRetry,measureItemMetadataReadWork,mergeSortedWarnings,packRankedContextItems,parseContextDepth,parseContextFocusFields,parseContextSections,parseEvalMetricFloors,projectContextFocusRows,renderContextMarkdown,resolveContextOutputFormat,resolveContextTokenBudget,runActivity,runContext,toContextFocusItem,toContextPackingSummary,toContextRankingSummary};
|
|
2
2
|
//# sourceMappingURL=query.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!(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]="09f9d531-8ebf-51bf-9ee6-5a3351d96c7a")}catch(e2){}})();import{EXIT_CODE}from"../../core/shared/constants.js";import{PmCliError}from"../../core/shared/errors.js";import{WORKFLOW_POLICY_ACTIONS}from"../cli-contracts/enum-contracts.js";const PREVIEW_ACTIONS=new Set(["rename-type","rename-field","remap-status",...WORKFLOW_POLICY_ACTIONS]);function assertSchemaPreviewSupported(subcommand,dryRun){if(dryRun&&!PREVIEW_ACTIONS.has(subcommand)){throw new PmCliError(`schema ${subcommand} does not support --dry-run. Preview is supported for rename-type, rename-field, remap-status and workflow-policy actions. Remove --dry-run only when you intend to apply changes.`,EXIT_CODE.USAGE,{code:"invalid_argument_value",examples:["pm schema rename-type Spike --to Experiment --dry-run"]})}}export{assertSchemaPreviewSupported};
|
|
2
|
+
//# sourceMappingURL=schema-preview.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!(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]="
|
|
1
|
+
!(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]="1b86373f-26a3-5893-95dc-e794fcc1afa1")}catch(e2){}})();import{createUnknownSubcommandError}from"../agent/subcommand-recovery.js";import{assertSchemaPreviewSupported}from"./schema-preview.js";import{WORKFLOW_POLICY_ACTIONS,runWorkflowPolicyAction}from"../governance/workflow-policy.js";import{parseRuntimeInteger as parseMcpInteger,readRuntimeString as readString,readRuntimeStringArray as readStringArray}from"../runtime-input.js";import{SCHEMA_SUBCOMMANDS,runSchemaAddField,runSchemaAddStatus,runSchemaAddType,runSchemaApplyPreset,runSchemaEvolutionMigration,runSchemaInferTypes,runSchemaList,runSchemaListFields,runSchemaRemoveField,runSchemaRemoveStatus,runSchemaRemoveType,runSchemaShow,runSchemaShowField,runSchemaShowStatus}from"../schema.js";import{getOwnHandler,readRequiredString}from"./context.js";function createMcpSchemaContext(ctx){const subcommand=readString(ctx.args,"subcommand")??readRequiredString(ctx.options,"subcommand");const aliasSource=ctx.args.alias??ctx.options.alias;return{ctx,subcommand:subcommand.trim().toLowerCase(),name:readString(ctx.args,"name")??readString(ctx.options,"name"),author:readString(ctx.args,"author")??readString(ctx.options,"author"),force:ctx.args.force===true||ctx.options.force===true,aliases:aliasSource===void 0?void 0:readStringArray(aliasSource)}}function runMcpSchemaReadOrRemoveAction(schema){const{ctx,subcommand,name,author,force}=schema;const simpleHandlers={list:()=>runSchemaList(ctx.global),show:()=>runSchemaShow(name,ctx.global),"show-status":()=>runSchemaShowStatus(name,ctx.global),"list-fields":()=>runSchemaListFields(ctx.global),"show-field":()=>runSchemaShowField(name,ctx.global),"remove-type":()=>runSchemaRemoveType(name,{author,force},ctx.global),"remove-field":()=>runSchemaRemoveField(name,{author,force},ctx.global),"remove-status":()=>runSchemaRemoveStatus(name,{author,force},ctx.global),"apply-preset":()=>runSchemaApplyPreset(readString(ctx.args,"typePreset")??readString(ctx.options,"typePreset"),{author,force},ctx.global)};const handler=getOwnHandler(simpleHandlers,subcommand);return handler?handler():null}function runMcpSchemaAddFieldAction(schema){const{ctx,name,author,force,aliases}=schema;const commandsSource=ctx.args.commands??ctx.options.commands;const requiredTypesSource=ctx.args.requiredTypes??ctx.options.requiredTypes;return runSchemaAddField(name,{type:readString(ctx.args,"fieldType")??readString(ctx.options,"fieldType"),commands:commandsSource===void 0?void 0:readStringArray(commandsSource),description:readString(ctx.args,"description")??readString(ctx.options,"description"),cliFlag:readString(ctx.args,"cliFlag")??readString(ctx.options,"cliFlag"),alias:aliases,required:ctx.args.required===true||ctx.options.required===true,requiredOnCreate:ctx.args.requiredOnCreate===true||ctx.options.requiredOnCreate===true,allowUnset:!(ctx.args.allowUnset===false||ctx.options.allowUnset===false),requiredTypes:requiredTypesSource===void 0?void 0:readStringArray(requiredTypesSource),author,force},ctx.global)}function runMcpSchemaAddStatusAction(schema){const{ctx,name,author,force,aliases}=schema;const roleSource=ctx.args.role??ctx.options.role;return runSchemaAddStatus(name,{role:roleSource===void 0?void 0:readStringArray(roleSource),alias:aliases,description:readString(ctx.args,"description")??readString(ctx.options,"description"),order:parseMcpInteger(ctx.args.order??ctx.options.order,"schema add-status order"),author,force},ctx.global)}function runMcpSchemaAddTypeAction(schema){const{ctx,name,author,force,aliases}=schema;return runSchemaAddType(name,{description:readString(ctx.args,"description")??readString(ctx.options,"description"),defaultStatus:readString(ctx.args,"defaultStatus")??readString(ctx.args,"default_status")??readString(ctx.options,"defaultStatus")??readString(ctx.options,"default_status"),folder:readString(ctx.args,"folder")??readString(ctx.options,"folder"),alias:aliases,author,force},ctx.global)}function runMcpSchemaMigrationAction(schema){const{ctx,subcommand,name,author,force}=schema;const to=readString(ctx.args,"to")??readRequiredString(ctx.options,"to");const migrationId=readString(ctx.args,"migrationId")??readString(ctx.args,"migration_id")??readString(ctx.options,"migrationId")??readString(ctx.options,"migration_id");const fieldTypeScope=readString(ctx.args,"fieldTypeScope")??readString(ctx.options,"fieldTypeScope")??readString(ctx.args,"type")??readString(ctx.options,"type");const request=subcommand==="rename-type"?{kind:"rename-type",from:name??"",to}:subcommand==="rename-field"?{kind:"rename-field",from:name??"",to,...fieldTypeScope===void 0?{}:{type:fieldTypeScope}}:{kind:"remap-status",from:name??"",to};return runSchemaEvolutionMigration(request,{migrationId,dryRun:ctx.args.dryRun===true||ctx.options.dryRun===true,author,force},ctx.global)}function runMcpSchemaAction(ctx){const schema=createMcpSchemaContext(ctx);assertSchemaPreviewSupported(schema.subcommand,ctx.args.dryRun===true||ctx.options.dryRun===true);const policyAction=WORKFLOW_POLICY_ACTIONS.find(action=>action===schema.subcommand);if(policyAction)return runWorkflowPolicyAction(policyAction,schema.name,{definition:ctx.args.definition??ctx.options.definition,policy:readString(ctx.args,"policy")??readString(ctx.options,"policy"),message:readString(ctx.args,"message")??readString(ctx.options,"message"),author:schema.author,dryRun:ctx.args.dryRun===true||ctx.options.dryRun===true},ctx.global);const simpleResult=runMcpSchemaReadOrRemoveAction(schema);if(simpleResult!==null){return simpleResult}if(["rename-type","rename-field","remap-status"].includes(schema.subcommand)){return runMcpSchemaMigrationAction(schema)}if(schema.subcommand==="add-field"){return runMcpSchemaAddFieldAction(schema)}if(schema.subcommand==="add-status"){return runMcpSchemaAddStatusAction(schema)}if(schema.subcommand==="add-type"){if(ctx.args.infer===true||ctx.options.infer===true){return runSchemaInferTypes({minCount:parseMcpInteger(ctx.args.minCount??ctx.options.minCount,"schema infer minCount"),apply:ctx.args.apply===true||ctx.options.apply===true,author:schema.author,force:schema.force},ctx.global)}return runMcpSchemaAddTypeAction(schema)}throw createUnknownSubcommandError({command_path:"schema",token:schema.subcommand,allowed:SCHEMA_SUBCOMMANDS,exit_code:64})}export{runMcpSchemaAction};
|
|
2
2
|
//# sourceMappingURL=schema.js.map
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* reaching into private core modules, while higher-level consumers should
|
|
7
7
|
* prefer the typed operations exported by the main SDK barrel.
|
|
8
8
|
*/
|
|
9
|
+
export { assertSchemaPreviewSupported } from "./runtime/schema-preview.js";
|
|
9
10
|
export { type MutationCheckpointItem, createCheckpointId, loadMutationCheckpoint, restoreCheckpointItems, writeMutationCheckpoint, } from "../core/checkpoint/mutation-checkpoint.js";
|
|
10
11
|
export { flattenFlagListValue, resolveFlagValueKind, } from "../core/extensions/flag-value-types.js";
|
|
11
12
|
export { createUnknownSubcommandError, type UnknownSubcommandErrorOptions, } from "./agent/subcommand-recovery.js";
|
|
@@ -46,7 +47,7 @@ export { type NormalizedTypeWorkflow, describeAllowedTransitions, evaluateTransi
|
|
|
46
47
|
export { REINDEX_LOCK_ID, shouldRunSearchRefreshInForeground, } from "../core/search/background-refresh.js";
|
|
47
48
|
export { readVectorizationStatusLedger, refreshSearchArtifactsForMutation, writeVectorizationStatusLedger, } from "../core/search/cache.js";
|
|
48
49
|
export { buildSearchCorpus, buildSemanticCorpusInput, resolveSearchCorpusFields, resolveSemanticCorpusCharacterLimit, } from "../core/search/corpus.js";
|
|
49
|
-
export { executeEmbeddingBatchesWithRetry } from "../core/search/embedding-batches.js";
|
|
50
|
+
export { executeEmbeddingBatchesWithRetry, type EmbeddingBatchReceipt, type EmbeddingBatchExecutionOptions, type EmbeddingBatchExecutionResult, type EmbeddingBatchProgressEvent, } from "../core/search/embedding-batches.js";
|
|
50
51
|
export { resolveEmbeddingProviders } from "../core/search/providers.js";
|
|
51
52
|
export { resolveSettingsWithSemanticRuntimeDefaults } from "../core/search/semantic-defaults.js";
|
|
52
53
|
export { executeVectorDelete, executeVectorReset, executeVectorUpsert, resolveVectorStores, } from "../core/search/vector-stores.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!(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]="d27383c3-03c8-51ff-98c5-700cc6c2c114")}catch(e2){}})();import{createCheckpointId,loadMutationCheckpoint,restoreCheckpointItems,writeMutationCheckpoint}from"../core/checkpoint/mutation-checkpoint.js";import{flattenFlagListValue,resolveFlagValueKind}from"../core/extensions/flag-value-types.js";import{createUnknownSubcommandError}from"./agent/subcommand-recovery.js";import{activateExtensions,clearActiveExtensionHooks,consumeAfterCommandAffectedItems,createCoreCommandHookContext,createEmptyExtensionRegistrationRegistry,discoverExtensions,getActiveCommandResult,getActiveExtensionRegistrations,loadExtensions,projectAfterCommandItemSnapshot,recordAfterCommandAffectedItem,resetActiveExtensionRuntimeState,runActiveCommandHandler,runActiveBeforeMutationHooks,runActiveOnIndexHooks,runActiveOnReadHooks,runActiveOnWriteHooks,runActiveParserOverride,runActivePreflightOverride,runActiveServiceOverride,runAfterCommandHooks,runBeforeCommandHooks,setActiveCommandContext,setActiveCommandResult,setActiveExtensionCommands,setActiveExtensionHooks,setActiveExtensionParsers,setActiveExtensionPreflight,setActiveExtensionRegistrations,setActiveExtensionRenderers,setActiveExtensionServices}from"../core/extensions/index.js";import{applyRegisteredItemFieldDefaultsAndValidation,collectRegisteredItemFieldNames,parseRegisteredItemFieldAssignments}from"../core/extensions/item-fields.js";import{resolveExtensionRoots}from"../core/extensions/loader.js";import{resolveRegisteredSearchProvider,resolveRegisteredVectorStoreAdapter}from"../core/extensions/runtime-registrations.js";import{isFileMissingError,pathExists,readFileIfExists,removeFileIfExists,writeFileAtomic}from"../core/fs/fs-utils.js";import{normalizeBulkIdsValue,parseBulkIdsText,resolveCliBulkIdsInput}from"../core/io/bulk-ids-input.js";import{computeHistoryDiff,patchPathToChangedField}from"../core/history/history-diff.js";import{enforceHistoryStreamPolicyForItem,enforceHistoryStreamPolicyForItems}from"../core/history/history-stream-policy.js";import{appendHistoryEntry,CURRENT_HISTORY_ITEM_HASH_VERSION,CURRENT_HISTORY_RECORD_HASH_VERSION,createHistoryEntry,hashDocument,hashDocumentForVersion,hashEmptyDocument,hashHistoryPatch,hashHistoryRecord,hashHistoryStream,resealHistoryRewrite,sealHistoryRecord,SUPPORTED_HISTORY_ITEM_HASH_VERSIONS,SUPPORTED_HISTORY_RECORD_HASH_VERSIONS,verifyHistoryRecordHash,verifyHistoryRewriteEvidence}from"../core/history/history.js";import{readHistoryEntries}from"../core/history/read.js";import{appendWorkspaceAuditEvent,appendWorkspaceHistoryChange,getWorkspaceHistoryPath,inspectWorkspaceHistoryState,mutateWorkspaceJsonWithHistory,reconcileWorkspaceJsonHistory,restoreWorkspaceJsonFromHistory,WORKSPACE_HISTORY_ID,writeWorkspaceJsonWithHistory}from"../core/history/workspace-history.js";import{normalizeReplayPatchOps,reanchorHistoryEntries,replayToCanonicalItemDocument,replayToItemDocument,toReplayDocument,verifyHistoryChain,verifyHistoryChainWithVersion}from"../core/history/replay.js";import{resolveBodyFileContent}from"../core/io/body-file.js";import{generateItemId,normalizeItemId,normalizeRawItemId}from"../core/item/id.js";import{canonicalDocument,normalizeItemMetadata,parseItemDocument,serializeItemDocument}from"../core/item/item-format.js";import{toItemRecord}from"../core/item/item-record.js";import{assertParentReferenceIsNotSelf,isPlaceholderReferenceToken,normalizeParentReferenceValue,validateMissingParentReference}from"../core/item/parent-reference-policy.js";import{applyAcceptanceCriteriaMutations,applyTagRemovals,assertNoUnknownCsvKeys,createStdinTokenResolver,looksLikeGenericKeyValueEntry,mergeAdditiveTags,parseCsvKv,parseOptionalNonNegativeInteger,parseOptionalNumber,parseTags,preserveMutationStdinTokenFields,preserveMutationStdinTokenLiterals,transferMutationStdinTokenPolicy,shouldResolveMutationStdinTokenField,shouldResolveMutationStdinTokens,splitAcceptanceCriteria}from"../core/item/parse.js";import{resolvePriority}from"../core/item/priority.js";import{validateSprintOrReleaseValue}from"../core/item/sprint-release-format.js";import{parseStatusFilterCsv}from"../core/item/status-filter.js";import{isTerminalStatus,normalizeStatusForRegistry,normalizeStatusInput}from"../core/item/status.js";import{COMMON_MUTATION_COMMAND_OPTION_KEYS,canonicalizeCommandOptionKey,commandOptionFlagLabel,resolveCommandOptionPolicyState,resolveItemTypeRegistry,resolveTypeDefinition,resolveTypeName,validateTypeOptions}from"../core/item/type-registry.js";import{resolveTypeSynonym}from"../core/item/type-synonyms.js";import{acquireLock}from"../core/lock/lock.js";import{printError,printResult,writeStderr,writeStdout}from"../core/output/output.js";import{renderRowsAsCsv,renderRowsAsTable}from"../core/output/tabular.js";import{parseLimit}from"../core/shared/numeric-parsers.js";import{resolveConfiguredPmPackageRoot,resolvePmCliVersion,resolvePmPackageRootFromModule}from"../core/packages/root.js";import{buildInvalidTypeError}from"../core/schema/item-types-file.js";import{collectRuntimeFilterValues,matchesRuntimeFilters}from"../core/schema/runtime-field-filters.js";import{collectRuntimeCreateFieldValues,collectRuntimeUpdateFieldValues}from"../core/schema/runtime-field-values.js";import{normalizeStatusInputWithRegistry,resolveItemTypesFilePath,resolveRuntimeFieldRegistry,resolveRuntimeStatusRegistry,statusIsTerminal}from"../core/schema/runtime-schema.js";import{describeAllowedTransitions,evaluateTransition,resolveTypeWorkflows}from"../core/schema/type-workflows.js";import{REINDEX_LOCK_ID,shouldRunSearchRefreshInForeground}from"../core/search/background-refresh.js";import{readVectorizationStatusLedger,refreshSearchArtifactsForMutation,writeVectorizationStatusLedger}from"../core/search/cache.js";import{buildSearchCorpus,buildSemanticCorpusInput,resolveSearchCorpusFields,resolveSemanticCorpusCharacterLimit}from"../core/search/corpus.js";import{executeEmbeddingBatchesWithRetry}from"../core/search/embedding-batches.js";import{resolveEmbeddingProviders}from"../core/search/providers.js";import{resolveSettingsWithSemanticRuntimeDefaults}from"../core/search/semantic-defaults.js";import{executeVectorDelete,executeVectorReset,executeVectorUpsert,resolveVectorStores}from"../core/search/vector-stores.js";import{buildVectorizationEmbeddingIdentity,buildVectorizationEmbeddingMetadata,hasVectorizationEmbeddingIdentityChanged,hasVectorizationVectorDimensionChanged,inferConsistentVectorDimension}from"../core/search/vectorization-metadata.js";import{sentryCaptureCliError,sentryFinishCommandSpan,sentryFlush,sentryLogCliUsageError,sentrySetCommandContext,sentryStartCommandSpan}from"../core/sentry/helpers.js";import{ensureSentryInit}from"../core/sentry/instrument.js";import{clearFocusedItem,getFocusedItem,setFocusedItem}from"../core/session/session-state.js";import{readAuthorEnvironment,diagnoseAgentIdentity,resolveAuthor,resolveClaimPrincipal,runWithHarnessDetectionSignals,runWithWorkspaceHarnessSignalDescriptors,BUILTIN_AGENT_PROVENANCE_ADAPTERS,listAgentProvenanceAdapters,normalizeAgentProvenanceAdapterValue,registerAgentProvenanceAdapters,writeAuthorEnvironment}from"../core/shared/author.js";import{agentSessionEnvironment,boundAgentEpisodeIdentity,runWithAgentSessionContext,resolveAgentSessionContextFromSignals}from"../core/shared/agent-session-context.js";import{evaluateMutationGuard,isMutationAction,listMutationActions,scanMutationSecrets}from"./mutation-guard.js";import{jaccardSimilarity,normalizeSimilarityText,scoreItemSimilarity,tokenizeSimilarityText}from"./similarity-scoring.js";import{inspectStaleInProgressItems,scanStaleInProgressItems}from"./governance/stale-work.js";import{CREATE_DIRECT_CLOSE_REASON_DEFAULT,EXIT_CODE,ITEM_METADATA_KEY_ORDER,SETTINGS_DEFAULTS,TYPE_TO_FOLDER,resolveTelemetryErrorCategory}from"../core/shared/constants.js";import{PmCliError}from"../core/shared/errors.js";import{decodeHtmlEntitiesInOptions}from"../core/shared/html-entity-decode.js";import{createLazyModule}from"../core/shared/lazy-module.js";import{levenshteinDistanceWithinLimit}from"../core/shared/levenshtein.js";import{isPureSnakeCaseAlias}from"../core/shared/option-alias-visibility.js";import{asRecordClone,asRecordOrNull,toErrorMessage,toNonEmptyStringOrUndefined}from"../core/shared/primitives.js";import{createSerialQueue}from"../core/shared/serial-queue.js";import{stableStringify,stableValueEquals}from"../core/shared/serialization.js";import{splitCommaList}from"../core/shared/split-comma-list.js";import{compareTimestampStrings,nowIso,resolveIsoOrRelative}from"../core/shared/time.js";import{migrateItemFilesToFormat}from"../core/store/item-format-migration.js";import{listAllDocumentCandidatesCached}from"../core/store/item-metadata-cache.js";import{buildItemNotFoundError,createMutationGuardSdk,deleteItem,listAllItemMetadata,listAllItemMetadataLight,locateItem,mutateItem,mutateItemWithHistoryContext,readLocatedItem}from"../core/store/item-store.js";import{isTerminalPlanMode,shouldCompletePlanOnClose}from"../core/item/plan-lifecycle.js";import{getHistoryPath,getItemPath,getSettingsPath,resolveImplicitPmRoot,resolvePmRoot,resolveWorkspaceRoot}from"../core/store/paths.js";import{persistSelectedItemFormat,readSettings,readSettingsWithMetadata,writeSettings}from"../core/store/settings.js";import{maybeRunFirstUseTelemetryPrompt}from"../core/telemetry/consent.js";import{deriveTelemetryCommandResolution}from"../core/telemetry/observability.js";import{emitTelemetryErrorEvent,finishTelemetryCommand,startTelemetryCommand}from"../core/telemetry/runtime.js";export{BUILTIN_AGENT_PROVENANCE_ADAPTERS,COMMON_MUTATION_COMMAND_OPTION_KEYS,CREATE_DIRECT_CLOSE_REASON_DEFAULT,CURRENT_HISTORY_ITEM_HASH_VERSION,CURRENT_HISTORY_RECORD_HASH_VERSION,EXIT_CODE,ITEM_METADATA_KEY_ORDER,PmCliError,REINDEX_LOCK_ID,SETTINGS_DEFAULTS,SUPPORTED_HISTORY_ITEM_HASH_VERSIONS,SUPPORTED_HISTORY_RECORD_HASH_VERSIONS,TYPE_TO_FOLDER,WORKSPACE_HISTORY_ID,acquireLock,activateExtensions,agentSessionEnvironment,appendHistoryEntry,appendWorkspaceAuditEvent,appendWorkspaceHistoryChange,applyAcceptanceCriteriaMutations,applyRegisteredItemFieldDefaultsAndValidation,applyTagRemovals,asRecordClone,asRecordOrNull,assertNoUnknownCsvKeys,assertParentReferenceIsNotSelf,boundAgentEpisodeIdentity,buildInvalidTypeError,buildItemNotFoundError,buildSearchCorpus,buildSemanticCorpusInput,buildVectorizationEmbeddingIdentity,buildVectorizationEmbeddingMetadata,canonicalDocument,canonicalizeCommandOptionKey,clearActiveExtensionHooks,clearFocusedItem,collectRegisteredItemFieldNames,collectRuntimeCreateFieldValues,collectRuntimeFilterValues,collectRuntimeUpdateFieldValues,commandOptionFlagLabel,compareTimestampStrings,computeHistoryDiff,consumeAfterCommandAffectedItems,createCheckpointId,createCoreCommandHookContext,createEmptyExtensionRegistrationRegistry,createHistoryEntry,createLazyModule,createMutationGuardSdk,createSerialQueue,createStdinTokenResolver,createUnknownSubcommandError,decodeHtmlEntitiesInOptions,deleteItem,deriveTelemetryCommandResolution,describeAllowedTransitions,diagnoseAgentIdentity,discoverExtensions,emitTelemetryErrorEvent,enforceHistoryStreamPolicyForItem,enforceHistoryStreamPolicyForItems,ensureSentryInit,evaluateMutationGuard,evaluateTransition,executeEmbeddingBatchesWithRetry,executeVectorDelete,executeVectorReset,executeVectorUpsert,finishTelemetryCommand,flattenFlagListValue,generateItemId,getActiveCommandResult,getActiveExtensionRegistrations,getFocusedItem,getHistoryPath,getItemPath,getSettingsPath,getWorkspaceHistoryPath,hasVectorizationEmbeddingIdentityChanged,hasVectorizationVectorDimensionChanged,hashDocument,hashDocumentForVersion,hashEmptyDocument,hashHistoryPatch,hashHistoryRecord,hashHistoryStream,inferConsistentVectorDimension,inspectStaleInProgressItems,inspectWorkspaceHistoryState,isFileMissingError,isMutationAction,isPlaceholderReferenceToken,isPureSnakeCaseAlias,isTerminalPlanMode,isTerminalStatus,jaccardSimilarity,levenshteinDistanceWithinLimit,listAgentProvenanceAdapters,listAllDocumentCandidatesCached,listAllItemMetadata,listAllItemMetadataLight,listMutationActions,loadExtensions,loadMutationCheckpoint,locateItem,looksLikeGenericKeyValueEntry,matchesRuntimeFilters,maybeRunFirstUseTelemetryPrompt,mergeAdditiveTags,migrateItemFilesToFormat,mutateItem,mutateItemWithHistoryContext,mutateWorkspaceJsonWithHistory,normalizeAgentProvenanceAdapterValue,normalizeBulkIdsValue,normalizeItemId,normalizeItemMetadata,normalizeParentReferenceValue,normalizeRawItemId,normalizeReplayPatchOps,normalizeSimilarityText,normalizeStatusForRegistry,normalizeStatusInput,normalizeStatusInputWithRegistry,nowIso,parseBulkIdsText,parseCsvKv,parseItemDocument,parseLimit,parseOptionalNonNegativeInteger,parseOptionalNumber,parseRegisteredItemFieldAssignments,parseStatusFilterCsv,parseTags,patchPathToChangedField,pathExists,persistSelectedItemFormat,preserveMutationStdinTokenFields,preserveMutationStdinTokenLiterals,printError,printResult,projectAfterCommandItemSnapshot,readAuthorEnvironment,readFileIfExists,readHistoryEntries,readLocatedItem,readSettings,readSettingsWithMetadata,readVectorizationStatusLedger,reanchorHistoryEntries,reconcileWorkspaceJsonHistory,recordAfterCommandAffectedItem,refreshSearchArtifactsForMutation,registerAgentProvenanceAdapters,removeFileIfExists,renderRowsAsCsv,renderRowsAsTable,replayToCanonicalItemDocument,replayToItemDocument,resealHistoryRewrite,resetActiveExtensionRuntimeState,resolveAgentSessionContextFromSignals,resolveAuthor,resolveBodyFileContent,resolveClaimPrincipal,resolveCliBulkIdsInput,resolveCommandOptionPolicyState,resolveConfiguredPmPackageRoot,resolveEmbeddingProviders,resolveExtensionRoots,resolveFlagValueKind,resolveImplicitPmRoot,resolveIsoOrRelative,resolveItemTypeRegistry,resolveItemTypesFilePath,resolvePmCliVersion,resolvePmPackageRootFromModule,resolvePmRoot,resolvePriority,resolveRegisteredSearchProvider,resolveRegisteredVectorStoreAdapter,resolveRuntimeFieldRegistry,resolveRuntimeStatusRegistry,resolveSearchCorpusFields,resolveSemanticCorpusCharacterLimit,resolveSettingsWithSemanticRuntimeDefaults,resolveTelemetryErrorCategory,resolveTypeDefinition,resolveTypeName,resolveTypeSynonym,resolveTypeWorkflows,resolveVectorStores,resolveWorkspaceRoot,restoreCheckpointItems,restoreWorkspaceJsonFromHistory,runActiveBeforeMutationHooks,runActiveCommandHandler,runActiveOnIndexHooks,runActiveOnReadHooks,runActiveOnWriteHooks,runActiveParserOverride,runActivePreflightOverride,runActiveServiceOverride,runAfterCommandHooks,runBeforeCommandHooks,runWithAgentSessionContext,runWithHarnessDetectionSignals,runWithWorkspaceHarnessSignalDescriptors,scanMutationSecrets,scanStaleInProgressItems,scoreItemSimilarity,sealHistoryRecord,sentryCaptureCliError,sentryFinishCommandSpan,sentryFlush,sentryLogCliUsageError,sentrySetCommandContext,sentryStartCommandSpan,serializeItemDocument,setActiveCommandContext,setActiveCommandResult,setActiveExtensionCommands,setActiveExtensionHooks,setActiveExtensionParsers,setActiveExtensionPreflight,setActiveExtensionRegistrations,setActiveExtensionRenderers,setActiveExtensionServices,setFocusedItem,shouldCompletePlanOnClose,shouldResolveMutationStdinTokenField,shouldResolveMutationStdinTokens,shouldRunSearchRefreshInForeground,splitAcceptanceCriteria,splitCommaList,stableStringify,stableValueEquals,startTelemetryCommand,statusIsTerminal,toErrorMessage,toItemRecord,toNonEmptyStringOrUndefined,toReplayDocument,tokenizeSimilarityText,transferMutationStdinTokenPolicy,validateMissingParentReference,validateSprintOrReleaseValue,validateTypeOptions,verifyHistoryChain,verifyHistoryChainWithVersion,verifyHistoryRecordHash,verifyHistoryRewriteEvidence,writeAuthorEnvironment,writeFileAtomic,writeMutationCheckpoint,writeSettings,writeStderr,writeStdout,writeVectorizationStatusLedger,writeWorkspaceJsonWithHistory};
|
|
1
|
+
!(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]="7b64ac69-240e-504c-adc4-d5f3170d3de7")}catch(e2){}})();import{assertSchemaPreviewSupported}from"./runtime/schema-preview.js";import{createCheckpointId,loadMutationCheckpoint,restoreCheckpointItems,writeMutationCheckpoint}from"../core/checkpoint/mutation-checkpoint.js";import{flattenFlagListValue,resolveFlagValueKind}from"../core/extensions/flag-value-types.js";import{createUnknownSubcommandError}from"./agent/subcommand-recovery.js";import{activateExtensions,clearActiveExtensionHooks,consumeAfterCommandAffectedItems,createCoreCommandHookContext,createEmptyExtensionRegistrationRegistry,discoverExtensions,getActiveCommandResult,getActiveExtensionRegistrations,loadExtensions,projectAfterCommandItemSnapshot,recordAfterCommandAffectedItem,resetActiveExtensionRuntimeState,runActiveCommandHandler,runActiveBeforeMutationHooks,runActiveOnIndexHooks,runActiveOnReadHooks,runActiveOnWriteHooks,runActiveParserOverride,runActivePreflightOverride,runActiveServiceOverride,runAfterCommandHooks,runBeforeCommandHooks,setActiveCommandContext,setActiveCommandResult,setActiveExtensionCommands,setActiveExtensionHooks,setActiveExtensionParsers,setActiveExtensionPreflight,setActiveExtensionRegistrations,setActiveExtensionRenderers,setActiveExtensionServices}from"../core/extensions/index.js";import{applyRegisteredItemFieldDefaultsAndValidation,collectRegisteredItemFieldNames,parseRegisteredItemFieldAssignments}from"../core/extensions/item-fields.js";import{resolveExtensionRoots}from"../core/extensions/loader.js";import{resolveRegisteredSearchProvider,resolveRegisteredVectorStoreAdapter}from"../core/extensions/runtime-registrations.js";import{isFileMissingError,pathExists,readFileIfExists,removeFileIfExists,writeFileAtomic}from"../core/fs/fs-utils.js";import{normalizeBulkIdsValue,parseBulkIdsText,resolveCliBulkIdsInput}from"../core/io/bulk-ids-input.js";import{computeHistoryDiff,patchPathToChangedField}from"../core/history/history-diff.js";import{enforceHistoryStreamPolicyForItem,enforceHistoryStreamPolicyForItems}from"../core/history/history-stream-policy.js";import{appendHistoryEntry,CURRENT_HISTORY_ITEM_HASH_VERSION,CURRENT_HISTORY_RECORD_HASH_VERSION,createHistoryEntry,hashDocument,hashDocumentForVersion,hashEmptyDocument,hashHistoryPatch,hashHistoryRecord,hashHistoryStream,resealHistoryRewrite,sealHistoryRecord,SUPPORTED_HISTORY_ITEM_HASH_VERSIONS,SUPPORTED_HISTORY_RECORD_HASH_VERSIONS,verifyHistoryRecordHash,verifyHistoryRewriteEvidence}from"../core/history/history.js";import{readHistoryEntries}from"../core/history/read.js";import{appendWorkspaceAuditEvent,appendWorkspaceHistoryChange,getWorkspaceHistoryPath,inspectWorkspaceHistoryState,mutateWorkspaceJsonWithHistory,reconcileWorkspaceJsonHistory,restoreWorkspaceJsonFromHistory,WORKSPACE_HISTORY_ID,writeWorkspaceJsonWithHistory}from"../core/history/workspace-history.js";import{normalizeReplayPatchOps,reanchorHistoryEntries,replayToCanonicalItemDocument,replayToItemDocument,toReplayDocument,verifyHistoryChain,verifyHistoryChainWithVersion}from"../core/history/replay.js";import{resolveBodyFileContent}from"../core/io/body-file.js";import{generateItemId,normalizeItemId,normalizeRawItemId}from"../core/item/id.js";import{canonicalDocument,normalizeItemMetadata,parseItemDocument,serializeItemDocument}from"../core/item/item-format.js";import{toItemRecord}from"../core/item/item-record.js";import{assertParentReferenceIsNotSelf,isPlaceholderReferenceToken,normalizeParentReferenceValue,validateMissingParentReference}from"../core/item/parent-reference-policy.js";import{applyAcceptanceCriteriaMutations,applyTagRemovals,assertNoUnknownCsvKeys,createStdinTokenResolver,looksLikeGenericKeyValueEntry,mergeAdditiveTags,parseCsvKv,parseOptionalNonNegativeInteger,parseOptionalNumber,parseTags,preserveMutationStdinTokenFields,preserveMutationStdinTokenLiterals,transferMutationStdinTokenPolicy,shouldResolveMutationStdinTokenField,shouldResolveMutationStdinTokens,splitAcceptanceCriteria}from"../core/item/parse.js";import{resolvePriority}from"../core/item/priority.js";import{validateSprintOrReleaseValue}from"../core/item/sprint-release-format.js";import{parseStatusFilterCsv}from"../core/item/status-filter.js";import{isTerminalStatus,normalizeStatusForRegistry,normalizeStatusInput}from"../core/item/status.js";import{COMMON_MUTATION_COMMAND_OPTION_KEYS,canonicalizeCommandOptionKey,commandOptionFlagLabel,resolveCommandOptionPolicyState,resolveItemTypeRegistry,resolveTypeDefinition,resolveTypeName,validateTypeOptions}from"../core/item/type-registry.js";import{resolveTypeSynonym}from"../core/item/type-synonyms.js";import{acquireLock}from"../core/lock/lock.js";import{printError,printResult,writeStderr,writeStdout}from"../core/output/output.js";import{renderRowsAsCsv,renderRowsAsTable}from"../core/output/tabular.js";import{parseLimit}from"../core/shared/numeric-parsers.js";import{resolveConfiguredPmPackageRoot,resolvePmCliVersion,resolvePmPackageRootFromModule}from"../core/packages/root.js";import{buildInvalidTypeError}from"../core/schema/item-types-file.js";import{collectRuntimeFilterValues,matchesRuntimeFilters}from"../core/schema/runtime-field-filters.js";import{collectRuntimeCreateFieldValues,collectRuntimeUpdateFieldValues}from"../core/schema/runtime-field-values.js";import{normalizeStatusInputWithRegistry,resolveItemTypesFilePath,resolveRuntimeFieldRegistry,resolveRuntimeStatusRegistry,statusIsTerminal}from"../core/schema/runtime-schema.js";import{describeAllowedTransitions,evaluateTransition,resolveTypeWorkflows}from"../core/schema/type-workflows.js";import{REINDEX_LOCK_ID,shouldRunSearchRefreshInForeground}from"../core/search/background-refresh.js";import{readVectorizationStatusLedger,refreshSearchArtifactsForMutation,writeVectorizationStatusLedger}from"../core/search/cache.js";import{buildSearchCorpus,buildSemanticCorpusInput,resolveSearchCorpusFields,resolveSemanticCorpusCharacterLimit}from"../core/search/corpus.js";import{executeEmbeddingBatchesWithRetry}from"../core/search/embedding-batches.js";import{resolveEmbeddingProviders}from"../core/search/providers.js";import{resolveSettingsWithSemanticRuntimeDefaults}from"../core/search/semantic-defaults.js";import{executeVectorDelete,executeVectorReset,executeVectorUpsert,resolveVectorStores}from"../core/search/vector-stores.js";import{buildVectorizationEmbeddingIdentity,buildVectorizationEmbeddingMetadata,hasVectorizationEmbeddingIdentityChanged,hasVectorizationVectorDimensionChanged,inferConsistentVectorDimension}from"../core/search/vectorization-metadata.js";import{sentryCaptureCliError,sentryFinishCommandSpan,sentryFlush,sentryLogCliUsageError,sentrySetCommandContext,sentryStartCommandSpan}from"../core/sentry/helpers.js";import{ensureSentryInit}from"../core/sentry/instrument.js";import{clearFocusedItem,getFocusedItem,setFocusedItem}from"../core/session/session-state.js";import{readAuthorEnvironment,diagnoseAgentIdentity,resolveAuthor,resolveClaimPrincipal,runWithHarnessDetectionSignals,runWithWorkspaceHarnessSignalDescriptors,BUILTIN_AGENT_PROVENANCE_ADAPTERS,listAgentProvenanceAdapters,normalizeAgentProvenanceAdapterValue,registerAgentProvenanceAdapters,writeAuthorEnvironment}from"../core/shared/author.js";import{agentSessionEnvironment,boundAgentEpisodeIdentity,runWithAgentSessionContext,resolveAgentSessionContextFromSignals}from"../core/shared/agent-session-context.js";import{evaluateMutationGuard,isMutationAction,listMutationActions,scanMutationSecrets}from"./mutation-guard.js";import{jaccardSimilarity,normalizeSimilarityText,scoreItemSimilarity,tokenizeSimilarityText}from"./similarity-scoring.js";import{inspectStaleInProgressItems,scanStaleInProgressItems}from"./governance/stale-work.js";import{CREATE_DIRECT_CLOSE_REASON_DEFAULT,EXIT_CODE,ITEM_METADATA_KEY_ORDER,SETTINGS_DEFAULTS,TYPE_TO_FOLDER,resolveTelemetryErrorCategory}from"../core/shared/constants.js";import{PmCliError}from"../core/shared/errors.js";import{decodeHtmlEntitiesInOptions}from"../core/shared/html-entity-decode.js";import{createLazyModule}from"../core/shared/lazy-module.js";import{levenshteinDistanceWithinLimit}from"../core/shared/levenshtein.js";import{isPureSnakeCaseAlias}from"../core/shared/option-alias-visibility.js";import{asRecordClone,asRecordOrNull,toErrorMessage,toNonEmptyStringOrUndefined}from"../core/shared/primitives.js";import{createSerialQueue}from"../core/shared/serial-queue.js";import{stableStringify,stableValueEquals}from"../core/shared/serialization.js";import{splitCommaList}from"../core/shared/split-comma-list.js";import{compareTimestampStrings,nowIso,resolveIsoOrRelative}from"../core/shared/time.js";import{migrateItemFilesToFormat}from"../core/store/item-format-migration.js";import{listAllDocumentCandidatesCached}from"../core/store/item-metadata-cache.js";import{buildItemNotFoundError,createMutationGuardSdk,deleteItem,listAllItemMetadata,listAllItemMetadataLight,locateItem,mutateItem,mutateItemWithHistoryContext,readLocatedItem}from"../core/store/item-store.js";import{isTerminalPlanMode,shouldCompletePlanOnClose}from"../core/item/plan-lifecycle.js";import{getHistoryPath,getItemPath,getSettingsPath,resolveImplicitPmRoot,resolvePmRoot,resolveWorkspaceRoot}from"../core/store/paths.js";import{persistSelectedItemFormat,readSettings,readSettingsWithMetadata,writeSettings}from"../core/store/settings.js";import{maybeRunFirstUseTelemetryPrompt}from"../core/telemetry/consent.js";import{deriveTelemetryCommandResolution}from"../core/telemetry/observability.js";import{emitTelemetryErrorEvent,finishTelemetryCommand,startTelemetryCommand}from"../core/telemetry/runtime.js";export{BUILTIN_AGENT_PROVENANCE_ADAPTERS,COMMON_MUTATION_COMMAND_OPTION_KEYS,CREATE_DIRECT_CLOSE_REASON_DEFAULT,CURRENT_HISTORY_ITEM_HASH_VERSION,CURRENT_HISTORY_RECORD_HASH_VERSION,EXIT_CODE,ITEM_METADATA_KEY_ORDER,PmCliError,REINDEX_LOCK_ID,SETTINGS_DEFAULTS,SUPPORTED_HISTORY_ITEM_HASH_VERSIONS,SUPPORTED_HISTORY_RECORD_HASH_VERSIONS,TYPE_TO_FOLDER,WORKSPACE_HISTORY_ID,acquireLock,activateExtensions,agentSessionEnvironment,appendHistoryEntry,appendWorkspaceAuditEvent,appendWorkspaceHistoryChange,applyAcceptanceCriteriaMutations,applyRegisteredItemFieldDefaultsAndValidation,applyTagRemovals,asRecordClone,asRecordOrNull,assertNoUnknownCsvKeys,assertParentReferenceIsNotSelf,assertSchemaPreviewSupported,boundAgentEpisodeIdentity,buildInvalidTypeError,buildItemNotFoundError,buildSearchCorpus,buildSemanticCorpusInput,buildVectorizationEmbeddingIdentity,buildVectorizationEmbeddingMetadata,canonicalDocument,canonicalizeCommandOptionKey,clearActiveExtensionHooks,clearFocusedItem,collectRegisteredItemFieldNames,collectRuntimeCreateFieldValues,collectRuntimeFilterValues,collectRuntimeUpdateFieldValues,commandOptionFlagLabel,compareTimestampStrings,computeHistoryDiff,consumeAfterCommandAffectedItems,createCheckpointId,createCoreCommandHookContext,createEmptyExtensionRegistrationRegistry,createHistoryEntry,createLazyModule,createMutationGuardSdk,createSerialQueue,createStdinTokenResolver,createUnknownSubcommandError,decodeHtmlEntitiesInOptions,deleteItem,deriveTelemetryCommandResolution,describeAllowedTransitions,diagnoseAgentIdentity,discoverExtensions,emitTelemetryErrorEvent,enforceHistoryStreamPolicyForItem,enforceHistoryStreamPolicyForItems,ensureSentryInit,evaluateMutationGuard,evaluateTransition,executeEmbeddingBatchesWithRetry,executeVectorDelete,executeVectorReset,executeVectorUpsert,finishTelemetryCommand,flattenFlagListValue,generateItemId,getActiveCommandResult,getActiveExtensionRegistrations,getFocusedItem,getHistoryPath,getItemPath,getSettingsPath,getWorkspaceHistoryPath,hasVectorizationEmbeddingIdentityChanged,hasVectorizationVectorDimensionChanged,hashDocument,hashDocumentForVersion,hashEmptyDocument,hashHistoryPatch,hashHistoryRecord,hashHistoryStream,inferConsistentVectorDimension,inspectStaleInProgressItems,inspectWorkspaceHistoryState,isFileMissingError,isMutationAction,isPlaceholderReferenceToken,isPureSnakeCaseAlias,isTerminalPlanMode,isTerminalStatus,jaccardSimilarity,levenshteinDistanceWithinLimit,listAgentProvenanceAdapters,listAllDocumentCandidatesCached,listAllItemMetadata,listAllItemMetadataLight,listMutationActions,loadExtensions,loadMutationCheckpoint,locateItem,looksLikeGenericKeyValueEntry,matchesRuntimeFilters,maybeRunFirstUseTelemetryPrompt,mergeAdditiveTags,migrateItemFilesToFormat,mutateItem,mutateItemWithHistoryContext,mutateWorkspaceJsonWithHistory,normalizeAgentProvenanceAdapterValue,normalizeBulkIdsValue,normalizeItemId,normalizeItemMetadata,normalizeParentReferenceValue,normalizeRawItemId,normalizeReplayPatchOps,normalizeSimilarityText,normalizeStatusForRegistry,normalizeStatusInput,normalizeStatusInputWithRegistry,nowIso,parseBulkIdsText,parseCsvKv,parseItemDocument,parseLimit,parseOptionalNonNegativeInteger,parseOptionalNumber,parseRegisteredItemFieldAssignments,parseStatusFilterCsv,parseTags,patchPathToChangedField,pathExists,persistSelectedItemFormat,preserveMutationStdinTokenFields,preserveMutationStdinTokenLiterals,printError,printResult,projectAfterCommandItemSnapshot,readAuthorEnvironment,readFileIfExists,readHistoryEntries,readLocatedItem,readSettings,readSettingsWithMetadata,readVectorizationStatusLedger,reanchorHistoryEntries,reconcileWorkspaceJsonHistory,recordAfterCommandAffectedItem,refreshSearchArtifactsForMutation,registerAgentProvenanceAdapters,removeFileIfExists,renderRowsAsCsv,renderRowsAsTable,replayToCanonicalItemDocument,replayToItemDocument,resealHistoryRewrite,resetActiveExtensionRuntimeState,resolveAgentSessionContextFromSignals,resolveAuthor,resolveBodyFileContent,resolveClaimPrincipal,resolveCliBulkIdsInput,resolveCommandOptionPolicyState,resolveConfiguredPmPackageRoot,resolveEmbeddingProviders,resolveExtensionRoots,resolveFlagValueKind,resolveImplicitPmRoot,resolveIsoOrRelative,resolveItemTypeRegistry,resolveItemTypesFilePath,resolvePmCliVersion,resolvePmPackageRootFromModule,resolvePmRoot,resolvePriority,resolveRegisteredSearchProvider,resolveRegisteredVectorStoreAdapter,resolveRuntimeFieldRegistry,resolveRuntimeStatusRegistry,resolveSearchCorpusFields,resolveSemanticCorpusCharacterLimit,resolveSettingsWithSemanticRuntimeDefaults,resolveTelemetryErrorCategory,resolveTypeDefinition,resolveTypeName,resolveTypeSynonym,resolveTypeWorkflows,resolveVectorStores,resolveWorkspaceRoot,restoreCheckpointItems,restoreWorkspaceJsonFromHistory,runActiveBeforeMutationHooks,runActiveCommandHandler,runActiveOnIndexHooks,runActiveOnReadHooks,runActiveOnWriteHooks,runActiveParserOverride,runActivePreflightOverride,runActiveServiceOverride,runAfterCommandHooks,runBeforeCommandHooks,runWithAgentSessionContext,runWithHarnessDetectionSignals,runWithWorkspaceHarnessSignalDescriptors,scanMutationSecrets,scanStaleInProgressItems,scoreItemSimilarity,sealHistoryRecord,sentryCaptureCliError,sentryFinishCommandSpan,sentryFlush,sentryLogCliUsageError,sentrySetCommandContext,sentryStartCommandSpan,serializeItemDocument,setActiveCommandContext,setActiveCommandResult,setActiveExtensionCommands,setActiveExtensionHooks,setActiveExtensionParsers,setActiveExtensionPreflight,setActiveExtensionRegistrations,setActiveExtensionRenderers,setActiveExtensionServices,setFocusedItem,shouldCompletePlanOnClose,shouldResolveMutationStdinTokenField,shouldResolveMutationStdinTokens,shouldRunSearchRefreshInForeground,splitAcceptanceCriteria,splitCommaList,stableStringify,stableValueEquals,startTelemetryCommand,statusIsTerminal,toErrorMessage,toItemRecord,toNonEmptyStringOrUndefined,toReplayDocument,tokenizeSimilarityText,transferMutationStdinTokenPolicy,validateMissingParentReference,validateSprintOrReleaseValue,validateTypeOptions,verifyHistoryChain,verifyHistoryChainWithVersion,verifyHistoryRecordHash,verifyHistoryRewriteEvidence,writeAuthorEnvironment,writeFileAtomic,writeMutationCheckpoint,writeSettings,writeStderr,writeStdout,writeVectorizationStatusLedger,writeWorkspaceJsonWithHistory};
|
|
2
2
|
//# sourceMappingURL=runtime-primitives.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Agent Recovery and Guidance
|
|
2
|
+
|
|
3
|
+
Tracked by [pm-o5s22y](../.agents/pm/issues/pm-o5s22y.toon) and
|
|
4
|
+
[pm-80k965](../.agents/pm/issues/pm-80k965.toon).
|
|
5
|
+
|
|
6
|
+
## Policy refusals preserve context
|
|
7
|
+
|
|
8
|
+
A workflow `require_fields` refusal names the missing metadata and the policy
|
|
9
|
+
that requires it. SDK `PmCliError.context` carries `policy_violations`, the
|
|
10
|
+
full refusal count, policy descriptions, and missing-field recovery. CLI JSON
|
|
11
|
+
adds that same evidence to `refusal.policies` and `refusal.missing_fields`.
|
|
12
|
+
Its `surface` identifies `policy:<id>` rather than attributing the failure to
|
|
13
|
+
an unrelated, valid flag such as `--resolution`.
|
|
14
|
+
|
|
15
|
+
Diagnostics show at most three policy rows and disclose the total. The complete
|
|
16
|
+
policy remains available through `pm schema policies`. Recovery maps metadata
|
|
17
|
+
to declared update flags; package-defined fields retain their SDK/package
|
|
18
|
+
contract instead of receiving an invented CLI option. For example, a missing
|
|
19
|
+
`actual_result` produces an update using `--actual-result`, followed by a retry
|
|
20
|
+
of the refused operation. Refusals preserve item state and record the policy
|
|
21
|
+
refusal in workspace history. Creation and import refusals instead direct the
|
|
22
|
+
caller to supply evidence in the original request, because no item was created.
|
|
23
|
+
Generated update commands include a shell-quoted `--pm-path` to retain the
|
|
24
|
+
refusing tracker even when an SDK caller works outside that project.
|
|
25
|
+
|
|
26
|
+
See [Declarative Workflow Policies](WORKFLOW_POLICIES.md) for portable policy
|
|
27
|
+
declarations and approval semantics.
|
|
28
|
+
|
|
29
|
+
## Refresh managed agent instructions
|
|
30
|
+
|
|
31
|
+
Root and alias help examples use canonical commands. Help for a deprecated
|
|
32
|
+
alias explicitly identifies its replacement. Generated instructions use
|
|
33
|
+
`pm claim <id> --start` to claim and start work atomically.
|
|
34
|
+
|
|
35
|
+
`pm init --agent-guidance status` compares existing managed blocks with the
|
|
36
|
+
current template. `pm health --summary` reports `agent_guidance_outdated` as an
|
|
37
|
+
advisory and supplies this repair command:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pm init --agent-guidance add
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The repair refreshes stale managed blocks in both `AGENTS.md` and `CLAUDE.md`,
|
|
44
|
+
preserves all surrounding user instructions, and becomes a no-op after the
|
|
45
|
+
first successful refresh. It does not replace handwritten guidance without
|
|
46
|
+
managed markers. Status and health inspection do not rewrite these files.
|
|
47
|
+
An unreadable guidance path produces an `agent_guidance_unreadable` advisory;
|
|
48
|
+
health still reports the remaining checks and suggests inspecting file types
|
|
49
|
+
and read permissions.
|
|
@@ -6,6 +6,8 @@ Tracked research: [pm-n28t](../.agents/pm/tasks/pm-n28t.toon). Future implementa
|
|
|
6
6
|
Research date: **2026-07-11**. This page is a research and implementation plan. It does not record a completed
|
|
7
7
|
plugin remediation, ChatGPT app deployment, or public plugin submission.
|
|
8
8
|
|
|
9
|
+
Update for [pm-95d7](../.agents/pm/features/pm-95d7.toon): the Claude and Codex cached launchers now resolve a runtime pinned to the plugin version and reuse it offline after first installation. The remaining sections preserve the July research baseline and the separate ChatGPT app/public distribution plan; historical `@latest` findings below describe the pre-remediation state.
|
|
10
|
+
|
|
9
11
|
## Executive Conclusion
|
|
10
12
|
|
|
11
13
|
The current `plugins/pm-codex` package is an actual native Codex plugin, but it is not yet a complete,
|
|
@@ -24,7 +24,9 @@ pm-cli/ (repo root)
|
|
|
24
24
|
│ │ └── session-start.mjs # Injects pm context at session start
|
|
25
25
|
│ ├── agents/ # Subagent definitions (one .md per coordinator/triage/verification subagent)
|
|
26
26
|
│ ├── scripts/
|
|
27
|
-
│ │
|
|
27
|
+
│ │ ├── pm-mcp-server.mjs # MCP server launcher
|
|
28
|
+
│ │ └── plugin-runtime.mjs # Exact-version runtime resolver
|
|
29
|
+
│ ├── package.json # Pinned pm-cli dependency
|
|
28
30
|
│ └── README.md # User-facing installation guide
|
|
29
31
|
└── scripts/
|
|
30
32
|
└── smoke-claude-plugin.mjs # Full plugin smoke test (run in CI)
|
|
@@ -83,10 +85,10 @@ agent mutations do not need a hard-wired `PM_AUTHOR`.
|
|
|
83
85
|
`plugins/pm-claude/scripts/pm-mcp-server.mjs` resolves the server in order:
|
|
84
86
|
|
|
85
87
|
1. `PM_CLI_MCP_SERVER` env var (explicit override)
|
|
86
|
-
2. `dist/mcp/server.js`
|
|
87
|
-
3.
|
|
88
|
+
2. `dist/mcp/server.js` at the matching repository root, when the checkout package and plugin versions agree
|
|
89
|
+
3. The exact `@unbrained/pm-cli` version declared in the plugin's `package.json`, installed under the plugin data directory on first use
|
|
88
90
|
|
|
89
|
-
|
|
91
|
+
The cached runtime is reused offline. It never resolves npm's moving `latest` tag. A first install needs npm access; an unavailable pinned release causes an explicit startup failure.
|
|
90
92
|
|
|
91
93
|
## Session Start Hook
|
|
92
94
|
|
|
@@ -94,7 +96,7 @@ This means the plugin works both from a repo checkout and from an npm-cached plu
|
|
|
94
96
|
|
|
95
97
|
1. Checks for `.agents/pm/settings.json` in the current workspace.
|
|
96
98
|
2. Exits silently if pm is not initialized.
|
|
97
|
-
3. Runs `pm context --limit 5 --json` with a
|
|
99
|
+
3. Runs `pm context --limit 5 --json` from the same pinned runtime as the MCP server, with a 15-second command timeout.
|
|
98
100
|
4. Injects a compact status line into the session context.
|
|
99
101
|
|
|
100
102
|
Example injection:
|
|
@@ -121,6 +123,15 @@ discovery for `2026-07-28`, 32 tools present, full workflow (init → create →
|
|
|
121
123
|
claim → update → link files/docs/tests → get → context → search → validate →
|
|
122
124
|
health), and session-start hook.
|
|
123
125
|
|
|
126
|
+
The copied-cache smoke packs the current build, installs it under a temporary
|
|
127
|
+
plugin data directory, copies both plugin bundles away from the checkout, and
|
|
128
|
+
restarts their MCP launchers with npm unavailable:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
pnpm build
|
|
132
|
+
pnpm smoke:plugin-cache
|
|
133
|
+
```
|
|
134
|
+
|
|
124
135
|
### MCP server smoke test
|
|
125
136
|
|
|
126
137
|
```bash
|
|
@@ -182,9 +193,9 @@ After installing the plugin:
|
|
|
182
193
|
|
|
183
194
|
| pm-cli version | Plugin version | Claude Code version |
|
|
184
195
|
|---------------|----------------|---------------------|
|
|
185
|
-
|
|
|
196
|
+
| Exact same date-based version as the plugin | Exact same date-based version as pm-cli | Current supported Claude Code |
|
|
186
197
|
|
|
187
|
-
The authoritative plugin version is `plugins/pm-claude/.claude-plugin/plugin.json`;
|
|
198
|
+
The authoritative plugin version is `plugins/pm-claude/.claude-plugin/plugin.json`; `pnpm version:check` also verifies the pinned runtime dependency.
|
|
188
199
|
|
|
189
200
|
The MCP server uses JSON-RPC 2.0 over stdio with canonical protocol version
|
|
190
201
|
`2026-07-28`. A bounded legacy path remains for unversioned older hosts, with
|
package/docs/CODEX_PLUGIN.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
pm-cli ships a repo-local Codex plugin at [`plugins/pm-codex`](../plugins/pm-codex/README.md).
|
|
4
4
|
|
|
5
5
|
It is a real Codex plugin package: the repo marketplace installs it and Codex registers its skills and bundled
|
|
6
|
-
MCP server.
|
|
6
|
+
MCP server. Its cached runtime installs the exact version declared by the plugin manifest and works offline after that first install. It is not yet an Apps SDK-backed ChatGPT app. The official-source
|
|
7
7
|
audit, verified gaps, and phased remediation plan are documented in
|
|
8
8
|
[Native ChatGPT and Codex Plugin Implementation Plan](CHATGPT_CODEX_PLUGIN_IMPLEMENTATION.md).
|
|
9
9
|
|
|
@@ -25,19 +25,12 @@ Keep this page as the public docs router so the MCP tool/action list has one mai
|
|
|
25
25
|
|
|
26
26
|
## Current MCP Runtime Note
|
|
27
27
|
|
|
28
|
-
The plugin launcher uses the local repository build when `dist/mcp/server.js` is present.
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npx -y --package=@unbrained/pm-cli@latest pm-mcp
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
The fallback starts the package MCP server, not the `pm` CLI command. Tool calls import pm command modules and return JSON-compatible structured results.
|
|
35
|
-
|
|
36
|
-
This is current behavior, not the target distribution contract. A normal cached install has no repository
|
|
37
|
-
`dist/` ancestor, so it depends on npm availability and can run a newer server than the installed plugin. Track
|
|
38
|
-
the self-contained, version-coherent runtime work under
|
|
28
|
+
The plugin launcher uses the local repository build when `dist/mcp/server.js` is present. A copied plugin installs the exact `@unbrained/pm-cli` version in its `package.json` to persistent plugin data, then starts its `pm-mcp` server directly with Node. The installed runtime can be reused offline. Track the remaining native-plugin and ChatGPT app work under
|
|
39
29
|
[pm-95d7](../.agents/pm/features/pm-95d7.toon).
|
|
40
30
|
|
|
31
|
+
Run `pnpm build && pnpm smoke:plugin-cache` to verify both copied plugin
|
|
32
|
+
bundles against a real packed install with npm unavailable at MCP startup.
|
|
33
|
+
|
|
41
34
|
## Safety
|
|
42
35
|
|
|
43
36
|
For real repository tracking, leave `path` unset so pm uses the repository `.agents/pm` root. For tests, use a sandbox `cwd` or `path` and isolate `PM_GLOBAL_PATH`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Defect Recurrence and Boundary Evidence
|
|
2
2
|
|
|
3
|
-
Tracked by [pm-1qkivy](../.agents/pm/features/pm-1qkivy.toon), [pm-rtn5h6](../.agents/pm/tasks/pm-rtn5h6.toon), [pm-0pzgit](../.agents/pm/tasks/pm-0pzgit.toon), [pm-7c27ep](../.agents/pm/issues/pm-7c27ep.toon),
|
|
3
|
+
Tracked by [pm-1qkivy](../.agents/pm/features/pm-1qkivy.toon), [pm-rtn5h6](../.agents/pm/tasks/pm-rtn5h6.toon), [pm-0pzgit](../.agents/pm/tasks/pm-0pzgit.toon), [pm-7c27ep](../.agents/pm/issues/pm-7c27ep.toon), [pm-h8tpeh](../.agents/pm/features/pm-h8tpeh.toon), and [pm-003j](../.agents/pm/tasks/pm-003j.toon).
|
|
4
4
|
|
|
5
5
|
## Agent Quick Context
|
|
6
6
|
|
|
@@ -192,6 +192,13 @@ adds a disconnected, unregistered recurrence pair and must also exit `1`. Focuse
|
|
|
192
192
|
|
|
193
193
|
`repository-defect-evidence-required` is part of the blocking `repository-static-quality` assurance composition. That makes local and CI behavior share the same provider result, assertion negative control, enforcement, and immutable verdict semantics.
|
|
194
194
|
|
|
195
|
+
The static quality pipeline also runs `node scripts/check-workflow-permissions.mjs`.
|
|
196
|
+
It parses every GitHub workflow and requires an explicit read-only default token;
|
|
197
|
+
write scopes belong on jobs that use them. Run its `--negative-control` mode to
|
|
198
|
+
confirm a workflow-scope `contents: write` grant exits with status 1. This
|
|
199
|
+
protects the least-privilege workflow policy that [pm-003j](../.agents/pm/tasks/pm-003j.toon)
|
|
200
|
+
tracks, even between Scorecard scans.
|
|
201
|
+
|
|
195
202
|
The mandatory `gate-registry` check also compares each recurrence family's `checks.hosted` values with concrete names derived from the repository workflows. It expands static matrix axes and applies exclusions before inclusions according to [GitHub's matrix rules](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstrategymatrixinclude). Renamed or removed checks produce named findings. Runtime expressions, unnamed matrix jobs, and static expansions beyond 256 combinations cannot certify a required check name. The public SDK policy parser remains provider-neutral; this workflow binding belongs to the repository gate.
|
|
196
203
|
|
|
197
204
|
Assurance request schemas declare each family's required identity, triggers,
|
|
@@ -78,3 +78,30 @@ Readiness, `pm next`, context blocker summaries, `pm list-blocked`, downstream `
|
|
|
78
78
|
`pm deps` returns `legacy_alias_counts` for the workspace. `pm graph audit` returns the same field beside canonical `profile.edges_by_kind` counts, `profile.edge_share_by_kind` composition ratios, and the `semantic_edges`/`semantic_edge_share` context-preservation census. The semantic census counts `discovered_from`, `incident_from`, `recurs_from`, `supersedes`, and `verifies` over all deduplicated directed edges. Empty objects and zero shares are explicit, not omitted. These diagnostics are read-only; terminal history remains untouched until an explicitly governed migration is requested.
|
|
79
79
|
|
|
80
80
|
Assurance `dependency_kind` measurements canonicalize both the declaration and stored row before comparing. A declaration using `related` and one using the accepted `related_to` alias therefore measure the same edge population; alias debt remains separately observable through `legacy_alias_counts`.
|
|
81
|
+
|
|
82
|
+
## Composition policy when adding relationships
|
|
83
|
+
|
|
84
|
+
Tracked by [pm-r3o7x4](../.agents/pm/issues/pm-r3o7x4.toon).
|
|
85
|
+
|
|
86
|
+
Choose the kind that states the actual relationship. Use `related` for honest
|
|
87
|
+
association; never relabel it as evidence or ordering merely to pass a gate.
|
|
88
|
+
This workspace enforces `profile.semantic_edge_share` over canonical,
|
|
89
|
+
deduplicated directed edges in both graph-composition and tracker-context-quality.
|
|
90
|
+
The raw association count and declared-row share remain diagnostics. Neither
|
|
91
|
+
imposes a second blocking bound on otherwise healthy graph growth.
|
|
92
|
+
|
|
93
|
+
Adding a provenance or verification edge cannot lower that composition ratio.
|
|
94
|
+
Adding only association, hierarchy, implementation, or ordering edges can lower
|
|
95
|
+
it; a mixed addition that increases semantic share passes the composition floor
|
|
96
|
+
whenever its baseline passed. Ordering and hierarchy still have their own
|
|
97
|
+
integrity constraints. Inspect the active workspace policy before bulk changes:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
pm assurance show gate graph-composition
|
|
101
|
+
pm assurance show assertion graph-semantic-edge-share-floor
|
|
102
|
+
pm assurance run graph-composition --trigger ci --dry-run
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The floor is a declared minimum, not a promise that every small dilution fails.
|
|
106
|
+
Real growth is allowed above it; an associative-only pass crossing the floor is
|
|
107
|
+
refused. Both terminal and active history contribute to the same denominator.
|
package/docs/MERGE_SAFETY.md
CHANGED
|
@@ -51,12 +51,13 @@ shell quoting when it expands the placeholder. Receipt ingestion also removes
|
|
|
51
51
|
one legacy matching quote pair so receipts written by older clone-local drivers
|
|
52
52
|
remain reconcilable.
|
|
53
53
|
`pm validate --check-storage-integrity` and `pm health` also compare every
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
effective driver definition with the installed SDK. A command installed by
|
|
55
|
+
another valid `@unbrained/pm-cli` package is
|
|
56
56
|
also accepted when its Node and `dist/cli.js` paths exist, its manifest owns the
|
|
57
|
-
`pm` bin,
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
`pm` bin, the driver arguments are semantically identical, and its version
|
|
58
|
+
matches any exact project runtime pins. A driver inside a sibling worktree of
|
|
59
|
+
the same repository is rejected, even when that package is otherwise valid.
|
|
60
|
+
Independent global installations remain supported. A missing, malformed, or semantically stale definition is
|
|
60
61
|
reported even when the committed attribute fence is correct.
|
|
61
62
|
Health and validation name `pm merge install` as the repair command for missing
|
|
62
63
|
or drifted drivers. This upgrade behavior is tracked by
|
|
@@ -64,6 +65,28 @@ or drifted drivers. This upgrade behavior is tracked by
|
|
|
64
65
|
|
|
65
66
|
The installer publishes the shared `.gitattributes` fence only after the clone-local driver commands are configured. If the repository Git config is read-only or another Git process holds its lock, the command returns the stable `merge_git_config_unwritable` error with recovery guidance and leaves an absent fence absent. Use `pm merge install --dry-run --json` to inspect the contract in intentionally read-only workspaces.
|
|
66
67
|
|
|
68
|
+
### Independent worktree runtimes
|
|
69
|
+
|
|
70
|
+
Tracked by [pm-c1dwbt](../.agents/pm/issues/pm-c1dwbt.toon).
|
|
71
|
+
|
|
72
|
+
Run `pm merge install` from each worktree with that worktree's intended pm
|
|
73
|
+
installation. When installing in a linked worktree, the SDK enables Git's
|
|
74
|
+
`extensions.worktreeConfig` and writes drivers with `git config --worktree`.
|
|
75
|
+
Existing main-worktree drivers are preserved in its `config.worktree`; later
|
|
76
|
+
installs cannot replace another worktree's runtime. Main-only `core.worktree`
|
|
77
|
+
and `core.bare=true` settings migrate with their original scope. Ordinary
|
|
78
|
+
clones retain local configuration until worktree isolation is needed.
|
|
79
|
+
Git subprocesses discard inherited repository-location variables so an SDK
|
|
80
|
+
caller's `GIT_DIR` cannot redirect installation or diagnosis to another clone.
|
|
81
|
+
Configuration migration uses multiple Git writes: a failed write is reported,
|
|
82
|
+
and rerunning `pm merge install` after resolving the config lock or permissions
|
|
83
|
+
completes the migration while preserving values already copied for the main tree.
|
|
84
|
+
|
|
85
|
+
Health reads Git's effective configuration, including worktree overrides.
|
|
86
|
+
Removing a sibling worktree does not remove a separately installed main driver.
|
|
87
|
+
Use `pm merge install` in the affected worktree to repair stale, missing, or
|
|
88
|
+
incompatible commands. A dry run changes neither configuration nor attributes.
|
|
89
|
+
|
|
67
90
|
### Fence coverage contract
|
|
68
91
|
|
|
69
92
|
The fenced block is generated by one shared coverage contract (`buildMergeAttributePatterns`) covering every mergeable artifact class: tracker-wide `**/*.toon` and `**/*.md` item patterns, explicit per-type diagnostic patterns, all tracker `**/*.jsonl` paths under the relationship-event driver with the more-specific `history/*.jsonl` rule overriding history streams, root `settings.json`, and every nested `**/*.json` document. The tracker-wide item rules protect extension-defined type folders even when a receiving branch has not installed the package that registered them; explicit type rows still make active-registry drift diagnosable. The broad JSON rules automatically cover schema, managed-extension, evaluation-corpus, and future package-owned authoritative JSON without another hand-maintained allowlist. The broad JSONL rule is required because `RelationshipEventStore` supports package-owned custom relative paths anywhere below the tracker root. Two mechanisms keep the committed fence from drifting out of that contract:
|
package/docs/README.md
CHANGED
|
@@ -38,6 +38,7 @@ pm guide release --json
|
|
|
38
38
|
- [Context and Operations Namespaces](COMMAND_NAMESPACES.md) - native navigation, diagnostics, event streams, and compatibility aliases.
|
|
39
39
|
- [CLI Scripting Contract](SCRIPTING.md) - exit codes, flat mutation receipts versus read envelopes, stdout/stderr boundaries, stable JSON fields, uniform OR filters, and shell composition recipes.
|
|
40
40
|
- [Configuration](CONFIGURATION.md) - settings, storage formats, output, search, validation, and environment variables.
|
|
41
|
+
- [Semantic Batching and Retrieval Quality](SEARCH_QUALITY.md) - independent request bounds, execution receipts, and per-query quality floors.
|
|
41
42
|
- [Testing](TESTING.md) - sandbox-safe local tests and linked-test orchestration.
|
|
42
43
|
- [Completion Portability and Bounded Replication Checks](VALIDATION_PORTABILITY.md) - literal Bash choices across versions and locales, and semantic Git diff collection.
|
|
43
44
|
- [Build and Release Acceptance](BUILD_AND_RELEASE_ACCEPTANCE.md) - complete-build leases and cross-platform registry installation controls.
|
|
@@ -68,6 +69,7 @@ pm guide release --json
|
|
|
68
69
|
- [History Algorithms and Detached Attestations](HISTORY_ATTESTATION.md) - named record digests, portable exact-byte proofs, and read-only verification.
|
|
69
70
|
- [History-derived Governance Repair](HISTORY_GOVERNANCE_REPAIR.md) - verified closure timestamps and typed issue-code lineage.
|
|
70
71
|
- [History Maintenance and Recovery](HISTORY_MAINTENANCE.md) - native history commands, permanent aliases, shared SDK transforms, and transactional recovery.
|
|
72
|
+
- [Agent Recovery and Guidance](AGENT_RECOVERY_AND_GUIDANCE.md) - policy refusal evidence, canonical help, and managed instruction freshness.
|
|
71
73
|
- [Declarative Workflow Policies](WORKFLOW_POLICIES.md) - portable lifecycle requirements, independent approvals, and completeness reports.
|
|
72
74
|
- [Mutation Integrity](MUTATION_INTEGRITY.md) - shared CLI/SDK/MCP author, secret, append-only disposition, and stale-work guardrails.
|
|
73
75
|
- [Agent Provenance ADR Amendment](AGENT_PROVENANCE_ADR.md) - extensible model, effort, role, and host provenance with privacy and compatibility boundaries.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Scheduled release reliability
|
|
2
|
+
|
|
3
|
+
Tracked by [pm-e70zh5](../.agents/pm/issues/pm-e70zh5.toon) and
|
|
4
|
+
[pm-44u3wt](../.agents/pm/issues/pm-44u3wt.toon).
|
|
5
|
+
|
|
6
|
+
The **Release Reliability** workflow evaluates the preceding 30 days after a
|
|
7
|
+
scheduled Auto Release completes, daily at nominal 04:35 UTC, and on manual
|
|
8
|
+
dispatch. It saves a JSON report and fails its own check when policy is breached.
|
|
9
|
+
The report is independent of candidate correctness: historical failures must
|
|
10
|
+
remain visible while a reviewed repair can still pass publication gates.
|
|
11
|
+
|
|
12
|
+
## Policy and clock
|
|
13
|
+
|
|
14
|
+
[The versioned policy](../config/release-reliability-policy.json) declares the
|
|
15
|
+
nominal release cron as 02:35 UTC, a 60-minute dispatch allowance, a maximum
|
|
16
|
+
10% failure rate, and at least seven completed observations. These are explicit
|
|
17
|
+
operational targets, not thresholds fitted to make the current history green.
|
|
18
|
+
Missing samples yield an insufficient-data failure, never a healthy zero rate.
|
|
19
|
+
|
|
20
|
+
Dispatch delay measures `created_at` against the nearest preceding nominal
|
|
21
|
+
daily occurrence. Queue delay separately measures `run_started_at - created_at`.
|
|
22
|
+
GitHub does not supply the intended scheduled timestamp: the inferred occurrence
|
|
23
|
+
cannot disambiguate delays greater than 24 hours. Missing the latest occurrence
|
|
24
|
+
whose 60-minute allowance has elapsed produces `missing_scheduled_run`. Before
|
|
25
|
+
03:35 UTC, absence of today's run is still within the allowance; afterward,
|
|
26
|
+
inspect the report to distinguish missing dispatch, a pending attempt, and a
|
|
27
|
+
completed failure. A late run is visible even when it subsequently succeeds.
|
|
28
|
+
|
|
29
|
+
The release version and one-per-day guard use the UTC execution date captured
|
|
30
|
+
by release preparation, not the inferred cron occurrence. A delayed run cannot
|
|
31
|
+
backdate a tag. Reporting never creates, retargets, retries, or publishes a tag.
|
|
32
|
+
The unchanged [release recovery rules](RELEASING.md#failure-handling) apply.
|
|
33
|
+
|
|
34
|
+
## Evidence and denominator
|
|
35
|
+
|
|
36
|
+
The collector paginates the schedule-only runs API over an explicit half-open
|
|
37
|
+
UTC window and checks returned counts and unique IDs. It retrieves attempt 1
|
|
38
|
+
when a run was rerun. A later successful attempt, manual dispatch, issue recovery,
|
|
39
|
+
or closed blocker cannot change the original scheduled failure. Pending runs
|
|
40
|
+
are listed separately; all completed non-success conclusions count as failures.
|
|
41
|
+
API errors, truncated pages, ambiguous artifacts, and mismatched run identities
|
|
42
|
+
fail collection rather than silently reducing the denominator.
|
|
43
|
+
|
|
44
|
+
Auto Release saves `release-observation-<attempt>` artifacts for 90 days. Each
|
|
45
|
+
contains only run/attempt identity, event, outcome and failure-stage name. Gate
|
|
46
|
+
stdout, stderr, credentials and environment values are not archived. A confirmed
|
|
47
|
+
publication, verified existing same-day release, unchanged source, tracker-only
|
|
48
|
+
changes, and an empty changelog are distinct outcomes. Failed gates retain their
|
|
49
|
+
structured stage; older failures fall back to failed job/step names from GitHub.
|
|
50
|
+
Receipt writing and upload are non-blocking so an evidence-service outage cannot
|
|
51
|
+
change publication success into a release blocker. Missing or expired success
|
|
52
|
+
receipts are `unknown_success`, with
|
|
53
|
+
`outcome_evidence_complete: false`; success alone does not prove publication.
|
|
54
|
+
|
|
55
|
+
Reports retain the input policy, window, per-run observations, outcome counts,
|
|
56
|
+
stage counts, denominator, failure rate and violations. Download a report using
|
|
57
|
+
`gh run download <report-run-id> --name <artifact-name> --dir <temporary-directory>`.
|
|
58
|
+
The pure evaluator in `scripts/release/release-reliability.mjs` permits offline
|
|
59
|
+
replay with a fixed clock and captured input; the collector is read-only and
|
|
60
|
+
downloads only data, never executable source. The reporting workflow checks out
|
|
61
|
+
the default branch rather than the triggering run's code and has read-only token
|
|
62
|
+
permissions.
|
|
63
|
+
|
|
64
|
+
The report is a rolling observation, not a permanent archive of all releases.
|
|
65
|
+
Retain exported receipts externally if a longer historical window is needed.
|
|
66
|
+
It does not implement the separate nightly per-leg reliability programme or
|
|
67
|
+
change the manual same-day version policy.
|
|
68
|
+
|
|
69
|
+
Provider contracts: [workflow run attempts](https://docs.github.com/en/rest/actions/workflow-runs#get-a-workflow-run-attempt)
|
|
70
|
+
and [completion-triggered workflows](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#workflow_run).
|
package/docs/RELEASING.md
CHANGED
|
@@ -282,7 +282,11 @@ The automatic release commit is the sole non-identical-tree derivation. The
|
|
|
282
282
|
gate requires one parent, the canonical release subject and body, an immutable
|
|
283
283
|
`v<version>` tag resolving to the candidate, the complete expected manifest
|
|
284
284
|
inventory, exact old-version to new-version substitutions in every manifest,
|
|
285
|
-
and an exact `Unreleased` changelog-heading replacement.
|
|
285
|
+
and an exact `Unreleased` changelog-heading replacement. Fixed distribution
|
|
286
|
+
paths come from the same inventory as version synchronization and staging.
|
|
287
|
+
Plugin runtime package manifests are mandatory when present in the immutable
|
|
288
|
+
parent tree; historical parents that predate those files remain verifiable.
|
|
289
|
+
The package-generated
|
|
286
290
|
replacement may be `## <version>` or the historical
|
|
287
291
|
`## <version> - <YYYY-MM-DD>` form, with the date matching the calendar version.
|
|
288
292
|
The complete heading must match and every other changelog byte must remain
|
|
@@ -447,6 +451,10 @@ gh run watch <run-id> --exit-status
|
|
|
447
451
|
|
|
448
452
|
## Post-Release Verification
|
|
449
453
|
|
|
454
|
+
Use the [rolling reliability report](RELEASE_RELIABILITY.md) as well as the
|
|
455
|
+
latest release result. Its first-attempt denominator, explicit outcome receipts,
|
|
456
|
+
and UTC dispatch policy preserve failures even after a recovery succeeds.
|
|
457
|
+
|
|
450
458
|
```bash
|
|
451
459
|
npm view @unbrained/pm-cli@<version> version dist.integrity dist.unpackedSize --json
|
|
452
460
|
npx --yes --package @unbrained/pm-cli@<version> -- pm --json --no-extensions contracts --summary
|