create-principles-disciple 1.146.9 → 1.147.0
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/ingestion/explicit-owner-statement.d.ts +6 -0
- package/codex-adapter/dist/ingestion/explicit-owner-statement.js +6 -0
- package/codex-adapter/dist/pd-hook.js +5 -2
- package/codex-adapter/dist/worker/workspace-worker.d.ts +13 -1
- package/codex-adapter/dist/worker/workspace-worker.js +26 -3
- package/codex-adapter/package.json +1 -1
- package/core/dist/runtime-v2/index.d.ts +2 -2
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +1 -1
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/pain-ingress-payload.d.ts +13 -1
- package/core/dist/runtime-v2/pain-ingress-payload.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-ingress-payload.js +21 -2
- package/core/dist/runtime-v2/pain-ingress-payload.js.map +1 -1
- package/core/dist/runtime-v2/pain-ingress.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-ingress.js +3 -0
- package/core/dist/runtime-v2/pain-ingress.js.map +1 -1
- package/core/dist/runtime-v2/signal-collector/confidence-gate.d.ts +35 -0
- package/core/dist/runtime-v2/signal-collector/confidence-gate.d.ts.map +1 -0
- package/core/dist/runtime-v2/signal-collector/confidence-gate.js +48 -0
- package/core/dist/runtime-v2/signal-collector/confidence-gate.js.map +1 -0
- package/core/dist/runtime-v2/signal-collector/index.d.ts +1 -0
- package/core/dist/runtime-v2/signal-collector/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/signal-collector/index.js +1 -0
- package/core/dist/runtime-v2/signal-collector/index.js.map +1 -1
- package/core/dist/runtime-v2/signal-collector/keyword-stage.d.ts +4 -6
- package/core/dist/runtime-v2/signal-collector/keyword-stage.d.ts.map +1 -1
- package/core/dist/runtime-v2/signal-collector/keyword-stage.js +100 -9
- package/core/dist/runtime-v2/signal-collector/keyword-stage.js.map +1 -1
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.js +8 -4
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.js.map +1 -1
- package/core/package.json +1 -1
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +52 -1
- package/dist/installer.js.map +1 -1
- package/dist/installers/mcp-registration-conflict.d.ts +35 -0
- package/dist/installers/mcp-registration-conflict.d.ts.map +1 -0
- package/dist/installers/mcp-registration-conflict.js +559 -0
- package/dist/installers/mcp-registration-conflict.js.map +1 -0
- package/dist/installers/openclaw-host-installer.d.ts.map +1 -1
- package/dist/installers/openclaw-host-installer.js +20 -0
- package/dist/installers/openclaw-host-installer.js.map +1 -1
- package/dist/installers/workbuddy-host-installer.d.ts.map +1 -1
- package/dist/installers/workbuddy-host-installer.js +124 -2
- package/dist/installers/workbuddy-host-installer.js.map +1 -1
- package/dist/mcp-server-layout-compat.d.ts +18 -0
- package/dist/mcp-server-layout-compat.d.ts.map +1 -0
- package/dist/mcp-server-layout-compat.js +22 -0
- package/dist/mcp-server-layout-compat.js.map +1 -0
- package/host-runtime/dist/governance-signal-admission.d.ts +147 -4
- package/host-runtime/dist/governance-signal-admission.js +1065 -60
- package/host-runtime/dist/index.d.ts +2 -0
- package/host-runtime/dist/index.js +2 -0
- package/host-runtime/dist/signal-classifier.d.ts +46 -0
- package/host-runtime/dist/signal-classifier.js +167 -0
- package/host-runtime/dist/signal-stage2-cycle.d.ts +42 -0
- package/host-runtime/dist/signal-stage2-cycle.js +184 -0
- package/host-runtime/package.json +1 -1
- package/install-layout/dist/index.d.ts +15 -0
- package/install-layout/dist/index.js +10 -0
- package/install-layout/package.json +1 -1
- package/package.json +9 -7
- package/pd-cli/dist/commands/health-codex.d.ts.map +1 -1
- package/pd-cli/dist/commands/health-codex.js +12 -0
- package/pd-cli/dist/commands/health-codex.js.map +1 -1
- package/pd-cli/dist/commands/health-mcp.d.ts +74 -0
- package/pd-cli/dist/commands/health-mcp.d.ts.map +1 -0
- package/pd-cli/dist/commands/health-mcp.js +723 -0
- package/pd-cli/dist/commands/health-mcp.js.map +1 -0
- package/pd-cli/dist/commands/health.d.ts +2 -0
- package/pd-cli/dist/commands/health.d.ts.map +1 -1
- package/pd-cli/dist/commands/health.js +11 -6
- package/pd-cli/dist/commands/health.js.map +1 -1
- package/pd-mcp-server/dist/budget.d.ts +15 -0
- package/pd-mcp-server/dist/budget.js +19 -0
- package/pd-mcp-server/dist/deadline.d.ts +75 -0
- package/pd-mcp-server/dist/deadline.js +136 -0
- package/pd-mcp-server/dist/envelope.d.ts +52 -0
- package/pd-mcp-server/dist/envelope.js +63 -0
- package/pd-mcp-server/dist/index.d.ts +10 -0
- package/pd-mcp-server/dist/index.js +76 -0
- package/pd-mcp-server/dist/logging.d.ts +12 -0
- package/pd-mcp-server/dist/logging.js +42 -0
- package/pd-mcp-server/dist/server.d.ts +90 -0
- package/pd-mcp-server/dist/server.js +178 -0
- package/pd-mcp-server/dist/version.d.ts +13 -0
- package/pd-mcp-server/dist/version.js +13 -0
- package/pd-mcp-server/dist/workspace.d.ts +23 -0
- package/pd-mcp-server/dist/workspace.js +77 -0
- package/pd-mcp-server/package.json +49 -0
- package/plugin/dist/bundle.js +414 -412
- package/plugin/dist/core/mcp-binding.d.ts +41 -0
- package/plugin/dist/index.d.ts +33 -0
- package/plugin/dist/openclaw.plugin.json +10 -1
- package/plugin/dist/utils/workspace-resolver.d.ts +17 -0
- package/plugin/openclaw.plugin.json +10 -1
- package/plugin/package.json +2 -1
- package/release-manager/dist/installer.js +52 -1
- package/release-manager/dist/installers/mcp-registration-conflict.js +559 -0
- package/release-manager/dist/installers/openclaw-host-installer.js +20 -0
- package/release-manager/dist/installers/workbuddy-host-installer.js +124 -2
- package/release-manager/dist/mcp-server-layout-compat.js +22 -0
- package/release-manager/package.json +7 -5
- package/workbuddy-adapter/dist/pd-hook.js +28 -5
- package/workbuddy-adapter/dist/worker/workspace-worker.d.ts +6 -1
- package/workbuddy-adapter/dist/worker/workspace-worker.js +24 -3
- package/workbuddy-adapter/package.json +1 -1
- package/workbuddy-adapter/plugin/.codebuddy-plugin/plugin.json +2 -2
- package/workbuddy-adapter/plugin/.mcp.json +10 -0
- package/workbuddy-adapter/plugin/mcp/launcher.cjs +347 -0
package/dist/installer.js
CHANGED
|
@@ -14,7 +14,8 @@ import { t } from './i18n.js';
|
|
|
14
14
|
import { generateConfigYamlContent, ExistingConfigVerifyInfraError, validateExistingConfigYamlForPreserve, getConfigYamlPath, readEnabledChannelsFromConfigYaml, getOpenClawDir, getPdDir, getPdRuntimeDir, getInstallManifestPath, getPdRuntimeBackupsDir, getPluginExtDir, getInstalledPluginDir, getInstalledLayoutPackageDir, getPdBackupsDir, getInstalledPdCliDir, getInstalledBinDir, getInstalledConsoleDir, getHomeDir, isWindows, } from './mvp-config.js';
|
|
15
15
|
import { getHostInstallers } from './installers/index.js';
|
|
16
16
|
import { runWorkbuddyEarlyPreflight } from './installers/workbuddy-host-installer.js';
|
|
17
|
-
import { INSTALL_LAYOUT_VERSION, getWorkbuddyWorkspaceDir, installManifestHostsForPersist, mergeInstallManifestWorkspaces, parseInstallManifest } from '@principles/install-layout';
|
|
17
|
+
import { INSTALL_LAYOUT_VERSION, getInstallLayoutPaths, getWorkbuddyWorkspaceDir, installManifestHostsForPersist, mergeInstallManifestWorkspaces, parseInstallManifest } from '@principles/install-layout';
|
|
18
|
+
import { resolveMcpServerDir } from './mcp-server-layout-compat.js';
|
|
18
19
|
import { detectOpenClawMainWorkspaceDivergence } from './utils/workspace-divergence.js';
|
|
19
20
|
import { applySkillLanguageSelection } from './skill-language.js';
|
|
20
21
|
import { parseReleaseAssetIdentity, parseReleaseAssetManifest, ReleaseAssetManifestError, verifyReleaseAssetManifestAsync, verifyReleaseAssetTarget, } from './update/release-asset-manifest.js';
|
|
@@ -659,6 +660,7 @@ const NPM_DISTRIBUTED_COMPONENTS = [
|
|
|
659
660
|
['PD CLI', 'pd-cli'],
|
|
660
661
|
['Console', 'console'],
|
|
661
662
|
['Install layout', 'install-layout'],
|
|
663
|
+
['MCP server', 'pd-mcp-server'],
|
|
662
664
|
];
|
|
663
665
|
// Components whose install step demands MORE than the generic
|
|
664
666
|
// package.json+dist shape check — the per-component extra files are
|
|
@@ -812,6 +814,7 @@ const SELF_CONTAINED_COMPONENTS = [
|
|
|
812
814
|
['PD CLI', 'pd-cli'],
|
|
813
815
|
['Console', 'console'],
|
|
814
816
|
['Install layout', 'install-layout'],
|
|
817
|
+
['MCP server', 'pd-mcp-server'],
|
|
815
818
|
];
|
|
816
819
|
export async function preflightSelfContainedReleaseAsset(assetDir) {
|
|
817
820
|
const identityPath = path.join(assetDir, '_release', 'asset.json');
|
|
@@ -2190,6 +2193,38 @@ function getInstalledCodexAdapterDir() {
|
|
|
2190
2193
|
function getInstalledWorkbuddyAdapterDir() {
|
|
2191
2194
|
return path.join(getPdRuntimeDir(), 'workbuddy-adapter');
|
|
2192
2195
|
}
|
|
2196
|
+
/**
|
|
2197
|
+
* Gate 4 (PRI-1071): the shared MCP server installs as a runtime sibling so
|
|
2198
|
+
* the three host launchers can point their PD-owned bindings at one canonical
|
|
2199
|
+
* entry (~/.pd/runtime/pd-mcp-server/dist/index.js).
|
|
2200
|
+
*/
|
|
2201
|
+
function getInstalledMcpServerDir() {
|
|
2202
|
+
return resolveMcpServerDir(getInstallLayoutPaths(getHomeDir()));
|
|
2203
|
+
}
|
|
2204
|
+
/**
|
|
2205
|
+
* Gate 4 (PRI-1071): deploy the bundled @principles/pd-mcp-server the same
|
|
2206
|
+
* way as the codex/workbuddy adapters. Observable skip (not a failure) for
|
|
2207
|
+
* installer builds older than the component — the host launchers then fail
|
|
2208
|
+
* closed at launch with the honest "server entry missing" state (SPEC §3.5).
|
|
2209
|
+
* Link materialization happens via ensureComponentFileDependencyLinks AFTER
|
|
2210
|
+
* all siblings exist (same ordering contract as the codex adapter).
|
|
2211
|
+
*/
|
|
2212
|
+
function installBundledMcpServer(pluginDir) {
|
|
2213
|
+
const mcpServerSrc = path.join(pluginDir, 'pd-mcp-server');
|
|
2214
|
+
const mcpServerDest = getInstalledMcpServerDir();
|
|
2215
|
+
if (!existsSync(mcpServerSrc)) {
|
|
2216
|
+
logger.warn(`Bundled @principles/pd-mcp-server not found in this installer package (${mcpServerSrc}) — the pd-recall MCP tool stays unavailable in this deployment. Hook/CLI/Console installation is unaffected.`);
|
|
2217
|
+
return false;
|
|
2218
|
+
}
|
|
2219
|
+
const mcpServerPkgJson = path.join(mcpServerSrc, 'package.json');
|
|
2220
|
+
const mcpServerDistEntry = path.join(mcpServerSrc, 'dist', 'index.js');
|
|
2221
|
+
if (!existsSync(mcpServerPkgJson) || !existsSync(mcpServerDistEntry)) {
|
|
2222
|
+
throw new Error('Bundled @principles/pd-mcp-server is incomplete (missing package.json / dist/index.js). Package may be corrupted.');
|
|
2223
|
+
}
|
|
2224
|
+
rmSync(mcpServerDest, { recursive: true, force: true });
|
|
2225
|
+
cpSync(mcpServerSrc, mcpServerDest, { recursive: true });
|
|
2226
|
+
return true;
|
|
2227
|
+
}
|
|
2193
2228
|
function installBundledCore(pluginDir) {
|
|
2194
2229
|
const coreSrc = path.join(pluginDir, 'core');
|
|
2195
2230
|
const coreDest = getInstalledCoreDir();
|
|
@@ -2598,6 +2633,9 @@ async function installConsoleDependencies() {
|
|
|
2598
2633
|
const consoleDest = getInstalledConsoleDir();
|
|
2599
2634
|
await prepareComponentDependencies(consoleDest, 'Console');
|
|
2600
2635
|
}
|
|
2636
|
+
async function installMcpServerDependencies() {
|
|
2637
|
+
await prepareComponentDependencies(getInstalledMcpServerDir(), 'MCP server');
|
|
2638
|
+
}
|
|
2601
2639
|
const CONSOLE_PORT_MAX_RETRIES = 3;
|
|
2602
2640
|
/**
|
|
2603
2641
|
* P0-2 (SPEC v1.2 §5 step 6 / invariant I-4): terminate a child and WAIT for
|
|
@@ -3727,6 +3765,19 @@ transaction) {
|
|
|
3727
3765
|
// installer builds is an observable skip, not a failure.
|
|
3728
3766
|
installBundledWorkbuddyAdapter(pluginDir);
|
|
3729
3767
|
ensureWorkbuddyAdapterResolution();
|
|
3768
|
+
// Gate 4 (PRI-1071): the shared MCP server refreshes with the runtime so
|
|
3769
|
+
// the host launchers' bindings always point at the current canonical
|
|
3770
|
+
// entry. Older installer payloads skip observably (the launchers fail
|
|
3771
|
+
// closed at start with the honest missing-entry state).
|
|
3772
|
+
const mcpServerInstalled = installBundledMcpServer(pluginDir);
|
|
3773
|
+
if (mcpServerInstalled) {
|
|
3774
|
+
ensureComponentFileDependencyLinks(getInstalledMcpServerDir(), 'pd-mcp-server');
|
|
3775
|
+
// The npm-distributed payload ships only dist/ + package.json, and the
|
|
3776
|
+
// MCP server keeps @modelcontextprotocol/server + zod as registry deps
|
|
3777
|
+
// (unlike the file:-linked siblings). Without this pass the launcher
|
|
3778
|
+
// starts an entry whose imports cannot resolve.
|
|
3779
|
+
await installMcpServerDependencies();
|
|
3780
|
+
}
|
|
3730
3781
|
if (spinner)
|
|
3731
3782
|
updateProgress(spinner, stepIndex, 'Installing release-manager authority module...');
|
|
3732
3783
|
installBundledReleaseManagerPackage(pluginDir);
|