@f5-sales-demo/xcsh 21.47.1 → 21.47.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@f5-sales-demo/xcsh",
4
- "version": "21.47.1",
4
+ "version": "21.47.3",
5
5
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
6
6
  "homepage": "https://github.com/f5-sales-demo/xcsh",
7
7
  "author": "Can Boluk",
@@ -66,13 +66,13 @@
66
66
  },
67
67
  "dependencies": {
68
68
  "@agentclientprotocol/sdk": "1.4.0",
69
- "@f5-sales-demo/pi-agent-core": "21.47.1",
70
- "@f5-sales-demo/pi-ai": "21.47.1",
71
- "@f5-sales-demo/pi-natives": "21.47.1",
72
- "@f5-sales-demo/pi-resource-management": "21.47.1",
73
- "@f5-sales-demo/pi-tui": "21.47.1",
74
- "@f5-sales-demo/pi-utils": "21.47.1",
75
- "@f5-sales-demo/xcsh-stats": "21.47.1",
69
+ "@f5-sales-demo/pi-agent-core": "21.47.3",
70
+ "@f5-sales-demo/pi-ai": "21.47.3",
71
+ "@f5-sales-demo/pi-natives": "21.47.3",
72
+ "@f5-sales-demo/pi-resource-management": "21.47.3",
73
+ "@f5-sales-demo/pi-tui": "21.47.3",
74
+ "@f5-sales-demo/pi-utils": "21.47.3",
75
+ "@f5-sales-demo/xcsh-stats": "21.47.3",
76
76
  "@mozilla/readability": "^0.6",
77
77
  "@sinclair/typebox": "0.34.52",
78
78
  "@tobilu/qmd": "2.8.3",
@@ -1,17 +1,27 @@
1
- import { Command, Flags } from "@f5-sales-demo/pi-utils/cli";
1
+ import { Args, Command, Flags } from "@f5-sales-demo/pi-utils/cli";
2
2
  import { runOpenAIDeviceAuthLogin } from "../cli/openai-device-auth";
3
3
 
4
4
  /** Authenticate ChatGPT through a device-code flow suitable for SSH and headless terminals. */
5
5
  export default class Login extends Command {
6
6
  static description = "Authenticate ChatGPT using a device code";
7
+ static args = {
8
+ provider: Args.string({
9
+ description: "Provider to authenticate (openai)",
10
+ required: true,
11
+ options: ["openai"],
12
+ }),
13
+ };
7
14
  static flags = {
8
15
  "device-auth": Flags.boolean({ description: "Use ChatGPT device-code authentication", default: false }),
9
16
  };
10
17
 
11
18
  async run(): Promise<void> {
12
- const { flags } = await this.parse(Login);
19
+ const { args, flags } = await this.parse(Login);
20
+ if (args.provider !== "openai") {
21
+ throw new Error("Device-code authentication is available only for the openai provider.");
22
+ }
13
23
  if (!flags["device-auth"]) {
14
- throw new Error("Use xcsh login --device-auth to authenticate ChatGPT with a device code.");
24
+ throw new Error("Use xcsh login openai --device-auth to authenticate ChatGPT with a device code.");
15
25
  }
16
26
  await runOpenAIDeviceAuthLogin();
17
27
  }