@namzu/cli 11.0.0 → 12.0.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/README.md +390 -46
- package/dist/cli.d.ts +15 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +132 -4
- package/dist/cli.js.map +1 -1
- package/dist/commands/acp.d.ts +29 -0
- package/dist/commands/acp.d.ts.map +1 -0
- package/dist/commands/acp.js +156 -0
- package/dist/commands/acp.js.map +1 -0
- package/dist/commands/doctor.d.ts +12 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +18 -2
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/drain.d.ts +2 -2
- package/dist/commands/drain.d.ts.map +1 -1
- package/dist/commands/drain.js +31 -8
- package/dist/commands/drain.js.map +1 -1
- package/dist/commands/run-flags.d.ts.map +1 -1
- package/dist/commands/run-flags.js +33 -0
- package/dist/commands/run-flags.js.map +1 -1
- package/dist/commands/run-stream.d.ts +3 -3
- package/dist/commands/run-stream.d.ts.map +1 -1
- package/dist/commands/run-stream.js +27 -10
- package/dist/commands/run-stream.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +50 -4
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/types.d.ts +10 -0
- package/dist/commands/types.d.ts.map +1 -1
- package/dist/config/load.d.ts +64 -0
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +137 -20
- package/dist/config/load.js.map +1 -1
- package/dist/config/schema.d.ts +51 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/context/capabilities.d.ts +88 -0
- package/dist/context/capabilities.d.ts.map +1 -0
- package/dist/context/capabilities.js +160 -0
- package/dist/context/capabilities.js.map +1 -0
- package/dist/context/sandbox.d.ts +13 -0
- package/dist/context/sandbox.d.ts.map +1 -1
- package/dist/context/sandbox.js +15 -0
- package/dist/context/sandbox.js.map +1 -1
- package/dist/doctor/checks/index.d.ts +6 -1
- package/dist/doctor/checks/index.d.ts.map +1 -1
- package/dist/doctor/checks/index.js +45 -2
- package/dist/doctor/checks/index.js.map +1 -1
- package/dist/doctor/checks/invariants.d.ts +23 -0
- package/dist/doctor/checks/invariants.d.ts.map +1 -0
- package/dist/doctor/checks/invariants.js +79 -0
- package/dist/doctor/checks/invariants.js.map +1 -0
- package/dist/doctor/checks/logging.d.ts +10 -0
- package/dist/doctor/checks/logging.d.ts.map +1 -0
- package/dist/doctor/checks/logging.js +69 -0
- package/dist/doctor/checks/logging.js.map +1 -0
- package/dist/doctor/checks/session-export.d.ts +21 -0
- package/dist/doctor/checks/session-export.d.ts.map +1 -0
- package/dist/doctor/checks/session-export.js +62 -0
- package/dist/doctor/checks/session-export.js.map +1 -0
- package/dist/doctor/checks/telemetry.d.ts +15 -28
- package/dist/doctor/checks/telemetry.d.ts.map +1 -1
- package/dist/doctor/checks/telemetry.js +34 -54
- package/dist/doctor/checks/telemetry.js.map +1 -1
- package/dist/doctor/checks/vault.d.ts +4 -20
- package/dist/doctor/checks/vault.d.ts.map +1 -1
- package/dist/doctor/checks/vault.js +58 -19
- package/dist/doctor/checks/vault.js.map +1 -1
- package/dist/doctor/registry.d.ts.map +1 -1
- package/dist/doctor/registry.js +13 -6
- package/dist/doctor/registry.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/integrations/files/attachment-store.d.ts +44 -0
- package/dist/integrations/files/attachment-store.d.ts.map +1 -0
- package/dist/integrations/files/attachment-store.js +86 -0
- package/dist/integrations/files/attachment-store.js.map +1 -0
- package/dist/integrations/providers/credential-provider.d.ts +39 -0
- package/dist/integrations/providers/credential-provider.d.ts.map +1 -0
- package/dist/integrations/providers/credential-provider.js +74 -0
- package/dist/integrations/providers/credential-provider.js.map +1 -0
- package/dist/integrations/providers/discover.d.ts.map +1 -1
- package/dist/integrations/providers/discover.js +15 -3
- package/dist/integrations/providers/discover.js.map +1 -1
- package/dist/integrations/providers/oauth.d.ts.map +1 -1
- package/dist/integrations/providers/oauth.js +24 -1
- package/dist/integrations/providers/oauth.js.map +1 -1
- package/dist/integrations/sessions/store.d.ts +2 -2
- package/dist/integrations/sessions/store.d.ts.map +1 -1
- package/dist/integrations/sessions/store.js +21 -9
- package/dist/integrations/sessions/store.js.map +1 -1
- package/dist/integrations/subagents/runtime.d.ts +3 -3
- package/dist/integrations/subagents/runtime.d.ts.map +1 -1
- package/dist/integrations/subagents/runtime.js +12 -12
- package/dist/integrations/subagents/runtime.js.map +1 -1
- package/dist/integrations/telemetry/session-export.d.ts +99 -0
- package/dist/integrations/telemetry/session-export.d.ts.map +1 -0
- package/dist/integrations/telemetry/session-export.js +119 -0
- package/dist/integrations/telemetry/session-export.js.map +1 -0
- package/dist/logging.d.ts +79 -0
- package/dist/logging.d.ts.map +1 -0
- package/dist/logging.js +67 -0
- package/dist/logging.js.map +1 -0
- package/dist/permissions/rules.d.ts +3 -3
- package/dist/permissions/rules.d.ts.map +1 -1
- package/dist/permissions/rules.js +1 -1
- package/dist/permissions/rules.js.map +1 -1
- package/dist/skills/store.d.ts +1 -1
- package/dist/skills/store.js +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +92 -6
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/StatusBar.d.ts +1 -1
- package/dist/tui/StatusBar.d.ts.map +1 -1
- package/dist/tui/agent.d.ts +54 -24
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/agent.js +330 -127
- package/dist/tui/agent.js.map +1 -1
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/index.js +17 -6
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/log-pane.d.ts +48 -0
- package/dist/tui/log-pane.d.ts.map +1 -0
- package/dist/tui/log-pane.js +106 -0
- package/dist/tui/log-pane.js.map +1 -0
- package/dist/tui/slashCommands.d.ts +134 -11
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/tui/slashCommands.js +169 -15
- package/dist/tui/slashCommands.js.map +1 -1
- package/dist/tui/types.d.ts +11 -2
- package/dist/tui/types.d.ts.map +1 -1
- package/package.json +8 -6
|
@@ -1,28 +1,67 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* What this machine can answer about its credentials.
|
|
3
3
|
*
|
|
4
|
-
* `
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* exercises their specific vault wiring.
|
|
4
|
+
* This check used to return `skipped` unconditionally, with the message
|
|
5
|
+
* "no vault auto-discovery in v1" — an answer that was the same on every
|
|
6
|
+
* machine, forever, which is the shape `a-check-that-cannot-fail` warns
|
|
7
|
+
* about. It was honest about the world at the time: `CredentialVault` was
|
|
8
|
+
* an interface nobody registered, so there was nothing to enumerate.
|
|
10
9
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* subject to answer about — there is no discovery mechanism to fail — and that
|
|
15
|
-
* is true on every machine, permanently, by design. Reporting a permanent
|
|
16
|
-
* design decision as an unanswered question would make `namzu doctor` non-zero
|
|
17
|
-
* on every healthy machine, and a diagnostic that always complains is one
|
|
18
|
-
* nobody reads.
|
|
10
|
+
* There is now. The check reads what the registered providers report and
|
|
11
|
+
* returns `skipped` only when NONE is registered — which is a real state a
|
|
12
|
+
* host can be in, and now the only one that produces it.
|
|
19
13
|
*/
|
|
14
|
+
/** Providers this process knows about. Registered by whoever builds them. */
|
|
15
|
+
const registered = [];
|
|
16
|
+
export function registerCredentialProvider(provider, label, refs) {
|
|
17
|
+
const entry = { provider, label, refs };
|
|
18
|
+
registered.push(entry);
|
|
19
|
+
return () => {
|
|
20
|
+
const i = registered.indexOf(entry);
|
|
21
|
+
if (i >= 0)
|
|
22
|
+
registered.splice(i, 1);
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/** For tests, and for a host rebuilding its wiring. */
|
|
26
|
+
export function clearRegisteredCredentialProviders() {
|
|
27
|
+
registered.length = 0;
|
|
28
|
+
}
|
|
20
29
|
export const vaultRegisteredCheck = {
|
|
21
30
|
id: 'vault.registered',
|
|
22
31
|
category: 'vault',
|
|
23
|
-
run: async () =>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
run: async () => {
|
|
33
|
+
if (registered.length === 0) {
|
|
34
|
+
// `skipped`, not `inconclusive`, and the difference is the whole
|
|
35
|
+
// point of the split: `inconclusive` means a check tried and could
|
|
36
|
+
// not answer, which is a gap in the report and carries a non-zero
|
|
37
|
+
// exit. A host that registered no provider has no subject here,
|
|
38
|
+
// and reporting that as an unanswered question would make
|
|
39
|
+
// `namzu doctor` non-zero on a perfectly healthy machine.
|
|
40
|
+
return {
|
|
41
|
+
status: 'skipped',
|
|
42
|
+
message: 'No credential provider is registered, so there is nothing to report on.',
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const lines = [];
|
|
46
|
+
let anyConfigured = false;
|
|
47
|
+
for (const entry of registered) {
|
|
48
|
+
for (const ref of entry.refs) {
|
|
49
|
+
// `describe`, never `resolve`. This runs in a diagnostic whose
|
|
50
|
+
// output an operator pastes into an issue, and a check that
|
|
51
|
+
// read the value to report on it would be the leak.
|
|
52
|
+
const described = await entry.provider.describe(ref);
|
|
53
|
+
if (described.configured)
|
|
54
|
+
anyConfigured = true;
|
|
55
|
+
lines.push(`${entry.label}: ${ref} — ${described.configured ? 'configured' : 'not set'}${described.source ? ` (${described.source})` : ''}, ${described.writable ? 'writable' : 'read-only'}`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
// A provider registered and nothing configured is a real answer,
|
|
60
|
+
// not a failure: an operator who has not logged in yet is in a
|
|
61
|
+
// state the doctor should describe rather than complain about.
|
|
62
|
+
status: anyConfigured ? 'pass' : 'warn',
|
|
63
|
+
message: lines.join('\n'),
|
|
64
|
+
};
|
|
65
|
+
},
|
|
27
66
|
};
|
|
28
67
|
//# sourceMappingURL=vault.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vault.js","sourceRoot":"","sources":["../../../src/doctor/checks/vault.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"vault.js","sourceRoot":"","sources":["../../../src/doctor/checks/vault.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AAEH,6EAA6E;AAC7E,MAAM,UAAU,GAA+E,EAAE,CAAA;AAEjG,MAAM,UAAU,0BAA0B,CACzC,QAA4B,EAC5B,KAAa,EACb,IAAuB;IAEvB,MAAM,KAAK,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;IACvC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACtB,OAAO,GAAG,EAAE;QACX,MAAM,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QACnC,IAAI,CAAC,IAAI,CAAC;YAAE,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACpC,CAAC,CAAA;AACF,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,kCAAkC;IACjD,UAAU,CAAC,MAAM,GAAG,CAAC,CAAA;AACtB,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAgB;IAChD,EAAE,EAAE,kBAAkB;IACtB,QAAQ,EAAE,OAAO;IACjB,GAAG,EAAE,KAAK,IAAgC,EAAE;QAC3C,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,iEAAiE;YACjE,mEAAmE;YACnE,kEAAkE;YAClE,gEAAgE;YAChE,0DAA0D;YAC1D,0DAA0D;YAC1D,OAAO;gBACN,MAAM,EAAE,SAAS;gBACjB,OAAO,EAAE,yEAAyE;aAClF,CAAA;QACF,CAAC;QAED,MAAM,KAAK,GAAa,EAAE,CAAA;QAC1B,IAAI,aAAa,GAAG,KAAK,CAAA;QACzB,KAAK,MAAM,KAAK,IAAI,UAAU,EAAE,CAAC;YAChC,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;gBAC9B,+DAA+D;gBAC/D,4DAA4D;gBAC5D,oDAAoD;gBACpD,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;gBACpD,IAAI,SAAS,CAAC,UAAU;oBAAE,aAAa,GAAG,IAAI,CAAA;gBAC9C,KAAK,CAAC,IAAI,CACT,GAAG,KAAK,CAAC,KAAK,KAAK,GAAG,MAAM,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,GAC1E,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAC/C,KAAK,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,EAAE,CACpD,CAAA;YACF,CAAC;QACF,CAAC;QAED,OAAO;YACN,iEAAiE;YACjE,+DAA+D;YAC/D,+DAA+D;YAC/D,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;YACvC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;SACzB,CAAA;IACF,CAAC;CACD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/doctor/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,WAAW,EAEX,iBAAiB,EAEjB,YAAY,EAEZ,MAAM,EACN,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/doctor/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,WAAW,EAEX,iBAAiB,EA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G,OAAO,CAAC,YAAY,CAAC;IA4H/E;;;;;OAKG;IACH,OAAO,CAAC,cAAc;CAWtB;AAED,eAAO,MAAM,MAAM,EAAE,cAAqC,CAAA;AAE1D,wBAAgB,oBAAoB,IAAI,cAAc,CAErD;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAE5D;AAED,wBAAgB,SAAS,CAAC,IAAI,GAAE,gBAAqB,GAAG,OAAO,CAAC,YAAY,CAAC,CAc5E"}
|
package/dist/doctor/registry.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { SCOPE_ATTRIBUTE } from '@namzu/sdk';
|
|
1
2
|
const DEFAULT_PER_CHECK_TIMEOUT_MS = 5_000;
|
|
2
3
|
const DEFAULT_WALL_CLOCK_TIMEOUT_MS = 10_000;
|
|
3
4
|
export class DoctorRegistry {
|
|
4
5
|
checks = new Map();
|
|
5
6
|
log;
|
|
6
7
|
setLogger(log) {
|
|
7
|
-
this.log = log.child({
|
|
8
|
+
this.log = log.child({ [SCOPE_ATTRIBUTE]: 'doctor' });
|
|
8
9
|
}
|
|
9
10
|
register(check) {
|
|
10
11
|
if (this.checks.has(check.id)) {
|
|
@@ -66,7 +67,10 @@ export class DoctorRegistry {
|
|
|
66
67
|
}
|
|
67
68
|
catch (error) {
|
|
68
69
|
const message = error instanceof Error ? error.message : String(error);
|
|
69
|
-
this.log?.warn('doctor check threw', {
|
|
70
|
+
this.log?.warn('doctor check threw', {
|
|
71
|
+
'namzu.doctor.id': check.id,
|
|
72
|
+
'namzu.doctor.message': message,
|
|
73
|
+
});
|
|
70
74
|
result = { status: 'fail', message: `check threw: ${message}` };
|
|
71
75
|
}
|
|
72
76
|
recordCompletion({
|
|
@@ -87,9 +91,9 @@ export class DoctorRegistry {
|
|
|
87
91
|
: `wall-clock timeout (${wall}ms) reached before this check completed`;
|
|
88
92
|
const unfinished = filteredChecks.filter((c) => !completed.has(c.id));
|
|
89
93
|
this.log?.warn(raceWinner === 'aborted' ? 'doctor aborted by signal' : 'doctor wall-clock timeout', {
|
|
90
|
-
wall,
|
|
91
|
-
total: filteredChecks.length,
|
|
92
|
-
unfinished: unfinished.length,
|
|
94
|
+
'namzu.doctor.wall': wall,
|
|
95
|
+
'namzu.doctor.total': filteredChecks.length,
|
|
96
|
+
'namzu.doctor.unfinished': unfinished.length,
|
|
93
97
|
});
|
|
94
98
|
records = filteredChecks.map((check) => {
|
|
95
99
|
const existing = completed.get(check.id);
|
|
@@ -143,7 +147,10 @@ export class DoctorRegistry {
|
|
|
143
147
|
}
|
|
144
148
|
catch (error) {
|
|
145
149
|
const message = error instanceof Error ? error.message : String(error);
|
|
146
|
-
this.log?.warn('doctor callback threw', {
|
|
150
|
+
this.log?.warn('doctor callback threw', {
|
|
151
|
+
'namzu.doctor.phase': phase,
|
|
152
|
+
'namzu.doctor.message': message,
|
|
153
|
+
});
|
|
147
154
|
}
|
|
148
155
|
}
|
|
149
156
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/doctor/registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/doctor/registry.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAE5C,MAAM,4BAA4B,GAAG,KAAK,CAAA;AAC1C,MAAM,6BAA6B,GAAG,MAAM,CAAA;AAmC5C,MAAM,OAAO,cAAc;IACT,MAAM,GAA6B,IAAI,GAAG,EAAE,CAAA;IACrD,GAAG,CAAS;IAEpB,SAAS,CAAC,GAAW;QACpB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAA;IACtD,CAAC;IAED,QAAQ,CAAC,KAAkB;QAC1B,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CA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M,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,MAAM;QACvD,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,MAAM;QAC7D,KAAK,EAAE,OAAO,CAAC,MAAM;KACrB,CAAA;IACD;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,MAAM,IAAI,GACT,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;IACnF,OAAO,MAAM,CAAC,MAAM,CAAC;QACpB,OAAO;QACP,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACnC,MAAM,EAAE,OAAO;QACf,OAAO;QACP,IAAI;KACJ,CAAC,CAAA;AACH,CAAC;AAED,SAAS,KAAK,CAAC,EAAU;IACxB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;AAC7E,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,12 +5,13 @@
|
|
|
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, credentialSourcesCheck, cwdWritableCheck, providerChainCheck, providersRegisteredCheck, sandboxPlatformCheck, telemetryInstalledCheck, tmpdirWritableCheck, vaultRegisteredCheck, } from './doctor/checks/index.js';
|
|
8
|
+
export { builtInDoctorChecks, computerUseInstalledCheck, credentialSourcesCheck, cwdWritableCheck, filesInstalledCheck, providerChainCheck, providersRegisteredCheck, sandboxInstalledCheck, sandboxPlatformCheck, telemetryInstalledCheck, tmpdirWritableCheck, vaultRegisteredCheck, } from './doctor/checks/index.js';
|
|
9
|
+
export { type CapabilityProbe, NAMZU_OPTIONAL_CAPABILITIES, probeCapabilities, probeOptionalPackage, } from './context/capabilities.js';
|
|
9
10
|
export { runDoctorCommand } from './commands/doctor.js';
|
|
10
11
|
export { runCli, type RunCliOptions } from './cli.js';
|
|
11
12
|
export type { CommandContext, CommandDef, CommandHandler, CommandHandlerArgs, } from './commands/types.js';
|
|
12
13
|
export { registerAll, registerCommand, type RegisterOptions, } from './commands/registry.js';
|
|
13
14
|
export { createFormatter, type FormatName, type Formatter, type FormatterOptions, isFormatName, } from './output/index.js';
|
|
14
|
-
export { ConfigLoadError, loadConfig, type LoadConfigOptions } from './config/load.js';
|
|
15
|
+
export { ConfigLoadError, loadConfig, loadConfigWithProvenance, type ConfigProvenance, type ConfigSource, type LoadConfigOptions, } from './config/load.js';
|
|
15
16
|
export { DEFAULT_CONFIG, type NamzuCliConfig } from './config/schema.js';
|
|
16
17
|
//# sourceMappingURL=index.d.ts.map
|
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,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,GACp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f,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,EACN,eAAe,EACf,UAAU,EACV,wBAAwB,EACxB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,iBAAiB,GACtB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -5,12 +5,13 @@
|
|
|
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, credentialSourcesCheck, cwdWritableCheck, providerChainCheck, providersRegisteredCheck, sandboxPlatformCheck, telemetryInstalledCheck, tmpdirWritableCheck, vaultRegisteredCheck, } from './doctor/checks/index.js';
|
|
8
|
+
export { builtInDoctorChecks, computerUseInstalledCheck, credentialSourcesCheck, cwdWritableCheck, filesInstalledCheck, providerChainCheck, providersRegisteredCheck, sandboxInstalledCheck, sandboxPlatformCheck, telemetryInstalledCheck, tmpdirWritableCheck, vaultRegisteredCheck, } from './doctor/checks/index.js';
|
|
9
|
+
export { NAMZU_OPTIONAL_CAPABILITIES, probeCapabilities, probeOptionalPackage, } from './context/capabilities.js';
|
|
9
10
|
export { runDoctorCommand } from './commands/doctor.js';
|
|
10
11
|
// Shell + extension surface for the CLI.
|
|
11
12
|
export { runCli } from './cli.js';
|
|
12
13
|
export { registerAll, registerCommand, } from './commands/registry.js';
|
|
13
14
|
export { createFormatter, isFormatName, } from './output/index.js';
|
|
14
|
-
export { ConfigLoadError, loadConfig } from './config/load.js';
|
|
15
|
+
export { ConfigLoadError, loadConfig, loadConfigWithProvenance, } from './config/load.js';
|
|
15
16
|
export { DEFAULT_CONFIG } from './config/schema.js';
|
|
16
17
|
//# sourceMappingURL=index.js.map
|
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,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,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,
|
|
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,yBAAyB,EACzB,sBAAsB,EACtB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,GACpB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAEN,2BAA2B,EAC3B,iBAAiB,EACjB,oBAAoB,GACpB,MAAM,2BAA2B,CAAA;AAElC,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,EACN,eAAe,EACf,UAAU,EACV,wBAAwB,GAIxB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,cAAc,EAAuB,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { BlobStore } from '@namzu/files';
|
|
2
|
+
import type { AttachmentStore, StoredBytes } from '@namzu/sdk';
|
|
3
|
+
/**
|
|
4
|
+
* The CLI's attachment store, content-addressed, over a real blob driver.
|
|
5
|
+
*
|
|
6
|
+
* `@namzu/files` shipped six drivers and had no consumer in this repo — a
|
|
7
|
+
* package the estate could import and nothing here could point at. This is
|
|
8
|
+
* the pointing: the local driver, wired to the seam the SDK added for
|
|
9
|
+
* attachments, in the one host that actually attaches things.
|
|
10
|
+
*
|
|
11
|
+
* **Addressed by content AND media type**, not by content alone. The same
|
|
12
|
+
* bytes declared `image/png` once and `application/pdf` later are two
|
|
13
|
+
* different claims about what they are, and the SDK's resolver refuses a
|
|
14
|
+
* ref whose stored media type disagrees with the message. Keying on bytes
|
|
15
|
+
* alone would make the second `put` return the first ref, and every message
|
|
16
|
+
* using it would then be refused — a dedup that manufactures the exact
|
|
17
|
+
* mismatch the resolver exists to catch. Folding the media type into the
|
|
18
|
+
* digest keeps dedup for the common case (the same file attached twice) and
|
|
19
|
+
* gives an honest ref for the uncommon one.
|
|
20
|
+
*/
|
|
21
|
+
/** `<home>/.namzu/attachments`, beside the credential store. */
|
|
22
|
+
export declare function attachmentsDir(home?: string): string;
|
|
23
|
+
export interface BlobAttachmentStoreOptions {
|
|
24
|
+
/** Injectable for tests; defaults to the local driver under `~/.namzu`. */
|
|
25
|
+
readonly blobs?: BlobStore;
|
|
26
|
+
readonly home?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare class BlobAttachmentStore implements AttachmentStore {
|
|
29
|
+
private readonly blobs;
|
|
30
|
+
constructor(options?: BlobAttachmentStoreOptions);
|
|
31
|
+
/**
|
|
32
|
+
* The key for these bytes under this media type.
|
|
33
|
+
*
|
|
34
|
+
* Two files rather than one: the bytes, and a sibling holding the media
|
|
35
|
+
* type. The blob store stores bytes and nothing else, and the SDK's
|
|
36
|
+
* resolver needs the store to be able to REPORT what it holds — a store
|
|
37
|
+
* that could only echo back what the caller claimed could never catch a
|
|
38
|
+
* mismatch, which is the check that keeps a PDF from being sent as a PNG.
|
|
39
|
+
*/
|
|
40
|
+
private key;
|
|
41
|
+
put(bytes: StoredBytes): Promise<string>;
|
|
42
|
+
get(ref: string): Promise<StoredBytes | undefined>;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=attachment-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachment-store.d.ts","sourceRoot":"","sources":["../../../src/integrations/files/attachment-store.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE9D;;;;;;;;;;;;;;;;;GAiBG;AAEH,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,IAAI,GAAE,MAAkB,GAAG,MAAM,CAE/D;AAED,MAAM,WAAW,0BAA0B;IAC1C,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,qBAAa,mBAAoB,YAAW,eAAe;IAC1D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAW;gBAErB,OAAO,GAAE,0BAA+B;IAIpD;;;;;;;;OAQG;IACH,OAAO,CAAC,GAAG;IAOL,GAAG,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;IAmBxC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;CAoBxD"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { LocalFsBlobStore } from '@namzu/files/local';
|
|
5
|
+
/**
|
|
6
|
+
* The CLI's attachment store, content-addressed, over a real blob driver.
|
|
7
|
+
*
|
|
8
|
+
* `@namzu/files` shipped six drivers and had no consumer in this repo — a
|
|
9
|
+
* package the estate could import and nothing here could point at. This is
|
|
10
|
+
* the pointing: the local driver, wired to the seam the SDK added for
|
|
11
|
+
* attachments, in the one host that actually attaches things.
|
|
12
|
+
*
|
|
13
|
+
* **Addressed by content AND media type**, not by content alone. The same
|
|
14
|
+
* bytes declared `image/png` once and `application/pdf` later are two
|
|
15
|
+
* different claims about what they are, and the SDK's resolver refuses a
|
|
16
|
+
* ref whose stored media type disagrees with the message. Keying on bytes
|
|
17
|
+
* alone would make the second `put` return the first ref, and every message
|
|
18
|
+
* using it would then be refused — a dedup that manufactures the exact
|
|
19
|
+
* mismatch the resolver exists to catch. Folding the media type into the
|
|
20
|
+
* digest keeps dedup for the common case (the same file attached twice) and
|
|
21
|
+
* gives an honest ref for the uncommon one.
|
|
22
|
+
*/
|
|
23
|
+
/** `<home>/.namzu/attachments`, beside the credential store. */
|
|
24
|
+
export function attachmentsDir(home = homedir()) {
|
|
25
|
+
return join(home, '.namzu', 'attachments');
|
|
26
|
+
}
|
|
27
|
+
export class BlobAttachmentStore {
|
|
28
|
+
blobs;
|
|
29
|
+
constructor(options = {}) {
|
|
30
|
+
this.blobs = options.blobs ?? new LocalFsBlobStore({ root: attachmentsDir(options.home) });
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The key for these bytes under this media type.
|
|
34
|
+
*
|
|
35
|
+
* Two files rather than one: the bytes, and a sibling holding the media
|
|
36
|
+
* type. The blob store stores bytes and nothing else, and the SDK's
|
|
37
|
+
* resolver needs the store to be able to REPORT what it holds — a store
|
|
38
|
+
* that could only echo back what the caller claimed could never catch a
|
|
39
|
+
* mismatch, which is the check that keeps a PDF from being sent as a PNG.
|
|
40
|
+
*/
|
|
41
|
+
key(mediaType, data) {
|
|
42
|
+
const digest = createHash('sha256').update(mediaType).update('\0').update(data).digest('hex');
|
|
43
|
+
// Two levels, because a flat directory of every attachment a machine
|
|
44
|
+
// has ever seen is a directory nothing enumerates twice.
|
|
45
|
+
return `${digest.slice(0, 2)}/${digest.slice(2)}`;
|
|
46
|
+
}
|
|
47
|
+
async put(bytes) {
|
|
48
|
+
const key = this.key(bytes.mediaType, bytes.data);
|
|
49
|
+
// Written every time rather than checked first. A `get` before every
|
|
50
|
+
// `put` doubles the syscalls to avoid rewriting identical bytes to an
|
|
51
|
+
// identical path, and the write is what makes the ref valid — skipping
|
|
52
|
+
// it on a stale "exists" answer is how a ref points at nothing.
|
|
53
|
+
await this.blobs.put({
|
|
54
|
+
key: `${key}.bin`,
|
|
55
|
+
bytes: Buffer.from(bytes.data, 'base64'),
|
|
56
|
+
mimeType: bytes.mediaType,
|
|
57
|
+
});
|
|
58
|
+
await this.blobs.put({
|
|
59
|
+
key: `${key}.type`,
|
|
60
|
+
bytes: Buffer.from(bytes.mediaType, 'utf-8'),
|
|
61
|
+
mimeType: 'text/plain',
|
|
62
|
+
});
|
|
63
|
+
return key;
|
|
64
|
+
}
|
|
65
|
+
async get(ref) {
|
|
66
|
+
// The blob store validates the key against path traversal, and this
|
|
67
|
+
// passes the caller's ref through unchanged so that check is the one
|
|
68
|
+
// that runs. Sanitising here as well would mean two rules that can
|
|
69
|
+
// disagree, and the weaker one would be the one nobody reads.
|
|
70
|
+
const [blob, type] = await Promise.all([
|
|
71
|
+
this.blobs.get({ provider: 'local-fs', key: `${ref}.bin` }),
|
|
72
|
+
this.blobs.get({ provider: 'local-fs', key: `${ref}.type` }),
|
|
73
|
+
]);
|
|
74
|
+
if (!blob || !type) {
|
|
75
|
+
// BOTH, or nothing. A ref with bytes and no media type is a
|
|
76
|
+
// half-written attachment, and answering with a guessed type is how
|
|
77
|
+
// a PDF reaches a provider labelled as an image.
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
data: Buffer.from(blob.bytes).toString('base64'),
|
|
82
|
+
mediaType: Buffer.from(type.bytes).toString('utf-8'),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=attachment-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachment-store.js","sourceRoot":"","sources":["../../../src/integrations/files/attachment-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAGrD;;;;;;;;;;;;;;;;;GAiBG;AAEH,gEAAgE;AAChE,MAAM,UAAU,cAAc,CAAC,OAAe,OAAO,EAAE;IACtD,OAAO,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAA;AAC3C,CAAC;AAQD,MAAM,OAAO,mBAAmB;IACd,KAAK,CAAW;IAEjC,YAAY,UAAsC,EAAE;QACnD,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,IAAI,gBAAgB,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC3F,CAAC;IAED;;;;;;;;OAQG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C,GAAG,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,GAAG,MAAM,EAAE,CAAC;YAC3D,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,EAAE,CAAC;SAC5D,CAAC,CAAA;QACF,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACpB,4DAA4D;YAC5D,oEAAoE;YACpE,iDAAiD;YACjD,OAAO,SAAS,CAAA;QACjB,CAAC;QACD,OAAO;YACN,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;YAChD,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;SACpD,CAAA;IACF,CAAC;CACD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { CredentialDescription, CredentialProvider, ResolvedCredential } from '@namzu/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* The CLI's hardened credential file, as a writable `CredentialProvider`.
|
|
4
|
+
*
|
|
5
|
+
* The seam had no writable implementation, so `describe()` reported
|
|
6
|
+
* `writable: false` everywhere and nothing could rotate a credential
|
|
7
|
+
* through it — the OAuth refresh wrote straight into this store, invisibly
|
|
8
|
+
* to the kernel.
|
|
9
|
+
*
|
|
10
|
+
* **This adapter adds no file logic of its own.** The store already owns
|
|
11
|
+
* the `wx` open, the `0600`, the read-back that proves the mode landed and
|
|
12
|
+
* the refusal that leaves no file when it did not. Reimplementing any of
|
|
13
|
+
* that here would be a second, weaker copy of a guarantee this repo has a
|
|
14
|
+
* ratified rule about, and the copy is the one that would drift.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* The one credential this store holds.
|
|
18
|
+
*
|
|
19
|
+
* A single ref rather than a namespace, because the file has exactly one
|
|
20
|
+
* subscription credential in it. A provider that accepted any name would
|
|
21
|
+
* report `configured: false` for every other one — indistinguishable from
|
|
22
|
+
* "this name is not set here" — while quietly answering only for this one.
|
|
23
|
+
*/
|
|
24
|
+
export declare const SUBSCRIPTION_CREDENTIAL_REF = "namzu.subscription.accessToken";
|
|
25
|
+
export interface FileCredentialProviderOptions {
|
|
26
|
+
/** Home directory the store resolves its path under. Injectable for tests. */
|
|
27
|
+
readonly home?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare class FileCredentialProvider implements CredentialProvider {
|
|
30
|
+
private readonly options;
|
|
31
|
+
constructor(options?: FileCredentialProviderOptions);
|
|
32
|
+
private get source();
|
|
33
|
+
private refused;
|
|
34
|
+
resolve(ref: string): Promise<ResolvedCredential | undefined>;
|
|
35
|
+
describe(ref: string): Promise<CredentialDescription>;
|
|
36
|
+
set(ref: string, value: string): Promise<void>;
|
|
37
|
+
unset(ref: string): Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=credential-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-provider.d.ts","sourceRoot":"","sources":["../../../src/integrations/providers/credential-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAU/F;;;;;;;;;;;;;GAaG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,mCAAmC,CAAA;AAE3E,MAAM,WAAW,6BAA6B;IAC7C,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,qBAAa,sBAAuB,YAAW,kBAAkB;IACpD,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,GAAE,6BAAkC;IAExE,OAAO,KAAK,MAAM,GAEjB;IAED,OAAO,CAAC,OAAO;IAST,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC;IAQ7D,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAYrD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAc9C,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAMvC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { NamzuError } from '@namzu/sdk';
|
|
2
|
+
import { clearStoredSubscriptionCredential, credentialsPath, readStoredSubscriptionCredential, writeStoredSubscriptionCredential, } from './credential-store.js';
|
|
3
|
+
/**
|
|
4
|
+
* The CLI's hardened credential file, as a writable `CredentialProvider`.
|
|
5
|
+
*
|
|
6
|
+
* The seam had no writable implementation, so `describe()` reported
|
|
7
|
+
* `writable: false` everywhere and nothing could rotate a credential
|
|
8
|
+
* through it — the OAuth refresh wrote straight into this store, invisibly
|
|
9
|
+
* to the kernel.
|
|
10
|
+
*
|
|
11
|
+
* **This adapter adds no file logic of its own.** The store already owns
|
|
12
|
+
* the `wx` open, the `0600`, the read-back that proves the mode landed and
|
|
13
|
+
* the refusal that leaves no file when it did not. Reimplementing any of
|
|
14
|
+
* that here would be a second, weaker copy of a guarantee this repo has a
|
|
15
|
+
* ratified rule about, and the copy is the one that would drift.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* The one credential this store holds.
|
|
19
|
+
*
|
|
20
|
+
* A single ref rather than a namespace, because the file has exactly one
|
|
21
|
+
* subscription credential in it. A provider that accepted any name would
|
|
22
|
+
* report `configured: false` for every other one — indistinguishable from
|
|
23
|
+
* "this name is not set here" — while quietly answering only for this one.
|
|
24
|
+
*/
|
|
25
|
+
export const SUBSCRIPTION_CREDENTIAL_REF = 'namzu.subscription.accessToken';
|
|
26
|
+
export class FileCredentialProvider {
|
|
27
|
+
options;
|
|
28
|
+
constructor(options = {}) {
|
|
29
|
+
this.options = options;
|
|
30
|
+
}
|
|
31
|
+
get source() {
|
|
32
|
+
return credentialsPath(...(this.options.home === undefined ? [] : [this.options.home]));
|
|
33
|
+
}
|
|
34
|
+
refused(ref) {
|
|
35
|
+
return new NamzuError({
|
|
36
|
+
code: 'invalid_config',
|
|
37
|
+
message: `This store holds only "${SUBSCRIPTION_CREDENTIAL_REF}"; it has no place for "${ref}".`,
|
|
38
|
+
details: { ref },
|
|
39
|
+
retryable: false,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
async resolve(ref) {
|
|
43
|
+
if (ref !== SUBSCRIPTION_CREDENTIAL_REF)
|
|
44
|
+
return undefined;
|
|
45
|
+
const stored = readStoredSubscriptionCredential(...(this.options.home === undefined ? [] : [this.options.home]));
|
|
46
|
+
return stored?.accessToken ? { value: stored.accessToken, source: this.source } : undefined;
|
|
47
|
+
}
|
|
48
|
+
async describe(ref) {
|
|
49
|
+
const found = await this.resolve(ref);
|
|
50
|
+
return {
|
|
51
|
+
configured: found !== undefined,
|
|
52
|
+
...(found ? { source: found.source } : {}),
|
|
53
|
+
// True for this ref and only this ref. Reporting writable for a
|
|
54
|
+
// name `set` would refuse is a description that disagrees with the
|
|
55
|
+
// thing it describes.
|
|
56
|
+
writable: ref === SUBSCRIPTION_CREDENTIAL_REF,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
async set(ref, value) {
|
|
60
|
+
if (ref !== SUBSCRIPTION_CREDENTIAL_REF)
|
|
61
|
+
throw this.refused(ref);
|
|
62
|
+
// Refresh metadata is preserved: a rotation replaces the access token
|
|
63
|
+
// and must not silently discard the refresh token that will rotate it
|
|
64
|
+
// again, or the next rotation has nothing to work from.
|
|
65
|
+
const existing = readStoredSubscriptionCredential(...(this.options.home === undefined ? [] : [this.options.home]));
|
|
66
|
+
writeStoredSubscriptionCredential({ ...(existing ?? {}), accessToken: value }, ...(this.options.home === undefined ? [] : [this.options.home]));
|
|
67
|
+
}
|
|
68
|
+
async unset(ref) {
|
|
69
|
+
if (ref !== SUBSCRIPTION_CREDENTIAL_REF)
|
|
70
|
+
throw this.refused(ref);
|
|
71
|
+
clearStoredSubscriptionCredential(...(this.options.home === undefined ? [] : [this.options.home]));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=credential-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-provider.js","sourceRoot":"","sources":["../../../src/integrations/providers/credential-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvC,OAAO,EACN,iCAAiC,EACjC,eAAe,EACf,gCAAgC,EAChC,iCAAiC,GACjC,MAAM,uBAAuB,CAAA;AAE9B;;;;;;;;;;;;;GAaG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,gCAAgC,CAAA;AAO3E,MAAM,OAAO,sBAAsB;IACL;IAA7B,YAA6B,UAAyC,EAAE;QAA3C,YAAO,GAAP,OAAO,CAAoC;IAAG,CAAC;IAE5E,IAAY,MAAM;QACjB,OAAO,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACxF,CAAC;IAEO,OAAO,CAAC,GAAW;QAC1B,OAAO,IAAI,UAAU,CAAC;YACrB,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,0BAA0B,2BAA2B,2BAA2B,GAAG,IAAI;YAChG,OAAO,EAAE,EAAE,GAAG,EAAE;YAChB,SAAS,EAAE,KAAK;SAChB,CAAC,CAAA;IACH,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAW;QACxB,IAAI,GAAG,KAAK,2BAA2B;YAAE,OAAO,SAAS,CAAA;QACzD,MAAM,MAAM,GAAG,gCAAgC,CAC9C,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,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAC/D,CAAA;IACF,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,GAAW;QACtB,IAAI,GAAG,KAAK,2BAA2B;YAAE,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QAChE,iCAAiC,CAChC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAC/D,CAAA;IACF,CAAC;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../../src/integrations/providers/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;
|
|
1
|
+
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../../src/integrations/providers/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAMH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,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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AC,UAAU,CAAC,EAAE,OAAO,CAAA;CAC7B;AAID,wBAAsB,iBAAiB,CACtC,IAAI,GAAE,eAAoB,GACxB,OAAO,CAAC,SAAS,gBAAgB,EAAE,CAAC,CAyGtC;AAmBD,yEAAyE;AACzE,wBAAgB,YAAY,CAC3B,IAAI,EAAE,SAAS,gBAAgB,EAAE,EACjC,EAAE,EAAE,UAAU,GACZ,gBAAgB,GAAG,IAAI,CAEzB"}
|
|
@@ -60,12 +60,19 @@
|
|
|
60
60
|
* Discovery is non-throwing. Network probes have short timeouts. The
|
|
61
61
|
* picker can render immediately and refine if discovery completes later.
|
|
62
62
|
*/
|
|
63
|
+
import { EnvCredentialProvider } from '@namzu/sdk';
|
|
63
64
|
import { credentialsPath, readStoredSubscriptionCredential } from './credential-store.js';
|
|
64
65
|
import { KEYCHAIN_SERVICE, readAgentKeychainCredential } from './keychain.js';
|
|
65
66
|
import { PROVIDER_REGISTRY } from './registry.js';
|
|
66
67
|
const DEFAULT_PROBE_TIMEOUT_MS = 500;
|
|
67
68
|
export async function discoverProviders(opts = {}) {
|
|
68
69
|
const env = opts.env ?? process.env;
|
|
70
|
+
// `anyKey`, because the registry's `envVars` are credential names BY
|
|
71
|
+
// CONSTRUCTION — the seam's own name filter would be a second opinion on
|
|
72
|
+
// a list that is already the answer, and a provider whose variable did
|
|
73
|
+
// not look credential-shaped would silently stop being discovered.
|
|
74
|
+
// The vocabulary agreement is asserted instead, where it can fail loudly.
|
|
75
|
+
const credentials = new EnvCredentialProvider({ env, anyKey: true });
|
|
69
76
|
const detected = [];
|
|
70
77
|
// Read both credential sources once, up front, so the loop body stays
|
|
71
78
|
// uniform. Only anthropic consumes either.
|
|
@@ -105,10 +112,15 @@ export async function discoverProviders(opts = {}) {
|
|
|
105
112
|
let apiKey;
|
|
106
113
|
let oauth;
|
|
107
114
|
for (const envName of entry.envVars) {
|
|
108
|
-
|
|
109
|
-
|
|
115
|
+
// Through the SDK's seam rather than a direct `env[envName]`. The
|
|
116
|
+
// read is identical; what changes is that a host embedding the SDK
|
|
117
|
+
// without this CLI can now answer the same question with its own
|
|
118
|
+
// provider, and that the "is this a credential" vocabulary is the
|
|
119
|
+
// one the host-bash scrub uses rather than a third table beside it.
|
|
120
|
+
const resolved = await credentials.resolve(envName);
|
|
121
|
+
if (resolved) {
|
|
110
122
|
if (apiKey === undefined)
|
|
111
|
-
apiKey =
|
|
123
|
+
apiKey = resolved.value;
|
|
112
124
|
sources.push({ kind: 'env', envName });
|
|
113
125
|
}
|
|
114
126
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../../src/integrations/providers/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAEH,OAAO,EAAE,eAAe,EAAE,gCAAgC,EAAE,MAAM,uBAAuB,CAAA;AACzF,OAAO,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAA;AAE7E,OAAO,EAAE,iBAAiB,EAA+C,MAAM,eAAe,CAAA;AAkE9F,MAAM,wBAAwB,GAAG,GAAG,CAAA;AAEpC,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACtC,OAAwB,EAAE;IAE1B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAA;IACnC,MAAM,QAAQ,GAAuB,EAAE,CAAA;IAEvC,sEAAsE;IACtE,2CAA2C;IAC3C,EAAE;IACF,+DAA+D;IAC/D,EAAE;IACF,yEAAyE;IACzE,0EAA0E;IAC1E,4EAA4E;IAC5E,6EAA6E;IAC7E,6EAA6E;IAC7E,mCAAmC;IACnC,EAAE;IACF,gDAAgD;IAChD,EAAE;IACF,0EAA0E;IAC1E,uEAAuE;IACvE,4EAA4E;IAC5E,uEAAuE;IACvE,oDAAoD;IACpD,4EAA4E;IAC5E,uEAAuE;IACvE,sDAAsD;IACt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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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../src/integrations/providers/oauth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;
|
|
1
|
+
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../src/integrations/providers/oauth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAWH,OAAO,EACN,KAAK,oBAAoB,EAGzB,MAAM,eAAe,CAAA;AAKtB;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,gBAAgB,GAAG,oBAAoB,GAAG,IAAI,CAEhG;AAED,yEAAyE;AACzE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,UAAU,CAAA;AAEpD,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,uEAAuE;IACvE,QAAQ,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAA;CAClC;AAED;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC9C,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,aAAa,GAClB,OAAO,CAAC,MAAM,CAAC,CASjB;AAgDD,+EAA+E;AAC/E,wBAAsB,sBAAsB,CAC3C,YAAY,EAAE,MAAM,GAClB,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CA2BtC"}
|