create-principles-disciple 1.145.29 → 1.145.32
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 +2 -2
- package/core/dist/index.d.ts +1 -1
- package/core/dist/index.d.ts.map +1 -1
- package/core/dist/prompt-builder/index.d.ts +1 -3
- package/core/dist/prompt-builder/index.d.ts.map +1 -1
- package/core/dist/prompt-builder/index.js +0 -1
- package/core/dist/prompt-builder/index.js.map +1 -1
- package/core/dist/prompt-builder/size-guard.d.ts +3 -4
- package/core/dist/prompt-builder/size-guard.d.ts.map +1 -1
- package/core/dist/prompt-builder/size-guard.js +7 -25
- package/core/dist/prompt-builder/size-guard.js.map +1 -1
- package/core/dist/prompt-builder/types.d.ts +1 -7
- package/core/dist/prompt-builder/types.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.d.ts +0 -3
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +0 -4
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/recovery-actions-log.d.ts.map +1 -1
- package/core/dist/runtime-v2/recovery-actions-log.js +2 -3
- package/core/dist/runtime-v2/recovery-actions-log.js.map +1 -1
- package/core/package.json +1 -1
- package/dist/installer.d.ts +16 -0
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +49 -13
- package/dist/installer.js.map +1 -1
- package/host-runtime/dist/active-principle-prompt.d.ts +1 -9
- package/host-runtime/dist/active-principle-prompt.js +10 -22
- package/host-runtime/dist/index.d.ts +0 -1
- package/host-runtime/dist/index.js +0 -1
- package/host-runtime/dist/prompt-injection-projection.d.ts +0 -7
- package/host-runtime/dist/prompt-injection-projection.js +0 -5
- package/host-runtime/package.json +1 -1
- package/package.json +2 -2
- package/pd-cli/dist/commands/health-codex-install.d.ts +0 -12
- package/pd-cli/dist/commands/health-codex-install.d.ts.map +1 -1
- package/pd-cli/dist/commands/health-codex-install.js +8 -90
- package/pd-cli/dist/commands/health-codex-install.js.map +1 -1
- package/pd-cli/dist/commands/runtime-pruning.d.ts +0 -18
- package/pd-cli/dist/commands/runtime-pruning.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-pruning.js +1 -117
- package/pd-cli/dist/commands/runtime-pruning.js.map +1 -1
- package/pd-cli/dist/commands/version.d.ts +5 -0
- package/pd-cli/dist/commands/version.d.ts.map +1 -1
- package/pd-cli/dist/commands/version.js +27 -5
- package/pd-cli/dist/commands/version.js.map +1 -1
- package/pd-cli/dist/index.js +1 -37
- package/pd-cli/dist/index.js.map +1 -1
- package/pd-cli/dist/services/codex-plugin-install.d.ts +66 -0
- package/pd-cli/dist/services/codex-plugin-install.d.ts.map +1 -0
- package/pd-cli/dist/services/codex-plugin-install.js +168 -0
- package/pd-cli/dist/services/codex-plugin-install.js.map +1 -0
- package/pd-cli/dist/services/delivery-surfaces.d.ts +48 -0
- package/pd-cli/dist/services/delivery-surfaces.d.ts.map +1 -0
- package/pd-cli/dist/services/delivery-surfaces.js +387 -0
- package/pd-cli/dist/services/delivery-surfaces.js.map +1 -0
- package/pd-cli/dist/services/pain-recall.d.ts +79 -0
- package/pd-cli/dist/services/pain-recall.d.ts.map +1 -1
- package/pd-cli/dist/services/pain-recall.js +295 -12
- package/pd-cli/dist/services/pain-recall.js.map +1 -1
- package/pd-cli/package.json +1 -1
- package/plugin/dist/bundle.js +439 -449
- package/plugin/dist/core/evolution-reducer.d.ts +0 -2
- package/plugin/dist/core/session-tracker.d.ts +0 -4
- package/plugin/dist/core/workspace-context.d.ts +0 -8
- package/plugin/dist/hooks/after-tool-call-helpers.d.ts +0 -7
- package/plugin/dist/hooks/pain.d.ts +3 -4
- package/plugin/dist/hooks/prompt-helpers.d.ts +2 -12
- package/plugin/dist/hooks/prompt-types.d.ts +0 -4
- package/plugin/dist/hooks/prompt.d.ts +1 -11
- package/plugin/dist/host-runtime/openclaw-host-runtime.d.ts +0 -1
- package/plugin/dist/openclaw.plugin.json +1 -1
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +4 -26
- package/release-manager/dist/installer.d.ts +16 -0
- package/release-manager/dist/installer.d.ts.map +1 -1
- package/release-manager/dist/installer.js +49 -13
- package/release-manager/dist/installer.js.map +1 -1
- package/release-manager/package.json +2 -2
- package/workbuddy-adapter/package.json +1 -1
- package/workbuddy-adapter/plugin/.codebuddy-plugin/plugin.json +1 -1
- package/workbuddy-adapter/plugin/hooks/hooks.json +1 -1
- package/workbuddy-adapter/plugin/scripts/wrapper.cjs +68 -4
- package/core/dist/prompt-builder/principle-selection.d.ts +0 -68
- package/core/dist/prompt-builder/principle-selection.d.ts.map +0 -1
- package/core/dist/prompt-builder/principle-selection.js +0 -140
- package/core/dist/prompt-builder/principle-selection.js.map +0 -1
- package/core/dist/runtime-v2/pruning-mask.d.ts +0 -27
- package/core/dist/runtime-v2/pruning-mask.d.ts.map +0 -1
- package/core/dist/runtime-v2/pruning-mask.js +0 -59
- package/core/dist/runtime-v2/pruning-mask.js.map +0 -1
- package/core/dist/runtime-v2/pruning-review-log.d.ts +0 -41
- package/core/dist/runtime-v2/pruning-review-log.d.ts.map +0 -1
- package/core/dist/runtime-v2/pruning-review-log.js +0 -106
- package/core/dist/runtime-v2/pruning-review-log.js.map +0 -1
- package/plugin/dist/core/principle-injection.d.ts +0 -10
|
@@ -10,7 +10,6 @@ export interface EvolutionReducer {
|
|
|
10
10
|
promote(_principleId: string, _reason?: string): void;
|
|
11
11
|
deprecate(_principleId: string, _reason: string): void;
|
|
12
12
|
rollbackPrinciple(_principleId: string, _reason: string): void;
|
|
13
|
-
recordProbationFeedback(_principleId: string, _success: boolean): void;
|
|
14
13
|
/**
|
|
15
14
|
* Creates a new principle with generalized trigger/action from diagnostician.
|
|
16
15
|
* Called after diagnostician analysis to create principle directly.
|
|
@@ -66,7 +65,6 @@ export declare class EvolutionReducerImpl implements EvolutionReducer {
|
|
|
66
65
|
promote(principleId: string, reason?: string): void;
|
|
67
66
|
deprecate(principleId: string, reason: string): void;
|
|
68
67
|
rollbackPrinciple(principleId: string, reason: string): void;
|
|
69
|
-
recordProbationFeedback(principleId: string, success: boolean): void;
|
|
70
68
|
/**
|
|
71
69
|
* Creates a new principle with generalized trigger/action from diagnostician.
|
|
72
70
|
* Called after diagnostician analysis to create principle directly (no intermediate overfitted principle).
|
|
@@ -30,7 +30,6 @@ export interface SessionState {
|
|
|
30
30
|
dailyToolFailures: number;
|
|
31
31
|
dailyPainSignals: number;
|
|
32
32
|
dailyGfiPeak: number;
|
|
33
|
-
injectedProbationIds?: string[];
|
|
34
33
|
injectedPrincipleIds?: string[];
|
|
35
34
|
injectedActivationIds?: string[];
|
|
36
35
|
receiptAutoCorrects?: number;
|
|
@@ -62,7 +61,6 @@ export declare function resetFriction(sessionId: string, workspaceDir?: string,
|
|
|
62
61
|
amount?: number;
|
|
63
62
|
}): SessionState;
|
|
64
63
|
export declare function trackBlock(sessionId: string): SessionState;
|
|
65
|
-
export declare function setInjectedProbationIds(sessionId: string, ids: string[], workspaceDir?: string): SessionState;
|
|
66
64
|
/**
|
|
67
65
|
* PRI-534: record the principle ids injected into this session's prompt context.
|
|
68
66
|
* PRI-755 (review fix): call this on EVERY prompt build with the CURRENT set —
|
|
@@ -81,7 +79,6 @@ export declare function setInjectedPrincipleIds(sessionId: string | undefined, i
|
|
|
81
79
|
activationIds?: readonly string[]): void;
|
|
82
80
|
/** PRI-534: count one applied live auto-correction in this session. */
|
|
83
81
|
export declare function trackReceiptAutoCorrect(sessionId: string | undefined, workspaceDir?: string): void;
|
|
84
|
-
export declare function getInjectedProbationIds(sessionId: string, workspaceDir?: string): string[];
|
|
85
82
|
/**
|
|
86
83
|
* PRI-755: read-only view of the principle ids injected into this session's
|
|
87
84
|
* prompt context. Tri-state: an array (possibly empty) means the injection set
|
|
@@ -100,7 +97,6 @@ export declare function getInjectedPrincipleIds(sessionId: string): readonly str
|
|
|
100
97
|
* A consumer must never treat "no pairing" as "some other activation".
|
|
101
98
|
*/
|
|
102
99
|
export declare function getInjectedActivationIds(sessionId: string): readonly string[] | undefined;
|
|
103
|
-
export declare function clearInjectedProbationIds(sessionId: string, workspaceDir?: string): SessionState;
|
|
104
100
|
export declare function getSession(sessionId: string): SessionState | undefined;
|
|
105
101
|
export declare function listSessions(workspaceDir?: string): SessionState[];
|
|
106
102
|
export declare function clearSession(sessionId: string): void;
|
|
@@ -7,7 +7,6 @@ import { EvolutionReducerImpl } from './evolution-reducer.js';
|
|
|
7
7
|
import type { TrajectoryDatabase } from './trajectory.js';
|
|
8
8
|
import { PrincipleLifecycleService } from './principle-internalization/principle-lifecycle-service.js';
|
|
9
9
|
import { type PrincipleSubtree, type LedgerPrinciple, type PrincipleValueMetrics } from './principle-tree-ledger.js';
|
|
10
|
-
import type { Principle as ActivePrinciple } from './evolution-types.js';
|
|
11
10
|
import { RuleHost } from './rule-host.js';
|
|
12
11
|
import type { RuleHostLogger } from './rule-host.js';
|
|
13
12
|
interface PrincipleTreeLedgerAccessor {
|
|
@@ -74,13 +73,6 @@ export declare class WorkspaceContext {
|
|
|
74
73
|
* Phase 15 lifecycle/read-model surface for metrics, assessments, and route recommendations.
|
|
75
74
|
*/
|
|
76
75
|
get principleLifecycle(): PrincipleLifecycleService;
|
|
77
|
-
/**
|
|
78
|
-
* Retrieve active Principle -> Rule -> Implementation subtrees without bypassing reducer authority.
|
|
79
|
-
*/
|
|
80
|
-
getActivePrincipleSubtrees(): {
|
|
81
|
-
principle: ActivePrinciple;
|
|
82
|
-
subtree: PrincipleSubtree;
|
|
83
|
-
}[];
|
|
84
76
|
private getTrajectoryOptions;
|
|
85
77
|
/**
|
|
86
78
|
* Creates or retrieves a WorkspaceContext instance from an OpenClaw hook context.
|
|
@@ -59,13 +59,6 @@ export declare function handleFrictionTrackingForSuccess(sessionId: string, even
|
|
|
59
59
|
* Record hygiene tracking for memory/plan persistence actions on success.
|
|
60
60
|
*/
|
|
61
61
|
export declare function recordHygieneTracking(event: PluginHookAfterToolCallEvent, observation: ToolCallObservation, wctx: WorkspaceContext): void;
|
|
62
|
-
/**
|
|
63
|
-
* Record probation feedback for injected probation IDs.
|
|
64
|
-
*
|
|
65
|
-
* On success: positive feedback for matching principles.
|
|
66
|
-
* On failure: negative feedback for matching principles.
|
|
67
|
-
*/
|
|
68
|
-
export declare function handleProbationFeedback(sessionId: string, toolName: string, workspaceDir: string, wctx: WorkspaceContext, isSuccess: boolean): void;
|
|
69
62
|
/**
|
|
70
63
|
* Evaluate whether a tool failure should trigger pain diagnosis.
|
|
71
64
|
*
|
|
@@ -7,9 +7,8 @@
|
|
|
7
7
|
* 1. classifyToolCallOutcome — determine failure/success + source
|
|
8
8
|
* 2. buildToolCallObservation — normalize event into observation
|
|
9
9
|
* 3. handleFrictionTracking — GFI, event log, trajectory recording
|
|
10
|
-
* 4.
|
|
11
|
-
* 5.
|
|
12
|
-
* 6. emitPainIfAdmitted — pain signal emission
|
|
10
|
+
* 4. evaluatePainAdmission — triage + gate evaluation
|
|
11
|
+
* 5. emitPainIfAdmitted — pain signal emission
|
|
13
12
|
*
|
|
14
13
|
* The manual pain path (toolName === 'pain') remains inline because it
|
|
15
14
|
* has a different control flow (early return, no triage, no gate on cooldown).
|
|
@@ -44,7 +43,7 @@ export declare function handleAfterToolCall(event: PluginHookAfterToolCallEvent,
|
|
|
44
43
|
}, api?: OpenClawPluginApi): void;
|
|
45
44
|
/**
|
|
46
45
|
* OpenClaw-owned enrichment for the shared ordinary after-tool kernel.
|
|
47
|
-
* Session/GFI, event-log,
|
|
46
|
+
* Session/GFI, event-log, PROFILE and hygiene behavior stays here;
|
|
48
47
|
* the shared runtime owns classification/admission and the atomic trajectory write.
|
|
49
48
|
*/
|
|
50
49
|
export declare function prepareOrdinaryAfterToolCallForSharedRuntime(event: PluginHookAfterToolCallEvent, ctx: PluginHookToolContext & {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* EP-03: Pure functions never swallow errors; invalid input returns empty string
|
|
16
16
|
* EP-09: Pure functions are independently unit-testable without mocks
|
|
17
17
|
*/
|
|
18
|
-
import type { ExtractedUserMessage, CorePrincipleEntry,
|
|
18
|
+
import type { ExtractedUserMessage, CorePrincipleEntry, AppendSystemContextParts } from './prompt-types.js';
|
|
19
19
|
/**
|
|
20
20
|
* Extract the actual user message from the raw prompt text.
|
|
21
21
|
*
|
|
@@ -69,22 +69,12 @@ export declare function assembleHeartbeatChecklist(content: string): string;
|
|
|
69
69
|
* @returns Formatted lines (empty string if no principles)
|
|
70
70
|
*/
|
|
71
71
|
export declare function formatCorePrinciples(principles: CorePrincipleEntry[]): string;
|
|
72
|
-
/**
|
|
73
|
-
* Format evolution principles (active + probation) into prompt-ready text.
|
|
74
|
-
*
|
|
75
|
-
* Pure logic — uses escapeXml for safe XML embedding.
|
|
76
|
-
*
|
|
77
|
-
* @param active Active principles (high priority)
|
|
78
|
-
* @param probation Probation principles (contextual, caution)
|
|
79
|
-
* @returns Formatted lines (empty string if no principles)
|
|
80
|
-
*/
|
|
81
|
-
export declare function formatEvolutionPrinciples(active: EvolutionPrincipleEntry[], probation: EvolutionPrincipleEntry[]): string;
|
|
82
72
|
/**
|
|
83
73
|
* Assemble appendSystemContext from ordered parts.
|
|
84
74
|
*
|
|
85
75
|
* Content order (most important last):
|
|
86
76
|
* behavioral_constraints → project_context → intent_block → working_memory →
|
|
87
|
-
* thinking_os →
|
|
77
|
+
* thinking_os → core_principles
|
|
88
78
|
*
|
|
89
79
|
* PRI-467: intent_block (INTENT.md reference) sits after project_context
|
|
90
80
|
* (stable reference data, lower priority than principles) and before
|
|
@@ -46,9 +46,6 @@ export interface CorePrincipleEntry {
|
|
|
46
46
|
id: string;
|
|
47
47
|
text: string;
|
|
48
48
|
}
|
|
49
|
-
/** Input for formatting evolution principles (active + probation). */
|
|
50
|
-
export interface EvolutionPrincipleEntry extends CorePrincipleEntry {
|
|
51
|
-
}
|
|
52
49
|
/** Parts assembled into appendSystemContext. Order = priority (low → high). */
|
|
53
50
|
export interface AppendSystemContextParts {
|
|
54
51
|
behavioralConstraints?: string;
|
|
@@ -63,7 +60,6 @@ export interface AppendSystemContextParts {
|
|
|
63
60
|
intentBlock?: string;
|
|
64
61
|
workingMemory?: string;
|
|
65
62
|
thinkingOs?: string;
|
|
66
|
-
evolutionPrinciples?: string;
|
|
67
63
|
corePrinciples?: string;
|
|
68
64
|
}
|
|
69
65
|
/** Input for the heartbeat checklist wrapper. */
|
|
@@ -4,16 +4,6 @@ import type { ContextInjectionConfig } from '../types.js';
|
|
|
4
4
|
import type { ActivePrinciplePromptResult } from '@principles/host-runtime';
|
|
5
5
|
import { SignalCollectorHost } from '../core/signal-collector-host.js';
|
|
6
6
|
import type { PromptHookApi } from './prompt-types.js';
|
|
7
|
-
import type { InjectablePrinciple } from '../core/principle-injection.js';
|
|
8
|
-
export interface LegacyPrinciplePromptSelection {
|
|
9
|
-
active: InjectablePrinciple[];
|
|
10
|
-
probation: InjectablePrinciple[];
|
|
11
|
-
content: string;
|
|
12
|
-
selectedIds: ReadonlySet<string>;
|
|
13
|
-
/** PRI-562 Phase 0: either budget-bounded selection dropped candidates. */
|
|
14
|
-
wasTruncated: boolean;
|
|
15
|
-
}
|
|
16
|
-
export declare function selectLegacyPrinciplesForPrompt(workspaceDir: string, reducer: Pick<WorkspaceContext['evolutionReducer'], 'getActivePrinciples' | 'getProbationPrinciples'>, logger?: PluginLogger): LegacyPrinciplePromptSelection;
|
|
17
7
|
/**
|
|
18
8
|
* Reset all module-level prompt state for a workspace.
|
|
19
9
|
* Intended for test isolation — call in beforeEach().
|
|
@@ -33,4 +23,4 @@ export declare function getSignalCollectorHost(wctx: WorkspaceContext, logger?:
|
|
|
33
23
|
export declare function loadContextInjectionConfig(workspaceDir: string): ContextInjectionConfig;
|
|
34
24
|
export declare function handleBeforePromptBuild(event: PluginHookBeforePromptBuildEvent, ctx: PluginHookAgentContext & {
|
|
35
25
|
api?: PromptHookApi;
|
|
36
|
-
}, sharedActivePrinciplePrompt?: ActivePrinciplePromptResult
|
|
26
|
+
}, sharedActivePrinciplePrompt?: ActivePrinciplePromptResult): Promise<PluginHookBeforePromptBuildResult | void>;
|
|
@@ -3,7 +3,6 @@ import type { HostEventResult } from '@principles/core/host';
|
|
|
3
3
|
import type { PluginHookAgentContext, PluginHookAfterToolCallEvent, PluginHookBeforePromptBuildEvent, PluginHookBeforePromptBuildResult, PluginHookBeforeToolCallEvent, PluginHookBeforeToolCallResult, PluginHookToolContext } from '../openclaw-sdk.js';
|
|
4
4
|
export interface OpenClawHostRuntimeOptions {
|
|
5
5
|
beforePromptBuild(event: PluginHookBeforePromptBuildEvent, context: PluginHookAgentContext, prompt: ActivePrinciplePromptResult): Promise<PluginHookBeforePromptBuildResult | void>;
|
|
6
|
-
promptExcludePrincipleIds?(event: PluginHookBeforePromptBuildEvent, context: PluginHookAgentContext): ReadonlySet<string>;
|
|
7
6
|
ruleContextProvider?(event: PluginHookBeforeToolCallEvent, context: PluginHookToolContext, request: ProductionRuleContextRequest): unknown | Promise<unknown>;
|
|
8
7
|
ruleInputEnrichmentProvider?(event: PluginHookBeforeToolCallEvent, context: PluginHookToolContext, request: ProductionRuleContextRequest): unknown | Promise<unknown>;
|
|
9
8
|
onBeforeToolResult?(event: PluginHookBeforeToolCallEvent, context: PluginHookToolContext, result: HostEventResult): PluginHookBeforeToolCallResult | void;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "principles-disciple",
|
|
3
3
|
"name": "Principles Disciple",
|
|
4
4
|
"description": "Principles Disciple is an AI Agent Governance System. Stop correcting the same AI behavior across sessions. Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles.",
|
|
5
|
-
"version": "2.2.
|
|
5
|
+
"version": "2.2.6",
|
|
6
6
|
"activation": {
|
|
7
7
|
"onStartup": true,
|
|
8
8
|
"onCapabilities": [
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "principles-disciple",
|
|
3
3
|
"name": "Principles Disciple",
|
|
4
4
|
"description": "Principles Disciple is an AI Agent Governance System. Stop correcting the same AI behavior across sessions. Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles.",
|
|
5
|
-
"version": "2.2.
|
|
5
|
+
"version": "2.2.6",
|
|
6
6
|
"activation": {
|
|
7
7
|
"onStartup": true,
|
|
8
8
|
"onCapabilities": [
|
package/plugin/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "principles-disciple",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.6",
|
|
4
4
|
"description": "Principles Disciple is an AI Agent Governance System. Stop correcting the same AI behavior across sessions. Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -72,26 +72,9 @@
|
|
|
72
72
|
"test:all": "vitest run",
|
|
73
73
|
"lint": "eslint \"src/**/*.ts\"",
|
|
74
74
|
"bootstrap-rules": "node scripts/bootstrap-rules.mjs",
|
|
75
|
-
"compile-principles": "node scripts/compile-principles.mjs"
|
|
76
|
-
"sync-plugin": "node scripts/sync-plugin.mjs"
|
|
77
|
-
},
|
|
78
|
-
"devDependencies": {
|
|
79
|
-
"@types/better-sqlite3": "^9.6.0",
|
|
80
|
-
"@types/js-yaml": "^4.0.9",
|
|
81
|
-
"@types/micromatch": "^4.0.10",
|
|
82
|
-
"@types/node": "^26.4.1",
|
|
83
|
-
"@types/ws": "^8.18.2",
|
|
84
|
-
"@typescript-eslint/eslint-plugin": "^8.68.0",
|
|
85
|
-
"@typescript-eslint/parser": "^8.70.1",
|
|
86
|
-
"@vitest/coverage-v8": "^5.0.0",
|
|
87
|
-
"esbuild": "^0.28.2",
|
|
88
|
-
"eslint": "^10.8.1",
|
|
89
|
-
"jsdom": "^30.1.1",
|
|
90
|
-
"typescript": "^7.0.2",
|
|
91
|
-
"vite": "^8.3.4",
|
|
92
|
-
"vitest": "^5.0.0",
|
|
93
|
-
"ws": "^8.22.0"
|
|
75
|
+
"compile-principles": "node scripts/compile-principles.mjs"
|
|
94
76
|
},
|
|
77
|
+
"devDependencies": {},
|
|
95
78
|
"peerDependencies": {
|
|
96
79
|
"openclaw": ">=2026.4.4"
|
|
97
80
|
},
|
|
@@ -101,11 +84,6 @@
|
|
|
101
84
|
}
|
|
102
85
|
},
|
|
103
86
|
"dependencies": {
|
|
104
|
-
"
|
|
105
|
-
"@sinclair/typebox": "^0.34.52",
|
|
106
|
-
"better-sqlite3": "^13.0.3",
|
|
107
|
-
"commander": "^12.0.0",
|
|
108
|
-
"js-yaml": "^5.4.3",
|
|
109
|
-
"micromatch": "^4.0.8"
|
|
87
|
+
"better-sqlite3": "^13.0.3"
|
|
110
88
|
}
|
|
111
89
|
}
|
|
@@ -84,6 +84,22 @@ export interface BootstrapDeliveryResult {
|
|
|
84
84
|
readonly executorDigest: string;
|
|
85
85
|
readonly executorDir: string;
|
|
86
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Resolve which installer bytes the bootstrap executor should be deployed
|
|
89
|
+
* from. The deployed executor is what RUNS an update, so delivering it from
|
|
90
|
+
* "whichever installer is executing" pins that old code forever: the executor
|
|
91
|
+
* re-delivers itself, its same-version fast path matches, and every later
|
|
92
|
+
* update keeps running retired behavior. That is how the PRI-1021 legacy
|
|
93
|
+
* `~/.openclaw/plugins/installs.json` writer came back on 2026-10-28 — a
|
|
94
|
+
* 1.145.1 executor deployed 2026-10-15 applied release 2.4.0 using its own
|
|
95
|
+
* pre-PRI-1021 host installer while the release shipped the fixed one.
|
|
96
|
+
*
|
|
97
|
+
* The payload's `release-manager` component is the installer this transaction
|
|
98
|
+
* deploys, so it is the authority for the NEXT executor. Fall back to the
|
|
99
|
+
* executing package only when the payload carries no installer component
|
|
100
|
+
* (npm-distributed legacy shape).
|
|
101
|
+
*/
|
|
102
|
+
export declare function resolveBootstrapExecutorSourceDir(payloadRoot: string): string;
|
|
87
103
|
export declare function deliverBootstrapExecutor(input: {
|
|
88
104
|
pdHome: string;
|
|
89
105
|
/** The installer package's own root (contains dist/ and package.json). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../src/installer.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAoBL,KAAK,eAAe,EACpB,KAAK,kBAAkB,EAExB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EAAsB,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAGnF,OAAO,EAA+B,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAoBtF,OAAO,EAKL,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACtB,MAAM,iCAAiC,CAAC;AAEzC,iFAAiF;AACjF,eAAO,MAAM,8BAA8B,EAAG,yBAAkC,CAAC;AAEjF;gFACgF;AAChF,eAAO,MAAM,4BAA4B,0CAA0C,CAAC;AAMpF;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmCjG;AA4BD,wBAAgB,sBAAsB,IAAI,MAAM,CAU/C;AAgCD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,EAAE,CAgBtF;AA6DD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,mFAAmF;IACnF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAA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AM,6BAA6B,GAAG,UAAU,GAAG,gBAAgB,CAAC;AAE1E,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,oBAAoB,EAAE,6BAA6B,CAAC;IAC7D,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,2BAA2B,EAAE,2BAA2B,CAAC;CACnE;AAqDD,mFAAmF;AACnF,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,mBAAmB,CAAC,EAAE,wBAAwB,GAAG,gBAAgB,CAYzH;AAED;;;;GAIG;AAEH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,gBAAgB,GAAG,IAAI,EAC7B,EAAE,EAAE,gBAAgB,EACpB,MAAM,EAAE,MAAM,GACb,IAAI,CAqBN;AAED,oFAAoF;AAEpF,wBAAgB,mCAAmC,CACjD,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,gBAAgB,GAAG,IAAI,EAC7B,EAAE,EAAE,gBAAgB,EACpB,MAAM,EAAE,MAAM,GACb,IAAI,CAYN;AAQD,wBAAsB,OAAO,CAC3B,OAAO,EAAE,cAAc,EACvB,SAAS,EAAE,MAAM,EACjB,IAAI,GAAE,cAAmB,EAMzB,WAAW,CAAC,EAAE,gBAAgB,GAC7B,OAAO,CAAC,aAAa,CAAC,CAsxBxB"}
|
|
@@ -343,6 +343,34 @@ function copyExecutorDependencyClosure(sourcePackageDir, stagingDir) {
|
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
+
/**
|
|
347
|
+
* Resolve which installer bytes the bootstrap executor should be deployed
|
|
348
|
+
* from. The deployed executor is what RUNS an update, so delivering it from
|
|
349
|
+
* "whichever installer is executing" pins that old code forever: the executor
|
|
350
|
+
* re-delivers itself, its same-version fast path matches, and every later
|
|
351
|
+
* update keeps running retired behavior. That is how the PRI-1021 legacy
|
|
352
|
+
* `~/.openclaw/plugins/installs.json` writer came back on 2026-10-28 — a
|
|
353
|
+
* 1.145.1 executor deployed 2026-10-15 applied release 2.4.0 using its own
|
|
354
|
+
* pre-PRI-1021 host installer while the release shipped the fixed one.
|
|
355
|
+
*
|
|
356
|
+
* The payload's `release-manager` component is the installer this transaction
|
|
357
|
+
* deploys, so it is the authority for the NEXT executor. Fall back to the
|
|
358
|
+
* executing package only when the payload carries no installer component
|
|
359
|
+
* (npm-distributed legacy shape).
|
|
360
|
+
*/
|
|
361
|
+
export function resolveBootstrapExecutorSourceDir(payloadRoot) {
|
|
362
|
+
const shipped = path.join(payloadRoot, 'release-manager');
|
|
363
|
+
try {
|
|
364
|
+
const manifest = JSON.parse(readFileSync(path.join(shipped, 'package.json'), 'utf8'));
|
|
365
|
+
if (manifest.name === 'create-principles-disciple' && existsSync(path.join(shipped, 'dist', 'update', 'bootstrap-executor.js'))) {
|
|
366
|
+
return shipped;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
catch {
|
|
370
|
+
// Absent or unreadable component — the executing package is the only source.
|
|
371
|
+
}
|
|
372
|
+
return path.resolve(fileURLToPath(import.meta.url), '../..');
|
|
373
|
+
}
|
|
346
374
|
export async function deliverBootstrapExecutor(input) {
|
|
347
375
|
const paths = resolvePdHomePaths(input.pdHome);
|
|
348
376
|
const stagingDir = path.join(paths.bootstrapDir, 'executor.staging');
|
|
@@ -1384,18 +1412,24 @@ export async function installPluginToStaging(pluginDir, language) {
|
|
|
1384
1412
|
const builtPluginDir = path.join(pluginDir, 'plugin');
|
|
1385
1413
|
for (const targetDir of pluginInstallDirs()) {
|
|
1386
1414
|
await fse.ensureDir(targetDir);
|
|
1415
|
+
// PRI-1037 payload fix: npm-era payloads carried a ~16k-file node_modules
|
|
1416
|
+
// (the whole pi-ai/openai/anthropic tree, dragged in through the plugin's
|
|
1417
|
+
// historical file:./core dependency) plus a `core` junction, in BOTH plugin
|
|
1418
|
+
// install dirs. fse.copy(overwrite) never deletes extraneous entries, so
|
|
1419
|
+
// that payload survived every upgrade — and OpenClaw's workspace-plugin
|
|
1420
|
+
// capture copies plugin files package-by-package into each `agent exec`
|
|
1421
|
+
// state under a hard 120s publication budget, timing out every exec. The
|
|
1422
|
+
// shipped plugin now declares better-sqlite3 as its only runtime dependency
|
|
1423
|
+
// (dist/bundle.js imports it statically; everything else is inlined at
|
|
1424
|
+
// build time), so prune the stale trees before the copy and let the
|
|
1425
|
+
// installed payload converge to the lean shape.
|
|
1426
|
+
// Unconditional removes: fse.remove is a no-op on a missing path, and an
|
|
1427
|
+
// existsSync guard would skip dangling `core` links (existsSync follows the
|
|
1428
|
+
// link, so it reports false once the link target is gone) and leave the
|
|
1429
|
+
// retired surface behind.
|
|
1430
|
+
await fse.remove(path.join(targetDir, 'node_modules'));
|
|
1431
|
+
await fse.remove(path.join(targetDir, 'core'));
|
|
1387
1432
|
await fse.copy(builtPluginDir, targetDir, { overwrite: true });
|
|
1388
|
-
// The published plugin declares its bundled core as file:./core. Keep that
|
|
1389
|
-
// package-local contract while storing the actual core once in the shared
|
|
1390
|
-
// host-neutral runtime directory.
|
|
1391
|
-
const pluginCoreLink = path.join(targetDir, 'core');
|
|
1392
|
-
if (!existsSync(pluginCoreLink)) {
|
|
1393
|
-
const coreDir = path.join(getPdRuntimeDir(), 'core');
|
|
1394
|
-
if (isWindows())
|
|
1395
|
-
symlinkSync(coreDir, pluginCoreLink, 'junction');
|
|
1396
|
-
else
|
|
1397
|
-
symlinkSync(path.relative(targetDir, coreDir), pluginCoreLink, 'dir');
|
|
1398
|
-
}
|
|
1399
1433
|
// OpenClaw publishes skills by name with no locale mechanism. Applying the
|
|
1400
1434
|
// same selected language to both copies also keeps the canonical package
|
|
1401
1435
|
// ready if another host is attached later.
|
|
@@ -3575,8 +3609,10 @@ transaction) {
|
|
|
3575
3609
|
try {
|
|
3576
3610
|
await deliverBootstrapExecutor({
|
|
3577
3611
|
pdHome: getPdDir(),
|
|
3578
|
-
//
|
|
3579
|
-
|
|
3612
|
+
// The installer shipped in THIS payload — never the executing package:
|
|
3613
|
+
// during an update the executor is the executing package, and sourcing
|
|
3614
|
+
// from it would re-pin the executor to its own stale code forever.
|
|
3615
|
+
sourcePackageDir: resolveBootstrapExecutorSourceDir(pluginDir),
|
|
3580
3616
|
});
|
|
3581
3617
|
}
|
|
3582
3618
|
catch (error) {
|