@ai-dossier/cli 0.4.2 → 0.5.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/README.md +117 -0
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/config-cmd.d.ts.map +1 -1
- package/dist/commands/config-cmd.js +205 -208
- package/dist/commands/config-cmd.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +1 -3
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +12 -6
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/get.d.ts.map +1 -1
- package/dist/commands/get.js +2 -3
- package/dist/commands/get.js.map +1 -1
- package/dist/commands/history.d.ts +6 -0
- package/dist/commands/history.d.ts.map +1 -0
- package/dist/commands/history.js +80 -0
- package/dist/commands/history.js.map +1 -0
- package/dist/commands/info.d.ts.map +1 -1
- package/dist/commands/info.js +2 -3
- package/dist/commands/info.js.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +4 -3
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/publish.d.ts.map +1 -1
- package/dist/commands/publish.js +11 -57
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/pull.d.ts.map +1 -1
- package/dist/commands/pull.js +15 -13
- package/dist/commands/pull.js.map +1 -1
- package/dist/commands/remove.d.ts.map +1 -1
- package/dist/commands/remove.js +11 -50
- package/dist/commands/remove.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +124 -7
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +8 -6
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/skill-export.d.ts.map +1 -1
- package/dist/commands/skill-export.js +11 -50
- package/dist/commands/skill-export.js.map +1 -1
- package/dist/config.d.ts +0 -9
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +13 -10
- package/dist/config.js.map +1 -1
- package/dist/credentials.js +9 -11
- package/dist/credentials.js.map +1 -1
- package/dist/helpers.d.ts +8 -0
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +15 -0
- package/dist/helpers.js.map +1 -1
- package/dist/registry-client.d.ts +1 -10
- package/dist/registry-client.d.ts.map +1 -1
- package/dist/registry-client.js +1 -17
- package/dist/registry-client.js.map +1 -1
- package/dist/run-log.d.ts +37 -0
- package/dist/run-log.d.ts.map +1 -0
- package/dist/run-log.js +78 -0
- package/dist/run-log.js.map +1 -0
- package/dist/write-auth.d.ts +24 -0
- package/dist/write-auth.d.ts.map +1 -0
- package/dist/write-auth.js +85 -0
- package/dist/write-auth.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -148,6 +148,30 @@ safe-run-dossier https://example.com/dossier.ds.md cursor
|
|
|
148
148
|
|
|
149
149
|
---
|
|
150
150
|
|
|
151
|
+
## Multi-Registry Resolution
|
|
152
|
+
|
|
153
|
+
The CLI queries all configured registries in parallel when resolving dossiers (e.g., `dossier get`, `dossier run`, `dossier pull`). This uses `Promise.allSettled()` so a single registry failure does not block results from other registries.
|
|
154
|
+
|
|
155
|
+
### Error Handling
|
|
156
|
+
|
|
157
|
+
All multi-registry operations return structured errors alongside results:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
$ dossier get org/my-dossier
|
|
161
|
+
# If registry A is down but registry B has it → returns result silently from B
|
|
162
|
+
# If no registry has it → displays errors from each registry
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
When **all registries fail**, the CLI displays per-registry error details showing which registry failed and why. When at least one registry succeeds, the result is returned without surfacing errors from other registries.
|
|
166
|
+
|
|
167
|
+
This means you can configure multiple registries for redundancy — the CLI will succeed as long as at least one registry can serve the requested dossier. Registries are queried in the order they appear in your configuration; the first successful response is used.
|
|
168
|
+
|
|
169
|
+
### Configuration
|
|
170
|
+
|
|
171
|
+
See `dossier config` for managing registry URLs. Multiple registries are queried in parallel, not sequentially.
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
151
175
|
## What It Checks
|
|
152
176
|
|
|
153
177
|
### 1. Integrity (Checksum)
|
|
@@ -286,6 +310,99 @@ claude-run-dossier https://example.com/dossier.ds.md
|
|
|
286
310
|
|
|
287
311
|
---
|
|
288
312
|
|
|
313
|
+
## Registry Configuration
|
|
314
|
+
|
|
315
|
+
The CLI supports multiple registries for discovering, pulling, and publishing dossiers.
|
|
316
|
+
|
|
317
|
+
### Configuration File (`~/.dossier/config.json`)
|
|
318
|
+
|
|
319
|
+
Configure registries in your user config:
|
|
320
|
+
|
|
321
|
+
```json
|
|
322
|
+
{
|
|
323
|
+
"registries": {
|
|
324
|
+
"public": {
|
|
325
|
+
"url": "https://dossier-registry.vercel.app",
|
|
326
|
+
"default": true
|
|
327
|
+
},
|
|
328
|
+
"internal": {
|
|
329
|
+
"url": "https://dossier.internal.example.com"
|
|
330
|
+
},
|
|
331
|
+
"readonly-mirror": {
|
|
332
|
+
"url": "https://mirror.example.com",
|
|
333
|
+
"readonly": true
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"defaultRegistry": "public"
|
|
337
|
+
}
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### Project-Level Config (`.dossierrc.json`)
|
|
341
|
+
|
|
342
|
+
Place a `.dossierrc.json` in your project root to add project-specific registries:
|
|
343
|
+
|
|
344
|
+
```json
|
|
345
|
+
{
|
|
346
|
+
"registries": {
|
|
347
|
+
"team": {
|
|
348
|
+
"url": "https://dossier.myteam.example.com"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
"defaultRegistry": "team"
|
|
352
|
+
}
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
Project registries are merged with user registries. User-configured registries take precedence on name conflicts to prevent credential exfiltration.
|
|
356
|
+
|
|
357
|
+
### Environment Variable
|
|
358
|
+
|
|
359
|
+
Set `DOSSIER_REGISTRY_URL` to add a virtual `env` registry:
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
export DOSSIER_REGISTRY_URL=https://custom-registry.example.com
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
### Resolution Priority
|
|
366
|
+
|
|
367
|
+
When resolving registries, the CLI follows this priority:
|
|
368
|
+
|
|
369
|
+
1. `--registry` flag on the command
|
|
370
|
+
2. `DOSSIER_REGISTRY_URL` environment variable
|
|
371
|
+
3. Project-level `.dossierrc.json`
|
|
372
|
+
4. User-level `~/.dossier/config.json`
|
|
373
|
+
5. Hardcoded default (public registry)
|
|
374
|
+
|
|
375
|
+
### Per-Command Registry Flag
|
|
376
|
+
|
|
377
|
+
Write commands accept `--registry <name>` to target a specific registry:
|
|
378
|
+
|
|
379
|
+
```bash
|
|
380
|
+
ai-dossier publish --registry team my-dossier.ds.md
|
|
381
|
+
ai-dossier login --registry internal
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
Read commands (`search`, `get`, `pull`) query all configured registries in parallel.
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
## Agent Discovery (`--agent`)
|
|
389
|
+
|
|
390
|
+
The `--agent` flag outputs a machine-readable JSON manifest describing the CLI's capabilities. This is designed for AI agents that need to discover what the CLI can do programmatically:
|
|
391
|
+
|
|
392
|
+
```bash
|
|
393
|
+
ai-dossier --agent
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
Output includes:
|
|
397
|
+
- CLI version and available commands
|
|
398
|
+
- Supported flags (`--json`, `-y`/`--yes`)
|
|
399
|
+
- Capabilities (multi-registry, non-TTY safe, machine-readable errors)
|
|
400
|
+
- Discovery command for full command listing
|
|
401
|
+
|
|
402
|
+
This enables agents to auto-configure their integration with the Dossier CLI without parsing help text.
|
|
403
|
+
|
|
404
|
+
---
|
|
405
|
+
|
|
289
406
|
## Architecture
|
|
290
407
|
|
|
291
408
|
### How It Works
|
package/dist/cli.js
CHANGED
|
@@ -16,6 +16,7 @@ const export_1 = require("./commands/export");
|
|
|
16
16
|
const format_1 = require("./commands/format");
|
|
17
17
|
const from_file_1 = require("./commands/from-file");
|
|
18
18
|
const get_1 = require("./commands/get");
|
|
19
|
+
const history_1 = require("./commands/history");
|
|
19
20
|
const info_1 = require("./commands/info");
|
|
20
21
|
const init_1 = require("./commands/init");
|
|
21
22
|
const install_skill_1 = require("./commands/install-skill");
|
|
@@ -84,6 +85,7 @@ Agent-friendly: Run \`ai-dossier --agent\` for machine-readable capabilities.`);
|
|
|
84
85
|
(0, whoami_1.registerWhoamiCommand)(commander_1.program);
|
|
85
86
|
(0, config_cmd_1.registerConfigCommand)(commander_1.program);
|
|
86
87
|
(0, cache_1.registerCacheCommand)(commander_1.program);
|
|
88
|
+
(0, history_1.registerHistoryCommand)(commander_1.program);
|
|
87
89
|
// Hidden
|
|
88
90
|
(0, prompt_hook_1.registerPromptHookCommand)(commander_1.program);
|
|
89
91
|
(0, reset_hooks_1.registerResetHooksCommand)(commander_1.program);
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,yCAAoC;AAEpC,eAAe;AACf,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEvC,4CAAwD;AACxD,kDAA8D;AAC9D,kDAA8D;AAC9D,sDAA8D;AAC9D,8CAA0D;AAC1D,8CAA0D;AAC1D,8CAA0D;AAC1D,oDAA+D;AAC/D,wCAAoD;AACpD,0CAAsD;AACtD,0CAAsD;AACtD,4DAAuE;AACvE,0CAAsD;AACtD,0CAAsD;AACtD,0CAAsD;AACtD,4CAAwD;AACxD,8CAA0D;AAC1D,wDAAmE;AACnE,gDAA4D;AAC5D,0CAAsD;AACtD,8CAA0D;AAC1D,wDAAmE;AACnE,wCAAoD;AACpD,8CAA0D;AAC1D,0CAAsD;AACtD,0DAAqE;AACrE,kDAA8D;AAC9D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;IAC/C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,oBAAoB;AACpB,mBAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,mCAAmC;AACnC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,mBAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-cmd.d.ts","sourceRoot":"","sources":["../../src/commands/config-cmd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"config-cmd.d.ts","sourceRoot":"","sources":["../../src/commands/config-cmd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsOzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgD5D"}
|
|
@@ -35,6 +35,194 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.registerConfigCommand = registerConfigCommand;
|
|
37
37
|
const config = __importStar(require("../config"));
|
|
38
|
+
const REQUIRED_PROTOCOL = 'https:';
|
|
39
|
+
const VALID_LLMS = ['auto', 'claude-code'];
|
|
40
|
+
function printConfigEntries(cfg) {
|
|
41
|
+
Object.entries(cfg).forEach(([k, v]) => {
|
|
42
|
+
if (typeof v === 'object' && v !== null) {
|
|
43
|
+
console.log(` ${k}: ${JSON.stringify(v)}`);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
console.log(` ${k}: ${v}`);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function printConfigKeys(header) {
|
|
51
|
+
console.log(header);
|
|
52
|
+
for (const k of Object.keys(config.DEFAULT_CONFIG)) {
|
|
53
|
+
console.log(` - ${k}`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function saveConfigOrExit(cfg, successMessage) {
|
|
57
|
+
if (config.saveConfig(cfg)) {
|
|
58
|
+
console.log(successMessage);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
console.error('❌ Failed to save configuration');
|
|
62
|
+
process.exit(1);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function handleListRegistries(options) {
|
|
66
|
+
const registries = config.resolveRegistries();
|
|
67
|
+
const currentConfig = config.loadConfig();
|
|
68
|
+
const projectConfig = config.loadProjectConfig();
|
|
69
|
+
const defaultName = projectConfig?.defaultRegistry || currentConfig.defaultRegistry;
|
|
70
|
+
if (options.json) {
|
|
71
|
+
console.log(JSON.stringify({
|
|
72
|
+
registries: registries.map((r) => ({
|
|
73
|
+
name: r.name,
|
|
74
|
+
url: r.url,
|
|
75
|
+
readonly: r.readonly || false,
|
|
76
|
+
default: r.name === defaultName,
|
|
77
|
+
})),
|
|
78
|
+
defaultRegistry: defaultName || null,
|
|
79
|
+
}, null, 2));
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
console.log('\n📋 Configured Registries:\n');
|
|
83
|
+
for (const r of registries) {
|
|
84
|
+
const flags = [];
|
|
85
|
+
if (r.name === defaultName)
|
|
86
|
+
flags.push('default');
|
|
87
|
+
if (r.readonly)
|
|
88
|
+
flags.push('read-only');
|
|
89
|
+
const flagStr = flags.length > 0 ? ` (${flags.join(', ')})` : '';
|
|
90
|
+
console.log(` ${r.name}: ${r.url}${flagStr}`);
|
|
91
|
+
}
|
|
92
|
+
console.log('');
|
|
93
|
+
}
|
|
94
|
+
process.exit(0);
|
|
95
|
+
}
|
|
96
|
+
function handleAddRegistry(options) {
|
|
97
|
+
if (!options.url) {
|
|
98
|
+
console.error('\n❌ --url is required when adding a registry\n');
|
|
99
|
+
console.error('Example: dossier config --add-registry internal --url https://dossier.company.com\n');
|
|
100
|
+
process.exit(1);
|
|
101
|
+
}
|
|
102
|
+
// Validate HTTPS — reject http:// and other insecure protocols
|
|
103
|
+
try {
|
|
104
|
+
const parsed = new URL(options.url);
|
|
105
|
+
if (parsed.protocol !== REQUIRED_PROTOCOL) {
|
|
106
|
+
console.error(`\n❌ Registry URL must use HTTPS: ${options.url}\n`);
|
|
107
|
+
console.error('Only https:// URLs are allowed to protect credentials in transit.\n');
|
|
108
|
+
process.exit(1);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
console.error(`\n❌ Invalid URL: ${options.url}\n`);
|
|
113
|
+
process.exit(1);
|
|
114
|
+
}
|
|
115
|
+
const currentConfig = config.loadConfig();
|
|
116
|
+
if (!currentConfig.registries) {
|
|
117
|
+
currentConfig.registries = {};
|
|
118
|
+
}
|
|
119
|
+
const entry = { url: options.url };
|
|
120
|
+
if (options.default)
|
|
121
|
+
entry.default = true;
|
|
122
|
+
if (options.readonly)
|
|
123
|
+
entry.readonly = true;
|
|
124
|
+
currentConfig.registries[options.addRegistry] = entry;
|
|
125
|
+
if (options.default) {
|
|
126
|
+
currentConfig.defaultRegistry = options.addRegistry;
|
|
127
|
+
}
|
|
128
|
+
const details = [
|
|
129
|
+
`\n✅ Added registry '${options.addRegistry}': ${options.url}`,
|
|
130
|
+
...(options.default ? [' Set as default registry'] : []),
|
|
131
|
+
...(options.readonly ? [' Marked as read-only'] : []),
|
|
132
|
+
'',
|
|
133
|
+
].join('\n');
|
|
134
|
+
saveConfigOrExit(currentConfig, details);
|
|
135
|
+
process.exit(0);
|
|
136
|
+
}
|
|
137
|
+
function handleRemoveRegistry(options) {
|
|
138
|
+
const currentConfig = config.loadConfig();
|
|
139
|
+
if (!currentConfig.registries || !(options.removeRegistry in currentConfig.registries)) {
|
|
140
|
+
console.error(`\n❌ Registry '${options.removeRegistry}' not found\n`);
|
|
141
|
+
process.exit(1);
|
|
142
|
+
}
|
|
143
|
+
delete currentConfig.registries[options.removeRegistry];
|
|
144
|
+
if (currentConfig.defaultRegistry === options.removeRegistry) {
|
|
145
|
+
delete currentConfig.defaultRegistry;
|
|
146
|
+
}
|
|
147
|
+
saveConfigOrExit(currentConfig, `\n✅ Removed registry '${options.removeRegistry}'\n`);
|
|
148
|
+
process.exit(0);
|
|
149
|
+
}
|
|
150
|
+
function handleSetDefaultRegistry(options) {
|
|
151
|
+
const registries = config.resolveRegistries();
|
|
152
|
+
const found = registries.find((r) => r.name === options.setDefaultRegistry);
|
|
153
|
+
if (!found) {
|
|
154
|
+
const names = registries.map((r) => r.name).join(', ');
|
|
155
|
+
console.error(`\n❌ Registry '${options.setDefaultRegistry}' not found`);
|
|
156
|
+
console.error(` Available: ${names}\n`);
|
|
157
|
+
process.exit(1);
|
|
158
|
+
}
|
|
159
|
+
const currentConfig = config.loadConfig();
|
|
160
|
+
currentConfig.defaultRegistry = options.setDefaultRegistry;
|
|
161
|
+
saveConfigOrExit(currentConfig, `\n✅ Default registry set to '${options.setDefaultRegistry}'\n`);
|
|
162
|
+
process.exit(0);
|
|
163
|
+
}
|
|
164
|
+
function handleListConfig() {
|
|
165
|
+
const currentConfig = config.loadConfig();
|
|
166
|
+
console.log('📋 Current Configuration:\n');
|
|
167
|
+
console.log(` Config file: ${config.CONFIG_FILE}\n`);
|
|
168
|
+
printConfigEntries(currentConfig);
|
|
169
|
+
console.log('\nTo change a setting: dossier config <key> <value>');
|
|
170
|
+
console.log('Example: dossier config defaultLlm claude-code\n');
|
|
171
|
+
process.exit(0);
|
|
172
|
+
}
|
|
173
|
+
function handleReset() {
|
|
174
|
+
const currentConfig = config.loadConfig();
|
|
175
|
+
const resetConfig = { ...config.DEFAULT_CONFIG };
|
|
176
|
+
if (currentConfig.registries) {
|
|
177
|
+
resetConfig.registries = currentConfig.registries;
|
|
178
|
+
}
|
|
179
|
+
if (currentConfig.defaultRegistry) {
|
|
180
|
+
resetConfig.defaultRegistry = currentConfig.defaultRegistry;
|
|
181
|
+
}
|
|
182
|
+
saveConfigOrExit(resetConfig, '✅ Configuration reset to defaults (registry settings preserved)\n');
|
|
183
|
+
printConfigEntries(resetConfig);
|
|
184
|
+
process.exit(0);
|
|
185
|
+
}
|
|
186
|
+
function handleGetConfig(key) {
|
|
187
|
+
const val = config.getConfig(key);
|
|
188
|
+
if (val !== undefined) {
|
|
189
|
+
if (typeof val === 'object' && val !== null) {
|
|
190
|
+
console.log(`${key}: ${JSON.stringify(val, null, 2)}`);
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
console.log(`${key}: ${val}`);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
console.log(`❌ Unknown configuration key: ${key}\n`);
|
|
198
|
+
printConfigKeys('Available keys:');
|
|
199
|
+
process.exit(1);
|
|
200
|
+
}
|
|
201
|
+
process.exit(0);
|
|
202
|
+
}
|
|
203
|
+
function handleSetConfig(key, value) {
|
|
204
|
+
if (!(key in config.DEFAULT_CONFIG)) {
|
|
205
|
+
console.log(`⚠️ Warning: '${key}' is not a standard config key\n`);
|
|
206
|
+
printConfigKeys('Standard keys:');
|
|
207
|
+
console.log('\nContinuing anyway...\n');
|
|
208
|
+
}
|
|
209
|
+
if (key === 'defaultLlm') {
|
|
210
|
+
if (!VALID_LLMS.includes(value)) {
|
|
211
|
+
console.log(`⚠️ Warning: '${value}' may not be a supported LLM\n`);
|
|
212
|
+
console.log('Supported values:');
|
|
213
|
+
for (const llm of VALID_LLMS) {
|
|
214
|
+
console.log(` - ${llm}`);
|
|
215
|
+
}
|
|
216
|
+
console.log('\nContinuing anyway...\n');
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
if (!config.setConfig(key, value)) {
|
|
220
|
+
console.error('❌ Failed to save configuration');
|
|
221
|
+
process.exit(1);
|
|
222
|
+
}
|
|
223
|
+
console.log(`✅ Configuration updated: ${key} = ${value}`);
|
|
224
|
+
process.exit(0);
|
|
225
|
+
}
|
|
38
226
|
function registerConfigCommand(program) {
|
|
39
227
|
program
|
|
40
228
|
.command('config')
|
|
@@ -67,214 +255,23 @@ Environment variables:
|
|
|
67
255
|
`)
|
|
68
256
|
.action((key, value, options) => {
|
|
69
257
|
// --- Registry management ---
|
|
70
|
-
if (options.listRegistries)
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const defaultName = projectConfig?.defaultRegistry || currentConfig.defaultRegistry;
|
|
88
|
-
for (const r of registries) {
|
|
89
|
-
const flags = [];
|
|
90
|
-
if (r.name === defaultName)
|
|
91
|
-
flags.push('default');
|
|
92
|
-
if (r.readonly)
|
|
93
|
-
flags.push('read-only');
|
|
94
|
-
const flagStr = flags.length > 0 ? ` (${flags.join(', ')})` : '';
|
|
95
|
-
console.log(` ${r.name}: ${r.url}${flagStr}`);
|
|
96
|
-
}
|
|
97
|
-
console.log('');
|
|
98
|
-
}
|
|
99
|
-
process.exit(0);
|
|
100
|
-
}
|
|
101
|
-
if (options.addRegistry) {
|
|
102
|
-
if (!options.url) {
|
|
103
|
-
console.error('\n❌ --url is required when adding a registry\n');
|
|
104
|
-
console.error('Example: dossier config --add-registry internal --url https://dossier.company.com\n');
|
|
105
|
-
process.exit(1);
|
|
106
|
-
}
|
|
107
|
-
// Validate HTTPS — reject http:// and other insecure protocols
|
|
108
|
-
try {
|
|
109
|
-
const parsed = new URL(options.url);
|
|
110
|
-
if (parsed.protocol !== 'https:') {
|
|
111
|
-
console.error(`\n❌ Registry URL must use HTTPS: ${options.url}\n`);
|
|
112
|
-
console.error('Only https:// URLs are allowed to protect credentials in transit.\n');
|
|
113
|
-
process.exit(1);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
catch {
|
|
117
|
-
console.error(`\n❌ Invalid URL: ${options.url}\n`);
|
|
118
|
-
process.exit(1);
|
|
119
|
-
}
|
|
120
|
-
const currentConfig = config.loadConfig();
|
|
121
|
-
if (!currentConfig.registries) {
|
|
122
|
-
currentConfig.registries = {};
|
|
123
|
-
}
|
|
124
|
-
const entry = { url: options.url };
|
|
125
|
-
if (options.default)
|
|
126
|
-
entry.default = true;
|
|
127
|
-
if (options.readonly)
|
|
128
|
-
entry.readonly = true;
|
|
129
|
-
currentConfig.registries[options.addRegistry] = entry;
|
|
130
|
-
if (options.default) {
|
|
131
|
-
currentConfig.defaultRegistry = options.addRegistry;
|
|
132
|
-
}
|
|
133
|
-
if (config.saveConfig(currentConfig)) {
|
|
134
|
-
console.log(`\n✅ Added registry '${options.addRegistry}': ${options.url}`);
|
|
135
|
-
if (options.default)
|
|
136
|
-
console.log(' Set as default registry');
|
|
137
|
-
if (options.readonly)
|
|
138
|
-
console.log(' Marked as read-only');
|
|
139
|
-
console.log('');
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
console.error('❌ Failed to save configuration');
|
|
143
|
-
process.exit(1);
|
|
144
|
-
}
|
|
145
|
-
process.exit(0);
|
|
146
|
-
}
|
|
147
|
-
if (options.removeRegistry) {
|
|
148
|
-
const currentConfig = config.loadConfig();
|
|
149
|
-
if (!currentConfig.registries || !(options.removeRegistry in currentConfig.registries)) {
|
|
150
|
-
console.error(`\n❌ Registry '${options.removeRegistry}' not found\n`);
|
|
151
|
-
process.exit(1);
|
|
152
|
-
}
|
|
153
|
-
delete currentConfig.registries[options.removeRegistry];
|
|
154
|
-
if (currentConfig.defaultRegistry === options.removeRegistry) {
|
|
155
|
-
delete currentConfig.defaultRegistry;
|
|
156
|
-
}
|
|
157
|
-
if (config.saveConfig(currentConfig)) {
|
|
158
|
-
console.log(`\n✅ Removed registry '${options.removeRegistry}'\n`);
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
console.error('❌ Failed to save configuration');
|
|
162
|
-
process.exit(1);
|
|
163
|
-
}
|
|
164
|
-
process.exit(0);
|
|
165
|
-
}
|
|
166
|
-
if (options.setDefaultRegistry) {
|
|
167
|
-
const registries = config.resolveRegistries();
|
|
168
|
-
const found = registries.find((r) => r.name === options.setDefaultRegistry);
|
|
169
|
-
if (!found) {
|
|
170
|
-
const names = registries.map((r) => r.name).join(', ');
|
|
171
|
-
console.error(`\n❌ Registry '${options.setDefaultRegistry}' not found`);
|
|
172
|
-
console.error(` Available: ${names}\n`);
|
|
173
|
-
process.exit(1);
|
|
174
|
-
}
|
|
175
|
-
const currentConfig = config.loadConfig();
|
|
176
|
-
currentConfig.defaultRegistry = options.setDefaultRegistry;
|
|
177
|
-
if (config.saveConfig(currentConfig)) {
|
|
178
|
-
console.log(`\n✅ Default registry set to '${options.setDefaultRegistry}'\n`);
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
console.error('❌ Failed to save configuration');
|
|
182
|
-
process.exit(1);
|
|
183
|
-
}
|
|
184
|
-
process.exit(0);
|
|
185
|
-
}
|
|
186
|
-
// --- Original config management ---
|
|
187
|
-
if (options.list || (!key && !options.reset)) {
|
|
188
|
-
const currentConfig = config.loadConfig();
|
|
189
|
-
console.log('📋 Current Configuration:\n');
|
|
190
|
-
console.log(` Config file: ${config.CONFIG_FILE}\n`);
|
|
191
|
-
Object.entries(currentConfig).forEach(([k, v]) => {
|
|
192
|
-
if (typeof v === 'object' && v !== null) {
|
|
193
|
-
console.log(` ${k}: ${JSON.stringify(v)}`);
|
|
194
|
-
}
|
|
195
|
-
else {
|
|
196
|
-
console.log(` ${k}: ${v}`);
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
console.log('\nTo change a setting: dossier config <key> <value>');
|
|
200
|
-
console.log('Example: dossier config defaultLlm claude-code\n');
|
|
201
|
-
process.exit(0);
|
|
202
|
-
}
|
|
203
|
-
if (options.reset) {
|
|
204
|
-
const currentConfig = config.loadConfig();
|
|
205
|
-
const resetConfig = { ...config.DEFAULT_CONFIG };
|
|
206
|
-
if (currentConfig.registries) {
|
|
207
|
-
resetConfig.registries = currentConfig.registries;
|
|
208
|
-
}
|
|
209
|
-
if (currentConfig.defaultRegistry) {
|
|
210
|
-
resetConfig.defaultRegistry = currentConfig.defaultRegistry;
|
|
211
|
-
}
|
|
212
|
-
if (config.saveConfig(resetConfig)) {
|
|
213
|
-
console.log('✅ Configuration reset to defaults (registry settings preserved)\n');
|
|
214
|
-
Object.entries(resetConfig).forEach(([k, v]) => {
|
|
215
|
-
if (typeof v === 'object' && v !== null) {
|
|
216
|
-
console.log(` ${k}: ${JSON.stringify(v)}`);
|
|
217
|
-
}
|
|
218
|
-
else {
|
|
219
|
-
console.log(` ${k}: ${v}`);
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
console.log('❌ Failed to reset configuration');
|
|
225
|
-
process.exit(1);
|
|
226
|
-
}
|
|
227
|
-
process.exit(0);
|
|
228
|
-
}
|
|
229
|
-
if (key && !value) {
|
|
230
|
-
const val = config.getConfig(key);
|
|
231
|
-
if (val !== undefined) {
|
|
232
|
-
if (typeof val === 'object' && val !== null) {
|
|
233
|
-
console.log(`${key}: ${JSON.stringify(val, null, 2)}`);
|
|
234
|
-
}
|
|
235
|
-
else {
|
|
236
|
-
console.log(`${key}: ${val}`);
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
else {
|
|
240
|
-
console.log(`❌ Unknown configuration key: ${key}\n`);
|
|
241
|
-
console.log('Available keys:');
|
|
242
|
-
for (const k of Object.keys(config.DEFAULT_CONFIG)) {
|
|
243
|
-
console.log(` - ${k}`);
|
|
244
|
-
}
|
|
245
|
-
process.exit(1);
|
|
246
|
-
}
|
|
247
|
-
process.exit(0);
|
|
248
|
-
}
|
|
249
|
-
if (key && value) {
|
|
250
|
-
if (!(key in config.DEFAULT_CONFIG)) {
|
|
251
|
-
console.log(`⚠️ Warning: '${key}' is not a standard config key\n`);
|
|
252
|
-
console.log('Standard keys:');
|
|
253
|
-
for (const k of Object.keys(config.DEFAULT_CONFIG)) {
|
|
254
|
-
console.log(` - ${k}`);
|
|
255
|
-
}
|
|
256
|
-
console.log('\nContinuing anyway...\n');
|
|
257
|
-
}
|
|
258
|
-
if (key === 'defaultLlm') {
|
|
259
|
-
const validLlms = ['auto', 'claude-code'];
|
|
260
|
-
if (!validLlms.includes(value)) {
|
|
261
|
-
console.log(`⚠️ Warning: '${value}' may not be a supported LLM\n`);
|
|
262
|
-
console.log('Supported values:');
|
|
263
|
-
for (const llm of validLlms) {
|
|
264
|
-
console.log(` - ${llm}`);
|
|
265
|
-
}
|
|
266
|
-
console.log('\nContinuing anyway...\n');
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
if (config.setConfig(key, value)) {
|
|
270
|
-
console.log(`✅ Configuration updated: ${key} = ${value}`);
|
|
271
|
-
}
|
|
272
|
-
else {
|
|
273
|
-
console.log('❌ Failed to update configuration');
|
|
274
|
-
process.exit(1);
|
|
275
|
-
}
|
|
276
|
-
process.exit(0);
|
|
277
|
-
}
|
|
258
|
+
if (options.listRegistries)
|
|
259
|
+
return handleListRegistries(options);
|
|
260
|
+
if (options.addRegistry)
|
|
261
|
+
return handleAddRegistry(options);
|
|
262
|
+
if (options.removeRegistry)
|
|
263
|
+
return handleRemoveRegistry(options);
|
|
264
|
+
if (options.setDefaultRegistry)
|
|
265
|
+
return handleSetDefaultRegistry(options);
|
|
266
|
+
// --- General config management ---
|
|
267
|
+
if (options.list || (!key && !options.reset))
|
|
268
|
+
return handleListConfig();
|
|
269
|
+
if (options.reset)
|
|
270
|
+
return handleReset();
|
|
271
|
+
if (key && !value)
|
|
272
|
+
return handleGetConfig(key);
|
|
273
|
+
if (key && value)
|
|
274
|
+
return handleSetConfig(key, value);
|
|
278
275
|
});
|
|
279
276
|
}
|
|
280
277
|
//# sourceMappingURL=config-cmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-cmd.js","sourceRoot":"","sources":["../../src/commands/config-cmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"config-cmd.js","sourceRoot":"","sources":["../../src/commands/config-cmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsOA,sDAgDC;AArRD,kDAAoC;AAEpC,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AACnC,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAE3C,SAAS,kBAAkB,CAAC,GAAyB;IACnD,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;QACrC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;YACxC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC/C,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,eAAe,CAAC,MAAc;IACrC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACpB,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;QACnD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,GAAyB,EAAE,cAAsB;IACzE,IAAI,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC9B,CAAC;SAAM,CAAC;QACN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G,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;YAAE,OAAO,gBAAgB,EAAE,CAAC;QACxE,IAAI,OAAO,CAAC,KAAK;YAAE,OAAO,WAAW,EAAE,CAAC;QACxC,IAAI,GAAG,IAAI,CAAC,KAAK;YAAE,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;QAC/C,IAAI,GAAG,IAAI,KAAK;YAAE,OAAO,eAAe,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8J5D"}
|