@project-ajax/sdk 0.0.60 → 0.0.62

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 (150) hide show
  1. package/dist/index.d.ts +0 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +0 -2
  4. package/package.json +4 -16
  5. package/src/index.ts +0 -1
  6. package/dist/capabilities/slashCommand.d.ts +0 -56
  7. package/dist/capabilities/slashCommand.d.ts.map +0 -1
  8. package/dist/capabilities/slashCommand.js +0 -32
  9. package/dist/cli/api/client.d.ts +0 -212
  10. package/dist/cli/api/client.d.ts.map +0 -1
  11. package/dist/cli/api/client.js +0 -330
  12. package/dist/cli/api/result.d.ts +0 -43
  13. package/dist/cli/api/result.d.ts.map +0 -1
  14. package/dist/cli/api/result.js +0 -43
  15. package/dist/cli/bin/cli.d.ts +0 -3
  16. package/dist/cli/bin/cli.d.ts.map +0 -1
  17. package/dist/cli/bin/cli.js +0 -5
  18. package/dist/cli/commands/auth.d.ts +0 -2
  19. package/dist/cli/commands/auth.d.ts.map +0 -1
  20. package/dist/cli/commands/auth.impl.d.ts +0 -5
  21. package/dist/cli/commands/auth.impl.d.ts.map +0 -1
  22. package/dist/cli/commands/auth.impl.js +0 -45
  23. package/dist/cli/commands/auth.impl.test.d.ts +0 -2
  24. package/dist/cli/commands/auth.impl.test.d.ts.map +0 -1
  25. package/dist/cli/commands/auth.js +0 -56
  26. package/dist/cli/commands/bundle.d.ts +0 -2
  27. package/dist/cli/commands/bundle.d.ts.map +0 -1
  28. package/dist/cli/commands/bundle.impl.d.ts +0 -2
  29. package/dist/cli/commands/bundle.impl.d.ts.map +0 -1
  30. package/dist/cli/commands/bundle.impl.js +0 -21
  31. package/dist/cli/commands/bundle.impl.test.d.ts +0 -2
  32. package/dist/cli/commands/bundle.impl.test.d.ts.map +0 -1
  33. package/dist/cli/commands/bundle.js +0 -23
  34. package/dist/cli/commands/capabilities.d.ts +0 -2
  35. package/dist/cli/commands/capabilities.d.ts.map +0 -1
  36. package/dist/cli/commands/capabilities.impl.d.ts +0 -3
  37. package/dist/cli/commands/capabilities.impl.d.ts.map +0 -1
  38. package/dist/cli/commands/capabilities.impl.js +0 -40
  39. package/dist/cli/commands/capabilities.js +0 -24
  40. package/dist/cli/commands/connect.d.ts +0 -2
  41. package/dist/cli/commands/connect.d.ts.map +0 -1
  42. package/dist/cli/commands/connect.impl.d.ts +0 -6
  43. package/dist/cli/commands/connect.impl.d.ts.map +0 -1
  44. package/dist/cli/commands/connect.impl.js +0 -116
  45. package/dist/cli/commands/connect.js +0 -78
  46. package/dist/cli/commands/deploy.d.ts +0 -3
  47. package/dist/cli/commands/deploy.d.ts.map +0 -1
  48. package/dist/cli/commands/deploy.impl.d.ts +0 -6
  49. package/dist/cli/commands/deploy.impl.d.ts.map +0 -1
  50. package/dist/cli/commands/deploy.impl.js +0 -60
  51. package/dist/cli/commands/deploy.impl.test.d.ts +0 -2
  52. package/dist/cli/commands/deploy.impl.test.d.ts.map +0 -1
  53. package/dist/cli/commands/deploy.js +0 -22
  54. package/dist/cli/commands/env.d.ts +0 -2
  55. package/dist/cli/commands/env.d.ts.map +0 -1
  56. package/dist/cli/commands/env.impl.d.ts +0 -11
  57. package/dist/cli/commands/env.impl.d.ts.map +0 -1
  58. package/dist/cli/commands/env.impl.js +0 -62
  59. package/dist/cli/commands/env.js +0 -39
  60. package/dist/cli/commands/exec.d.ts +0 -3
  61. package/dist/cli/commands/exec.d.ts.map +0 -1
  62. package/dist/cli/commands/exec.impl.d.ts +0 -7
  63. package/dist/cli/commands/exec.impl.d.ts.map +0 -1
  64. package/dist/cli/commands/exec.impl.js +0 -123
  65. package/dist/cli/commands/exec.js +0 -30
  66. package/dist/cli/commands/runs.d.ts +0 -2
  67. package/dist/cli/commands/runs.d.ts.map +0 -1
  68. package/dist/cli/commands/runs.impl.d.ts +0 -4
  69. package/dist/cli/commands/runs.impl.d.ts.map +0 -1
  70. package/dist/cli/commands/runs.impl.js +0 -71
  71. package/dist/cli/commands/runs.js +0 -45
  72. package/dist/cli/commands/secrets.d.ts +0 -2
  73. package/dist/cli/commands/secrets.d.ts.map +0 -1
  74. package/dist/cli/commands/secrets.impl.d.ts +0 -5
  75. package/dist/cli/commands/secrets.impl.d.ts.map +0 -1
  76. package/dist/cli/commands/secrets.impl.js +0 -99
  77. package/dist/cli/commands/secrets.js +0 -64
  78. package/dist/cli/commands/utils/testing.d.ts +0 -13
  79. package/dist/cli/commands/utils/testing.d.ts.map +0 -1
  80. package/dist/cli/commands/utils/testing.js +0 -58
  81. package/dist/cli/config.d.ts +0 -63
  82. package/dist/cli/config.d.ts.map +0 -1
  83. package/dist/cli/config.js +0 -194
  84. package/dist/cli/config.test.d.ts +0 -2
  85. package/dist/cli/config.test.d.ts.map +0 -1
  86. package/dist/cli/context.d.ts +0 -15
  87. package/dist/cli/context.d.ts.map +0 -1
  88. package/dist/cli/context.js +0 -16
  89. package/dist/cli/deploy.d.ts +0 -37
  90. package/dist/cli/deploy.d.ts.map +0 -1
  91. package/dist/cli/deploy.js +0 -100
  92. package/dist/cli/flags.d.ts +0 -21
  93. package/dist/cli/flags.d.ts.map +0 -1
  94. package/dist/cli/flags.js +0 -49
  95. package/dist/cli/handler.d.ts +0 -14
  96. package/dist/cli/handler.d.ts.map +0 -1
  97. package/dist/cli/handler.js +0 -32
  98. package/dist/cli/io.d.ts +0 -55
  99. package/dist/cli/io.d.ts.map +0 -1
  100. package/dist/cli/io.js +0 -96
  101. package/dist/cli/routes.d.ts +0 -2
  102. package/dist/cli/routes.d.ts.map +0 -1
  103. package/dist/cli/routes.js +0 -62
  104. package/dist/cli/utils/array.d.ts +0 -2
  105. package/dist/cli/utils/array.d.ts.map +0 -1
  106. package/dist/cli/utils/array.js +0 -10
  107. package/dist/cli/utils/openUrl.d.ts +0 -4
  108. package/dist/cli/utils/openUrl.d.ts.map +0 -1
  109. package/dist/cli/utils/openUrl.js +0 -43
  110. package/dist/cli/utils/string.d.ts +0 -2
  111. package/dist/cli/utils/string.d.ts.map +0 -1
  112. package/dist/cli/utils/string.js +0 -12
  113. package/src/capabilities/slashCommand.ts +0 -71
  114. package/src/cli/api/client.ts +0 -628
  115. package/src/cli/api/result.ts +0 -71
  116. package/src/cli/bin/cli.ts +0 -7
  117. package/src/cli/commands/.cursor/rules/testing-commands.mdc +0 -212
  118. package/src/cli/commands/auth.impl.test.ts +0 -228
  119. package/src/cli/commands/auth.impl.ts +0 -56
  120. package/src/cli/commands/auth.ts +0 -63
  121. package/src/cli/commands/bundle.impl.test.ts +0 -143
  122. package/src/cli/commands/bundle.impl.ts +0 -21
  123. package/src/cli/commands/bundle.ts +0 -23
  124. package/src/cli/commands/capabilities.impl.ts +0 -47
  125. package/src/cli/commands/capabilities.ts +0 -25
  126. package/src/cli/commands/connect.impl.ts +0 -149
  127. package/src/cli/commands/connect.ts +0 -80
  128. package/src/cli/commands/deploy.impl.test.ts +0 -254
  129. package/src/cli/commands/deploy.impl.ts +0 -73
  130. package/src/cli/commands/deploy.ts +0 -22
  131. package/src/cli/commands/env.impl.ts +0 -88
  132. package/src/cli/commands/env.ts +0 -38
  133. package/src/cli/commands/exec.impl.ts +0 -171
  134. package/src/cli/commands/exec.ts +0 -32
  135. package/src/cli/commands/runs.impl.ts +0 -87
  136. package/src/cli/commands/runs.ts +0 -49
  137. package/src/cli/commands/secrets.impl.ts +0 -130
  138. package/src/cli/commands/secrets.ts +0 -73
  139. package/src/cli/commands/utils/testing.ts +0 -66
  140. package/src/cli/config.test.ts +0 -108
  141. package/src/cli/config.ts +0 -265
  142. package/src/cli/context.ts +0 -26
  143. package/src/cli/deploy.ts +0 -190
  144. package/src/cli/flags.ts +0 -72
  145. package/src/cli/handler.ts +0 -68
  146. package/src/cli/io.ts +0 -132
  147. package/src/cli/routes.ts +0 -61
  148. package/src/cli/utils/array.ts +0 -7
  149. package/src/cli/utils/openUrl.ts +0 -53
  150. package/src/cli/utils/string.ts +0 -9
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export { emojiIcon, notionIcon } from "./builder.js";
2
- export { slashCommand } from "./capabilities/slashCommand.js";
3
2
  export type { SyncConfiguration, SyncExecutionResult, SyncedObject, } from "./capabilities/sync.js";
4
3
  export { sync } from "./capabilities/sync.js";
5
4
  export { tool } from "./capabilities/tool.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,YAAY,EACX,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EACX,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -1,11 +1,9 @@
1
1
  import { emojiIcon, notionIcon } from "./builder.js";
2
- import { slashCommand } from "./capabilities/slashCommand.js";
3
2
  import { sync } from "./capabilities/sync.js";
4
3
  import { tool } from "./capabilities/tool.js";
5
4
  export {
6
5
  emojiIcon,
7
6
  notionIcon,
8
- slashCommand,
9
7
  sync,
10
8
  tool
11
9
  };
package/package.json CHANGED
@@ -1,12 +1,9 @@
1
1
  {
2
2
  "name": "@project-ajax/sdk",
3
- "version": "0.0.60",
3
+ "version": "0.0.62",
4
4
  "description": "An SDK for building workers for the Project Ajax platform",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
7
- "bin": {
8
- "workers": "dist/cli/bin/cli.js"
9
- },
10
7
  "exports": {
11
8
  ".": {
12
9
  "types": "./dist/index.d.ts",
@@ -35,15 +32,11 @@
35
32
  "./sync": {
36
33
  "types": "./dist/capabilities/sync.d.ts",
37
34
  "default": "./dist/capabilities/sync.js"
38
- },
39
- "./slashCommand": {
40
- "types": "./dist/capabilities/slashCommand.d.ts",
41
- "default": "./dist/capabilities/slashCommand.js"
42
35
  }
43
36
  },
44
37
  "engines": {
45
38
  "node": ">=22.0.0",
46
- "npm": ">=10.9.4"
39
+ "npm": ">=10.9.2"
47
40
  },
48
41
  "publishConfig": {
49
42
  "access": "public"
@@ -59,7 +52,7 @@
59
52
  "build:js": "tsx scripts/build.ts",
60
53
  "build:watch": "concurrently --group \"npm run build:watch:types\" \"npm run build:watch:js\"",
61
54
  "build:watch:types": "tsc --watch",
62
- "build:watch:js": "esbuild --watch --format=esm --outdir=dist --target=esnext --packages=external ./src/cli/bin/cli.ts ./src/**.ts ./src/**/*.ts ./src/cli/**/*.ts",
55
+ "build:watch:js": "esbuild --watch --format=esm --outdir=dist --target=esnext --packages=external ./src/**.ts ./src/**/*.ts",
63
56
  "test": "vitest run"
64
57
  },
65
58
  "devDependencies": {
@@ -70,11 +63,6 @@
70
63
  "vitest": "^4.0.8"
71
64
  },
72
65
  "dependencies": {
73
- "@inquirer/prompts": "^8.0.1",
74
- "@stricli/auto-complete": "^1.2.4",
75
- "@stricli/core": "^1.2.4",
76
- "@visulima/tabular": "^3.1.1",
77
- "ajv": "^8.17.1",
78
- "esbuild": "^0.25.12"
66
+ "ajv": "^8.17.1"
79
67
  }
80
68
  }
package/src/index.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export { emojiIcon, notionIcon } from "./builder.js";
2
- export { slashCommand } from "./capabilities/slashCommand.js";
3
2
  export type {
4
3
  SyncConfiguration,
5
4
  SyncExecutionResult,
@@ -1,56 +0,0 @@
1
- import type { Block } from "../block.js";
2
- export type SlashCommandConfiguration = {
3
- menuTitle: string;
4
- menuDescription: string;
5
- search: {
6
- placeholder: string;
7
- debounce: number;
8
- };
9
- /**
10
- * A function that returns a list of items to display in the search results
11
- * as well as the corresponding blocks to insert for each item should it be selected.
12
- */
13
- executeSearch: (searchQuery: string) => Promise<{
14
- items: {
15
- title: string;
16
- description: string;
17
- id: string;
18
- }[];
19
- }>;
20
- executeSelect: (selectedItemId: string) => Promise<Block[]>;
21
- };
22
- export type SlashCommandHandlerResult = {
23
- menuTitle: string;
24
- menuDescription: string;
25
- search: {
26
- placeholder: string;
27
- debounce: number;
28
- };
29
- };
30
- /**
31
- * Creates a special handler for handling slash commands.
32
- *
33
- * @param slashCommandConfiguration - The configuration for the slash command.
34
- * @returns A handler function that executes the slash command function, and passes data
35
- * needed to complete the operation back to the platform.
36
- */
37
- export declare function slashCommand(slashCommandConfiguration: SlashCommandConfiguration): {
38
- _tag: string;
39
- config: {
40
- menuTitle: string;
41
- menuDescription: string;
42
- search: {
43
- placeholder: string;
44
- debounce: number;
45
- };
46
- };
47
- handleSearch(searchQuery: string): Promise<{
48
- items: {
49
- title: string;
50
- description: string;
51
- id: string;
52
- }[];
53
- }>;
54
- handleSelect(selectedItemId: string): Promise<Block[]>;
55
- };
56
- //# sourceMappingURL=slashCommand.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"slashCommand.d.ts","sourceRoot":"","sources":["../../src/capabilities/slashCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGzC,MAAM,MAAM,yBAAyB,GAAG;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE;QACP,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;KACjB,CAAC;IAEF;;;OAGG;IACH,aAAa,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC;QAC/C,KAAK,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KAC5D,CAAC,CAAC;IACH,aAAa,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;CAC5D,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE;QACP,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;KACjB,CAAC;CACF,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC3B,yBAAyB,EAAE,yBAAyB;;;;;;yBA/BtC,MAAM;sBACT,MAAM;;;8BAuCgB,MAAM;eA/B/B;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAA;SAAE,EAAE;;iCA0CxB,MAAM;EAY1C"}
@@ -1,32 +0,0 @@
1
- import { ExecutionError } from "../error.js";
2
- function slashCommand(slashCommandConfiguration) {
3
- return {
4
- _tag: "slashCommand",
5
- config: {
6
- menuTitle: slashCommandConfiguration.menuTitle,
7
- menuDescription: slashCommandConfiguration.menuDescription,
8
- search: slashCommandConfiguration.search
9
- },
10
- async handleSearch(searchQuery) {
11
- const result = await slashCommandConfiguration.executeSearch(searchQuery).catch((err) => {
12
- throw new ExecutionError(err);
13
- });
14
- process.stdout.write(`
15
- <output>${JSON.stringify(result)}</output>
16
- `);
17
- return result;
18
- },
19
- async handleSelect(selectedItemId) {
20
- const result = await slashCommandConfiguration.executeSelect(selectedItemId).catch((err) => {
21
- throw new ExecutionError(err);
22
- });
23
- process.stdout.write(`
24
- <output>${JSON.stringify(result)}</output>
25
- `);
26
- return result;
27
- }
28
- };
29
- }
30
- export {
31
- slashCommand
32
- };
@@ -1,212 +0,0 @@
1
- /**
2
- * API client for making authenticated requests to the Workers API
3
- */
4
- import type { IO } from "../io.js";
5
- import { Result } from "./result.js";
6
- export type Environment = "local" | "staging" | "dev" | "prod";
7
- interface ApiClientConfig {
8
- token: string;
9
- environment: Environment;
10
- baseUrl?: string | undefined;
11
- cellId: string;
12
- writer: IO;
13
- }
14
- export interface ApiError {
15
- status: number;
16
- statusText: string;
17
- message: string;
18
- validationError?: {
19
- errorId: string;
20
- name: string;
21
- debugMessage: string;
22
- message: string;
23
- };
24
- }
25
- /**
26
- * API client for making authenticated requests to Workers endpoints
27
- */
28
- export declare class ApiClient {
29
- #private;
30
- constructor(config: ApiClientConfig);
31
- /**
32
- * Make an authenticated fetch request to the Workers API
33
- */
34
- private fetch;
35
- /**
36
- * Create a new worker
37
- */
38
- createWorker(name: string): Promise<Result<{
39
- worker: {
40
- workerId: string;
41
- name: string;
42
- spaceId: string;
43
- createdAt: string;
44
- updatedAt: string;
45
- state: unknown;
46
- };
47
- url: string;
48
- fields: Record<string, string>;
49
- }, ApiError>>;
50
- /**
51
- * Update an existing worker's bundle
52
- */
53
- updateWorkerBundle(workerId: string): Promise<Result<{
54
- url: string;
55
- fields: Record<string, string>;
56
- }, ApiError>>;
57
- /**
58
- * Get a worker by ID
59
- */
60
- getWorker(workerId: string): Promise<Result<{
61
- worker: {
62
- workerId: string;
63
- name: string;
64
- spaceId: string;
65
- state: unknown;
66
- tools: unknown[];
67
- createdAt: string;
68
- updatedAt: string;
69
- };
70
- }, ApiError>>;
71
- /**
72
- * List all workers in the space
73
- */
74
- listWorkers(): Promise<Result<{
75
- workers: Array<{
76
- workerId: string;
77
- name: string;
78
- spaceId: string;
79
- state: unknown;
80
- createdAt: string;
81
- updatedAt: string;
82
- }>;
83
- }, ApiError>>;
84
- /**
85
- * Delete a worker
86
- */
87
- deleteWorker(workerId: string): Promise<Result<Record<string, never>, ApiError>>;
88
- /**
89
- * Fetch and save worker capabilities
90
- */
91
- fetchAndSaveCapabilities(workerId: string): Promise<Result<{
92
- capabilities: ReadonlyArray<{
93
- _tag: "sync" | "slashCommand";
94
- spaceId: string;
95
- workerId: string;
96
- key: string;
97
- config: unknown;
98
- }>;
99
- }, ApiError>>;
100
- /**
101
- * Upsert secrets (create or update multiple secrets)
102
- */
103
- upsertSecrets(workerId: string, secrets: Array<{
104
- key: string;
105
- value: string;
106
- }>): Promise<Result<{
107
- secrets: Array<{
108
- spaceId: string;
109
- workerId: string;
110
- key: string;
111
- createdAt: string;
112
- }>;
113
- }, ApiError>>;
114
- /**
115
- * List all secrets for a worker (keys only, not values)
116
- */
117
- listSecrets(workerId: string, options?: {
118
- secretKinds?: Array<"keyValue" | "oauth">;
119
- }): Promise<Result<{
120
- secrets: Array<{
121
- spaceId: string;
122
- workerId: string;
123
- key: string;
124
- createdAt: string;
125
- kind: "keyValue" | "oauth";
126
- }>;
127
- }, ApiError>>;
128
- /**
129
- * Pull decrypted env vars for a worker
130
- */
131
- pullEnv(workerId: string): Promise<Result<{
132
- env: Array<{
133
- key: string;
134
- value: string;
135
- }>;
136
- }, ApiError>>;
137
- listOauthProviders(): Promise<Result<{
138
- providers: Array<{
139
- key: string;
140
- displayName: string;
141
- }>;
142
- }, ApiError>>;
143
- /**
144
- * Start the OAuth flow for a provider
145
- */
146
- startOauth(args: {
147
- workerId: string;
148
- provider: string;
149
- }): Promise<Result<{
150
- authorizationUrl: string;
151
- state: string;
152
- }, ApiError>>;
153
- /**
154
- * Remove an OAuth connection for a worker
155
- */
156
- deleteOauthConnection(args: {
157
- workerId: string;
158
- provider: string;
159
- }): Promise<Result<Record<string, never>, ApiError>>;
160
- /**
161
- * Delete a secret
162
- */
163
- deleteSecret(workerId: string, key: string): Promise<Result<Record<string, never>, ApiError>>;
164
- /**
165
- * List all capabilities for a worker
166
- */
167
- listCapabilities(workerId: string): Promise<Result<{
168
- capabilities: Array<{
169
- _tag: "sync" | "slashCommand";
170
- key: string;
171
- }>;
172
- }, ApiError>>;
173
- /**
174
- * Run a capability
175
- */
176
- runCapability(workerId: string, capabilityKey: string, functionName: string | null, args: Array<{
177
- name: string;
178
- value: string;
179
- }>, stream: true): Promise<Result<ReadableStream<Uint8Array<ArrayBufferLike>>, ApiError>>;
180
- runCapability(workerId: string, capabilityKey: string, functionName: string | null, args: Array<{
181
- name: string;
182
- value: string;
183
- }>, stream?: false | undefined): Promise<Result<{
184
- result: unknown;
185
- }, ApiError>>;
186
- /**
187
- * Download the bundle for a worker
188
- */
189
- downloadWorkerBundle(workerId: string): Promise<Result<ReadableStream<Uint8Array<ArrayBufferLike>>, ApiError>>;
190
- /**
191
- * List all runs for a worker
192
- */
193
- listRunsForWorker(workerId: string): Promise<Result<{
194
- runs: Array<{
195
- workerId: string;
196
- spaceId: string;
197
- runId: string;
198
- name: string;
199
- exitCode: number | null;
200
- startedAt: string;
201
- endedAt: string | null;
202
- }>;
203
- }, ApiError>>;
204
- /**
205
- * Get logs for a specific run
206
- */
207
- getRunLogs(workerId: string, runId: string): Promise<Result<{
208
- logs: string;
209
- }, ApiError>>;
210
- }
211
- export {};
212
- //# sourceMappingURL=client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/cli/api/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;AAE/D,UAAU,eAAe;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,W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