@kolisachint/hoocode-agent 0.1.4 → 0.2.1
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 +4 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +1 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +8 -0
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +1 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +1 -1
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +1 -1
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +1 -1
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +1 -1
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +1 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +4 -4
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/sdk.d.ts +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +2 -2
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +5 -5
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +2 -2
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +3 -3
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/index.d.ts +1 -0
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +1 -0
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +1 -1
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/path-utils.d.ts +10 -0
- package/dist/core/tools/path-utils.d.ts.map +1 -1
- package/dist/core/tools/path-utils.js +28 -1
- package/dist/core/tools/path-utils.js.map +1 -1
- package/dist/extensions/core/hoo-core.d.ts.map +1 -1
- package/dist/extensions/core/hoo-core.js +50 -4
- package/dist/extensions/core/hoo-core.js.map +1 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +4 -3
- package/dist/init.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +1 -1
- package/dist/migrations.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +1 -1
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +1 -1
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +1 -1
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/print-mode.d.ts +2 -2
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +2 -2
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +12 -9
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js +1 -1
- package/dist/utils/clipboard-image.js.map +1 -1
- package/docs/compaction.md +9 -9
- package/docs/custom-provider.md +4 -4
- package/docs/development.md +6 -6
- package/docs/extensions.md +21 -21
- package/docs/index.md +9 -9
- package/docs/json.md +3 -3
- package/docs/keybindings.md +5 -5
- package/docs/models.md +6 -6
- package/docs/packages.md +37 -37
- package/docs/prompt-templates.md +4 -4
- package/docs/providers.md +12 -44
- package/docs/quickstart.md +28 -28
- package/docs/rpc.md +10 -10
- package/docs/sdk.md +13 -13
- package/docs/session-format.md +7 -7
- package/docs/sessions.md +11 -11
- package/docs/settings.md +14 -14
- package/docs/shell-aliases.md +2 -2
- package/docs/skills.md +10 -10
- package/docs/terminal-setup.md +7 -7
- package/docs/termux.md +6 -6
- package/docs/themes.md +9 -9
- package/docs/tmux.md +3 -3
- package/docs/tui.md +3 -3
- package/docs/usage.md +47 -47
- package/docs/windows.md +2 -2
- package/examples/README.md +1 -1
- package/examples/extensions/README.md +5 -5
- package/examples/extensions/claude-rules.ts +1 -1
- package/examples/extensions/commands.ts +1 -1
- package/examples/extensions/custom-header.ts +1 -1
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/doom-overlay/README.md +3 -3
- package/examples/extensions/pirate.ts +1 -1
- package/examples/extensions/preset.ts +4 -4
- package/examples/extensions/prompt-customizer.ts +1 -1
- package/examples/extensions/sandbox/index.ts +3 -3
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/README.md +13 -13
- package/examples/extensions/subagent/agents.ts +1 -1
- package/examples/extensions/subagent/index.ts +1 -1
- package/examples/extensions/tools.ts +1 -1
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/sdk/04-skills.ts +1 -1
- package/examples/sdk/06-extensions.ts +1 -1
- package/examples/sdk/08-prompt-templates.ts +1 -1
- package/examples/sdk/README.md +2 -2
- package/package.json +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +0 -24
- package/examples/extensions/sandbox/package-lock.json +0 -92
- package/examples/extensions/with-deps/package-lock.json +0 -31
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# Extension Examples
|
|
2
2
|
|
|
3
|
-
Example extensions for
|
|
3
|
+
Example extensions for @kolisachint/hoocode-agent.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
# Load an extension with --extension flag
|
|
9
|
-
|
|
9
|
+
hoocode --extension examples/extensions/permission-gate.ts
|
|
10
10
|
|
|
11
11
|
# Or copy to extensions directory for auto-discovery
|
|
12
|
-
cp permission-gate.ts ~/.
|
|
12
|
+
cp permission-gate.ts ~/.hoocode/agent/extensions/
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Examples
|
|
@@ -96,7 +96,7 @@ cp permission-gate.ts ~/.pi/agent/extensions/
|
|
|
96
96
|
|
|
97
97
|
| Extension | Description |
|
|
98
98
|
|-----------|-------------|
|
|
99
|
-
| `mac-system-theme.ts` | Syncs
|
|
99
|
+
| `mac-system-theme.ts` | Syncs hoocode theme with macOS dark/light mode |
|
|
100
100
|
|
|
101
101
|
### Resources
|
|
102
102
|
|
|
@@ -123,7 +123,7 @@ cp permission-gate.ts ~/.pi/agent/extensions/
|
|
|
123
123
|
| Extension | Description |
|
|
124
124
|
|-----------|-------------|
|
|
125
125
|
| `custom-provider-anthropic/` | Custom Anthropic provider with OAuth support and custom streaming implementation |
|
|
126
|
-
| `custom-provider-gitlab-duo/` | GitLab Duo provider using
|
|
126
|
+
| `custom-provider-gitlab-duo/` | GitLab Duo provider using @kolisachint/hoocode-ai's built-in Anthropic/OpenAI streaming via proxy |
|
|
127
127
|
|
|
128
128
|
### External Dependencies
|
|
129
129
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* - Organize with subdirectories: Group related rules (e.g., frontend/, backend/)
|
|
13
13
|
*
|
|
14
14
|
* Usage:
|
|
15
|
-
* 1. Copy this file to ~/.hoocode/agent/extensions/ or your project's .
|
|
15
|
+
* 1. Copy this file to ~/.hoocode/agent/extensions/ or your project's .hoocode/extensions/
|
|
16
16
|
* 2. Create .claude/rules/ folder in your project root
|
|
17
17
|
* 3. Add .md files with your rules
|
|
18
18
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* that lists all available slash commands in the current session.
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
* 1. Copy this file to ~/.hoocode/agent/extensions/ or your project's .
|
|
8
|
+
* 1. Copy this file to ~/.hoocode/agent/extensions/ or your project's .hoocode/extensions/
|
|
9
9
|
* 2. Use /commands to see available commands
|
|
10
10
|
* 3. Use /commands extensions to filter by source
|
|
11
11
|
*/
|
|
@@ -9,7 +9,7 @@ import type { ExtensionAPI, Theme } from "@kolisachint/hoocode-agent";
|
|
|
9
9
|
import { VERSION } from "@kolisachint/hoocode-agent";
|
|
10
10
|
|
|
11
11
|
// --- PI MASCOT ---
|
|
12
|
-
// Based on
|
|
12
|
+
// Based on hoocode_mascot.ts - the hoocode agent character
|
|
13
13
|
function getPiMascot(theme: Theme): string[] {
|
|
14
14
|
// --- COLORS ---
|
|
15
15
|
// 3b1b Blue: R=80, G=180, B=230
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# DOOM Overlay Demo
|
|
2
2
|
|
|
3
|
-
Play DOOM as an overlay in
|
|
3
|
+
Play DOOM as an overlay in hoocode. Demonstrates that the overlay system can handle real-time game rendering at 35 FPS.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
8
|
+
hoocode --extension ./examples/extensions/doom-overlay
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
Then run:
|
|
@@ -43,4 +43,4 @@ Height is calculated from width to maintain DOOM's 3.2:1 aspect ratio (accountin
|
|
|
43
43
|
|
|
44
44
|
- [id Software](https://github.com/id-Software/DOOM) for the original DOOM
|
|
45
45
|
- [doomgeneric](https://github.com/ozkl/doomgeneric) for the portable DOOM implementation
|
|
46
|
-
- [pi-doom](https://github.com/badlogic/pi-doom) for the original
|
|
46
|
+
- [pi-doom](https://github.com/badlogic/pi-doom) for the original hoocode integration
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* change agent behavior based on extension state.
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
* 1. Copy this file to ~/.hoocode/agent/extensions/ or your project's .
|
|
8
|
+
* 1. Copy this file to ~/.hoocode/agent/extensions/ or your project's .hoocode/extensions/
|
|
9
9
|
* 2. Use /pirate to toggle pirate mode
|
|
10
10
|
* 3. When enabled, the agent will respond like a pirate
|
|
11
11
|
*/
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Config files (merged, project takes precedence):
|
|
9
9
|
* - ~/.hoocode/agent/presets.json (global)
|
|
10
|
-
* - <cwd>/.
|
|
10
|
+
* - <cwd>/.hoocode/presets.json (project-local)
|
|
11
11
|
*
|
|
12
12
|
* Example presets.json:
|
|
13
13
|
* ```json
|
|
@@ -69,7 +69,7 @@ interface PresetsConfig {
|
|
|
69
69
|
*/
|
|
70
70
|
function loadPresets(cwd: string): PresetsConfig {
|
|
71
71
|
const globalPath = join(getAgentDir(), "presets.json");
|
|
72
|
-
const projectPath = join(cwd, ".
|
|
72
|
+
const projectPath = join(cwd, ".hoocode", "presets.json");
|
|
73
73
|
|
|
74
74
|
let globalPresets: PresetsConfig = {};
|
|
75
75
|
let projectPresets: PresetsConfig = {};
|
|
@@ -201,7 +201,7 @@ export default function presetExtension(pi: ExtensionAPI) {
|
|
|
201
201
|
|
|
202
202
|
if (presetNames.length === 0) {
|
|
203
203
|
ctx.ui.notify(
|
|
204
|
-
"No presets defined. Add presets to ~/.hoocode/agent/presets.json or .
|
|
204
|
+
"No presets defined. Add presets to ~/.hoocode/agent/presets.json or .hoocode/presets.json",
|
|
205
205
|
"warning",
|
|
206
206
|
);
|
|
207
207
|
return;
|
|
@@ -312,7 +312,7 @@ export default function presetExtension(pi: ExtensionAPI) {
|
|
|
312
312
|
const presetNames = getPresetOrder();
|
|
313
313
|
if (presetNames.length === 0) {
|
|
314
314
|
ctx.ui.notify(
|
|
315
|
-
"No presets defined. Add presets to ~/.hoocode/agent/presets.json or .
|
|
315
|
+
"No presets defined. Add presets to ~/.hoocode/agent/presets.json or .hoocode/presets.json",
|
|
316
316
|
"warning",
|
|
317
317
|
);
|
|
318
318
|
return;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* are currently active, respecting whatever the user has configured.
|
|
9
9
|
*
|
|
10
10
|
* Usage:
|
|
11
|
-
* 1. Copy this file to ~/.hoocode/agent/extensions/ or your project's .
|
|
11
|
+
* 1. Copy this file to ~/.hoocode/agent/extensions/ or your project's .hoocode/extensions/
|
|
12
12
|
* 2. Use the extension — it automatically adapts to your active tools and skills
|
|
13
13
|
*/
|
|
14
14
|
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
*
|
|
12
12
|
* Config files (merged, project takes precedence):
|
|
13
13
|
* - ~/.hoocode/agent/extensions/sandbox.json (global)
|
|
14
|
-
* - <cwd>/.
|
|
14
|
+
* - <cwd>/.hoocode/sandbox.json (project-local)
|
|
15
15
|
*
|
|
16
|
-
* Example .
|
|
16
|
+
* Example .hoocode/sandbox.json:
|
|
17
17
|
* ```json
|
|
18
18
|
* {
|
|
19
19
|
* "enabled": true,
|
|
@@ -77,7 +77,7 @@ const DEFAULT_CONFIG: SandboxConfig = {
|
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
function loadConfig(cwd: string): SandboxConfig {
|
|
80
|
-
const projectConfigPath = join(cwd, ".
|
|
80
|
+
const projectConfigPath = join(cwd, ".hoocode", "sandbox.json");
|
|
81
81
|
const globalConfigPath = join(getAgentDir(), "extensions", "sandbox.json");
|
|
82
82
|
|
|
83
83
|
let globalConfig: Partial<SandboxConfig> = {};
|
|
@@ -4,7 +4,7 @@ Delegate tasks to specialized subagents with isolated context windows.
|
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- **Isolated context**: Each subagent runs in a separate `
|
|
7
|
+
- **Isolated context**: Each subagent runs in a separate `hoocode` process
|
|
8
8
|
- **Streaming output**: See tool calls and progress as they happen
|
|
9
9
|
- **Parallel streaming**: All parallel tasks stream updates simultaneously
|
|
10
10
|
- **Markdown rendering**: Final output rendered with proper formatting (expanded view)
|
|
@@ -35,30 +35,30 @@ From the repository root, symlink the files:
|
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
37
|
# Symlink the extension (must be in a subdirectory with index.ts)
|
|
38
|
-
mkdir -p ~/.
|
|
39
|
-
ln -sf "$(pwd)/packages/coding-agent/examples/extensions/subagent/index.ts" ~/.
|
|
40
|
-
ln -sf "$(pwd)/packages/coding-agent/examples/extensions/subagent/agents.ts" ~/.
|
|
38
|
+
mkdir -p ~/.hoocode/agent/extensions/subagent
|
|
39
|
+
ln -sf "$(pwd)/packages/coding-agent/examples/extensions/subagent/index.ts" ~/.hoocode/agent/extensions/subagent/index.ts
|
|
40
|
+
ln -sf "$(pwd)/packages/coding-agent/examples/extensions/subagent/agents.ts" ~/.hoocode/agent/extensions/subagent/agents.ts
|
|
41
41
|
|
|
42
42
|
# Symlink agents
|
|
43
|
-
mkdir -p ~/.
|
|
43
|
+
mkdir -p ~/.hoocode/agent/agents
|
|
44
44
|
for f in packages/coding-agent/examples/extensions/subagent/agents/*.md; do
|
|
45
|
-
ln -sf "$(pwd)/$f" ~/.
|
|
45
|
+
ln -sf "$(pwd)/$f" ~/.hoocode/agent/agents/$(basename "$f")
|
|
46
46
|
done
|
|
47
47
|
|
|
48
48
|
# Symlink workflow prompts
|
|
49
|
-
mkdir -p ~/.
|
|
49
|
+
mkdir -p ~/.hoocode/agent/prompts
|
|
50
50
|
for f in packages/coding-agent/examples/extensions/subagent/prompts/*.md; do
|
|
51
|
-
ln -sf "$(pwd)/$f" ~/.
|
|
51
|
+
ln -sf "$(pwd)/$f" ~/.hoocode/agent/prompts/$(basename "$f")
|
|
52
52
|
done
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
## Security Model
|
|
56
56
|
|
|
57
|
-
This tool executes a separate `
|
|
57
|
+
This tool executes a separate `hoocode` subprocess with a delegated system prompt and tool/model configuration.
|
|
58
58
|
|
|
59
|
-
**Project-local agents** (`.
|
|
59
|
+
**Project-local agents** (`.hoocode/agents/*.md`) are repo-controlled prompts that can instruct the model to read files, run bash commands, etc.
|
|
60
60
|
|
|
61
|
-
**Default behavior:** Only loads **user-level agents** from `~/.
|
|
61
|
+
**Default behavior:** Only loads **user-level agents** from `~/.hoocode/agent/agents`.
|
|
62
62
|
|
|
63
63
|
To enable project-local agents, pass `agentScope: "both"` (or `"project"`). Only do this for repositories you trust.
|
|
64
64
|
|
|
@@ -136,8 +136,8 @@ System prompt for the agent goes here.
|
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
**Locations:**
|
|
139
|
-
- `~/.
|
|
140
|
-
- `.
|
|
139
|
+
- `~/.hoocode/agent/agents/*.md` - User-level (always loaded)
|
|
140
|
+
- `.hoocode/agents/*.md` - Project-level (only with `agentScope: "project"` or `"both"`)
|
|
141
141
|
|
|
142
142
|
Project agents override user agents with the same name when `agentScope: "both"`.
|
|
143
143
|
|
|
@@ -85,7 +85,7 @@ function isDirectory(p: string): boolean {
|
|
|
85
85
|
function findNearestProjectAgentsDir(cwd: string): string | null {
|
|
86
86
|
let currentDir = cwd;
|
|
87
87
|
while (true) {
|
|
88
|
-
const candidate = path.join(currentDir, ".
|
|
88
|
+
const candidate = path.join(currentDir, ".hoocode", "agents");
|
|
89
89
|
if (isDirectory(candidate)) return candidate;
|
|
90
90
|
|
|
91
91
|
const parentDir = path.dirname(currentDir);
|
|
@@ -436,7 +436,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
436
436
|
"Delegate tasks to specialized subagents with isolated context.",
|
|
437
437
|
"Modes: single (agent + task), parallel (tasks array), chain (sequential with {previous} placeholder).",
|
|
438
438
|
'Default agent scope is "user" (from ~/.hoocode/agent/agents).',
|
|
439
|
-
'To enable project-local agents in .
|
|
439
|
+
'To enable project-local agents in .hoocode/agents, set agentScope: "both" (or "project").',
|
|
440
440
|
].join(" "),
|
|
441
441
|
parameters: SubagentParams,
|
|
442
442
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Tool selection persists across session reloads and respects branch navigation.
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
* 1. Copy this file to ~/.hoocode/agent/extensions/ or your project's .
|
|
8
|
+
* 1. Copy this file to ~/.hoocode/agent/extensions/ or your project's .hoocode/extensions/
|
|
9
9
|
* 2. Use /tools to open the tool selector
|
|
10
10
|
*/
|
|
11
11
|
|
|
@@ -37,7 +37,7 @@ const loader = new DefaultResourceLoader({
|
|
|
37
37
|
});
|
|
38
38
|
await loader.reload();
|
|
39
39
|
|
|
40
|
-
// Discover all skills from cwd/.
|
|
40
|
+
// Discover all skills from cwd/.hoocode/skills, ~/.hoocode/agent/skills, etc.
|
|
41
41
|
const { skills: allSkills, diagnostics } = loader.getSkills();
|
|
42
42
|
console.log(
|
|
43
43
|
"Discovered skills:",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* By default, extension files are discovered from:
|
|
8
8
|
* - ~/.hoocode/agent/extensions/
|
|
9
|
-
* - <cwd>/.
|
|
9
|
+
* - <cwd>/.hoocode/extensions/
|
|
10
10
|
* - Paths specified in settings.json "extensions" array
|
|
11
11
|
*
|
|
12
12
|
* An extension is a TypeScript file that exports a default function:
|
|
@@ -36,7 +36,7 @@ const loader = new DefaultResourceLoader({
|
|
|
36
36
|
});
|
|
37
37
|
await loader.reload();
|
|
38
38
|
|
|
39
|
-
// Discover templates from cwd/.
|
|
39
|
+
// Discover templates from cwd/.hoocode/prompts/ and ~/.hoocode/agent/prompts/
|
|
40
40
|
const discovered = loader.getPrompts().prompts;
|
|
41
41
|
console.log("Discovered prompt templates:");
|
|
42
42
|
for (const template of discovered) {
|
package/examples/sdk/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SDK Examples
|
|
2
2
|
|
|
3
|
-
Programmatic usage of
|
|
3
|
+
Programmatic usage of @kolisachint/hoocode-agent via `createAgentSession()` and `createAgentSessionRuntime()`.
|
|
4
4
|
|
|
5
5
|
The runtime example shows how to build a recreate function that closes over process-global fixed inputs and recreates cwd-bound services and sessions as the active session cwd changes.
|
|
6
6
|
|
|
@@ -114,7 +114,7 @@ await session.prompt("Hello");
|
|
|
114
114
|
| `authStorage` | `AuthStorage.create()` | Credential storage |
|
|
115
115
|
| `modelRegistry` | `ModelRegistry.create(authStorage)` | Model registry |
|
|
116
116
|
| `cwd` | `process.cwd()` | Working directory |
|
|
117
|
-
| `agentDir` | `~/.
|
|
117
|
+
| `agentDir` | `~/.hoocode/agent` | Config directory |
|
|
118
118
|
| `model` | From settings/first available | Model to use |
|
|
119
119
|
| `thinkingLevel` | From settings/"off" | off, low, medium, high |
|
|
120
120
|
| `tools` | `codingTools` | Built-in tools |
|
package/package.json
CHANGED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "0.0.2",
|
|
4
|
-
"lockfileVersion": 3,
|
|
5
|
-
"requires": true,
|
|
6
|
-
"packages": {
|
|
7
|
-
"": {
|
|
8
|
-
"name": "pi-extension-custom-provider",
|
|
9
|
-
"version": "0.0.2",
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"@anthropic-ai/sdk": "^0.52.0"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"node_modules/@anthropic-ai/sdk": {
|
|
15
|
-
"version": "0.52.0",
|
|
16
|
-
"resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.52.0.tgz",
|
|
17
|
-
"integrity": "sha512-d4c+fg+xy9e46c8+YnrrgIQR45CZlAi7PwdzIfDXDM6ACxEZli1/fxhURsq30ZpMZy6LvSkr41jGq5aF5TD7rQ==",
|
|
18
|
-
"license": "MIT",
|
|
19
|
-
"bin": {
|
|
20
|
-
"anthropic-ai-sdk": "bin/cli"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pi-extension-sandbox",
|
|
3
|
-
"version": "0.0.2",
|
|
4
|
-
"lockfileVersion": 3,
|
|
5
|
-
"requires": true,
|
|
6
|
-
"packages": {
|
|
7
|
-
"": {
|
|
8
|
-
"name": "pi-extension-sandbox",
|
|
9
|
-
"version": "0.0.2",
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"@anthropic-ai/sandbox-runtime": "^0.0.26"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"node_modules/@anthropic-ai/sandbox-runtime": {
|
|
15
|
-
"version": "0.0.26",
|
|
16
|
-
"resolved": "https://registry.npmjs.org/@anthropic-ai/sandbox-runtime/-/sandbox-runtime-0.0.26.tgz",
|
|
17
|
-
"integrity": "sha512-DYV5LSsVMnzq0lbfaYMSpxZPUMAx4+hy343dRss+pVCLIfF62qOhxpYfZ5TmOk1GTDQm5f9wPprMNSStmnsV4w==",
|
|
18
|
-
"license": "Apache-2.0",
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"@pondwader/socks5-server": "^1.0.10",
|
|
21
|
-
"@types/lodash-es": "^4.17.12",
|
|
22
|
-
"commander": "^12.1.0",
|
|
23
|
-
"lodash-es": "^4.17.21",
|
|
24
|
-
"shell-quote": "^1.8.3",
|
|
25
|
-
"zod": "^3.24.1"
|
|
26
|
-
},
|
|
27
|
-
"bin": {
|
|
28
|
-
"srt": "dist/cli.js"
|
|
29
|
-
},
|
|
30
|
-
"engines": {
|
|
31
|
-
"node": ">=18.0.0"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"node_modules/@pondwader/socks5-server": {
|
|
35
|
-
"version": "1.0.10",
|
|
36
|
-
"resolved": "https://registry.npmjs.org/@pondwader/socks5-server/-/socks5-server-1.0.10.tgz",
|
|
37
|
-
"integrity": "sha512-bQY06wzzR8D2+vVCUoBsr5QS2U6UgPUQRmErNwtsuI6vLcyRKkafjkr3KxbtGFf9aBBIV2mcvlsKD1UYaIV+sg==",
|
|
38
|
-
"license": "MIT"
|
|
39
|
-
},
|
|
40
|
-
"node_modules/@types/lodash": {
|
|
41
|
-
"version": "4.17.23",
|
|
42
|
-
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.23.tgz",
|
|
43
|
-
"integrity": "sha512-RDvF6wTulMPjrNdCoYRC8gNR880JNGT8uB+REUpC2Ns4pRqQJhGz90wh7rgdXDPpCczF3VGktDuFGVnz8zP7HA==",
|
|
44
|
-
"license": "MIT"
|
|
45
|
-
},
|
|
46
|
-
"node_modules/@types/lodash-es": {
|
|
47
|
-
"version": "4.17.12",
|
|
48
|
-
"resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.12.tgz",
|
|
49
|
-
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
|
|
50
|
-
"license": "MIT",
|
|
51
|
-
"dependencies": {
|
|
52
|
-
"@types/lodash": "*"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"node_modules/commander": {
|
|
56
|
-
"version": "12.1.0",
|
|
57
|
-
"resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz",
|
|
58
|
-
"integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==",
|
|
59
|
-
"license": "MIT",
|
|
60
|
-
"engines": {
|
|
61
|
-
"node": ">=18"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"node_modules/lodash-es": {
|
|
65
|
-
"version": "4.18.1",
|
|
66
|
-
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz",
|
|
67
|
-
"integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==",
|
|
68
|
-
"license": "MIT"
|
|
69
|
-
},
|
|
70
|
-
"node_modules/shell-quote": {
|
|
71
|
-
"version": "1.8.3",
|
|
72
|
-
"resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz",
|
|
73
|
-
"integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==",
|
|
74
|
-
"license": "MIT",
|
|
75
|
-
"engines": {
|
|
76
|
-
"node": ">= 0.4"
|
|
77
|
-
},
|
|
78
|
-
"funding": {
|
|
79
|
-
"url": "https://github.com/sponsors/ljharb"
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"node_modules/zod": {
|
|
83
|
-
"version": "3.25.76",
|
|
84
|
-
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
|
|
85
|
-
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
|
|
86
|
-
"license": "MIT",
|
|
87
|
-
"funding": {
|
|
88
|
-
"url": "https://github.com/sponsors/colinhacks"
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pi-extension-with-deps",
|
|
3
|
-
"version": "0.0.2",
|
|
4
|
-
"lockfileVersion": 3,
|
|
5
|
-
"requires": true,
|
|
6
|
-
"packages": {
|
|
7
|
-
"": {
|
|
8
|
-
"name": "pi-extension-with-deps",
|
|
9
|
-
"version": "0.0.2",
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"ms": "^2.1.3"
|
|
12
|
-
},
|
|
13
|
-
"devDependencies": {
|
|
14
|
-
"@types/ms": "^2.1.0"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"node_modules/@types/ms": {
|
|
18
|
-
"version": "2.1.0",
|
|
19
|
-
"resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz",
|
|
20
|
-
"integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==",
|
|
21
|
-
"dev": true,
|
|
22
|
-
"license": "MIT"
|
|
23
|
-
},
|
|
24
|
-
"node_modules/ms": {
|
|
25
|
-
"version": "2.1.3",
|
|
26
|
-
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
|
27
|
-
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
|
28
|
-
"license": "MIT"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|