@aui.io/apollo 0.1.4

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 (194) hide show
  1. package/bin/apollo.js +13 -0
  2. package/node_modules/@aui.io/apollo-cli/bin/apollo.js +79 -0
  3. package/node_modules/@aui.io/apollo-cli/dist/src/commands/auth.d.ts +4 -0
  4. package/node_modules/@aui.io/apollo-cli/dist/src/commands/auth.js +99 -0
  5. package/node_modules/@aui.io/apollo-cli/dist/src/commands/auth.js.map +1 -0
  6. package/node_modules/@aui.io/apollo-cli/dist/src/commands/bundles.d.ts +3 -0
  7. package/node_modules/@aui.io/apollo-cli/dist/src/commands/bundles.js +234 -0
  8. package/node_modules/@aui.io/apollo-cli/dist/src/commands/bundles.js.map +1 -0
  9. package/node_modules/@aui.io/apollo-cli/dist/src/commands/env.d.ts +3 -0
  10. package/node_modules/@aui.io/apollo-cli/dist/src/commands/env.js +34 -0
  11. package/node_modules/@aui.io/apollo-cli/dist/src/commands/env.js.map +1 -0
  12. package/node_modules/@aui.io/apollo-cli/dist/src/commands/hierarchy.d.ts +3 -0
  13. package/node_modules/@aui.io/apollo-cli/dist/src/commands/hierarchy.js +175 -0
  14. package/node_modules/@aui.io/apollo-cli/dist/src/commands/hierarchy.js.map +1 -0
  15. package/node_modules/@aui.io/apollo-cli/dist/src/commands/mockdb.d.ts +3 -0
  16. package/node_modules/@aui.io/apollo-cli/dist/src/commands/mockdb.js +251 -0
  17. package/node_modules/@aui.io/apollo-cli/dist/src/commands/mockdb.js.map +1 -0
  18. package/node_modules/@aui.io/apollo-cli/dist/src/commands/operate.d.ts +3 -0
  19. package/node_modules/@aui.io/apollo-cli/dist/src/commands/operate.js +138 -0
  20. package/node_modules/@aui.io/apollo-cli/dist/src/commands/operate.js.map +1 -0
  21. package/node_modules/@aui.io/apollo-cli/dist/src/commands/profile.d.ts +3 -0
  22. package/node_modules/@aui.io/apollo-cli/dist/src/commands/profile.js +51 -0
  23. package/node_modules/@aui.io/apollo-cli/dist/src/commands/profile.js.map +1 -0
  24. package/node_modules/@aui.io/apollo-cli/dist/src/commands/prompts.d.ts +6 -0
  25. package/node_modules/@aui.io/apollo-cli/dist/src/commands/prompts.js +20 -0
  26. package/node_modules/@aui.io/apollo-cli/dist/src/commands/prompts.js.map +1 -0
  27. package/node_modules/@aui.io/apollo-cli/dist/src/commands/runtime.d.ts +6 -0
  28. package/node_modules/@aui.io/apollo-cli/dist/src/commands/runtime.js +2 -0
  29. package/node_modules/@aui.io/apollo-cli/dist/src/commands/runtime.js.map +1 -0
  30. package/node_modules/@aui.io/apollo-cli/dist/src/commands/shell.d.ts +10 -0
  31. package/node_modules/@aui.io/apollo-cli/dist/src/commands/shell.js +36 -0
  32. package/node_modules/@aui.io/apollo-cli/dist/src/commands/shell.js.map +1 -0
  33. package/node_modules/@aui.io/apollo-cli/dist/src/commands/status.d.ts +3 -0
  34. package/node_modules/@aui.io/apollo-cli/dist/src/commands/status.js +57 -0
  35. package/node_modules/@aui.io/apollo-cli/dist/src/commands/status.js.map +1 -0
  36. package/node_modules/@aui.io/apollo-cli/dist/src/commands/upgrade.d.ts +3 -0
  37. package/node_modules/@aui.io/apollo-cli/dist/src/commands/upgrade.js +35 -0
  38. package/node_modules/@aui.io/apollo-cli/dist/src/commands/upgrade.js.map +1 -0
  39. package/node_modules/@aui.io/apollo-cli/dist/src/commands/workspace.d.ts +3 -0
  40. package/node_modules/@aui.io/apollo-cli/dist/src/commands/workspace.js +170 -0
  41. package/node_modules/@aui.io/apollo-cli/dist/src/commands/workspace.js.map +1 -0
  42. package/node_modules/@aui.io/apollo-cli/dist/src/index.d.ts +10 -0
  43. package/node_modules/@aui.io/apollo-cli/dist/src/index.js +107 -0
  44. package/node_modules/@aui.io/apollo-cli/dist/src/index.js.map +1 -0
  45. package/node_modules/@aui.io/apollo-cli/dist/src/meta.d.ts +4 -0
  46. package/node_modules/@aui.io/apollo-cli/dist/src/meta.js +65 -0
  47. package/node_modules/@aui.io/apollo-cli/dist/src/meta.js.map +1 -0
  48. package/node_modules/@aui.io/apollo-cli/dist/src/output/welcome.d.ts +13 -0
  49. package/node_modules/@aui.io/apollo-cli/dist/src/output/welcome.js +53 -0
  50. package/node_modules/@aui.io/apollo-cli/dist/src/output/welcome.js.map +1 -0
  51. package/node_modules/@aui.io/apollo-cli/package.json +47 -0
  52. package/node_modules/@aui.io/apollo-core/dist/src/api/agent-settings.d.ts +6 -0
  53. package/node_modules/@aui.io/apollo-core/dist/src/api/agent-settings.js +23 -0
  54. package/node_modules/@aui.io/apollo-core/dist/src/api/agent-settings.js.map +1 -0
  55. package/node_modules/@aui.io/apollo-core/dist/src/api/client-types.d.ts +23 -0
  56. package/node_modules/@aui.io/apollo-core/dist/src/api/client-types.js +2 -0
  57. package/node_modules/@aui.io/apollo-core/dist/src/api/client-types.js.map +1 -0
  58. package/node_modules/@aui.io/apollo-core/dist/src/api/identity.d.ts +48 -0
  59. package/node_modules/@aui.io/apollo-core/dist/src/api/identity.js +131 -0
  60. package/node_modules/@aui.io/apollo-core/dist/src/api/identity.js.map +1 -0
  61. package/node_modules/@aui.io/apollo-core/dist/src/api/management.d.ts +92 -0
  62. package/node_modules/@aui.io/apollo-core/dist/src/api/management.js +126 -0
  63. package/node_modules/@aui.io/apollo-core/dist/src/api/management.js.map +1 -0
  64. package/node_modules/@aui.io/apollo-core/dist/src/api/mock-db.d.ts +65 -0
  65. package/node_modules/@aui.io/apollo-core/dist/src/api/mock-db.js +183 -0
  66. package/node_modules/@aui.io/apollo-core/dist/src/api/mock-db.js.map +1 -0
  67. package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.d.ts +98 -0
  68. package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.js +70 -0
  69. package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.js.map +1 -0
  70. package/node_modules/@aui.io/apollo-core/dist/src/api/transport.d.ts +40 -0
  71. package/node_modules/@aui.io/apollo-core/dist/src/api/transport.js +205 -0
  72. package/node_modules/@aui.io/apollo-core/dist/src/api/transport.js.map +1 -0
  73. package/node_modules/@aui.io/apollo-core/dist/src/argv.d.ts +5 -0
  74. package/node_modules/@aui.io/apollo-core/dist/src/argv.js +43 -0
  75. package/node_modules/@aui.io/apollo-core/dist/src/argv.js.map +1 -0
  76. package/node_modules/@aui.io/apollo-core/dist/src/bundle/baseline.d.ts +17 -0
  77. package/node_modules/@aui.io/apollo-core/dist/src/bundle/baseline.js +48 -0
  78. package/node_modules/@aui.io/apollo-core/dist/src/bundle/baseline.js.map +1 -0
  79. package/node_modules/@aui.io/apollo-core/dist/src/bundle/files.d.ts +7 -0
  80. package/node_modules/@aui.io/apollo-core/dist/src/bundle/files.js +69 -0
  81. package/node_modules/@aui.io/apollo-core/dist/src/bundle/files.js.map +1 -0
  82. package/node_modules/@aui.io/apollo-core/dist/src/bundle/materialize.d.ts +14 -0
  83. package/node_modules/@aui.io/apollo-core/dist/src/bundle/materialize.js +196 -0
  84. package/node_modules/@aui.io/apollo-core/dist/src/bundle/materialize.js.map +1 -0
  85. package/node_modules/@aui.io/apollo-core/dist/src/bundle/validate.d.ts +30 -0
  86. package/node_modules/@aui.io/apollo-core/dist/src/bundle/validate.js +36 -0
  87. package/node_modules/@aui.io/apollo-core/dist/src/bundle/validate.js.map +1 -0
  88. package/node_modules/@aui.io/apollo-core/dist/src/config/index.d.ts +11 -0
  89. package/node_modules/@aui.io/apollo-core/dist/src/config/index.js +193 -0
  90. package/node_modules/@aui.io/apollo-core/dist/src/config/index.js.map +1 -0
  91. package/node_modules/@aui.io/apollo-core/dist/src/config/mockdb-keys.d.ts +14 -0
  92. package/node_modules/@aui.io/apollo-core/dist/src/config/mockdb-keys.js +54 -0
  93. package/node_modules/@aui.io/apollo-core/dist/src/config/mockdb-keys.js.map +1 -0
  94. package/node_modules/@aui.io/apollo-core/dist/src/config/store.d.ts +18 -0
  95. package/node_modules/@aui.io/apollo-core/dist/src/config/store.js +99 -0
  96. package/node_modules/@aui.io/apollo-core/dist/src/config/store.js.map +1 -0
  97. package/node_modules/@aui.io/apollo-core/dist/src/config/types.d.ts +62 -0
  98. package/node_modules/@aui.io/apollo-core/dist/src/config/types.js +2 -0
  99. package/node_modules/@aui.io/apollo-core/dist/src/config/types.js.map +1 -0
  100. package/node_modules/@aui.io/apollo-core/dist/src/errors/index.d.ts +42 -0
  101. package/node_modules/@aui.io/apollo-core/dist/src/errors/index.js +74 -0
  102. package/node_modules/@aui.io/apollo-core/dist/src/errors/index.js.map +1 -0
  103. package/node_modules/@aui.io/apollo-core/dist/src/index.d.ts +32 -0
  104. package/node_modules/@aui.io/apollo-core/dist/src/index.js +32 -0
  105. package/node_modules/@aui.io/apollo-core/dist/src/index.js.map +1 -0
  106. package/node_modules/@aui.io/apollo-core/dist/src/output/index.d.ts +29 -0
  107. package/node_modules/@aui.io/apollo-core/dist/src/output/index.js +49 -0
  108. package/node_modules/@aui.io/apollo-core/dist/src/output/index.js.map +1 -0
  109. package/node_modules/@aui.io/apollo-core/dist/src/services/auth.d.ts +10 -0
  110. package/node_modules/@aui.io/apollo-core/dist/src/services/auth.js +83 -0
  111. package/node_modules/@aui.io/apollo-core/dist/src/services/auth.js.map +1 -0
  112. package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.d.ts +37 -0
  113. package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.js +161 -0
  114. package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.js.map +1 -0
  115. package/node_modules/@aui.io/apollo-core/dist/src/services/clients.d.ts +15 -0
  116. package/node_modules/@aui.io/apollo-core/dist/src/services/clients.js +95 -0
  117. package/node_modules/@aui.io/apollo-core/dist/src/services/clients.js.map +1 -0
  118. package/node_modules/@aui.io/apollo-core/dist/src/services/env.service.d.ts +11 -0
  119. package/node_modules/@aui.io/apollo-core/dist/src/services/env.service.js +19 -0
  120. package/node_modules/@aui.io/apollo-core/dist/src/services/env.service.js.map +1 -0
  121. package/node_modules/@aui.io/apollo-core/dist/src/services/hierarchy.d.ts +29 -0
  122. package/node_modules/@aui.io/apollo-core/dist/src/services/hierarchy.js +117 -0
  123. package/node_modules/@aui.io/apollo-core/dist/src/services/hierarchy.js.map +1 -0
  124. package/node_modules/@aui.io/apollo-core/dist/src/services/messaging.d.ts +17 -0
  125. package/node_modules/@aui.io/apollo-core/dist/src/services/messaging.js +99 -0
  126. package/node_modules/@aui.io/apollo-core/dist/src/services/messaging.js.map +1 -0
  127. package/node_modules/@aui.io/apollo-core/dist/src/services/mockdb.d.ts +71 -0
  128. package/node_modules/@aui.io/apollo-core/dist/src/services/mockdb.js +274 -0
  129. package/node_modules/@aui.io/apollo-core/dist/src/services/mockdb.js.map +1 -0
  130. package/node_modules/@aui.io/apollo-core/dist/src/services/profile.service.d.ts +16 -0
  131. package/node_modules/@aui.io/apollo-core/dist/src/services/profile.service.js +29 -0
  132. package/node_modules/@aui.io/apollo-core/dist/src/services/profile.service.js.map +1 -0
  133. package/node_modules/@aui.io/apollo-core/dist/src/services/status.service.d.ts +26 -0
  134. package/node_modules/@aui.io/apollo-core/dist/src/services/status.service.js +109 -0
  135. package/node_modules/@aui.io/apollo-core/dist/src/services/status.service.js.map +1 -0
  136. package/node_modules/@aui.io/apollo-core/dist/src/services/upgrade.d.ts +23 -0
  137. package/node_modules/@aui.io/apollo-core/dist/src/services/upgrade.js +74 -0
  138. package/node_modules/@aui.io/apollo-core/dist/src/services/upgrade.js.map +1 -0
  139. package/node_modules/@aui.io/apollo-core/dist/src/services/workspace.service.d.ts +44 -0
  140. package/node_modules/@aui.io/apollo-core/dist/src/services/workspace.service.js +148 -0
  141. package/node_modules/@aui.io/apollo-core/dist/src/services/workspace.service.js.map +1 -0
  142. package/node_modules/@aui.io/apollo-core/dist/src/skills/install.d.ts +6 -0
  143. package/node_modules/@aui.io/apollo-core/dist/src/skills/install.js +48 -0
  144. package/node_modules/@aui.io/apollo-core/dist/src/skills/install.js.map +1 -0
  145. package/node_modules/@aui.io/apollo-core/dist/src/workspace/store.d.ts +33 -0
  146. package/node_modules/@aui.io/apollo-core/dist/src/workspace/store.js +246 -0
  147. package/node_modules/@aui.io/apollo-core/dist/src/workspace/store.js.map +1 -0
  148. package/node_modules/@aui.io/apollo-core/package.json +48 -0
  149. package/node_modules/@aui.io/apollo-tui/bin/apollo-tui.js +5 -0
  150. package/node_modules/@aui.io/apollo-tui/dist/src/components/glyph.d.ts +19 -0
  151. package/node_modules/@aui.io/apollo-tui/dist/src/components/glyph.js +41 -0
  152. package/node_modules/@aui.io/apollo-tui/dist/src/components/glyph.js.map +1 -0
  153. package/node_modules/@aui.io/apollo-tui/dist/src/index.d.ts +5 -0
  154. package/node_modules/@aui.io/apollo-tui/dist/src/index.js +46 -0
  155. package/node_modules/@aui.io/apollo-tui/dist/src/index.js.map +1 -0
  156. package/node_modules/@aui.io/apollo-tui/dist/src/lib/attractor.d.ts +82 -0
  157. package/node_modules/@aui.io/apollo-tui/dist/src/lib/attractor.js +231 -0
  158. package/node_modules/@aui.io/apollo-tui/dist/src/lib/attractor.js.map +1 -0
  159. package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.d.ts +34 -0
  160. package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.js +100 -0
  161. package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.js.map +1 -0
  162. package/node_modules/@aui.io/apollo-tui/dist/src/lib/scope.d.ts +14 -0
  163. package/node_modules/@aui.io/apollo-tui/dist/src/lib/scope.js +25 -0
  164. package/node_modules/@aui.io/apollo-tui/dist/src/lib/scope.js.map +1 -0
  165. package/node_modules/@aui.io/apollo-tui/dist/src/lib/sheet.d.ts +25 -0
  166. package/node_modules/@aui.io/apollo-tui/dist/src/lib/sheet.js +99 -0
  167. package/node_modules/@aui.io/apollo-tui/dist/src/lib/sheet.js.map +1 -0
  168. package/node_modules/@aui.io/apollo-tui/dist/src/lib/tabs.d.ts +10 -0
  169. package/node_modules/@aui.io/apollo-tui/dist/src/lib/tabs.js +19 -0
  170. package/node_modules/@aui.io/apollo-tui/dist/src/lib/tabs.js.map +1 -0
  171. package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.d.ts +1 -0
  172. package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js +449 -0
  173. package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js.map +1 -0
  174. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/bundle.d.ts +1 -0
  175. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/bundle.js +4 -0
  176. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/bundle.js.map +1 -0
  177. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/chat.d.ts +1 -0
  178. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/chat.js +4 -0
  179. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/chat.js.map +1 -0
  180. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/index.d.ts +5 -0
  181. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/index.js +6 -0
  182. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/index.js.map +1 -0
  183. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/mockdb.d.ts +1 -0
  184. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/mockdb.js +4 -0
  185. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/mockdb.js.map +1 -0
  186. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/overview.d.ts +1 -0
  187. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/overview.js +4 -0
  188. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/overview.js.map +1 -0
  189. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/scope.d.ts +1 -0
  190. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/scope.js +4 -0
  191. package/node_modules/@aui.io/apollo-tui/dist/src/tabs/scope.js.map +1 -0
  192. package/node_modules/@aui.io/apollo-tui/package.json +53 -0
  193. package/package.json +42 -0
  194. package/scripts/setup-shell.mjs +68 -0
@@ -0,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+ authToken: string;
4
+ accountId: string;
5
+ apiUrl: string;
6
+ organizationId?: string;
7
+ }
8
+ export interface MockDbMgmtAuth {
9
+ mode: "mgmt";
10
+ managementKey: string;
11
+ }
12
+ export interface MockDbRuntimeAuth {
13
+ mode: "runtime";
14
+ runtimeKey: string;
15
+ sessionKey?: string;
16
+ }
17
+ export type MockDbAuth = MockDbTokenAuth | MockDbMgmtAuth | MockDbRuntimeAuth;
18
+ export interface MockDbProvisionResponse {
19
+ agentId?: string;
20
+ created?: boolean;
21
+ managementKey?: string;
22
+ runtimeKey?: string;
23
+ keysAvailable?: boolean;
24
+ [key: string]: unknown;
25
+ }
26
+ export interface MockDbClientOptions {
27
+ baseUrl: string;
28
+ timeoutMs?: number;
29
+ fetch?: typeof globalThis.fetch;
30
+ }
31
+ /**
32
+ * HTTP client for the AUI-managed mock-db service (`/api/mock-db`).
33
+ * Management prefers Apollo login token auth; runtime calls use `mdb_run_…`.
34
+ */
35
+ export declare class MockDbClient {
36
+ private readonly base;
37
+ private readonly timeoutMs;
38
+ private readonly fetchImpl;
39
+ constructor(options: MockDbClientOptions);
40
+ provision(agentId: string, auth: MockDbAuth): Promise<MockDbProvisionResponse>;
41
+ status(agentId: string, auth: MockDbAuth): Promise<Record<string, unknown>>;
42
+ describe(agentId: string, auth: MockDbAuth): Promise<unknown>;
43
+ createCollection(agentId: string, auth: MockDbAuth, body: {
44
+ name: string;
45
+ schema: unknown;
46
+ }): Promise<unknown>;
47
+ listCollections(agentId: string, auth: MockDbAuth): Promise<unknown>;
48
+ updateCollection(agentId: string, auth: MockDbAuth, name: string, body: {
49
+ addColumns: unknown[];
50
+ }): Promise<unknown>;
51
+ seedRows(agentId: string, auth: MockDbAuth, collection: string, rows: unknown[]): Promise<unknown>;
52
+ createEndpoint(agentId: string, auth: MockDbAuth, body: Record<string, unknown>): Promise<unknown>;
53
+ listEndpoints(agentId: string, auth: MockDbAuth): Promise<unknown>;
54
+ getEndpoint(agentId: string, auth: MockDbAuth, slug: string): Promise<unknown>;
55
+ updateEndpoint(agentId: string, auth: MockDbAuth, slug: string, body: Record<string, unknown>): Promise<unknown>;
56
+ deleteEndpoint(agentId: string, auth: MockDbAuth, slug: string): Promise<unknown>;
57
+ execute(agentId: string, auth: MockDbRuntimeAuth, slug: string, body?: unknown): Promise<unknown>;
58
+ inspectSession(agentId: string, auth: MockDbAuth, sessionKey: string): Promise<unknown>;
59
+ resetSession(agentId: string, auth: MockDbAuth, sessionKey: string): Promise<unknown>;
60
+ rotateMgmtKey(agentId: string, auth: MockDbAuth): Promise<MockDbProvisionResponse>;
61
+ rotateRuntimeKey(agentId: string, auth: MockDbAuth): Promise<MockDbProvisionResponse>;
62
+ exportAgent(agentId: string, auth: MockDbAuth): Promise<unknown>;
63
+ deleteAgent(agentId: string, auth: MockDbAuth): Promise<unknown>;
64
+ private request;
65
+ }
@@ -0,0 +1,183 @@
1
+ import { randomUUID } from "node:crypto";
2
+ import { ApiError, CliError } from "../errors/index.js";
3
+ function authHeaders(auth) {
4
+ if (auth.mode === "token") {
5
+ const headers = {
6
+ Authorization: `Bearer ${auth.authToken}`,
7
+ "X-AUI-Api-Url": auth.apiUrl,
8
+ };
9
+ if (auth.accountId)
10
+ headers["X-AUI-Account-Id"] = auth.accountId;
11
+ if (auth.organizationId)
12
+ headers["organization-id"] = auth.organizationId;
13
+ return headers;
14
+ }
15
+ if (auth.mode === "mgmt") {
16
+ return { "X-Mgmt-Key": auth.managementKey };
17
+ }
18
+ const headers = {
19
+ Authorization: `Bearer ${auth.runtimeKey}`,
20
+ };
21
+ if (auth.sessionKey)
22
+ headers["X-Session-Key"] = auth.sessionKey;
23
+ return headers;
24
+ }
25
+ /**
26
+ * HTTP client for the AUI-managed mock-db service (`/api/mock-db`).
27
+ * Management prefers Apollo login token auth; runtime calls use `mdb_run_…`.
28
+ */
29
+ export class MockDbClient {
30
+ base;
31
+ timeoutMs;
32
+ fetchImpl;
33
+ constructor(options) {
34
+ this.base = options.baseUrl.replace(/\/+$/, "");
35
+ this.timeoutMs = options.timeoutMs ?? 60_000;
36
+ this.fetchImpl = options.fetch ?? globalThis.fetch;
37
+ }
38
+ provision(agentId, auth) {
39
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}`, {
40
+ method: "POST",
41
+ auth,
42
+ });
43
+ }
44
+ status(agentId, auth) {
45
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}/status`, {
46
+ method: "GET",
47
+ auth,
48
+ });
49
+ }
50
+ describe(agentId, auth) {
51
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}/describe`, {
52
+ method: "GET",
53
+ auth,
54
+ });
55
+ }
56
+ createCollection(agentId, auth, body) {
57
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}/collections`, {
58
+ method: "POST",
59
+ auth,
60
+ body,
61
+ });
62
+ }
63
+ listCollections(agentId, auth) {
64
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}/collections`, {
65
+ method: "GET",
66
+ auth,
67
+ });
68
+ }
69
+ updateCollection(agentId, auth, name, body) {
70
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}/collections/${encodeURIComponent(name)}`, { method: "PATCH", auth, body });
71
+ }
72
+ seedRows(agentId, auth, collection, rows) {
73
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}/collections/${encodeURIComponent(collection)}/rows`, { method: "POST", auth, body: { rows } });
74
+ }
75
+ createEndpoint(agentId, auth, body) {
76
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}/endpoints`, {
77
+ method: "POST",
78
+ auth,
79
+ body,
80
+ });
81
+ }
82
+ listEndpoints(agentId, auth) {
83
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}/endpoints`, {
84
+ method: "GET",
85
+ auth,
86
+ });
87
+ }
88
+ getEndpoint(agentId, auth, slug) {
89
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}/endpoints/${encodeURIComponent(slug)}`, { method: "GET", auth });
90
+ }
91
+ updateEndpoint(agentId, auth, slug, body) {
92
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}/endpoints/${encodeURIComponent(slug)}`, { method: "PATCH", auth, body });
93
+ }
94
+ deleteEndpoint(agentId, auth, slug) {
95
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}/endpoints/${encodeURIComponent(slug)}`, { method: "DELETE", auth });
96
+ }
97
+ execute(agentId, auth, slug, body) {
98
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}/apis/${encodeURIComponent(slug)}/execute`, { method: "POST", auth, body: body ?? {} });
99
+ }
100
+ inspectSession(agentId, auth, sessionKey) {
101
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}/sessions/${encodeURIComponent(sessionKey)}`, { method: "GET", auth });
102
+ }
103
+ resetSession(agentId, auth, sessionKey) {
104
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}/sessions/${encodeURIComponent(sessionKey)}`, { method: "DELETE", auth });
105
+ }
106
+ rotateMgmtKey(agentId, auth) {
107
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}/rotate-mgmt-key`, { method: "POST", auth });
108
+ }
109
+ rotateRuntimeKey(agentId, auth) {
110
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}/rotate-runtime-key`, { method: "POST", auth });
111
+ }
112
+ exportAgent(agentId, auth) {
113
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}/export`, {
114
+ method: "GET",
115
+ auth,
116
+ });
117
+ }
118
+ deleteAgent(agentId, auth) {
119
+ return this.request(`/api/agents/${encodeURIComponent(agentId)}`, {
120
+ method: "DELETE",
121
+ auth,
122
+ });
123
+ }
124
+ async request(path, input) {
125
+ const url = `${this.base}${path}`;
126
+ const headers = {
127
+ accept: "application/json",
128
+ "content-type": "application/json",
129
+ "x-aui-client": "apollo-cli",
130
+ "x-trace-id": randomUUID(),
131
+ ...authHeaders(input.auth),
132
+ };
133
+ const controller = new AbortController();
134
+ const timer = setTimeout(() => controller.abort(), this.timeoutMs);
135
+ try {
136
+ const response = await this.fetchImpl(url, {
137
+ method: input.method,
138
+ headers,
139
+ body: input.body === undefined ? undefined : JSON.stringify(input.body),
140
+ signal: controller.signal,
141
+ });
142
+ const text = await response.text().catch(() => "");
143
+ if (!response.ok) {
144
+ let detail = text;
145
+ try {
146
+ detail = text ? JSON.parse(text) : null;
147
+ }
148
+ catch {
149
+ // keep text
150
+ }
151
+ throw new ApiError({
152
+ service: "mock-db",
153
+ status: response.status,
154
+ path,
155
+ message: `mock-db ${input.method} ${path} failed (${response.status})`,
156
+ detail,
157
+ });
158
+ }
159
+ if (!text)
160
+ return {};
161
+ try {
162
+ return JSON.parse(text);
163
+ }
164
+ catch {
165
+ return text;
166
+ }
167
+ }
168
+ catch (error) {
169
+ if (error instanceof ApiError)
170
+ throw error;
171
+ if (error instanceof Error && error.name === "AbortError") {
172
+ throw new CliError(`mock-db request timed out after ${this.timeoutMs}ms`, {
173
+ code: "REQUEST_TIMEOUT",
174
+ });
175
+ }
176
+ throw new CliError(`mock-db network error: ${error instanceof Error ? error.message : String(error)}`, { code: "NETWORK_ERROR", cause: error });
177
+ }
178
+ finally {
179
+ clearTimeout(timer);
180
+ }
181
+ }
182
+ }
183
+ //# sourceMappingURL=mock-db.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mock-db.js","sourceRoot":"","sources":["../../../src/api/mock-db.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAsCxD,SAAS,WAAW,CAAC,IAAgB;IACnC,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC1B,MAAM,OAAO,GAA2B;YACtC,aAAa,EAAE,UAAU,IAAI,CAAC,SAAS,EAAE;YACzC,eAAe,EAAE,IAAI,CAAC,MAAM;SAC7B,CAAC;QACF,IAAI,IAAI,CAAC,SAAS;YAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;QACjE,I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,OAAO,EAAE,WAAW,KAAK,CAAC,MAAM,IAAI,IAAI,YAAY,QAAQ,CAAC,MAAM,GAAG;oBACtE,MAAM;iBACP,CAAC,CAAC;YACL,CAAC;YACD,IAAI,CAAC,IAAI;gBAAE,OAAO,EAAO,CAAC;YAC1B,IAAI,CAAC;gBACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAM,CAAC;YAC/B,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,IAAoB,CAAC;YAC9B,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,QAAQ;gBAAE,MAAM,KAAK,CAAC;YAC3C,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;gBAC1D,MAAM,IAAI,QAAQ,CAAC,mCAAmC,IAAI,CAAC,SAAS,IAAI,EAAE;oBACxE,IAAI,EAAE,iBAAiB;iBACxB,CAAC,CAAC;YACL,CAAC;YACD,MAAM,IAAI,QAAQ,CAChB,0BAA0B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAClF,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,EAAE,CACxC,CAAC;QACJ,CAAC;gBAAS,CAAC;YACT,YAAY,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,98 @@
1
+ import type { HttpClient } from "./client-types.js";
2
+ export interface AgentOverride {
3
+ agent_id?: string;
4
+ version_id?: string;
5
+ version_tag?: string;
6
+ }
7
+ export interface SendMessageRequest {
8
+ text: string;
9
+ user_id: string;
10
+ thread_id?: string;
11
+ image_url?: string;
12
+ agent_variables?: Record<string, unknown>;
13
+ agent?: AgentOverride;
14
+ agent_settings_bundle?: Record<string, unknown>;
15
+ include_trace?: boolean;
16
+ }
17
+ export type RuntimeTrace = Record<string, unknown>;
18
+ export interface Message {
19
+ id: string;
20
+ created_at?: string | null;
21
+ text?: string | null;
22
+ sender?: {
23
+ id?: string | null;
24
+ type?: string | null;
25
+ } | null;
26
+ receiver?: {
27
+ id?: string | null;
28
+ type?: string | null;
29
+ } | null;
30
+ cards?: unknown[];
31
+ followup_suggestions?: string[];
32
+ input_tokens?: number;
33
+ output_tokens?: number;
34
+ trace_info?: RuntimeTrace | null;
35
+ }
36
+ export interface SendMessageResponse {
37
+ thread_id: string;
38
+ message: Message;
39
+ }
40
+ export interface Thread {
41
+ id: string;
42
+ title?: string | null;
43
+ agent?: AgentOverride;
44
+ user_ref_id?: string | null;
45
+ turns?: number | null;
46
+ created_at: string;
47
+ updated_at: string;
48
+ [key: string]: unknown;
49
+ }
50
+ export interface SkillIndexItem {
51
+ id: string;
52
+ description: string;
53
+ extra_files: string[];
54
+ }
55
+ export interface SkillFile {
56
+ id: string;
57
+ file?: string | null;
58
+ content: string;
59
+ }
60
+ export declare class RuntimeApiClient {
61
+ private readonly http;
62
+ constructor(http: HttpClient);
63
+ health(): Promise<{
64
+ status: string;
65
+ }>;
66
+ sendMessage(agentId: string | undefined, input: SendMessageRequest): Promise<SendMessageResponse>;
67
+ createThread(input: {
68
+ agentId?: string;
69
+ versionId?: string;
70
+ versionTag?: string;
71
+ userId: string;
72
+ environment: string;
73
+ }): Promise<Thread>;
74
+ getThread(threadId: string): Promise<Thread>;
75
+ listThreads(userId: string, page?: number, size?: number): Promise<Thread[]>;
76
+ listMessages(threadId: string): Promise<Message[]>;
77
+ threadTrace(threadId: string): Promise<RuntimeTrace[]>;
78
+ interactionTrace(interactionId: string): Promise<RuntimeTrace>;
79
+ interactionDebug(interactionId: string): Promise<Record<string, unknown>>;
80
+ listSkills(): Promise<SkillIndexItem[]>;
81
+ getSkill(skillId: string, file?: string): Promise<SkillFile>;
82
+ getProgramSchemas(file?: string): Promise<Record<string, unknown>>;
83
+ validateProgram(bundle: Record<string, unknown>): Promise<{
84
+ valid: boolean;
85
+ errors: {
86
+ code: string;
87
+ message: string;
88
+ }[];
89
+ warnings: {
90
+ code: string;
91
+ message: string;
92
+ }[];
93
+ program?: {
94
+ id?: string;
95
+ version?: string;
96
+ };
97
+ }>;
98
+ }
@@ -0,0 +1,70 @@
1
+ export class RuntimeApiClient {
2
+ http;
3
+ constructor(http) {
4
+ this.http = http;
5
+ }
6
+ health() {
7
+ return this.http.request("/health");
8
+ }
9
+ sendMessage(agentId, input) {
10
+ return this.http.request("/messaging/v1/messages", {
11
+ method: "POST",
12
+ ...(agentId ? { headers: { "x-aui-agent-id": agentId } } : {}),
13
+ body: input,
14
+ });
15
+ }
16
+ createThread(input) {
17
+ return this.http.request("/api/v1/tasks", {
18
+ method: "POST",
19
+ body: {
20
+ task_origin: { type: "third-party", environment: input.environment },
21
+ agent: {
22
+ agent_id: input.agentId,
23
+ version_id: input.versionId,
24
+ version_tag: input.versionTag,
25
+ },
26
+ user_ref_id: input.userId,
27
+ },
28
+ });
29
+ }
30
+ getThread(threadId) {
31
+ return this.http.request(`/api/v1/tasks/${threadId}`);
32
+ }
33
+ listThreads(userId, page = 1, size = 25) {
34
+ return this.http.request(`/api/v1/users/${encodeURIComponent(userId)}/tasks`, {
35
+ query: { page, size },
36
+ });
37
+ }
38
+ listMessages(threadId) {
39
+ return this.http.request(`/messaging/v1/threads/${threadId}/messages`);
40
+ }
41
+ threadTrace(threadId) {
42
+ return this.http.request(`/messaging/v1/threads/${threadId}/trace`);
43
+ }
44
+ interactionTrace(interactionId) {
45
+ return this.http.request(`/messaging/v1/interactions/${interactionId}/trace`);
46
+ }
47
+ interactionDebug(interactionId) {
48
+ return this.http.request(`/api/v1/interactions/${interactionId}/debug`);
49
+ }
50
+ listSkills() {
51
+ return this.http.request("/api/v1/skills");
52
+ }
53
+ getSkill(skillId, file) {
54
+ return this.http.request(`/api/v1/skills/${encodeURIComponent(skillId)}`, {
55
+ query: { file },
56
+ });
57
+ }
58
+ getProgramSchemas(file) {
59
+ return this.http.request("/api/v1/programs/schema", {
60
+ query: { file },
61
+ });
62
+ }
63
+ validateProgram(bundle) {
64
+ return this.http.request("/api/v1/programs/validate", {
65
+ method: "POST",
66
+ body: { bundle },
67
+ });
68
+ }
69
+ }
70
+ //# sourceMappingURL=runtime-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-api.js","sourceRoot":"","sources":["../../../src/api/runtime-api.ts"],"names":[],"mappings":"AA8DA,MAAM,OAAO,gBAAgB;IACS;IAApC,YAAoC,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,MAAM;QACX,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACtC,CAAC;IAEM,WAAW,CAChB,OAA2B,EAC3B,KAAyB;QAEzB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE;YACjD,MAAM,EAAE,MAAM;YACd,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,gBAAgB,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC9D,IAAI,EAAE,KAAK;SACZ,CAAC,CAAC;IACL,CAAC;IAEM,YAAY,CAAC,KAMnB;QACC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE;YACxC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,WAAW,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE;gBACpE,KAAK,EAAE;oBACL,QAAQ,EAAE,KAAK,CAAC,OAAO;oBACvB,UAAU,EAAE,KAAK,CAAC,SAAS;oBAC3B,WAAW,EAAE,KAAK,CAAC,UAAU;iBAC9B;gBACD,WAAW,EAAE,KAAK,CAAC,MAAM;aAC1B;SACF,CAAC,CAAC;IACL,CAAC;IAEM,SAAS,CAAC,QAAgB;QAC/B,OAA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;SAChB,CAAC,CAAC;IACL,CAAC;IAEM,eAAe,CAAC,MAA+B;QAMpD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,2BAA2B,EAAE;YACpD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,MAAM,EAAE;SACjB,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,40 @@
1
+ export interface RequestCapture {
2
+ method: string;
3
+ url: string;
4
+ headers: Record<string, string>;
5
+ body?: unknown;
6
+ status?: number;
7
+ durationMs: number;
8
+ }
9
+ export interface TransportOptions {
10
+ service: string;
11
+ baseUrl: string;
12
+ timeoutMs: number;
13
+ token?: string;
14
+ orgId?: string;
15
+ userId?: string;
16
+ orgHeader?: string;
17
+ fetch?: typeof globalThis.fetch;
18
+ refresh?: () => Promise<string>;
19
+ capturePath?: string | false;
20
+ authHeader?: string;
21
+ }
22
+ export interface RequestOptions {
23
+ method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
24
+ query?: Record<string, string | number | boolean | undefined>;
25
+ body?: unknown;
26
+ headers?: Record<string, string>;
27
+ authenticated?: boolean;
28
+ attribution?: boolean;
29
+ }
30
+ export declare class Transport {
31
+ private readonly options;
32
+ readonly captures: RequestCapture[];
33
+ private token?;
34
+ private readonly fetchImpl;
35
+ constructor(options: TransportOptions);
36
+ request<T>(path: string, requestOptions?: RequestOptions): Promise<T>;
37
+ private perform;
38
+ private persistCaptures;
39
+ private apiError;
40
+ }