indusagi-coding-agent 0.1.28 → 0.1.30
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 +23 -0
- package/LICENSE.md +22 -0
- package/README.md +2 -0
- package/dist/core/messages.d.ts +1 -76
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +1 -122
- package/dist/core/messages.js.map +1 -1
- package/dist/core/session-manager.d.ts +1 -447
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +1 -1203
- package/dist/core/session-manager.js.map +1 -1
- package/package.json +2 -2
- package/docs/COMPLETE-GUIDE.md +0 -300
- package/docs/COMPREHENSIVE-CLI-SUMMARY.md +0 -900
- package/docs/MODES-ARCHITECTURE.md +0 -565
- package/docs/PRINT-MODE-GUIDE.md +0 -456
- package/docs/README.md +0 -78
- package/docs/RPC-GUIDE.md +0 -705
- package/docs/UTILS-IMPLEMENTATION-SUMMARY.md +0 -647
- package/docs/UTILS-MODULE-OVERVIEW.md +0 -1480
- package/docs/UTILS-QA-CHECKLIST.md +0 -1061
- package/docs/UTILS-USAGE-GUIDE.md +0 -1419
- package/docs/compaction.md +0 -390
- package/docs/custom-provider.md +0 -538
- package/docs/development.md +0 -69
- package/docs/extensions.md +0 -1733
- package/docs/hooks.md +0 -378
- package/docs/images/doom-extension.png +0 -0
- package/docs/images/interactive-mode.png +0 -0
- package/docs/images/tree-view.png +0 -0
- package/docs/json.md +0 -79
- package/docs/keybindings.md +0 -162
- package/docs/models.md +0 -193
- package/docs/packages.md +0 -163
- package/docs/prompt-templates.md +0 -67
- package/docs/providers.md +0 -147
- package/docs/rpc.md +0 -1048
- package/docs/sdk.md +0 -969
- package/docs/session.md +0 -412
- package/docs/settings.md +0 -219
- package/docs/shell-aliases.md +0 -13
- package/docs/skills.md +0 -226
- package/docs/subagents.md +0 -225
- package/docs/terminal-setup.md +0 -65
- package/docs/themes.md +0 -295
- package/docs/tree.md +0 -219
- package/docs/tui.md +0 -887
- package/docs/web-tools.md +0 -304
- package/docs/windows.md +0 -17
- package/examples/README.md +0 -25
- package/examples/extensions/README.md +0 -192
- package/examples/extensions/antigravity-image-gen.ts +0 -414
- package/examples/extensions/auto-commit-on-exit.ts +0 -49
- package/examples/extensions/bookmark.ts +0 -50
- package/examples/extensions/claude-rules.ts +0 -86
- package/examples/extensions/confirm-destructive.ts +0 -59
- package/examples/extensions/custom-compaction.ts +0 -115
- package/examples/extensions/custom-footer.ts +0 -65
- package/examples/extensions/custom-header.ts +0 -73
- package/examples/extensions/custom-provider-anthropic/index.ts +0 -605
- package/examples/extensions/custom-provider-anthropic/package-lock.json +0 -24
- package/examples/extensions/custom-provider-anthropic/package.json +0 -19
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +0 -350
- package/examples/extensions/custom-provider-gitlab-duo/package.json +0 -16
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +0 -83
- package/examples/extensions/dirty-repo-guard.ts +0 -56
- package/examples/extensions/doom-overlay/README.md +0 -46
- package/examples/extensions/doom-overlay/doom/build/doom.js +0 -21
- package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
- package/examples/extensions/doom-overlay/doom/build.sh +0 -152
- package/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +0 -72
- package/examples/extensions/doom-overlay/doom-component.ts +0 -133
- package/examples/extensions/doom-overlay/doom-engine.ts +0 -173
- package/examples/extensions/doom-overlay/doom-keys.ts +0 -105
- package/examples/extensions/doom-overlay/index.ts +0 -74
- package/examples/extensions/doom-overlay/wad-finder.ts +0 -51
- package/examples/extensions/event-bus.ts +0 -43
- package/examples/extensions/file-trigger.ts +0 -41
- package/examples/extensions/git-checkpoint.ts +0 -53
- package/examples/extensions/handoff.ts +0 -151
- package/examples/extensions/hello.ts +0 -25
- package/examples/extensions/inline-bash.ts +0 -94
- package/examples/extensions/input-transform.ts +0 -43
- package/examples/extensions/interactive-shell.ts +0 -196
- package/examples/extensions/mac-system-theme.ts +0 -47
- package/examples/extensions/message-renderer.ts +0 -60
- package/examples/extensions/modal-editor.ts +0 -86
- package/examples/extensions/model-status.ts +0 -31
- package/examples/extensions/notify.ts +0 -25
- package/examples/extensions/overlay-qa-tests.ts +0 -882
- package/examples/extensions/overlay-test.ts +0 -151
- package/examples/extensions/permission-gate.ts +0 -34
- package/examples/extensions/pirate.ts +0 -47
- package/examples/extensions/plan-mode/README.md +0 -65
- package/examples/extensions/plan-mode/index.ts +0 -341
- package/examples/extensions/plan-mode/utils.ts +0 -168
- package/examples/extensions/preset.ts +0 -399
- package/examples/extensions/protected-paths.ts +0 -30
- package/examples/extensions/qna.ts +0 -120
- package/examples/extensions/question.ts +0 -265
- package/examples/extensions/questionnaire.ts +0 -428
- package/examples/extensions/rainbow-editor.ts +0 -88
- package/examples/extensions/sandbox/index.ts +0 -318
- package/examples/extensions/sandbox/package-lock.json +0 -92
- package/examples/extensions/sandbox/package.json +0 -19
- package/examples/extensions/send-user-message.ts +0 -97
- package/examples/extensions/session-name.ts +0 -27
- package/examples/extensions/shutdown-command.ts +0 -63
- package/examples/extensions/snake.ts +0 -344
- package/examples/extensions/space-invaders.ts +0 -561
- package/examples/extensions/ssh.ts +0 -220
- package/examples/extensions/status-line.ts +0 -40
- package/examples/extensions/subagent/README.md +0 -172
- package/examples/extensions/subagent/agents/planner.md +0 -37
- package/examples/extensions/subagent/agents/reviewer.md +0 -35
- package/examples/extensions/subagent/agents/scout.md +0 -50
- package/examples/extensions/subagent/agents/worker.md +0 -24
- package/examples/extensions/subagent/agents.ts +0 -127
- package/examples/extensions/subagent/index.ts +0 -964
- package/examples/extensions/subagent/prompts/implement-and-review.md +0 -10
- package/examples/extensions/subagent/prompts/implement.md +0 -10
- package/examples/extensions/subagent/prompts/scout-and-plan.md +0 -9
- package/examples/extensions/summarize.ts +0 -196
- package/examples/extensions/timed-confirm.ts +0 -70
- package/examples/extensions/todo.ts +0 -300
- package/examples/extensions/tool-override.ts +0 -144
- package/examples/extensions/tools.ts +0 -147
- package/examples/extensions/trigger-compact.ts +0 -40
- package/examples/extensions/truncated-tool.ts +0 -193
- package/examples/extensions/widget-placement.ts +0 -17
- package/examples/extensions/with-deps/index.ts +0 -36
- package/examples/extensions/with-deps/package-lock.json +0 -31
- package/examples/extensions/with-deps/package.json +0 -22
- package/examples/sdk/01-minimal.ts +0 -22
- package/examples/sdk/02-custom-model.ts +0 -50
- package/examples/sdk/03-custom-prompt.ts +0 -55
- package/examples/sdk/04-skills.ts +0 -46
- package/examples/sdk/05-tools.ts +0 -56
- package/examples/sdk/06-extensions.ts +0 -88
- package/examples/sdk/07-context-files.ts +0 -40
- package/examples/sdk/08-prompt-templates.ts +0 -47
- package/examples/sdk/09-api-keys-and-oauth.ts +0 -48
- package/examples/sdk/10-settings.ts +0 -38
- package/examples/sdk/11-sessions.ts +0 -48
- package/examples/sdk/12-full-control.ts +0 -82
- package/examples/sdk/13-codex-oauth.ts +0 -37
- package/examples/sdk/README.md +0 -144
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.30] - Kimi K2.5 Reasoning & GLM-5 Fix
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- **Kimi K2.5 Reasoning**: All Kimi K2.5 models now have thinking/reasoning enabled
|
|
7
|
+
- `kimi-k2.5`: `reasoning: true`
|
|
8
|
+
- `kimi-for-coding`: `reasoning: true`
|
|
9
|
+
- `k2p5` (legacy alias): `reasoning: true`
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- **GLM-5 Context Overflow**: Fixed compaction error when using GLM-5 model
|
|
13
|
+
- Context window and max tokens adjusted to prevent overflow errors
|
|
14
|
+
- Session compaction now works correctly with GLM-5
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- Updated `indusagi` dependency to `^0.12.13` (npm package)
|
|
18
|
+
|
|
19
|
+
## [0.1.29] - Update Docs & Dependency
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- **Indusagi Dependency**: Updated to `^0.12.12` (published npm package)
|
|
23
|
+
- **Docs Link**: Added https://www.indusagi.com to README
|
|
24
|
+
- **Session Management**: SessionManager + message helpers now re-exported from `indusagi/agent`
|
|
25
|
+
|
|
3
26
|
## [0.1.28] - Use Published Indusagi Package
|
|
4
27
|
|
|
5
28
|
### Changed
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Mario Zechner
|
|
4
|
+
Copyright (c) 2026 Varun Israni
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
CHANGED
package/dist/core/messages.d.ts
CHANGED
|
@@ -1,77 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Custom message types and transformers for the coding agent.
|
|
3
|
-
*
|
|
4
|
-
* Extends the base AgentMessage type with coding-agent specific message types,
|
|
5
|
-
* and provides a transformer to convert them to LLM-compatible messages.
|
|
6
|
-
*/
|
|
7
|
-
import type { AgentMessage } from "indusagi/agent";
|
|
8
|
-
import type { ImageContent, Message, TextContent } from "indusagi/ai";
|
|
9
|
-
export declare const COMPACTION_SUMMARY_PREFIX = "The conversation history before this point was compacted into the following summary:\n\n<summary>\n";
|
|
10
|
-
export declare const COMPACTION_SUMMARY_SUFFIX = "\n</summary>";
|
|
11
|
-
export declare const BRANCH_SUMMARY_PREFIX = "The following is a summary of a branch that this conversation came back from:\n\n<summary>\n";
|
|
12
|
-
export declare const BRANCH_SUMMARY_SUFFIX = "</summary>";
|
|
13
|
-
/**
|
|
14
|
-
* Message type for bash executions via the ! command.
|
|
15
|
-
*/
|
|
16
|
-
export interface BashExecutionMessage {
|
|
17
|
-
role: "bashExecution";
|
|
18
|
-
command: string;
|
|
19
|
-
output: string;
|
|
20
|
-
exitCode: number | undefined;
|
|
21
|
-
cancelled: boolean;
|
|
22
|
-
truncated: boolean;
|
|
23
|
-
fullOutputPath?: string;
|
|
24
|
-
timestamp: number;
|
|
25
|
-
/** If true, this message is excluded from LLM context (!! prefix) */
|
|
26
|
-
excludeFromContext?: boolean;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Message type for extension-injected messages via sendMessage().
|
|
30
|
-
* These are custom messages that extensions can inject into the conversation.
|
|
31
|
-
*/
|
|
32
|
-
export interface CustomMessage<T = unknown> {
|
|
33
|
-
role: "custom";
|
|
34
|
-
customType: string;
|
|
35
|
-
content: string | (TextContent | ImageContent)[];
|
|
36
|
-
display: boolean;
|
|
37
|
-
details?: T;
|
|
38
|
-
timestamp: number;
|
|
39
|
-
}
|
|
40
|
-
export interface BranchSummaryMessage {
|
|
41
|
-
role: "branchSummary";
|
|
42
|
-
summary: string;
|
|
43
|
-
fromId: string;
|
|
44
|
-
timestamp: number;
|
|
45
|
-
}
|
|
46
|
-
export interface CompactionSummaryMessage {
|
|
47
|
-
role: "compactionSummary";
|
|
48
|
-
summary: string;
|
|
49
|
-
tokensBefore: number;
|
|
50
|
-
timestamp: number;
|
|
51
|
-
}
|
|
52
|
-
declare module "indusagi/agent" {
|
|
53
|
-
interface CustomAgentMessages {
|
|
54
|
-
bashExecution: BashExecutionMessage;
|
|
55
|
-
custom: CustomMessage;
|
|
56
|
-
branchSummary: BranchSummaryMessage;
|
|
57
|
-
compactionSummary: CompactionSummaryMessage;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Convert a BashExecutionMessage to user message text for LLM context.
|
|
62
|
-
*/
|
|
63
|
-
export declare function bashExecutionToText(msg: BashExecutionMessage): string;
|
|
64
|
-
export declare function createBranchSummaryMessage(summary: string, fromId: string, timestamp: string): BranchSummaryMessage;
|
|
65
|
-
export declare function createCompactionSummaryMessage(summary: string, tokensBefore: number, timestamp: string): CompactionSummaryMessage;
|
|
66
|
-
/** Convert CustomMessageEntry to AgentMessage format */
|
|
67
|
-
export declare function createCustomMessage(customType: string, content: string | (TextContent | ImageContent)[], display: boolean, details: unknown | undefined, timestamp: string): CustomMessage;
|
|
68
|
-
/**
|
|
69
|
-
* Transform AgentMessages (including custom types) to LLM-compatible Messages.
|
|
70
|
-
*
|
|
71
|
-
* This is used by:
|
|
72
|
-
* - Agent's transormToLlm option (for prompt calls and queued messages)
|
|
73
|
-
* - Compaction's generateSummary (for summarization)
|
|
74
|
-
* - Custom extensions and tools
|
|
75
|
-
*/
|
|
76
|
-
export declare function convertToLlm(messages: AgentMessage[]): Message[];
|
|
1
|
+
export * from "indusagi/agent";
|
|
77
2
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/core/messages.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/core/messages.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
package/dist/core/messages.js
CHANGED
|
@@ -1,123 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Custom message types and transformers for the coding agent.
|
|
3
|
-
*
|
|
4
|
-
* Extends the base AgentMessage type with coding-agent specific message types,
|
|
5
|
-
* and provides a transformer to convert them to LLM-compatible messages.
|
|
6
|
-
*/
|
|
7
|
-
export const COMPACTION_SUMMARY_PREFIX = `The conversation history before this point was compacted into the following summary:
|
|
8
|
-
|
|
9
|
-
<summary>
|
|
10
|
-
`;
|
|
11
|
-
export const COMPACTION_SUMMARY_SUFFIX = `
|
|
12
|
-
</summary>`;
|
|
13
|
-
export const BRANCH_SUMMARY_PREFIX = `The following is a summary of a branch that this conversation came back from:
|
|
14
|
-
|
|
15
|
-
<summary>
|
|
16
|
-
`;
|
|
17
|
-
export const BRANCH_SUMMARY_SUFFIX = `</summary>`;
|
|
18
|
-
/**
|
|
19
|
-
* Convert a BashExecutionMessage to user message text for LLM context.
|
|
20
|
-
*/
|
|
21
|
-
export function bashExecutionToText(msg) {
|
|
22
|
-
let text = `Ran \`${msg.command}\`\n`;
|
|
23
|
-
if (msg.output) {
|
|
24
|
-
text += `\`\`\`\n${msg.output}\n\`\`\``;
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
text += "(no output)";
|
|
28
|
-
}
|
|
29
|
-
if (msg.cancelled) {
|
|
30
|
-
text += "\n\n(command cancelled)";
|
|
31
|
-
}
|
|
32
|
-
else if (msg.exitCode !== null && msg.exitCode !== undefined && msg.exitCode !== 0) {
|
|
33
|
-
text += `\n\nCommand exited with code ${msg.exitCode}`;
|
|
34
|
-
}
|
|
35
|
-
if (msg.truncated && msg.fullOutputPath) {
|
|
36
|
-
text += `\n\n[Output truncated. Full output: ${msg.fullOutputPath}]`;
|
|
37
|
-
}
|
|
38
|
-
return text;
|
|
39
|
-
}
|
|
40
|
-
export function createBranchSummaryMessage(summary, fromId, timestamp) {
|
|
41
|
-
return {
|
|
42
|
-
role: "branchSummary",
|
|
43
|
-
summary,
|
|
44
|
-
fromId,
|
|
45
|
-
timestamp: new Date(timestamp).getTime(),
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
export function createCompactionSummaryMessage(summary, tokensBefore, timestamp) {
|
|
49
|
-
return {
|
|
50
|
-
role: "compactionSummary",
|
|
51
|
-
summary: summary,
|
|
52
|
-
tokensBefore,
|
|
53
|
-
timestamp: new Date(timestamp).getTime(),
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
/** Convert CustomMessageEntry to AgentMessage format */
|
|
57
|
-
export function createCustomMessage(customType, content, display, details, timestamp) {
|
|
58
|
-
return {
|
|
59
|
-
role: "custom",
|
|
60
|
-
customType,
|
|
61
|
-
content,
|
|
62
|
-
display,
|
|
63
|
-
details,
|
|
64
|
-
timestamp: new Date(timestamp).getTime(),
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Transform AgentMessages (including custom types) to LLM-compatible Messages.
|
|
69
|
-
*
|
|
70
|
-
* This is used by:
|
|
71
|
-
* - Agent's transormToLlm option (for prompt calls and queued messages)
|
|
72
|
-
* - Compaction's generateSummary (for summarization)
|
|
73
|
-
* - Custom extensions and tools
|
|
74
|
-
*/
|
|
75
|
-
export function convertToLlm(messages) {
|
|
76
|
-
return messages
|
|
77
|
-
.map((m) => {
|
|
78
|
-
switch (m.role) {
|
|
79
|
-
case "bashExecution":
|
|
80
|
-
// Skip messages excluded from context (!! prefix)
|
|
81
|
-
if (m.excludeFromContext) {
|
|
82
|
-
return undefined;
|
|
83
|
-
}
|
|
84
|
-
return {
|
|
85
|
-
role: "user",
|
|
86
|
-
content: [{ type: "text", text: bashExecutionToText(m) }],
|
|
87
|
-
timestamp: m.timestamp,
|
|
88
|
-
};
|
|
89
|
-
case "custom": {
|
|
90
|
-
const content = typeof m.content === "string" ? [{ type: "text", text: m.content }] : m.content;
|
|
91
|
-
return {
|
|
92
|
-
role: "user",
|
|
93
|
-
content,
|
|
94
|
-
timestamp: m.timestamp,
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
case "branchSummary":
|
|
98
|
-
return {
|
|
99
|
-
role: "user",
|
|
100
|
-
content: [{ type: "text", text: BRANCH_SUMMARY_PREFIX + m.summary + BRANCH_SUMMARY_SUFFIX }],
|
|
101
|
-
timestamp: m.timestamp,
|
|
102
|
-
};
|
|
103
|
-
case "compactionSummary":
|
|
104
|
-
return {
|
|
105
|
-
role: "user",
|
|
106
|
-
content: [
|
|
107
|
-
{ type: "text", text: COMPACTION_SUMMARY_PREFIX + m.summary + COMPACTION_SUMMARY_SUFFIX },
|
|
108
|
-
],
|
|
109
|
-
timestamp: m.timestamp,
|
|
110
|
-
};
|
|
111
|
-
case "user":
|
|
112
|
-
case "assistant":
|
|
113
|
-
case "toolResult":
|
|
114
|
-
return m;
|
|
115
|
-
default:
|
|
116
|
-
// biome-ignore lint/correctness/noSwitchDeclarations: fine
|
|
117
|
-
const _exhaustiveCheck = m;
|
|
118
|
-
return undefined;
|
|
119
|
-
}
|
|
120
|
-
})
|
|
121
|
-
.filter((m) => m !== undefined);
|
|
122
|
-
}
|
|
1
|
+
export * from "indusagi/agent";
|
|
123
2
|
//# sourceMappingURL=messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/core/messages.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/core/messages.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|