@unbrained/pm-cli 2026.5.6 → 2026.5.11
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/pm/extensions/.managed-extensions.json +2 -2
- package/.agents/pm/extensions/beads/runtime.js +4 -4
- package/.agents/pm/extensions/beads/runtime.ts +5 -5
- package/.agents/pm/extensions/todos/runtime.js +7 -7
- package/.agents/pm/extensions/todos/runtime.ts +10 -10
- package/.agents/skills/HARNESS_COMPATIBILITY.md +45 -0
- package/.agents/skills/README.md +21 -0
- package/.agents/skills/pm-developer/SKILL.md +73 -0
- package/.agents/skills/pm-developer/references/COMMAND_PLAYBOOK.md +48 -0
- package/.agents/skills/pm-developer/references/PROMPTS.md +17 -0
- package/.agents/skills/pm-extensions/SKILL.md +57 -0
- package/.agents/skills/pm-extensions/references/LIFECYCLE.md +40 -0
- package/.agents/skills/pm-extensions/references/TROUBLESHOOTING.md +25 -0
- package/.agents/skills/pm-sdk/SKILL.md +50 -0
- package/.agents/skills/pm-sdk/references/INTEGRATION_CHECKLIST.md +31 -0
- package/.agents/skills/pm-sdk/references/PROMPTS.md +13 -0
- package/.agents/skills/pm-user/SKILL.md +59 -0
- package/.agents/skills/pm-user/references/PROMPTS.md +17 -0
- package/.agents/skills/pm-user/references/WORKFLOWS.md +35 -0
- package/.claude-plugin/marketplace.json +38 -0
- package/.pi/README.md +35 -0
- package/.pi/agents/pm-triage-agent.md +19 -0
- package/.pi/agents/pm-verification-agent.md +21 -0
- package/.pi/chains/pm-native-delivery.chain.md +11 -0
- package/.pi/extensions/pm-cli/index.js +387 -0
- package/.pi/prompts/pm-workflow.md +5 -0
- package/.pi/skills/pm-native/SKILL.md +44 -0
- package/.pi/skills/pm-release/SKILL.md +35 -0
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +13 -0
- package/PRD.md +16 -16
- package/README.md +30 -4
- package/dist/cli/argv-utils.d.ts +5 -0
- package/dist/cli/argv-utils.js +34 -0
- package/dist/cli/argv-utils.js.map +1 -0
- package/dist/cli/bootstrap-args.d.ts +15 -0
- package/dist/cli/bootstrap-args.js +211 -0
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commander-usage.js +109 -3
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/claim.js +6 -6
- package/dist/cli/commands/claim.js.map +1 -1
- package/dist/cli/commands/close.js +9 -9
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/comments.d.ts +2 -0
- package/dist/cli/commands/comments.js +57 -8
- package/dist/cli/commands/comments.js.map +1 -1
- package/dist/cli/commands/completion.js +40 -7
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.js +6 -3
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/contracts.d.ts +19 -0
- package/dist/cli/commands/contracts.js +36 -1
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.d.ts +2 -2
- package/dist/cli/commands/create.js +116 -55
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/docs.js +13 -6
- package/dist/cli/commands/docs.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +3 -1
- package/dist/cli/commands/extension.js +174 -2
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/files.js +19 -12
- package/dist/cli/commands/files.js.map +1 -1
- package/dist/cli/commands/get.js +5 -5
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/guide.d.ts +55 -0
- package/dist/cli/commands/guide.js +260 -0
- package/dist/cli/commands/guide.js.map +1 -0
- package/dist/cli/commands/health.js +1 -1
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history.js +30 -10
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.js +1 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.js +21 -1
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/learnings.js +3 -3
- package/dist/cli/commands/learnings.js.map +1 -1
- package/dist/cli/commands/metadata-normalizers.d.ts +4 -0
- package/dist/cli/commands/metadata-normalizers.js +37 -0
- package/dist/cli/commands/metadata-normalizers.js.map +1 -0
- package/dist/cli/commands/notes.js +3 -3
- package/dist/cli/commands/notes.js.map +1 -1
- package/dist/cli/commands/reindex.js +180 -156
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/restore.d.ts +2 -2
- package/dist/cli/commands/restore.js +44 -24
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/search.d.ts +2 -0
- package/dist/cli/commands/search.js +45 -26
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/test-all.d.ts +2 -0
- package/dist/cli/commands/test-all.js +2 -0
- package/dist/cli/commands/test-all.js.map +1 -1
- package/dist/cli/commands/test.d.ts +1 -0
- package/dist/cli/commands/test.js +13 -5
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update.js +188 -157
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.js +1 -1
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.d.ts +9 -1
- package/dist/cli/error-guidance.js +147 -6
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/guide-topics.d.ts +25 -0
- package/dist/cli/guide-topics.js +283 -0
- package/dist/cli/guide-topics.js.map +1 -0
- package/dist/cli/help-content.js +25 -1
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/help-json-payload.js +11 -1
- package/dist/cli/help-json-payload.js.map +1 -1
- package/dist/cli/main.js +69 -6
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +38 -1
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +17 -4
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-setup.js +15 -1
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/telemetry-flush.d.ts +2 -0
- package/dist/cli/telemetry-flush.js +4 -0
- package/dist/cli/telemetry-flush.js.map +1 -0
- package/dist/cli.js +1 -2
- package/dist/cli.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +72 -0
- package/dist/core/extensions/extension-types.js +24 -0
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -0
- package/dist/core/extensions/loader.js +766 -7
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/history/history.js +32 -11
- package/dist/core/history/history.js.map +1 -1
- package/dist/core/item/item-format.d.ts +2 -2
- package/dist/core/item/item-format.js +16 -16
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/lock/lock.js +2 -0
- package/dist/core/lock/lock.js.map +1 -1
- package/dist/core/schema/runtime-field-filters.js +1 -1
- package/dist/core/schema/runtime-field-filters.js.map +1 -1
- package/dist/core/schema/runtime-field-values.js +2 -2
- package/dist/core/schema/runtime-field-values.js.map +1 -1
- package/dist/core/schema/runtime-schema.d.ts +1 -1
- package/dist/core/schema/runtime-schema.js +3 -3
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/search/cache.js +7 -21
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/corpus.d.ts +13 -0
- package/dist/core/search/corpus.js +74 -0
- package/dist/core/search/corpus.js.map +1 -0
- package/dist/core/search/embedding-batches.js +90 -30
- package/dist/core/search/embedding-batches.js.map +1 -1
- package/dist/core/sentry/instrument.d.ts +18 -1
- package/dist/core/sentry/instrument.js +128 -12
- package/dist/core/sentry/instrument.js.map +1 -1
- package/dist/core/shared/constants.d.ts +1 -1
- package/dist/core/shared/constants.js +21 -1
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/errors.d.ts +8 -0
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/core/shared/levenshtein.d.ts +1 -0
- package/dist/core/shared/levenshtein.js +37 -0
- package/dist/core/shared/levenshtein.js.map +1 -0
- package/dist/core/store/front-matter-cache.d.ts +1 -1
- package/dist/core/store/front-matter-cache.js +13 -13
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/core/store/item-format-migration.js +5 -2
- package/dist/core/store/item-format-migration.js.map +1 -1
- package/dist/core/store/item-store.js +16 -15
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/paths.js +35 -2
- package/dist/core/store/paths.js.map +1 -1
- package/dist/core/store/settings.js +216 -2
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/runtime.d.ts +1 -0
- package/dist/core/telemetry/runtime.js +102 -3
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/core/test/item-test-run-tracking.js +2 -2
- package/dist/core/test/item-test-run-tracking.js.map +1 -1
- package/dist/mcp/server.d.ts +2 -0
- package/dist/mcp/server.js +407 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/pi/native.d.ts +5 -0
- package/dist/pi/native.js +236 -0
- package/dist/pi/native.js.map +1 -0
- package/dist/sdk/cli-contracts.d.ts +24 -2
- package/dist/sdk/cli-contracts.js +317 -2
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/index.d.ts +12 -1
- package/dist/sdk/index.js +8 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/types.d.ts +51 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +15 -0
- package/docs/ARCHITECTURE.md +2 -2
- package/docs/CLAUDE_CODE_PLUGIN.md +225 -0
- package/docs/CODEX_PLUGIN.md +33 -0
- package/docs/COMMANDS.md +6 -2
- package/docs/CONFIGURATION.md +2 -8
- package/docs/EXTENSIONS.md +688 -0
- package/docs/MIGRATION_CLI_SIMPLIFICATION.md +64 -0
- package/docs/PI_PACKAGE.md +141 -0
- package/docs/QUICKSTART.md +1 -0
- package/docs/README.md +30 -1
- package/docs/RELEASING.md +4 -2
- package/docs/SDK.md +444 -2
- package/docs/examples/ci/github-actions-pm-extension-gate.yml +53 -0
- package/docs/examples/ci/gitlab-ci-pm-extension-gate.yml +41 -0
- package/docs/examples/ci/jenkins-pm-extension-gate.Jenkinsfile +45 -0
- package/docs/examples/policy-restricted-extension/README.md +74 -0
- package/docs/examples/policy-restricted-extension/index.js +21 -0
- package/docs/examples/policy-restricted-extension/manifest.json +21 -0
- package/docs/examples/policy-restricted-extension/package.json +8 -0
- package/docs/examples/sdk-app-embedding/README.md +39 -0
- package/docs/examples/sdk-app-embedding/package.json +9 -0
- package/docs/examples/sdk-app-embedding/run-embedded-pm.mjs +61 -0
- package/docs/examples/sdk-contract-consumer/README.md +57 -0
- package/docs/examples/sdk-contract-consumer/inspect-contracts.mjs +47 -0
- package/docs/examples/sdk-contract-consumer/package.json +10 -0
- package/docs/examples/starter-extension/README.md +57 -42
- package/docs/examples/starter-extension/manifest.json +15 -0
- package/marketplace.json +34 -0
- package/package.json +38 -4
- package/plugins/pm-cli-claude/.claude-plugin/plugin.json +23 -0
- package/plugins/pm-cli-claude/.mcp.json +12 -0
- package/plugins/pm-cli-claude/README.md +225 -0
- package/plugins/pm-cli-claude/agents/pm-coordinator.md +48 -0
- package/plugins/pm-cli-claude/agents/pm-delivery-chain.md +88 -0
- package/plugins/pm-cli-claude/agents/pm-triage-agent.md +83 -0
- package/plugins/pm-cli-claude/agents/pm-verification-agent.md +88 -0
- package/plugins/pm-cli-claude/commands/pm-audit.md +39 -0
- package/plugins/pm-cli-claude/commands/pm-calendar.md +41 -0
- package/plugins/pm-cli-claude/commands/pm-close-task.md +20 -0
- package/plugins/pm-cli-claude/commands/pm-developer.md +38 -0
- package/plugins/pm-cli-claude/commands/pm-init.md +44 -0
- package/plugins/pm-cli-claude/commands/pm-list.md +39 -0
- package/plugins/pm-cli-claude/commands/pm-new.md +36 -0
- package/plugins/pm-cli-claude/commands/pm-planner.md +51 -0
- package/plugins/pm-cli-claude/commands/pm-release.md +41 -0
- package/plugins/pm-cli-claude/commands/pm-search.md +21 -0
- package/plugins/pm-cli-claude/commands/pm-start-task.md +27 -0
- package/plugins/pm-cli-claude/commands/pm-status.md +15 -0
- package/plugins/pm-cli-claude/commands/pm-triage.md +35 -0
- package/plugins/pm-cli-claude/commands/pm-workflow.md +49 -0
- package/plugins/pm-cli-claude/hooks/hooks.json +17 -0
- package/plugins/pm-cli-claude/hooks/session-start.mjs +120 -0
- package/plugins/pm-cli-claude/scripts/pm-mcp-server.mjs +60 -0
- package/plugins/pm-cli-claude/skills/pm-audit/SKILL.md +88 -0
- package/plugins/pm-cli-claude/skills/pm-developer/SKILL.md +116 -0
- package/plugins/pm-cli-claude/skills/pm-planner/SKILL.md +118 -0
- package/plugins/pm-cli-claude/skills/pm-release/SKILL.md +83 -0
- package/plugins/pm-cli-claude/skills/pm-workflow/SKILL.md +148 -0
- package/plugins/pm-cli-codex/.codex-plugin/plugin.json +45 -0
- package/plugins/pm-cli-codex/.mcp.json +14 -0
- package/plugins/pm-cli-codex/README.md +30 -0
- package/plugins/pm-cli-codex/assets/pm-cli-small.svg +4 -0
- package/plugins/pm-cli-codex/commands/pm-audit.md +8 -0
- package/plugins/pm-cli-codex/commands/pm-close-task.md +9 -0
- package/plugins/pm-cli-codex/commands/pm-start-task.md +9 -0
- package/plugins/pm-cli-codex/scripts/pm-mcp-server.mjs +54 -0
- package/plugins/pm-cli-codex/skills/pm-auditor/SKILL.md +21 -0
- package/plugins/pm-cli-codex/skills/pm-auditor/agents/openai.yaml +6 -0
- package/plugins/pm-cli-codex/skills/pm-native/SKILL.md +57 -0
- package/plugins/pm-cli-codex/skills/pm-native/agents/openai.yaml +6 -0
- package/plugins/pm-cli-codex/skills/pm-release/SKILL.md +19 -0
- package/plugins/pm-cli-codex/skills/pm-release/agents/openai.yaml +6 -0
package/dist/sdk/index.d.ts
CHANGED
|
@@ -8,6 +8,17 @@ export * from "./cli-contracts.js";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const EXTENSION_CAPABILITIES: readonly ["commands", "renderers", "hooks", "schema", "importers", "search", "parser", "preflight", "services"];
|
|
10
10
|
export type ExtensionCapability = (typeof EXTENSION_CAPABILITIES)[number];
|
|
11
|
+
/**
|
|
12
|
+
* Canonical extension governance policy modes and registration surfaces.
|
|
13
|
+
*/
|
|
14
|
+
export declare const EXTENSION_POLICY_MODES: readonly ["off", "warn", "enforce"];
|
|
15
|
+
export declare const EXTENSION_POLICY_SURFACES: readonly ["commands.override", "commands.handler", "hooks.beforecommand", "hooks.aftercommand", "hooks.onwrite", "hooks.onread", "hooks.onindex", "schema.flags", "schema.itemfields", "schema.itemtypes", "schema.migrations", "parser.override", "preflight.override", "services.override", "renderers.override", "importers.importer", "importers.exporter", "search.provider", "search.vectorstore"];
|
|
16
|
+
export declare const EXTENSION_TRUST_MODES: readonly ["off", "warn", "enforce"];
|
|
17
|
+
export declare const EXTENSION_SANDBOX_PROFILES: readonly ["none", "restricted", "strict"];
|
|
18
|
+
export type ExtensionPolicyMode = (typeof EXTENSION_POLICY_MODES)[number];
|
|
19
|
+
export type ExtensionPolicySurface = (typeof EXTENSION_POLICY_SURFACES)[number];
|
|
20
|
+
export type ExtensionTrustMode = (typeof EXTENSION_TRUST_MODES)[number];
|
|
21
|
+
export type ExtensionSandboxProfile = (typeof EXTENSION_SANDBOX_PROFILES)[number];
|
|
11
22
|
/**
|
|
12
23
|
* Versioned capability contract metadata emitted by runtime diagnostics.
|
|
13
24
|
*/
|
|
@@ -29,6 +40,6 @@ export interface ExtensionModule {
|
|
|
29
40
|
* `export default defineExtension({ activate(api) { ... } })`
|
|
30
41
|
*/
|
|
31
42
|
export declare function defineExtension<TModule extends ExtensionModule>(module: TModule): TModule;
|
|
32
|
-
export type { AfterCommandHook, AfterCommandHookContext, BeforeCommandHook, BeforeCommandHookContext, CommandDefinition, ExtensionCommandArgumentDefinition, CommandHandler, CommandHandlerContext, CommandOverride, CommandOverrideContext, ExtensionServiceName, Exporter, ExtensionActivationResult, ExtensionApi, ExtensionCommandRegistry, ExtensionDiagnostic, ExtensionDiscoveryResult, ExtensionLoadResult, ExtensionManifest, ExtensionSearchMode, ExtensionParserRegistry, ExtensionPreflightRegistry, ExtensionRegistrationRegistry, ExtensionRendererRegistry, ExtensionServiceRegistry, FlagValueType, FlagDefinition, ImportExportContext, Importer, OnIndexHook, OnIndexHookContext, OnReadHook, OnReadHookContext, OnWriteHook, OnWriteHookContext, OutputRendererFormat, ParserOverride, ParserOverrideContext, ParserOverrideDelta, PreflightOverride, PreflightOverrideContext, PreflightOverrideDelta, PreflightRuntimeDecision, RendererOverride, RendererOverrideContext, SchemaFieldDefinition, SchemaItemTypeCommandOptionPolicyDefinition, SchemaItemTypeOptionDefinition, SchemaItemTypeDefinition, SchemaMigrationDefinition, SchemaMigrationRunContext, SchemaMigrationRunner, SearchProviderEmbedBatchContext, SearchProviderEmbedContext, SearchProviderDefinition, SearchProviderHit, SearchProviderQueryContext, SearchProviderQueryResult, ServiceOverride, ServiceOverrideContext, VectorStoreAdapterDefinition, VectorStoreDeleteContext, VectorStoreQueryContext, VectorStoreQueryHit, VectorStoreUpsertContext, VectorStoreUpsertPoint, } from "../core/extensions/loader.js";
|
|
43
|
+
export type { AfterCommandHook, AfterCommandHookContext, BeforeCommandHook, BeforeCommandHookContext, CommandDefinition, ExtensionCommandArgumentDefinition, CommandHandler, CommandHandlerContext, CommandOverride, CommandOverrideContext, ExtensionServiceName, Exporter, ExtensionActivationResult, ExtensionApi, ExtensionCommandRegistry, ExtensionDiagnostic, ExtensionDiscoveryResult, ExtensionLoadResult, ExtensionManifest, ExtensionGovernancePolicy, ExtensionPolicyOverride, ExtensionProvenanceMetadata, ExtensionRuntimePermissionDeclaration, ExtensionSearchMode, ExtensionParserRegistry, ExtensionPreflightRegistry, ExtensionRegistrationRegistry, ExtensionRendererRegistry, ExtensionServiceRegistry, FlagValueType, FlagDefinition, ImportExportContext, Importer, OnIndexHook, OnIndexHookContext, OnReadHook, OnReadHookContext, OnWriteHook, OnWriteHookContext, OutputRendererFormat, ParserOverride, ParserOverrideContext, ParserOverrideDelta, PreflightOverride, PreflightOverrideContext, PreflightOverrideDelta, PreflightRuntimeDecision, RendererOverride, RendererOverrideContext, SchemaFieldDefinition, SchemaItemTypeCommandOptionPolicyDefinition, SchemaItemTypeOptionDefinition, SchemaItemTypeDefinition, SchemaMigrationDefinition, SchemaMigrationRunContext, SchemaMigrationRunner, SearchProviderEmbedBatchContext, SearchProviderEmbedContext, SearchProviderDefinition, SearchProviderHit, SearchProviderQueryContext, SearchProviderQueryResult, ServiceOverride, ServiceOverrideContext, VectorStoreAdapterDefinition, VectorStoreDeleteContext, VectorStoreQueryContext, VectorStoreQueryHit, VectorStoreUpsertContext, VectorStoreUpsertPoint, } from "../core/extensions/loader.js";
|
|
33
44
|
export type { GlobalOptions } from "../core/shared/command-types.js";
|
|
34
45
|
export type { ItemDocument, ItemFrontMatter, ItemStatus, ItemType, PmSettings } from "../types/index.js";
|
package/dist/sdk/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EXTENSION_CAPABILITY_CONTRACT, EXTENSION_CAPABILITY_CONTRACT_VERSION, EXTENSION_CAPABILITY_LEGACY_ALIASES, KNOWN_EXTENSION_CAPABILITIES, } from "../core/extensions/loader.js";
|
|
1
|
+
import { EXTENSION_CAPABILITY_CONTRACT, EXTENSION_CAPABILITY_CONTRACT_VERSION, EXTENSION_CAPABILITY_LEGACY_ALIASES, KNOWN_EXTENSION_CAPABILITIES, KNOWN_EXTENSION_POLICY_MODES, KNOWN_EXTENSION_POLICY_SURFACES, KNOWN_EXTENSION_SANDBOX_PROFILES, KNOWN_EXTENSION_TRUST_MODES, } from "../core/extensions/loader.js";
|
|
2
2
|
export * from "./cli-contracts.js";
|
|
3
3
|
/**
|
|
4
4
|
* Canonical extension capability names accepted by pm.
|
|
@@ -7,6 +7,13 @@ export * from "./cli-contracts.js";
|
|
|
7
7
|
* `capabilities`.
|
|
8
8
|
*/
|
|
9
9
|
export const EXTENSION_CAPABILITIES = KNOWN_EXTENSION_CAPABILITIES;
|
|
10
|
+
/**
|
|
11
|
+
* Canonical extension governance policy modes and registration surfaces.
|
|
12
|
+
*/
|
|
13
|
+
export const EXTENSION_POLICY_MODES = KNOWN_EXTENSION_POLICY_MODES;
|
|
14
|
+
export const EXTENSION_POLICY_SURFACES = KNOWN_EXTENSION_POLICY_SURFACES;
|
|
15
|
+
export const EXTENSION_TRUST_MODES = KNOWN_EXTENSION_TRUST_MODES;
|
|
16
|
+
export const EXTENSION_SANDBOX_PROFILES = KNOWN_EXTENSION_SANDBOX_PROFILES;
|
|
10
17
|
/**
|
|
11
18
|
* Versioned capability contract metadata emitted by runtime diagnostics.
|
|
12
19
|
*/
|
package/dist/sdk/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["sdk/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,qCAAqC,EACrC,mCAAmC,EACnC,4BAA4B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["sdk/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,qCAAqC,EACrC,mCAAmC,EACnC,4BAA4B,EAC5B,4BAA4B,EAC5B,+BAA+B,EAC/B,gCAAgC,EAChC,2BAA2B,GAG5B,MAAM,8BAA8B,CAAC;AACtC,cAAc,oBAAoB,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAAC;AAGnE;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAAC;AACnE,MAAM,CAAC,MAAM,yBAAyB,GAAG,+BAA+B,CAAC;AACzE,MAAM,CAAC,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AACjE,MAAM,CAAC,MAAM,0BAA0B,GAAG,gCAAgC,CAAC;AAM3E;;GAEG;AACH,OAAO,EAAE,6BAA6B,EAAE,qCAAqC,EAAE,mCAAmC,EAAE,CAAC;AAarH;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAkC,MAAe;IAC9E,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import {\n EXTENSION_CAPABILITY_CONTRACT,\n EXTENSION_CAPABILITY_CONTRACT_VERSION,\n EXTENSION_CAPABILITY_LEGACY_ALIASES,\n KNOWN_EXTENSION_CAPABILITIES,\n KNOWN_EXTENSION_POLICY_MODES,\n KNOWN_EXTENSION_POLICY_SURFACES,\n KNOWN_EXTENSION_SANDBOX_PROFILES,\n KNOWN_EXTENSION_TRUST_MODES,\n type ExtensionApi,\n type ExtensionManifest,\n} from \"../core/extensions/loader.js\";\nexport * from \"./cli-contracts.js\";\n\n/**\n * Canonical extension capability names accepted by pm.\n *\n * Extension manifests should declare one or more of these values in\n * `capabilities`.\n */\nexport const EXTENSION_CAPABILITIES = KNOWN_EXTENSION_CAPABILITIES;\nexport type ExtensionCapability = (typeof EXTENSION_CAPABILITIES)[number];\n\n/**\n * Canonical extension governance policy modes and registration surfaces.\n */\nexport const EXTENSION_POLICY_MODES = KNOWN_EXTENSION_POLICY_MODES;\nexport const EXTENSION_POLICY_SURFACES = KNOWN_EXTENSION_POLICY_SURFACES;\nexport const EXTENSION_TRUST_MODES = KNOWN_EXTENSION_TRUST_MODES;\nexport const EXTENSION_SANDBOX_PROFILES = KNOWN_EXTENSION_SANDBOX_PROFILES;\nexport type ExtensionPolicyMode = (typeof EXTENSION_POLICY_MODES)[number];\nexport type ExtensionPolicySurface = (typeof EXTENSION_POLICY_SURFACES)[number];\nexport type ExtensionTrustMode = (typeof EXTENSION_TRUST_MODES)[number];\nexport type ExtensionSandboxProfile = (typeof EXTENSION_SANDBOX_PROFILES)[number];\n\n/**\n * Versioned capability contract metadata emitted by runtime diagnostics.\n */\nexport { EXTENSION_CAPABILITY_CONTRACT, EXTENSION_CAPABILITY_CONTRACT_VERSION, EXTENSION_CAPABILITY_LEGACY_ALIASES };\n\nexport interface ExtensionModule {\n /**\n * Optional in-module metadata mirror.\n *\n * The authoritative manifest remains on-disk `manifest.json`; this field is\n * useful when authors want colocated metadata for tooling/tests.\n */\n manifest?: ExtensionManifest;\n activate(api: ExtensionApi): void | Promise<void>;\n}\n\n/**\n * Typed identity helper for extension module exports.\n *\n * Use as:\n * `export default defineExtension({ activate(api) { ... } })`\n */\nexport function defineExtension<TModule extends ExtensionModule>(module: TModule): TModule {\n return module;\n}\n\nexport type {\n AfterCommandHook,\n AfterCommandHookContext,\n BeforeCommandHook,\n BeforeCommandHookContext,\n CommandDefinition,\n ExtensionCommandArgumentDefinition,\n CommandHandler,\n CommandHandlerContext,\n CommandOverride,\n CommandOverrideContext,\n ExtensionServiceName,\n Exporter,\n ExtensionActivationResult,\n ExtensionApi,\n ExtensionCommandRegistry,\n ExtensionDiagnostic,\n ExtensionDiscoveryResult,\n ExtensionLoadResult,\n ExtensionManifest,\n ExtensionGovernancePolicy,\n ExtensionPolicyOverride,\n ExtensionProvenanceMetadata,\n ExtensionRuntimePermissionDeclaration,\n ExtensionSearchMode,\n ExtensionParserRegistry,\n ExtensionPreflightRegistry,\n ExtensionRegistrationRegistry,\n ExtensionRendererRegistry,\n ExtensionServiceRegistry,\n FlagValueType,\n FlagDefinition,\n ImportExportContext,\n Importer,\n OnIndexHook,\n OnIndexHookContext,\n OnReadHook,\n OnReadHookContext,\n OnWriteHook,\n OnWriteHookContext,\n OutputRendererFormat,\n ParserOverride,\n ParserOverrideContext,\n ParserOverrideDelta,\n PreflightOverride,\n PreflightOverrideContext,\n PreflightOverrideDelta,\n PreflightRuntimeDecision,\n RendererOverride,\n RendererOverrideContext,\n SchemaFieldDefinition,\n SchemaItemTypeCommandOptionPolicyDefinition,\n SchemaItemTypeOptionDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationDefinition,\n SchemaMigrationRunContext,\n SchemaMigrationRunner,\n SearchProviderEmbedBatchContext,\n SearchProviderEmbedContext,\n SearchProviderDefinition,\n SearchProviderHit,\n SearchProviderQueryContext,\n SearchProviderQueryResult,\n ServiceOverride,\n ServiceOverrideContext,\n VectorStoreAdapterDefinition,\n VectorStoreDeleteContext,\n VectorStoreQueryContext,\n VectorStoreQueryHit,\n VectorStoreUpsertContext,\n VectorStoreUpsertPoint,\n} from \"../core/extensions/loader.js\";\n\nexport type { GlobalOptions } from \"../core/shared/command-types.js\";\nexport type { ItemDocument, ItemFrontMatter, ItemStatus, ItemType, PmSettings } from \"../types/index.js\";\n"]}
|
package/dist/types.d.ts
CHANGED
|
@@ -145,6 +145,10 @@ export interface RuntimeStatusDefinition {
|
|
|
145
145
|
}
|
|
146
146
|
export interface RuntimeFieldDefinition {
|
|
147
147
|
key: string;
|
|
148
|
+
metadata_key?: string;
|
|
149
|
+
/**
|
|
150
|
+
* @deprecated Use metadata_key.
|
|
151
|
+
*/
|
|
148
152
|
front_matter_key?: string;
|
|
149
153
|
cli_flag?: string;
|
|
150
154
|
cli_aliases?: string[];
|
|
@@ -195,7 +199,7 @@ export interface ItemTestRunSummary {
|
|
|
195
199
|
linked_tests?: number;
|
|
196
200
|
fail_on_skipped_triggered?: boolean;
|
|
197
201
|
}
|
|
198
|
-
export interface
|
|
202
|
+
export interface ItemMetadata {
|
|
199
203
|
id: string;
|
|
200
204
|
title: string;
|
|
201
205
|
description: string;
|
|
@@ -258,8 +262,12 @@ export interface ItemFrontMatter {
|
|
|
258
262
|
close_reason?: string;
|
|
259
263
|
[key: string]: unknown;
|
|
260
264
|
}
|
|
265
|
+
/**
|
|
266
|
+
* @deprecated Use ItemMetadata.
|
|
267
|
+
*/
|
|
268
|
+
export type ItemFrontMatter = ItemMetadata;
|
|
261
269
|
export interface ItemDocument {
|
|
262
|
-
|
|
270
|
+
metadata: ItemMetadata;
|
|
263
271
|
body: string;
|
|
264
272
|
}
|
|
265
273
|
export interface HistoryPatchOp {
|
|
@@ -306,6 +314,46 @@ export interface GovernanceSettings {
|
|
|
306
314
|
metadata_profile: ValidateMetadataProfile;
|
|
307
315
|
force_required_for_stale_lock: boolean;
|
|
308
316
|
}
|
|
317
|
+
export type ExtensionPolicyMode = "off" | "warn" | "enforce";
|
|
318
|
+
export type ExtensionTrustMode = "off" | "warn" | "enforce";
|
|
319
|
+
export type ExtensionSandboxProfile = "none" | "restricted" | "strict";
|
|
320
|
+
export interface ExtensionPolicyOverrideSettings {
|
|
321
|
+
name: string;
|
|
322
|
+
disabled?: boolean;
|
|
323
|
+
require_trusted?: boolean;
|
|
324
|
+
require_provenance?: boolean;
|
|
325
|
+
sandbox_profile?: ExtensionSandboxProfile;
|
|
326
|
+
allowed_capabilities?: string[];
|
|
327
|
+
blocked_capabilities?: string[];
|
|
328
|
+
allowed_surfaces?: string[];
|
|
329
|
+
blocked_surfaces?: string[];
|
|
330
|
+
allowed_commands?: string[];
|
|
331
|
+
blocked_commands?: string[];
|
|
332
|
+
allowed_actions?: string[];
|
|
333
|
+
blocked_actions?: string[];
|
|
334
|
+
allowed_services?: string[];
|
|
335
|
+
blocked_services?: string[];
|
|
336
|
+
}
|
|
337
|
+
export interface ExtensionPolicySettings {
|
|
338
|
+
mode: ExtensionPolicyMode;
|
|
339
|
+
trust_mode: ExtensionTrustMode;
|
|
340
|
+
require_provenance: boolean;
|
|
341
|
+
trusted_extensions: string[];
|
|
342
|
+
default_sandbox_profile: ExtensionSandboxProfile;
|
|
343
|
+
allowed_extensions: string[];
|
|
344
|
+
blocked_extensions: string[];
|
|
345
|
+
allowed_capabilities: string[];
|
|
346
|
+
blocked_capabilities: string[];
|
|
347
|
+
allowed_surfaces: string[];
|
|
348
|
+
blocked_surfaces: string[];
|
|
349
|
+
allowed_commands: string[];
|
|
350
|
+
blocked_commands: string[];
|
|
351
|
+
allowed_actions: string[];
|
|
352
|
+
blocked_actions: string[];
|
|
353
|
+
allowed_services: string[];
|
|
354
|
+
blocked_services: string[];
|
|
355
|
+
extension_overrides: ExtensionPolicyOverrideSettings[];
|
|
356
|
+
}
|
|
309
357
|
export interface PmSettings {
|
|
310
358
|
version: number;
|
|
311
359
|
id_prefix: string;
|
|
@@ -352,6 +400,7 @@ export interface PmSettings {
|
|
|
352
400
|
extensions: {
|
|
353
401
|
enabled: string[];
|
|
354
402
|
disabled: string[];
|
|
403
|
+
policy: ExtensionPolicySettings;
|
|
355
404
|
};
|
|
356
405
|
search: {
|
|
357
406
|
score_threshold: number;
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":"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","sourcesContent":["export const BUILTIN_ITEM_TYPE_VALUES = [\n \"Epic\",\n \"Feature\",\n \"Task\",\n \"Chore\",\n \"Issue\",\n \"Decision\",\n \"Event\",\n \"Reminder\",\n \"Milestone\",\n \"Meeting\",\n] as const;\nexport const ITEM_TYPE_VALUES = BUILTIN_ITEM_TYPE_VALUES;\nexport type BuiltinItemType = (typeof BUILTIN_ITEM_TYPE_VALUES)[number];\nexport type ItemType = string;\n\nexport const STATUS_VALUES = [\n \"draft\",\n \"open\",\n \"in_progress\",\n \"blocked\",\n \"closed\",\n \"canceled\",\n] as const;\nexport type ItemStatus = string;\n\nexport const RUNTIME_STATUS_ROLE_VALUES = [\n \"draft\",\n \"active\",\n \"blocked\",\n \"terminal\",\n \"terminal_done\",\n \"terminal_canceled\",\n \"default_open\",\n \"default_close\",\n \"default_cancel\",\n] as const;\nexport type RuntimeStatusRole = (typeof RUNTIME_STATUS_ROLE_VALUES)[number];\n\nexport const RUNTIME_FIELD_TYPE_VALUES = [\"string\", \"number\", \"boolean\", \"string_array\"] as const;\nexport type RuntimeFieldType = (typeof RUNTIME_FIELD_TYPE_VALUES)[number];\n\nexport const RUNTIME_FIELD_COMMAND_VALUES = [\"create\", \"update\", \"update_many\", \"list\", \"search\", \"calendar\", \"context\"] as const;\nexport type RuntimeFieldCommand = (typeof RUNTIME_FIELD_COMMAND_VALUES)[number];\n\nexport const RUNTIME_UNKNOWN_FIELD_POLICY_VALUES = [\"allow\", \"warn\", \"reject\"] as const;\nexport type RuntimeUnknownFieldPolicy = (typeof RUNTIME_UNKNOWN_FIELD_POLICY_VALUES)[number];\n\nexport const DEPENDENCY_KIND_VALUES = [\n \"blocks\",\n \"parent\",\n \"child\",\n \"parent_child\",\n \"child_of\",\n \"related\",\n \"related_to\",\n \"discovered_from\",\n \"blocked_by\",\n \"incident_from\",\n \"epic\",\n \"supersedes\",\n \"task\",\n] as const;\nexport type DependencyKind = (typeof DEPENDENCY_KIND_VALUES)[number];\n\nexport const SCOPE_VALUES = [\"project\", \"global\"] as const;\nexport type LinkScope = (typeof SCOPE_VALUES)[number];\n\nexport const RISK_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type RiskLevel = (typeof RISK_VALUES)[number];\n\nexport const ISSUE_SEVERITY_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type IssueSeverity = (typeof ISSUE_SEVERITY_VALUES)[number];\n\nexport const CONFIDENCE_TEXT_VALUES = [\"low\", \"medium\", \"high\"] as const;\nexport type ConfidenceTextLevel = (typeof CONFIDENCE_TEXT_VALUES)[number];\nexport type ConfidenceValue = number | ConfidenceTextLevel;\n\nexport const ITEM_FORMAT_VALUES = [\"toon\", \"json_markdown\"] as const;\nexport type ItemFormat = (typeof ITEM_FORMAT_VALUES)[number];\n\nexport const SPRINT_RELEASE_FORMAT_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type SprintReleaseFormatPolicy = (typeof SPRINT_RELEASE_FORMAT_POLICY_VALUES)[number];\nexport const PARENT_REFERENCE_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type ParentReferencePolicy = (typeof PARENT_REFERENCE_POLICY_VALUES)[number];\nexport const VALIDATE_METADATA_PROFILE_VALUES = [\"core\", \"strict\", \"custom\"] as const;\nexport type ValidateMetadataProfile = (typeof VALIDATE_METADATA_PROFILE_VALUES)[number];\nexport const GOVERNANCE_PRESET_VALUES = [\"minimal\", \"default\", \"strict\", \"custom\"] as const;\nexport type GovernancePreset = (typeof GOVERNANCE_PRESET_VALUES)[number];\nexport const GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES = [\"none\", \"warn\", \"strict\"] as const;\nexport type GovernanceOwnershipEnforcement = (typeof GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES)[number];\nexport const GOVERNANCE_CREATE_MODE_DEFAULT_VALUES = [\"progressive\", \"strict\"] as const;\nexport type GovernanceCreateModeDefault = (typeof GOVERNANCE_CREATE_MODE_DEFAULT_VALUES)[number];\nexport const GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES = [\"off\", \"warn\", \"strict\"] as const;\nexport type GovernanceCloseValidationDefault = (typeof GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES)[number];\nexport const VALIDATE_METADATA_REQUIRED_FIELD_VALUES = [\n \"author\",\n \"acceptance_criteria\",\n \"estimated_minutes\",\n \"close_reason\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n] as const;\nexport type ValidateMetadataRequiredField = (typeof VALIDATE_METADATA_REQUIRED_FIELD_VALUES)[number];\n\nexport const RECURRENCE_FREQUENCY_VALUES = [\"daily\", \"weekly\", \"monthly\", \"yearly\"] as const;\nexport type RecurrenceFrequency = (typeof RECURRENCE_FREQUENCY_VALUES)[number];\n\nexport const RECURRENCE_WEEKDAY_VALUES = [\"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\", \"sun\"] as const;\nexport type RecurrenceWeekday = (typeof RECURRENCE_WEEKDAY_VALUES)[number];\n\nexport interface Dependency {\n id: string;\n kind: DependencyKind;\n created_at: string;\n author?: string;\n source_kind?: string;\n}\n\nexport interface Comment {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LogNote {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LinkedFile {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface LinkedTest {\n command?: string;\n path?: string;\n scope: LinkScope;\n timeout_seconds?: number;\n pm_context_mode?: \"schema\" | \"tracker\" | \"auto\";\n env_set?: Record<string, string>;\n env_clear?: string[];\n shared_host_safe?: boolean;\n assert_stdout_contains?: string[];\n assert_stdout_regex?: string[];\n assert_stderr_contains?: string[];\n assert_stderr_regex?: string[];\n assert_stdout_min_lines?: number;\n assert_json_field_equals?: Record<string, string>;\n assert_json_field_gte?: Record<string, number>;\n note?: string;\n}\n\nexport interface LinkedDoc {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface Reminder {\n at: string;\n text: string;\n}\n\nexport interface RecurrenceRule {\n freq: RecurrenceFrequency;\n interval?: number;\n count?: number;\n until?: string;\n by_weekday?: RecurrenceWeekday[];\n by_month_day?: number[];\n exdates?: string[];\n}\n\nexport interface CalendarEvent {\n start_at: string;\n end_at?: string;\n title?: string;\n description?: string;\n location?: string;\n all_day?: boolean;\n timezone?: string;\n recurrence?: RecurrenceRule;\n}\n\nexport interface ItemTypeOptionDefinition {\n key: string;\n values: string[];\n required?: boolean;\n aliases?: string[];\n description?: string;\n}\n\nexport interface ItemTypeCommandOptionPolicy {\n command: \"create\" | \"update\";\n option: string;\n required?: boolean;\n visible?: boolean;\n enabled?: boolean;\n}\n\nexport interface ItemTypeDefinition {\n name: string;\n folder?: string;\n aliases?: string[];\n required_create_fields?: string[];\n required_create_repeatables?: string[];\n options?: ItemTypeOptionDefinition[];\n command_option_policies?: ItemTypeCommandOptionPolicy[];\n}\n\nexport interface RuntimeStatusDefinition {\n id: string;\n aliases?: string[];\n roles?: RuntimeStatusRole[];\n description?: string;\n order?: number;\n}\n\nexport interface RuntimeFieldDefinition {\n key: string;\n front_matter_key?: string;\n cli_flag?: string;\n cli_aliases?: string[];\n description?: string;\n type?: RuntimeFieldType;\n commands?: RuntimeFieldCommand[];\n repeatable?: boolean;\n required?: boolean;\n required_on_create?: boolean;\n required_types?: string[];\n allow_unset?: boolean;\n}\n\nexport interface RuntimeWorkflowDefinition {\n draft_status?: string;\n open_status?: string;\n in_progress_status?: string;\n blocked_status?: string;\n close_status?: string;\n canceled_status?: string;\n}\n\nexport interface RuntimeSchemaFileConfig {\n types?: string;\n statuses?: string;\n fields?: string;\n workflows?: string;\n}\n\nexport interface RuntimeSchemaSettings {\n version: number;\n files: RuntimeSchemaFileConfig;\n statuses: RuntimeStatusDefinition[];\n fields: RuntimeFieldDefinition[];\n workflow: RuntimeWorkflowDefinition;\n unknown_field_policy: RuntimeUnknownFieldPolicy;\n}\n\nexport interface ItemTestRunSummary {\n run_id: string;\n kind: \"test\" | \"test-all\";\n status: \"passed\" | \"failed\" | \"stopped\" | \"canceled\";\n started_at: string;\n finished_at: string;\n recorded_at: string;\n attempt?: number;\n resumed_from?: string;\n passed: number;\n failed: number;\n skipped: number;\n items?: number;\n linked_tests?: number;\n fail_on_skipped_triggered?: boolean;\n}\n\nexport interface ItemFrontMatter {\n id: string;\n title: string;\n description: string;\n type: ItemType;\n source_type?: string;\n type_options?: Record<string, string>;\n status: ItemStatus;\n priority: 0 | 1 | 2 | 3 | 4;\n tags: string[];\n created_at: string;\n updated_at: string;\n deadline?: string;\n reminders?: Reminder[];\n events?: CalendarEvent[];\n closed_at?: string;\n assignee?: string;\n source_owner?: string;\n author?: string;\n estimated_minutes?: number;\n acceptance_criteria?: string;\n design?: string;\n external_ref?: string;\n definition_of_ready?: string;\n order?: number;\n goal?: string;\n objective?: string;\n value?: string;\n impact?: string;\n outcome?: string;\n why_now?: string;\n parent?: string;\n reviewer?: string;\n risk?: \"low\" | \"medium\" | \"high\" | \"critical\";\n confidence?: ConfidenceValue;\n sprint?: string;\n release?: string;\n blocked_by?: string;\n blocked_reason?: string;\n unblock_note?: string;\n reporter?: string;\n severity?: IssueSeverity;\n environment?: string;\n repro_steps?: string;\n resolution?: string;\n expected_result?: string;\n actual_result?: string;\n affected_version?: string;\n fixed_version?: string;\n component?: string;\n regression?: boolean;\n customer_impact?: string;\n dependencies?: Dependency[];\n comments?: Comment[];\n notes?: LogNote[];\n learnings?: LogNote[];\n files?: LinkedFile[];\n tests?: LinkedTest[];\n test_runs?: ItemTestRunSummary[];\n docs?: LinkedDoc[];\n close_reason?: string;\n [key: string]: unknown;\n}\n\nexport interface ItemDocument {\n front_matter: ItemFrontMatter;\n body: string;\n}\n\nexport interface HistoryPatchOp {\n op: \"add\" | \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\";\n path: string;\n from?: string;\n value?: unknown;\n}\n\nexport interface HistoryEntry {\n ts: string;\n author: string;\n op: string;\n patch: HistoryPatchOp[];\n before_hash: string;\n after_hash: string;\n message?: string;\n}\n\nexport const CONTEXT_DEPTH_VALUES = [\"brief\", \"standard\", \"deep\"] as const;\nexport type ContextDepth = (typeof CONTEXT_DEPTH_VALUES)[number];\n\nexport const CONTEXT_SECTION_VALUES = [\n \"hierarchy\",\n \"activity\",\n \"progress\",\n \"blockers\",\n \"files\",\n \"workload\",\n \"staleness\",\n \"tests\",\n] as const;\nexport type ContextSectionName = (typeof CONTEXT_SECTION_VALUES)[number];\n\nexport interface ContextSectionSettings {\n hierarchy: boolean;\n activity: boolean;\n progress: boolean;\n blockers: boolean;\n files: boolean;\n workload: boolean;\n staleness: boolean;\n tests: boolean;\n}\n\nexport interface ContextSettings {\n default_depth: ContextDepth;\n activity_limit: number;\n stale_threshold_days: number;\n sections: ContextSectionSettings;\n}\n\nexport interface GovernanceSettings {\n preset: GovernancePreset;\n ownership_enforcement: GovernanceOwnershipEnforcement;\n create_mode_default: GovernanceCreateModeDefault;\n close_validation_default: GovernanceCloseValidationDefault;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n force_required_for_stale_lock: boolean;\n}\n\nexport interface PmSettings {\n version: number;\n id_prefix: string;\n author_default: string;\n item_format: ItemFormat;\n locks: {\n ttl_seconds: number;\n };\n output: {\n default_format: \"toon\" | \"json\";\n };\n history: {\n missing_stream: \"auto_create\" | \"strict_error\";\n };\n validation: {\n sprint_release_format: SprintReleaseFormatPolicy;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n metadata_required_fields: ValidateMetadataRequiredField[];\n lifecycle_stale_blocker_reason_patterns: string[];\n lifecycle_closure_like_blocked_reason_patterns: string[];\n lifecycle_closure_like_resolution_patterns: string[];\n lifecycle_closure_like_actual_result_patterns: string[];\n };\n governance: GovernanceSettings;\n workflow: {\n definition_of_done: string[];\n };\n testing: {\n record_results_to_items: boolean;\n };\n telemetry: {\n enabled: boolean;\n first_run_prompt_completed: boolean;\n capture_level: \"minimal\" | \"redacted\" | \"max\";\n endpoint: string;\n installation_id: string;\n retention_days: number;\n };\n item_types: {\n definitions: ItemTypeDefinition[];\n };\n schema: RuntimeSchemaSettings;\n extensions: {\n enabled: string[];\n disabled: string[];\n };\n search: {\n score_threshold: number;\n hybrid_semantic_weight: number;\n max_results: number;\n embedding_model: string;\n embedding_batch_size: number;\n scanner_max_batch_retries: number;\n provider?: string;\n tuning?: {\n title_exact_bonus?: number;\n title_weight?: number;\n description_weight?: number;\n tags_weight?: number;\n status_weight?: number;\n body_weight?: number;\n comments_weight?: number;\n notes_weight?: number;\n learnings_weight?: number;\n dependencies_weight?: number;\n linked_content_weight?: number;\n };\n };\n providers: {\n openai: {\n base_url: string;\n api_key: string;\n model: string;\n };\n ollama: {\n base_url: string;\n model: string;\n };\n };\n context: ContextSettings;\n vector_store: {\n adapter?: string;\n qdrant: {\n url: string;\n api_key: string;\n };\n lancedb: {\n path: string;\n };\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":"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","sourcesContent":["export const BUILTIN_ITEM_TYPE_VALUES = [\n \"Epic\",\n \"Feature\",\n \"Task\",\n \"Chore\",\n \"Issue\",\n \"Decision\",\n \"Event\",\n \"Reminder\",\n \"Milestone\",\n \"Meeting\",\n] as const;\nexport const ITEM_TYPE_VALUES = BUILTIN_ITEM_TYPE_VALUES;\nexport type BuiltinItemType = (typeof BUILTIN_ITEM_TYPE_VALUES)[number];\nexport type ItemType = string;\n\nexport const STATUS_VALUES = [\n \"draft\",\n \"open\",\n \"in_progress\",\n \"blocked\",\n \"closed\",\n \"canceled\",\n] as const;\nexport type ItemStatus = string;\n\nexport const RUNTIME_STATUS_ROLE_VALUES = [\n \"draft\",\n \"active\",\n \"blocked\",\n \"terminal\",\n \"terminal_done\",\n \"terminal_canceled\",\n \"default_open\",\n \"default_close\",\n \"default_cancel\",\n] as const;\nexport type RuntimeStatusRole = (typeof RUNTIME_STATUS_ROLE_VALUES)[number];\n\nexport const RUNTIME_FIELD_TYPE_VALUES = [\"string\", \"number\", \"boolean\", \"string_array\"] as const;\nexport type RuntimeFieldType = (typeof RUNTIME_FIELD_TYPE_VALUES)[number];\n\nexport const RUNTIME_FIELD_COMMAND_VALUES = [\"create\", \"update\", \"update_many\", \"list\", \"search\", \"calendar\", \"context\"] as const;\nexport type RuntimeFieldCommand = (typeof RUNTIME_FIELD_COMMAND_VALUES)[number];\n\nexport const RUNTIME_UNKNOWN_FIELD_POLICY_VALUES = [\"allow\", \"warn\", \"reject\"] as const;\nexport type RuntimeUnknownFieldPolicy = (typeof RUNTIME_UNKNOWN_FIELD_POLICY_VALUES)[number];\n\nexport const DEPENDENCY_KIND_VALUES = [\n \"blocks\",\n \"parent\",\n \"child\",\n \"parent_child\",\n \"child_of\",\n \"related\",\n \"related_to\",\n \"discovered_from\",\n \"blocked_by\",\n \"incident_from\",\n \"epic\",\n \"supersedes\",\n \"task\",\n] as const;\nexport type DependencyKind = (typeof DEPENDENCY_KIND_VALUES)[number];\n\nexport const SCOPE_VALUES = [\"project\", \"global\"] as const;\nexport type LinkScope = (typeof SCOPE_VALUES)[number];\n\nexport const RISK_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type RiskLevel = (typeof RISK_VALUES)[number];\n\nexport const ISSUE_SEVERITY_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type IssueSeverity = (typeof ISSUE_SEVERITY_VALUES)[number];\n\nexport const CONFIDENCE_TEXT_VALUES = [\"low\", \"medium\", \"high\"] as const;\nexport type ConfidenceTextLevel = (typeof CONFIDENCE_TEXT_VALUES)[number];\nexport type ConfidenceValue = number | ConfidenceTextLevel;\n\nexport const ITEM_FORMAT_VALUES = [\"toon\", \"json_markdown\"] as const;\nexport type ItemFormat = (typeof ITEM_FORMAT_VALUES)[number];\n\nexport const SPRINT_RELEASE_FORMAT_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type SprintReleaseFormatPolicy = (typeof SPRINT_RELEASE_FORMAT_POLICY_VALUES)[number];\nexport const PARENT_REFERENCE_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type ParentReferencePolicy = (typeof PARENT_REFERENCE_POLICY_VALUES)[number];\nexport const VALIDATE_METADATA_PROFILE_VALUES = [\"core\", \"strict\", \"custom\"] as const;\nexport type ValidateMetadataProfile = (typeof VALIDATE_METADATA_PROFILE_VALUES)[number];\nexport const GOVERNANCE_PRESET_VALUES = [\"minimal\", \"default\", \"strict\", \"custom\"] as const;\nexport type GovernancePreset = (typeof GOVERNANCE_PRESET_VALUES)[number];\nexport const GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES = [\"none\", \"warn\", \"strict\"] as const;\nexport type GovernanceOwnershipEnforcement = (typeof GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES)[number];\nexport const GOVERNANCE_CREATE_MODE_DEFAULT_VALUES = [\"progressive\", \"strict\"] as const;\nexport type GovernanceCreateModeDefault = (typeof GOVERNANCE_CREATE_MODE_DEFAULT_VALUES)[number];\nexport const GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES = [\"off\", \"warn\", \"strict\"] as const;\nexport type GovernanceCloseValidationDefault = (typeof GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES)[number];\nexport const VALIDATE_METADATA_REQUIRED_FIELD_VALUES = [\n \"author\",\n \"acceptance_criteria\",\n \"estimated_minutes\",\n \"close_reason\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n] as const;\nexport type ValidateMetadataRequiredField = (typeof VALIDATE_METADATA_REQUIRED_FIELD_VALUES)[number];\n\nexport const RECURRENCE_FREQUENCY_VALUES = [\"daily\", \"weekly\", \"monthly\", \"yearly\"] as const;\nexport type RecurrenceFrequency = (typeof RECURRENCE_FREQUENCY_VALUES)[number];\n\nexport const RECURRENCE_WEEKDAY_VALUES = [\"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\", \"sun\"] as const;\nexport type RecurrenceWeekday = (typeof RECURRENCE_WEEKDAY_VALUES)[number];\n\nexport interface Dependency {\n id: string;\n kind: DependencyKind;\n created_at: string;\n author?: string;\n source_kind?: string;\n}\n\nexport interface Comment {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LogNote {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LinkedFile {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface LinkedTest {\n command?: string;\n path?: string;\n scope: LinkScope;\n timeout_seconds?: number;\n pm_context_mode?: \"schema\" | \"tracker\" | \"auto\";\n env_set?: Record<string, string>;\n env_clear?: string[];\n shared_host_safe?: boolean;\n assert_stdout_contains?: string[];\n assert_stdout_regex?: string[];\n assert_stderr_contains?: string[];\n assert_stderr_regex?: string[];\n assert_stdout_min_lines?: number;\n assert_json_field_equals?: Record<string, string>;\n assert_json_field_gte?: Record<string, number>;\n note?: string;\n}\n\nexport interface LinkedDoc {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface Reminder {\n at: string;\n text: string;\n}\n\nexport interface RecurrenceRule {\n freq: RecurrenceFrequency;\n interval?: number;\n count?: number;\n until?: string;\n by_weekday?: RecurrenceWeekday[];\n by_month_day?: number[];\n exdates?: string[];\n}\n\nexport interface CalendarEvent {\n start_at: string;\n end_at?: string;\n title?: string;\n description?: string;\n location?: string;\n all_day?: boolean;\n timezone?: string;\n recurrence?: RecurrenceRule;\n}\n\nexport interface ItemTypeOptionDefinition {\n key: string;\n values: string[];\n required?: boolean;\n aliases?: string[];\n description?: string;\n}\n\nexport interface ItemTypeCommandOptionPolicy {\n command: \"create\" | \"update\";\n option: string;\n required?: boolean;\n visible?: boolean;\n enabled?: boolean;\n}\n\nexport interface ItemTypeDefinition {\n name: string;\n folder?: string;\n aliases?: string[];\n required_create_fields?: string[];\n required_create_repeatables?: string[];\n options?: ItemTypeOptionDefinition[];\n command_option_policies?: ItemTypeCommandOptionPolicy[];\n}\n\nexport interface RuntimeStatusDefinition {\n id: string;\n aliases?: string[];\n roles?: RuntimeStatusRole[];\n description?: string;\n order?: number;\n}\n\nexport interface RuntimeFieldDefinition {\n key: string;\n metadata_key?: string;\n /**\n * @deprecated Use metadata_key.\n */\n front_matter_key?: string;\n cli_flag?: string;\n cli_aliases?: string[];\n description?: string;\n type?: RuntimeFieldType;\n commands?: RuntimeFieldCommand[];\n repeatable?: boolean;\n required?: boolean;\n required_on_create?: boolean;\n required_types?: string[];\n allow_unset?: boolean;\n}\n\nexport interface RuntimeWorkflowDefinition {\n draft_status?: string;\n open_status?: string;\n in_progress_status?: string;\n blocked_status?: string;\n close_status?: string;\n canceled_status?: string;\n}\n\nexport interface RuntimeSchemaFileConfig {\n types?: string;\n statuses?: string;\n fields?: string;\n workflows?: string;\n}\n\nexport interface RuntimeSchemaSettings {\n version: number;\n files: RuntimeSchemaFileConfig;\n statuses: RuntimeStatusDefinition[];\n fields: RuntimeFieldDefinition[];\n workflow: RuntimeWorkflowDefinition;\n unknown_field_policy: RuntimeUnknownFieldPolicy;\n}\n\nexport interface ItemTestRunSummary {\n run_id: string;\n kind: \"test\" | \"test-all\";\n status: \"passed\" | \"failed\" | \"stopped\" | \"canceled\";\n started_at: string;\n finished_at: string;\n recorded_at: string;\n attempt?: number;\n resumed_from?: string;\n passed: number;\n failed: number;\n skipped: number;\n items?: number;\n linked_tests?: number;\n fail_on_skipped_triggered?: boolean;\n}\n\nexport interface ItemMetadata {\n id: string;\n title: string;\n description: string;\n type: ItemType;\n source_type?: string;\n type_options?: Record<string, string>;\n status: ItemStatus;\n priority: 0 | 1 | 2 | 3 | 4;\n tags: string[];\n created_at: string;\n updated_at: string;\n deadline?: string;\n reminders?: Reminder[];\n events?: CalendarEvent[];\n closed_at?: string;\n assignee?: string;\n source_owner?: string;\n author?: string;\n estimated_minutes?: number;\n acceptance_criteria?: string;\n design?: string;\n external_ref?: string;\n definition_of_ready?: string;\n order?: number;\n goal?: string;\n objective?: string;\n value?: string;\n impact?: string;\n outcome?: string;\n why_now?: string;\n parent?: string;\n reviewer?: string;\n risk?: \"low\" | \"medium\" | \"high\" | \"critical\";\n confidence?: ConfidenceValue;\n sprint?: string;\n release?: string;\n blocked_by?: string;\n blocked_reason?: string;\n unblock_note?: string;\n reporter?: string;\n severity?: IssueSeverity;\n environment?: string;\n repro_steps?: string;\n resolution?: string;\n expected_result?: string;\n actual_result?: string;\n affected_version?: string;\n fixed_version?: string;\n component?: string;\n regression?: boolean;\n customer_impact?: string;\n dependencies?: Dependency[];\n comments?: Comment[];\n notes?: LogNote[];\n learnings?: LogNote[];\n files?: LinkedFile[];\n tests?: LinkedTest[];\n test_runs?: ItemTestRunSummary[];\n docs?: LinkedDoc[];\n close_reason?: string;\n [key: string]: unknown;\n}\n\n/**\n * @deprecated Use ItemMetadata.\n */\nexport type ItemFrontMatter = ItemMetadata;\n\nexport interface ItemDocument {\n metadata: ItemMetadata;\n body: string;\n}\n\nexport interface HistoryPatchOp {\n op: \"add\" | \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\";\n path: string;\n from?: string;\n value?: unknown;\n}\n\nexport interface HistoryEntry {\n ts: string;\n author: string;\n op: string;\n patch: HistoryPatchOp[];\n before_hash: string;\n after_hash: string;\n message?: string;\n}\n\nexport const CONTEXT_DEPTH_VALUES = [\"brief\", \"standard\", \"deep\"] as const;\nexport type ContextDepth = (typeof CONTEXT_DEPTH_VALUES)[number];\n\nexport const CONTEXT_SECTION_VALUES = [\n \"hierarchy\",\n \"activity\",\n \"progress\",\n \"blockers\",\n \"files\",\n \"workload\",\n \"staleness\",\n \"tests\",\n] as const;\nexport type ContextSectionName = (typeof CONTEXT_SECTION_VALUES)[number];\n\nexport interface ContextSectionSettings {\n hierarchy: boolean;\n activity: boolean;\n progress: boolean;\n blockers: boolean;\n files: boolean;\n workload: boolean;\n staleness: boolean;\n tests: boolean;\n}\n\nexport interface ContextSettings {\n default_depth: ContextDepth;\n activity_limit: number;\n stale_threshold_days: number;\n sections: ContextSectionSettings;\n}\n\nexport interface GovernanceSettings {\n preset: GovernancePreset;\n ownership_enforcement: GovernanceOwnershipEnforcement;\n create_mode_default: GovernanceCreateModeDefault;\n close_validation_default: GovernanceCloseValidationDefault;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n force_required_for_stale_lock: boolean;\n}\n\nexport type ExtensionPolicyMode = \"off\" | \"warn\" | \"enforce\";\nexport type ExtensionTrustMode = \"off\" | \"warn\" | \"enforce\";\nexport type ExtensionSandboxProfile = \"none\" | \"restricted\" | \"strict\";\n\nexport interface ExtensionPolicyOverrideSettings {\n name: string;\n disabled?: boolean;\n require_trusted?: boolean;\n require_provenance?: boolean;\n sandbox_profile?: ExtensionSandboxProfile;\n allowed_capabilities?: string[];\n blocked_capabilities?: string[];\n allowed_surfaces?: string[];\n blocked_surfaces?: string[];\n allowed_commands?: string[];\n blocked_commands?: string[];\n allowed_actions?: string[];\n blocked_actions?: string[];\n allowed_services?: string[];\n blocked_services?: string[];\n}\n\nexport interface ExtensionPolicySettings {\n mode: ExtensionPolicyMode;\n trust_mode: ExtensionTrustMode;\n require_provenance: boolean;\n trusted_extensions: string[];\n default_sandbox_profile: ExtensionSandboxProfile;\n allowed_extensions: string[];\n blocked_extensions: string[];\n allowed_capabilities: string[];\n blocked_capabilities: string[];\n allowed_surfaces: string[];\n blocked_surfaces: string[];\n allowed_commands: string[];\n blocked_commands: string[];\n allowed_actions: string[];\n blocked_actions: string[];\n allowed_services: string[];\n blocked_services: string[];\n extension_overrides: ExtensionPolicyOverrideSettings[];\n}\n\nexport interface PmSettings {\n version: number;\n id_prefix: string;\n author_default: string;\n item_format: ItemFormat;\n locks: {\n ttl_seconds: number;\n };\n output: {\n default_format: \"toon\" | \"json\";\n };\n history: {\n missing_stream: \"auto_create\" | \"strict_error\";\n };\n validation: {\n sprint_release_format: SprintReleaseFormatPolicy;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n metadata_required_fields: ValidateMetadataRequiredField[];\n lifecycle_stale_blocker_reason_patterns: string[];\n lifecycle_closure_like_blocked_reason_patterns: string[];\n lifecycle_closure_like_resolution_patterns: string[];\n lifecycle_closure_like_actual_result_patterns: string[];\n };\n governance: GovernanceSettings;\n workflow: {\n definition_of_done: string[];\n };\n testing: {\n record_results_to_items: boolean;\n };\n telemetry: {\n enabled: boolean;\n first_run_prompt_completed: boolean;\n capture_level: \"minimal\" | \"redacted\" | \"max\";\n endpoint: string;\n installation_id: string;\n retention_days: number;\n };\n item_types: {\n definitions: ItemTypeDefinition[];\n };\n schema: RuntimeSchemaSettings;\n extensions: {\n enabled: string[];\n disabled: string[];\n policy: ExtensionPolicySettings;\n };\n search: {\n score_threshold: number;\n hybrid_semantic_weight: number;\n max_results: number;\n embedding_model: string;\n embedding_batch_size: number;\n scanner_max_batch_retries: number;\n provider?: string;\n tuning?: {\n title_exact_bonus?: number;\n title_weight?: number;\n description_weight?: number;\n tags_weight?: number;\n status_weight?: number;\n body_weight?: number;\n comments_weight?: number;\n notes_weight?: number;\n learnings_weight?: number;\n dependencies_weight?: number;\n linked_content_weight?: number;\n };\n };\n providers: {\n openai: {\n base_url: string;\n api_key: string;\n model: string;\n };\n ollama: {\n base_url: string;\n model: string;\n };\n };\n context: ContextSettings;\n vector_store: {\n adapter?: string;\n qdrant: {\n url: string;\n api_key: string;\n };\n lancedb: {\n path: string;\n };\n };\n}\n"]}
|
package/docs/AGENT_GUIDE.md
CHANGED
|
@@ -11,6 +11,7 @@ pm context --limit 10
|
|
|
11
11
|
pm search "<request keywords>" --limit 10
|
|
12
12
|
pm list-open --limit 20
|
|
13
13
|
pm list-in-progress --limit 20
|
|
14
|
+
pm guide workflows
|
|
14
15
|
```
|
|
15
16
|
|
|
16
17
|
If a relevant item exists, reuse it. If not, create a parent lineage, then create and claim the child implementation item.
|
|
@@ -94,9 +95,22 @@ pm release <item-id>
|
|
|
94
95
|
| Low-noise machine contracts | `pm contracts --command <command> --flags-only --json` |
|
|
95
96
|
| Timeline | `pm activity --id <id> --limit 20` |
|
|
96
97
|
| Dependencies | `pm deps <id> --format tree` |
|
|
98
|
+
| Local docs routing | `pm guide <topic>` |
|
|
97
99
|
|
|
98
100
|
Default TOON output is preferred for model-readable loops. Use `--json` only when strict parsing is needed.
|
|
99
101
|
|
|
102
|
+
## Guide Routing for Agents
|
|
103
|
+
|
|
104
|
+
Use `pm guide` as the local progressive-disclosure router before opening large documents:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
pm guide
|
|
108
|
+
pm guide quickstart
|
|
109
|
+
pm guide commands --depth standard
|
|
110
|
+
pm guide skills --depth deep --format markdown
|
|
111
|
+
pm guide release --json
|
|
112
|
+
```
|
|
113
|
+
|
|
100
114
|
## Ownership Rules
|
|
101
115
|
|
|
102
116
|
- Claim before heavy edits.
|
|
@@ -109,6 +123,7 @@ Default TOON output is preferred for model-readable loops. Use `--json` only whe
|
|
|
109
123
|
|
|
110
124
|
- Keep [README](../README.md) short.
|
|
111
125
|
- Put details in focused docs under `docs/`.
|
|
126
|
+
- Keep reusable workflow prompts in `.agents/skills/*` and route via `pm guide skills`.
|
|
112
127
|
- Use relative links such as `[Command Reference](COMMANDS.md)`.
|
|
113
128
|
- Add tracker references near the top of new docs when a task created the change.
|
|
114
129
|
- Link docs back to the active item with `pm docs`.
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -125,7 +125,7 @@ body: |
|
|
|
125
125
|
Implementation notes.
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
Legacy JSON-front-matter markdown files are read only for one-way migration into TOON. Runtime internals use `metadata` as the item metadata model key.
|
|
129
129
|
|
|
130
130
|
Built-in item types:
|
|
131
131
|
|
|
@@ -223,7 +223,7 @@ Search supports:
|
|
|
223
223
|
- semantic mode, when an embedding provider and vector store are available
|
|
224
224
|
- hybrid mode, combining keyword and semantic results
|
|
225
225
|
|
|
226
|
-
Keyword scoring uses weighted fields such as title, description, tags, status, body, comments, notes, learnings, and dependencies.
|
|
226
|
+
Keyword scoring uses weighted fields such as title, description, tags, status, body, comments, notes, learnings, reminders, events, and dependencies. Semantic indexing uses the same core corpus so calendar-heavy work remains discoverable through normal search and reindex flows.
|
|
227
227
|
|
|
228
228
|
Runtime semantic components can come from built-ins or extensions:
|
|
229
229
|
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# pm CLI — Claude Code Plugin
|
|
2
|
+
|
|
3
|
+
Native pm integration for Claude Code via the Model Context Protocol (MCP). Claude can use all pm operations as native tools — no shell invocation, no context switching.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
pm-cli/ (repo root)
|
|
9
|
+
├── .claude-plugin/
|
|
10
|
+
│ └── marketplace.json # Root marketplace catalog — read by /plugin marketplace add
|
|
11
|
+
├── plugins/pm-cli-claude/
|
|
12
|
+
│ ├── .claude-plugin/
|
|
13
|
+
│ │ └── plugin.json # Claude Code plugin manifest (name: "pm-cli")
|
|
14
|
+
│ ├── .mcp.json # MCP server config using ${CLAUDE_PLUGIN_ROOT}
|
|
15
|
+
│ ├── skills/
|
|
16
|
+
│ │ ├── pm-workflow/ # Auto-invoked: orient → claim → implement → close
|
|
17
|
+
│ │ ├── pm-developer/ # Developer execution loop with evidence requirements
|
|
18
|
+
│ │ ├── pm-release/ # Release gate sequence and evidence linking
|
|
19
|
+
│ │ ├── pm-audit/ # Comprehensive audit suite
|
|
20
|
+
│ │ └── pm-planner/ # Planning: decompose, prioritize, triage
|
|
21
|
+
│ ├── commands/
|
|
22
|
+
│ │ ├── pm-status.md # /pm-status
|
|
23
|
+
│ │ ├── pm-start-task.md # /pm-start-task [id|keywords]
|
|
24
|
+
│ │ ├── pm-close-task.md # /pm-close-task [id]
|
|
25
|
+
│ │ ├── pm-triage.md # /pm-triage <request>
|
|
26
|
+
│ │ ├── pm-audit.md # /pm-audit
|
|
27
|
+
│ │ ├── pm-search.md # /pm-search <query>
|
|
28
|
+
│ │ ├── pm-new.md # /pm-new <title>
|
|
29
|
+
│ │ ├── pm-list.md # /pm-list [filter]
|
|
30
|
+
│ │ └── pm-calendar.md # /pm-calendar [view]
|
|
31
|
+
│ ├── hooks/
|
|
32
|
+
│ │ ├── hooks.json # SessionStart hook definition
|
|
33
|
+
│ │ └── session-start.mjs # Injects pm context at session start
|
|
34
|
+
│ ├── agents/
|
|
35
|
+
│ │ └── pm-coordinator.md # Subagent for multi-item coordination
|
|
36
|
+
│ ├── scripts/
|
|
37
|
+
│ │ └── pm-mcp-server.mjs # MCP server launcher (repo → npx fallback)
|
|
38
|
+
│ └── README.md # User-facing installation guide
|
|
39
|
+
└── scripts/
|
|
40
|
+
└── smoke-claude-plugin.mjs # Full plugin smoke test (run in CI)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The MCP server itself lives at `src/mcp/server.ts` (compiled to `dist/mcp/server.js`) and is bundled with the npm package as the `pm-mcp` binary.
|
|
44
|
+
|
|
45
|
+
## MCP Server Tools
|
|
46
|
+
|
|
47
|
+
The server exposes 18 native tools that call pm library functions directly:
|
|
48
|
+
|
|
49
|
+
| Tool | pm Operation | Key Args |
|
|
50
|
+
|------|-------------|----------|
|
|
51
|
+
| `pm_context` | `pm context` | `options.limit`, `options.depth` |
|
|
52
|
+
| `pm_search` | `pm search` | `query` (required), `options.limit` |
|
|
53
|
+
| `pm_list` | `pm list` | `options.status`, `options.type`, `options.limit` |
|
|
54
|
+
| `pm_get` | `pm get` | `id` (required) |
|
|
55
|
+
| `pm_create` | `pm create` | `options.title`, `options.description`, `options.type` |
|
|
56
|
+
| `pm_update` | `pm update` | `id` (required), `options.*` |
|
|
57
|
+
| `pm_claim` | `pm claim` | `id` (required), `force` |
|
|
58
|
+
| `pm_release` | `pm release` | `id` (required), `force` |
|
|
59
|
+
| `pm_close` | `pm close` | `id` (required), `reason` (required) |
|
|
60
|
+
| `pm_comments` | `pm comments` | `id` (required), `options.add` |
|
|
61
|
+
| `pm_files` | `pm files` | `id` (required), `options.add`, `options.remove` |
|
|
62
|
+
| `pm_docs` | `pm docs` | `id` (required), `options.add`, `options.remove` |
|
|
63
|
+
| `pm_test` | `pm test` | `id` (required), `options.add`, `options.run` |
|
|
64
|
+
| `pm_validate` | `pm validate` | `options.checkResolution`, `options.checkFiles` |
|
|
65
|
+
| `pm_health` | `pm health` | `options.checkOnly` |
|
|
66
|
+
| `pm_contracts` | `pm contracts` | `options.command`, `options.json` |
|
|
67
|
+
| `pm_guide` | `pm guide` | `options.topic`, `options.depth` |
|
|
68
|
+
| `pm_run` | any pm action | `action` (required), `id`, `query`, `reason`, `options.*` |
|
|
69
|
+
|
|
70
|
+
All tools accept `cwd` (workspace directory), `path` (pm data root override), and `author` (mutation author).
|
|
71
|
+
|
|
72
|
+
## Installation Methods
|
|
73
|
+
|
|
74
|
+
### 1. Plugin marketplace (recommended — full feature set)
|
|
75
|
+
|
|
76
|
+
Add the pm-cli GitHub repo as a marketplace source, then install:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
/plugin marketplace add unbraind/pm-cli
|
|
80
|
+
/plugin install pm-cli@pm-cli
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
This clones the repo, reads `.claude-plugin/marketplace.json` at the root, installs the plugin from `./plugins/pm-cli-claude/`, and configures the MCP server, 5 skills, 9 slash commands, and the session hook automatically.
|
|
84
|
+
|
|
85
|
+
### 2. Global MCP via Claude Code CLI (MCP tools only)
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
claude mcp add --transport stdio pm-cli-native -- npx -y @unbrained/pm-cli pm-mcp
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Gives you the 18 MCP tools without skills or slash commands.
|
|
92
|
+
|
|
93
|
+
### 3. Direct project `.mcp.json` (project-scoped MCP only)
|
|
94
|
+
|
|
95
|
+
Add to the project's `.mcp.json`:
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"mcpServers": {
|
|
100
|
+
"pm-cli-native": {
|
|
101
|
+
"command": "node",
|
|
102
|
+
"args": ["./plugins/pm-cli-claude/scripts/pm-mcp-server.mjs"],
|
|
103
|
+
"env": { "PM_AUTHOR": "claude-code-agent" }
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The repo root `.mcp.json` uses this approach — activates automatically when Claude Code opens this repository.
|
|
110
|
+
|
|
111
|
+
## MCP Server Launcher
|
|
112
|
+
|
|
113
|
+
`plugins/pm-cli-claude/scripts/pm-mcp-server.mjs` resolves the server in order:
|
|
114
|
+
|
|
115
|
+
1. `PM_CLI_MCP_SERVER` env var (explicit override)
|
|
116
|
+
2. `dist/mcp/server.js` walking up from the launcher (repo checkout)
|
|
117
|
+
3. `npx -y @unbrained/pm-cli@latest pm-mcp` (npm-installed fallback)
|
|
118
|
+
|
|
119
|
+
This means the plugin works both from a repo checkout and from an npm-cached plugin install.
|
|
120
|
+
|
|
121
|
+
## Session Start Hook
|
|
122
|
+
|
|
123
|
+
`hooks/session-start.mjs` runs at the start of each Claude Code session. It:
|
|
124
|
+
|
|
125
|
+
1. Checks for `.agents/pm/settings.json` in the current workspace.
|
|
126
|
+
2. Exits silently if pm is not initialized.
|
|
127
|
+
3. Runs `pm context --limit 5 --json` with a 5-second timeout.
|
|
128
|
+
4. Injects a compact status line into the session context.
|
|
129
|
+
|
|
130
|
+
Example injection:
|
|
131
|
+
```
|
|
132
|
+
pm tracker: 3 in_progress, 2 open
|
|
133
|
+
• [pm-xxxx] Fix authentication bug (in_progress)
|
|
134
|
+
• [pm-yyyy] Add calendar feature (in_progress)
|
|
135
|
+
• [pm-zzzz] Update docs (open)
|
|
136
|
+
Use pm_context tool or /pm-status for full details.
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Testing the Plugin
|
|
140
|
+
|
|
141
|
+
### Full Claude Code plugin smoke test (runs in CI)
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
node scripts/smoke-claude-plugin.mjs
|
|
145
|
+
# or:
|
|
146
|
+
pnpm smoke:claude-plugin
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Verifies: file structure (23 files), manifest name consistency, MCP initialize, 18 tools present, full workflow (init → create → claim → update → link files/docs/tests → get → context → search → validate → health), and session-start hook.
|
|
150
|
+
|
|
151
|
+
### MCP server smoke test
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
node scripts/smoke-codex-plugin-mcp.mjs
|
|
155
|
+
# or:
|
|
156
|
+
pnpm smoke:codex-plugin
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Contract-safe preflight (recommended for CI agents)
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
pm contracts --schema-only --json
|
|
163
|
+
pm contracts --command extension --flags-only --json
|
|
164
|
+
pm extension --doctor --project --detail summary --strict-exit
|
|
165
|
+
pm extension --reload --project
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Why this matters:
|
|
169
|
+
|
|
170
|
+
- `pm contracts` is extension-aware and reflects active runtime action/flag surfaces.
|
|
171
|
+
- `extension --doctor` now includes policy diagnostics and deterministic warning codes.
|
|
172
|
+
- `extension --reload` provides cache-busted module reload for extension dev loops.
|
|
173
|
+
- `--strict-exit` turns warning states into CI-failing exits when governance gates require it.
|
|
174
|
+
|
|
175
|
+
### CLI simplification compatibility notes
|
|
176
|
+
|
|
177
|
+
The conservative CLI simplification pass adds invocation normalization and replay metadata that plugin/tooling flows should consume:
|
|
178
|
+
|
|
179
|
+
- long-option aliases/shape variants and high-confidence typos are normalized before parse
|
|
180
|
+
- setup resolution can auto-discover initialized tracker roots from ancestor directories
|
|
181
|
+
- structured error envelopes may include `recovery` with replay-ready guidance (`attempted_command`, `normalized_args`, `provided_fields`, `missing`, `suggested_retry`)
|
|
182
|
+
|
|
183
|
+
For migration details and automation expectations, see:
|
|
184
|
+
|
|
185
|
+
- [CLI Simplification Migration](MIGRATION_CLI_SIMPLIFICATION.md)
|
|
186
|
+
|
|
187
|
+
### Validate manifests
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
claude plugin validate .claude-plugin/marketplace.json
|
|
191
|
+
claude plugin validate plugins/pm-cli-claude/.claude-plugin/plugin.json
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Manual verification
|
|
195
|
+
|
|
196
|
+
After installing the plugin:
|
|
197
|
+
|
|
198
|
+
1. Start Claude Code: `claude` (in a pm-initialized directory)
|
|
199
|
+
2. Ask: "What's the current pm project status?"
|
|
200
|
+
→ Verify Claude uses `pm_context` (not Bash)
|
|
201
|
+
3. Try `/pm-status` — active items + calendar
|
|
202
|
+
4. Try `/pm-search authentication` — search results
|
|
203
|
+
5. Try `/pm-new Fix the login timeout bug` — duplicate-checked create
|
|
204
|
+
6. Try `/pm-start-task pm-xxxx` — claim and start
|
|
205
|
+
7. Try `/pm-calendar week` — upcoming deadlines
|
|
206
|
+
8. Try `/pm-close-task pm-xxxx` — verify, evidence, close
|
|
207
|
+
|
|
208
|
+
## Compatibility
|
|
209
|
+
|
|
210
|
+
| pm-cli version | Plugin version | Claude Code version |
|
|
211
|
+
|---------------|----------------|---------------------|
|
|
212
|
+
| 2026.5.x+ | 1.0.0 | Any current |
|
|
213
|
+
|
|
214
|
+
The MCP server uses JSON-RPC 2.0 over stdio with protocol version `2025-06-18`.
|
|
215
|
+
|
|
216
|
+
## Extension Policy Diagnostics
|
|
217
|
+
|
|
218
|
+
When extension governance policy is configured (`settings.extensions.policy`), plugin and MCP automation can surface:
|
|
219
|
+
|
|
220
|
+
- `extension_policy_violation_*` warnings in warn mode
|
|
221
|
+
- `extension_policy_blocked_*` warnings in enforce mode
|
|
222
|
+
- `extension_policy_*_trust` warnings for trust/provenance gates
|
|
223
|
+
- policy summary counters under `extension doctor` details (`summary.policy` + `triage.policy_*`)
|
|
224
|
+
|
|
225
|
+
This enables contract-safe and policy-safe automation without falling back to shell heuristics.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Codex Plugin
|
|
2
|
+
|
|
3
|
+
pm-cli ships a repo-local Codex plugin at [`plugins/pm-cli-codex`](../plugins/pm-cli-codex/README.md).
|
|
4
|
+
|
|
5
|
+
## Install From This Repo
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
codex plugin marketplace add .
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Restart Codex and install **pm CLI** from the `pm CLI Local` marketplace.
|
|
12
|
+
|
|
13
|
+
## What It Provides
|
|
14
|
+
|
|
15
|
+
- `pm-cli-native` MCP server for structured pm operations without invoking the `pm` shell command
|
|
16
|
+
- narrow tools for common loops: context, search, list, get, create, update, claim, release, close, comments, files, docs, tests, validate, health, contracts, and guide
|
|
17
|
+
- `pm_run` for the rest of the pm surface, including calendar, activity, aggregate, dedupe-audit, normalize, reindex, extensions, templates, history, stats, gc, and test-runs controls
|
|
18
|
+
- skills for native tracking, audits, and release workflows
|
|
19
|
+
- command prompts for start, close, and audit flows
|
|
20
|
+
|
|
21
|
+
## Native MCP Notes
|
|
22
|
+
|
|
23
|
+
The plugin launcher uses the local repository build when `dist/mcp/server.js` is present. When the plugin is cached outside the repo, it falls back to:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx -y @unbrained/pm-cli@latest pm-mcp
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The fallback starts the package MCP server, not the `pm` CLI command. Tool calls import pm command modules and return JSON-compatible structured results.
|
|
30
|
+
|
|
31
|
+
## Safety
|
|
32
|
+
|
|
33
|
+
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`.
|
package/docs/COMMANDS.md
CHANGED
|
@@ -6,12 +6,14 @@ This is a task-oriented command guide. For exact flags, use runtime help because
|
|
|
6
6
|
pm <command> --help
|
|
7
7
|
pm <command> --help --json
|
|
8
8
|
pm contracts --command <command> --flags-only --json
|
|
9
|
+
pm guide commands --depth standard
|
|
9
10
|
```
|
|
10
11
|
|
|
11
12
|
## Agent Quick Context
|
|
12
13
|
|
|
13
14
|
- Prefer `pm context`, `pm search`, and narrow list commands before mutation.
|
|
14
15
|
- Prefer TOON for reading and `--json` for strict parsing.
|
|
16
|
+
- Use `pm guide <topic>` for local docs routing before opening deeper pages.
|
|
15
17
|
- Use `pm contracts` for machine clients.
|
|
16
18
|
- Every mutation writes history.
|
|
17
19
|
|
|
@@ -30,7 +32,7 @@ Tracked documentation work: [pm-1sb2](../.agents/pm/tasks/pm-1sb2.toon).
|
|
|
30
32
|
| History | `history`, `activity`, `restore`, `stats` | inspect and recover item state |
|
|
31
33
|
| Calendar | `calendar`, `cal` | project deadlines, reminders, and events |
|
|
32
34
|
| Extensions | `extension`, extension command groups | install, manage, and run extension commands |
|
|
33
|
-
| Machines | `contracts`, `completion`, `help` |
|
|
35
|
+
| Machines | `guide`, `contracts`, `completion`, `help` | local docs routing plus command contracts and shell helpers |
|
|
34
36
|
|
|
35
37
|
## Bootstrap
|
|
36
38
|
|
|
@@ -118,11 +120,13 @@ pm release <id> --allow-audit-release --author <you>
|
|
|
118
120
|
|
|
119
121
|
```bash
|
|
120
122
|
pm comments <id> "Implemented command parsing fix."
|
|
123
|
+
printf '%s\n' '## Verification summary' '- Linux pass' '- macOS pass' | pm comments <id> --stdin
|
|
124
|
+
pm comments <id> --file docs/release-evidence.md
|
|
121
125
|
pm notes <id> --add "Keep renderer changes isolated to TOON output."
|
|
122
126
|
pm learnings <id> --add "Use runtime contracts instead of duplicating flag lists."
|
|
123
127
|
```
|
|
124
128
|
|
|
125
|
-
Use comments for progress and evidence, notes for implementation context, and learnings for durable future guidance.
|
|
129
|
+
Use comments for progress and evidence, notes for implementation context, and learnings for durable future guidance. For comments, choose exactly one input source (`[text]`, `--add`, `--stdin`, or `--file`) per invocation.
|
|
126
130
|
|
|
127
131
|
## Linked Artifacts
|
|
128
132
|
|
package/docs/CONFIGURATION.md
CHANGED
|
@@ -40,7 +40,7 @@ Precedence:
|
|
|
40
40
|
|---------|---------|
|
|
41
41
|
| `id_prefix` | generated item ID prefix, default `pm-` |
|
|
42
42
|
| `author_default` | fallback mutation author |
|
|
43
|
-
| `item_format` | `toon`
|
|
43
|
+
| `item_format` | item storage format (`toon` writes; legacy markdown is read/migrate only) |
|
|
44
44
|
| `output.default_format` | default renderer, usually `toon` |
|
|
45
45
|
| `locks.ttl_seconds` | stale lock threshold |
|
|
46
46
|
| `history.missing_stream` | `auto_create` or `strict_error` |
|
|
@@ -70,13 +70,7 @@ TOON is the default:
|
|
|
70
70
|
pm config project set item-format --format toon
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
pm config project set item-format --format json_markdown
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Changing item format runs migration on item files. History stays JSONL.
|
|
73
|
+
Markdown item files are treated as legacy migration input only. Mutations always write TOON files, and history stays JSONL.
|
|
80
74
|
|
|
81
75
|
## Output Format
|
|
82
76
|
|