@bahulam/code 0.1.1 → 0.1.3
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/LICENSE +201 -0
- package/NOTICE +39 -0
- package/package.json +8 -9
- package/pulse/lib/tool-categories.ts +13 -0
- package/src/commands/device.mjs +121 -0
- package/src/commands/pair.mjs +190 -0
- package/src/commands/remote.mjs +110 -0
- package/src/config/env.mjs +2 -2
- package/src/core/event-log.mjs +393 -0
- package/src/core/headless.mjs +198 -0
- package/src/core/loop.mjs +276 -0
- package/src/core/memory-disk.mjs +210 -0
- package/src/core/paths.mjs +36 -0
- package/src/core/stream-client.mjs +28 -9
- package/src/core/tool-executor.mjs +64 -16
- package/src/daemon/approval-store.mjs +253 -0
- package/src/daemon/attach-client.mjs +361 -0
- package/src/daemon/daemonize.mjs +151 -0
- package/src/daemon/event-tap.mjs +197 -0
- package/src/daemon/input-lock.mjs +191 -0
- package/src/daemon/relay-client.mjs +258 -0
- package/src/daemon/session-core.mjs +179 -0
- package/src/daemon/session-list.mjs +26 -0
- package/src/daemon/session-publisher.mjs +78 -0
- package/src/daemon/socket-server.mjs +329 -0
- package/src/daemon/stop-daemon.mjs +18 -0
- package/src/permissions/checker.mjs +6 -6
- package/src/permissions/prompt.mjs +8 -7
- package/src/skills/installer.mjs +8 -0
- package/src/terminal/ansi.mjs +85 -9
- package/src/terminal/main.mjs +97 -3
- package/src/terminal/repl.mjs +389 -6
- package/src/terminal/skills-picker.mjs +121 -0
- package/src/terminal/skills.mjs +3 -3
- package/src/tools/analyze-code.mjs +39 -0
- package/src/tools/bash.mjs +1 -1
- package/src/tools/edit.mjs +18 -18
- package/src/tools/git-diff.mjs +34 -0
- package/src/tools/git-status.mjs +30 -0
- package/src/tools/glob.mjs +5 -2
- package/src/tools/grep.mjs +1 -1
- package/src/tools/meta-tools.mjs +85 -0
- package/src/tools/read-files.mjs +37 -0
- package/src/tools/read.mjs +20 -10
- package/src/tools/registry.mjs +20 -0
- package/src/tools/remember.mjs +147 -0
- package/src/tools/search-files.mjs +41 -0
- package/src/tools/write-project.mjs +62 -0
- package/src/tools/write.mjs +1 -1
- package/src/ui/banner.mjs +1 -1
- package/src/ui/slash-commands.mjs +16 -0
- package/src/ui/sub-agent.mjs +8 -2
- package/src/ui/transcript-block.mjs +4 -1
|
@@ -45,6 +45,8 @@ export const COMMANDS = {
|
|
|
45
45
|
'/surgical': 'Verbosity: show everything (reasoning, expanded tools)',
|
|
46
46
|
'/compact': 'Compact conversation context',
|
|
47
47
|
'/agents': 'List available agents',
|
|
48
|
+
'/subagents': 'Alias of /agents (list/create/edit/sync sub-agents)',
|
|
49
|
+
'/skills': 'List / install / view / remove skills (SKILL.md bundles)',
|
|
48
50
|
'/run': 'Run a sub-agent or synced workflow',
|
|
49
51
|
'/explore': 'Code explorer agent',
|
|
50
52
|
'/review': 'Code review agent',
|
|
@@ -146,6 +148,20 @@ export const HELP_GROUPS = [
|
|
|
146
148
|
['/architect <instruction>', 'Design an approach'],
|
|
147
149
|
],
|
|
148
150
|
},
|
|
151
|
+
{
|
|
152
|
+
key: 'skills',
|
|
153
|
+
title: 'Skills',
|
|
154
|
+
summary: 'SKILL.md bundles',
|
|
155
|
+
commands: [
|
|
156
|
+
['/skills', 'List installed skills'],
|
|
157
|
+
['/skills install <url|path>', 'Install from Git URL or local directory'],
|
|
158
|
+
['/skills install <src> --project', 'Install into .bahulam/skills (project scope)'],
|
|
159
|
+
['/skills install <src> --force', 'Overwrite an existing skill'],
|
|
160
|
+
['/skills view <name> [resource]', 'Show SKILL.md or a bundled resource'],
|
|
161
|
+
['/skills remove <name>', 'Uninstall a skill'],
|
|
162
|
+
['/skills update <name>', 'Reinstall from the recorded source'],
|
|
163
|
+
],
|
|
164
|
+
},
|
|
149
165
|
{
|
|
150
166
|
key: 'workflows',
|
|
151
167
|
title: 'Workflows',
|
package/src/ui/sub-agent.mjs
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
import { paint } from './palette.mjs';
|
|
21
21
|
import { icons } from './icons.mjs';
|
|
22
|
+
import { formatSeconds } from '../terminal/ansi.mjs';
|
|
22
23
|
|
|
23
24
|
const SUB_ICONS = {
|
|
24
25
|
explore: '🔭',
|
|
@@ -122,9 +123,14 @@ export function renderSubAgentClose({
|
|
|
122
123
|
const parts = [];
|
|
123
124
|
if (toolCalls > 0) parts.push(`${toolCalls} tools`);
|
|
124
125
|
if (iterations > 0) parts.push(`${iterations} iter`);
|
|
125
|
-
|
|
126
|
+
// Tokens: pass the OUTPUT (generation) count only. Summing input+output
|
|
127
|
+
// across a multi-iteration sub-agent double-counts the context that is
|
|
128
|
+
// re-shipped each iteration, and the resulting number reads huge and
|
|
129
|
+
// misleading (e.g. 632.8k for a 16-iter run whose actual generation was
|
|
130
|
+
// a fraction of that). Output tokens are the honest "work done" number.
|
|
131
|
+
if (tokens > 0) parts.push(`${formatTokens(tokens)} gen`);
|
|
126
132
|
if (typeof costUsd === 'number' && costUsd > 0) parts.push(formatCost(costUsd));
|
|
127
|
-
if (durationS != null) parts.push(
|
|
133
|
+
if (durationS != null) parts.push(formatSeconds(durationS));
|
|
128
134
|
const detail = parts.length ? paint.text.dim(' · ' + parts.join(' · ')) : '';
|
|
129
135
|
|
|
130
136
|
const body = summary
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { paint } from './palette.mjs';
|
|
2
2
|
|
|
3
3
|
function tonePaint(tone) {
|
|
4
|
-
|
|
4
|
+
// 'user' tone was brand.accent (pink) — swapped to state.success (green)
|
|
5
|
+
// so the "your input" prompt reads as an active/go signal instead of the
|
|
6
|
+
// magenta 'attention/warn' tint the accent palette carries elsewhere.
|
|
7
|
+
return tone === 'user' ? paint.state.success : paint.brand.primary;
|
|
5
8
|
}
|
|
6
9
|
|
|
7
10
|
export function transcriptHeader(label, { tone = 'assistant' } = {}) {
|