create-principles-disciple 1.151.0 → 1.152.1
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/_release/product-identity.json +1 -1
- package/codex-adapter/dist/tool-semantics.d.ts +11 -1
- package/codex-adapter/dist/tool-semantics.js +11 -1
- package/codex-adapter/package.json +1 -1
- package/console/dist/server/index.js +5 -0
- package/console/dist/server/models/EvidenceChainConsoleModel.js +1 -2
- package/console/dist/server/models/GovernanceConsoleModel.js +56 -68
- package/console/dist/server/models/RuleCandidateBindingConsoleModel.js +31 -31
- package/console/dist/server/routes/failed-tasks.js +84 -1
- package/console/dist/server/routes/update.js +45 -30
- package/console/dist/server/update-timeout.js +15 -1
- package/console/dist/shared/rule-candidate-binding-contract.d.ts +4 -1
- package/console/dist/web/assets/app.js +26 -26
- package/core/dist/runtime/activation/ledger-identity.d.ts.map +1 -1
- package/core/dist/runtime/activation/ledger-identity.js +5 -0
- package/core/dist/runtime/activation/ledger-identity.js.map +1 -1
- package/core/dist/runtime/activation/prompt-activation-reader-contract.d.ts +6 -0
- package/core/dist/runtime/activation/prompt-activation-reader-contract.d.ts.map +1 -1
- package/core/dist/runtime/activation/prompt-activation-reader-contract.js +105 -7
- package/core/dist/runtime/activation/prompt-activation-reader-contract.js.map +1 -1
- package/core/dist/runtime/adapter/principle-tree-ledger-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/principle-tree-ledger-adapter.js +10 -1
- package/core/dist/runtime/adapter/principle-tree-ledger-adapter.js.map +1 -1
- package/core/dist/runtime/candidate-audit.d.ts.map +1 -1
- package/core/dist/runtime/candidate-audit.js +6 -3
- package/core/dist/runtime/candidate-audit.js.map +1 -1
- package/core/dist/runtime/golden-trace.d.ts.map +1 -1
- package/core/dist/runtime/golden-trace.js +30 -24
- package/core/dist/runtime/golden-trace.js.map +1 -1
- package/core/dist/runtime/internalization/refiner-sandbox-wrapper.d.ts.map +1 -1
- package/core/dist/runtime/internalization/refiner-sandbox-wrapper.js +4 -4
- package/core/dist/runtime/internalization/refiner-sandbox-wrapper.js.map +1 -1
- package/core/dist/runtime/internalization/rollout-reviewer-runner.d.ts +13 -0
- package/core/dist/runtime/internalization/rollout-reviewer-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/rollout-reviewer-runner.js +28 -4
- package/core/dist/runtime/internalization/rollout-reviewer-runner.js.map +1 -1
- package/core/dist/runtime/internalization/rule-host-input-builder.d.ts +21 -1
- package/core/dist/runtime/internalization/rule-host-input-builder.d.ts.map +1 -1
- package/core/dist/runtime/internalization/rule-host-input-builder.js +13 -0
- package/core/dist/runtime/internalization/rule-host-input-builder.js.map +1 -1
- package/core/dist/runtime/internalization/scribe-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/scribe-runner.js +25 -3
- package/core/dist/runtime/internalization/scribe-runner.js.map +1 -1
- package/core/dist/runtime/internalization-chain-integrity-read-model.d.ts +1 -0
- package/core/dist/runtime/internalization-chain-integrity-read-model.d.ts.map +1 -1
- package/core/dist/runtime/internalization-chain-integrity-read-model.js +8 -5
- package/core/dist/runtime/internalization-chain-integrity-read-model.js.map +1 -1
- package/core/dist/runtime/pruning-read-model.d.ts.map +1 -1
- package/core/dist/runtime/pruning-read-model.js +7 -5
- package/core/dist/runtime/pruning-read-model.js.map +1 -1
- package/core/dist/runtime/schema-conformance-read-model.d.ts +1 -0
- package/core/dist/runtime/schema-conformance-read-model.d.ts.map +1 -1
- package/core/dist/runtime/schema-conformance-read-model.js +8 -5
- package/core/dist/runtime/schema-conformance-read-model.js.map +1 -1
- package/core/dist/runtime/signal-collector/types.d.ts +6 -0
- package/core/dist/runtime/signal-collector/types.d.ts.map +1 -1
- package/core/dist/runtime/signal-collector/types.js.map +1 -1
- package/core/dist/runtime/types/rule-candidate-binding.d.ts +1 -1
- package/core/dist/runtime/types/rule-candidate-binding.d.ts.map +1 -1
- package/core/dist/trajectory-store.d.ts +17 -1
- package/core/dist/trajectory-store.d.ts.map +1 -1
- package/core/dist/trajectory-store.js +32 -10
- package/core/dist/trajectory-store.js.map +1 -1
- package/core/package.json +1 -1
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -1
- package/dist/installer.d.ts +53 -0
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +106 -1
- package/dist/installer.js.map +1 -1
- package/dist/installers/index.d.ts +31 -0
- package/dist/installers/index.d.ts.map +1 -1
- package/dist/installers/index.js +76 -3
- package/dist/installers/index.js.map +1 -1
- package/dist/installers/legacy-workbuddy-skill.d.ts +46 -14
- package/dist/installers/legacy-workbuddy-skill.d.ts.map +1 -1
- package/dist/installers/legacy-workbuddy-skill.js +162 -29
- package/dist/installers/legacy-workbuddy-skill.js.map +1 -1
- package/dist/installers/workbuddy-host-installer.d.ts.map +1 -1
- package/dist/installers/workbuddy-host-installer.js +7 -6
- package/dist/installers/workbuddy-host-installer.js.map +1 -1
- package/dist/update/release-manager.d.ts +1 -1
- package/dist/update/release-manager.d.ts.map +1 -1
- package/dist/update/release-manager.js +45 -2
- package/dist/update/release-manager.js.map +1 -1
- package/host-runtime/dist/active-principle-prompt.js +3 -2
- package/host-runtime/dist/governance-observation-store.js +2 -2
- package/host-runtime/dist/governance-signal-admission.js +14 -1
- package/host-runtime/dist/host-liveness-contract.js +2 -2
- package/host-runtime/dist/product-telemetry/milestone-readers.js +3 -2
- package/host-runtime/dist/production-pain-evidence.js +3 -2
- package/host-runtime/dist/production-rulehost-gate.d.ts +20 -0
- package/host-runtime/dist/production-rulehost-gate.js +110 -35
- package/host-runtime/dist/prompt-activation-deliverability.d.ts +2 -0
- package/host-runtime/dist/prompt-activation-deliverability.js +5 -3
- package/host-runtime/dist/prompt-injection-status.js +3 -2
- package/host-runtime/dist/workspace-behavior-evidence.js +4 -3
- package/host-runtime/package.json +5 -1
- package/install-layout/dist/mcp-binding-contract.js +5 -0
- package/install-layout/package.json +1 -1
- package/package.json +3 -3
- package/pd-cli/dist/commands/candidate.d.ts.map +1 -1
- package/pd-cli/dist/commands/candidate.js +2 -1
- package/pd-cli/dist/commands/candidate.js.map +1 -1
- package/pd-cli/dist/commands/console.d.ts.map +1 -1
- package/pd-cli/dist/commands/console.js +8 -0
- package/pd-cli/dist/commands/console.js.map +1 -1
- package/pd-cli/dist/commands/demo-story-a.d.ts.map +1 -1
- package/pd-cli/dist/commands/demo-story-a.js +2 -1
- package/pd-cli/dist/commands/demo-story-a.js.map +1 -1
- package/pd-cli/dist/commands/health-mcp.d.ts +21 -0
- package/pd-cli/dist/commands/health-mcp.d.ts.map +1 -1
- package/pd-cli/dist/commands/health-mcp.js +19 -1
- package/pd-cli/dist/commands/health-mcp.js.map +1 -1
- package/pd-cli/dist/commands/health.d.ts.map +1 -1
- package/pd-cli/dist/commands/health.js +12 -4
- package/pd-cli/dist/commands/health.js.map +1 -1
- package/pd-cli/dist/commands/legacy-cleanup.d.ts.map +1 -1
- package/pd-cli/dist/commands/legacy-cleanup.js +2 -1
- package/pd-cli/dist/commands/legacy-cleanup.js.map +1 -1
- package/pd-cli/dist/commands/pain-list.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-list.js +2 -1
- package/pd-cli/dist/commands/pain-list.js.map +1 -1
- package/pd-cli/dist/commands/principles-stats.d.ts.map +1 -1
- package/pd-cli/dist/commands/principles-stats.js +2 -1
- package/pd-cli/dist/commands/principles-stats.js.map +1 -1
- package/pd-cli/dist/commands/quality-scorecard.d.ts.map +1 -1
- package/pd-cli/dist/commands/quality-scorecard.js +2 -1
- package/pd-cli/dist/commands/quality-scorecard.js.map +1 -1
- package/pd-cli/dist/commands/runtime-init.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-init.js +5 -4
- package/pd-cli/dist/commands/runtime-init.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-evidence.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-evidence.js +2 -1
- package/pd-cli/dist/commands/runtime-internalization-evidence.js.map +1 -1
- package/pd-cli/dist/commands/runtime-recovery-failed-task.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-recovery-failed-task.js +2 -1
- package/pd-cli/dist/commands/runtime-recovery-failed-task.js.map +1 -1
- package/pd-cli/dist/legacy/session-history-import.js +2 -2
- package/pd-cli/dist/legacy/session-history-import.js.map +1 -1
- package/pd-cli/dist/services/console-launcher.d.ts +15 -0
- package/pd-cli/dist/services/console-launcher.d.ts.map +1 -1
- package/pd-cli/dist/services/console-launcher.js +7 -1
- package/pd-cli/dist/services/console-launcher.js.map +1 -1
- package/pd-cli/package.json +1 -1
- package/pd-mcp-server/dist/index.js +33 -2
- package/pd-mcp-server/dist/server.d.ts +7 -3
- package/pd-mcp-server/dist/server.js +6 -1
- package/pd-mcp-server/dist/submit-assembly.d.ts +24 -0
- package/pd-mcp-server/dist/submit-assembly.js +61 -0
- package/pd-mcp-server/dist/version.d.ts +1 -1
- package/pd-mcp-server/dist/version.js +1 -1
- package/pd-mcp-server/package.json +2 -1
- package/plugin/dist/bundle.js +451 -473
- package/plugin/dist/constants/tool-semantics.d.ts +13 -0
- package/plugin/dist/core/correction-anchor.d.ts +40 -0
- package/plugin/dist/core/experiment-workspace-guard.d.ts +10 -0
- package/plugin/dist/core/mcp-binding.d.ts +3 -1
- package/plugin/dist/core/signal-collector-host.d.ts +19 -1
- package/plugin/dist/core/workspace-context.d.ts +0 -4
- package/plugin/dist/hooks/gate.d.ts +0 -5
- package/plugin/dist/openclaw.plugin.json +1 -1
- package/plugin/dist/rulehost-evidence.js +4 -4
- package/plugin/mcp/launcher.cjs +85 -0
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +1 -1
- package/release-manager/dist/installer.js +106 -1
- package/release-manager/dist/installers/index.js +76 -3
- package/release-manager/dist/installers/legacy-workbuddy-skill.js +162 -29
- package/release-manager/dist/installers/workbuddy-host-installer.js +7 -6
- package/release-manager/dist/update/release-manager.js +45 -2
- package/release-manager/package.json +1 -1
- package/workbuddy-adapter/dist/tool-semantics.d.ts +11 -0
- package/workbuddy-adapter/dist/tool-semantics.js +11 -0
- package/workbuddy-adapter/package.json +1 -1
- package/workbuddy-adapter/plugin/mcp/launcher.cjs +85 -0
- package/plugin/dist/core/rule-host.d.ts +0 -203
|
@@ -129,10 +129,14 @@ export interface PdMcpServerOptions {
|
|
|
129
129
|
readonly logSink?: (line: string) => void;
|
|
130
130
|
/** OG-4 gate (§5.1.1): registers the write tool ONLY when this is
|
|
131
131
|
* explicitly `true`. Default `false`; no env var or feature flag can change
|
|
132
|
-
* it.
|
|
132
|
+
* it. The production entry opts in for all three known hosts under the
|
|
133
|
+
* Owner's 2026-11-13 authorization; a missing host marker and every default
|
|
134
|
+
* construction stay recall-only. */
|
|
133
135
|
readonly enableSubmitTool?: boolean;
|
|
134
|
-
/** Submit capability entry
|
|
135
|
-
* Core capability
|
|
136
|
+
/** Submit capability entry. There is NO default: `main()` binds the real
|
|
137
|
+
* Core capability to `<workspaceDir>/.state` AND an effective
|
|
138
|
+
* `.pd/config.yaml` (see `submit-assembly.ts`). Opting in without this
|
|
139
|
+
* injection fails closed at construction time. */
|
|
136
140
|
readonly callSubmitCapability?: SubmitCapabilityCall;
|
|
137
141
|
/** Bounded read-back entry used after a write timeout (§5.7). */
|
|
138
142
|
readonly recheckSubmitTask?: SubmitRecheckCall;
|
|
@@ -12,7 +12,12 @@
|
|
|
12
12
|
* The write tool `pd_submit_pain` exists only when the caller explicitly sets
|
|
13
13
|
* `enableSubmitTool: true` — the OG-4 production governance gate
|
|
14
14
|
* (SPEC-PD-AGENT-PAIN-INGRESS-001 §5.1.1). No env var or feature flag can turn
|
|
15
|
-
* it on: a deployment must opt in in code and carry the OG-4 record.
|
|
15
|
+
* it on: a deployment must opt in in code and carry the OG-4 record. The Owner
|
|
16
|
+
* authorized OG-4 on 2026-11-13 and extended it to all three hosts (decision
|
|
17
|
+
* card r5 + r6); `submit-assembly.ts` and `index.ts` hold the sole production
|
|
18
|
+
* opt-in. Every default construction stays recall-only, as does a launch with
|
|
19
|
+
* no host marker; a host marker that is present but unknown never reaches this
|
|
20
|
+
* module — startup fails first (`workspace.ts` → `host_invalid`).
|
|
16
21
|
*/
|
|
17
22
|
import { randomBytes } from 'node:crypto';
|
|
18
23
|
import { McpServer, fromJsonSchema } from '@modelcontextprotocol/server';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { SubmitCapabilityCall } from './server.js';
|
|
2
|
+
import type { PdMcpHost } from './workspace.js';
|
|
3
|
+
export interface SubmitAssemblyResult {
|
|
4
|
+
readonly ok: boolean;
|
|
5
|
+
readonly call?: SubmitCapabilityCall;
|
|
6
|
+
/**
|
|
7
|
+
* Fixed, closed reason code — the ONLY failure detail safe to log. The
|
|
8
|
+
* loader's raw `reason` strings can embed absolute config paths (fs errors)
|
|
9
|
+
* or config fragments (YAML parser errors), and the MCP log contract
|
|
10
|
+
* forbids both. Never log `errors[].reason` from here.
|
|
11
|
+
*/
|
|
12
|
+
readonly reasonCode?: 'pd_config_invalid';
|
|
13
|
+
/** How many config problems were found (a number leaks nothing). */
|
|
14
|
+
readonly errorCount?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Bind the Core submit capability to the workspace-effective PD config.
|
|
18
|
+
* Called once at MCP startup; the returned function is what the tool handler
|
|
19
|
+
* invokes per request.
|
|
20
|
+
*
|
|
21
|
+
* `env` is the same env `main()` resolved the binding from — never
|
|
22
|
+
* `process.env` directly — so a test-injected env stays authoritative.
|
|
23
|
+
*/
|
|
24
|
+
export declare function assembleSubmitCapability(workspaceDir: string, host: PdMcpHost, env?: Record<string, unknown>): SubmitAssemblyResult;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `pd_submit_pain` production assembly for all three PD hosts.
|
|
3
|
+
*
|
|
4
|
+
* OG-4 was authorized by the Owner on 2026-11-13; the scope was extended to
|
|
5
|
+
* Codex / OpenClaw / WorkBuddy the same day (decision card r6). The gate
|
|
6
|
+
* itself stays in `server.ts` (default `false`, no env var / feature flag can
|
|
7
|
+
* turn it on); THIS module is the host wrapper that opts in correctly.
|
|
8
|
+
*
|
|
9
|
+
* `server.ts` refuses to register the write tool without an injected
|
|
10
|
+
* capability bound to an EFFECTIVE `.pd/config.yaml`. Without
|
|
11
|
+
* `effectiveConfig`, the Core capability would fall back to the deprecated
|
|
12
|
+
* `.state/workflows.yaml` resolver (PRI-393 forbids that on production paths).
|
|
13
|
+
* Config loading is therefore delegated to `@principles/host-runtime/pd-config`
|
|
14
|
+
* — the same authority the CLI and hooks use — so no second config
|
|
15
|
+
* implementation exists here. A malformed config degrades the host to
|
|
16
|
+
* recall-only instead of writing through an unevaluated configuration.
|
|
17
|
+
*
|
|
18
|
+
* The business write still goes EXCLUSIVELY through the Gate 3 capability
|
|
19
|
+
* public subpath, keeping the G4-2 architecture guard intact. `hostKind` is
|
|
20
|
+
* observability-only in Core (never used for admission or mode), but it is
|
|
21
|
+
* taken from the validated startup binding rather than hard-coded so each
|
|
22
|
+
* host's records remain attributable.
|
|
23
|
+
*/
|
|
24
|
+
import * as path from 'node:path';
|
|
25
|
+
import { loadPdConfigForPlugin } from '@principles/host-runtime/pd-config';
|
|
26
|
+
import { submitPainCapability } from '@principles/core/runtime/pain-submit-capability';
|
|
27
|
+
/**
|
|
28
|
+
* Bind the Core submit capability to the workspace-effective PD config.
|
|
29
|
+
* Called once at MCP startup; the returned function is what the tool handler
|
|
30
|
+
* invokes per request.
|
|
31
|
+
*
|
|
32
|
+
* `env` is the same env `main()` resolved the binding from — never
|
|
33
|
+
* `process.env` directly — so a test-injected env stays authoritative.
|
|
34
|
+
*/
|
|
35
|
+
export function assembleSubmitCapability(workspaceDir, host, env = process.env) {
|
|
36
|
+
const config = loadPdConfigForPlugin(workspaceDir);
|
|
37
|
+
if (!config.ok) {
|
|
38
|
+
return {
|
|
39
|
+
ok: false,
|
|
40
|
+
reasonCode: 'pd_config_invalid',
|
|
41
|
+
errorCount: config.errors.length,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
const stateDir = path.join(workspaceDir, '.state');
|
|
45
|
+
const effectiveConfig = config.effective;
|
|
46
|
+
return {
|
|
47
|
+
ok: true,
|
|
48
|
+
call: ({ workspaceDir: boundWorkspaceDir, painId, taskId, submission }) => submitPainCapability({
|
|
49
|
+
workspaceDir: boundWorkspaceDir,
|
|
50
|
+
stateDir,
|
|
51
|
+
painId,
|
|
52
|
+
taskId,
|
|
53
|
+
hostKind: host,
|
|
54
|
+
effectiveConfig,
|
|
55
|
+
getEnvVar: (name) => {
|
|
56
|
+
const value = env[name];
|
|
57
|
+
return typeof value === 'string' ? value : undefined;
|
|
58
|
+
},
|
|
59
|
+
}, submission),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* package.json. A unit test pins it to package.json so the two cannot drift.
|
|
8
8
|
*/
|
|
9
9
|
export declare const SERVER_NAME: 'pd-mcp-server';
|
|
10
|
-
export declare const SERVER_VERSION: '0.4.
|
|
10
|
+
export declare const SERVER_VERSION: '0.4.3';
|
|
11
11
|
/** The only MCP SDK family/version this server is released against
|
|
12
12
|
* (Gate 4-A freeze, PD_MCP_GATE4A_REALITY_CHECK §3). Exact pin — no ranges. */
|
|
13
13
|
export declare const MCP_SDK_PIN: '@modelcontextprotocol/server@2.4.0';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* package.json. A unit test pins it to package.json so the two cannot drift.
|
|
8
8
|
*/
|
|
9
9
|
export const SERVER_NAME = 'pd-mcp-server';
|
|
10
|
-
export const SERVER_VERSION = '0.4.
|
|
10
|
+
export const SERVER_VERSION = '0.4.3';
|
|
11
11
|
/** The only MCP SDK family/version this server is released against
|
|
12
12
|
* (Gate 4-A freeze, PD_MCP_GATE4A_REALITY_CHECK §3). Exact pin — no ranges. */
|
|
13
13
|
export const MCP_SDK_PIN = '@modelcontextprotocol/server@2.4.0';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@principles/pd-mcp-server",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Principles Disciple MCP Server — the single shared MCP server implementation for the three PD hosts (Codex, OpenClaw, WorkBuddy). Read-only pain recall through the Gate 3 Capability (SPEC-PD-MCP-GATE4-001).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@modelcontextprotocol/server": "2.4.0",
|
|
31
31
|
"@principles/core": "file:../core",
|
|
32
|
+
"@principles/host-runtime": "file:../host-runtime",
|
|
32
33
|
"zod": "4.6.7"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|