@amaretto-software-labs/borealis-cli 0.1.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.
Files changed (52) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +112 -0
  3. package/dist/api-client.d.ts +36 -0
  4. package/dist/api-client.js +673 -0
  5. package/dist/api-client.js.map +1 -0
  6. package/dist/app.d.ts +6 -0
  7. package/dist/app.js +344 -0
  8. package/dist/app.js.map +1 -0
  9. package/dist/auth.d.ts +16 -0
  10. package/dist/auth.js +506 -0
  11. package/dist/auth.js.map +1 -0
  12. package/dist/catalog.d.ts +6 -0
  13. package/dist/catalog.js +15 -0
  14. package/dist/catalog.js.map +1 -0
  15. package/dist/command-grammar.d.ts +3 -0
  16. package/dist/command-grammar.js +274 -0
  17. package/dist/command-grammar.js.map +1 -0
  18. package/dist/completion.d.ts +1 -0
  19. package/dist/completion.js +18 -0
  20. package/dist/completion.js.map +1 -0
  21. package/dist/config.d.ts +11 -0
  22. package/dist/config.js +55 -0
  23. package/dist/config.js.map +1 -0
  24. package/dist/credential-file.d.ts +1 -0
  25. package/dist/credential-file.js +41 -0
  26. package/dist/credential-file.js.map +1 -0
  27. package/dist/http-timeout.d.ts +5 -0
  28. package/dist/http-timeout.js +10 -0
  29. package/dist/http-timeout.js.map +1 -0
  30. package/dist/interactive.d.ts +4 -0
  31. package/dist/interactive.js +158 -0
  32. package/dist/interactive.js.map +1 -0
  33. package/dist/invocation.d.ts +13 -0
  34. package/dist/invocation.js +526 -0
  35. package/dist/invocation.js.map +1 -0
  36. package/dist/main.d.ts +2 -0
  37. package/dist/main.js +14 -0
  38. package/dist/main.js.map +1 -0
  39. package/dist/operations.json +1127 -0
  40. package/dist/output.d.ts +1 -0
  41. package/dist/output.js +32 -0
  42. package/dist/output.js.map +1 -0
  43. package/dist/secret-file.d.ts +1 -0
  44. package/dist/secret-file.js +19 -0
  45. package/dist/secret-file.js.map +1 -0
  46. package/dist/session-store.d.ts +54 -0
  47. package/dist/session-store.js +470 -0
  48. package/dist/session-store.js.map +1 -0
  49. package/dist/types.d.ts +67 -0
  50. package/dist/types.js +28 -0
  51. package/dist/types.js.map +1 -0
  52. package/package.json +54 -0
@@ -0,0 +1,67 @@
1
+ import { z } from "zod";
2
+ export declare const operationSchema: z.ZodObject<{
3
+ operationId: z.ZodString;
4
+ method: z.ZodEnum<{
5
+ GET: "GET";
6
+ POST: "POST";
7
+ PUT: "PUT";
8
+ PATCH: "PATCH";
9
+ DELETE: "DELETE";
10
+ }>;
11
+ path: z.ZodString;
12
+ scope: z.ZodString;
13
+ risk: z.ZodEnum<{
14
+ read: "read";
15
+ write: "write";
16
+ destructive: "destructive";
17
+ credential: "credential";
18
+ stream: "stream";
19
+ }>;
20
+ clientMethod: z.ZodString;
21
+ command: z.ZodString;
22
+ mcpName: z.ZodString;
23
+ ownership: z.ZodEnum<{
24
+ subject: "subject";
25
+ "subject-and-organization": "subject-and-organization";
26
+ organization: "organization";
27
+ }>;
28
+ idempotency: z.ZodEnum<{
29
+ safe: "safe";
30
+ "idempotency-key": "idempotency-key";
31
+ "target-state": "target-state";
32
+ none: "none";
33
+ }>;
34
+ retry: z.ZodEnum<{
35
+ safe: "safe";
36
+ "never-after-dispatch": "never-after-dispatch";
37
+ }>;
38
+ paging: z.ZodEnum<{
39
+ none: "none";
40
+ page: "page";
41
+ }>;
42
+ requiresPreflight: z.ZodBoolean;
43
+ }, z.core.$strip>;
44
+ export type Operation = z.infer<typeof operationSchema>;
45
+ export interface GlobalOptions {
46
+ api: string;
47
+ identity: string;
48
+ app: string;
49
+ profile: string;
50
+ organization?: string;
51
+ tokenFile?: string;
52
+ token?: string;
53
+ json: boolean;
54
+ yes: boolean;
55
+ }
56
+ export declare const sessionSchema: z.ZodObject<{
57
+ accessToken: z.ZodString;
58
+ refreshToken: z.ZodOptional<z.ZodString>;
59
+ expiresAt: z.ZodISODateTime;
60
+ scope: z.ZodString;
61
+ clientId: z.ZodString;
62
+ api: z.ZodURL;
63
+ identity: z.ZodURL;
64
+ app: z.ZodURL;
65
+ organization: z.ZodOptional<z.ZodString>;
66
+ }, z.core.$strip>;
67
+ export type Session = z.infer<typeof sessionSchema>;
package/dist/types.js ADDED
@@ -0,0 +1,28 @@
1
+ import { z } from "zod";
2
+ export const operationSchema = z.object({
3
+ operationId: z.string().min(1),
4
+ method: z.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]),
5
+ path: z.string().startsWith("/api/v1/"),
6
+ scope: z.string().min(1),
7
+ risk: z.enum(["read", "write", "destructive", "credential", "stream"]),
8
+ clientMethod: z.string().min(1),
9
+ command: z.string().min(1),
10
+ mcpName: z.string().min(1),
11
+ ownership: z.enum(["subject", "subject-and-organization", "organization"]),
12
+ idempotency: z.enum(["safe", "idempotency-key", "target-state", "none"]),
13
+ retry: z.enum(["safe", "never-after-dispatch"]),
14
+ paging: z.enum(["none", "page"]),
15
+ requiresPreflight: z.boolean(),
16
+ });
17
+ export const sessionSchema = z.object({
18
+ accessToken: z.string().min(1),
19
+ refreshToken: z.string().min(1).optional(),
20
+ expiresAt: z.iso.datetime(),
21
+ scope: z.string(),
22
+ clientId: z.string().min(1),
23
+ api: z.url(),
24
+ identity: z.url(),
25
+ app: z.url(),
26
+ organization: z.string().min(1).optional(),
27
+ });
28
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IACzD,IAAI,EAAE,CAAC,CA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,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE;IACZ,QAAQ,EAAE,CAAC,CAAC,GAAG,EAAE;IACjB,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE;IACZ,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@amaretto-software-labs/borealis-cli",
3
+ "version": "0.1.0",
4
+ "description": "Official command-line interface for the Borealis public API",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Amaretto-Software-Labs/borealis-cli.git"
10
+ },
11
+ "homepage": "https://github.com/Amaretto-Software-Labs/borealis-cli#readme",
12
+ "bugs": "https://github.com/Amaretto-Software-Labs/borealis-cli/issues",
13
+ "engines": {
14
+ "node": ">=22"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "LICENSE",
19
+ "README.md"
20
+ ],
21
+ "bin": {
22
+ "borealis": "./dist/main.js"
23
+ },
24
+ "dependencies": {
25
+ "commander": "^14.0.3",
26
+ "undici": "^7.24.8",
27
+ "ws": "^8.18.3",
28
+ "zod": "^4.3.6"
29
+ },
30
+ "devDependencies": {
31
+ "@eslint/js": "^9.39.1",
32
+ "@types/node": "^24.10.1",
33
+ "@types/ws": "^8.18.1",
34
+ "eslint": "^9.39.1",
35
+ "prettier": "^3.7.4",
36
+ "tsx": "^4.21.0",
37
+ "typescript": "^5.9.2",
38
+ "typescript-eslint": "^8.48.1",
39
+ "vitest": "^3.2.4"
40
+ },
41
+ "scripts": {
42
+ "build": "tsc -p .",
43
+ "catalog:check": "node scripts/validate-public-catalog.mjs",
44
+ "clean": "rm -rf dist",
45
+ "dev": "tsx src/main.ts",
46
+ "format:check": "prettier --check .",
47
+ "format": "prettier --write .",
48
+ "lint": "eslint .",
49
+ "parity": "node scripts/import-dotnet-catalog.mjs --check",
50
+ "parity:update": "node scripts/import-dotnet-catalog.mjs",
51
+ "test": "vitest run",
52
+ "typecheck": "tsc -p . --noEmit"
53
+ }
54
+ }