ikie-cli 0.1.38 → 0.1.40
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/dist/agent.d.ts +9 -11
- package/dist/agent.js +138 -181
- package/dist/index.js +2 -1
- package/dist/repl.js +67 -9
- package/dist/session-manager.d.ts +29 -0
- package/dist/session-manager.js +145 -0
- package/dist/theme.d.ts +4 -1
- package/dist/theme.js +38 -6
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +249 -68
- package/package.json +2 -2
package/dist/agent.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export declare function shouldContinue(toolCallCount: number, _finishReason: str
|
|
|
51
51
|
*/
|
|
52
52
|
export declare function normalizeToolCalls<T extends {
|
|
53
53
|
name: string;
|
|
54
|
+
argsStr?: string;
|
|
54
55
|
}>(calls: T[]): T[];
|
|
55
56
|
/**
|
|
56
57
|
* Safely restore previously-saved stdin listeners after a raw-mode interaction
|
|
@@ -71,14 +72,17 @@ export declare class Agent {
|
|
|
71
72
|
private systemPrompt;
|
|
72
73
|
private sessionAllowList;
|
|
73
74
|
private sessionDenyList;
|
|
74
|
-
private depth;
|
|
75
75
|
private indent;
|
|
76
76
|
private activeTurnStats;
|
|
77
77
|
private activeChangedFiles;
|
|
78
78
|
private lastTurnStats;
|
|
79
79
|
private mode;
|
|
80
|
-
|
|
80
|
+
private planSteps;
|
|
81
|
+
private planStepIndex;
|
|
82
|
+
constructor(client: OpenAI, config: IkieConfig, systemPrompt: string);
|
|
83
|
+
write(text: string): void;
|
|
81
84
|
clearConversation(): void;
|
|
85
|
+
updateApiKey(key: string): void;
|
|
82
86
|
getConversation(): ChatCompletionMessageParam[];
|
|
83
87
|
setConversation(messages: ChatCompletionMessageParam[]): void;
|
|
84
88
|
getLastTurnStats(): AgentTurnStats;
|
|
@@ -89,6 +93,8 @@ export declare class Agent {
|
|
|
89
93
|
}>;
|
|
90
94
|
getMode(): AgentMode;
|
|
91
95
|
setMode(mode: AgentMode): void;
|
|
96
|
+
setPlanSteps(steps: string[]): void;
|
|
97
|
+
private advancePlanStep;
|
|
92
98
|
send(userMessage: string | UserContentPart[], opts?: AgentOptions): Promise<void>;
|
|
93
99
|
private recordChangedFile;
|
|
94
100
|
private groupToolCalls;
|
|
@@ -110,15 +116,7 @@ export declare class Agent {
|
|
|
110
116
|
private handleSwitchMode;
|
|
111
117
|
private requestModeSwitch;
|
|
112
118
|
private askUser;
|
|
113
|
-
private runSubagent;
|
|
114
|
-
/**
|
|
115
|
-
* Best-effort: one tool-less model call asking for a concise, self-contained
|
|
116
|
-
* summary of the work so far. Used to guarantee a non-empty subagent result.
|
|
117
|
-
*/
|
|
118
|
-
requestFinalSummary(signal?: AbortSignal): Promise<string>;
|
|
119
|
-
getLastAssistantText(): string;
|
|
120
119
|
private checkPermission;
|
|
121
120
|
}
|
|
122
|
-
export declare const
|
|
123
|
-
export declare const PLAN_MODE_ADDENDUM = "\n\n## PLAN MODE (read-only)\nYou are currently in **plan mode**. You have ONLY read-only tools (read_file,\nlist_dir, search_files, grep, fetch_url, web_search, use_skill, spawn_agent, ask_user). You CANNOT write files, edit\nfiles, run shell commands, or change anything \u2014 those tools are unavailable and any\nattempt will be blocked.\n\nYour job is to investigate and produce a clear, actionable plan:\n- Explore the relevant files and understand the current state before proposing anything.\n- Do NOT describe changes as if you already made them. You haven't.\n- End your response with a concise plan: a short **## Plan** heading followed by\n numbered steps. Name the specific files to change and what to change in each. Call\n out risks, assumptions, or open questions.\n- Keep it tight \u2014 enough to execute from, not an essay.\n\nAfter you present the plan, the user will be asked whether to execute it. On approval,\nyou'll be switched to agent mode and asked to carry out exactly this plan.";
|
|
121
|
+
export declare const PLAN_MODE_ADDENDUM = "\n\n## PLAN MODE (read-only)\nYou are currently in **plan mode**. You have ONLY read-only tools (read_file,\nlist_dir, search_files, grep, fetch_url, web_search, use_skill, ask_user). You CANNOT write files, edit\nfiles, run shell commands, or change anything \u2014 those tools are unavailable and any\nattempt will be blocked.\n\nYour job is to investigate and produce a clear, actionable plan:\n- Explore the relevant files and understand the current state before proposing anything.\n- Do NOT describe changes as if you already made them. You haven't.\n- End your response with a concise plan: a short **## Plan** heading followed by\n numbered steps. Name the specific files to change and what to change in each. Call\n out risks, assumptions, or open questions.\n- Keep it tight \u2014 enough to execute from, not an essay.\n\nAfter you present the plan, the user will be asked whether to execute it. On approval,\nyou'll be switched to agent mode and asked to carry out exactly this plan.";
|
|
124
122
|
export declare function buildSystemPrompt(projectContext: string, memoryContext: string, skillsCatalog?: string): string;
|