aui-agent-builder 0.4.31 → 0.4.33

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 (57) hide show
  1. package/dist/api-client/apollo-client.d.ts +55 -0
  2. package/dist/api-client/apollo-client.d.ts.map +1 -1
  3. package/dist/api-client/apollo-client.js +45 -2
  4. package/dist/api-client/apollo-client.js.map +1 -1
  5. package/dist/api-client/rag-client.d.ts.map +1 -1
  6. package/dist/api-client/rag-client.js +9 -4
  7. package/dist/api-client/rag-client.js.map +1 -1
  8. package/dist/commands/init.d.ts.map +1 -1
  9. package/dist/commands/init.js +46 -0
  10. package/dist/commands/init.js.map +1 -1
  11. package/dist/commands/mockdb.js +2 -2
  12. package/dist/commands/mockdb.js.map +1 -1
  13. package/dist/commands/vault.d.ts +25 -0
  14. package/dist/commands/vault.d.ts.map +1 -0
  15. package/dist/commands/vault.js +220 -0
  16. package/dist/commands/vault.js.map +1 -0
  17. package/dist/errors/index.d.ts.map +1 -1
  18. package/dist/errors/index.js +7 -6
  19. package/dist/errors/index.js.map +1 -1
  20. package/dist/index.js +104 -0
  21. package/dist/index.js.map +1 -1
  22. package/dist/services/integration.service.d.ts +1 -1
  23. package/dist/services/integration.service.d.ts.map +1 -1
  24. package/dist/services/integration.service.js +8 -2
  25. package/dist/services/integration.service.js.map +1 -1
  26. package/dist/services/mock-db.service.d.ts +4 -3
  27. package/dist/services/mock-db.service.d.ts.map +1 -1
  28. package/dist/services/mock-db.service.js +20 -19
  29. package/dist/services/mock-db.service.js.map +1 -1
  30. package/dist/services/pull-schema.service.d.ts +13 -0
  31. package/dist/services/pull-schema.service.d.ts.map +1 -1
  32. package/dist/services/pull-schema.service.js +9 -1
  33. package/dist/services/pull-schema.service.js.map +1 -1
  34. package/dist/services/vault.service.d.ts +58 -0
  35. package/dist/services/vault.service.d.ts.map +1 -0
  36. package/dist/services/vault.service.js +143 -0
  37. package/dist/services/vault.service.js.map +1 -0
  38. package/dist/types/index.d.ts +1 -0
  39. package/dist/types/index.d.ts.map +1 -1
  40. package/dist/types/index.js +1 -0
  41. package/dist/types/index.js.map +1 -1
  42. package/dist/types/vault.d.ts +31 -0
  43. package/dist/types/vault.d.ts.map +1 -0
  44. package/dist/types/vault.js +10 -0
  45. package/dist/types/vault.js.map +1 -0
  46. package/dist/ui/views/VaultView.d.ts +19 -0
  47. package/dist/ui/views/VaultView.d.ts.map +1 -0
  48. package/dist/ui/views/VaultView.js +35 -0
  49. package/dist/ui/views/VaultView.js.map +1 -0
  50. package/dist/utils/fetch-with-timeout.d.ts.map +1 -1
  51. package/dist/utils/fetch-with-timeout.js +24 -1
  52. package/dist/utils/fetch-with-timeout.js.map +1 -1
  53. package/dist/utils/json-output.d.ts +11 -0
  54. package/dist/utils/json-output.d.ts.map +1 -1
  55. package/dist/utils/json-output.js +19 -1
  56. package/dist/utils/json-output.js.map +1 -1
  57. package/package.json +1 -1
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Vault secrets service — manage user-owned secrets from the CLI.
3
+ *
4
+ * The CLI is name + scope based and friendly; the apollo-api proxy
5
+ * (`/v1/vault/secrets`) and agent-settings own storage + encryption.
6
+ * apollo's get/delete are by `secret_id`, so name-based `get`/`rm` resolve the
7
+ * id via the list endpoint first.
8
+ *
9
+ * Secret values only ever travel in the create body. Reads return a masked
10
+ * `preview` (never the value), so nothing here needs to mask output.
11
+ */
12
+ import type { UserSession } from "../config/index.js";
13
+ import type { ApolloClient, ApolloVaultSecretRead, VaultRecordScope } from "../api-client/apollo-client.js";
14
+ import { type ScopeIds } from "./integration.service.js";
15
+ import type { VaultScopeLevel } from "../types/vault.js";
16
+ export interface VaultContext {
17
+ session: UserSession;
18
+ scope: ScopeIds;
19
+ client: ApolloClient;
20
+ }
21
+ export interface VaultScopeOverrides {
22
+ organizationId?: string;
23
+ accountId?: string;
24
+ networkId?: string;
25
+ /** Agent project dir whose `.auirc` supplies scope (defaults to the cwd's). */
26
+ path?: string;
27
+ }
28
+ /** Resolve auth + scope (from flags / .auirc / session) and build the apollo client. */
29
+ export declare function resolveVaultContext(overrides?: VaultScopeOverrides): Promise<VaultContext>;
30
+ /** Validate a secret reference name (used as `{{vault.NAME}}`). */
31
+ export declare function validateSecretName(name: string): void;
32
+ /** Normalize a `--scope` value to a level, defaulting to `agent`. */
33
+ export declare function parseScopeLevel(value?: string): VaultScopeLevel;
34
+ /**
35
+ * Build the RecordScope to send to agent-settings. `agent` == NETWORK scope
36
+ * (the agent is a network). Extra ids are harmless — agent-settings keys the
37
+ * secret by the scope `type` + its matching id.
38
+ */
39
+ export declare function buildVaultScope(level: VaultScopeLevel, scope: ScopeIds): VaultRecordScope;
40
+ export interface SetSecretParams {
41
+ name: string;
42
+ value: string;
43
+ level: VaultScopeLevel;
44
+ description?: string;
45
+ }
46
+ /** Create or rotate a secret (server-side upsert by name + scope). */
47
+ export declare function setSecret(ctx: VaultContext, params: SetSecretParams): Promise<ApolloVaultSecretRead>;
48
+ /** List secrets visible in the current scope chain (metadata + masked preview). */
49
+ export declare function listSecrets(ctx: VaultContext): Promise<ApolloVaultSecretRead[]>;
50
+ /** Find a single secret by name within the current scope chain. */
51
+ export declare function getSecretByName(ctx: VaultContext, name: string): Promise<ApolloVaultSecretRead>;
52
+ /** Delete a secret by name (resolves the id via list, then DELETE). */
53
+ export declare function removeSecretByName(ctx: VaultContext, name: string): Promise<{
54
+ name: string;
55
+ id: string;
56
+ message: string;
57
+ }>;
58
+ //# sourceMappingURL=vault.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault.service.d.ts","sourceRoot":"","sources":["../../src/services/vault.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EACV,YAAY,EAEZ,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAIL,KAAK,QAAQ,EACd,MAAM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AAC,qBAAqB,CAAC,CAUhC;AAED,uEAAuE;AACvE,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAIxD"}
@@ -0,0 +1,143 @@
1
+ /**
2
+ * Vault secrets service — manage user-owned secrets from the CLI.
3
+ *
4
+ * The CLI is name + scope based and friendly; the apollo-api proxy
5
+ * (`/v1/vault/secrets`) and agent-settings own storage + encryption.
6
+ * apollo's get/delete are by `secret_id`, so name-based `get`/`rm` resolve the
7
+ * id via the list endpoint first.
8
+ *
9
+ * Secret values only ever travel in the create body. Reads return a masked
10
+ * `preview` (never the value), so nothing here needs to mask output.
11
+ */
12
+ import { buildApolloClient, getAuthenticatedSession, resolveScopeIds, } from "./integration.service.js";
13
+ import { getOrgScopedToken } from "./auth.service.js";
14
+ import { CLIError, ValidationError } from "../errors/index.js";
15
+ /** Reference names are UPPER_SNAKE_CASE — same constraint agent-settings enforces. */
16
+ const SECRET_NAME_PATTERN = /^[A-Z][A-Z0-9_]*$/;
17
+ /** Resolve auth + scope (from flags / .auirc / session) and build the apollo client. */
18
+ export async function resolveVaultContext(overrides = {}) {
19
+ const session = await getAuthenticatedSession();
20
+ const scope = resolveScopeIds(session, {
21
+ organizationId: overrides.organizationId,
22
+ accountId: overrides.accountId,
23
+ networkId: overrides.networkId,
24
+ }, overrides.path);
25
+ // Cross-org: the login token is scoped to the user's default org, but the
26
+ // project's `.auirc` (or --organization-id) can target an agent in a
27
+ // DIFFERENT org. apollo-api / the gateway trust the token's org claim, so
28
+ // mint a token scoped to the resolved org before hitting the vault endpoints
29
+ // (mirrors `apollo.tsx`). No-op — zero network calls — when they already
30
+ // match, and best-effort (falls back to the login token) on any failure.
31
+ const authToken = await getOrgScopedToken(session.auth_token, scope.organizationId, {
32
+ apiUrl: session.api_url,
33
+ environment: session.environment,
34
+ });
35
+ const client = buildApolloClient({ ...session, auth_token: authToken }, scope);
36
+ return { session, scope, client };
37
+ }
38
+ /** Validate a secret reference name (used as `{{vault.NAME}}`). */
39
+ export function validateSecretName(name) {
40
+ if (!SECRET_NAME_PATTERN.test(name)) {
41
+ throw new ValidationError(`Invalid secret name '${name}'. Use UPPER_SNAKE_CASE (e.g. STRIPE_KEY).`, { suggestion: "Names must match ^[A-Z][A-Z0-9_]*$ — letters, digits and underscores." });
42
+ }
43
+ }
44
+ /** Normalize a `--scope` value to a level, defaulting to `agent`. */
45
+ export function parseScopeLevel(value) {
46
+ const v = (value || "agent").toLowerCase();
47
+ if (v === "agent" || v === "account" || v === "organization")
48
+ return v;
49
+ throw new ValidationError(`Invalid --scope '${value}'. Use one of: agent, account, organization.`);
50
+ }
51
+ /**
52
+ * Build the RecordScope to send to agent-settings. `agent` == NETWORK scope
53
+ * (the agent is a network). Extra ids are harmless — agent-settings keys the
54
+ * secret by the scope `type` + its matching id.
55
+ */
56
+ export function buildVaultScope(level, scope) {
57
+ switch (level) {
58
+ case "agent":
59
+ if (!scope.networkId) {
60
+ throw new ValidationError("No agent (network) id found for agent-scoped secret.", { suggestion: "Run inside an agent project (with .auirc) or pass --network-id <id>." });
61
+ }
62
+ return {
63
+ type: "NETWORK",
64
+ network_id: scope.networkId,
65
+ account_id: scope.accountId || undefined,
66
+ organization_id: scope.organizationId || undefined,
67
+ network_category_id: scope.networkCategoryId || undefined,
68
+ };
69
+ case "account":
70
+ if (!scope.accountId) {
71
+ throw new ValidationError("No account id found for account-scoped secret.", {
72
+ suggestion: "Pass --account-id <id> or select an account first.",
73
+ });
74
+ }
75
+ return {
76
+ type: "ACCOUNT",
77
+ account_id: scope.accountId,
78
+ organization_id: scope.organizationId || undefined,
79
+ };
80
+ case "organization":
81
+ if (!scope.organizationId) {
82
+ throw new ValidationError("No organization id found for organization-scoped secret.", {
83
+ suggestion: "Pass --organization-id <id> or select an organization first.",
84
+ });
85
+ }
86
+ return { type: "ORGANIZATION", organization_id: scope.organizationId };
87
+ }
88
+ }
89
+ /** Scope-chain query params for list (most-specific-per-name reduction happens server-side). */
90
+ function listScopeParams(scope) {
91
+ return {
92
+ networkId: scope.networkId || undefined,
93
+ accountId: scope.accountId || undefined,
94
+ organizationId: scope.organizationId || undefined,
95
+ };
96
+ }
97
+ /** Create or rotate a secret (server-side upsert by name + scope). */
98
+ export async function setSecret(ctx, params) {
99
+ validateSecretName(params.name);
100
+ if (!params.value) {
101
+ throw new ValidationError("Secret value is empty.", {
102
+ suggestion: "Provide a non-empty value via stdin, the prompt, or --value.",
103
+ });
104
+ }
105
+ if (!ctx.scope.userId) {
106
+ throw new ValidationError("No user id in session; cannot attribute the secret.", {
107
+ suggestion: "Re-run `aui login` to refresh your session.",
108
+ });
109
+ }
110
+ const scope = buildVaultScope(params.level, ctx.scope);
111
+ const body = {
112
+ name: params.name,
113
+ value: params.value,
114
+ description: params.description,
115
+ scope,
116
+ created_by: ctx.scope.userId,
117
+ updated_by: ctx.scope.userId,
118
+ };
119
+ return ctx.client.createVaultSecret(body);
120
+ }
121
+ /** List secrets visible in the current scope chain (metadata + masked preview). */
122
+ export async function listSecrets(ctx) {
123
+ return ctx.client.listVaultSecrets(listScopeParams(ctx.scope));
124
+ }
125
+ /** Find a single secret by name within the current scope chain. */
126
+ export async function getSecretByName(ctx, name) {
127
+ const secrets = await listSecrets(ctx);
128
+ const match = secrets.find((s) => s.name === name);
129
+ if (!match) {
130
+ throw new CLIError(`Secret '${name}' not found in the current scope.`, {
131
+ code: "API_NOT_FOUND",
132
+ suggestion: "Check the name and scope (try `aui vault list`).",
133
+ });
134
+ }
135
+ return match;
136
+ }
137
+ /** Delete a secret by name (resolves the id via list, then DELETE). */
138
+ export async function removeSecretByName(ctx, name) {
139
+ const match = await getSecretByName(ctx, name);
140
+ const result = await ctx.client.deleteVaultSecret(match.id);
141
+ return { name, id: match.id, message: result?.message || "Secret deleted successfully" };
142
+ }
143
+ //# sourceMappingURL=vault.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault.service.js","sourceRoot":"","sources":["../../src/services/vault.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,GAEhB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG/D,sFAAsF;AACtF,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAgBhD,wFAAwF;AACxF,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,YAAiC,EAAE;IAEnC,MAAM,OAAO,GAAG,MAAM,uBAAuB,EAAE,CAAC;IAChD,MAAM,KAAK,GAAG,eAAe,CAC3B,OAAO,EACP;QACE,cAAc,EAAE,SAAS,CAAC,cAAc;QACxC,SAAS,EAAE,SAAS,CAAC,SAAS;QAC9B,SAAS,EAAE,SAAS,CAAC,SAAS;KAC/B,EACD,SAAS,CAAC,IAAI,CACf,CAAC;IACF,0EAA0E;IAC1E,qEAAqE;IACrE,0EAA0E;IAC1E,6EAA6E;IAC7E,yEAAyE;IACzE,yEAAyE;IACzE,MAAM,SAAS,GAAG,MAAM,iBAAiB,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,cAAc,EAAE;QAClF,MAAM,EAAE,OAAO,CAAC,OAAO;QACvB,WAAW,EAAE,OAAO,CAAC,WAAW;KACjC,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,iBAAiB,CAAC,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,CAAC;IAC/E,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AACpC,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C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"}
@@ -9,4 +9,5 @@ export * from './tool.js';
9
9
  export * from './agent.js';
10
10
  export * from './rule.js';
11
11
  export * from './widget.js';
12
+ export * from './vault.js';
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
@@ -9,4 +9,5 @@ export * from './tool.js';
9
9
  export * from './agent.js';
10
10
  export * from './rule.js';
11
11
  export * from './widget.js';
12
+ export * from './vault.js';
12
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Vault secret types for the `aui vault` command group.
3
+ *
4
+ * The CLI manages secrets by name + scope; the apollo-api proxy and
5
+ * agent-settings own the storage. The decrypted value is write-only — it is
6
+ * only ever sent on create and is never returned by reads (which expose a
7
+ * masked `preview`).
8
+ */
9
+ /** Scope a secret lives at. `agent` maps to the NETWORK scope (the agent == network). */
10
+ export type VaultScopeLevel = "agent" | "account" | "organization";
11
+ /** Shared options accepted by the `aui vault` subcommands. */
12
+ export interface VaultCommandOptions {
13
+ /** Scope level: agent (default) | account | organization. */
14
+ scope?: string;
15
+ /** Optional human description (set only). */
16
+ description?: string;
17
+ /** Raw secret value (set only). Discouraged — prefer stdin or the hidden prompt. */
18
+ value?: string;
19
+ /** Read the value from stdin (set only). */
20
+ stdin?: boolean;
21
+ /** Skip the confirmation prompt (rm only). */
22
+ yes?: boolean;
23
+ /** Agent project directory (defaults to the current project). */
24
+ path?: string;
25
+ /** Scope id overrides (default to .auirc / session). */
26
+ organizationId?: string;
27
+ accountId?: string;
28
+ networkId?: string;
29
+ }
30
+ export type { ApolloVaultSecretRead as VaultSecret } from "../api-client/apollo-client.js";
31
+ //# sourceMappingURL=vault.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../../src/types/vault.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,yFAAyF;AACzF,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,cAAc,CAAC;AAEnE,8DAA8D;AAC9D,MAAM,WAAW,mBAAmB;IAClC,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oFAAoF;IACpF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,8CAA8C;IAC9C,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,YAAY,EAAE,qBAAqB,IAAI,WAAW,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Vault secret types for the `aui vault` command group.
3
+ *
4
+ * The CLI manages secrets by name + scope; the apollo-api proxy and
5
+ * agent-settings own the storage. The decrypted value is write-only — it is
6
+ * only ever sent on create and is never returned by reads (which expose a
7
+ * masked `preview`).
8
+ */
9
+ export {};
10
+ //# sourceMappingURL=vault.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault.js","sourceRoot":"","sources":["../../src/types/vault.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
@@ -0,0 +1,19 @@
1
+ import type { VaultSecret } from "../../types/vault.js";
2
+ /** Human-readable scope label, e.g. "NETWORK:6a39...". Never shows a value. */
3
+ export declare function scopeLabel(secret: VaultSecret): string;
4
+ interface VaultListViewProps {
5
+ secrets: VaultSecret[];
6
+ }
7
+ export declare function VaultListView({ secrets }: VaultListViewProps): import("react/jsx-runtime").JSX.Element;
8
+ interface VaultSecretViewProps {
9
+ secret: VaultSecret;
10
+ }
11
+ export declare function VaultSecretView({ secret }: VaultSecretViewProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function VaultSecretSavedView({ secret }: VaultSecretViewProps): import("react/jsx-runtime").JSX.Element;
13
+ interface VaultSecretDeletedViewProps {
14
+ name: string;
15
+ message: string;
16
+ }
17
+ export declare function VaultSecretDeletedView({ name, message, }: VaultSecretDeletedViewProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
19
+ //# sourceMappingURL=VaultView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VaultView.d.ts","sourceRoot":"","sources":["../../../src/ui/views/VaultView.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,+EAA+E;AAC/E,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAKtD;AAoBD,UAAU,kBAAkB;IAC1B,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAED,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,2CAoD5D;AAID,UAAU,oBAAoB;IAC5B,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,EAAE,oBAAoB,2CAO/D;AAID,wBAAgB,oBAAoB,CAAC,EAAE,MAAM,EAAE,EAAE,oBAAoB,2CAcpE;AAID,UAAU,2BAA2B;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,OAAO,GACR,EAAE,2BAA2B,2CAM7B"}
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ import { Header, Section, StatusLine, KeyValueGroup, Divider, Hint, } from "../components/index.js";
4
+ import { colors } from "../theme.js";
5
+ /** Human-readable scope label, e.g. "NETWORK:6a39...". Never shows a value. */
6
+ export function scopeLabel(secret) {
7
+ const s = secret.scope || {};
8
+ const id = s?.network_id || s?.account_id || s?.organization_id || s?.network_category_id || "";
9
+ return id ? `${s?.type}:${id}` : String(s?.type ?? "");
10
+ }
11
+ /** Detail rows shared by `get` and `set` — metadata + masked preview only. */
12
+ function secretDetail(secret) {
13
+ return (_jsx(KeyValueGroup, { items: [
14
+ { label: "Name", value: secret.name },
15
+ { label: "Preview", value: secret.preview },
16
+ { label: "Scope", value: scopeLabel(secret) },
17
+ { label: "Version", value: String(secret.version) },
18
+ { label: "Description", value: secret.description ?? undefined },
19
+ { label: "Updated", value: secret.updated_at },
20
+ ] }));
21
+ }
22
+ export function VaultListView({ secrets }) {
23
+ return (_jsxs(Box, { flexDirection: "column", paddingX: 1, paddingY: 1, children: [_jsx(Header, { title: "Vault Secrets" }), secrets.length === 0 ? (_jsx(Section, { title: "Secrets", children: _jsx(Hint, { message: "No secrets in this scope. Create one with", command: "aui vault set <NAME>" }) })) : (_jsx(Section, { title: `Secrets (${secrets.length})`, children: _jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Box, { width: 28, children: _jsx(Text, { bold: true, children: "Name" }) }), _jsx(Box, { width: 16, children: _jsx(Text, { bold: true, children: "Preview" }) }), _jsx(Box, { width: 32, children: _jsx(Text, { bold: true, children: "Scope" }) }), _jsx(Box, { children: _jsx(Text, { bold: true, children: "Ver." }) })] }), _jsx(Divider, { width: 84 }), secrets.map((secret) => (_jsxs(Box, { children: [_jsx(Box, { width: 28, children: _jsx(Text, { color: colors.brand, children: secret.name }) }), _jsx(Box, { width: 16, children: _jsx(Text, { color: colors.muted, children: secret.preview }) }), _jsx(Box, { width: 32, children: _jsx(Text, { color: colors.muted, children: scopeLabel(secret) }) }), _jsx(Box, { children: _jsx(Text, { color: colors.muted, children: secret.version }) })] }, secret.id)))] }) }))] }));
24
+ }
25
+ export function VaultSecretView({ secret }) {
26
+ return (_jsxs(Box, { flexDirection: "column", paddingX: 1, paddingY: 1, children: [_jsx(Header, { title: "Vault Secret" }), _jsx(Section, { title: "Details", children: secretDetail(secret) })] }));
27
+ }
28
+ // ─── Saved (set) ───
29
+ export function VaultSecretSavedView({ secret }) {
30
+ return (_jsxs(Box, { flexDirection: "column", paddingX: 1, paddingY: 1, children: [_jsx(Header, { title: "Vault Secret" }), _jsx(StatusLine, { kind: "success", label: "Saved secret", value: secret.name }), _jsx(Box, { marginTop: 1, children: secretDetail(secret) }), _jsx(Box, { marginTop: 1, children: _jsx(Hint, { message: "Reference it in your integration config as", command: `{{vault.${secret.name}}}` }) })] }));
31
+ }
32
+ export function VaultSecretDeletedView({ name, message, }) {
33
+ return (_jsx(Box, { paddingX: 1, paddingY: 1, children: _jsx(StatusLine, { kind: "success", label: message, value: name }) }));
34
+ }
35
+ //# sourceMappingURL=VaultView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VaultView.js","sourceRoot":"","sources":["../../../src/ui/views/VaultView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EACL,MAAM,EACN,OAAO,EACP,UAAU,EACV,aAAa,EACb,OAAO,EACP,IAAI,GACL,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,+EAA+E;AAC/E,MAAM,UAAU,UAAU,CAAC,MAAmB;IAC5C,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,IAAK,EAA2B,CAAC;IACvD,MAAM,EAAE,GACN,CAAC,EAAE,UAAU,IAAI,CAAC,EAAE,UAAU,IAAI,CAAC,EAAE,eAAe,IAAI,CAAC,EAAE,mBAAmB,IAAI,EAAE,CAAC;IACvF,OAAO,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;AACzD,CAAC;AAED,8EAA8E;AAC9E,SAAS,YAAY,CAAC,MAAmB;IACvC,OAAO,CACL,KAAC,aAAa,IACZ,KAAK,EAAE;YACL,EAAE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AY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -73,12 +73,35 @@ function resolveTimeoutMs(callerTimeout) {
73
73
  }
74
74
  return DEFAULT_TIMEOUT_MS;
75
75
  }
76
+ /**
77
+ * Mirror `curl`'s default by reading response bodies UNCOMPRESSED.
78
+ *
79
+ * `node-fetch@2` defaults to `compress: true`, which negotiates
80
+ * `Accept-Encoding: gzip,deflate` and then pipes the response through a zlib
81
+ * gunzip stream. On a large body over a reused keep-alive socket that stream
82
+ * is the well-known source of `"Premature close"` / `ECONNRESET` errors thrown
83
+ * mid-`response.text()` — even though the server replied `200` and every byte
84
+ * arrived. A bare `curl` (which sends no `Accept-Encoding`) never hits this,
85
+ * which is exactly why a HEALTHY endpoint like `GET /network/v1/category`
86
+ * failed ONLY through the CLI while curl returned 200 instantly.
87
+ *
88
+ * Defaulting to `compress: false` makes node-fetch read the body plain, just
89
+ * like curl. Callers that knowingly hit an always-gzip endpoint can opt back
90
+ * in per-call with `compress: true`.
91
+ */
92
+ function withUncompressedDefault(init) {
93
+ if (init.compress === undefined) {
94
+ return { ...init, compress: false };
95
+ }
96
+ return init;
97
+ }
76
98
  /**
77
99
  * Like `node-fetch` but bounded by an `AbortController` timeout. Drop-in
78
100
  * replacement: `import fetch from "../utils/fetch-with-timeout.js"`.
79
101
  */
80
102
  async function fetchWithTimeout(url, init) {
81
- const { timeoutMs: callerTimeout, ...rest } = init ?? {};
103
+ const { timeoutMs: callerTimeout, ...rawRest } = init ?? {};
104
+ const rest = withUncompressedDefault(rawRest);
82
105
  const timeoutMs = resolveTimeoutMs(callerTimeout);
83
106
  const method = (rest.method ?? "GET").toUpperCase();
84
107
  // timeoutMs === 0 → unbounded (caller opted out explicitly)
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-with-timeout.js","sourceRoot":"","sources":["../../src/utils/fetch-with-timeout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AA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C;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;YAAS,CAAC;QACT,YAAY,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;AACH,CAAC;AAED,eAAe,gBAAgB,CAAC"}
@@ -49,6 +49,17 @@ export type JsonEnvelope<T = unknown> = JsonSuccessEnvelope<T> | JsonErrorEnvelo
49
49
  export declare function outputJson<T>(data: T): void;
50
50
  /**
51
51
  * Write an error JSON envelope to stdout and exit with the given code.
52
+ *
53
+ * Uses a synchronous fd-1 write (not `process.stdout.write`) on purpose:
54
+ * `process.stdout.write` to a pipe is async, and the immediately-following
55
+ * `process.exit` can terminate the process before the buffer flushes —
56
+ * silently dropping the error envelope for non-interactive callers (the BFF,
57
+ * Claude Code, the spawned-subprocess test harness). `fs.writeSync` blocks
58
+ * until the bytes are handed to the OS, so the payload always lands before we
59
+ * exit while keeping this function's synchronous `never` contract intact.
60
+ * Error envelopes are small (well under the pipe buffer) so this never blocks
61
+ * meaningfully or risks EAGAIN. Best-effort: if the fd write throws, fall back
62
+ * to the async write so we never crash on the error path itself.
52
63
  */
53
64
  export declare function outputJsonError(detail: JsonErrorDetail, exitCode?: number): never;
54
65
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"json-output.d.ts","sourceRoot":"","sources":["../../src/utils/json-output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAElD;AAED,wBAAgB,UAAU,IAAI,OAAO,CAEpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAG9C;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC,GAAG,OAAO;IAC9C,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,CAAC,CAAC;CACT;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;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M,YAAY,CAAC,CAAC,GAAG,OAAO,IAAI,mBAAmB,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC;AAEnF;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAG3C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,EAAE,QAAQ,SAAI,GAAG,KAAK,CAS5E;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE/C"}
@@ -10,6 +10,7 @@
10
10
  * - Progress messages (spinners, status) go to stderr
11
11
  * - Ink rendering is skipped entirely
12
12
  */
13
+ import { writeSync } from "node:fs";
13
14
  let _jsonMode = false;
14
15
  export function setJsonMode(enabled) {
15
16
  _jsonMode = enabled;
@@ -40,10 +41,27 @@ export function outputJson(data) {
40
41
  }
41
42
  /**
42
43
  * Write an error JSON envelope to stdout and exit with the given code.
44
+ *
45
+ * Uses a synchronous fd-1 write (not `process.stdout.write`) on purpose:
46
+ * `process.stdout.write` to a pipe is async, and the immediately-following
47
+ * `process.exit` can terminate the process before the buffer flushes —
48
+ * silently dropping the error envelope for non-interactive callers (the BFF,
49
+ * Claude Code, the spawned-subprocess test harness). `fs.writeSync` blocks
50
+ * until the bytes are handed to the OS, so the payload always lands before we
51
+ * exit while keeping this function's synchronous `never` contract intact.
52
+ * Error envelopes are small (well under the pipe buffer) so this never blocks
53
+ * meaningfully or risks EAGAIN. Best-effort: if the fd write throws, fall back
54
+ * to the async write so we never crash on the error path itself.
43
55
  */
44
56
  export function outputJsonError(detail, exitCode = 1) {
45
57
  const envelope = { success: false, error: detail };
46
- process.stdout.write(JSON.stringify(envelope, null, 2) + "\n");
58
+ const payload = JSON.stringify(envelope, null, 2) + "\n";
59
+ try {
60
+ writeSync(1, payload);
61
+ }
62
+ catch {
63
+ process.stdout.write(payload);
64
+ }
47
65
  process.exit(exitCode);
48
66
  }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CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,OAAe;IACvC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;AACvC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aui-agent-builder",
3
- "version": "0.4.31",
3
+ "version": "0.4.33",
4
4
  "description": "CLI for building, managing, and deploying AUI AI agent configurations",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",