@junctionpanel/cli 0.1.94 → 0.1.96
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.
|
@@ -6,6 +6,7 @@ export interface ProviderListItem {
|
|
|
6
6
|
status: string;
|
|
7
7
|
defaultMode: string;
|
|
8
8
|
modes: string;
|
|
9
|
+
error?: string;
|
|
9
10
|
}
|
|
10
11
|
/** Schema for provider ls output */
|
|
11
12
|
export declare const providerLsSchema: OutputSchema<ProviderListItem>;
|
|
@@ -13,5 +14,5 @@ export type ProviderLsResult = ListResult<ProviderListItem>;
|
|
|
13
14
|
export interface ProviderLsOptions extends CommandOptions {
|
|
14
15
|
host?: string;
|
|
15
16
|
}
|
|
16
|
-
export declare function runLsCommand(
|
|
17
|
+
export declare function runLsCommand(options: ProviderLsOptions, _command: Command): Promise<ProviderLsResult>;
|
|
17
18
|
//# sourceMappingURL=ls.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ls.d.ts","sourceRoot":"","sources":["../../../src/commands/provider/ls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"ls.d.ts","sourceRoot":"","sources":["../../../src/commands/provider/ls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAErF,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,oCAAoC;AACpC,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,gBAAgB,CAiB3D,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAA;AAE3D,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACvD,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GAChB,OAAO,CAAC,gBAAgB,CAAC,CA2B3B"}
|
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
const PROVIDERS = [
|
|
3
|
-
{
|
|
4
|
-
provider: 'claude',
|
|
5
|
-
status: 'available',
|
|
6
|
-
defaultMode: 'default',
|
|
7
|
-
modes: 'plan, default, bypass',
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
provider: 'codex',
|
|
11
|
-
status: 'available',
|
|
12
|
-
defaultMode: 'auto',
|
|
13
|
-
modes: 'read-only, auto, full-access',
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
provider: 'opencode',
|
|
17
|
-
status: 'available',
|
|
18
|
-
defaultMode: 'default',
|
|
19
|
-
modes: 'plan, default, bypass',
|
|
20
|
-
},
|
|
21
|
-
];
|
|
1
|
+
import { connectToDaemon } from '../../utils/client.js';
|
|
22
2
|
/** Schema for provider ls output */
|
|
23
3
|
export const providerLsSchema = {
|
|
24
4
|
idField: 'provider',
|
|
@@ -40,12 +20,31 @@ export const providerLsSchema = {
|
|
|
40
20
|
{ header: 'MODES', field: 'modes', width: 30 },
|
|
41
21
|
],
|
|
42
22
|
};
|
|
43
|
-
export async function runLsCommand(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
23
|
+
export async function runLsCommand(options, _command) {
|
|
24
|
+
const client = await connectToDaemon({ host: options.host });
|
|
25
|
+
try {
|
|
26
|
+
const result = await client.listAvailableProviders();
|
|
27
|
+
if (result.error) {
|
|
28
|
+
throw {
|
|
29
|
+
code: 'PROVIDER_ERROR',
|
|
30
|
+
message: `Failed to fetch provider availability: ${result.error}`,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const providers = result.providers.map((provider) => ({
|
|
34
|
+
provider: provider.provider,
|
|
35
|
+
status: provider.available ? 'available' : 'unavailable',
|
|
36
|
+
defaultMode: provider.defaultModeId ?? 'none',
|
|
37
|
+
modes: provider.modes.map((mode) => mode.id).join(', ') || 'none',
|
|
38
|
+
...(provider.error ? { error: provider.error } : {}),
|
|
39
|
+
}));
|
|
40
|
+
return {
|
|
41
|
+
type: 'list',
|
|
42
|
+
data: providers,
|
|
43
|
+
schema: providerLsSchema,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
finally {
|
|
47
|
+
await client.close();
|
|
48
|
+
}
|
|
50
49
|
}
|
|
51
50
|
//# sourceMappingURL=ls.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ls.js","sourceRoot":"","sources":["../../../src/commands/provider/ls.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ls.js","sourceRoot":"","sources":["../../../src/commands/provider/ls.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAYvD,oCAAoC;AACpC,MAAM,CAAC,MAAM,gBAAgB,GAAmC;IAC9D,OAAO,EAAE,UAAU;IACnB,OAAO,EAAE;QACP,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE;QACpD;YACE,MAAM,EAAE,QAAQ;YAChB,KAAK,EAAE,QAAQ;YACf,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;gBACf,IAAI,KAAK,KAAK,WAAW;oBAAE,OAAO,OAAO,CAAA;gBACzC,IAAI,KAAK,KAAK,aAAa;oBAAE,OAAO,KAAK,CAAA;gBACzC,OAAO,SAAS,CAAA;YAClB,CAAC;SACF;QACD,EAAE,MA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B;SACzB,CAAA;IACH,CAAC;YAAS,CAAC;QACT,MAAM,MAAM,CAAC,KAAK,EAAE,CAAA;IACtB,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@junctionpanel/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.96",
|
|
4
4
|
"description": "Junction CLI - control your AI coding agents from the command line",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/cli.d.ts",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"mime-types": "^2.1.35",
|
|
46
46
|
"ws": "^8.14.2",
|
|
47
47
|
"yaml": "^2.8.2",
|
|
48
|
-
"@junctionpanel/relay": "0.1.
|
|
49
|
-
"@junctionpanel/server": "0.1.
|
|
48
|
+
"@junctionpanel/relay": "0.1.96",
|
|
49
|
+
"@junctionpanel/server": "0.1.96"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/mime-types": "^3.0.1",
|