create-principles-disciple 1.124.0 → 1.124.2
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/console/dist/server/models/OwnerDecisionConsoleModel.js +13 -2
- package/console/dist/ui/api.js +1 -1
- package/console/dist/ui/i18n/en.json +6 -2
- package/console/dist/ui/i18n/zh-CN.json +6 -2
- package/console/dist/ui/pages/settings/SettingsPage.js +40 -4
- package/console/dist/web/assets/app.js +45 -10
- package/core/dist/index.d.ts +7 -12
- package/core/dist/index.d.ts.map +1 -1
- package/core/dist/index.js +7 -12
- package/core/dist/index.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js +1 -1
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/status-contract.test.js +0 -29
- package/core/dist/runtime-v2/__tests__/status-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/index.d.ts +0 -1
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +0 -2
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/package.json +0 -36
- package/package.json +1 -1
- package/plugin/dist/bundle.js +343 -343
- package/plugin/dist/governance-audit.js +5 -5
- package/plugin/dist/rulehost-evidence.js +4 -4
- package/core/dist/principle-injector.d.ts +0 -67
- package/core/dist/principle-injector.d.ts.map +0 -1
- package/core/dist/principle-injector.js +0 -89
- package/core/dist/principle-injector.js.map +0 -1
- package/core/dist/principle-injector.test.d.ts +0 -2
- package/core/dist/principle-injector.test.d.ts.map +0 -1
- package/core/dist/principle-injector.test.js +0 -158
- package/core/dist/principle-injector.test.js.map +0 -1
- package/core/dist/runtime-v2/store/task-migration.d.ts +0 -89
- package/core/dist/runtime-v2/store/task-migration.d.ts.map +0 -1
- package/core/dist/runtime-v2/store/task-migration.js +0 -79
- package/core/dist/runtime-v2/store/task-migration.js.map +0 -1
- package/dist/updater.d.ts +0 -39
- package/dist/updater.d.ts.map +0 -1
- package/dist/updater.js +0 -347
- package/dist/updater.js.map +0 -1
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PrincipleInjector interface and DefaultPrincipleInjector implementation for the Evolution SDK.
|
|
3
|
-
*
|
|
4
|
-
* The DefaultPrincipleInjector is a minimal framework-agnostic implementation that:
|
|
5
|
-
* - Sorts principles by priority (P0 first), then by creation date
|
|
6
|
-
* - Selects principles that fit within budgetChars
|
|
7
|
-
* - Always includes P0 principles (forced inclusion)
|
|
8
|
-
* - Formats principles as "- [ID] text"
|
|
9
|
-
*
|
|
10
|
-
* This implementation does NOT depend on openclaw-plugin internals.
|
|
11
|
-
* It uses only SDK types (InjectablePrinciple, InjectionContext).
|
|
12
|
-
*/
|
|
13
|
-
import type { InjectablePrinciple } from './prompt-builder/principle-selection.js';
|
|
14
|
-
/**
|
|
15
|
-
* Generic injection context -- no framework-specific fields.
|
|
16
|
-
*/
|
|
17
|
-
export interface InjectionContext {
|
|
18
|
-
/** Domain context (e.g., 'coding', 'writing', 'analysis') */
|
|
19
|
-
domain: string;
|
|
20
|
-
/** Session identifier */
|
|
21
|
-
sessionId: string;
|
|
22
|
-
/** Maximum characters allowed for injected principles */
|
|
23
|
-
budgetChars: number;
|
|
24
|
-
/** Principle IDs to exclude from injection (e.g. pruned by audit). Undefined = no masking. */
|
|
25
|
-
maskedPrincipleIds?: Set<string>;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Framework-agnostic principle injection interface.
|
|
29
|
-
*
|
|
30
|
-
* Wraps the existing budget-aware selection and formatting logic.
|
|
31
|
-
* Framework adapters convert their context to InjectionContext before calling.
|
|
32
|
-
*/
|
|
33
|
-
export interface PrincipleInjector {
|
|
34
|
-
/**
|
|
35
|
-
* Select principles relevant for injection within a character budget.
|
|
36
|
-
*
|
|
37
|
-
* @param principles - All available principles to select from
|
|
38
|
-
* @param context - Generic injection context with budget constraint
|
|
39
|
-
* @returns Selected principles in injection order
|
|
40
|
-
*/
|
|
41
|
-
getRelevantPrinciples(principles: InjectablePrinciple[], context: InjectionContext): InjectablePrinciple[];
|
|
42
|
-
/**
|
|
43
|
-
* Format a single principle for prompt injection.
|
|
44
|
-
*
|
|
45
|
-
* @param principle - The principle to format
|
|
46
|
-
* @returns Formatted string for prompt injection
|
|
47
|
-
*/
|
|
48
|
-
formatForInjection(principle: InjectablePrinciple): string;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Default implementation of PrincipleInjector.
|
|
52
|
-
*
|
|
53
|
-
* A minimal framework-agnostic injector using only SDK types.
|
|
54
|
-
* Selection algorithm:
|
|
55
|
-
* 1. Separate P0 principles (forced inclusion) from P1/P2
|
|
56
|
-
* 2. Sort all principles by priority (P0 first), then by createdAt (oldest first)
|
|
57
|
-
* 3. Include all P0 principles (forced, may exceed budgetChars)
|
|
58
|
-
* 4. Fill remaining budget with P1/P2 principles in priority order
|
|
59
|
-
*
|
|
60
|
-
* Note: P0 forced inclusion may cause total output to exceed budgetChars.
|
|
61
|
-
* Callers should monitor total formatted length against their budget limit.
|
|
62
|
-
*/
|
|
63
|
-
export declare class DefaultPrincipleInjector implements PrincipleInjector {
|
|
64
|
-
getRelevantPrinciples(principles: InjectablePrinciple[], context: InjectionContext): InjectablePrinciple[];
|
|
65
|
-
formatForInjection(principle: InjectablePrinciple): string;
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=principle-injector.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"principle-injector.d.ts","sourceRoot":"","sources":["../src/principle-injector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAEnF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,WAAW,EAAE,MAAM,CAAC;IACpB,8FAA8F;IAC9F,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAClC;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,qBAAqB,CACnB,UAAU,EAAE,mBAAmB,EAAE,EACjC,OAAO,EAAE,gBAAgB,GACxB,mBAAmB,EAAE,CAAC;IAEzB;;;;;OAKG;IACH,kBAAkB,CAAC,SAAS,EAAE,mBAAmB,GAAG,MAAM,CAAC;CAC5D;AAuBD;;;;;;;;;;;;GAYG;AACH,qBAAa,wBAAyB,YAAW,iBAAiB;IAChE,qBAAqB,CACnB,UAAU,EAAE,mBAAmB,EAAE,EACjC,OAAO,EAAE,gBAAgB,GACxB,mBAAmB,EAAE,CAyDvB;IAGD,kBAAkB,CAAC,SAAS,EAAE,mBAAmB,GAAG,MAAM,CAEzD;CACF"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Priority order for principle selection.
|
|
3
|
-
*/
|
|
4
|
-
const PRIORITY_ORDER = {
|
|
5
|
-
'P0': 0,
|
|
6
|
-
'P1': 1,
|
|
7
|
-
'P2': 2,
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Parse a priority string to its numeric order value.
|
|
11
|
-
* @throws Error if priority is unknown (not P0, P1, or P2)
|
|
12
|
-
*/
|
|
13
|
-
function priorityValue(priority) {
|
|
14
|
-
const p = PRIORITY_ORDER[priority ?? 'P1'];
|
|
15
|
-
if (p === undefined) {
|
|
16
|
-
throw new Error(`Unknown principle priority: ${priority}`);
|
|
17
|
-
}
|
|
18
|
-
return p;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Default implementation of PrincipleInjector.
|
|
22
|
-
*
|
|
23
|
-
* A minimal framework-agnostic injector using only SDK types.
|
|
24
|
-
* Selection algorithm:
|
|
25
|
-
* 1. Separate P0 principles (forced inclusion) from P1/P2
|
|
26
|
-
* 2. Sort all principles by priority (P0 first), then by createdAt (oldest first)
|
|
27
|
-
* 3. Include all P0 principles (forced, may exceed budgetChars)
|
|
28
|
-
* 4. Fill remaining budget with P1/P2 principles in priority order
|
|
29
|
-
*
|
|
30
|
-
* Note: P0 forced inclusion may cause total output to exceed budgetChars.
|
|
31
|
-
* Callers should monitor total formatted length against their budget limit.
|
|
32
|
-
*/
|
|
33
|
-
export class DefaultPrincipleInjector {
|
|
34
|
-
getRelevantPrinciples(principles, context) {
|
|
35
|
-
if (!principles || principles.length === 0) {
|
|
36
|
-
return [];
|
|
37
|
-
}
|
|
38
|
-
// Apply masking filter before selection
|
|
39
|
-
const maskedIds = context.maskedPrincipleIds;
|
|
40
|
-
const unmasked = maskedIds && maskedIds.size > 0
|
|
41
|
-
? principles.filter((p) => !maskedIds.has(p.id))
|
|
42
|
-
: principles;
|
|
43
|
-
if (unmasked.length === 0) {
|
|
44
|
-
return [];
|
|
45
|
-
}
|
|
46
|
-
// Separate P0 from P1/P2
|
|
47
|
-
const p0Principles = unmasked.filter((p) => p.priority === 'P0');
|
|
48
|
-
const otherPrinciples = unmasked.filter((p) => p.priority !== 'P0');
|
|
49
|
-
// Pre-parse dates once to avoid repeated Date allocations during sort
|
|
50
|
-
const p0WithEpoch = p0Principles.map((p) => ({
|
|
51
|
-
p,
|
|
52
|
-
epoch: new Date(p.createdAt).getTime(),
|
|
53
|
-
}));
|
|
54
|
-
p0WithEpoch.sort((a, b) => a.epoch - b.epoch);
|
|
55
|
-
const othersWithEpoch = otherPrinciples.map((p) => ({
|
|
56
|
-
p,
|
|
57
|
-
priorityVal: priorityValue(p.priority),
|
|
58
|
-
epoch: new Date(p.createdAt).getTime(),
|
|
59
|
-
}));
|
|
60
|
-
othersWithEpoch.sort((a, b) => {
|
|
61
|
-
if (a.priorityVal !== b.priorityVal)
|
|
62
|
-
return a.priorityVal - b.priorityVal;
|
|
63
|
-
return a.epoch - b.epoch;
|
|
64
|
-
});
|
|
65
|
-
// Build result: P0 first (forced, may exceed budget), then others
|
|
66
|
-
const result = [];
|
|
67
|
-
let usedChars = 0;
|
|
68
|
-
// ALWAYS include P0 principles (forced inclusion, even if exceeds budget)
|
|
69
|
-
for (const { p } of p0WithEpoch) {
|
|
70
|
-
const formatted = this.formatForInjection(p);
|
|
71
|
-
result.push(p);
|
|
72
|
-
usedChars += formatted.length;
|
|
73
|
-
}
|
|
74
|
-
// Add P1/P2 principles until main budget exhausted
|
|
75
|
-
for (const { p } of othersWithEpoch) {
|
|
76
|
-
const formatted = this.formatForInjection(p);
|
|
77
|
-
if (usedChars + formatted.length <= context.budgetChars) {
|
|
78
|
-
result.push(p);
|
|
79
|
-
usedChars += formatted.length;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return result;
|
|
83
|
-
}
|
|
84
|
-
// eslint-disable-next-line @typescript-eslint/class-methods-use-this
|
|
85
|
-
formatForInjection(principle) {
|
|
86
|
-
return `- [${principle.id}] ${principle.text}`;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=principle-injector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"principle-injector.js","sourceRoot":"","sources":["../src/principle-injector.ts"],"names":[],"mappings":"AAwDA;;GAEG;AACH,MAAM,cAAc,GAA2B;IAC7C,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC;CACR,CAAC;AAEF;;;GAGG;AACH,SAAS,aAAa,CAAC,QAA4B;IACjD,MAAM,CAAC,GAAG,cAAc,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC;IAC3C,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,+BAA+B,QAAQ,EAAE,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,wBAAwB;IACnC,qBAAqB,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AC;IACjD,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"principle-injector.test.d.ts","sourceRoot":"","sources":["../src/principle-injector.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { DefaultPrincipleInjector } from './principle-injector.js';
|
|
3
|
-
function makeP(id, text, opts = {}) {
|
|
4
|
-
return {
|
|
5
|
-
id,
|
|
6
|
-
text,
|
|
7
|
-
priority: opts.priority ?? 'P1',
|
|
8
|
-
createdAt: opts.createdAt ?? '2026-01-01T00:00:00.000Z',
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
describe('DefaultPrincipleInjector', () => {
|
|
12
|
-
describe('formatForInjection', () => {
|
|
13
|
-
it('formats principle with id and text', () => {
|
|
14
|
-
const injector = new DefaultPrincipleInjector();
|
|
15
|
-
expect(injector.formatForInjection(makeP('P0-001', 'Be careful'))).toBe('- [P0-001] Be careful');
|
|
16
|
-
});
|
|
17
|
-
it('handles empty text', () => {
|
|
18
|
-
const injector = new DefaultPrincipleInjector();
|
|
19
|
-
expect(injector.formatForInjection(makeP('P1-001', ''))).toBe('- [P1-001] ');
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
describe('getRelevantPrinciples', () => {
|
|
23
|
-
it('returns empty array for empty input', () => {
|
|
24
|
-
const injector = new DefaultPrincipleInjector();
|
|
25
|
-
const context = { domain: 'test', sessionId: 's1', budgetChars: 4000 };
|
|
26
|
-
const result = injector.getRelevantPrinciples([], context);
|
|
27
|
-
expect(result).toEqual([]);
|
|
28
|
-
});
|
|
29
|
-
it('returns empty array for null input', () => {
|
|
30
|
-
const injector = new DefaultPrincipleInjector();
|
|
31
|
-
const context = { domain: 'test', sessionId: 's1', budgetChars: 4000 };
|
|
32
|
-
const result = injector.getRelevantPrinciples(null, context);
|
|
33
|
-
expect(result).toEqual([]);
|
|
34
|
-
});
|
|
35
|
-
it('P0 principles are always included (forced)', () => {
|
|
36
|
-
const injector = new DefaultPrincipleInjector();
|
|
37
|
-
const p0 = makeP('P0-001', 'Critical principle', { priority: 'P0' });
|
|
38
|
-
const p1 = makeP('P1-001', 'Normal principle', { priority: 'P1' });
|
|
39
|
-
const context = { domain: 'test', sessionId: 's1', budgetChars: 4000 };
|
|
40
|
-
const result = injector.getRelevantPrinciples([p0, p1], context);
|
|
41
|
-
expect(result).toContainEqual(expect.objectContaining({ id: 'P0-001' }));
|
|
42
|
-
});
|
|
43
|
-
it('P0 included even when exceeding budget', () => {
|
|
44
|
-
const injector = new DefaultPrincipleInjector();
|
|
45
|
-
const p0 = makeP('P0-001', 'X'.repeat(5000), { priority: 'P0' });
|
|
46
|
-
const context = { domain: 'test', sessionId: 's1', budgetChars: 100 };
|
|
47
|
-
const result = injector.getRelevantPrinciples([p0], context);
|
|
48
|
-
expect(result).toHaveLength(1);
|
|
49
|
-
expect(result[0]?.id).toBe('P0-001');
|
|
50
|
-
});
|
|
51
|
-
it('P0 principles sorted by createdAt (oldest first)', () => {
|
|
52
|
-
const injector = new DefaultPrincipleInjector();
|
|
53
|
-
const p0Old = makeP('P0-001', 'Old', { priority: 'P0', createdAt: '2026-01-01T00:00:00.000Z' });
|
|
54
|
-
const p0New = makeP('P0-002', 'New', { priority: 'P0', createdAt: '2026-06-01T00:00:00.000Z' });
|
|
55
|
-
const context = { domain: 'test', sessionId: 's1', budgetChars: 4000 };
|
|
56
|
-
const result = injector.getRelevantPrinciples([p0New, p0Old], context);
|
|
57
|
-
expect(result[0]?.id).toBe('P0-001');
|
|
58
|
-
expect(result[1]?.id).toBe('P0-002');
|
|
59
|
-
});
|
|
60
|
-
it('P1 principles sorted by priority then createdAt', () => {
|
|
61
|
-
const injector = new DefaultPrincipleInjector();
|
|
62
|
-
const p1Old = makeP('P1-001', 'Old', { priority: 'P1', createdAt: '2026-01-01T00:00:00.000Z' });
|
|
63
|
-
const p1New = makeP('P1-002', 'New', { priority: 'P1', createdAt: '2026-06-01T00:00:00.000Z' });
|
|
64
|
-
const context = { domain: 'test', sessionId: 's1', budgetChars: 4000 };
|
|
65
|
-
const result = injector.getRelevantPrinciples([p1New, p1Old], context);
|
|
66
|
-
expect(result[0]?.id).toBe('P1-001');
|
|
67
|
-
expect(result[1]?.id).toBe('P1-002');
|
|
68
|
-
});
|
|
69
|
-
it('maskedPrincipleIds filters out excluded principles', () => {
|
|
70
|
-
const injector = new DefaultPrincipleInjector();
|
|
71
|
-
const p0 = makeP('P0-001', 'Critical', { priority: 'P0' });
|
|
72
|
-
const p1 = makeP('P1-001', 'Masked', { priority: 'P1' });
|
|
73
|
-
const context = {
|
|
74
|
-
domain: 'test',
|
|
75
|
-
sessionId: 's1',
|
|
76
|
-
budgetChars: 4000,
|
|
77
|
-
maskedPrincipleIds: new Set(['P1-001']),
|
|
78
|
-
};
|
|
79
|
-
const result = injector.getRelevantPrinciples([p0, p1], context);
|
|
80
|
-
expect(result).toHaveLength(1);
|
|
81
|
-
expect(result[0]?.id).toBe('P0-001');
|
|
82
|
-
});
|
|
83
|
-
it('maskedPrincipleIds empty set has no effect', () => {
|
|
84
|
-
const injector = new DefaultPrincipleInjector();
|
|
85
|
-
const p0 = makeP('P0-001', 'Critical', { priority: 'P0' });
|
|
86
|
-
const p1 = makeP('P1-001', 'Normal', { priority: 'P1' });
|
|
87
|
-
const context = {
|
|
88
|
-
domain: 'test',
|
|
89
|
-
sessionId: 's1',
|
|
90
|
-
budgetChars: 4000,
|
|
91
|
-
maskedPrincipleIds: new Set(),
|
|
92
|
-
};
|
|
93
|
-
const result = injector.getRelevantPrinciples([p0, p1], context);
|
|
94
|
-
expect(result).toHaveLength(2);
|
|
95
|
-
});
|
|
96
|
-
it('all masked principles returns empty', () => {
|
|
97
|
-
const injector = new DefaultPrincipleInjector();
|
|
98
|
-
const p0 = makeP('P0-001', 'Critical', { priority: 'P0' });
|
|
99
|
-
const context = {
|
|
100
|
-
domain: 'test',
|
|
101
|
-
sessionId: 's1',
|
|
102
|
-
budgetChars: 4000,
|
|
103
|
-
maskedPrincipleIds: new Set(['P0-001']),
|
|
104
|
-
};
|
|
105
|
-
const result = injector.getRelevantPrinciples([p0], context);
|
|
106
|
-
expect(result).toEqual([]);
|
|
107
|
-
});
|
|
108
|
-
it('throws on unknown priority', () => {
|
|
109
|
-
const injector = new DefaultPrincipleInjector();
|
|
110
|
-
const invalidP = { id: 'P9-001', text: 'Invalid', priority: 'P9', createdAt: '2026-01-01T00:00:00.000Z' };
|
|
111
|
-
const context = { domain: 'test', sessionId: 's1', budgetChars: 4000 };
|
|
112
|
-
expect(() => injector.getRelevantPrinciples([invalidP], context)).toThrow('Unknown principle priority: P9');
|
|
113
|
-
});
|
|
114
|
-
it('undefined priority defaults to P1', () => {
|
|
115
|
-
const injector = new DefaultPrincipleInjector();
|
|
116
|
-
// Construct directly without `makeP` so the `priority` field is genuinely
|
|
117
|
-
// absent. `makeP` applies `opts.priority ?? 'P1'`, which would mask the
|
|
118
|
-
// undefined-priority branch (priorityValue() falls back to 'P1').
|
|
119
|
-
const p = { id: 'P-001', text: 'Default', createdAt: '2026-01-01T00:00:00.000Z' };
|
|
120
|
-
const context = { domain: 'test', sessionId: 's1', budgetChars: 4000 };
|
|
121
|
-
const result = injector.getRelevantPrinciples([p], context);
|
|
122
|
-
expect(result).toHaveLength(1);
|
|
123
|
-
});
|
|
124
|
-
it('P1 before P2 in priority order', () => {
|
|
125
|
-
const injector = new DefaultPrincipleInjector();
|
|
126
|
-
const p1 = makeP('P1-001', 'P1', { priority: 'P1' });
|
|
127
|
-
const p2 = makeP('P2-001', 'P2', { priority: 'P2' });
|
|
128
|
-
const context = { domain: 'test', sessionId: 's1', budgetChars: 4000 };
|
|
129
|
-
const result = injector.getRelevantPrinciples([p2, p1], context);
|
|
130
|
-
expect(result[0]?.id).toBe('P1-001');
|
|
131
|
-
expect(result[1]?.id).toBe('P2-001');
|
|
132
|
-
});
|
|
133
|
-
it('P0 fills budget first, then P1/P2', () => {
|
|
134
|
-
const injector = new DefaultPrincipleInjector();
|
|
135
|
-
const p0 = makeP('P0-001', 'Critical', { priority: 'P0' });
|
|
136
|
-
const p1a = makeP('P1-001', 'A'.repeat(100), { priority: 'P1' });
|
|
137
|
-
const p1b = makeP('P1-002', 'B'.repeat(100), { priority: 'P1' });
|
|
138
|
-
const context = { domain: 'test', sessionId: 's1', budgetChars: 300 };
|
|
139
|
-
const result = injector.getRelevantPrinciples([p1a, p0, p1b], context);
|
|
140
|
-
expect(result[0]?.id).toBe('P0-001');
|
|
141
|
-
expect(result.length).toBeGreaterThanOrEqual(2);
|
|
142
|
-
});
|
|
143
|
-
it('returns empty when all principles are masked', () => {
|
|
144
|
-
const injector = new DefaultPrincipleInjector();
|
|
145
|
-
const p0 = makeP('P0-001', 'P0', { priority: 'P0' });
|
|
146
|
-
const p1 = makeP('P1-001', 'P1', { priority: 'P1' });
|
|
147
|
-
const context = {
|
|
148
|
-
domain: 'test',
|
|
149
|
-
sessionId: 's1',
|
|
150
|
-
budgetChars: 4000,
|
|
151
|
-
maskedPrincipleIds: new Set(['P0-001', 'P1-001']),
|
|
152
|
-
};
|
|
153
|
-
const result = injector.getRelevantPrinciples([p0, p1], context);
|
|
154
|
-
expect(result).toEqual([]);
|
|
155
|
-
});
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
//# sourceMappingURL=principle-injector.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"principle-injector.test.js","sourceRoot":"","sources":["../src/principle-injector.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,wBAAwB,EAAyB,MAAM,yBAAyB,CAAC;AAS1F,SAAS,KAAK,CACZ,EAAU,EACV,IAAY,EACZ,IAAI,GAA0D,EAAE;IAEhE,OAAO;QACL,EAAE;QACF,IAAI;QACJ,QAAQ,EAAE,IAAI,CA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}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Migration bridge from legacy EvolutionQueueItem to TaskRecord.
|
|
3
|
-
*
|
|
4
|
-
* Legacy shape (from .state/evolution-queue.json):
|
|
5
|
-
* {
|
|
6
|
-
* taskId: string,
|
|
7
|
-
* status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'canceled',
|
|
8
|
-
* taskKind: string,
|
|
9
|
-
* attemptCount: number,
|
|
10
|
-
* maxAttempts: number,
|
|
11
|
-
* inputRef?: string,
|
|
12
|
-
* resultRef?: string,
|
|
13
|
-
* lastError?: string,
|
|
14
|
-
* createdAt: string,
|
|
15
|
-
* updatedAt: string
|
|
16
|
-
* }
|
|
17
|
-
*
|
|
18
|
-
* Target shape: TaskRecord (see task-status.ts)
|
|
19
|
-
*
|
|
20
|
-
* Status mapping:
|
|
21
|
-
* 'pending' → 'pending'
|
|
22
|
-
* 'in_progress' → 'leased' (old runtime had no lease concept, so in_progress = leased)
|
|
23
|
-
* 'completed' → 'succeeded'
|
|
24
|
-
* 'failed' → 'failed'
|
|
25
|
-
* 'canceled' → 'failed' (canceled maps to failed, not a separate status)
|
|
26
|
-
*
|
|
27
|
-
* NOT migrated (D-05: new store starts blank — no migration of existing queue data):
|
|
28
|
-
* This is a BRIDGE for dual-write compatibility, NOT actual data migration.
|
|
29
|
-
* It provides the transformation logic that adapters can use if needed.
|
|
30
|
-
*/
|
|
31
|
-
import type { TaskRecord, PDTaskStatus } from '../task-status.js';
|
|
32
|
-
import type { TaskStore } from './task/task-store.js';
|
|
33
|
-
export interface MigrationResult {
|
|
34
|
-
migrated: number;
|
|
35
|
-
skipped: number;
|
|
36
|
-
errors: string[];
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Migration bridge from legacy EvolutionQueueItem to TaskRecord.
|
|
40
|
-
*
|
|
41
|
-
* Provides the transformation logic that adapters can use to translate
|
|
42
|
-
* between the legacy queue format and the new TaskRecord format.
|
|
43
|
-
*/
|
|
44
|
-
export declare class EvolutionQueueItemMigrator {
|
|
45
|
-
private readonly taskStore;
|
|
46
|
-
constructor(taskStore: TaskStore);
|
|
47
|
-
/**
|
|
48
|
-
* Map legacy EvolutionQueueItem status to PDTaskStatus.
|
|
49
|
-
* Returns null if the status is unrecognized (skip migration).
|
|
50
|
-
*/
|
|
51
|
-
static mapLegacyStatus(legacyStatus: string): PDTaskStatus | null;
|
|
52
|
-
/**
|
|
53
|
-
* Transform a legacy EvolutionQueueItem to TaskRecord fields.
|
|
54
|
-
* Only includes fields that are safe to migrate — lease fields are NOT migrated
|
|
55
|
-
* since the legacy queue had no lease concept.
|
|
56
|
-
*/
|
|
57
|
-
static toTaskRecord(legacyItem: {
|
|
58
|
-
taskId: string;
|
|
59
|
-
taskKind: string;
|
|
60
|
-
status: string;
|
|
61
|
-
attemptCount?: number;
|
|
62
|
-
maxAttempts?: number;
|
|
63
|
-
inputRef?: string;
|
|
64
|
-
resultRef?: string;
|
|
65
|
-
lastError?: string;
|
|
66
|
-
createdAt?: string;
|
|
67
|
-
updatedAt?: string;
|
|
68
|
-
}): Omit<TaskRecord, 'createdAt' | 'updatedAt'> | null;
|
|
69
|
-
/**
|
|
70
|
-
* Migrate a single legacy item (idempotent).
|
|
71
|
-
* If task already exists in store, compares updatedAt and only overwrites if legacy is newer.
|
|
72
|
-
*/
|
|
73
|
-
migrateOne(legacyItem: {
|
|
74
|
-
taskId: string;
|
|
75
|
-
taskKind: string;
|
|
76
|
-
status: string;
|
|
77
|
-
attemptCount?: number;
|
|
78
|
-
maxAttempts?: number;
|
|
79
|
-
inputRef?: string;
|
|
80
|
-
resultRef?: string;
|
|
81
|
-
lastError?: string;
|
|
82
|
-
createdAt?: string;
|
|
83
|
-
updatedAt?: string;
|
|
84
|
-
}): Promise<{
|
|
85
|
-
migrated: boolean;
|
|
86
|
-
reason?: string;
|
|
87
|
-
}>;
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=task-migration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task-migration.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/store/task-migration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;GAKG;AACH,qBAAa,0BAA0B;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAAtC,YAA6B,SAAS,EAAE,SAAS,EAAI;IAErD;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAShE;IAED;;;;OAIG;IACH,MAAM,CAAC,YAAY,CACjB,UAAU,EAAE;QACV,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GACA,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,WAAW,CAAC,GAAG,IAAI,CAcpD;IAED;;;OAGG;IACG,UAAU,CACd,UAAU,EAAE;QACV,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GACA,OAAO,CAAC;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CA6BjD;CACF"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Migration bridge from legacy EvolutionQueueItem to TaskRecord.
|
|
3
|
-
*
|
|
4
|
-
* Provides the transformation logic that adapters can use to translate
|
|
5
|
-
* between the legacy queue format and the new TaskRecord format.
|
|
6
|
-
*/
|
|
7
|
-
export class EvolutionQueueItemMigrator {
|
|
8
|
-
taskStore;
|
|
9
|
-
constructor(taskStore) {
|
|
10
|
-
this.taskStore = taskStore;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Map legacy EvolutionQueueItem status to PDTaskStatus.
|
|
14
|
-
* Returns null if the status is unrecognized (skip migration).
|
|
15
|
-
*/
|
|
16
|
-
static mapLegacyStatus(legacyStatus) {
|
|
17
|
-
const mapping = {
|
|
18
|
-
pending: 'pending',
|
|
19
|
-
in_progress: 'leased',
|
|
20
|
-
completed: 'succeeded',
|
|
21
|
-
failed: 'failed',
|
|
22
|
-
canceled: 'failed',
|
|
23
|
-
};
|
|
24
|
-
return mapping[legacyStatus] ?? null;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Transform a legacy EvolutionQueueItem to TaskRecord fields.
|
|
28
|
-
* Only includes fields that are safe to migrate — lease fields are NOT migrated
|
|
29
|
-
* since the legacy queue had no lease concept.
|
|
30
|
-
*/
|
|
31
|
-
static toTaskRecord(legacyItem) {
|
|
32
|
-
const newStatus = EvolutionQueueItemMigrator.mapLegacyStatus(legacyItem.status);
|
|
33
|
-
if (!newStatus)
|
|
34
|
-
return null;
|
|
35
|
-
return {
|
|
36
|
-
taskId: legacyItem.taskId,
|
|
37
|
-
taskKind: legacyItem.taskKind,
|
|
38
|
-
status: newStatus,
|
|
39
|
-
attemptCount: legacyItem.attemptCount ?? 0,
|
|
40
|
-
maxAttempts: legacyItem.maxAttempts ?? 3,
|
|
41
|
-
inputRef: legacyItem.inputRef,
|
|
42
|
-
resultRef: legacyItem.resultRef,
|
|
43
|
-
lastError: legacyItem.lastError,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Migrate a single legacy item (idempotent).
|
|
48
|
-
* If task already exists in store, compares updatedAt and only overwrites if legacy is newer.
|
|
49
|
-
*/
|
|
50
|
-
async migrateOne(legacyItem) {
|
|
51
|
-
const record = EvolutionQueueItemMigrator.toTaskRecord(legacyItem);
|
|
52
|
-
if (!record) {
|
|
53
|
-
return { migrated: false, reason: 'unknown_status' };
|
|
54
|
-
}
|
|
55
|
-
const existing = await this.taskStore.getTask(record.taskId);
|
|
56
|
-
if (existing) {
|
|
57
|
-
// Idempotent: only overwrite if legacy is newer
|
|
58
|
-
const legacyUpdated = legacyItem.updatedAt ? new Date(legacyItem.updatedAt) : null;
|
|
59
|
-
const existingUpdated = new Date(existing.updatedAt);
|
|
60
|
-
if (legacyUpdated && legacyUpdated <= existingUpdated) {
|
|
61
|
-
return { migrated: false, reason: 'existing_newer' };
|
|
62
|
-
}
|
|
63
|
-
// Update existing record
|
|
64
|
-
await this.taskStore.updateTask(record.taskId, {
|
|
65
|
-
status: record.status,
|
|
66
|
-
attemptCount: record.attemptCount,
|
|
67
|
-
maxAttempts: record.maxAttempts,
|
|
68
|
-
lastError: record.lastError,
|
|
69
|
-
inputRef: record.inputRef,
|
|
70
|
-
resultRef: record.resultRef,
|
|
71
|
-
});
|
|
72
|
-
return { migrated: true, reason: 'updated_existing' };
|
|
73
|
-
}
|
|
74
|
-
// Create new record
|
|
75
|
-
await this.taskStore.createTask(record);
|
|
76
|
-
return { migrated: true, reason: 'created_new' };
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=task-migration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task-migration.js","sourceRoot":"","sources":["../../../src/runtime-v2/store/task-migration.ts"],"names":[],"mappings":"AAuCA;;;;;GAKG;AACH,MAAM,OAAO,0BAA0B;IACR,SAAS;IAAtC,YAA6B,SAAoB;yBAApB,SAAS;IAAc,CAAC;IAErD;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,YAAoB;QACzC,MAAM,OAAO,GAAiC;YAC5C,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,QAAQ;YACrB,SAAS,EAAE,WAAW;YACtB,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,QAAQ;SACnB,CAAC;QACF,OAAO,OAAO,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC;IACvC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,YAAY,CACjB,UAWC;QAED,MAAM,SAAS,GAAG,0BAA0B,CAAC,eAAe,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAChF,IAAI,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC;QAE5B,OAAO;YACL,MAAM,EAAE,UAAU,CAAC,MAAM;YACzB,QAAQ,EAAE,UAAU,CAAC,QAAQ;YAC7B,MAAM,EAAE,SAAS;YACjB,YAAY,EAAE,UAAU,CAAC,YAAY,IAAI,CAAC;YAC1C,WAAW,EAAE,UAAU,CAAC,WAAW,IAAI,CAAC;YACxC,QAAQ,EAAE,UAAU,CAAC,QAAQ;YAC7B,SAAS,EAAE,UAAU,CAAC,SAAS;YAC/B,SAAS,EAAE,UAAU,CAAC,SAAoC;SAC3D,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,UAAU,CACd,UAWC;QAED,MA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AAa,EAAE,CAAC;IACnD,CAAC;CACF"}
|
package/dist/updater.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export interface UpdateCheckResult {
|
|
2
|
-
hasUpdate: boolean;
|
|
3
|
-
currentVersion: string;
|
|
4
|
-
latestVersion?: string;
|
|
5
|
-
error?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function checkForUpdates(currentVersion: string): Promise<UpdateCheckResult>;
|
|
8
|
-
/** Fetch the version description from npm registry. Note: this is the package description, not a full changelog. */
|
|
9
|
-
export declare function fetchVersionDescription(version: string): Promise<string | undefined>;
|
|
10
|
-
interface ComputeDiffResult {
|
|
11
|
-
modified: string[];
|
|
12
|
-
added: string[];
|
|
13
|
-
deleted: string[];
|
|
14
|
-
}
|
|
15
|
-
export declare function computeDiff(currentDir: string, newDir: string): Promise<ComputeDiffResult>;
|
|
16
|
-
export interface ApplyUpdateOptions {
|
|
17
|
-
targetDir: string;
|
|
18
|
-
backupDir?: string;
|
|
19
|
-
mergeStrategy: 'smart' | 'overwrite' | 'keep';
|
|
20
|
-
packages?: string[];
|
|
21
|
-
}
|
|
22
|
-
export interface ApplyUpdateResult {
|
|
23
|
-
success: boolean;
|
|
24
|
-
message: string;
|
|
25
|
-
updatedFiles?: string[];
|
|
26
|
-
backupPath?: string;
|
|
27
|
-
}
|
|
28
|
-
export declare function applyUpdate(options: ApplyUpdateOptions): Promise<ApplyUpdateResult>;
|
|
29
|
-
export interface RollbackUpdateOptions {
|
|
30
|
-
targetDir: string;
|
|
31
|
-
backupDir: string;
|
|
32
|
-
}
|
|
33
|
-
export interface RollbackUpdateResult {
|
|
34
|
-
success: boolean;
|
|
35
|
-
message: string;
|
|
36
|
-
}
|
|
37
|
-
export declare function rollbackUpdate(options: RollbackUpdateOptions): Promise<RollbackUpdateResult>;
|
|
38
|
-
export {};
|
|
39
|
-
//# sourceMappingURL=updater.d.ts.map
|
package/dist/updater.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
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