jeopi-cli 16.2.22 → 16.2.24
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/CHANGELOG.md +31 -0
- package/dist/cli.js +2565 -2524
- package/dist/types/advisor/runtime.d.ts +9 -1
- package/dist/types/cli/update-cli.d.ts +37 -0
- package/dist/types/config/settings-schema.d.ts +12 -1
- package/dist/types/extensibility/plugins/loader.d.ts +4 -4
- package/dist/types/extensibility/plugins/trust.d.ts +30 -0
- package/dist/types/goals/completion-evidence.d.ts +21 -0
- package/dist/types/goals/runtime.d.ts +1 -1
- package/dist/types/goals/state.d.ts +3 -0
- package/dist/types/goals/tools/goal-tool.d.ts +2 -0
- package/dist/types/main.d.ts +20 -0
- package/dist/types/mnemopi/state.d.ts +1 -0
- package/dist/types/session/agent-session.d.ts +3 -1
- package/dist/types/task/critic-gate.d.ts +34 -0
- package/dist/types/tools/builtin-names.d.ts +1 -1
- package/dist/types/tools/index.d.ts +6 -1
- package/dist/types/tools/subagent.d.ts +70 -0
- package/dist/types/tools/subagent.test.d.ts +1 -0
- package/package.json +12 -12
- package/src/advisor/__tests__/advisor.test.ts +173 -0
- package/src/advisor/runtime.ts +66 -2
- package/src/cli/update-cli.ts +144 -0
- package/src/config/settings-schema.ts +14 -2
- package/src/extensibility/plugins/loader.ts +35 -9
- package/src/extensibility/plugins/trust.ts +133 -0
- package/src/goals/completion-evidence.ts +73 -0
- package/src/goals/runtime.ts +6 -1
- package/src/goals/state.ts +3 -0
- package/src/goals/tools/goal-tool.ts +16 -1
- package/src/internal-urls/docs-index.generated.txt +2 -2
- package/src/main.ts +56 -10
- package/src/memories/index.ts +21 -1
- package/src/mnemopi/state.ts +10 -2
- package/src/modes/interactive-mode.ts +21 -0
- package/src/prompts/memories/read-path.md +3 -1
- package/src/prompts/system/safety-kernel.md +17 -0
- package/src/prompts/system/tool-call-cycle-redirect.md +5 -0
- package/src/prompts/tools/goal.md +1 -1
- package/src/prompts/tools/subagent.md +29 -0
- package/src/session/agent-session.ts +68 -19
- package/src/slash-commands/builtin-registry.ts +18 -0
- package/src/system-prompt.ts +14 -2
- package/src/task/critic-gate.ts +46 -0
- package/src/task/index.ts +63 -2
- package/src/tools/builtin-names.ts +1 -0
- package/src/tools/index.ts +9 -1
- package/src/tools/subagent.test.ts +285 -0
- package/src/tools/subagent.ts +582 -0
|
@@ -11,6 +11,7 @@ import type { ToolSession } from "../../tools";
|
|
|
11
11
|
import { formatErrorDetail, TRUNCATE_LENGTHS } from "../../tools/render-utils";
|
|
12
12
|
import { ToolError } from "../../tools/tool-errors";
|
|
13
13
|
import { framedBlock, renderStatusLine, truncateToWidth } from "../../tui";
|
|
14
|
+
import { assertSubstantiveCompletionEvidence } from "../completion-evidence";
|
|
14
15
|
import { completionBudgetReport, remainingTokens } from "../runtime";
|
|
15
16
|
import type { Goal, GoalStatus, GoalToolDetails } from "../state";
|
|
16
17
|
|
|
@@ -18,6 +19,9 @@ const goalSchema = type({
|
|
|
18
19
|
op: type("'create' | 'get' | 'complete' | 'resume' | 'drop'").describe("goal operation"),
|
|
19
20
|
"objective?": type("string").describe("goal objective"),
|
|
20
21
|
"token_budget?": type("number.integer").describe("token budget"),
|
|
22
|
+
"evidence?": type("string").describe(
|
|
23
|
+
"required when op=complete: what you verified and how (tests run, output inspected, files diffed, etc.)",
|
|
24
|
+
),
|
|
21
25
|
});
|
|
22
26
|
|
|
23
27
|
export type GoalToolInput = typeof goalSchema.infer;
|
|
@@ -55,6 +59,14 @@ function validateCreateParams(params: GoalToolInput): { objective: string; token
|
|
|
55
59
|
return { objective, tokenBudget };
|
|
56
60
|
}
|
|
57
61
|
|
|
62
|
+
function validateCompleteParams(params: GoalToolInput): string {
|
|
63
|
+
try {
|
|
64
|
+
return assertSubstantiveCompletionEvidence(params.evidence);
|
|
65
|
+
} catch (err) {
|
|
66
|
+
throw new ToolError(err instanceof Error ? err.message : String(err));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
58
70
|
export class GoalTool implements AgentTool<typeof goalSchema, GoalToolDetails> {
|
|
59
71
|
readonly name = "goal";
|
|
60
72
|
readonly label = "Goal";
|
|
@@ -94,7 +106,7 @@ export class GoalTool implements AgentTool<typeof goalSchema, GoalToolDetails> {
|
|
|
94
106
|
const dropped = await runtime.dropGoal();
|
|
95
107
|
response = buildGoalToolResponse(dropped ?? null);
|
|
96
108
|
} else {
|
|
97
|
-
const completed = await runtime.completeGoalFromTool();
|
|
109
|
+
const completed = await runtime.completeGoalFromTool(validateCompleteParams(params));
|
|
98
110
|
response = buildGoalToolResponse(completed, { includeCompletionReport: true });
|
|
99
111
|
}
|
|
100
112
|
let text: string;
|
|
@@ -106,6 +118,9 @@ export class GoalTool implements AgentTool<typeof goalSchema, GoalToolDetails> {
|
|
|
106
118
|
if (response.remainingTokens !== null) {
|
|
107
119
|
text += `\nRemaining tokens: ${response.remainingTokens}`;
|
|
108
120
|
}
|
|
121
|
+
if (response.goal.completionEvidence) {
|
|
122
|
+
text += `\nEvidence: ${response.goal.completionEvidence}`;
|
|
123
|
+
}
|
|
109
124
|
if (response.completionBudgetReport) {
|
|
110
125
|
text += `\n\n${response.completionBudgetReport}`;
|
|
111
126
|
}
|