@skrr-ai/cli 0.1.36 → 0.1.38
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 +17 -4
- package/bin/dev-fallback.js +167 -4
- package/dist/base-command.js +46 -2
- package/dist/commands/agents/actions/create.d.ts +5 -0
- package/dist/commands/agents/actions/create.js +42 -5
- package/dist/commands/agents/actions/delete.d.ts +1 -0
- package/dist/commands/agents/actions/delete.js +7 -0
- package/dist/commands/agents/actions/update.d.ts +5 -0
- package/dist/commands/agents/actions/update.js +27 -1
- package/dist/commands/agents/api-actions/add.d.ts +41 -0
- package/dist/commands/agents/api-actions/add.js +205 -0
- package/dist/commands/agents/api-actions/index.d.ts +39 -0
- package/dist/commands/agents/api-actions/index.js +103 -0
- package/dist/commands/agents/api-actions/remove.d.ts +14 -0
- package/dist/commands/agents/api-actions/remove.js +36 -0
- package/dist/commands/agents/avatar/default/apply.d.ts +25 -0
- package/dist/commands/agents/avatar/default/apply.js +56 -0
- package/dist/commands/agents/avatar/default/index.d.ts +29 -0
- package/dist/commands/agents/avatar/default/index.js +61 -0
- package/dist/commands/agents/avatar/default/set.d.ts +24 -0
- package/dist/commands/agents/avatar/default/set.js +120 -0
- package/dist/commands/agents/avatar/library/delete.d.ts +20 -0
- package/dist/commands/agents/avatar/library/delete.js +47 -0
- package/dist/commands/agents/avatar/library/index.d.ts +16 -0
- package/dist/commands/agents/avatar/library/index.js +56 -0
- package/dist/commands/agents/avatar/presets.d.ts +19 -0
- package/dist/commands/agents/avatar/presets.js +56 -0
- package/dist/commands/agents/avatar/upload.js +7 -1
- package/dist/commands/agents/categories/create.d.ts +14 -0
- package/dist/commands/agents/categories/create.js +46 -0
- package/dist/commands/agents/categories/delete.d.ts +13 -0
- package/dist/commands/agents/categories/delete.js +41 -0
- package/dist/commands/agents/categories/index.d.ts +36 -0
- package/dist/commands/agents/categories/index.js +135 -0
- package/dist/commands/agents/categories/update.d.ts +22 -0
- package/dist/commands/agents/categories/update.js +59 -0
- package/dist/commands/agents/chat.d.ts +21 -0
- package/dist/commands/agents/chat.js +94 -7
- package/dist/commands/agents/create.d.ts +10 -0
- package/dist/commands/agents/create.js +64 -3
- package/dist/commands/agents/ensure-default.d.ts +27 -0
- package/dist/commands/agents/ensure-default.js +65 -0
- package/dist/commands/agents/list.d.ts +15 -0
- package/dist/commands/agents/list.js +31 -1
- package/dist/commands/agents/mute.d.ts +16 -0
- package/dist/commands/agents/mute.js +38 -0
- package/dist/commands/agents/pin.d.ts +16 -0
- package/dist/commands/agents/pin.js +38 -0
- package/dist/commands/agents/scene-background/upload.d.ts +30 -0
- package/dist/commands/agents/scene-background/upload.js +97 -0
- package/dist/commands/agents/show.js +13 -0
- package/dist/commands/agents/tools/auth.d.ts +19 -0
- package/dist/commands/agents/tools/auth.js +41 -0
- package/dist/commands/agents/tools/calls.d.ts +36 -0
- package/dist/commands/agents/tools/calls.js +117 -0
- package/dist/commands/agents/tools/index.d.ts +20 -0
- package/dist/commands/agents/tools/index.js +77 -0
- package/dist/commands/agents/unmute.d.ts +16 -0
- package/dist/commands/agents/unmute.js +38 -0
- package/dist/commands/agents/unpin.d.ts +16 -0
- package/dist/commands/agents/unpin.js +38 -0
- package/dist/commands/agents/update.d.ts +12 -0
- package/dist/commands/agents/update.js +74 -3
- package/dist/commands/code/{oversky-agent.d.ts → skrr-agent.d.ts} +3 -3
- package/dist/commands/code/{oversky-agent.js → skrr-agent.js} +11 -8
- package/dist/commands/convos/messages.d.ts +13 -0
- package/dist/commands/convos/messages.js +40 -16
- package/dist/commands/daemon/index.js +8 -1
- package/dist/commands/daemon/logs.d.ts +26 -0
- package/dist/commands/daemon/logs.js +56 -0
- package/dist/commands/daemon/uninstall.js +1 -1
- package/dist/commands/followups/act.d.ts +22 -0
- package/dist/commands/followups/act.js +103 -0
- package/dist/commands/followups/cancel.d.ts +20 -0
- package/dist/commands/followups/cancel.js +50 -0
- package/dist/commands/followups/checkin.d.ts +27 -0
- package/dist/commands/followups/checkin.js +107 -0
- package/dist/commands/followups/list.d.ts +24 -0
- package/dist/commands/followups/list.js +90 -0
- package/dist/commands/followups/observability.d.ts +23 -0
- package/dist/commands/followups/observability.js +114 -0
- package/dist/commands/followups/remind.d.ts +26 -0
- package/dist/commands/followups/remind.js +106 -0
- package/dist/commands/followups/reschedule.d.ts +15 -0
- package/dist/commands/followups/reschedule.js +48 -0
- package/dist/commands/followups/resolve.d.ts +23 -0
- package/dist/commands/followups/resolve.js +54 -0
- package/dist/commands/followups/show.d.ts +12 -0
- package/dist/commands/followups/show.js +46 -0
- package/dist/commands/followups/watch.d.ts +51 -0
- package/dist/commands/followups/watch.js +211 -0
- package/dist/commands/goals/labels/add.js +19 -2
- package/dist/commands/goals/labels/remove.js +22 -2
- package/dist/commands/harnesses/forget.js +28 -0
- package/dist/commands/harnesses/install.d.ts +41 -0
- package/dist/commands/harnesses/install.js +165 -0
- package/dist/commands/harnesses/installers.d.ts +45 -0
- package/dist/commands/harnesses/installers.js +155 -0
- package/dist/commands/harnesses/list.d.ts +82 -1
- package/dist/commands/harnesses/list.js +104 -12
- package/dist/commands/harnesses/models.js +10 -1
- package/dist/commands/harnesses/show.d.ts +15 -0
- package/dist/commands/harnesses/show.js +44 -3
- package/dist/commands/harnesses/update.js +1 -1
- package/dist/commands/harnesses/usage.d.ts +25 -0
- package/dist/commands/harnesses/usage.js +24 -2
- package/dist/commands/instructions/status.js +13 -1
- package/dist/commands/labels/list.d.ts +24 -1
- package/dist/commands/labels/list.js +62 -19
- package/dist/commands/machines/dedicated/catalog.js +4 -15
- package/dist/commands/machines/dedicated/create.d.ts +8 -0
- package/dist/commands/machines/dedicated/create.js +58 -1
- package/dist/commands/machines/dedicated/destroy.js +18 -4
- package/dist/commands/machines/dedicated/list.js +9 -6
- package/dist/commands/machines/hosted/list.js +12 -0
- package/dist/commands/machines/list.js +11 -0
- package/dist/commands/machines/show.d.ts +1 -0
- package/dist/commands/machines/show.js +40 -11
- package/dist/commands/memory/governance/index.d.ts +21 -0
- package/dist/commands/memory/governance/index.js +64 -0
- package/dist/commands/memory/governance/set.d.ts +24 -0
- package/dist/commands/memory/governance/set.js +95 -0
- package/dist/commands/memory/provenance.d.ts +18 -0
- package/dist/commands/memory/provenance.js +66 -0
- package/dist/commands/profiles/list.d.ts +23 -0
- package/dist/commands/profiles/list.js +96 -0
- package/dist/commands/search/skills.d.ts +11 -1
- package/dist/commands/search/skills.js +26 -8
- package/dist/commands/skills/details.d.ts +2 -0
- package/dist/commands/skills/details.js +24 -1
- package/dist/commands/skills/import-as-actions.d.ts +32 -0
- package/dist/commands/skills/import-as-actions.js +175 -0
- package/dist/commands/skills/install.d.ts +2 -0
- package/dist/commands/skills/install.js +24 -1
- package/dist/commands/skills/invocable.js +6 -2
- package/dist/commands/skills/local.d.ts +40 -0
- package/dist/commands/skills/local.js +160 -0
- package/dist/commands/skills/search.d.ts +11 -1
- package/dist/commands/skills/search.js +29 -8
- package/dist/commands/spaces/actions/add.js +23 -5
- package/dist/commands/spaces/actions/available.js +3 -0
- package/dist/commands/spaces/actions/list.d.ts +5 -0
- package/dist/commands/spaces/actions/list.js +49 -3
- package/dist/commands/spaces/actions/run.d.ts +28 -0
- package/dist/commands/spaces/actions/run.js +146 -0
- package/dist/commands/spaces/actions/update.js +27 -5
- package/dist/commands/spaces/create.d.ts +3 -0
- package/dist/commands/spaces/create.js +32 -2
- package/dist/commands/spaces/label-summaries.d.ts +27 -0
- package/dist/commands/spaces/label-summaries.js +64 -0
- package/dist/commands/spaces/labels/add.js +19 -2
- package/dist/commands/spaces/labels/remove.js +22 -2
- package/dist/commands/spaces/show.js +2 -0
- package/dist/commands/spaces/task-rollups.d.ts +5 -0
- package/dist/commands/spaces/task-rollups.js +15 -4
- package/dist/commands/spaces/update.d.ts +5 -0
- package/dist/commands/spaces/update.js +41 -4
- package/dist/commands/spaces/workflows/lifecycle-diagnostics.d.ts +11 -0
- package/dist/commands/spaces/workflows/lifecycle-diagnostics.js +105 -0
- package/dist/commands/tasks/actions/attach.js +32 -7
- package/dist/commands/tasks/complete.d.ts +1 -0
- package/dist/commands/tasks/complete.js +21 -1
- package/dist/commands/tasks/create.d.ts +3 -0
- package/dist/commands/tasks/create.js +34 -2
- package/dist/commands/tasks/events/append.js +29 -6
- package/dist/commands/tasks/expectations/assess.d.ts +12 -0
- package/dist/commands/tasks/expectations/assess.js +123 -14
- package/dist/commands/tasks/expectations.js +95 -17
- package/dist/commands/tasks/follow-up.js +2 -2
- package/dist/commands/tasks/labels/attach.js +20 -3
- package/dist/commands/tasks/labels/detach.js +21 -3
- package/dist/commands/tasks/lifecycle/attach.d.ts +14 -0
- package/dist/commands/tasks/lifecycle/attach.js +47 -0
- package/dist/commands/tasks/lifecycle/definitions.d.ts +11 -0
- package/dist/commands/tasks/lifecycle/definitions.js +59 -0
- package/dist/commands/tasks/lifecycle/detach.d.ts +19 -0
- package/dist/commands/tasks/lifecycle/detach.js +72 -0
- package/dist/commands/tasks/lifecycle/history.d.ts +13 -0
- package/dist/commands/tasks/lifecycle/history.js +38 -0
- package/dist/commands/tasks/lifecycle/migrate.d.ts +14 -0
- package/dist/commands/tasks/lifecycle/migrate.js +68 -0
- package/dist/commands/tasks/lifecycle/reconcile.d.ts +11 -0
- package/dist/commands/tasks/lifecycle/reconcile.js +27 -0
- package/dist/commands/tasks/lifecycle/reopen.d.ts +15 -0
- package/dist/commands/tasks/lifecycle/reopen.js +71 -0
- package/dist/commands/tasks/lifecycle/show.d.ts +11 -0
- package/dist/commands/tasks/lifecycle/show.js +27 -0
- package/dist/commands/tasks/lifecycle/start.d.ts +12 -0
- package/dist/commands/tasks/lifecycle/start.js +30 -0
- package/dist/commands/tasks/lifecycle/transition.d.ts +15 -0
- package/dist/commands/tasks/lifecycle/transition.js +109 -0
- package/dist/commands/tasks/list.js +16 -9
- package/dist/commands/tasks/move.d.ts +1 -0
- package/dist/commands/tasks/move.js +29 -0
- package/dist/commands/tasks/result/submit.js +11 -1
- package/dist/commands/tasks/review-queue.d.ts +44 -0
- package/dist/commands/tasks/review-queue.js +314 -0
- package/dist/commands/tasks/show.d.ts +11 -0
- package/dist/commands/tasks/show.js +139 -4
- package/dist/commands/tasks/trust.js +7 -2
- package/dist/commands/tasks/update.d.ts +1 -0
- package/dist/commands/tasks/update.js +83 -0
- package/dist/commands/tasks/updates/add.js +1 -1
- package/dist/commands/token/list.d.ts +22 -0
- package/dist/commands/token/list.js +68 -0
- package/dist/commands/token/revoke.d.ts +23 -0
- package/dist/commands/token/revoke.js +53 -0
- package/dist/lib/agent-actions.d.ts +92 -11
- package/dist/lib/agent-actions.js +171 -25
- package/dist/lib/agent-config.d.ts +11 -0
- package/dist/lib/agent-config.js +85 -3
- package/dist/lib/agent-pin-mute.d.ts +29 -0
- package/dist/lib/agent-pin-mute.js +30 -0
- package/dist/lib/agent-visual-refs.d.ts +33 -0
- package/dist/lib/agent-visual-refs.js +267 -0
- package/dist/lib/agentic-stream.d.ts +6 -0
- package/dist/lib/agentic-stream.js +34 -3
- package/dist/lib/assignee-resolver.d.ts +1 -1
- package/dist/lib/assignee-resolver.js +8 -0
- package/dist/lib/bulk-task-targets.d.ts +12 -0
- package/dist/lib/bulk-task-targets.js +34 -1
- package/dist/lib/cli-installers.d.ts +130 -0
- package/dist/lib/cli-installers.js +145 -0
- package/dist/lib/command-miss.js +55 -7
- package/dist/lib/dedicated-lease-command.d.ts +13 -0
- package/dist/lib/dedicated-lease-command.js +22 -1
- package/dist/lib/dedicated-machines.d.ts +95 -1
- package/dist/lib/dedicated-machines.js +236 -2
- package/dist/lib/failed-lookup.d.ts +3 -0
- package/dist/lib/failed-lookup.js +40 -0
- package/dist/lib/first-party-harness-agent.js +16 -2
- package/dist/lib/first-party-harness-doctor.d.ts +15 -0
- package/dist/lib/first-party-harness-doctor.js +126 -27
- package/dist/lib/followups.d.ts +115 -0
- package/dist/lib/followups.js +127 -0
- package/dist/lib/harnesses.d.ts +8 -0
- package/dist/lib/instruction-input.d.ts +19 -1
- package/dist/lib/instruction-input.js +52 -1
- package/dist/lib/label-ref.d.ts +95 -0
- package/dist/lib/label-ref.js +163 -0
- package/dist/lib/label-scope.d.ts +17 -2
- package/dist/lib/label-scope.js +27 -7
- package/dist/lib/local-skills.d.ts +98 -0
- package/dist/lib/local-skills.js +195 -0
- package/dist/lib/machines.d.ts +10 -10
- package/dist/lib/machines.js +23 -1
- package/dist/lib/search-query.d.ts +19 -0
- package/dist/lib/search-query.js +35 -0
- package/dist/lib/space-custom-actions.d.ts +72 -0
- package/dist/lib/space-custom-actions.js +117 -0
- package/dist/lib/space-resolver.d.ts +1 -21
- package/dist/lib/space-resolver.js +19 -10
- package/dist/lib/task-closure.d.ts +33 -0
- package/dist/lib/task-closure.js +104 -0
- package/dist/lib/task-lifecycle-output.d.ts +14 -0
- package/dist/lib/task-lifecycle-output.js +209 -0
- package/dist/lib/task-ref-resolver.d.ts +1 -17
- package/dist/lib/task-ref-resolver.js +18 -8
- package/dist/lib/tasks.d.ts +3 -0
- package/dist/lib/tasks.js +40 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/harnessTrust.js +4 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/harnessTrust.js +4 -0
- package/dist/node_modules/@skrr-ai/auth-core/package.json +1 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +5559 -4897
- package/oclif.manifest.json +33890 -28690
- package/package.json +24 -6
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_command_1 = require("../../base-command");
|
|
5
|
+
const agent_pin_mute_1 = require("../../lib/agent-pin-mute");
|
|
6
|
+
/**
|
|
7
|
+
* Per-USER preference, not agent config: it changes your view of the agent and
|
|
8
|
+
* nobody else's. Idempotent over a toggle endpoint — see `lib/agent-pin-mute.ts`.
|
|
9
|
+
*/
|
|
10
|
+
class AgentsUnpin extends base_command_1.BaseCommand {
|
|
11
|
+
static description = 'Remove an agent from your pinned list';
|
|
12
|
+
static examples = ['<%= config.bin %> agents unpin <agent-id>'];
|
|
13
|
+
static args = {
|
|
14
|
+
id: core_1.Args.string({ description: 'Agent ID', required: true, ignoreStdin: true }),
|
|
15
|
+
};
|
|
16
|
+
static flags = {
|
|
17
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
18
|
+
};
|
|
19
|
+
async run() {
|
|
20
|
+
this.requireAuth();
|
|
21
|
+
const { args, flags } = await this.parse(AgentsUnpin);
|
|
22
|
+
let result;
|
|
23
|
+
try {
|
|
24
|
+
result = await (0, agent_pin_mute_1.setAgentFlag)(args.id, 'pin', false);
|
|
25
|
+
}
|
|
26
|
+
catch (err) {
|
|
27
|
+
this.handleApiError(err);
|
|
28
|
+
}
|
|
29
|
+
if (flags.json) {
|
|
30
|
+
this.log(this.agentJson(args.id, { pin: result.value, changed: result.changed }));
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
this.log(result.changed
|
|
34
|
+
? `Agent ${args.id}: pin is now ${result.value}`
|
|
35
|
+
: `Agent ${args.id}: pin was already ${result.value} — nothing to do`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.default = AgentsUnpin;
|
|
@@ -40,6 +40,18 @@ export default class AgentsUpdate extends BaseCommand {
|
|
|
40
40
|
'hide-sequential-outputs': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
41
41
|
'is-collaborative': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
42
42
|
'recursion-limit': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
43
|
+
avatar: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
44
|
+
'conversation-starter': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
45
|
+
'todo-working-hours': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
46
|
+
'reasoning-tool-escape': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
47
|
+
'commitment-responsibility': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
48
|
+
'commitment-responsibility-ceiling': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
49
|
+
'max-turns': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
50
|
+
'tool-resources': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
51
|
+
'install-channel': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
52
|
+
'auto-minor-updates': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
53
|
+
'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
54
|
+
'remove-project-id': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
43
55
|
};
|
|
44
56
|
run(): Promise<void>;
|
|
45
57
|
}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
4
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
|
+
const agent_visual_refs_1 = require("../../lib/agent-visual-refs");
|
|
6
|
+
const create_1 = require("./create");
|
|
5
7
|
const base_command_1 = require("../../base-command");
|
|
6
8
|
const execution_target_1 = require("../../lib/execution-target");
|
|
7
9
|
const prompt_1 = require("../../lib/prompt");
|
|
@@ -32,7 +34,9 @@ class AgentsUpdate extends base_command_1.BaseCommand {
|
|
|
32
34
|
}),
|
|
33
35
|
provider: core_1.Flags.string({ description: 'New provider' }),
|
|
34
36
|
model: core_1.Flags.string({ description: 'New model' }),
|
|
35
|
-
category: core_1.Flags.string({
|
|
37
|
+
category: core_1.Flags.string({
|
|
38
|
+
description: 'New category. `skrr agents categories` lists what this account accepts.',
|
|
39
|
+
}),
|
|
36
40
|
target: core_1.Flags.string({
|
|
37
41
|
description: 'Execution target. Use a Harness id, Hosted Machine session, or Agent Worker. Use hosted-machine, sbs_..., agent-worker, or a connected Harness id.',
|
|
38
42
|
}),
|
|
@@ -54,7 +58,7 @@ class AgentsUpdate extends base_command_1.BaseCommand {
|
|
|
54
58
|
'network-agent-ids': core_1.Flags.string({ description: 'Network agent IDs JSON array' }),
|
|
55
59
|
'network-include-public': core_1.Flags.boolean({ description: 'Include public agents in network' }),
|
|
56
60
|
'character-3d-id': core_1.Flags.string({ description: '3D character ID' }),
|
|
57
|
-
'scene-background': core_1.Flags.string({ description:
|
|
61
|
+
'scene-background': core_1.Flags.string({ description: agent_visual_refs_1.SCENE_BACKGROUND_FLAG_HELP }),
|
|
58
62
|
'tone-mode': core_1.Flags.string({ description: 'Tone mode' }),
|
|
59
63
|
'tone-id': core_1.Flags.string({ description: 'Tone ID' }),
|
|
60
64
|
'tone-notes': core_1.Flags.string({ description: 'Per-agent tone notes' }),
|
|
@@ -72,6 +76,55 @@ class AgentsUpdate extends base_command_1.BaseCommand {
|
|
|
72
76
|
'hide-sequential-outputs': core_1.Flags.boolean({ description: 'Hide sequential outputs' }),
|
|
73
77
|
'is-collaborative': core_1.Flags.boolean({ description: 'Enable collaboration' }),
|
|
74
78
|
'recursion-limit': core_1.Flags.integer({ description: 'Agent recursion limit' }),
|
|
79
|
+
avatar: core_1.Flags.string({
|
|
80
|
+
description: "The agent's face, as a reference rather than a file: default, preset:<id> " +
|
|
81
|
+
'(`skrr agents avatar presets`), asset:<id> (`skrr agents avatar library`), or ' +
|
|
82
|
+
'image:<filepath>@<source>. To upload a new image use `skrr agents avatar upload`.',
|
|
83
|
+
}),
|
|
84
|
+
'conversation-starter': core_1.Flags.string({
|
|
85
|
+
description: 'Suggested opening prompt shown on the agent (repeatable; replaces the list)',
|
|
86
|
+
multiple: true,
|
|
87
|
+
}),
|
|
88
|
+
'todo-working-hours': core_1.Flags.string({
|
|
89
|
+
description: 'When this agent schedules its own work: HH:MM-HH:MM[@<IANA timezone>], e.g. ' +
|
|
90
|
+
'09:00-18:00@America/Los_Angeles',
|
|
91
|
+
}),
|
|
92
|
+
'reasoning-tool-escape': core_1.Flags.string({
|
|
93
|
+
description: 'Tool a reasoning-only turn may still use (repeatable; replaces the list). ' +
|
|
94
|
+
'These are ESCAPES, not a fenced tool surface.',
|
|
95
|
+
options: [...agent_config_1.REASONING_TOOL_ESCAPES],
|
|
96
|
+
multiple: true,
|
|
97
|
+
}),
|
|
98
|
+
'commitment-responsibility': core_1.Flags.string({
|
|
99
|
+
description: "Default work authority for this agent's commitments",
|
|
100
|
+
options: [...agent_config_1.COMMITMENT_RESPONSIBILITY_LEVELS],
|
|
101
|
+
}),
|
|
102
|
+
'commitment-responsibility-ceiling': core_1.Flags.string({
|
|
103
|
+
description: 'Ceiling a commitment may not exceed, whatever it asks for',
|
|
104
|
+
options: [...agent_config_1.COMMITMENT_RESPONSIBILITY_LEVELS],
|
|
105
|
+
}),
|
|
106
|
+
'max-turns': core_1.Flags.integer({ description: 'Maximum turns in one agent run (1-500)' }),
|
|
107
|
+
'tool-resources': core_1.Flags.string({
|
|
108
|
+
description: 'Tool resources JSON object (file_search / context / image_edit bindings)',
|
|
109
|
+
}),
|
|
110
|
+
'install-channel': core_1.Flags.string({
|
|
111
|
+
description: 'Release policy: which channel installs of this agent follow',
|
|
112
|
+
options: [...agent_config_1.RELEASE_INSTALL_CHANNELS],
|
|
113
|
+
}),
|
|
114
|
+
'auto-minor-updates': core_1.Flags.boolean({
|
|
115
|
+
description: 'Release policy: allow installs to take minor updates automatically',
|
|
116
|
+
allowNo: true,
|
|
117
|
+
}),
|
|
118
|
+
'project-id': core_1.Flags.string({
|
|
119
|
+
description: 'Prompt-store project to add this agent to (repeatable): a 24-character ObjectId — in ' +
|
|
120
|
+
'practice the instance-wide project that shares an agent with everyone, which needs the ' +
|
|
121
|
+
'SHARED_GLOBAL permission. Not a Space project id (`skrr projects`).',
|
|
122
|
+
multiple: true,
|
|
123
|
+
}),
|
|
124
|
+
'remove-project-id': core_1.Flags.string({
|
|
125
|
+
description: 'Prompt-store project to detach this agent from (repeatable)',
|
|
126
|
+
multiple: true,
|
|
127
|
+
}),
|
|
75
128
|
};
|
|
76
129
|
async run() {
|
|
77
130
|
this.requireAuth();
|
|
@@ -107,7 +160,16 @@ class AgentsUpdate extends base_command_1.BaseCommand {
|
|
|
107
160
|
workingDirectory: flags['working-directory'],
|
|
108
161
|
defaultPermissionMode: flags['default-permission-mode'],
|
|
109
162
|
});
|
|
110
|
-
|
|
163
|
+
// `mergeAgentConfigFlags` parses the typed flags (avatar, scene background,
|
|
164
|
+
// working hours, every JSON flag). A parse failure is the caller's input, so
|
|
165
|
+
// it is reported as a CLI error with the accepted forms — not as an unhandled
|
|
166
|
+
// throw, and not as a 400 from the server naming a zod path.
|
|
167
|
+
try {
|
|
168
|
+
payload = (0, agent_config_1.mergeAgentConfigFlags)(payload, flags);
|
|
169
|
+
}
|
|
170
|
+
catch (err) {
|
|
171
|
+
this.error(err.message, { exit: 1 });
|
|
172
|
+
}
|
|
111
173
|
if (Object.keys(payload).length === 0) {
|
|
112
174
|
this.error('Nothing to update. Pass at least one flag (e.g. --name) or --from-json.', {
|
|
113
175
|
exit: 1,
|
|
@@ -123,6 +185,15 @@ class AgentsUpdate extends base_command_1.BaseCommand {
|
|
|
123
185
|
catch (err) {
|
|
124
186
|
this.handleApiError(err);
|
|
125
187
|
}
|
|
188
|
+
// The same check `agents create` makes. Without it, a key the server does
|
|
189
|
+
// not model — or a typo of one that it does, `max_turns` for `maxTurns` —
|
|
190
|
+
// was discarded with the same "Updated agent" line as a real change.
|
|
191
|
+
// `removeProjectIds` is an instruction, not a stored field, so it never
|
|
192
|
+
// comes back and is not reported.
|
|
193
|
+
const unapplied = (0, create_1.unappliedPayloadKeys)(payload, updated, ['removeProjectIds']);
|
|
194
|
+
if (unapplied.length > 0) {
|
|
195
|
+
this.warn(`The server did not keep ${unapplied.join(', ')} — ${unapplied.length === 1 ? 'that field is' : 'those fields are'} not part of the agent. Check \`skrr agents show <id> --json\` for the field names it stores.`);
|
|
196
|
+
}
|
|
126
197
|
if (flags.json) {
|
|
127
198
|
this.log(JSON.stringify((0, web_url_1.withAgentUrl)(this.cliConfig.baseURL, updated), null, 2));
|
|
128
199
|
return;
|
|
@@ -2,7 +2,7 @@ import { Command } from '@oclif/core';
|
|
|
2
2
|
/**
|
|
3
3
|
* `skrr code skrr-agent` — read and write the agent a managed session runs as.
|
|
4
4
|
*
|
|
5
|
-
* ── Why the name carries
|
|
5
|
+
* ── Why the name carries a product prefix ─────────────────────────────────
|
|
6
6
|
*
|
|
7
7
|
* The engine owns `agent`: the engine binary's `agent` is its own agent-management command.
|
|
8
8
|
* `skrr code` forwards argv VERBATIM, and oclif's spaced-topic dispatch collates
|
|
@@ -28,8 +28,8 @@ import { Command } from '@oclif/core';
|
|
|
28
28
|
* API through `apiFetch`, not the `dataService` adapter `BaseCommand.init`
|
|
29
29
|
* installs.
|
|
30
30
|
*/
|
|
31
|
-
export default class
|
|
32
|
-
static
|
|
31
|
+
export default class CodeSkrrAgent extends Command {
|
|
32
|
+
static hiddenAliases: string[];
|
|
33
33
|
static description: string;
|
|
34
34
|
static examples: string[];
|
|
35
35
|
static flags: {
|
|
@@ -9,7 +9,7 @@ const first_party_harness_managed_1 = require("../../lib/first-party-harness-man
|
|
|
9
9
|
/**
|
|
10
10
|
* `skrr code skrr-agent` — read and write the agent a managed session runs as.
|
|
11
11
|
*
|
|
12
|
-
* ── Why the name carries
|
|
12
|
+
* ── Why the name carries a product prefix ─────────────────────────────────
|
|
13
13
|
*
|
|
14
14
|
* The engine owns `agent`: the engine binary's `agent` is its own agent-management command.
|
|
15
15
|
* `skrr code` forwards argv VERBATIM, and oclif's spaced-topic dispatch collates
|
|
@@ -35,11 +35,14 @@ const first_party_harness_managed_1 = require("../../lib/first-party-harness-man
|
|
|
35
35
|
* API through `apiFetch`, not the `dataService` adapter `BaseCommand.init`
|
|
36
36
|
* installs.
|
|
37
37
|
*/
|
|
38
|
-
class
|
|
39
|
-
// `skrr code skrr-agent` is the
|
|
40
|
-
//
|
|
41
|
-
//
|
|
42
|
-
|
|
38
|
+
class CodeSkrrAgent extends core_1.Command {
|
|
39
|
+
// `skrr code skrr-agent` is the name (docs/product/skrr-naming-map.md). The
|
|
40
|
+
// file used to be `oversky-agent.ts`, and oclif names a command after its
|
|
41
|
+
// file, so help, `skrr commands` and `skrr usage` taught the retired spelling
|
|
42
|
+
// while every remedy taught this one, and each help page showed the name you
|
|
43
|
+
// typed as its own alias (OSK-9396). The old spelling stays reachable for
|
|
44
|
+
// scripts and muscle memory, and hidden, as the naming map records.
|
|
45
|
+
static hiddenAliases = ['code:oversky-agent'];
|
|
43
46
|
static description = `Show or set the skrr agent a managed ${auth_core_1.FIRST_PARTY_HARNESS.displayName} session is attributed to`;
|
|
44
47
|
static examples = [
|
|
45
48
|
'<%= config.bin %> code skrr-agent',
|
|
@@ -68,7 +71,7 @@ class CodeOverskyAgent extends core_1.Command {
|
|
|
68
71
|
json: core_1.Flags.boolean({ description: 'Emit the result as JSON' }),
|
|
69
72
|
};
|
|
70
73
|
async run() {
|
|
71
|
-
const { flags } = await this.parse(
|
|
74
|
+
const { flags } = await this.parse(CodeSkrrAgent);
|
|
72
75
|
// Every branch except `--clear` reads `/api/agents`, and this command extends
|
|
73
76
|
// `Command` rather than `BaseCommand` — so nothing has resolved the stored
|
|
74
77
|
// credential for `apiFetch` yet. Without this a signed-in user gets a bare
|
|
@@ -184,7 +187,7 @@ class CodeOverskyAgent extends core_1.Command {
|
|
|
184
187
|
throw err;
|
|
185
188
|
}
|
|
186
189
|
}
|
|
187
|
-
exports.default =
|
|
190
|
+
exports.default = CodeSkrrAgent;
|
|
188
191
|
function summarize(agent) {
|
|
189
192
|
return { id: agent.id, name: agent.name ?? null, source: agent.source };
|
|
190
193
|
}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import { BaseCommand } from '../../base-command';
|
|
2
|
+
/**
|
|
3
|
+
* The lines `skrr convos messages` prints for one message row.
|
|
4
|
+
*
|
|
5
|
+
* A failed turn used to print as its text and nothing else — usually empty,
|
|
6
|
+
* which reads as an agent that replied with whitespace, while `error: true` and
|
|
7
|
+
* the reason sat on the row being printed. It is now marked, and its reason is
|
|
8
|
+
* printed where the answer would be (OSK-9468). The reason is read through
|
|
9
|
+
* `resolveMessageFailure`, the one reader every surface shares; a legacy error
|
|
10
|
+
* row's text IS that reason, so only the answer is printed as the body.
|
|
11
|
+
*/
|
|
12
|
+
export declare function formatMessageLines(m: Record<string, unknown>, options?: {
|
|
13
|
+
metadata?: boolean;
|
|
14
|
+
}): string[];
|
|
2
15
|
/**
|
|
3
16
|
* `skrr convos messages` — read a conversation's transcript.
|
|
4
17
|
*
|
|
@@ -1,9 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatMessageLines = formatMessageLines;
|
|
3
4
|
const core_1 = require("@oclif/core");
|
|
4
5
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
6
|
const base_command_1 = require("../../base-command");
|
|
6
7
|
const message_content_1 = require("../../lib/message-content");
|
|
8
|
+
/**
|
|
9
|
+
* The lines `skrr convos messages` prints for one message row.
|
|
10
|
+
*
|
|
11
|
+
* A failed turn used to print as its text and nothing else — usually empty,
|
|
12
|
+
* which reads as an agent that replied with whitespace, while `error: true` and
|
|
13
|
+
* the reason sat on the row being printed. It is now marked, and its reason is
|
|
14
|
+
* printed where the answer would be (OSK-9468). The reason is read through
|
|
15
|
+
* `resolveMessageFailure`, the one reader every surface shares; a legacy error
|
|
16
|
+
* row's text IS that reason, so only the answer is printed as the body.
|
|
17
|
+
*/
|
|
18
|
+
function formatMessageLines(m, options = {}) {
|
|
19
|
+
const who = m.isCreatedByUser ? 'user' : String(m.sender ?? 'assistant');
|
|
20
|
+
const when = m.createdAt ? new Date(String(m.createdAt)).toISOString() : '';
|
|
21
|
+
const failure = (0, data_provider_1.resolveMessageFailure)(m);
|
|
22
|
+
// Render each assistant text part as its own block so a tool-paused turn
|
|
23
|
+
// reads as separate paragraphs instead of one glued run-on line
|
|
24
|
+
// (OSK-4911). Whitespace is collapsed WITHIN a block for compactness; the
|
|
25
|
+
// blank line BETWEEN blocks is what the flattened `text` field dropped.
|
|
26
|
+
const body = (0, message_content_1.messageTextBlocks)(failure ? { ...m, text: failure.answer } : m)
|
|
27
|
+
.map((block) => block.replace(/\s+/g, ' ').trim())
|
|
28
|
+
.join('\n\n');
|
|
29
|
+
const clipped = body.length > 300 ? `${body.slice(0, 300)}…` : body;
|
|
30
|
+
const lines = [`${when} ${who}${failure ? ' [failed]' : ''}`];
|
|
31
|
+
if (clipped || !failure) {
|
|
32
|
+
for (const line of clipped.split('\n')) {
|
|
33
|
+
lines.push(` ${line}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (failure) {
|
|
37
|
+
const reason = failure.reason?.replace(/\s+/g, ' ').trim();
|
|
38
|
+
lines.push(` failed: ${reason || 'no reason was recorded on the message'}`);
|
|
39
|
+
}
|
|
40
|
+
if (options.metadata && m.metadata && Object.keys(m.metadata).length > 0) {
|
|
41
|
+
lines.push(` metadata: ${JSON.stringify(m.metadata)}`);
|
|
42
|
+
}
|
|
43
|
+
return lines;
|
|
44
|
+
}
|
|
7
45
|
/**
|
|
8
46
|
* `skrr convos messages` — read a conversation's transcript.
|
|
9
47
|
*
|
|
@@ -70,22 +108,8 @@ class ConvosMessages extends base_command_1.BaseCommand {
|
|
|
70
108
|
return;
|
|
71
109
|
}
|
|
72
110
|
for (const m of messages) {
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
// Render each assistant text part as its own block so a tool-paused turn
|
|
76
|
-
// reads as separate paragraphs instead of one glued run-on line
|
|
77
|
-
// (OSK-4911). Whitespace is collapsed WITHIN a block for compactness; the
|
|
78
|
-
// blank line BETWEEN blocks is what the flattened `text` field dropped.
|
|
79
|
-
const body = (0, message_content_1.messageTextBlocks)(m)
|
|
80
|
-
.map((block) => block.replace(/\s+/g, ' ').trim())
|
|
81
|
-
.join('\n\n');
|
|
82
|
-
const clipped = body.length > 300 ? `${body.slice(0, 300)}…` : body;
|
|
83
|
-
this.log(`${when} ${who}`);
|
|
84
|
-
for (const line of clipped.split('\n')) {
|
|
85
|
-
this.log(` ${line}`);
|
|
86
|
-
}
|
|
87
|
-
if (flags.metadata && m.metadata && Object.keys(m.metadata).length > 0) {
|
|
88
|
-
this.log(` metadata: ${JSON.stringify(m.metadata)}`);
|
|
111
|
+
for (const line of formatMessageLines(m, { metadata: flags.metadata })) {
|
|
112
|
+
this.log(line);
|
|
89
113
|
}
|
|
90
114
|
}
|
|
91
115
|
this.log(`\n${messages.length} message(s)`);
|
|
@@ -13,7 +13,14 @@ class Daemon extends core_1.Command {
|
|
|
13
13
|
// "Wraps the `skrrd` binary" read, cold, as though you must already HAVE one —
|
|
14
14
|
// the opposite of what `skrr daemon install` does now that it fetches the
|
|
15
15
|
// signed release. Dogfooding 0.1.12 hit exactly that reading.
|
|
16
|
-
|
|
16
|
+
// "runtime" names two unrelated things in this product: the background
|
|
17
|
+
// service on the computer you are typing on, and a rented Linux VM (every
|
|
18
|
+
// Dedicated Runtime's daemon id is `dedicated-runtime-rtl_…`). This topic is
|
|
19
|
+
// always the first. A dogfood note put the cost precisely: when `daemon
|
|
20
|
+
// status` warned about an update, the reader had to stop and work out whether
|
|
21
|
+
// it meant their laptop or one of their VMs. Naming the computer removes the
|
|
22
|
+
// hesitation without renaming a domain.
|
|
23
|
+
static description = 'Manage the skrr background service on THIS computer — install it, sign it in, and check on it. A rented Linux VM is a machine, not this: see `skrr machines`.';
|
|
17
24
|
static examples = [
|
|
18
25
|
'<%= config.bin %> daemon install',
|
|
19
26
|
'<%= config.bin %> daemon status',
|
|
@@ -24,6 +24,32 @@ export interface DaemonLogsFlags {
|
|
|
24
24
|
* constrained to the same profile grammar instead of trusting a lock file as
|
|
25
25
|
* an arbitrary path component.
|
|
26
26
|
*/
|
|
27
|
+
/**
|
|
28
|
+
* How old the log is, said out loud before any of it is printed.
|
|
29
|
+
*
|
|
30
|
+
* A log file is the one surface whose CONTENT looks equally plausible whether
|
|
31
|
+
* it is live or nine days dead — every line is well-formed and timestamped, and
|
|
32
|
+
* the timestamps are only wrong if you happen to read them. Observed on this
|
|
33
|
+
* machine: a daemon running since 06:20 today, launched with
|
|
34
|
+
* `--log-file ~/Library/Logs/OverSky/daemon.app.log` whose parent directory did
|
|
35
|
+
* not exist, so it wrote nothing; `skrr daemon logs` then served
|
|
36
|
+
* `~/.skrr/profiles/default/logs/daemon.log`, last written nine days earlier,
|
|
37
|
+
* with no marker. The top line read `[2026-09-08 02:55:24]` and nothing said
|
|
38
|
+
* that was not today.
|
|
39
|
+
*
|
|
40
|
+
* The daemon's own logger now creates its directory and reports a failed open
|
|
41
|
+
* (its comment cites OSK-7737/OSK-7699), and `daemon status` learned to say the
|
|
42
|
+
* file predates the running daemon. `daemon logs` — the command you actually
|
|
43
|
+
* reach for — never did.
|
|
44
|
+
*
|
|
45
|
+
* Stated as a FACT first and a warning second: the age is always printed, so a
|
|
46
|
+
* fresh log confirms itself, and no threshold has to be right for the reader to
|
|
47
|
+
* be correctly informed. The warning only adds a next step.
|
|
48
|
+
*/
|
|
49
|
+
export declare function describeLogAge(mtimeMs: number, now?: number): {
|
|
50
|
+
line: string;
|
|
51
|
+
stale: boolean;
|
|
52
|
+
};
|
|
27
53
|
export declare function resolveLegacyDaemonLogPath(flags: Pick<DaemonLogsFlags, 'stderr'>, options?: {
|
|
28
54
|
home?: string;
|
|
29
55
|
env?: NodeJS.ProcessEnv;
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.describeLogAge = describeLogAge;
|
|
6
7
|
exports.resolveLegacyDaemonLogPath = resolveLegacyDaemonLogPath;
|
|
7
8
|
exports.readDaemonLogTail = readDaemonLogTail;
|
|
8
9
|
exports.buildOverskyLogsArgs = buildOverskyLogsArgs;
|
|
@@ -19,6 +20,47 @@ const PROFILE_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;
|
|
|
19
20
|
* constrained to the same profile grammar instead of trusting a lock file as
|
|
20
21
|
* an arbitrary path component.
|
|
21
22
|
*/
|
|
23
|
+
/**
|
|
24
|
+
* How old the log is, said out loud before any of it is printed.
|
|
25
|
+
*
|
|
26
|
+
* A log file is the one surface whose CONTENT looks equally plausible whether
|
|
27
|
+
* it is live or nine days dead — every line is well-formed and timestamped, and
|
|
28
|
+
* the timestamps are only wrong if you happen to read them. Observed on this
|
|
29
|
+
* machine: a daemon running since 06:20 today, launched with
|
|
30
|
+
* `--log-file ~/Library/Logs/OverSky/daemon.app.log` whose parent directory did
|
|
31
|
+
* not exist, so it wrote nothing; `skrr daemon logs` then served
|
|
32
|
+
* `~/.skrr/profiles/default/logs/daemon.log`, last written nine days earlier,
|
|
33
|
+
* with no marker. The top line read `[2026-09-08 02:55:24]` and nothing said
|
|
34
|
+
* that was not today.
|
|
35
|
+
*
|
|
36
|
+
* The daemon's own logger now creates its directory and reports a failed open
|
|
37
|
+
* (its comment cites OSK-7737/OSK-7699), and `daemon status` learned to say the
|
|
38
|
+
* file predates the running daemon. `daemon logs` — the command you actually
|
|
39
|
+
* reach for — never did.
|
|
40
|
+
*
|
|
41
|
+
* Stated as a FACT first and a warning second: the age is always printed, so a
|
|
42
|
+
* fresh log confirms itself, and no threshold has to be right for the reader to
|
|
43
|
+
* be correctly informed. The warning only adds a next step.
|
|
44
|
+
*/
|
|
45
|
+
function describeLogAge(mtimeMs, now = Date.now()) {
|
|
46
|
+
const ageMs = Math.max(0, now - mtimeMs);
|
|
47
|
+
const minutes = Math.floor(ageMs / 60_000);
|
|
48
|
+
const human = minutes < 1
|
|
49
|
+
? 'less than a minute ago'
|
|
50
|
+
: minutes < 60
|
|
51
|
+
? `${minutes} minute${minutes === 1 ? '' : 's'} ago`
|
|
52
|
+
: minutes < 60 * 24
|
|
53
|
+
? `${Math.floor(minutes / 60)} hour${Math.floor(minutes / 60) === 1 ? '' : 's'} ago`
|
|
54
|
+
: `${Math.floor(minutes / (60 * 24))} day${Math.floor(minutes / (60 * 24)) === 1 ? '' : 's'} ago`;
|
|
55
|
+
const stamp = new Date(mtimeMs).toISOString().slice(0, 19).replace('T', ' ');
|
|
56
|
+
const stale = ageMs > 60 * 60_000;
|
|
57
|
+
return {
|
|
58
|
+
line: stale
|
|
59
|
+
? `Log last written ${stamp}Z — ${human}. If your daemon is running it is not writing here; check \`skrr daemon status\` for the path it was started with.`
|
|
60
|
+
: `Log last written ${stamp}Z — ${human}.`,
|
|
61
|
+
stale,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
22
64
|
function resolveLegacyDaemonLogPath(flags, options = {}) {
|
|
23
65
|
const home = options.home ?? (0, node_os_1.homedir)();
|
|
24
66
|
const env = options.env ?? process.env;
|
|
@@ -118,6 +160,20 @@ class DaemonLogs extends core_1.Command {
|
|
|
118
160
|
async run() {
|
|
119
161
|
const { flags } = await this.parse(DaemonLogs);
|
|
120
162
|
const args = buildOverskyLogsArgs(flags);
|
|
163
|
+
// Before ANY log content, on stderr so it never pollutes a pipe. `--path`
|
|
164
|
+
// is exempt: its whole contract is one path on stdout.
|
|
165
|
+
if (!flags.path) {
|
|
166
|
+
try {
|
|
167
|
+
const candidate = resolveLegacyDaemonLogPath(flags);
|
|
168
|
+
if ((0, node_fs_1.existsSync)(candidate)) {
|
|
169
|
+
const { line } = describeLogAge((0, node_fs_1.statSync)(candidate).mtimeMs);
|
|
170
|
+
this.logToStderr(line);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
// Never let the banner stop the logs from being shown.
|
|
175
|
+
}
|
|
176
|
+
}
|
|
121
177
|
try {
|
|
122
178
|
// `oversky 0.2.x` has profiles and writes the same files, but has no
|
|
123
179
|
// `logs` subcommand. Probe top-level help first so forwarding does not
|
|
@@ -19,7 +19,7 @@ class DaemonUninstall extends core_1.Command {
|
|
|
19
19
|
// whole topic, and without a per-command alias only the bare topic
|
|
20
20
|
// resolved: every subcommand under it failed.
|
|
21
21
|
static aliases = ['daemons:uninstall'];
|
|
22
|
-
static summary =
|
|
22
|
+
static summary = 'Remove the skrr background service from THIS computer (local state is left alone; a rented VM is a machine, see `skrr machines`)';
|
|
23
23
|
static description = (0, exec_runtime_binary_1.forwardedFlagsNote)('uninstall');
|
|
24
24
|
static strict = false; // forward all args verbatim — see run()
|
|
25
25
|
async run() {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
/**
|
|
3
|
+
* `skrr followups act` — an `act` follow-up: a typed built-in action at a
|
|
4
|
+
* time, for an action already exactly known and already agreed to.
|
|
5
|
+
*/
|
|
6
|
+
export default class FollowupsAct extends BaseCommand {
|
|
7
|
+
static description: string;
|
|
8
|
+
static examples: string[];
|
|
9
|
+
static flags: {
|
|
10
|
+
subject: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
why: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
action: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
at: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
in: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
agent: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
endpoint: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
'endpoint-target': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
pin: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
};
|
|
21
|
+
run(): Promise<void>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
|
+
const base_command_1 = require("../../base-command");
|
|
6
|
+
const followups_1 = require("../../lib/followups");
|
|
7
|
+
const agent_resolver_1 = require("../../lib/agent-resolver");
|
|
8
|
+
const triggers_1 = require("../../lib/triggers");
|
|
9
|
+
/**
|
|
10
|
+
* `skrr followups act` — an `act` follow-up: a typed built-in action at a
|
|
11
|
+
* time, for an action already exactly known and already agreed to.
|
|
12
|
+
*/
|
|
13
|
+
class FollowupsAct extends base_command_1.BaseCommand {
|
|
14
|
+
static description = 'Run an agreed action at a time — the act follow-up';
|
|
15
|
+
static examples = [
|
|
16
|
+
'<%= config.bin %> followups act --subject task:OSK-42 --why "user approved the merge" --action \'{"builtinType":"task_mark_done","config":{"taskId":"OSK-42"}}\' --at 2026-09-20T09:00:00Z',
|
|
17
|
+
];
|
|
18
|
+
static flags = {
|
|
19
|
+
subject: core_1.Flags.string({ description: 'Subject ref: type:externalKey', required: true }),
|
|
20
|
+
why: core_1.Flags.string({ description: 'Why this wake exists, in one line', required: true }),
|
|
21
|
+
action: core_1.Flags.string({
|
|
22
|
+
description: `Action payload JSON: {"builtinType": "...", "config": {...}, "refId?": "..."}. builtinType is one of: ${data_provider_1.BUILTIN_ACTION_TYPES.join(', ')}`,
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
at: core_1.Flags.string({ description: 'ISO-8601 instant to act at', exclusive: ['in'] }),
|
|
26
|
+
in: core_1.Flags.string({ description: 'Duration from now (2h, 3d)', exclusive: ['at'] }),
|
|
27
|
+
agent: core_1.Flags.string({ description: 'Agent ID (default: bound session agent)' }),
|
|
28
|
+
endpoint: core_1.Flags.string({ description: 'Delivery endpoint id (EndpointRegistry)' }),
|
|
29
|
+
'endpoint-target': core_1.Flags.string({ description: 'Channel target for channel endpoints' }),
|
|
30
|
+
pin: core_1.Flags.string({ description: 'Conversation id the act was authored in' }),
|
|
31
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
32
|
+
};
|
|
33
|
+
async run() {
|
|
34
|
+
this.requireAuth();
|
|
35
|
+
const { flags } = await this.parse(FollowupsAct);
|
|
36
|
+
const at = flags.at ?? flags.in;
|
|
37
|
+
if (!at) {
|
|
38
|
+
this.failWithCliError({
|
|
39
|
+
message: 'Either --at <iso> or --in <duration> is required.',
|
|
40
|
+
code: 'FOLLOWUP_KIND_FIELD_MISSING',
|
|
41
|
+
exit: 2,
|
|
42
|
+
retryable: false,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
const action = (0, triggers_1.parseJsonObject)(flags.action, '--action');
|
|
46
|
+
if (typeof action?.builtinType !== 'string' || !action.builtinType) {
|
|
47
|
+
this.failWithCliError({
|
|
48
|
+
message: '--action needs a builtinType: {"builtinType": "...", "config": {...}}.',
|
|
49
|
+
code: 'FOLLOWUP_KIND_FIELD_MISSING',
|
|
50
|
+
exit: 2,
|
|
51
|
+
retryable: false,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
let agent;
|
|
55
|
+
try {
|
|
56
|
+
agent = (0, followups_1.resolveFollowUpAgent)(flags.agent);
|
|
57
|
+
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
const failure = (0, agent_resolver_1.agentResolutionFailure)(err);
|
|
60
|
+
this.failWithCliError({
|
|
61
|
+
message: failure.message,
|
|
62
|
+
code: failure.code,
|
|
63
|
+
exit: 2,
|
|
64
|
+
retryable: false,
|
|
65
|
+
details: { suggestion: failure.suggestion, context: failure.details },
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
let response;
|
|
69
|
+
try {
|
|
70
|
+
response = await followups_1.followupsApi.create({
|
|
71
|
+
kind: 'act',
|
|
72
|
+
producer: agent.boundToSession ? 'agent_in_turn' : 'user_explicit',
|
|
73
|
+
agentId: agent.id,
|
|
74
|
+
subject: (0, followups_1.parseSubjectRef)(flags.subject),
|
|
75
|
+
why: flags.why,
|
|
76
|
+
action,
|
|
77
|
+
at,
|
|
78
|
+
...(flags.endpoint ? { endpointId: flags.endpoint } : {}),
|
|
79
|
+
...(flags['endpoint-target'] ? { endpointTarget: flags['endpoint-target'] } : {}),
|
|
80
|
+
...(flags.pin ? { pinnedConversationId: flags.pin } : {}),
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
catch (err) {
|
|
84
|
+
this.handleApiError(err);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (flags.json) {
|
|
88
|
+
this.log(JSON.stringify(response, null, 2));
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const row = response.followup;
|
|
92
|
+
if (response.reused) {
|
|
93
|
+
this.log(`Already armed: ${row?.id} — the same act exists and was not duplicated.`);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (response.dropped) {
|
|
97
|
+
this.log('Dropped by the daily act budget — no act was armed.');
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
this.log(`Act armed: ${row?.id} at ${row?.nextRunAt ?? at}.`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.default = FollowupsAct;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
/**
|
|
3
|
+
* `skrr followups cancel <id>` — "never mind". It records exactly what
|
|
4
|
+
* `resolve --outcome abandoned` records (terminal `abandoned`, the reason as
|
|
5
|
+
* the note); it exists so calling one off does not require knowing the
|
|
6
|
+
* terminal vocabulary. Neither help text used to say so, and a user had to
|
|
7
|
+
* read the service to choose between them (OSK-9679).
|
|
8
|
+
*/
|
|
9
|
+
export default class FollowupsCancel extends BaseCommand {
|
|
10
|
+
static description: string;
|
|
11
|
+
static examples: string[];
|
|
12
|
+
static args: {
|
|
13
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
14
|
+
};
|
|
15
|
+
static flags: {
|
|
16
|
+
reason: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
};
|
|
19
|
+
run(): Promise<void>;
|
|
20
|
+
}
|