@arizeai/phoenix-cli 1.3.0 → 1.3.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/build/settings.d.ts +36 -0
- package/build/settings.d.ts.map +1 -0
- package/build/settings.js +41 -0
- package/build/settings.js.map +1 -0
- package/package.json +5 -3
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings storage schema definitions for the Phoenix CLI.
|
|
3
|
+
*
|
|
4
|
+
* This module exports the Zod schemas and inferred TypeScript types that
|
|
5
|
+
* describe the on-disk settings file (`~/.px/settings.json`). Runtime I/O,
|
|
6
|
+
* parsing, and profile resolution logic live alongside the CLI commands
|
|
7
|
+
* that consume them; this file is the canonical source for
|
|
8
|
+
* `schemas/phoenix-cli-settings.json` (emitted by `scripts/build-schema.ts`).
|
|
9
|
+
*/
|
|
10
|
+
import { z } from "zod";
|
|
11
|
+
export declare const ProfileEntrySchema: z.ZodObject<{
|
|
12
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
13
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
14
|
+
project: z.ZodOptional<z.ZodString>;
|
|
15
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export declare const SettingsFileSchema: z.ZodObject<{
|
|
18
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
19
|
+
activeProfile: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
20
|
+
profiles: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
21
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
22
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
23
|
+
project: z.ZodOptional<z.ZodString>;
|
|
24
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
/**
|
|
28
|
+
* A single named profile entry. All fields are optional — a profile may
|
|
29
|
+
* override only a subset of configuration values.
|
|
30
|
+
*/
|
|
31
|
+
export type ProfileEntry = z.infer<typeof ProfileEntrySchema>;
|
|
32
|
+
/**
|
|
33
|
+
* On-disk schema for the CLI settings file.
|
|
34
|
+
*/
|
|
35
|
+
export type SettingsFile = z.infer<typeof SettingsFileSchema>;
|
|
36
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kBAAkB;;;;;iBAyB7B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;iBAiB7B,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings storage schema definitions for the Phoenix CLI.
|
|
3
|
+
*
|
|
4
|
+
* This module exports the Zod schemas and inferred TypeScript types that
|
|
5
|
+
* describe the on-disk settings file (`~/.px/settings.json`). Runtime I/O,
|
|
6
|
+
* parsing, and profile resolution logic live alongside the CLI commands
|
|
7
|
+
* that consume them; this file is the canonical source for
|
|
8
|
+
* `schemas/phoenix-cli-settings.json` (emitted by `scripts/build-schema.ts`).
|
|
9
|
+
*/
|
|
10
|
+
import { z } from "zod";
|
|
11
|
+
export const ProfileEntrySchema = z.object({
|
|
12
|
+
endpoint: z
|
|
13
|
+
.string()
|
|
14
|
+
.optional()
|
|
15
|
+
.describe("Phoenix server URL this profile targets (e.g. https://app.phoenix.arize.com or http://localhost:6006)."),
|
|
16
|
+
apiKey: z
|
|
17
|
+
.string()
|
|
18
|
+
.optional()
|
|
19
|
+
.describe("API key sent as `Authorization: Bearer <apiKey>` with every request. Accepts both user and system API keys for self-hosted Phoenix and Phoenix Cloud. Treat as a secret — the profiles file should be user-readable only (mode 0600)."),
|
|
20
|
+
project: z
|
|
21
|
+
.string()
|
|
22
|
+
.optional()
|
|
23
|
+
.describe("Default Phoenix project name used when commands don't pass --project."),
|
|
24
|
+
headers: z
|
|
25
|
+
.record(z.string(), z.string())
|
|
26
|
+
.optional()
|
|
27
|
+
.describe("Extra HTTP headers sent with every request from this profile. Useful for custom auth or routing. Values override defaults."),
|
|
28
|
+
});
|
|
29
|
+
export const SettingsFileSchema = z.object({
|
|
30
|
+
$schema: z
|
|
31
|
+
.string()
|
|
32
|
+
.optional()
|
|
33
|
+
.describe("Optional JSON Schema URL for editor autocomplete. Pin to a GitHub raw URL at a released tag; see README."),
|
|
34
|
+
activeProfile: z
|
|
35
|
+
.union([z.string(), z.null()])
|
|
36
|
+
.describe("Name of the profile to use when no --profile flag is passed. Must match a key in `profiles`."),
|
|
37
|
+
profiles: z
|
|
38
|
+
.record(z.string(), ProfileEntrySchema)
|
|
39
|
+
.describe("Map of profile name to profile entry. Keys are the profile names referenced by `activeProfile` and the --profile flag."),
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,wGAAwG,CACzG;IACH,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,uOAAuO,CACxO;IACH,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,uEAAuE,CACxE;IACH,OAAO,EAAE,CAAC;SACP,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;SAC9B,QAAQ,EAAE;SACV,QAAQ,CACP,4HAA4H,CAC7H;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,0GAA0G,CAC3G;IACH,aAAa,EAAE,CAAC;SACb,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;SAC7B,QAAQ,CACP,8FAA8F,CAC/F;IACH,QAAQ,EAAE,CAAC;SACR,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,kBAAkB,CAAC;SACtC,QAAQ,CACP,wHAAwH,CACzH;CACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arizeai/phoenix-cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "A command-line interface for Phoenix",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"arize",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"@arizeai/openinference-semantic-conventions": "^1.1.0",
|
|
34
34
|
"@clack/prompts": "^1.0.1",
|
|
35
35
|
"commander": "^12.1.0",
|
|
36
|
-
"
|
|
36
|
+
"zod": "^4.0.14",
|
|
37
|
+
"@arizeai/phoenix-client": "6.8.1",
|
|
37
38
|
"@arizeai/phoenix-config": "0.1.3"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
@@ -47,7 +48,8 @@
|
|
|
47
48
|
"node": ">=20"
|
|
48
49
|
},
|
|
49
50
|
"scripts": {
|
|
50
|
-
"build": "tsc && tsc-alias && chmod 755 build/index.js",
|
|
51
|
+
"build": "pnpm run build:schema && tsc && tsc-alias && chmod 755 build/index.js",
|
|
52
|
+
"build:schema": "tsx scripts/build-schema.ts && cd ../../.. && oxfmt --config .oxfmtrc.jsonc schemas/phoenix-cli-settings.json",
|
|
51
53
|
"clean": "rimraf build",
|
|
52
54
|
"dev": "tsx src/index.ts",
|
|
53
55
|
"prebuild": "pnpm run clean",
|