@imbrace/cli 0.2.0 → 0.4.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.
- package/README.md +7 -0
- package/dist/base-command.js +20 -18
- package/dist/commands/ai-agent/create.js +8 -7
- package/dist/commands/ai-agent/delete.js +6 -4
- package/dist/commands/ai-agent/get.js +5 -5
- package/dist/commands/ai-agent/list-files.js +7 -5
- package/dist/commands/ai-agent/list-folders.js +7 -6
- package/dist/commands/ai-agent/list-models.js +5 -5
- package/dist/commands/ai-agent/list-providers.js +5 -5
- package/dist/commands/ai-agent/list.js +7 -5
- package/dist/commands/ai-agent/update.js +5 -4
- package/dist/commands/data-board/create-field.js +6 -4
- package/dist/commands/data-board/create-item.js +10 -8
- package/dist/commands/data-board/create.js +8 -6
- package/dist/commands/data-board/delete-item.js +6 -4
- package/dist/commands/data-board/export-csv.js +3 -2
- package/dist/commands/data-board/list-items.js +9 -11
- package/dist/commands/data-board/list.js +7 -5
- package/dist/commands/data-board/update-item.js +8 -6
- package/dist/commands/docs.d.ts +10 -0
- package/dist/commands/docs.js +39 -0
- package/dist/commands/login.d.ts +0 -1
- package/dist/commands/login.js +39 -55
- package/dist/commands/whoami.js +0 -2
- package/dist/commands/workflow/conn/create.js +33 -16
- package/dist/commands/workflow/conn/delete.js +6 -4
- package/dist/commands/workflow/conn/get.js +5 -4
- package/dist/commands/workflow/conn/list.js +7 -5
- package/dist/commands/workflow/create.js +16 -14
- package/dist/commands/workflow/delete.js +6 -4
- package/dist/commands/workflow/disable.js +9 -4
- package/dist/commands/workflow/enable.js +9 -4
- package/dist/commands/workflow/folder/create.js +11 -10
- package/dist/commands/workflow/folder/delete.js +6 -4
- package/dist/commands/workflow/folder/get.js +5 -4
- package/dist/commands/workflow/folder/list.js +7 -5
- package/dist/commands/workflow/folder/update.js +6 -4
- package/dist/commands/workflow/get.js +5 -4
- package/dist/commands/workflow/list.js +8 -6
- package/dist/commands/workflow/mcp/create.js +10 -9
- package/dist/commands/workflow/mcp/delete.js +6 -4
- package/dist/commands/workflow/mcp/get.js +5 -4
- package/dist/commands/workflow/mcp/list.js +9 -5
- package/dist/commands/workflow/mcp/rotate-token.js +7 -5
- package/dist/commands/workflow/move.js +10 -4
- package/dist/commands/workflow/node/add-raw.js +6 -4
- package/dist/commands/workflow/node/add.js +70 -21
- package/dist/commands/workflow/node/delete.js +12 -4
- package/dist/commands/workflow/node/list.js +8 -5
- package/dist/commands/workflow/node/update.js +44 -8
- package/dist/commands/workflow/piece/detail.js +5 -4
- package/dist/commands/workflow/piece/list.js +22 -6
- package/dist/commands/workflow/publish.js +9 -4
- package/dist/commands/workflow/run-detail.js +5 -4
- package/dist/commands/workflow/run.js +10 -7
- package/dist/commands/workflow/runs.js +7 -5
- package/dist/config.d.ts +5 -5
- package/dist/config.js +6 -12
- package/dist/lib/ai-agent.d.ts +40 -0
- package/dist/lib/ai-agent.js +150 -0
- package/dist/lib/client.d.ts +7 -0
- package/dist/lib/client.js +21 -0
- package/dist/lib/gateway.d.ts +3 -0
- package/dist/lib/gateway.js +31 -0
- package/dist/lib/workflow.d.ts +20 -0
- package/dist/lib/workflow.js +71 -0
- package/dist/select-board.js +4 -3
- package/llms.txt +626 -0
- package/package.json +4 -3
- package/dist/http.d.ts +0 -9
- package/dist/http.js +0 -40
package/dist/http.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { getCredential, getApiUrl } from "./config.js";
|
|
2
|
-
/**
|
|
3
|
-
* HTTP client for the local Hono API server
|
|
4
|
-
* Automatically attaches the Bearer token from config
|
|
5
|
-
*/
|
|
6
|
-
export async function apiRequest(path, opts) {
|
|
7
|
-
const credential = getCredential();
|
|
8
|
-
const baseUrl = getApiUrl();
|
|
9
|
-
const headers = {
|
|
10
|
-
"Content-Type": "application/json",
|
|
11
|
-
};
|
|
12
|
-
if (credential) {
|
|
13
|
-
headers["Authorization"] = `Bearer ${credential}`;
|
|
14
|
-
}
|
|
15
|
-
const res = await fetch(`${baseUrl}${path}`, {
|
|
16
|
-
method: opts?.method || "GET",
|
|
17
|
-
headers,
|
|
18
|
-
body: opts?.body ? JSON.stringify(opts.body) : undefined,
|
|
19
|
-
});
|
|
20
|
-
const data = await res.json();
|
|
21
|
-
if (!res.ok) {
|
|
22
|
-
throw new Error(data?.message || `HTTP ${res.status}`);
|
|
23
|
-
}
|
|
24
|
-
return data;
|
|
25
|
-
}
|
|
26
|
-
export async function apiRequestText(path) {
|
|
27
|
-
const credential = getCredential();
|
|
28
|
-
const baseUrl = getApiUrl();
|
|
29
|
-
const headers = {
|
|
30
|
-
"Content-Type": "application/json",
|
|
31
|
-
};
|
|
32
|
-
if (credential) {
|
|
33
|
-
headers["Authorization"] = `Bearer ${credential}`;
|
|
34
|
-
}
|
|
35
|
-
const res = await fetch(`${baseUrl}${path}`, { method: "GET", headers });
|
|
36
|
-
if (!res.ok) {
|
|
37
|
-
throw new Error(`HTTP ${res.status}`);
|
|
38
|
-
}
|
|
39
|
-
return res.text();
|
|
40
|
-
}
|