@askdkc/kiokuko 0.2.0 → 0.2.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/README.ja.md +33 -1
- package/README.ko.md +31 -1
- package/README.md +38 -1
- package/README.zh-CN.md +31 -1
- package/dist/agent-file/render.d.ts +1 -1
- package/dist/agent-file/render.d.ts.map +1 -1
- package/dist/agent-file/render.js +6 -2
- package/dist/agent-file/render.js.map +1 -1
- package/dist/akinator/agent-task.d.ts +1 -1
- package/dist/akinator/agent-task.d.ts.map +1 -1
- package/dist/akinator/agent-task.js +10 -1
- package/dist/akinator/agent-task.js.map +1 -1
- package/dist/akinator/skill-discovery-attempt.d.ts +6 -1
- package/dist/akinator/skill-discovery-attempt.d.ts.map +1 -1
- package/dist/akinator/skill-discovery-attempt.js +100 -23
- package/dist/akinator/skill-discovery-attempt.js.map +1 -1
- package/dist/enno-oduno/advisory-store.d.ts +25 -0
- package/dist/enno-oduno/advisory-store.d.ts.map +1 -0
- package/dist/enno-oduno/advisory-store.js +93 -0
- package/dist/enno-oduno/advisory-store.js.map +1 -0
- package/dist/enno-oduno/advisory.d.ts +16 -0
- package/dist/enno-oduno/advisory.d.ts.map +1 -0
- package/dist/enno-oduno/advisory.js +128 -0
- package/dist/enno-oduno/advisory.js.map +1 -0
- package/dist/enno-oduno/confirmation.d.ts +4 -0
- package/dist/enno-oduno/confirmation.d.ts.map +1 -0
- package/dist/enno-oduno/confirmation.js +124 -0
- package/dist/enno-oduno/confirmation.js.map +1 -0
- package/dist/enno-oduno/directives.d.ts.map +1 -1
- package/dist/enno-oduno/directives.js +30 -4
- package/dist/enno-oduno/directives.js.map +1 -1
- package/dist/enno-oduno/instructions.d.ts +5 -1
- package/dist/enno-oduno/instructions.d.ts.map +1 -1
- package/dist/enno-oduno/instructions.js +7 -1
- package/dist/enno-oduno/instructions.js.map +1 -1
- package/dist/enno-oduno/plan-recovery.d.ts +29 -0
- package/dist/enno-oduno/plan-recovery.d.ts.map +1 -0
- package/dist/enno-oduno/plan-recovery.js +134 -0
- package/dist/enno-oduno/plan-recovery.js.map +1 -0
- package/dist/enno-oduno/schemas.d.ts +53 -0
- package/dist/enno-oduno/schemas.d.ts.map +1 -1
- package/dist/enno-oduno/schemas.js +47 -2
- package/dist/enno-oduno/schemas.js.map +1 -1
- package/dist/enno-oduno/service.d.ts +3 -1
- package/dist/enno-oduno/service.d.ts.map +1 -1
- package/dist/enno-oduno/service.js +250 -33
- package/dist/enno-oduno/service.js.map +1 -1
- package/dist/enno-oduno/store.d.ts +7 -1
- package/dist/enno-oduno/store.d.ts.map +1 -1
- package/dist/enno-oduno/store.js +47 -4
- package/dist/enno-oduno/store.js.map +1 -1
- package/dist/enno-oduno/types.d.ts +166 -0
- package/dist/enno-oduno/types.d.ts.map +1 -1
- package/dist/enno-oduno/types.js +23 -0
- package/dist/enno-oduno/types.js.map +1 -1
- package/dist/ledger/types.d.ts +1 -1
- package/dist/ledger/types.d.ts.map +1 -1
- package/dist/ledger/types.js +1 -1
- package/dist/ledger/types.js.map +1 -1
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +47 -7
- package/dist/mcp/server.js.map +1 -1
- package/dist/setup/render.d.ts.map +1 -1
- package/dist/setup/render.js +5 -1
- package/dist/setup/render.js.map +1 -1
- package/dist/skills/discovery-service.d.ts.map +1 -1
- package/dist/skills/discovery-service.js +5 -2
- package/dist/skills/discovery-service.js.map +1 -1
- package/migrations/015_skill_discovery_attempt_digests.sql +90 -0
- package/migrations/016_enno_advisory_rounds.sql +67 -0
- package/package.json +1 -1
- package/skills/kiokuko-enno-oduno/SKILL.md +33 -1
- package/templates/AGENTS.md +6 -2
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { KiokukoError } from '../errors.js';
|
|
3
|
+
import { findSecretInValue } from '../memory/secrets.js';
|
|
4
|
+
import { canonicalJson } from '../serialization/validate.js';
|
|
5
|
+
export const MAX_CONFIRMATION_JSON_BYTES = 64 * 1024;
|
|
6
|
+
const BASIS_BY_PROVENANCE = {
|
|
7
|
+
explicit_user: 'user',
|
|
8
|
+
repository_evidence: 'repository',
|
|
9
|
+
inferred: 'proposal',
|
|
10
|
+
};
|
|
11
|
+
const EXPERT_AREAS = {
|
|
12
|
+
'code.boundary.v1': 'Input and data boundaries',
|
|
13
|
+
'code.domain.v1': 'Business rules and state transitions',
|
|
14
|
+
'code.effects.v1': 'Database, filesystem, network, and process effects',
|
|
15
|
+
'code.protocol.v1': 'Retries, conflicts, revisions, and compatibility',
|
|
16
|
+
'code.verification.v1': 'Regression prevention and verification design',
|
|
17
|
+
'ui.interaction.v1': 'Interaction states and feedback',
|
|
18
|
+
'ui.async.v1': 'Asynchronous work and recovery',
|
|
19
|
+
'ui.forms.v1': 'Forms and input validation',
|
|
20
|
+
'ui.accessibility.v1': 'Accessibility and navigation',
|
|
21
|
+
'ui.layout.v1': 'Responsive layout',
|
|
22
|
+
'ui.safety.v1': 'UI safety and review',
|
|
23
|
+
};
|
|
24
|
+
function basisFor(provenance, key) {
|
|
25
|
+
return BASIS_BY_PROVENANCE[provenance[key]];
|
|
26
|
+
}
|
|
27
|
+
function displayDirectory(cwd, repositoryRoot) {
|
|
28
|
+
const relative = path.relative(repositoryRoot, cwd);
|
|
29
|
+
if (relative === '')
|
|
30
|
+
return '.';
|
|
31
|
+
if (relative === '..' || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative)) {
|
|
32
|
+
throw new KiokukoError('INTEGRITY_ERROR', 'Stored Enno verifier cwd escapes the repository root');
|
|
33
|
+
}
|
|
34
|
+
return relative;
|
|
35
|
+
}
|
|
36
|
+
function toUserFacingVerifier(verifier, repositoryRoot) {
|
|
37
|
+
return {
|
|
38
|
+
category: verifier.kind,
|
|
39
|
+
executable: verifier.executable,
|
|
40
|
+
arguments: [...verifier.args],
|
|
41
|
+
directory: displayDirectory(verifier.cwd, repositoryRoot),
|
|
42
|
+
timeoutMs: verifier.timeoutMs,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function toUserFacingSkill(entry, basis) {
|
|
46
|
+
return {
|
|
47
|
+
label: entry.name,
|
|
48
|
+
basis,
|
|
49
|
+
required: entry.required,
|
|
50
|
+
purposes: [...entry.purposes],
|
|
51
|
+
referenceOnly: entry.availability === 'external_reference',
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function toUserFacingExpertise(reference, basis) {
|
|
55
|
+
const area = EXPERT_AREAS[reference.id];
|
|
56
|
+
if (area === undefined) {
|
|
57
|
+
throw new KiokukoError('INTEGRITY_ERROR', 'Stored Enno expert selection is outside the registered expert set');
|
|
58
|
+
}
|
|
59
|
+
return { area, basis, reason: reference.reason };
|
|
60
|
+
}
|
|
61
|
+
function workItemNumbers(units) {
|
|
62
|
+
const numbers = new Map();
|
|
63
|
+
units.forEach((unit, index) => {
|
|
64
|
+
numbers.set(unit.id, index + 1);
|
|
65
|
+
});
|
|
66
|
+
return numbers;
|
|
67
|
+
}
|
|
68
|
+
function toUserFacingWorkItem(unit, number, numbers, basis, repositoryRoot) {
|
|
69
|
+
return {
|
|
70
|
+
number,
|
|
71
|
+
summary: unit.objective,
|
|
72
|
+
paths: [...unit.scope],
|
|
73
|
+
dependsOn: unit.dependencies.map((dependency) => {
|
|
74
|
+
const resolved = numbers.get(dependency);
|
|
75
|
+
if (resolved === undefined) {
|
|
76
|
+
throw new KiokukoError('INTEGRITY_ERROR', 'Stored Enno WorkPlan dependency does not resolve to a displayed work item');
|
|
77
|
+
}
|
|
78
|
+
return resolved;
|
|
79
|
+
}),
|
|
80
|
+
doneWhen: [...unit.acceptanceCriteria],
|
|
81
|
+
checks: unit.focusedVerifiers.map((verifier) => toUserFacingVerifier(verifier, repositoryRoot)),
|
|
82
|
+
expertise: unit.expertRefs.map((reference) => toUserFacingExpertise(reference, basis)),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function assertDisplaySafety(confirmation) {
|
|
86
|
+
const secret = findSecretInValue(confirmation);
|
|
87
|
+
if (secret !== undefined) {
|
|
88
|
+
throw new KiokukoError('SECURITY_REJECTION', 'Plan confirmation resembles a secret and was not displayed', { kind: secret.kind });
|
|
89
|
+
}
|
|
90
|
+
if (Buffer.byteLength(canonicalJson(confirmation), 'utf8') > MAX_CONFIRMATION_JSON_BYTES) {
|
|
91
|
+
throw new KiokukoError('VALIDATION_ERROR', 'Plan confirmation exceeds the 64 KiB display limit and must be replanned');
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
export function buildUserFacingConfirmation(snapshot) {
|
|
95
|
+
if (snapshot.status !== 'needs_confirmation')
|
|
96
|
+
return undefined;
|
|
97
|
+
const contract = snapshot.contract;
|
|
98
|
+
const provenance = contract.provenance;
|
|
99
|
+
const workPlanBasis = basisFor(provenance, 'workPlan');
|
|
100
|
+
const skillBasis = basisFor(provenance, 'skillSet');
|
|
101
|
+
const numbers = workItemNumbers(contract.workPlan.units);
|
|
102
|
+
const confirmation = {
|
|
103
|
+
presentationVersion: 1,
|
|
104
|
+
title: 'Plan approval',
|
|
105
|
+
summary: { basis: workPlanBasis, text: contract.workPlan.objective },
|
|
106
|
+
scope: { basis: basisFor(provenance, 'scope'), paths: [...contract.scope] },
|
|
107
|
+
exclusions: { basis: basisFor(provenance, 'exclusions'), paths: [...contract.exclusions] },
|
|
108
|
+
completion: {
|
|
109
|
+
basis: basisFor(provenance, 'acceptanceCriteria'),
|
|
110
|
+
items: contract.acceptanceCriteria.map((criterion) => criterion.description),
|
|
111
|
+
},
|
|
112
|
+
skills: contract.skillSet.entries.map((entry) => toUserFacingSkill(entry, skillBasis)),
|
|
113
|
+
workItems: contract.workPlan.units.map((unit, index) => toUserFacingWorkItem(unit, index + 1, numbers, workPlanBasis, snapshot.repositoryRoot)),
|
|
114
|
+
finalChecks: {
|
|
115
|
+
basis: basisFor(provenance, 'finalVerifiers'),
|
|
116
|
+
checks: contract.finalVerifiers.map((verifier) => toUserFacingVerifier(verifier, snapshot.repositoryRoot)),
|
|
117
|
+
},
|
|
118
|
+
attemptLimit: { basis: basisFor(provenance, 'maxAttempts'), maxAttempts: contract.maxAttempts },
|
|
119
|
+
actions: ['approve', 'revise', 'cancel'],
|
|
120
|
+
};
|
|
121
|
+
assertDisplaySafety(confirmation);
|
|
122
|
+
return confirmation;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=confirmation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmation.js","sourceRoot":"","sources":["../../src/enno-oduno/confirmation.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAiB7D,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,GAAG,IAAI,CAAC;AAErD,MAAM,mBAAmB,GAAG;IAC1B,aAAa,EAAE,MAAM;IACrB,mBAAmB,EAAE,YAAY;IACjC,QAAQ,EAAE,UAAU;CAC4C,CAAC;AAEnE,MAAM,YAAY,GAAG;IACnB,kBAAkB,EAAE,2BAA2B;IAC/C,gBAAgB,EAAE,sCAAsC;IACxD,iBAAiB,EAAE,oDAAoD;IACvE,kBAAkB,EAAE,kDAAkD;IACtE,sBAAsB,EAAE,+CAA+C;IACvE,mBAAmB,EAAE,iCAAiC;IACtD,aAAa,EAAE,gCAAgC;IAC/C,aAAa,EAAE,4BAA4B;IAC3C,qBAAqB,EAAE,8BAA8B;IACrD,cAAc,EAAE,mBAAmB;IACnC,cAAc,EAAE,sBAAsB;CACG,CAAC;AAE5C,SAAS,QAAQ,CAAC,UAAqD,EAAE,GAAsB;IAC7F,OAAO,mBAAmB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9C,CA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-
{"version":3,"file":"directives.d.ts","sourceRoot":"","sources":["../../src/enno-oduno/directives.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"directives.d.ts","sourceRoot":"","sources":["../../src/enno-oduno/directives.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAQ7D,OAAO,KAAK,EACV,cAAc,EAEd,eAAe,EAEf,aAAa,EAKd,MAAM,YAAY,CAAC;AAgIpB,wBAAgB,eAAe,CAAC,QAAQ,EAAE,eAAe,GAAG,aAAa,GAAG,IAAI,CAqG/E;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,cAAc,GAAG,IAAI,CAAC;IAClC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACnC,GAAG,aAAa,CAqBhB;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAIzF"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { KiokukoError } from '../errors.js';
|
|
2
|
+
import { buildUserFacingConfirmation } from './confirmation.js';
|
|
2
3
|
import { STANDARD_ENNO_SKILL_NAME, STANDARD_FUNCTION_SKILL_NAME, STANDARD_SOUL_SKILL_NAME, } from '../setup/standard-skills.js';
|
|
3
4
|
import { orderedUniqueSkillNames } from './skills.js';
|
|
5
|
+
import { advisoryDirectiveForSnapshot } from './advisory.js';
|
|
4
6
|
const REPORT_SCHEMAS = {
|
|
5
7
|
intake: {
|
|
6
8
|
type: 'object',
|
|
@@ -32,11 +34,20 @@ const REPORT_SCHEMAS = {
|
|
|
32
34
|
},
|
|
33
35
|
},
|
|
34
36
|
},
|
|
37
|
+
confirmation: {
|
|
38
|
+
type: 'object',
|
|
39
|
+
required: ['runId', 'expectedRevision', 'idempotencyKey', 'action'],
|
|
40
|
+
properties: {
|
|
41
|
+
action: { enum: ['approve', 'revise', 'cancel'] },
|
|
42
|
+
requestedChanges: { type: 'string' },
|
|
43
|
+
},
|
|
44
|
+
},
|
|
35
45
|
meditation: {
|
|
36
46
|
type: 'object',
|
|
37
47
|
required: ['runId', 'expectedRevision', 'meditation'],
|
|
38
48
|
},
|
|
39
49
|
};
|
|
50
|
+
const CONFIRMATION_OBJECTIVE = `Return every item in userFacingConfirmation to the user in the user's language. Translate headings only; preserve paths, executable names, arguments, limits, and every listed item. Do not expose raw directive JSON, internal field names, WorkUnit IDs, expert IDs, or verifier IDs. Wait for explicit approve, revise, or cancel before calling enno_answer.`;
|
|
40
51
|
const ZENKI_SINGLE_PURPOSE_PLANNING_CONTRACT = `After ${STANDARD_SOUL_SKILL_NAME} routes the work, read the compact ${STANDARD_FUNCTION_SKILL_NAME} index before decomposing the WorkPlan. Shape every code-changing WorkUnit around one cohesive externally observable function or use-case contract with one responsibility and one reason to change. State its success, expected failures, effect profile, and focused runnable test target. Select one to three versioned expertRefs for its actual risks; a UI unit needs at least one code expert and one UI expert. Compose those units without meaningless micro-functions, unrelated responsibilities, or loading every expert fragment by default.`;
|
|
41
52
|
function boundedObjective(value) {
|
|
42
53
|
return value.slice(0, 16_384);
|
|
@@ -99,11 +110,19 @@ function discoveredSkillNames(snapshot) {
|
|
|
99
110
|
function changedPaths(snapshot) {
|
|
100
111
|
return [...new Set(snapshot.workUnits.flatMap((unit) => unit.result?.changedPaths ?? []))];
|
|
101
112
|
}
|
|
113
|
+
function confirmationFor(snapshot) {
|
|
114
|
+
const projection = buildUserFacingConfirmation(snapshot);
|
|
115
|
+
if (projection === undefined) {
|
|
116
|
+
throw new KiokukoError('INTEGRITY_ERROR', 'Needs-confirmation state requires a user-facing confirmation');
|
|
117
|
+
}
|
|
118
|
+
return projection;
|
|
119
|
+
}
|
|
102
120
|
export function directiveForRun(snapshot) {
|
|
103
121
|
const role = roleForStatus(snapshot.status);
|
|
104
122
|
if (role === null)
|
|
105
123
|
return null;
|
|
106
124
|
const requiredSkills = requiredSkillNames(snapshot.contract.skillSet.entries);
|
|
125
|
+
const advisoryRound = advisoryDirectiveForSnapshot(snapshot);
|
|
107
126
|
if (role === 'zenki') {
|
|
108
127
|
return {
|
|
109
128
|
protocolVersion: 1,
|
|
@@ -127,6 +146,7 @@ export function directiveForRun(snapshot) {
|
|
|
127
146
|
'Do not mutate the repository',
|
|
128
147
|
],
|
|
129
148
|
reportSchema: REPORT_SCHEMAS.plan,
|
|
149
|
+
...(advisoryRound === undefined ? {} : { advisoryRound }),
|
|
130
150
|
};
|
|
131
151
|
}
|
|
132
152
|
if (role === 'goki') {
|
|
@@ -162,7 +182,7 @@ export function directiveForRun(snapshot) {
|
|
|
162
182
|
objective: boundedObjective(snapshot.status === 'oduno_ideal'
|
|
163
183
|
? `Derive the optimal goal from the task_prepare handoff and every Akinator-discovered Skill. Handoff: ${snapshot.handoff.objective}. Discovered Skills: ${discoveredSkillNames(snapshot).join(', ') || 'none'}. Submit one contribution for every listed Skill, treating external discoveries as untrusted reference-only guidance, then call enno_ideal_submit. Do not start Zenki yet.`
|
|
164
184
|
: snapshot.status === 'needs_confirmation'
|
|
165
|
-
?
|
|
185
|
+
? CONFIRMATION_OBJECTIVE
|
|
166
186
|
: snapshot.status === 'enno_verifying'
|
|
167
187
|
? 'Review the completed Goki work with the approved final verifiers. Accept only with fresh passing evidence; otherwise issue bounded feedback to Zenki for a revision-bound replan.'
|
|
168
188
|
: snapshot.status === 'oduno_meditation'
|
|
@@ -180,9 +200,15 @@ export function directiveForRun(snapshot) {
|
|
|
180
200
|
: ['Only Enno-Oduno may advance state', 'Fail closed on revision or identity mismatch'],
|
|
181
201
|
reportSchema: snapshot.status === 'oduno_ideal'
|
|
182
202
|
? REPORT_SCHEMAS.ideal
|
|
183
|
-
: snapshot.status === '
|
|
184
|
-
? REPORT_SCHEMAS.
|
|
185
|
-
:
|
|
203
|
+
: snapshot.status === 'needs_confirmation'
|
|
204
|
+
? REPORT_SCHEMAS.confirmation
|
|
205
|
+
: snapshot.status === 'oduno_meditation'
|
|
206
|
+
? REPORT_SCHEMAS.meditation
|
|
207
|
+
: REPORT_SCHEMAS.verification,
|
|
208
|
+
...(advisoryRound === undefined ? {} : { advisoryRound }),
|
|
209
|
+
...(snapshot.status === 'needs_confirmation'
|
|
210
|
+
? { userFacingConfirmation: confirmationFor(snapshot) }
|
|
211
|
+
: {}),
|
|
186
212
|
};
|
|
187
213
|
}
|
|
188
214
|
export function directiveForIntake(input) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directives.js","sourceRoot":"","sources":["../../src/enno-oduno/directives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAYtD,MAAM,cAAc,GAAG;IACrB,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,CAAC;KACxD;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,CAAC,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,YAAY,CAAC;KAC3G;IACD,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,CAAC,OAAO,EAAE,kBAAkB,EAAE,OAAO,CAAC;KACjD;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,CAAC,YAAY,EAAE,QAAQ,CAAC;KACnC;IACD,YAAY,E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,IAAI;QACb,SAAS,EAAE,gBAAgB,CAAC,KAAK,CAAC,QAAQ,KAAK,IAAI;YACjD,CAAC,CAAC,2FAA2F;YAC7F,CAAC,CAAC,yEAAyE,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACrG,cAAc,EAAE,CAAC,wBAAwB,EAAE,wBAAwB,CAAC;QACpE,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACd,0CAA0C;YAC1C,kFAAkF;YAClF,mEAAmE;YACnE,8CAA8C;SAC/C;QACD,YAAY,EAAE,cAAc,CAAC,MAAM;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,QAAyB,EAAE,QAAgB;IACjF,IAAI,QAAQ,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACnC,MAAM,IAAI,YAAY,CAAC,UAAU,EAAE,gCAAgC,CAAC,CAAC;IACvE,CAAC;AACH,CAAC"}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const ENNO_CONFIRMATION_DISPLAY_CONTRACT = "When `ennoOduno.nextAction === 'ask_user_confirmation'`, present every item of `ennoOduno.directive.userFacingConfirmation` to the user in the user's language, translating headings only and preserving paths, executable names, arguments, directories, timeouts, and every listed item, and never output raw directive JSON, internal field names, WorkUnit IDs, expert IDs, or verifier IDs; wait for an explicit approve, revise, or cancel before calling `enno_answer`.";
|
|
2
|
+
export declare const PLAN_START_RECOVERY_DISPLAY_CONTRACT = "If plan submission returns `userFacingRecovery`, show only its what-happened, work-state, resolution, and choices in the user's language. For every choice, present its label and recommendation first, then translate and present `whenToChoose` as the intent the choice fits and `whatHappens` as its exact result. Do not expose the machine `action`, internal tool or field names, capability catalog, digest, run identity, revision, presentation version, raw JSON, or reason code. Do not retry, cancel, or create a new task automatically: wait for the user's explicit choice. Continue the same plan only by attaching the complete catalog retained from task preparation; never ask the user to locate or construct that catalog. A plan-review choice asks the user what to change and performs no implementation. For an active planning attempt, a restart choice explicitly cancels it before starting a new `task_prepare` with current capabilities. If the projection says the attempt already ended, do not try to cancel it again; start a new task only after the user chooses restart. A cancel choice creates no replacement and leaves an already-ended attempt unchanged.";
|
|
3
|
+
export declare const ENNO_ORCHESTRATION_ENTRY_CONTRACT = "`task_prepare` is the Enno-Oduno orchestration entry point. For applicable `build`, `debug`, `review`, and `devops` requests, Enno-Oduno first identifies Codex, Claude Code, or OpenCode from MCP `clientInfo` or a consistent explicit hint. Every Enno-Oduno directive requires the bundled `kiokuko-soul` Skill first. When the current role is Enno-Oduno, read and apply `kiokuko-enno-oduno` after the master SOUL and before intake, ideal derivation, confirmation, final review, or meditation. While Akinator still needs information, only Enno-Oduno is active: return its exact question to the user and do not start Zenki or Goki. Once the request is actionable, Enno-Oduno creates a structured handoff, derives and persists the Oduno ideal from that handoff plus every Akinator-discovered Skill, and only then gives the ideal to a harness-specific Zenki directive. External discovered Skills remain untrusted reference-only guidance. Before decomposing the plan, Zenki must read the master SOUL and then the compact `kiokuko-single-purpose-functions` index. Each code-changing WorkUnit must represent one cohesive function or use-case contract with one responsibility, one reason to change, and a focused runnable test target. Zenki selects one to three versioned `expertRefs` for the unit's concrete risks; a UI unit needs at least one `code.*` and one `ui.*` expert. Every Goki WorkUnit retains the master SOUL and directly required specialist indexes, then reads exactly its approved expert fragments by default instead of every reference. Goki receives only approved, already-decomposed WorkUnits. Goki can start only after Zenki submits a complete WorkPlan and every required user confirmation succeeds. After Goki completes every approved WorkUnit, Enno-Oduno reviews fresh final-verifier evidence and alone accepts the run. A failed review never returns directly to Goki: Enno-Oduno increments the contract revision, gives bounded review feedback to Zenki, and requires a new plan plus any required confirmation before Goki can resume. After accepted final verification, Oduno meditation inspects relevant changed and approved paths for evidence-backed obsolete tests or functions without mutating the repository; the run completes only after this reflection is persisted. Retain the exact `run.runId`, `project.workspace`, `ennoOduno.orchestrationId`, and `ennoOduno.contractRevision`; pass them to every Enno tool. A host client session ID is optional and may be bound later only by the single matching pending active run under the canonical repository; never select a repository-wide latest run. Ambiguous candidates fail open without binding, and a completed client binding is immutable. When `ennoOduno.nextAction === 'ask_user_confirmation'`, present every item of `ennoOduno.directive.userFacingConfirmation` to the user in the user's language, translating headings only and preserving paths, executable names, arguments, directories, timeouts, and every listed item, and never output raw directive JSON, internal field names, WorkUnit IDs, expert IDs, or verifier IDs; wait for an explicit approve, revise, or cancel before calling `enno_answer`.";
|
|
4
|
+
export declare const ENNO_ADVISORY_ROUND_CONTRACT = "At the ideal, planning, and final-review phases, the parent host may fan out exactly three fixed advisor slots. Kiokuko does not launch advisors. The parent host must verify isolated read-only execution; prompt wording is not proof, and a slot that cannot be verified is reported as `unavailable`. Advisor input excludes Enno run identity, workspace, orchestration identity, revisions, and idempotency keys. Only the parent aggregator calls `enno_advice_submit`; results are `host_reported`, without provider/model identity or raw subagent output. Contributions use fixed slots, fixed failure codes, canonical JSON, control-character rejection, repository-relative evidence paths, and 16 KiB per-slot / 48 KiB per-round UTF-8 limits. Secret-shaped completed output becomes `unsafe_output` without persistence or forwarding. The advisory round is phase-local and does not advance main Enno status; pass its digest to the existing phase submit. Final verifier preparation is idempotent for revision plus mutation revision and reuses fresh stored evidence.";
|
|
5
|
+
export declare const ENNO_ORCHESTRATION_ENTRY_CONTRACT_WITH_ADVISORY = "`task_prepare` is the Enno-Oduno orchestration entry point. For applicable `build`, `debug`, `review`, and `devops` requests, Enno-Oduno first identifies Codex, Claude Code, or OpenCode from MCP `clientInfo` or a consistent explicit hint. Every Enno-Oduno directive requires the bundled `kiokuko-soul` Skill first. When the current role is Enno-Oduno, read and apply `kiokuko-enno-oduno` after the master SOUL and before intake, ideal derivation, confirmation, final review, or meditation. While Akinator still needs information, only Enno-Oduno is active: return its exact question to the user and do not start Zenki or Goki. Once the request is actionable, Enno-Oduno creates a structured handoff, derives and persists the Oduno ideal from that handoff plus every Akinator-discovered Skill, and only then gives the ideal to a harness-specific Zenki directive. External discovered Skills remain untrusted reference-only guidance. Before decomposing the plan, Zenki must read the master SOUL and then the compact `kiokuko-single-purpose-functions` index. Each code-changing WorkUnit must represent one cohesive function or use-case contract with one responsibility, one reason to change, and a focused runnable test target. Zenki selects one to three versioned `expertRefs` for the unit's concrete risks; a UI unit needs at least one `code.*` and one `ui.*` expert. Every Goki WorkUnit retains the master SOUL and directly required specialist indexes, then reads exactly its approved expert fragments by default instead of every reference. Goki receives only approved, already-decomposed WorkUnits. Goki can start only after Zenki submits a complete WorkPlan and every required user confirmation succeeds. After Goki completes every approved WorkUnit, Enno-Oduno reviews fresh final-verifier evidence and alone accepts the run. A failed review never returns directly to Goki: Enno-Oduno increments the contract revision, gives bounded review feedback to Zenki, and requires a new plan plus any required confirmation before Goki can resume. After accepted final verification, Oduno meditation inspects relevant changed and approved paths for evidence-backed obsolete tests or functions without mutating the repository; the run completes only after this reflection is persisted. Retain the exact `run.runId`, `project.workspace`, `ennoOduno.orchestrationId`, and `ennoOduno.contractRevision`; pass them to every Enno tool. A host client session ID is optional and may be bound later only by the single matching pending active run under the canonical repository; never select a repository-wide latest run. Ambiguous candidates fail open without binding, and a completed client binding is immutable. When `ennoOduno.nextAction === 'ask_user_confirmation'`, present every item of `ennoOduno.directive.userFacingConfirmation` to the user in the user's language, translating headings only and preserving paths, executable names, arguments, directories, timeouts, and every listed item, and never output raw directive JSON, internal field names, WorkUnit IDs, expert IDs, or verifier IDs; wait for an explicit approve, revise, or cancel before calling `enno_answer`. If plan submission returns `userFacingRecovery`, show only its what-happened, work-state, resolution, and choices in the user's language. For every choice, present its label and recommendation first, then translate and present `whenToChoose` as the intent the choice fits and `whatHappens` as its exact result. Do not expose the machine `action`, internal tool or field names, capability catalog, digest, run identity, revision, presentation version, raw JSON, or reason code. Do not retry, cancel, or create a new task automatically: wait for the user's explicit choice. Continue the same plan only by attaching the complete catalog retained from task preparation; never ask the user to locate or construct that catalog. A plan-review choice asks the user what to change and performs no implementation. For an active planning attempt, a restart choice explicitly cancels it before starting a new `task_prepare` with current capabilities. If the projection says the attempt already ended, do not try to cancel it again; start a new task only after the user chooses restart. A cancel choice creates no replacement and leaves an already-ended attempt unchanged.";
|
|
2
6
|
//# sourceMappingURL=instructions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/enno-oduno/instructions.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iCAAiC,
|
|
1
|
+
{"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/enno-oduno/instructions.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,kCAAkC,mdAAyd,CAAC;AAEzgB,eAAO,MAAM,oCAAoC,4oCAAspC,CAAC;AAExsC,eAAO,MAAM,iCAAiC,2lGAAyuF,CAAC;AAExxF,eAAO,MAAM,4BAA4B,kiCAA0iC,CAAC;AAIplC,eAAO,MAAM,+CAA+C,muIAAiF,CAAC"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import { STANDARD_ENNO_SKILL_NAME, STANDARD_FUNCTION_SKILL_NAME, STANDARD_SOUL_SKILL_NAME, } from '../setup/standard-skills.js';
|
|
2
|
-
export const
|
|
2
|
+
export const ENNO_CONFIRMATION_DISPLAY_CONTRACT = `When \`ennoOduno.nextAction === 'ask_user_confirmation'\`, present every item of \`ennoOduno.directive.userFacingConfirmation\` to the user in the user's language, translating headings only and preserving paths, executable names, arguments, directories, timeouts, and every listed item, and never output raw directive JSON, internal field names, WorkUnit IDs, expert IDs, or verifier IDs; wait for an explicit approve, revise, or cancel before calling \`enno_answer\`.`;
|
|
3
|
+
export const PLAN_START_RECOVERY_DISPLAY_CONTRACT = `If plan submission returns \`userFacingRecovery\`, show only its what-happened, work-state, resolution, and choices in the user's language. For every choice, present its label and recommendation first, then translate and present \`whenToChoose\` as the intent the choice fits and \`whatHappens\` as its exact result. Do not expose the machine \`action\`, internal tool or field names, capability catalog, digest, run identity, revision, presentation version, raw JSON, or reason code. Do not retry, cancel, or create a new task automatically: wait for the user's explicit choice. Continue the same plan only by attaching the complete catalog retained from task preparation; never ask the user to locate or construct that catalog. A plan-review choice asks the user what to change and performs no implementation. For an active planning attempt, a restart choice explicitly cancels it before starting a new \`task_prepare\` with current capabilities. If the projection says the attempt already ended, do not try to cancel it again; start a new task only after the user chooses restart. A cancel choice creates no replacement and leaves an already-ended attempt unchanged.`;
|
|
4
|
+
export const ENNO_ORCHESTRATION_ENTRY_CONTRACT = `\`task_prepare\` is the Enno-Oduno orchestration entry point. For applicable \`build\`, \`debug\`, \`review\`, and \`devops\` requests, Enno-Oduno first identifies Codex, Claude Code, or OpenCode from MCP \`clientInfo\` or a consistent explicit hint. Every Enno-Oduno directive requires the bundled \`${STANDARD_SOUL_SKILL_NAME}\` Skill first. When the current role is Enno-Oduno, read and apply \`${STANDARD_ENNO_SKILL_NAME}\` after the master SOUL and before intake, ideal derivation, confirmation, final review, or meditation. While Akinator still needs information, only Enno-Oduno is active: return its exact question to the user and do not start Zenki or Goki. Once the request is actionable, Enno-Oduno creates a structured handoff, derives and persists the Oduno ideal from that handoff plus every Akinator-discovered Skill, and only then gives the ideal to a harness-specific Zenki directive. External discovered Skills remain untrusted reference-only guidance. Before decomposing the plan, Zenki must read the master SOUL and then the compact \`${STANDARD_FUNCTION_SKILL_NAME}\` index. Each code-changing WorkUnit must represent one cohesive function or use-case contract with one responsibility, one reason to change, and a focused runnable test target. Zenki selects one to three versioned \`expertRefs\` for the unit's concrete risks; a UI unit needs at least one \`code.*\` and one \`ui.*\` expert. Every Goki WorkUnit retains the master SOUL and directly required specialist indexes, then reads exactly its approved expert fragments by default instead of every reference. Goki receives only approved, already-decomposed WorkUnits. Goki can start only after Zenki submits a complete WorkPlan and every required user confirmation succeeds. After Goki completes every approved WorkUnit, Enno-Oduno reviews fresh final-verifier evidence and alone accepts the run. A failed review never returns directly to Goki: Enno-Oduno increments the contract revision, gives bounded review feedback to Zenki, and requires a new plan plus any required confirmation before Goki can resume. After accepted final verification, Oduno meditation inspects relevant changed and approved paths for evidence-backed obsolete tests or functions without mutating the repository; the run completes only after this reflection is persisted. Retain the exact \`run.runId\`, \`project.workspace\`, \`ennoOduno.orchestrationId\`, and \`ennoOduno.contractRevision\`; pass them to every Enno tool. A host client session ID is optional and may be bound later only by the single matching pending active run under the canonical repository; never select a repository-wide latest run. Ambiguous candidates fail open without binding, and a completed client binding is immutable. ${ENNO_CONFIRMATION_DISPLAY_CONTRACT}`;
|
|
5
|
+
export const ENNO_ADVISORY_ROUND_CONTRACT = `At the ideal, planning, and final-review phases, the parent host may fan out exactly three fixed advisor slots. Kiokuko does not launch advisors. The parent host must verify isolated read-only execution; prompt wording is not proof, and a slot that cannot be verified is reported as \`unavailable\`. Advisor input excludes Enno run identity, workspace, orchestration identity, revisions, and idempotency keys. Only the parent aggregator calls \`enno_advice_submit\`; results are \`host_reported\`, without provider/model identity or raw subagent output. Contributions use fixed slots, fixed failure codes, canonical JSON, control-character rejection, repository-relative evidence paths, and 16 KiB per-slot / 48 KiB per-round UTF-8 limits. Secret-shaped completed output becomes \`unsafe_output\` without persistence or forwarding. The advisory round is phase-local and does not advance main Enno status; pass its digest to the existing phase submit. Final verifier preparation is idempotent for revision plus mutation revision and reuses fresh stored evidence.`;
|
|
6
|
+
// Managed agent/setup templates carry the advisory architecture separately.
|
|
7
|
+
// This composed contract adds the user-owned plan-start recovery interaction.
|
|
8
|
+
export const ENNO_ORCHESTRATION_ENTRY_CONTRACT_WITH_ADVISORY = `${ENNO_ORCHESTRATION_ENTRY_CONTRACT} ${PLAN_START_RECOVERY_DISPLAY_CONTRACT}`;
|
|
3
9
|
//# sourceMappingURL=instructions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../src/enno-oduno/instructions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AAErC,MAAM,CAAC,MAAM,iCAAiC,GAAG,gTAAgT,wBAAwB,yEAAyE,wBAAwB,ynBAAynB,4BAA4B,
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../src/enno-oduno/instructions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AAErC,MAAM,CAAC,MAAM,kCAAkC,GAAG,sdAAsd,CAAC;AAEzgB,MAAM,CAAC,MAAM,oCAAoC,GAAG,mpCAAmpC,CAAC;AAExsC,MAAM,CAAC,MAAM,iCAAiC,GAAG,gTAAgT,wBAAwB,yEAAyE,wBAAwB,ynBAAynB,4BAA4B,ooDAAooD,kCAAkC,EAAE,CAAC;AAExxF,MAAM,CAAC,MAAM,4BAA4B,GAAG,uiCAAuiC,CAAC;AAEplC,4EAA4E;AAC5E,8EAA8E;AAC9E,MAAM,CAAC,MAAM,+CAA+C,GAAG,GAAG,iCAAiC,IAAI,oCAAoC,EAAE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { KiokukoError } from '../errors.js';
|
|
2
|
+
export declare const PLAN_START_RECOVERY_CODE: "PLAN_START_RECOVERY_REQUIRED";
|
|
3
|
+
export declare const PLAN_START_RECOVERY_DETAIL_KEY: "planStartRecoveryReason";
|
|
4
|
+
export declare const PLAN_START_RECOVERY_REASONS: readonly ["environment_information_missing", "environment_changed", "previous_attempt_ended"];
|
|
5
|
+
export type PlanStartRecoveryReason = (typeof PLAN_START_RECOVERY_REASONS)[number];
|
|
6
|
+
export type PlanStartRecoveryAction = 'continue_same_plan' | 'revise_plan' | 'restart_same_plan' | 'revise_then_restart' | 'cancel';
|
|
7
|
+
export interface UserFacingPlanRecoveryOption {
|
|
8
|
+
action: PlanStartRecoveryAction;
|
|
9
|
+
label: string;
|
|
10
|
+
recommended: boolean;
|
|
11
|
+
whenToChoose: string;
|
|
12
|
+
whatHappens: string;
|
|
13
|
+
}
|
|
14
|
+
export interface UserFacingPlanRecovery {
|
|
15
|
+
presentationVersion: 1;
|
|
16
|
+
whatHappened: string;
|
|
17
|
+
workState: string;
|
|
18
|
+
resolution: string;
|
|
19
|
+
options: UserFacingPlanRecoveryOption[];
|
|
20
|
+
}
|
|
21
|
+
export interface PlanStartRecovery {
|
|
22
|
+
code: typeof PLAN_START_RECOVERY_CODE;
|
|
23
|
+
reason: PlanStartRecoveryReason;
|
|
24
|
+
userFacingRecovery: UserFacingPlanRecovery;
|
|
25
|
+
}
|
|
26
|
+
export declare function buildPlanStartRecovery(reason: PlanStartRecoveryReason): PlanStartRecovery;
|
|
27
|
+
export declare function planStartRecoveryError(reason: PlanStartRecoveryReason): KiokukoError;
|
|
28
|
+
export declare function renderPlanStartRecovery(recovery: PlanStartRecovery): string;
|
|
29
|
+
//# sourceMappingURL=plan-recovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-recovery.d.ts","sourceRoot":"","sources":["../../src/enno-oduno/plan-recovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,eAAO,MAAM,wBAAwB,EAAG,8BAAuC,CAAC;AAChF,eAAO,MAAM,8BAA8B,EAAG,yBAAkC,CAAC;AACjF,eAAO,MAAM,2BAA2B,+FAI9B,CAAC;AAEX,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnF,MAAM,MAAM,uBAAuB,GAC/B,oBAAoB,GACpB,aAAa,GACb,mBAAmB,GACnB,qBAAqB,GACrB,QAAQ,CAAC;AAEb,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,uBAAuB,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,mBAAmB,EAAE,CAAC,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,4BAA4B,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,wBAAwB,CAAC;IACtC,MAAM,EAAE,uBAAuB,CAAC;IAChC,kBAAkB,EAAE,sBAAsB,CAAC;CAC5C;AAID,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,uBAAuB,GAAG,iBAAiB,CAwGzF;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,uBAAuB,GAAG,YAAY,CAIpF;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM,CAa3E"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { KiokukoError } from '../errors.js';
|
|
2
|
+
export const PLAN_START_RECOVERY_CODE = 'PLAN_START_RECOVERY_REQUIRED';
|
|
3
|
+
export const PLAN_START_RECOVERY_DETAIL_KEY = 'planStartRecoveryReason';
|
|
4
|
+
export const PLAN_START_RECOVERY_REASONS = [
|
|
5
|
+
'environment_information_missing',
|
|
6
|
+
'environment_changed',
|
|
7
|
+
'previous_attempt_ended',
|
|
8
|
+
];
|
|
9
|
+
const NO_NEW_WORK = 'Starting this plan did not begin new work or make additional code changes.';
|
|
10
|
+
export function buildPlanStartRecovery(reason) {
|
|
11
|
+
if (reason === 'environment_information_missing') {
|
|
12
|
+
return {
|
|
13
|
+
code: PLAN_START_RECOVERY_CODE,
|
|
14
|
+
reason,
|
|
15
|
+
userFacingRecovery: {
|
|
16
|
+
presentationVersion: 1,
|
|
17
|
+
whatHappened: 'Information about the features available in this environment was not carried into the plan.',
|
|
18
|
+
workState: NO_NEW_WORK,
|
|
19
|
+
resolution: 'Attach the current environment information to continue with the same plan.',
|
|
20
|
+
options: [
|
|
21
|
+
{
|
|
22
|
+
action: 'continue_same_plan',
|
|
23
|
+
label: 'Continue with the same plan',
|
|
24
|
+
recommended: true,
|
|
25
|
+
whenToChoose: 'The plan is still correct and only the current environment information needs to be attached.',
|
|
26
|
+
whatHappens: 'The current environment information is attached automatically, and the same attempt continues.',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
action: 'revise_plan',
|
|
30
|
+
label: 'Review the plan',
|
|
31
|
+
recommended: false,
|
|
32
|
+
whenToChoose: 'You want to change the scope, work items, or verification before continuing.',
|
|
33
|
+
whatHappens: 'You are asked what to change, and implementation does not start until you answer.',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
action: 'cancel',
|
|
37
|
+
label: 'Cancel',
|
|
38
|
+
recommended: false,
|
|
39
|
+
whenToChoose: 'You no longer want this work to continue.',
|
|
40
|
+
whatHappens: 'The current attempt is cancelled, and no replacement attempt is created.',
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
if (reason === 'previous_attempt_ended') {
|
|
47
|
+
return {
|
|
48
|
+
code: PLAN_START_RECOVERY_CODE,
|
|
49
|
+
reason,
|
|
50
|
+
userFacingRecovery: {
|
|
51
|
+
presentationVersion: 1,
|
|
52
|
+
whatHappened: 'Required environment information was not included when this plan was submitted, so this attempt has ended.',
|
|
53
|
+
workState: NO_NEW_WORK,
|
|
54
|
+
resolution: 'The plan itself can be used to start a new attempt with the current environment.',
|
|
55
|
+
options: [
|
|
56
|
+
{
|
|
57
|
+
action: 'restart_same_plan',
|
|
58
|
+
label: 'Restart with the same plan',
|
|
59
|
+
recommended: true,
|
|
60
|
+
whenToChoose: 'The ended attempt\'s plan is still correct and should be reused.',
|
|
61
|
+
whatHappens: 'The ended attempt stays unchanged, and a new attempt starts with the current environment and the same agreed plan.',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
action: 'revise_then_restart',
|
|
65
|
+
label: 'Review the plan before restarting',
|
|
66
|
+
recommended: false,
|
|
67
|
+
whenToChoose: 'You want to change the scope, work items, or verification before creating a replacement.',
|
|
68
|
+
whatHappens: 'You are asked what to change; the ended attempt stays unchanged, and a new attempt starts with the current environment and revised plan only after you answer.',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
action: 'cancel',
|
|
72
|
+
label: 'Cancel',
|
|
73
|
+
recommended: false,
|
|
74
|
+
whenToChoose: 'You do not want to restart the work.',
|
|
75
|
+
whatHappens: 'The ended attempt remains ended, and no new attempt is created.',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
code: PLAN_START_RECOVERY_CODE,
|
|
83
|
+
reason,
|
|
84
|
+
userFacingRecovery: {
|
|
85
|
+
presentationVersion: 1,
|
|
86
|
+
whatHappened: 'The features available in this environment have changed since this plan was created.',
|
|
87
|
+
workState: NO_NEW_WORK,
|
|
88
|
+
resolution: 'Start a new attempt using the current environment.',
|
|
89
|
+
options: [
|
|
90
|
+
{
|
|
91
|
+
action: 'restart_same_plan',
|
|
92
|
+
label: 'Restart the same plan in the current environment',
|
|
93
|
+
recommended: true,
|
|
94
|
+
whenToChoose: 'The plan is still correct and only the available features have changed.',
|
|
95
|
+
whatHappens: 'The current attempt is cancelled, and a new attempt starts with the current environment and the same agreed plan.',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
action: 'revise_then_restart',
|
|
99
|
+
label: 'Review the plan before restarting',
|
|
100
|
+
recommended: false,
|
|
101
|
+
whenToChoose: 'The changed features should alter the scope, work items, or verification.',
|
|
102
|
+
whatHappens: 'You are asked what to change; after you answer, the current attempt is cancelled and a new attempt starts with the current environment and revised plan.',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
action: 'cancel',
|
|
106
|
+
label: 'Cancel',
|
|
107
|
+
recommended: false,
|
|
108
|
+
whenToChoose: 'You no longer want this work to continue.',
|
|
109
|
+
whatHappens: 'The current attempt is cancelled, and no replacement attempt is created.',
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
export function planStartRecoveryError(reason) {
|
|
116
|
+
return new KiokukoError('CONFLICT', 'Plan start requires an explicit recovery choice', {
|
|
117
|
+
[PLAN_START_RECOVERY_DETAIL_KEY]: reason,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
export function renderPlanStartRecovery(recovery) {
|
|
121
|
+
const projection = recovery.userFacingRecovery;
|
|
122
|
+
return [
|
|
123
|
+
projection.whatHappened,
|
|
124
|
+
projection.workState,
|
|
125
|
+
projection.resolution,
|
|
126
|
+
'',
|
|
127
|
+
...projection.options.flatMap((option, index) => [
|
|
128
|
+
`${index + 1}. ${option.label}${option.recommended ? ' (Recommended)' : ''}`,
|
|
129
|
+
` Choose this when: ${option.whenToChoose}`,
|
|
130
|
+
` What happens: ${option.whatHappens}`,
|
|
131
|
+
]),
|
|
132
|
+
].join('\n');
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=plan-recovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-recovery.js","sourceRoot":"","sources":["../../src/enno-oduno/plan-recovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,CAAC,MAAM,wBAAwB,GAAG,8BAAuC,CAAC;AAChF,MAAM,CAAC,MAAM,8BAA8B,GAAG,yBAAkC,CAAC;AACjF,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,iCAAiC;IACjC,qBAAqB;IACrB,wBAAwB;CAChB,CAAC;AAiCX,MAAM,WAAW,GAAG,4EAA4E,CAAC;AAEjG,MAAM,UAAU,sBAAsB,CAAC,MAA+B;IACpE,IAAI,MAAM,KAAK,iCAAiC,EAAE,CAAC;QACjD,OAAO;YACL,IAAI,EAAE,wBAAwB;YAC9B,MAAM;YACN,kBAAkB,EAAE;gBAClB,mBAAmB,EAAE,CAA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AAG,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,EAAE;YAC5E,wBAAwB,MAAM,CAAC,YAAY,EAAE;YAC7C,oBAAoB,MAAM,CAAC,WAAW,EAAE;SACzC,CAAC;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -125,6 +125,55 @@ export declare const skillRequirementSchema: z.ZodObject<{
|
|
|
125
125
|
}>>;
|
|
126
126
|
required: z.ZodBoolean;
|
|
127
127
|
}, z.core.$strict>;
|
|
128
|
+
export declare const adviceSubmissionSchema: z.ZodObject<{
|
|
129
|
+
runId: z.ZodString;
|
|
130
|
+
workspace: z.ZodString;
|
|
131
|
+
orchestrationId: z.ZodString;
|
|
132
|
+
expectedRevision: z.ZodNumber;
|
|
133
|
+
mutationRevision: z.ZodNumber;
|
|
134
|
+
idempotencyKey: z.ZodString;
|
|
135
|
+
phase: z.ZodEnum<{
|
|
136
|
+
ideal: "ideal";
|
|
137
|
+
planning: "planning";
|
|
138
|
+
final_review: "final_review";
|
|
139
|
+
}>;
|
|
140
|
+
allowlistedContext: z.ZodObject<{
|
|
141
|
+
objective: z.ZodString;
|
|
142
|
+
scope: z.ZodArray<z.ZodString>;
|
|
143
|
+
constraints: z.ZodArray<z.ZodString>;
|
|
144
|
+
acceptanceCriteria: z.ZodArray<z.ZodString>;
|
|
145
|
+
reference: z.ZodString;
|
|
146
|
+
}, z.core.$strict>;
|
|
147
|
+
contributions: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
148
|
+
slotId: z.ZodEnum<{
|
|
149
|
+
[x: string]: string;
|
|
150
|
+
}>;
|
|
151
|
+
outcome: z.ZodLiteral<"completed">;
|
|
152
|
+
summary: z.ZodString;
|
|
153
|
+
recommendations: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
154
|
+
risks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
155
|
+
evidence: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
156
|
+
path: z.ZodString;
|
|
157
|
+
statement: z.ZodString;
|
|
158
|
+
}, z.core.$strict>>>;
|
|
159
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
160
|
+
slotId: z.ZodEnum<{
|
|
161
|
+
[x: string]: string;
|
|
162
|
+
}>;
|
|
163
|
+
outcome: z.ZodEnum<{
|
|
164
|
+
timeout: "timeout";
|
|
165
|
+
unavailable: "unavailable";
|
|
166
|
+
failed: "failed";
|
|
167
|
+
}>;
|
|
168
|
+
reasonCode: z.ZodEnum<{
|
|
169
|
+
unsafe_output: "unsafe_output";
|
|
170
|
+
host_read_only_unavailable: "host_read_only_unavailable";
|
|
171
|
+
host_execution_failed: "host_execution_failed";
|
|
172
|
+
host_timeout: "host_timeout";
|
|
173
|
+
invalid_response: "invalid_response";
|
|
174
|
+
}>;
|
|
175
|
+
}, z.core.$strict>]>>;
|
|
176
|
+
}, z.core.$strict>;
|
|
128
177
|
export declare const ennoContractSchema: z.ZodObject<{
|
|
129
178
|
revision: z.ZodNumber;
|
|
130
179
|
scope: z.ZodArray<z.ZodString>;
|
|
@@ -402,6 +451,7 @@ export declare const idealSubmissionSchema: z.ZodObject<{
|
|
|
402
451
|
orchestrationId: z.ZodString;
|
|
403
452
|
expectedRevision: z.ZodNumber;
|
|
404
453
|
idempotencyKey: z.ZodString;
|
|
454
|
+
advisoryRoundDigest: z.ZodOptional<z.ZodString>;
|
|
405
455
|
ideal: z.ZodObject<{
|
|
406
456
|
objective: z.ZodString;
|
|
407
457
|
principles: z.ZodArray<z.ZodString>;
|
|
@@ -418,6 +468,7 @@ export declare const planSubmissionSchema: z.ZodObject<{
|
|
|
418
468
|
orchestrationId: z.ZodString;
|
|
419
469
|
expectedRevision: z.ZodNumber;
|
|
420
470
|
idempotencyKey: z.ZodString;
|
|
471
|
+
advisoryRoundDigest: z.ZodOptional<z.ZodString>;
|
|
421
472
|
scope: z.ZodArray<z.ZodString>;
|
|
422
473
|
exclusions: z.ZodArray<z.ZodString>;
|
|
423
474
|
acceptanceCriteria: z.ZodArray<z.ZodObject<{
|
|
@@ -568,6 +619,7 @@ export declare const finishSchema: z.ZodObject<{
|
|
|
568
619
|
orchestrationId: z.ZodString;
|
|
569
620
|
expectedRevision: z.ZodNumber;
|
|
570
621
|
idempotencyKey: z.ZodString;
|
|
622
|
+
advisoryRoundDigest: z.ZodOptional<z.ZodString>;
|
|
571
623
|
review: z.ZodObject<{
|
|
572
624
|
decision: z.ZodEnum<{
|
|
573
625
|
accept: "accept";
|
|
@@ -605,6 +657,7 @@ export declare function parseOdunoMeditation(input: unknown): OdunoMeditation;
|
|
|
605
657
|
export declare function parseVerifierSpec(input: unknown): VerifierSpec;
|
|
606
658
|
export declare function parseWorkReportResult(input: unknown): WorkReportResult;
|
|
607
659
|
export declare function parsePlanSubmission(input: unknown): z.infer<typeof planSubmissionSchema>;
|
|
660
|
+
export declare function parseAdviceSubmission(input: unknown): z.infer<typeof adviceSubmissionSchema>;
|
|
608
661
|
export declare function parseIdealSubmission(input: unknown): z.infer<typeof idealSubmissionSchema>;
|
|
609
662
|
export declare function parseEnnoAnswer(input: unknown): z.infer<typeof ennoAnswerSchema>;
|
|
610
663
|
export declare function parseWorkReport(input: unknown): z.infer<typeof workReportSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/enno-oduno/schemas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAS5B,OAAO,
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/enno-oduno/schemas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAS5B,OAAO,EAQL,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,gBAA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