@namzu/cli 0.6.0 → 0.7.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/dist/__tests__/permission-rules-reach-the-turn.test.d.ts +31 -0
- package/dist/__tests__/permission-rules-reach-the-turn.test.d.ts.map +1 -0
- package/dist/__tests__/permission-rules-reach-the-turn.test.js +132 -0
- package/dist/__tests__/permission-rules-reach-the-turn.test.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +16 -3
- package/dist/cli.js.map +1 -1
- package/dist/cli.test.js +7 -1
- package/dist/cli.test.js.map +1 -1
- package/dist/commands/__tests__/run-flags.test.js +0 -1
- package/dist/commands/__tests__/run-flags.test.js.map +1 -1
- package/dist/commands/__tests__/run-stream-flags.test.js +0 -1
- package/dist/commands/__tests__/run-stream-flags.test.js.map +1 -1
- package/dist/commands/run-stream.d.ts +3 -3
- package/dist/commands/run-stream.js +3 -3
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +4 -0
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/stubs.d.ts +10 -0
- package/dist/commands/stubs.d.ts.map +1 -1
- package/dist/commands/stubs.js +12 -2
- package/dist/commands/stubs.js.map +1 -1
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +20 -4
- package/dist/config/load.js.map +1 -1
- package/dist/config/schema.d.ts +0 -12
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/doctor/checks/credentials.d.ts +20 -0
- package/dist/doctor/checks/credentials.d.ts.map +1 -0
- package/dist/doctor/checks/credentials.js +58 -0
- package/dist/doctor/checks/credentials.js.map +1 -0
- package/dist/doctor/checks/credentials.test.d.ts +10 -0
- package/dist/doctor/checks/credentials.test.d.ts.map +1 -0
- package/dist/doctor/checks/credentials.test.js +47 -0
- package/dist/doctor/checks/credentials.test.js.map +1 -0
- package/dist/doctor/checks/index.d.ts +2 -1
- package/dist/doctor/checks/index.d.ts.map +1 -1
- package/dist/doctor/checks/index.js +3 -1
- package/dist/doctor/checks/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/providers/discover.d.ts +3 -8
- package/dist/integrations/providers/discover.d.ts.map +1 -1
- package/dist/integrations/providers/discover.js +2 -12
- package/dist/integrations/providers/discover.js.map +1 -1
- package/dist/integrations/providers/discover.test.js +1 -28
- package/dist/integrations/providers/discover.test.js.map +1 -1
- package/dist/integrations/providers/index.d.ts +0 -1
- package/dist/integrations/providers/index.d.ts.map +1 -1
- package/dist/integrations/providers/index.js +0 -1
- package/dist/integrations/providers/index.js.map +1 -1
- package/dist/integrations/providers/oauth.d.ts +1 -1
- package/dist/integrations/providers/oauth.js +1 -1
- package/dist/integrations/providers/preferences.d.ts +2 -2
- package/dist/integrations/providers/preferences.js +2 -2
- package/dist/integrations/sessions/store.js +1 -1
- package/dist/integrations/sessions/store.js.map +1 -1
- package/dist/integrations/subagents/__tests__/delegation-trace.test.d.ts +2 -0
- package/dist/integrations/subagents/__tests__/delegation-trace.test.d.ts.map +1 -0
- package/dist/integrations/subagents/__tests__/delegation-trace.test.js +69 -0
- package/dist/integrations/subagents/__tests__/delegation-trace.test.js.map +1 -0
- package/dist/integrations/subagents/runtime.d.ts.map +1 -1
- package/dist/integrations/subagents/runtime.js +12 -2
- package/dist/integrations/subagents/runtime.js.map +1 -1
- package/dist/integrations/updates.d.ts +4 -12
- package/dist/integrations/updates.d.ts.map +1 -1
- package/dist/integrations/updates.js +6 -53
- package/dist/integrations/updates.js.map +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +42 -141
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/Picker.d.ts +4 -4
- package/dist/tui/Picker.d.ts.map +1 -1
- package/dist/tui/Picker.js +6 -8
- package/dist/tui/Picker.js.map +1 -1
- package/dist/tui/StatusBar.d.ts +39 -3
- package/dist/tui/StatusBar.d.ts.map +1 -1
- package/dist/tui/StatusBar.js +33 -9
- package/dist/tui/StatusBar.js.map +1 -1
- package/dist/tui/__tests__/context-gauge.test.d.ts +2 -0
- package/dist/tui/__tests__/context-gauge.test.d.ts.map +1 -0
- package/dist/tui/__tests__/context-gauge.test.js +83 -0
- package/dist/tui/__tests__/context-gauge.test.js.map +1 -0
- package/dist/tui/__tests__/deferred-tool-discovery.test.d.ts +24 -0
- package/dist/tui/__tests__/deferred-tool-discovery.test.d.ts.map +1 -0
- package/dist/tui/__tests__/deferred-tool-discovery.test.js +111 -0
- package/dist/tui/__tests__/deferred-tool-discovery.test.js.map +1 -0
- package/dist/tui/__tests__/to-agent-event.test.js +181 -0
- package/dist/tui/__tests__/to-agent-event.test.js.map +1 -1
- package/dist/tui/__tests__/working-directory.test.js +0 -6
- package/dist/tui/__tests__/working-directory.test.js.map +1 -1
- package/dist/tui/agent.d.ts +38 -2
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/agent.js +110 -31
- package/dist/tui/agent.js.map +1 -1
- package/dist/tui/slashCommands.d.ts +0 -6
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/tui/slashCommands.js +1 -21
- package/dist/tui/slashCommands.js.map +1 -1
- package/dist/tui/types.d.ts +12 -0
- package/dist/tui/types.d.ts.map +1 -1
- package/package.json +5 -6
- package/dist/commands/tools.d.ts +0 -16
- package/dist/commands/tools.d.ts.map +0 -1
- package/dist/commands/tools.js +0 -161
- package/dist/commands/tools.js.map +0 -1
- package/dist/integrations/clawtool/agents.d.ts +0 -31
- package/dist/integrations/clawtool/agents.d.ts.map +0 -1
- package/dist/integrations/clawtool/agents.js +0 -30
- package/dist/integrations/clawtool/agents.js.map +0 -1
- package/dist/integrations/clawtool/agents.test.d.ts +0 -2
- package/dist/integrations/clawtool/agents.test.d.ts.map +0 -1
- package/dist/integrations/clawtool/agents.test.js +0 -79
- package/dist/integrations/clawtool/agents.test.js.map +0 -1
- package/dist/integrations/clawtool/auth.d.ts +0 -26
- package/dist/integrations/clawtool/auth.d.ts.map +0 -1
- package/dist/integrations/clawtool/auth.js +0 -56
- package/dist/integrations/clawtool/auth.js.map +0 -1
- package/dist/integrations/clawtool/auth.test.d.ts +0 -2
- package/dist/integrations/clawtool/auth.test.d.ts.map +0 -1
- package/dist/integrations/clawtool/auth.test.js +0 -40
- package/dist/integrations/clawtool/auth.test.js.map +0 -1
- package/dist/integrations/clawtool/binary.d.ts +0 -25
- package/dist/integrations/clawtool/binary.d.ts.map +0 -1
- package/dist/integrations/clawtool/binary.js +0 -50
- package/dist/integrations/clawtool/binary.js.map +0 -1
- package/dist/integrations/clawtool/binary.test.d.ts +0 -2
- package/dist/integrations/clawtool/binary.test.d.ts.map +0 -1
- package/dist/integrations/clawtool/binary.test.js +0 -50
- package/dist/integrations/clawtool/binary.test.js.map +0 -1
- package/dist/integrations/clawtool/daemon.d.ts +0 -37
- package/dist/integrations/clawtool/daemon.d.ts.map +0 -1
- package/dist/integrations/clawtool/daemon.js +0 -109
- package/dist/integrations/clawtool/daemon.js.map +0 -1
- package/dist/integrations/clawtool/daemon.test.d.ts +0 -11
- package/dist/integrations/clawtool/daemon.test.d.ts.map +0 -1
- package/dist/integrations/clawtool/daemon.test.js +0 -118
- package/dist/integrations/clawtool/daemon.test.js.map +0 -1
- package/dist/integrations/clawtool/dispatch.d.ts +0 -33
- package/dist/integrations/clawtool/dispatch.d.ts.map +0 -1
- package/dist/integrations/clawtool/dispatch.js +0 -155
- package/dist/integrations/clawtool/dispatch.js.map +0 -1
- package/dist/integrations/clawtool/dispatch.test.d.ts +0 -2
- package/dist/integrations/clawtool/dispatch.test.d.ts.map +0 -1
- package/dist/integrations/clawtool/dispatch.test.js +0 -138
- package/dist/integrations/clawtool/dispatch.test.js.map +0 -1
- package/dist/integrations/clawtool/index.d.ts +0 -11
- package/dist/integrations/clawtool/index.d.ts.map +0 -1
- package/dist/integrations/clawtool/index.js +0 -10
- package/dist/integrations/clawtool/index.js.map +0 -1
- package/dist/integrations/clawtool/mcp.d.ts +0 -51
- package/dist/integrations/clawtool/mcp.d.ts.map +0 -1
- package/dist/integrations/clawtool/mcp.js +0 -174
- package/dist/integrations/clawtool/mcp.js.map +0 -1
- package/dist/integrations/clawtool/mcp.test.d.ts +0 -2
- package/dist/integrations/clawtool/mcp.test.d.ts.map +0 -1
- package/dist/integrations/clawtool/mcp.test.js +0 -126
- package/dist/integrations/clawtool/mcp.test.js.map +0 -1
- package/dist/integrations/clawtool/paths.d.ts +0 -8
- package/dist/integrations/clawtool/paths.d.ts.map +0 -1
- package/dist/integrations/clawtool/paths.js +0 -19
- package/dist/integrations/clawtool/paths.js.map +0 -1
- package/dist/integrations/clawtool/peers.d.ts +0 -67
- package/dist/integrations/clawtool/peers.d.ts.map +0 -1
- package/dist/integrations/clawtool/peers.js +0 -150
- package/dist/integrations/clawtool/peers.js.map +0 -1
- package/dist/integrations/clawtool/plugin.d.ts +0 -42
- package/dist/integrations/clawtool/plugin.d.ts.map +0 -1
- package/dist/integrations/clawtool/plugin.js +0 -38
- package/dist/integrations/clawtool/plugin.js.map +0 -1
- package/dist/integrations/clawtool/state.d.ts +0 -11
- package/dist/integrations/clawtool/state.d.ts.map +0 -1
- package/dist/integrations/clawtool/state.js +0 -41
- package/dist/integrations/clawtool/state.js.map +0 -1
- package/dist/integrations/clawtool/state.test.d.ts +0 -2
- package/dist/integrations/clawtool/state.test.d.ts.map +0 -1
- package/dist/integrations/clawtool/state.test.js +0 -38
- package/dist/integrations/clawtool/state.test.js.map +0 -1
- package/dist/integrations/clawtool/tooling.d.ts +0 -52
- package/dist/integrations/clawtool/tooling.d.ts.map +0 -1
- package/dist/integrations/clawtool/tooling.js +0 -91
- package/dist/integrations/clawtool/tooling.js.map +0 -1
- package/dist/integrations/clawtool/tooling.test.d.ts +0 -2
- package/dist/integrations/clawtool/tooling.test.d.ts.map +0 -1
- package/dist/integrations/clawtool/tooling.test.js +0 -58
- package/dist/integrations/clawtool/tooling.test.js.map +0 -1
- package/dist/integrations/clawtool/types.d.ts +0 -41
- package/dist/integrations/clawtool/types.d.ts.map +0 -1
- package/dist/integrations/clawtool/types.js +0 -9
- package/dist/integrations/clawtool/types.js.map +0 -1
- package/dist/integrations/providers/secrets.d.ts +0 -37
- package/dist/integrations/providers/secrets.d.ts.map +0 -1
- package/dist/integrations/providers/secrets.js +0 -69
- package/dist/integrations/providers/secrets.js.map +0 -1
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared types for the clawtool integration.
|
|
3
|
-
*
|
|
4
|
-
* Wire shapes mirror clawtool's Go source (cogitave/clawtool) verbatim so
|
|
5
|
-
* upgrades on the clawtool side stay backwards-compatible without TS
|
|
6
|
-
* changes. The source of truth for each shape is cited inline.
|
|
7
|
-
*/
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/integrations/clawtool/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reader for clawtool's `~/.config/clawtool/secrets.toml`.
|
|
3
|
-
*
|
|
4
|
-
* Schema (per clawtool's `internal/config/portals_io.go`):
|
|
5
|
-
*
|
|
6
|
-
* [secrets.work]
|
|
7
|
-
* ANTHROPIC_API_KEY = "sk-ant-..."
|
|
8
|
-
* OPENAI_API_KEY = "sk-..."
|
|
9
|
-
*
|
|
10
|
-
* [secrets.personal]
|
|
11
|
-
* OPENROUTER_API_KEY = "..."
|
|
12
|
-
*
|
|
13
|
-
* Namzu treats each `[secrets.X]` section as a candidate credential
|
|
14
|
-
* bundle — the env-var keys inside are the same names as native env
|
|
15
|
-
* vars (e.g. `ANTHROPIC_API_KEY`). We flatten every section into a
|
|
16
|
-
* single `Map<envVarName, value[]>` so the discoverer can ask "does any
|
|
17
|
-
* source have ANTHROPIC_API_KEY?" without caring which scope it came
|
|
18
|
-
* from. Multiple sections can carry the same key; we keep all values
|
|
19
|
-
* so the picker can present them as distinct candidates if the user
|
|
20
|
-
* has multiple Anthropic accounts.
|
|
21
|
-
*/
|
|
22
|
-
export interface SecretCandidate {
|
|
23
|
-
/** Env-var name as it would appear at runtime (e.g. `ANTHROPIC_API_KEY`). */
|
|
24
|
-
readonly envName: string;
|
|
25
|
-
readonly value: string;
|
|
26
|
-
/** Which `[secrets.X]` section it came from (e.g. `work`, `personal`). */
|
|
27
|
-
readonly scope: string;
|
|
28
|
-
}
|
|
29
|
-
export declare function clawtoolSecretsPath(home?: string): string;
|
|
30
|
-
/**
|
|
31
|
-
* Read clawtool's secrets.toml and return a flat array of every
|
|
32
|
-
* env-var-style credential it carries, tagged by scope. Returns `[]`
|
|
33
|
-
* when the file is missing or unparseable — never throws (this is an
|
|
34
|
-
* optional discovery source).
|
|
35
|
-
*/
|
|
36
|
-
export declare function readClawtoolSecrets(home?: string): readonly SecretCandidate[];
|
|
37
|
-
//# sourceMappingURL=secrets.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../../src/integrations/providers/secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAQH,MAAM,WAAW,eAAe;IAC/B,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACtB;AAED,wBAAgB,mBAAmB,CAAC,IAAI,GAAE,MAAkB,GAAG,MAAM,CAEpE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,GAAE,MAAkB,GAAG,SAAS,eAAe,EAAE,CA4BxF"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reader for clawtool's `~/.config/clawtool/secrets.toml`.
|
|
3
|
-
*
|
|
4
|
-
* Schema (per clawtool's `internal/config/portals_io.go`):
|
|
5
|
-
*
|
|
6
|
-
* [secrets.work]
|
|
7
|
-
* ANTHROPIC_API_KEY = "sk-ant-..."
|
|
8
|
-
* OPENAI_API_KEY = "sk-..."
|
|
9
|
-
*
|
|
10
|
-
* [secrets.personal]
|
|
11
|
-
* OPENROUTER_API_KEY = "..."
|
|
12
|
-
*
|
|
13
|
-
* Namzu treats each `[secrets.X]` section as a candidate credential
|
|
14
|
-
* bundle — the env-var keys inside are the same names as native env
|
|
15
|
-
* vars (e.g. `ANTHROPIC_API_KEY`). We flatten every section into a
|
|
16
|
-
* single `Map<envVarName, value[]>` so the discoverer can ask "does any
|
|
17
|
-
* source have ANTHROPIC_API_KEY?" without caring which scope it came
|
|
18
|
-
* from. Multiple sections can carry the same key; we keep all values
|
|
19
|
-
* so the picker can present them as distinct candidates if the user
|
|
20
|
-
* has multiple Anthropic accounts.
|
|
21
|
-
*/
|
|
22
|
-
import { readFileSync } from 'node:fs';
|
|
23
|
-
import { homedir } from 'node:os';
|
|
24
|
-
import { join } from 'node:path';
|
|
25
|
-
import { parse as tomlParse } from 'smol-toml';
|
|
26
|
-
export function clawtoolSecretsPath(home = homedir()) {
|
|
27
|
-
return join(home, '.config', 'clawtool', 'secrets.toml');
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Read clawtool's secrets.toml and return a flat array of every
|
|
31
|
-
* env-var-style credential it carries, tagged by scope. Returns `[]`
|
|
32
|
-
* when the file is missing or unparseable — never throws (this is an
|
|
33
|
-
* optional discovery source).
|
|
34
|
-
*/
|
|
35
|
-
export function readClawtoolSecrets(home = homedir()) {
|
|
36
|
-
const path = clawtoolSecretsPath(home);
|
|
37
|
-
let raw;
|
|
38
|
-
try {
|
|
39
|
-
raw = readFileSync(path, 'utf8');
|
|
40
|
-
}
|
|
41
|
-
catch {
|
|
42
|
-
return [];
|
|
43
|
-
}
|
|
44
|
-
let parsed;
|
|
45
|
-
try {
|
|
46
|
-
parsed = tomlParse(raw);
|
|
47
|
-
}
|
|
48
|
-
catch {
|
|
49
|
-
return [];
|
|
50
|
-
}
|
|
51
|
-
if (typeof parsed !== 'object' || parsed === null)
|
|
52
|
-
return [];
|
|
53
|
-
const root = parsed;
|
|
54
|
-
const secrets = root.secrets;
|
|
55
|
-
if (typeof secrets !== 'object' || secrets === null)
|
|
56
|
-
return [];
|
|
57
|
-
const out = [];
|
|
58
|
-
for (const [scope, section] of Object.entries(secrets)) {
|
|
59
|
-
if (typeof section !== 'object' || section === null)
|
|
60
|
-
continue;
|
|
61
|
-
for (const [envName, value] of Object.entries(section)) {
|
|
62
|
-
if (typeof value === 'string' && value.length > 0) {
|
|
63
|
-
out.push({ envName, value, scope });
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return out;
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=secrets.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"secrets.js","sourceRoot":"","sources":["../../../src/integrations/providers/secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,WAAW,CAAA;AAU9C,MAAM,UAAU,mBAAmB,CAAC,OAAe,OAAO,EAAE;IAC3D,OAAO,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,CAAC,CAAA;AACzD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAe,OAAO,EAAE;IAC3D,MAAM,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAA;IACtC,IAAI,GAAW,CAAA;IACf,IAAI,CAAC;QACJ,GAAG,GAAG,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IACjC,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,EAAE,CAAA;IACV,CAAC;IACD,IAAI,MAAe,CAAA;IACnB,IAAI,CAAC;QACJ,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,CAAA;IACxB,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,EAAE,CAAA;IACV,CAAC;IACD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,EAAE,CAAA;IAC5D,MAAM,IAAI,GAAG,MAAiC,CAAA;IAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;IAC5B,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,EAAE,CAAA;IAC9D,MAAM,GAAG,GAAsB,EAAE,CAAA;IACjC,KAAK,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAkC,CAAC,EAAE,CAAC;QACnF,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI;YAAE,SAAQ;QAC7D,KAAK,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAkC,CAAC,EAAE,CAAC;YACnF,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACnD,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAA;YACpC,CAAC;QACF,CAAC;IACF,CAAC;IACD,OAAO,GAAG,CAAA;AACX,CAAC"}
|