@namzu/cli 0.5.1 → 0.7.0
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__/resume.test.d.ts +15 -0
- package/dist/commands/__tests__/resume.test.d.ts.map +1 -0
- package/dist/commands/__tests__/resume.test.js +116 -0
- package/dist/commands/__tests__/resume.test.js.map +1 -0
- package/dist/commands/__tests__/run-flags.test.d.ts +11 -0
- package/dist/commands/__tests__/run-flags.test.d.ts.map +1 -0
- package/dist/commands/__tests__/run-flags.test.js +189 -0
- package/dist/commands/__tests__/run-flags.test.js.map +1 -0
- package/dist/commands/__tests__/run-stream-flags.test.js +160 -11
- package/dist/commands/__tests__/run-stream-flags.test.js.map +1 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/resume.d.ts +60 -0
- package/dist/commands/resume.d.ts.map +1 -0
- package/dist/commands/resume.js +107 -0
- package/dist/commands/resume.js.map +1 -0
- package/dist/commands/run-flags.d.ts +76 -0
- package/dist/commands/run-flags.d.ts.map +1 -0
- package/dist/commands/run-flags.js +163 -0
- package/dist/commands/run-flags.js.map +1 -0
- package/dist/commands/run-stream.d.ts +3 -39
- package/dist/commands/run-stream.d.ts.map +1 -1
- package/dist/commands/run-stream.js +74 -101
- package/dist/commands/run-stream.js.map +1 -1
- package/dist/commands/run.d.ts +25 -0
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +189 -16
- 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 +9 -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/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/permissions/__tests__/mode.test.d.ts +10 -0
- package/dist/permissions/__tests__/mode.test.d.ts.map +1 -0
- package/dist/permissions/__tests__/mode.test.js +115 -0
- package/dist/permissions/__tests__/mode.test.js.map +1 -0
- package/dist/permissions/__tests__/rules.test.d.ts +10 -0
- package/dist/permissions/__tests__/rules.test.d.ts.map +1 -0
- package/dist/permissions/__tests__/rules.test.js +196 -0
- package/dist/permissions/__tests__/rules.test.js.map +1 -0
- package/dist/permissions/mode.d.ts +64 -0
- package/dist/permissions/mode.d.ts.map +1 -0
- package/dist/permissions/mode.js +32 -0
- package/dist/permissions/mode.js.map +1 -0
- package/dist/permissions/rules.d.ts +105 -0
- package/dist/permissions/rules.d.ts.map +1 -0
- package/dist/permissions/rules.js +163 -0
- package/dist/permissions/rules.js.map +1 -0
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +29 -133
- 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/__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 +88 -0
- package/dist/tui/__tests__/to-agent-event.test.js.map +1 -1
- package/dist/tui/__tests__/working-directory.test.d.ts +13 -0
- package/dist/tui/__tests__/working-directory.test.d.ts.map +1 -0
- package/dist/tui/__tests__/working-directory.test.js +109 -0
- package/dist/tui/__tests__/working-directory.test.js.map +1 -0
- package/dist/tui/agent.d.ts +46 -5
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/agent.js +140 -43
- 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 +4 -5
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stubs.d.ts","sourceRoot":"","sources":["../../src/commands/stubs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAkB,MAAM,YAAY,CAAA;AAa5D,eAAO,MAAM,aAAa,EAAE,UAI3B,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,UAS1B,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,SAAS,UAAU,EAAkC,CAAA"}
|
|
1
|
+
{"version":3,"file":"stubs.d.ts","sourceRoot":"","sources":["../../src/commands/stubs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAkB,MAAM,YAAY,CAAA;AAa5D,eAAO,MAAM,aAAa,EAAE,UAI3B,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,EAAE,UAS1B,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,SAAS,UAAU,EAAkC,CAAA"}
|
package/dist/commands/stubs.js
CHANGED
|
@@ -20,11 +20,21 @@ export const skillsCommand = {
|
|
|
20
20
|
description: 'Manage agentskills.io-compatible skills (M5)',
|
|
21
21
|
handler: stubHandler('M5', 'the skills subsystem'),
|
|
22
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* Kept as a command rather than deleted, because someone typing it deserves an
|
|
25
|
+
* answer and "unknown command" is a worse one.
|
|
26
|
+
*
|
|
27
|
+
* Its previous answer was the second half of a sentence that no longer has a
|
|
28
|
+
* first half: it said cross-agent coordination came from an external daemon, so
|
|
29
|
+
* there was no separate namzu one. That integration is gone, and the honest
|
|
30
|
+
* replacement is the other claim outright rather than a different name — namzu
|
|
31
|
+
* has no daemon and no coordination surface today.
|
|
32
|
+
*/
|
|
23
33
|
export const serveCommand = {
|
|
24
34
|
name: 'serve',
|
|
25
|
-
description: '
|
|
35
|
+
description: 'namzu has no daemon; a run is a process',
|
|
26
36
|
handler: async ({ ctx }) => {
|
|
27
|
-
ctx.formatter.info('namzu
|
|
37
|
+
ctx.formatter.info('namzu has no daemon and no cross-agent coordination surface. A run is an ordinary process: start one with `namzu`, or drive the SDK directly from your own service. Nothing needs to be running first.');
|
|
28
38
|
return 0;
|
|
29
39
|
},
|
|
30
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stubs.js","sourceRoot":"","sources":["../../src/commands/stubs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,SAAS,WAAW,CAAC,SAAiB,EAAE,IAAY;IACnD,OAAO,KAAK,EAAE,EAAE,G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O,CAAC,CAAA;IACT,CAAC;CACD,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAA0B,CAAC,aAAa,EAAE,YAAY,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/config/load.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/config/load.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAUH,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjE,MAAM,WAAW,iBAAiB;IACjC,8CAA8C;IAC9C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,gEAAgE;IAChE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;IACrB,wCAAwC;IACxC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;CAChC;AAED,wBAAgB,UAAU,CAAC,IAAI,GAAE,iBAAsB,GAAG,cAAc,CAavE"}
|
package/dist/config/load.js
CHANGED
|
@@ -51,6 +51,14 @@ function readJsonIfExists(path) {
|
|
|
51
51
|
return {};
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
+
const CONFIG_READERS = {
|
|
55
|
+
format: (v) => (typeof v === 'string' && isFormatName(v) ? v : undefined),
|
|
56
|
+
quiet: (v) => (typeof v === 'boolean' ? v : undefined),
|
|
57
|
+
// Shape only. Per-entry validation belongs to `compilePermissions`, which
|
|
58
|
+
// reports a bad effect or an unusable pattern as a diagnostic the user
|
|
59
|
+
// sees; dropping those entries here would silence it.
|
|
60
|
+
permissions: (v) => typeof v === 'object' && v !== null && !Array.isArray(v) ? v : undefined,
|
|
61
|
+
};
|
|
54
62
|
function readEnv(env) {
|
|
55
63
|
const out = {};
|
|
56
64
|
const format = env.NAMZU_FORMAT;
|
|
@@ -69,12 +77,20 @@ function sanitize(value) {
|
|
|
69
77
|
return {};
|
|
70
78
|
const v = value;
|
|
71
79
|
const out = {};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
for (const key of Object.keys(CONFIG_READERS)) {
|
|
81
|
+
if (!(key in v))
|
|
82
|
+
continue;
|
|
83
|
+
const parsed = CONFIG_READERS[key](v[key]);
|
|
84
|
+
// One assignment through a widened view, rather than a cast on the
|
|
85
|
+
// result: the key/reader pairing is what `ConfigReaders` proves.
|
|
86
|
+
if (parsed !== undefined)
|
|
87
|
+
out[key] = parsed;
|
|
88
|
+
}
|
|
76
89
|
return out;
|
|
77
90
|
}
|
|
91
|
+
// Returns `MutableConfig`, which is assignable to `NamzuCliConfig` because it
|
|
92
|
+
// is derived from it. No cast — a field this function cannot carry is now a
|
|
93
|
+
// compile error rather than a value that quietly never arrives.
|
|
78
94
|
function mergeConfigs(...sources) {
|
|
79
95
|
const out = {};
|
|
80
96
|
for (const src of sources)
|
package/dist/config/load.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.js","sourceRoot":"","sources":["../../src/config/load.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEzC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAA;AAEzC,OAAO,
|
|
1
|
+
{"version":3,"file":"load.js","sourceRoot":"","sources":["../../src/config/load.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAA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AE,GAAG,CAAC,KAAK,GAAG,KAAK,CAAA;IACzD,OAAO,GAAG,CAAA;AACX,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC/B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,EAAE,CAAA;IAC1D,MAAM,CAAC,GAAG,KAAgC,CAAA;IAC1C,MAAM,GAAG,GAAkB,EAAE,CAAA;IAC7B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,cAAc,CAA6B,EAAE,CAAC;QAC3E,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;YAAE,SAAQ;QACzB,MAAM,MAAM,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,mEAAmE;QACnE,iEAAiE;QACjE,IAAI,MAAM,KAAK,SAAS;YAAG,GAA+B,CAAC,GAAG,CAAC,GAAG,MAAM,CAAA;IACzE,CAAC;IACD,OAAO,GAAG,CAAA;AACX,CAAC;AAED,8EAA8E;AAC9E,4EAA4E;AAC5E,gEAAgE;AAChE,SAAS,YAAY,CAAC,GAAG,OAAiC;IACzD,MAAM,GAAG,GAAkB,EAAE,CAAA;IAC7B,KAAK,MAAM,GAAG,IAAI,OAAO;QAAE,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;IAClD,OAAO,GAAG,CAAA;AACX,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY;IAC7B,IAAI,CAAC;QACJ,OAAO,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAClC,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,IAAI,CAAA;IACZ,CAAC;AACF,CAAC"}
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -7,23 +7,20 @@
|
|
|
7
7
|
* are worth enforcing at runtime — premature now.
|
|
8
8
|
*/
|
|
9
9
|
import type { FormatName } from '../output/index.js';
|
|
10
|
-
|
|
11
|
-
/** Absolute path to the clawtool binary; overrides PATH lookup. */
|
|
12
|
-
readonly binary?: string;
|
|
13
|
-
/** HTTP base URL (e.g. http://127.0.0.1:8765); overrides daemon-state discovery. */
|
|
14
|
-
readonly endpoint?: string;
|
|
15
|
-
/** Override the bearer token (raw, no `Bearer ` prefix). */
|
|
16
|
-
readonly token?: string;
|
|
17
|
-
/** Spawn the daemon automatically if not running. Defaults to true. */
|
|
18
|
-
readonly autoStart?: boolean;
|
|
19
|
-
}
|
|
10
|
+
import type { PermissionsConfig } from '../permissions/rules.js';
|
|
20
11
|
export interface NamzuCliConfig {
|
|
21
12
|
/** Default output format when not overridden by --format. */
|
|
22
13
|
readonly format?: FormatName;
|
|
23
14
|
/** Default quiet mode. */
|
|
24
15
|
readonly quiet?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Which tools may run without asking, keyed by tool name.
|
|
18
|
+
*
|
|
19
|
+
* A value is `"allow" | "ask" | "deny"`, or a table of argument patterns
|
|
20
|
+
* mapping to those. Absent means every mutating tool prompts, which is what
|
|
21
|
+
* it meant before this existed — the absence of a policy never widens one.
|
|
22
|
+
*/
|
|
23
|
+
readonly permissions?: PermissionsConfig;
|
|
27
24
|
}
|
|
28
25
|
export declare const DEFAULT_CONFIG: NamzuCliConfig;
|
|
29
26
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAEhE,MAAM,WAAW,cAAc;IAC9B,6DAA6D;IAC7D,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAA;IAC5B,0BAA0B;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;IACxB;;;;;;OAMG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,iBAAiB,CAAA;CACxC;AAED,eAAO,MAAM,cAAc,EAAE,cAG3B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAoBH,MAAM,CAAC,MAAM,cAAc,GAAmB,MAAM,CAAC,MAAM,CAAC;IAC3D,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,KAAK;CACZ,CAAC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { DoctorCheck } from '@namzu/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Which credential sources namzu actually scanned, and what each yielded.
|
|
4
|
+
*
|
|
5
|
+
* This check exists because a source was *removed*. namzu used to read the
|
|
6
|
+
* secrets file of an external peer daemon it integrated with, and a user could
|
|
7
|
+
* have a working namzu with no environment variable set anywhere. When that
|
|
8
|
+
* integration went, their credential stopped being found — and the failure is
|
|
9
|
+
* an absence, not an error: the picker simply opens as though they never had
|
|
10
|
+
* one.
|
|
11
|
+
*
|
|
12
|
+
* `doctor` is the command someone runs when a credential stops being found, so
|
|
13
|
+
* the sentence explaining it does work here. Anywhere else it would sit where
|
|
14
|
+
* nobody looks.
|
|
15
|
+
*
|
|
16
|
+
* The list below is not written down twice: it is derived from what discovery
|
|
17
|
+
* returned, so it cannot drift from what discovery does.
|
|
18
|
+
*/
|
|
19
|
+
export declare const credentialSourcesCheck: DoctorCheck;
|
|
20
|
+
//# sourceMappingURL=credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../src/doctor/checks/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAqB,MAAM,YAAY,CAAA;AAIhE;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,sBAAsB,EAAE,WAwCpC,CAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { discoverProviders } from '../../integrations/providers/discover.js';
|
|
2
|
+
/**
|
|
3
|
+
* Which credential sources namzu actually scanned, and what each yielded.
|
|
4
|
+
*
|
|
5
|
+
* This check exists because a source was *removed*. namzu used to read the
|
|
6
|
+
* secrets file of an external peer daemon it integrated with, and a user could
|
|
7
|
+
* have a working namzu with no environment variable set anywhere. When that
|
|
8
|
+
* integration went, their credential stopped being found — and the failure is
|
|
9
|
+
* an absence, not an error: the picker simply opens as though they never had
|
|
10
|
+
* one.
|
|
11
|
+
*
|
|
12
|
+
* `doctor` is the command someone runs when a credential stops being found, so
|
|
13
|
+
* the sentence explaining it does work here. Anywhere else it would sit where
|
|
14
|
+
* nobody looks.
|
|
15
|
+
*
|
|
16
|
+
* The list below is not written down twice: it is derived from what discovery
|
|
17
|
+
* returned, so it cannot drift from what discovery does.
|
|
18
|
+
*/
|
|
19
|
+
export const credentialSourcesCheck = {
|
|
20
|
+
id: 'providers.credentials',
|
|
21
|
+
category: 'providers',
|
|
22
|
+
run: async () => {
|
|
23
|
+
let detected;
|
|
24
|
+
try {
|
|
25
|
+
detected = await discoverProviders();
|
|
26
|
+
}
|
|
27
|
+
catch (err) {
|
|
28
|
+
// Discovery is documented as non-throwing; if that ever stops being
|
|
29
|
+
// true, say which step failed rather than reporting "no credentials".
|
|
30
|
+
return {
|
|
31
|
+
status: 'inconclusive',
|
|
32
|
+
message: `credential discovery failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
if (detected.length === 0) {
|
|
36
|
+
return {
|
|
37
|
+
status: 'warn',
|
|
38
|
+
message: 'no LLM credential found',
|
|
39
|
+
remediation: 'namzu scans environment variables (ANTHROPIC_API_KEY, OPENAI_API_KEY, OPENROUTER_API_KEY, …), the macOS Keychain, and local servers (Ollama, LM Studio). It no longer reads the secrets file of the peer daemon it used to integrate with — that integration was removed in @namzu/cli 0.7.0. If your key lived only in that file, export it as one of the environment variables above.',
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
const lines = detected.map((d) => {
|
|
43
|
+
switch (d.source.kind) {
|
|
44
|
+
case 'env':
|
|
45
|
+
return `${d.entry.id} (env · ${d.source.envName})`;
|
|
46
|
+
case 'keychain':
|
|
47
|
+
return `${d.entry.id} (keychain · ${d.source.service})`;
|
|
48
|
+
case 'probe':
|
|
49
|
+
return `${d.entry.id} (local · ${d.source.url.replace(/^https?:\/\//, '')})`;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
return {
|
|
53
|
+
status: 'pass',
|
|
54
|
+
message: `${detected.length} provider credential(s) found: ${lines.join(', ')}`,
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../../src/doctor/checks/credentials.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAA;AAE5E;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAgB;IAClD,EAAE,EAAE,uBAAuB;IAC3B,QAAQ,EAAE,WAAW;IACrB,GAAG,EAAE,KAAK,IAAgC,EAAE;QAC3C,IAAI,QAAuD,CAAA;QAC3D,IAAI,CAAC;YACJ,QAAQ,GAAG,MAAM,iBAAiB,EAAE,CAAA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|
+
*
|
|
4
|
+
* A user whose key lived only in the removed daemon's secrets file does not get
|
|
5
|
+
* an error when it goes — they get an absence: discovery returns nothing and
|
|
6
|
+
* the picker opens as though they never had a credential. `doctor` is the
|
|
7
|
+
* command reached for at that moment, so the explanation has to be there.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=credentials.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.test.d.ts","sourceRoot":"","sources":["../../../src/doctor/checks/credentials.test.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The removed credential source is explained where someone would look for it.
|
|
3
|
+
*
|
|
4
|
+
* A user whose key lived only in the removed daemon's secrets file does not get
|
|
5
|
+
* an error when it goes — they get an absence: discovery returns nothing and
|
|
6
|
+
* the picker opens as though they never had a credential. `doctor` is the
|
|
7
|
+
* command reached for at that moment, so the explanation has to be there.
|
|
8
|
+
*/
|
|
9
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
10
|
+
const discoverProviders = vi.fn();
|
|
11
|
+
vi.mock('../../integrations/providers/discover.js', () => ({
|
|
12
|
+
discoverProviders: () => discoverProviders(),
|
|
13
|
+
}));
|
|
14
|
+
const { credentialSourcesCheck } = await import('./credentials.js');
|
|
15
|
+
const ctx = { cwd: '/tmp', env: {}, projectRoot: null };
|
|
16
|
+
describe('the credential-sources doctor check', () => {
|
|
17
|
+
it('warns when nothing is found, and says the secrets file is no longer read', async () => {
|
|
18
|
+
discoverProviders.mockResolvedValue([]);
|
|
19
|
+
const result = await credentialSourcesCheck.run(ctx);
|
|
20
|
+
expect(result.status).toBe('warn');
|
|
21
|
+
// The load-bearing part is the remediation, not the status: a bare "no
|
|
22
|
+
// credential found" is what the picker already says, and repeating it
|
|
23
|
+
// here would leave the user exactly where the silence did.
|
|
24
|
+
expect(result.remediation).toMatch(/no longer reads the secrets file/i);
|
|
25
|
+
expect(result.remediation).toMatch(/ANTHROPIC_API_KEY/);
|
|
26
|
+
});
|
|
27
|
+
it('names the source each credential actually came from', async () => {
|
|
28
|
+
discoverProviders.mockResolvedValue([
|
|
29
|
+
{ entry: { id: 'anthropic' }, source: { kind: 'keychain', service: 'a-keychain-item' } },
|
|
30
|
+
{ entry: { id: 'openai' }, source: { kind: 'env', envName: 'OPENAI_API_KEY' } },
|
|
31
|
+
]);
|
|
32
|
+
const result = await credentialSourcesCheck.run(ctx);
|
|
33
|
+
expect(result.status).toBe('pass');
|
|
34
|
+
expect(result.message).toContain('anthropic (keychain · a-keychain-item)');
|
|
35
|
+
expect(result.message).toContain('openai (env · OPENAI_API_KEY)');
|
|
36
|
+
});
|
|
37
|
+
it('does not report "no credentials" when discovery itself failed', async () => {
|
|
38
|
+
// Discovery is documented as non-throwing. If that ever stops being true,
|
|
39
|
+
// the two states must stay distinguishable — "none found" would send the
|
|
40
|
+
// user hunting for a key that is already set.
|
|
41
|
+
discoverProviders.mockRejectedValue(new Error('keychain unreadable'));
|
|
42
|
+
const result = await credentialSourcesCheck.run(ctx);
|
|
43
|
+
expect(result.status).toBe('inconclusive');
|
|
44
|
+
expect(result.message).toContain('keychain unreadable');
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=credentials.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.test.js","sourceRoot":"","sources":["../../../src/doctor/checks/credentials.test.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAEjD,MAAM,iBAAiB,GAAG,EAAE,CAAC,EAAE,EAAE,CAAA;AACjC,EAAE,CAAC,IAAI,CAAC,0CAA0C,EAAE,GAAG,EAAE,CAAC,CAAC;IAC1D,iBAAiB,EAAE,GAAG,EAAE,CAAC,iBAAiB,EAAE;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M,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAClC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,wCAAwC,CAAC,CAAA;QAC1E,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,+BAA+B,CAAC,CAAA;IAClE,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,+DAA+D,EAAE,KAAK,IAAI,EAAE;QAC9E,0EAA0E;QAC1E,yEAAyE;QACzE,8CAA8C;QAC9C,iBAAiB,CAAC,iBAAiB,CAAC,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAA;QAErE,MAAM,MAAM,GAAG,MAAM,sBAAsB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAEpD,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;QAC1C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAA;IACxD,CAAC,CAAC,CAAA;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { DoctorCheck } from '@namzu/sdk';
|
|
2
|
+
import { credentialSourcesCheck } from './credentials.js';
|
|
2
3
|
import { providersRegisteredCheck } from './providers.js';
|
|
3
4
|
import { cwdWritableCheck, tmpdirWritableCheck } from './runtime.js';
|
|
4
5
|
import { sandboxPlatformCheck } from './sandbox.js';
|
|
5
6
|
import { telemetryInstalledCheck } from './telemetry.js';
|
|
6
7
|
import { vaultRegisteredCheck } from './vault.js';
|
|
7
|
-
export { providersRegisteredCheck, cwdWritableCheck, tmpdirWritableCheck, sandboxPlatformCheck, telemetryInstalledCheck, vaultRegisteredCheck, };
|
|
8
|
+
export { credentialSourcesCheck, providersRegisteredCheck, cwdWritableCheck, tmpdirWritableCheck, sandboxPlatformCheck, telemetryInstalledCheck, vaultRegisteredCheck, };
|
|
8
9
|
export declare const builtInDoctorChecks: readonly DoctorCheck[];
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/doctor/checks/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEjD,OAAO,EACN,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,GACpB,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,SAAS,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/doctor/checks/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEjD,OAAO,EACN,sBAAsB,EACtB,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,GACpB,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,SAAS,WAAW,EAQrD,CAAA"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import { credentialSourcesCheck } from './credentials.js';
|
|
1
2
|
import { providersRegisteredCheck } from './providers.js';
|
|
2
3
|
import { cwdWritableCheck, tmpdirWritableCheck } from './runtime.js';
|
|
3
4
|
import { sandboxPlatformCheck } from './sandbox.js';
|
|
4
5
|
import { telemetryInstalledCheck } from './telemetry.js';
|
|
5
6
|
import { vaultRegisteredCheck } from './vault.js';
|
|
6
|
-
export { providersRegisteredCheck, cwdWritableCheck, tmpdirWritableCheck, sandboxPlatformCheck, telemetryInstalledCheck, vaultRegisteredCheck, };
|
|
7
|
+
export { credentialSourcesCheck, providersRegisteredCheck, cwdWritableCheck, tmpdirWritableCheck, sandboxPlatformCheck, telemetryInstalledCheck, vaultRegisteredCheck, };
|
|
7
8
|
export const builtInDoctorChecks = [
|
|
8
9
|
sandboxPlatformCheck,
|
|
9
10
|
cwdWritableCheck,
|
|
10
11
|
tmpdirWritableCheck,
|
|
11
12
|
providersRegisteredCheck,
|
|
13
|
+
credentialSourcesCheck,
|
|
12
14
|
vaultRegisteredCheck,
|
|
13
15
|
telemetryInstalledCheck,
|
|
14
16
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/doctor/checks/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEjD,OAAO,EACN,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,GACpB,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAA2B;IAC1D,oBAAoB;IACpB,gBAAgB;IAChB,mBAAmB;IACnB,wBAAwB;IACxB,oBAAoB;IACpB,uBAAuB;CACvB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/doctor/checks/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEjD,OAAO,EACN,sBAAsB,EACtB,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,GACpB,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAA2B;IAC1D,oBAAoB;IACpB,gBAAgB;IAChB,mBAAmB;IACnB,wBAAwB;IACxB,sBAAsB;IACtB,oBAAoB;IACpB,uBAAuB;CACvB,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { createDoctorRegistry, doctor, DoctorRegistry, registerDoctorCheck, runDoctor, } from './doctor/registry.js';
|
|
7
7
|
export type { RunDoctorOptions } from './doctor/registry.js';
|
|
8
|
-
export { builtInDoctorChecks, cwdWritableCheck, providersRegisteredCheck, sandboxPlatformCheck, telemetryInstalledCheck, tmpdirWritableCheck, vaultRegisteredCheck, } from './doctor/checks/index.js';
|
|
8
|
+
export { builtInDoctorChecks, credentialSourcesCheck, cwdWritableCheck, providersRegisteredCheck, sandboxPlatformCheck, telemetryInstalledCheck, tmpdirWritableCheck, vaultRegisteredCheck, } from './doctor/checks/index.js';
|
|
9
9
|
export { runDoctorCommand } from './commands/doctor.js';
|
|
10
10
|
export { runCli, type RunCliOptions } from './cli.js';
|
|
11
11
|
export type { CommandContext, CommandDef, CommandHandler, CommandHandlerArgs, } from './commands/types.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACN,oBAAoB,EACpB,MAAM,EACN,cAAc,EACd,mBAAmB,EACnB,SAAS,GACT,MAAM,sBAAsB,CAAA;AAC7B,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,OAAO,EACN,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,GACpB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAGvD,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAA;AACrD,YAAY,EACX,cAAc,EACd,UAAU,EACV,cAAc,EACd,kBAAkB,GAClB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACN,WAAW,EACX,eAAe,EACf,KAAK,eAAe,GACpB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACN,eAAe,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,YAAY,GACZ,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACN,oBAAoB,EACpB,MAAM,EACN,cAAc,EACd,mBAAmB,EACnB,SAAS,GACT,MAAM,sBAAsB,CAAA;AAC7B,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,OAAO,EACN,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,GACpB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAGvD,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAA;AACrD,YAAY,EACX,cAAc,EACd,UAAU,EACV,cAAc,EACd,kBAAkB,GAClB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACN,WAAW,EACX,eAAe,EACf,KAAK,eAAe,GACpB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACN,eAAe,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,YAAY,GACZ,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
// Doctor library API (pre-M0; preserved for embedded consumers).
|
|
7
7
|
export { createDoctorRegistry, doctor, DoctorRegistry, registerDoctorCheck, runDoctor, } from './doctor/registry.js';
|
|
8
|
-
export { builtInDoctorChecks, cwdWritableCheck, providersRegisteredCheck, sandboxPlatformCheck, telemetryInstalledCheck, tmpdirWritableCheck, vaultRegisteredCheck, } from './doctor/checks/index.js';
|
|
8
|
+
export { builtInDoctorChecks, credentialSourcesCheck, cwdWritableCheck, providersRegisteredCheck, sandboxPlatformCheck, telemetryInstalledCheck, tmpdirWritableCheck, vaultRegisteredCheck, } from './doctor/checks/index.js';
|
|
9
9
|
export { runDoctorCommand } from './commands/doctor.js';
|
|
10
10
|
// Shell + extension surface for the CLI.
|
|
11
11
|
export { runCli } from './cli.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,iEAAiE;AACjE,OAAO,EACN,oBAAoB,EACpB,MAAM,EACN,cAAc,EACd,mBAAmB,EACnB,SAAS,GACT,MAAM,sBAAsB,CAAA;AAG7B,OAAO,EACN,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,GACpB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvD,yCAAyC;AACzC,OAAO,EAAE,MAAM,EAAsB,MAAM,UAAU,CAAA;AAOrD,OAAO,EACN,WAAW,EACX,eAAe,GAEf,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACN,eAAe,EAIf,YAAY,GACZ,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,UAAU,EAA0B,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAAE,cAAc,EAAuB,MAAM,oBAAoB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,iEAAiE;AACjE,OAAO,EACN,oBAAoB,EACpB,MAAM,EACN,cAAc,EACd,mBAAmB,EACnB,SAAS,GACT,MAAM,sBAAsB,CAAA;AAG7B,OAAO,EACN,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,GACpB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvD,yCAAyC;AACzC,OAAO,EAAE,MAAM,EAAsB,MAAM,UAAU,CAAA;AAOrD,OAAO,EACN,WAAW,EACX,eAAe,GAEf,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACN,eAAe,EAIf,YAAY,GACZ,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,UAAU,EAA0B,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAAE,cAAc,EAAuB,MAAM,oBAAoB,CAAA"}
|
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* For each entry in `PROVIDER_REGISTRY`, ask three questions in order:
|
|
5
5
|
* 1. Is one of its env vars set in `process.env`?
|
|
6
|
-
* 2.
|
|
7
|
-
* 3. Is the probe URL (if any) reachable right now?
|
|
6
|
+
* 2. Is the probe URL (if any) reachable right now?
|
|
8
7
|
*
|
|
9
8
|
* The first positive answer per provider wins; subsequent sources are
|
|
10
9
|
* recorded as "also available from" so the picker can show alternatives
|
|
11
|
-
* (e.g. anthropic via env, also
|
|
10
|
+
* (e.g. anthropic via env, also reachable as a local server).
|
|
12
11
|
*
|
|
13
12
|
* Discovery is non-throwing. Network probes have short timeouts. The
|
|
14
13
|
* picker can render immediately and refine if discovery completes later.
|
|
@@ -17,10 +16,6 @@ import { type ProviderId, type ProviderRegistryEntry } from './registry.js';
|
|
|
17
16
|
export type DetectionSource = {
|
|
18
17
|
readonly kind: 'env';
|
|
19
18
|
readonly envName: string;
|
|
20
|
-
} | {
|
|
21
|
-
readonly kind: 'secrets-toml';
|
|
22
|
-
readonly envName: string;
|
|
23
|
-
readonly scope: string;
|
|
24
19
|
} | {
|
|
25
20
|
readonly kind: 'probe';
|
|
26
21
|
readonly url: string;
|
|
@@ -51,7 +46,7 @@ export interface DetectedProvider {
|
|
|
51
46
|
export interface DiscoverOptions {
|
|
52
47
|
/** Override `process.env` for tests. */
|
|
53
48
|
readonly env?: NodeJS.ProcessEnv;
|
|
54
|
-
/** Override `homedir()` for tests
|
|
49
|
+
/** Override `homedir()` for tests. */
|
|
55
50
|
readonly home?: string;
|
|
56
51
|
/** Override the fetch impl for probe URLs (tests inject a mock). */
|
|
57
52
|
readonly fetch?: typeof fetch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../../src/integrations/providers/discover.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../../src/integrations/providers/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAqB,KAAK,UAAU,EAAE,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAE9F,MAAM,MAAM,eAAe,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAE1D,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,KAAK,EAAE,qBAAqB,CAAA;IACrC,+CAA+C;IAC/C,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAA;IAChC,mDAAmD;IACnD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,iEAAiE;IACjE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE;QAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAChF,qEAAqE;IACrE,QAAQ,CAAC,YAAY,EAAE,SAAS,eAAe,EAAE,CAAA;CACjD;AAED,MAAM,WAAW,eAAe;IAC/B,wCAAwC;IACxC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;IAChC,sCAAsC;IACtC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,oEAAoE;IACpE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;IAC7B,0CAA0C;IAC1C,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;IAChC,0DAA0D;IAC1D,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B,6DAA6D;IAC7D,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAC/B;AAID,wBAAsB,iBAAiB,CACtC,IAAI,GAAE,eAAoB,GACxB,OAAO,CAAC,SAAS,gBAAgB,EAAE,CAAC,CA4DtC;AAmBD,yEAAyE;AACzE,wBAAgB,YAAY,CAC3B,IAAI,EAAE,SAAS,gBAAgB,EAAE,EACjC,EAAE,EAAE,UAAU,GACZ,gBAAgB,GAAG,IAAI,CAEzB"}
|
|
@@ -3,23 +3,20 @@
|
|
|
3
3
|
*
|
|
4
4
|
* For each entry in `PROVIDER_REGISTRY`, ask three questions in order:
|
|
5
5
|
* 1. Is one of its env vars set in `process.env`?
|
|
6
|
-
* 2.
|
|
7
|
-
* 3. Is the probe URL (if any) reachable right now?
|
|
6
|
+
* 2. Is the probe URL (if any) reachable right now?
|
|
8
7
|
*
|
|
9
8
|
* The first positive answer per provider wins; subsequent sources are
|
|
10
9
|
* recorded as "also available from" so the picker can show alternatives
|
|
11
|
-
* (e.g. anthropic via env, also
|
|
10
|
+
* (e.g. anthropic via env, also reachable as a local server).
|
|
12
11
|
*
|
|
13
12
|
* Discovery is non-throwing. Network probes have short timeouts. The
|
|
14
13
|
* picker can render immediately and refine if discovery completes later.
|
|
15
14
|
*/
|
|
16
15
|
import { KEYCHAIN_SERVICE, readAgentKeychainCredential } from './keychain.js';
|
|
17
16
|
import { PROVIDER_REGISTRY } from './registry.js';
|
|
18
|
-
import { readClawtoolSecrets } from './secrets.js';
|
|
19
17
|
const DEFAULT_PROBE_TIMEOUT_MS = 500;
|
|
20
18
|
export async function discoverProviders(opts = {}) {
|
|
21
19
|
const env = opts.env ?? process.env;
|
|
22
|
-
const secrets = readClawtoolSecrets(opts.home);
|
|
23
20
|
const detected = [];
|
|
24
21
|
// macOS-only: read the third-party OAuth credential stored in the login
|
|
25
22
|
// Keychain once. Only anthropic consumes it, but we scan up front so
|
|
@@ -38,13 +35,6 @@ export async function discoverProviders(opts = {}) {
|
|
|
38
35
|
sources.push({ kind: 'env', envName });
|
|
39
36
|
}
|
|
40
37
|
}
|
|
41
|
-
for (const cand of secrets) {
|
|
42
|
-
if (entry.envVars.includes(cand.envName)) {
|
|
43
|
-
if (apiKey === undefined)
|
|
44
|
-
apiKey = cand.value;
|
|
45
|
-
sources.push({ kind: 'secrets-toml', envName: cand.envName, scope: cand.scope });
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
38
|
if (id === 'anthropic' && keychainCredential) {
|
|
49
39
|
if (apiKey === undefined)
|
|
50
40
|
apiKey = keychainCredential.accessToken;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../../src/integrations/providers/discover.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../../src/integrations/providers/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAA;AAC7E,OAAO,EAAE,iBAAiB,EAA+C,MAAM,eAAe,CAAA;AAwC9F,MAAM,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C,KAAK,IAAI,UAAU,CAAC,KAAK,CAAA;IAC9C,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAA;IACxC,MAAM,KAAK,GAAG,UAAU,CACvB,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EACxB,IAAI,CAAC,cAAc,IAAI,wBAAwB,CAC/C,CAAA;IACD,IAAI,CAAC;QACJ,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAA;QAC5E,OAAO,GAAG,CAAC,EAAE,CAAA;IACd,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,KAAK,CAAA;IACb,CAAC;YAAS,CAAC;QACV,YAAY,CAAC,KAAK,CAAC,CAAA;IACpB,CAAC;AACF,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,YAAY,CAC3B,IAAiC,EACjC,EAAc;IAEd,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,IAAI,CAAA;AACnD,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mkdtempSync } from 'node:fs';
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { describe, expect, it, vi } from 'vitest';
|
|
5
5
|
import { discoverProviders, findDetected } from './discover.js';
|
|
6
6
|
function tmpHome() {
|
|
7
7
|
const home = mkdtempSync(join(tmpdir(), 'namzu-discover-'));
|
|
8
|
-
mkdirSync(join(home, '.config', 'clawtool'), { recursive: true });
|
|
9
8
|
return home;
|
|
10
9
|
}
|
|
11
10
|
// Every test must opt out of host-ambient sources (Keychain, network
|
|
@@ -57,32 +56,6 @@ describe('discoverProviders — env-var scan', () => {
|
|
|
57
56
|
expect(findDetected(list, 'openai')).not.toBeNull();
|
|
58
57
|
});
|
|
59
58
|
});
|
|
60
|
-
describe('discoverProviders — clawtool secrets.toml', () => {
|
|
61
|
-
it('reads anthropic key from clawtool secrets', async () => {
|
|
62
|
-
const home = tmpHome();
|
|
63
|
-
writeFileSync(join(home, '.config', 'clawtool', 'secrets.toml'), '[secrets.work]\nANTHROPIC_API_KEY = "sk-from-toml"\n');
|
|
64
|
-
const list = await discoverProviders({ ...HERMETIC, env: {}, home });
|
|
65
|
-
const anthropic = findDetected(list, 'anthropic');
|
|
66
|
-
expect(anthropic?.apiKey).toBe('sk-from-toml');
|
|
67
|
-
if (anthropic?.source.kind === 'secrets-toml') {
|
|
68
|
-
expect(anthropic.source.scope).toBe('work');
|
|
69
|
-
expect(anthropic.source.envName).toBe('ANTHROPIC_API_KEY');
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
it('env var wins over secrets.toml when both present', async () => {
|
|
73
|
-
const home = tmpHome();
|
|
74
|
-
writeFileSync(join(home, '.config', 'clawtool', 'secrets.toml'), '[secrets.work]\nANTHROPIC_API_KEY = "from-toml"\n');
|
|
75
|
-
const list = await discoverProviders({
|
|
76
|
-
...HERMETIC,
|
|
77
|
-
env: { ANTHROPIC_API_KEY: 'from-env' },
|
|
78
|
-
home,
|
|
79
|
-
});
|
|
80
|
-
const anthropic = findDetected(list, 'anthropic');
|
|
81
|
-
expect(anthropic?.apiKey).toBe('from-env');
|
|
82
|
-
expect(anthropic?.source.kind).toBe('env');
|
|
83
|
-
expect(anthropic?.alternatives.length).toBeGreaterThan(0);
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
59
|
describe('discoverProviders — local probes', () => {
|
|
87
60
|
it('detects ollama when its probe URL is reachable', async () => {
|
|
88
61
|
const fetchMock = vi.fn().mockResolvedValue(new Response('', { status: 200 }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.test.js","sourceRoot":"","sources":["../../../src/integrations/providers/discover.test.ts"],"names":[],"mappings":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,SAAS;SAChB,CAAC,CAAA;QACF,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAA;IAChD,CAAC,CAAC,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;IAClD,EAAE,CAAC,iDAAiD,EAAE,KAAK,IAAI,EAAE;QAChE,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAAC;YACpC,GAAG,QAAQ;YACX,GAAG,EAAE,EAAE;YACP,IAAI,EAAE,OAAO,EAAE;SACf,CAAC,CAAA;QACF,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAA;IAC9C,CAAC,CAAC,CAAA;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -4,7 +4,6 @@ export { maskSecret } from './mask.js';
|
|
|
4
4
|
export { ensureFreshAnthropicToken, type OAuthMetadata, refreshAgentOAuthToken, } from './oauth.js';
|
|
5
5
|
export { type Preferences, PREFERENCES_FILE_VERSION, PreferencesError, preferencesPath, type ReadResult, readPreferences, writePreferences, } from './preferences.js';
|
|
6
6
|
export { ALL_PROVIDER_IDS, PROVIDER_REGISTRY, type ProviderId, type ProviderRegistryEntry, type SdkProviderType, } from './registry.js';
|
|
7
|
-
export { clawtoolSecretsPath, readClawtoolSecrets, type SecretCandidate } from './secrets.js';
|
|
8
7
|
export { type AnthropicProfile, type BaseProfile, type BedrockProfile, type HttpProfile, type LMStudioProfile, type OllamaProfile, type OpenAIProfile, type OpenRouterProfile, PROVIDER_TYPES, type ProviderProfile, type ProviderType, type ProvidersFile, PROVIDERS_FILE_VERSION, ProfileValidationError, TYPE_ENV_FALLBACK, isProviderType, validateProfile, } from './schema.js';
|
|
9
8
|
export { ProvidersStoreError, assertInvariants, findDefault, providersPath, readProfiles, resolveApiKey, writeProfiles, } from './store.js';
|
|
10
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,iBAAiB,EACjB,YAAY,GACZ,MAAM,eAAe,CAAA;AACtB,OAAO,EACN,KAAK,oBAAoB,EACzB,qBAAqB,EACrB,2BAA2B,GAC3B,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EACN,yBAAyB,EACzB,KAAK,aAAa,EAClB,sBAAsB,GACtB,MAAM,YAAY,CAAA;AACnB,OAAO,EACN,KAAK,WAAW,EAChB,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,EACf,KAAK,UAAU,EACf,eAAe,EACf,gBAAgB,GAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACN,gBAAgB,EAChB,iBAAiB,EACjB,KAAK,UAAU,EACf,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACpB,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,iBAAiB,EACjB,YAAY,GACZ,MAAM,eAAe,CAAA;AACtB,OAAO,EACN,KAAK,oBAAoB,EACzB,qBAAqB,EACrB,2BAA2B,GAC3B,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EACN,yBAAyB,EACzB,KAAK,aAAa,EAClB,sBAAsB,GACtB,MAAM,YAAY,CAAA;AACnB,OAAO,EACN,KAAK,WAAW,EAChB,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,EACf,KAAK,UAAU,EACf,eAAe,EACf,gBAAgB,GAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACN,gBAAgB,EAChB,iBAAiB,EACjB,KAAK,UAAU,EACf,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACpB,MAAM,eAAe,CAAA;AAGtB,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,eAAe,GACf,MAAM,aAAa,CAAA;AACpB,OAAO,EACN,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,GACb,MAAM,YAAY,CAAA"}
|
|
@@ -4,7 +4,6 @@ export { maskSecret } from './mask.js';
|
|
|
4
4
|
export { ensureFreshAnthropicToken, refreshAgentOAuthToken, } from './oauth.js';
|
|
5
5
|
export { PREFERENCES_FILE_VERSION, PreferencesError, preferencesPath, readPreferences, writePreferences, } from './preferences.js';
|
|
6
6
|
export { ALL_PROVIDER_IDS, PROVIDER_REGISTRY, } from './registry.js';
|
|
7
|
-
export { clawtoolSecretsPath, readClawtoolSecrets } from './secrets.js';
|
|
8
7
|
// Manual-profile escape hatch — kept for users who configure providers
|
|
9
8
|
// by API key directly without going through the auto-discovery picker.
|
|
10
9
|
export { PROVIDER_TYPES, PROVIDERS_FILE_VERSION, ProfileValidationError, TYPE_ENV_FALLBACK, isProviderType, validateProfile, } from './schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integrations/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,iBAAiB,EACjB,YAAY,GACZ,MAAM,eAAe,CAAA;AACtB,OAAO,EAEN,qBAAqB,EACrB,2BAA2B,GAC3B,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EACN,yBAAyB,EAEzB,sBAAsB,GACtB,MAAM,YAAY,CAAA;AACnB,OAAO,EAEN,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,EAEf,eAAe,EACf,gBAAgB,GAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACN,gBAAgB,EAChB,iBAAiB,GAIjB,MAAM,eAAe,CAAA;AACtB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integrations/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,iBAAiB,EACjB,YAAY,GACZ,MAAM,eAAe,CAAA;AACtB,OAAO,EAEN,qBAAqB,EACrB,2BAA2B,GAC3B,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EACN,yBAAyB,EAEzB,sBAAsB,GACtB,MAAM,YAAY,CAAA;AACnB,OAAO,EAEN,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,EAEf,eAAe,EACf,gBAAgB,GAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACN,gBAAgB,EAChB,iBAAiB,GAIjB,MAAM,eAAe,CAAA;AACtB,uEAAuE;AACvE,uEAAuE;AACvE,OAAO,EASN,cAAc,EAId,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,eAAe,GACf,MAAM,aAAa,CAAA;AACpB,OAAO,EACN,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,GACb,MAAM,YAAY,CAAA"}
|