@skrr-ai/cli 0.1.40 → 0.1.41
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/dist/base-command.d.ts +9 -0
- package/dist/base-command.js +18 -3
- package/dist/commands/agent-shares/list-for.js +4 -11
- package/dist/commands/agent-shares/received.js +4 -11
- package/dist/commands/agent-shares/sent.js +4 -11
- package/dist/commands/agent-shares/with.js +3 -10
- package/dist/commands/agents/activity.js +1 -1
- package/dist/commands/agents/api-actions/add.js +6 -0
- package/dist/commands/agents/chat.js +6 -1
- package/dist/commands/agents/create.js +6 -1
- package/dist/commands/agents/manager/ensure.d.ts +18 -0
- package/dist/commands/agents/manager/ensure.js +56 -0
- package/dist/commands/agents/show.js +4 -0
- package/dist/commands/agents/tools/auth.d.ts +6 -0
- package/dist/commands/agents/tools/auth.js +27 -1
- package/dist/commands/agents/tools/index.js +11 -1
- package/dist/commands/agents/update.js +6 -1
- package/dist/commands/code/install.d.ts +4 -2
- package/dist/commands/code/install.js +12 -10
- package/dist/commands/convos/list.js +1 -3
- package/dist/commands/convos/show.js +4 -11
- package/dist/commands/daemon/index.js +3 -3
- package/dist/commands/daemon/install.js +4 -4
- package/dist/commands/daemon/login.js +1 -1
- package/dist/commands/daemon/logs.d.ts +3 -1
- package/dist/commands/daemon/logs.js +16 -1
- package/dist/commands/daemon/start.js +3 -3
- package/dist/commands/daemon/status.d.ts +9 -0
- package/dist/commands/daemon/status.js +22 -0
- package/dist/commands/dm/messages.js +1 -11
- package/dist/commands/followups/cancel.js +1 -1
- package/dist/commands/followups/resolve.js +1 -1
- package/dist/commands/followups/show.js +16 -0
- package/dist/commands/harnesses/forget.js +20 -3
- package/dist/commands/harnesses/install.js +18 -6
- package/dist/commands/harnesses/installers.d.ts +1 -1
- package/dist/commands/harnesses/installers.js +36 -12
- package/dist/commands/harnesses/list.d.ts +74 -2
- package/dist/commands/harnesses/list.js +231 -15
- package/dist/commands/harnesses/ping.d.ts +2 -0
- package/dist/commands/harnesses/ping.js +21 -0
- package/dist/commands/harnesses/show.d.ts +22 -0
- package/dist/commands/harnesses/show.js +116 -17
- package/dist/commands/harnesses/update.d.ts +8 -0
- package/dist/commands/harnesses/update.js +25 -1
- package/dist/commands/harnesses/usage.d.ts +2 -0
- package/dist/commands/harnesses/usage.js +7 -2
- package/dist/commands/instructions/status.js +13 -0
- package/dist/commands/instructions/update-target.d.ts +1 -0
- package/dist/commands/instructions/update-target.js +11 -3
- package/dist/commands/login.js +5 -5
- package/dist/commands/machines/list.js +8 -9
- package/dist/commands/machines/show.js +46 -17
- package/dist/commands/messages/show.js +3 -10
- package/dist/commands/shares/get.js +2 -9
- package/dist/commands/shares/list.js +1 -9
- package/dist/commands/shortcuts/show.js +4 -11
- package/dist/commands/skills/local.js +6 -0
- package/dist/commands/spaces/actions/run.js +3 -4
- package/dist/commands/spaces/briefs/get.js +2 -9
- package/dist/commands/spaces/briefs/list.js +1 -9
- package/dist/commands/spaces/conversations.js +1 -9
- package/dist/commands/spaces/heartbeats/list.js +1 -9
- package/dist/commands/spaces/heartbeats/status.js +2 -9
- package/dist/commands/tasks/activity.js +1 -10
- package/dist/commands/tasks/approvals/list.js +1 -9
- package/dist/commands/tasks/attachments/list.js +1 -9
- package/dist/commands/tasks/comments/list.js +1 -9
- package/dist/commands/tasks/dri-status.js +2 -9
- package/dist/commands/tasks/events/append.js +9 -7
- package/dist/commands/tasks/execution-timeline.js +1 -9
- package/dist/commands/tasks/monitor.js +1 -9
- package/dist/commands/tasks/result/submit.js +9 -0
- package/dist/commands/tasks/runs.js +1 -9
- package/dist/commands/tasks/show.js +5 -12
- package/dist/commands/token/list.d.ts +8 -0
- package/dist/commands/token/list.js +51 -6
- package/dist/help.js +8 -12
- package/dist/lib/agent-home-workspace.d.ts +19 -0
- package/dist/lib/agent-home-workspace.js +39 -0
- package/dist/lib/agent-resolver.js +2 -2
- package/dist/lib/agentic-stream.d.ts +22 -1
- package/dist/lib/agentic-stream.js +48 -7
- package/dist/lib/cli-installers.d.ts +84 -2
- package/dist/lib/cli-installers.js +146 -13
- package/dist/lib/command-miss.d.ts +22 -0
- package/dist/lib/command-miss.js +78 -0
- package/dist/lib/daemon-setup.js +2 -2
- package/dist/lib/daemon-target.d.ts +14 -0
- package/dist/lib/daemon-target.js +32 -0
- package/dist/lib/daemonBroker.js +1 -1
- package/dist/lib/daemonHandoff.js +1 -1
- package/dist/lib/exec-runtime-binary.js +2 -2
- package/dist/lib/followups.d.ts +10 -0
- package/dist/lib/followups.js +14 -1
- package/dist/lib/format.d.ts +11 -0
- package/dist/lib/format.js +21 -0
- package/dist/lib/harness-labels.d.ts +39 -0
- package/dist/lib/harness-labels.js +60 -0
- package/dist/lib/harnesses.d.ts +6 -0
- package/dist/lib/instruction-input.d.ts +13 -0
- package/dist/lib/instruction-input.js +20 -1
- package/dist/lib/local-skills.d.ts +17 -1
- package/dist/lib/local-skills.js +20 -2
- package/dist/lib/login.js +5 -5
- package/dist/lib/machines.d.ts +6 -0
- package/dist/lib/machines.js +68 -2
- package/dist/lib/runtime-tool-support.d.ts +34 -0
- package/dist/lib/runtime-tool-support.js +77 -0
- package/dist/lib/share-rows.d.ts +17 -0
- package/dist/lib/share-rows.js +35 -0
- package/dist/node_modules/@skrr-ai/data-provider/index.js +5029 -5007
- package/oclif.manifest.json +2689 -2584
- package/package.json +6 -3
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AGENT_COLUMN_FOOTNOTE = void 0;
|
|
4
|
+
exports.agentRuntimeLabel = agentRuntimeLabel;
|
|
5
|
+
exports.pluginKeysNotLoaded = pluginKeysNotLoaded;
|
|
6
|
+
exports.pluginsNotLoadedNotice = pluginsNotLoadedNotice;
|
|
7
|
+
exports.oauthActionNotice = oauthActionNotice;
|
|
8
|
+
exports.splitStoredTools = splitStoredTools;
|
|
9
|
+
exports.warnPluginsNotLoaded = warnPluginsNotLoaded;
|
|
10
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
11
|
+
/**
|
|
12
|
+
* What an agent turn can call, said where tools are configured.
|
|
13
|
+
*
|
|
14
|
+
* Plugin tools (`agents tools`, `--tools`) and OpenAPI actions
|
|
15
|
+
* (`agents api-actions add`) reach an agent turn through the runtime's
|
|
16
|
+
* `agent-tools` server (OSK-9750, OSK-9754). Two limits remain, and the CLI is
|
|
17
|
+
* where the tool is set up, so it says them there:
|
|
18
|
+
* - image and file plugins save their output through a web request an agent
|
|
19
|
+
* turn does not have, so they are stored but not loaded;
|
|
20
|
+
* - an OAuth action runs only after the user authorizes it once, through a
|
|
21
|
+
* link the agent hands over on its first call.
|
|
22
|
+
*/
|
|
23
|
+
/** The catalog's AGENT column. `?` for a server older than the `agentRuntime` field. */
|
|
24
|
+
function agentRuntimeLabel(tool) {
|
|
25
|
+
if (tool.agentRuntime === undefined)
|
|
26
|
+
return '?';
|
|
27
|
+
return tool.agentRuntime ? 'yes' : 'no';
|
|
28
|
+
}
|
|
29
|
+
exports.AGENT_COLUMN_FOOTNOTE = 'AGENT says whether an agent turn can call the tool. Image and file tools (AGENT no) ' +
|
|
30
|
+
'save their output through a web request an agent turn does not have.';
|
|
31
|
+
/** Stored plugin keys the catalog says an agent turn does not load. */
|
|
32
|
+
function pluginKeysNotLoaded(keys, catalog) {
|
|
33
|
+
const byKey = new Map(catalog.map((tool) => [tool.pluginKey, tool]));
|
|
34
|
+
return keys.filter((key) => byKey.get(key)?.agentRuntime === false);
|
|
35
|
+
}
|
|
36
|
+
function pluginsNotLoadedNotice(keys) {
|
|
37
|
+
const [subject, verb] = keys.length === 1 ? ['it', 'saves'] : ['they', 'save'];
|
|
38
|
+
return (`Saved, but an agent turn cannot call ${keys.join(', ')}: ${subject} ${verb} ` +
|
|
39
|
+
'output through a web request an agent turn does not have.');
|
|
40
|
+
}
|
|
41
|
+
/** Said after adding an OAuth action, since nothing works until both steps happen. */
|
|
42
|
+
function oauthActionNotice(redirectUrl) {
|
|
43
|
+
return (`Register ${redirectUrl} as the redirect URL with the OAuth provider. ` +
|
|
44
|
+
"The agent's first call to one of these operations returns a link for you to authorize; " +
|
|
45
|
+
'after you finish, ask it to try again.');
|
|
46
|
+
}
|
|
47
|
+
/** Split an agent's stored `tools` into plugin keys and OpenAPI action tool names. */
|
|
48
|
+
function splitStoredTools(tools) {
|
|
49
|
+
const list = Array.isArray(tools) ? tools.map(String) : [];
|
|
50
|
+
return {
|
|
51
|
+
plugins: list.filter((name) => !name.includes(data_provider_1.actionDelimiter)),
|
|
52
|
+
actions: list.filter((name) => name.includes(data_provider_1.actionDelimiter)),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* After `--tools` is saved: warn about the plugin keys an agent turn will not load.
|
|
57
|
+
*
|
|
58
|
+
* Unknown keys are refused by the server (OSK-9545); this covers the known ones
|
|
59
|
+
* that are stored but skipped. Best effort: a catalog that cannot be read says
|
|
60
|
+
* nothing rather than failing a write that already succeeded.
|
|
61
|
+
*/
|
|
62
|
+
async function warnPluginsNotLoaded(tools, warn, fetchCatalog = () => data_provider_1.dataService.getAvailableTools()) {
|
|
63
|
+
const { plugins } = splitStoredTools(tools);
|
|
64
|
+
if (plugins.length === 0)
|
|
65
|
+
return;
|
|
66
|
+
let catalog;
|
|
67
|
+
try {
|
|
68
|
+
catalog = await fetchCatalog();
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const skipped = pluginKeysNotLoaded(plugins, catalog);
|
|
74
|
+
if (skipped.length > 0) {
|
|
75
|
+
warn(pluginsNotLoadedNotice(skipped));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How an agent-share row names its share and the other person.
|
|
3
|
+
*
|
|
4
|
+
* The share routes answer `{ shareId, owner: { userId, name }, recipient:
|
|
5
|
+
* { userId, name } }`. The four `agent-shares` listings read `id`/`_id` and
|
|
6
|
+
* stringified the person object, so every row printed SHARE ID `-` and FROM/TO
|
|
7
|
+
* `[object Object]` (OSK-10043): the one id `respond`/`revoke` need was
|
|
8
|
+
* unreadable, and so was who the share was with.
|
|
9
|
+
*/
|
|
10
|
+
/** The share's id, whichever key the row carries it under. */
|
|
11
|
+
export declare function shareIdOf(share: Record<string, unknown>): string;
|
|
12
|
+
/**
|
|
13
|
+
* A person as `Name (userId)` — the name to recognise, the id that
|
|
14
|
+
* `agent-shares with <userId>` takes. Accepts a bare id string too, which older
|
|
15
|
+
* rows used.
|
|
16
|
+
*/
|
|
17
|
+
export declare function sharePartyLabel(value: unknown): string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* How an agent-share row names its share and the other person.
|
|
4
|
+
*
|
|
5
|
+
* The share routes answer `{ shareId, owner: { userId, name }, recipient:
|
|
6
|
+
* { userId, name } }`. The four `agent-shares` listings read `id`/`_id` and
|
|
7
|
+
* stringified the person object, so every row printed SHARE ID `-` and FROM/TO
|
|
8
|
+
* `[object Object]` (OSK-10043): the one id `respond`/`revoke` need was
|
|
9
|
+
* unreadable, and so was who the share was with.
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.shareIdOf = shareIdOf;
|
|
13
|
+
exports.sharePartyLabel = sharePartyLabel;
|
|
14
|
+
/** The share's id, whichever key the row carries it under. */
|
|
15
|
+
function shareIdOf(share) {
|
|
16
|
+
const id = share.shareId ?? share.id ?? share._id;
|
|
17
|
+
return typeof id === 'string' && id.length > 0 ? id : '-';
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A person as `Name (userId)` — the name to recognise, the id that
|
|
21
|
+
* `agent-shares with <userId>` takes. Accepts a bare id string too, which older
|
|
22
|
+
* rows used.
|
|
23
|
+
*/
|
|
24
|
+
function sharePartyLabel(value) {
|
|
25
|
+
if (typeof value === 'string')
|
|
26
|
+
return value.length > 0 ? value : '-';
|
|
27
|
+
if (!value || typeof value !== 'object')
|
|
28
|
+
return '-';
|
|
29
|
+
const party = value;
|
|
30
|
+
const id = [party.userId, party.id].find((v) => typeof v === 'string' && v.length > 0);
|
|
31
|
+
const name = [party.name, party.email].find((v) => typeof v === 'string' && v.length > 0);
|
|
32
|
+
if (name && id)
|
|
33
|
+
return `${name} (${id})`;
|
|
34
|
+
return name ?? id ?? '-';
|
|
35
|
+
}
|