@skrr-ai/cli 0.1.92 → 0.1.94
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 +44 -0
- package/dist/base-command.js +96 -0
- package/dist/commands/agents/badge.d.ts +41 -0
- package/dist/commands/agents/badge.js +158 -0
- package/dist/commands/agents/create.d.ts +24 -0
- package/dist/commands/agents/create.js +212 -0
- package/dist/commands/agents/embed.d.ts +20 -0
- package/dist/commands/agents/embed.js +61 -0
- package/dist/commands/agents/operating-plan.d.ts +11 -0
- package/dist/commands/agents/operating-plan.js +54 -0
- package/dist/commands/agents/roles/example.d.ts +11 -0
- package/dist/commands/agents/roles/example.js +30 -0
- package/dist/commands/{commitments/mode.d.ts → agents/roles/export.d.ts} +5 -5
- package/dist/commands/agents/roles/export.js +81 -0
- package/dist/commands/agents/roles/install.d.ts +12 -0
- package/dist/commands/agents/roles/install.js +48 -0
- package/dist/commands/agents/roles/list.d.ts +11 -0
- package/dist/commands/agents/roles/list.js +36 -0
- package/dist/commands/agents/roles/preview.d.ts +14 -0
- package/dist/commands/agents/roles/preview.js +49 -0
- package/dist/commands/agents/roles/withdraw.d.ts +13 -0
- package/dist/commands/agents/roles/withdraw.js +43 -0
- package/dist/commands/agents/share.d.ts +27 -0
- package/dist/commands/agents/share.js +100 -0
- package/dist/commands/agents/vanity.d.ts +21 -0
- package/dist/commands/agents/vanity.js +77 -0
- package/dist/commands/agents/visibility.d.ts +21 -1
- package/dist/commands/agents/visibility.js +112 -0
- package/dist/commands/commands.d.ts +1 -0
- package/dist/commands/commands.js +22 -9
- package/dist/commands/commitments/{autonomy-requests → cadence-requests}/decide.d.ts +5 -7
- package/dist/commands/commitments/{autonomy-requests → cadence-requests}/decide.js +13 -15
- package/dist/commands/commitments/cost.d.ts +1 -1
- package/dist/commands/commitments/cost.js +1 -1
- package/dist/commands/commitments/create.d.ts +0 -7
- package/dist/commands/commitments/create.js +9 -98
- package/dist/commands/commitments/delivery.js +3 -21
- package/dist/commands/commitments/doctor.js +28 -27
- package/dist/commands/commitments/effective-policy.js +5 -36
- package/dist/commands/commitments/evaluations.d.ts +15 -0
- package/dist/commands/commitments/evaluations.js +54 -0
- package/dist/commands/commitments/pack/activate.d.ts +11 -0
- package/dist/commands/commitments/pack/activate.js +22 -0
- package/dist/commands/commitments/pack/bind.js +1 -1
- package/dist/commands/commitments/remediate.js +2 -5
- package/dist/commands/commitments/show.js +1 -1
- package/dist/commands/commitments/update.js +9 -9
- package/dist/commands/commitments/wake-capabilities.d.ts +1 -3
- package/dist/commands/commitments/wake-capabilities.js +5 -21
- package/dist/commands/earnings/attributions.d.ts +17 -0
- package/dist/commands/earnings/attributions.js +82 -0
- package/dist/commands/earnings/index.js +2 -1
- package/dist/commands/generate-recovery-code.js +4 -3
- package/dist/commands/github/allow-tools.d.ts +1 -0
- package/dist/commands/github/app/install.d.ts +1 -0
- package/dist/commands/github/app/status.d.ts +1 -0
- package/dist/commands/github/connect.d.ts +1 -0
- package/dist/commands/github/connections.d.ts +1 -0
- package/dist/commands/github/disconnect.d.ts +1 -0
- package/dist/commands/github/finalize.d.ts +1 -0
- package/dist/commands/github/reconnect.d.ts +1 -0
- package/dist/commands/github/run.d.ts +1 -0
- package/dist/commands/github/tools.d.ts +1 -0
- package/dist/commands/integrations/connections/connect.d.ts +1 -0
- package/dist/commands/integrations/connections/disconnect.d.ts +1 -0
- package/dist/commands/integrations/connections/finalize.d.ts +1 -0
- package/dist/commands/integrations/connections/list.d.ts +1 -0
- package/dist/commands/integrations/connections/reconnect.d.ts +1 -0
- package/dist/commands/integrations/execute.d.ts +1 -0
- package/dist/commands/integrations/search.d.ts +1 -0
- package/dist/commands/integrations/toolkits.d.ts +1 -0
- package/dist/commands/integrations/tools/allow.d.ts +1 -0
- package/dist/commands/integrations/tools/list.d.ts +1 -0
- package/dist/commands/login.js +12 -0
- package/dist/commands/machines/dedicated/logs.d.ts +19 -0
- package/dist/commands/machines/dedicated/logs.js +103 -0
- package/dist/commands/machines/dedicated/power/set.js +1 -1
- package/dist/commands/open.d.ts +24 -0
- package/dist/commands/open.js +74 -0
- package/dist/commands/projects/archive.d.ts +1 -0
- package/dist/commands/projects/archive.js +23 -0
- package/dist/commands/projects/delete.d.ts +1 -0
- package/dist/commands/projects/delete.js +23 -0
- package/dist/commands/projects/list.d.ts +3 -0
- package/dist/commands/projects/list.js +12 -2
- package/dist/commands/spaces/actions/add.js +4 -3
- package/dist/commands/spaces/actions/available.js +3 -2
- package/dist/commands/spaces/actions/list.js +5 -4
- package/dist/commands/spaces/actions/replace.js +6 -5
- package/dist/commands/spaces/archive.js +3 -2
- package/dist/commands/spaces/auto-executor/preview.js +4 -3
- package/dist/commands/spaces/auto-executor/run.js +4 -3
- package/dist/commands/spaces/auto-executor/runs.js +3 -2
- package/dist/commands/spaces/auto-executor/update.js +4 -3
- package/dist/commands/spaces/bootstrap.js +3 -2
- package/dist/commands/spaces/briefs/delete.js +3 -2
- package/dist/commands/spaces/briefs/get.js +3 -2
- package/dist/commands/spaces/briefs/list.js +3 -2
- package/dist/commands/spaces/briefs/set.js +5 -4
- package/dist/commands/spaces/capacity.js +5 -4
- package/dist/commands/spaces/conversations.js +3 -2
- package/dist/commands/spaces/cycles/create.js +3 -2
- package/dist/commands/spaces/cycles/graph.js +2 -1
- package/dist/commands/spaces/cycles/list.js +3 -2
- package/dist/commands/spaces/cycles/settings.js +4 -3
- package/dist/commands/spaces/cycles/show.js +3 -2
- package/dist/commands/spaces/cycles/update.js +3 -2
- package/dist/commands/spaces/delete.js +4 -3
- package/dist/commands/spaces/expertise-suggestions.js +4 -3
- package/dist/commands/spaces/files/delete.js +3 -2
- package/dist/commands/spaces/files/folders/create.js +3 -2
- package/dist/commands/spaces/files/folders/delete.js +3 -2
- package/dist/commands/spaces/files/folders/list.js +3 -2
- package/dist/commands/spaces/files/folders/update.js +3 -2
- package/dist/commands/spaces/files/list.js +3 -2
- package/dist/commands/spaces/files/move.js +3 -2
- package/dist/commands/spaces/files/rename.js +3 -2
- package/dist/commands/spaces/files/upload.js +6 -5
- package/dist/commands/spaces/github-automations/set.js +3 -2
- package/dist/commands/spaces/github-automations/show.js +3 -2
- package/dist/commands/spaces/goals.js +2 -1
- package/dist/commands/spaces/heartbeats/create.js +4 -3
- package/dist/commands/spaces/heartbeats/delete.js +4 -3
- package/dist/commands/spaces/heartbeats/list.js +4 -3
- package/dist/commands/spaces/heartbeats/status.js +3 -2
- package/dist/commands/spaces/heartbeats/update.js +4 -3
- package/dist/commands/spaces/insights.js +5 -4
- package/dist/commands/spaces/labels/add.js +4 -3
- package/dist/commands/spaces/labels/list.js +2 -1
- package/dist/commands/spaces/labels/remove.js +4 -3
- package/dist/commands/spaces/list.d.ts +3 -0
- package/dist/commands/spaces/list.js +11 -2
- package/dist/commands/spaces/live/cards/create.js +3 -2
- package/dist/commands/spaces/live/cards/list.js +3 -2
- package/dist/commands/spaces/live/cards/reorder.js +7 -2
- package/dist/commands/spaces/live/scene.js +4 -3
- package/dist/commands/spaces/members/add.js +7 -6
- package/dist/commands/spaces/members/list.js +4 -3
- package/dist/commands/spaces/members/remove.js +7 -6
- package/dist/commands/spaces/move.js +3 -2
- package/dist/commands/spaces/pin.js +5 -4
- package/dist/commands/spaces/preferences/show.js +4 -3
- package/dist/commands/spaces/preferences/tabs.js +4 -3
- package/dist/commands/spaces/revisions.js +3 -2
- package/dist/commands/spaces/room/ensure.js +5 -4
- package/dist/commands/spaces/room/messages.js +3 -2
- package/dist/commands/spaces/room/show.js +5 -4
- package/dist/commands/spaces/skills/add.js +4 -3
- package/dist/commands/spaces/skills/list.js +3 -2
- package/dist/commands/spaces/skills/pin.js +4 -3
- package/dist/commands/spaces/skills/remove.js +4 -3
- package/dist/commands/spaces/snapshot.js +3 -2
- package/dist/commands/spaces/states/archive.js +3 -2
- package/dist/commands/spaces/states/create.js +3 -2
- package/dist/commands/spaces/states/list.js +3 -2
- package/dist/commands/spaces/states/reorder.js +2 -1
- package/dist/commands/spaces/states/update.js +3 -2
- package/dist/commands/spaces/summary.js +4 -3
- package/dist/commands/spaces/tasks.d.ts +3 -0
- package/dist/commands/spaces/tasks.js +14 -3
- package/dist/commands/spaces/triggers/delete.js +5 -4
- package/dist/commands/spaces/triggers/set.js +4 -3
- package/dist/commands/spaces/triggers/show.js +4 -3
- package/dist/commands/spaces/unarchive.js +3 -2
- package/dist/commands/spaces/update.js +5 -4
- package/dist/commands/spaces/views/create.js +3 -2
- package/dist/commands/spaces/views/list.js +3 -2
- package/dist/commands/spaces/views/reorder.js +6 -3
- package/dist/commands/spaces/views/subscribe.js +2 -1
- package/dist/commands/spaces/views/subscriptions.js +1 -0
- package/dist/commands/spaces/views/unsubscribe.js +2 -1
- package/dist/commands/spaces/widgets/add.js +4 -3
- package/dist/commands/spaces/widgets/list.js +3 -2
- package/dist/commands/spaces/widgets/remove.js +5 -4
- package/dist/commands/spaces/work-graph.js +2 -1
- package/dist/commands/store/install.d.ts +1 -1
- package/dist/commands/store/install.js +24 -8
- package/dist/commands/store/show.d.ts +25 -0
- package/dist/commands/store/show.js +203 -0
- package/dist/commands/store/stats.d.ts +33 -0
- package/dist/commands/store/stats.js +258 -0
- package/dist/commands/tasks/actions/attach.js +1 -1
- package/dist/commands/tasks/actions/detach.js +4 -3
- package/dist/commands/tasks/activity.js +3 -2
- package/dist/commands/tasks/ancestors.js +2 -1
- package/dist/commands/tasks/approvals/create.js +2 -1
- package/dist/commands/tasks/approvals/delete.js +3 -2
- package/dist/commands/tasks/approvals/list.js +5 -4
- package/dist/commands/tasks/approvals/resolve.js +2 -1
- package/dist/commands/tasks/archive.js +3 -2
- package/dist/commands/tasks/assign.js +4 -3
- package/dist/commands/tasks/attachments/delete.js +3 -2
- package/dist/commands/tasks/attachments/download.d.ts +1 -0
- package/dist/commands/tasks/attachments/download.js +20 -1
- package/dist/commands/tasks/attachments/list.js +2 -1
- package/dist/commands/tasks/attachments/set-role.js +2 -1
- package/dist/commands/tasks/attachments/upload.js +2 -1
- package/dist/commands/tasks/bulk-update.d.ts +1 -0
- package/dist/commands/tasks/bulk-update.js +106 -15
- package/dist/commands/tasks/cancel-cascade.d.ts +1 -0
- package/dist/commands/tasks/cancel-cascade.js +13 -3
- package/dist/commands/tasks/cascade-status.js +2 -1
- package/dist/commands/tasks/checkout.js +3 -2
- package/dist/commands/tasks/children.js +2 -1
- package/dist/commands/tasks/comments/add.js +7 -6
- package/dist/commands/tasks/comments/anchor.js +8 -7
- package/dist/commands/tasks/comments/delete.js +3 -2
- package/dist/commands/tasks/comments/list.js +2 -1
- package/dist/commands/tasks/comments/reopen.js +3 -2
- package/dist/commands/tasks/comments/resolve.js +3 -2
- package/dist/commands/tasks/create-tree.d.ts +63 -0
- package/dist/commands/tasks/create-tree.js +197 -4
- package/dist/commands/tasks/delete.js +5 -4
- package/dist/commands/tasks/descendants.js +2 -1
- package/dist/commands/tasks/dri-plan.js +3 -2
- package/dist/commands/tasks/dri-run.js +3 -2
- package/dist/commands/tasks/dri-status.js +2 -1
- package/dist/commands/tasks/duplicate-pipeline.js +2 -1
- package/dist/commands/tasks/execution-summary.js +2 -1
- package/dist/commands/tasks/execution-timeline.js +2 -1
- package/dist/commands/tasks/fork.js +1 -0
- package/dist/commands/tasks/forward.js +4 -3
- package/dist/commands/tasks/handover.js +1 -0
- package/dist/commands/tasks/interrupt.js +3 -2
- package/dist/commands/tasks/labels/attach.js +4 -3
- package/dist/commands/tasks/labels/detach.js +4 -3
- package/dist/commands/tasks/labels/suggest.js +5 -4
- package/dist/commands/tasks/list.d.ts +27 -1
- package/dist/commands/tasks/list.js +101 -3
- package/dist/commands/tasks/move.js +4 -3
- package/dist/commands/tasks/output.js +6 -5
- package/dist/commands/tasks/pause-schedule.js +3 -2
- package/dist/commands/tasks/promote.js +1 -0
- package/dist/commands/tasks/prompt-log.js +2 -1
- package/dist/commands/tasks/release.js +5 -4
- package/dist/commands/tasks/remind.js +2 -1
- package/dist/commands/tasks/replay.js +3 -2
- package/dist/commands/tasks/report.js +1 -0
- package/dist/commands/tasks/resume-schedule.js +3 -2
- package/dist/commands/tasks/retry-schedule.js +3 -2
- package/dist/commands/tasks/retry.js +10 -9
- package/dist/commands/tasks/revisions.js +2 -1
- package/dist/commands/tasks/runs.js +6 -5
- package/dist/commands/tasks/schedule.js +3 -2
- package/dist/commands/tasks/self-schedule.js +6 -5
- package/dist/commands/tasks/skills/pin.js +3 -2
- package/dist/commands/tasks/skills/unpin.js +3 -2
- package/dist/commands/tasks/snooze.js +6 -5
- package/dist/commands/tasks/start-all.js +5 -4
- package/dist/commands/tasks/subscribe.js +1 -0
- package/dist/commands/tasks/tags/add.js +4 -3
- package/dist/commands/tasks/tags/remove.js +4 -3
- package/dist/commands/tasks/timeline.js +3 -2
- package/dist/commands/tasks/today.d.ts +4 -1
- package/dist/commands/tasks/today.js +12 -2
- package/dist/commands/tasks/transcript.js +6 -5
- package/dist/commands/tasks/unschedule.js +3 -2
- package/dist/commands/tasks/unsnooze.js +3 -2
- package/dist/commands/tasks/unsubscribe.js +2 -1
- package/dist/commands/tasks/update.js +5 -4
- package/dist/commands/tasks/wait.js +5 -4
- package/dist/lib/agent-distribution.d.ts +37 -0
- package/dist/lib/agent-distribution.js +63 -0
- package/dist/lib/agent-ref.d.ts +69 -0
- package/dist/lib/agent-ref.js +168 -0
- package/dist/lib/api-fetch.d.ts +2 -0
- package/dist/lib/api-fetch.js +14 -3
- package/dist/lib/command-hygiene.d.ts +13 -0
- package/dist/lib/command-hygiene.js +62 -2
- package/dist/lib/commitment-product.d.ts +0 -6
- package/dist/lib/commitment-product.js +1 -30
- package/dist/lib/commitments.d.ts +9 -45
- package/dist/lib/commitments.js +24 -95
- package/dist/lib/dedicated-power.d.ts +5 -0
- package/dist/lib/dedicated-power.js +30 -2
- package/dist/lib/dry-run-plans.d.ts +50 -0
- package/dist/lib/dry-run-plans.js +85 -0
- package/dist/lib/json-output.d.ts +31 -0
- package/dist/lib/json-output.js +78 -0
- package/dist/lib/list-output.d.ts +75 -0
- package/dist/lib/list-output.js +266 -0
- package/dist/lib/machine-daemon-log.d.ts +36 -0
- package/dist/lib/machine-daemon-log.js +78 -0
- package/dist/lib/node-adapter.js +10 -1
- package/dist/lib/northstars.js +1 -1
- package/dist/lib/open-target.d.ts +12 -0
- package/dist/lib/open-target.js +108 -0
- package/dist/lib/rate-limit-retry.d.ts +45 -0
- package/dist/lib/rate-limit-retry.js +88 -0
- package/dist/lib/roles.d.ts +98 -0
- package/dist/lib/roles.js +45 -0
- package/dist/lib/store-listing.d.ts +45 -0
- package/dist/lib/store-listing.js +186 -0
- package/dist/lib/task-batch.d.ts +67 -0
- package/dist/lib/task-batch.js +227 -0
- package/dist/lib/terminal-qr.d.ts +55 -0
- package/dist/lib/terminal-qr.js +119 -0
- package/dist/lib/web-url.d.ts +11 -0
- package/dist/lib/web-url.js +24 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/commitmentExecutionContract.d.ts +45 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/commitmentExecutionContract.js +550 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.d.ts +68 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.js +47 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionPermissionAuthority.d.ts +7 -44
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionPermissionAuthority.js +8 -47
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/commitmentExecutionContract.d.ts +45 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/commitmentExecutionContract.js +545 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.d.ts +68 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.js +46 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionPermissionAuthority.d.ts +7 -44
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionPermissionAuthority.js +8 -47
- package/dist/node_modules/@skrr-ai/auth-core/package.json +11 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +7285 -6673
- package/dist/node_modules/@skrr-ai/data-provider/package.json +2 -2
- package/oclif.manifest.json +35937 -26820
- package/package.json +6 -2
- package/dist/commands/commitments/autonomy.d.ts +0 -30
- package/dist/commands/commitments/autonomy.js +0 -67
- package/dist/commands/commitments/mode.js +0 -58
- package/dist/commands/commitments/pack/promote.d.ts +0 -19
- package/dist/commands/commitments/pack/promote.js +0 -46
- package/dist/commands/commitments/pack/shadow.d.ts +0 -20
- package/dist/commands/commitments/pack/shadow.js +0 -42
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class RolesPreview extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
file: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
bindings: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
output: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const base_command_1 = require("../../../base-command");
|
|
6
|
+
const roles_1 = require("../../../lib/roles");
|
|
7
|
+
class RolesPreview extends base_command_1.BaseCommand {
|
|
8
|
+
static description = 'Validate a portable role spec and preview its Compass, responsibilities, scope, budgets and requirements';
|
|
9
|
+
static args = {
|
|
10
|
+
id: core_1.Args.string({ required: true, description: 'Agent ID', ignoreStdin: true }),
|
|
11
|
+
};
|
|
12
|
+
static flags = {
|
|
13
|
+
file: core_1.Flags.string({ required: true, description: 'Role operating spec JSON file' }),
|
|
14
|
+
bindings: core_1.Flags.string({ description: 'JSON context slot → accessible target ID map' }),
|
|
15
|
+
output: core_1.Flags.string({ description: 'Save the server preview for review and installation' }),
|
|
16
|
+
json: core_1.Flags.boolean({ description: 'Output the complete preview as JSON' }),
|
|
17
|
+
};
|
|
18
|
+
async run() {
|
|
19
|
+
this.requireAuth();
|
|
20
|
+
const { args, flags } = await this.parse(RolesPreview);
|
|
21
|
+
try {
|
|
22
|
+
const result = await roles_1.roleApi.preview(args.id, (0, roles_1.readRoleJson)(flags.file), flags.bindings ? (0, roles_1.readRoleJson)(flags.bindings) : {});
|
|
23
|
+
if (flags.output)
|
|
24
|
+
(0, node_fs_1.writeFileSync)(flags.output, `${JSON.stringify(result, null, 2)}\n`, { mode: 0o600 });
|
|
25
|
+
if (flags.json) {
|
|
26
|
+
this.log(JSON.stringify(result, null, 2));
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
this.log(`${result.spec.title} — revision ${result.spec.revision}`);
|
|
30
|
+
this.log(`Compass ${result.compass.id}: archived; expected version ${result.expectedCompassVersion}`);
|
|
31
|
+
for (const change of result.changes)
|
|
32
|
+
this.log(` ${change.title}: ${change.change}`);
|
|
33
|
+
for (const removed of result.removedResponsibilities)
|
|
34
|
+
this.log(` ${removed.key}: pause removed responsibility`);
|
|
35
|
+
for (const ctx of result.contexts)
|
|
36
|
+
this.log(` context ${ctx.label}: ${ctx.status}${ctx.title ? ` (${ctx.title})` : ''}`);
|
|
37
|
+
for (const requirement of result.pending.skills)
|
|
38
|
+
this.log(` skill requirement: ${requirement.id}@${requirement.version}`);
|
|
39
|
+
for (const warning of result.warnings)
|
|
40
|
+
this.log(warning);
|
|
41
|
+
if (flags.output)
|
|
42
|
+
this.log(`Reviewed preview saved to ${flags.output}. Install with agents roles install ${args.id} --preview ${flags.output}.`);
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
this.handleApiError(error);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.default = RolesPreview;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class RolesWithdraw extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
key: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
'expected-version': import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 roles_1 = require("../../../lib/roles");
|
|
6
|
+
class RolesWithdraw extends base_command_1.BaseCommand {
|
|
7
|
+
static description = 'Pause installed responsibilities and archive their Compass, preserving work and history';
|
|
8
|
+
static args = {
|
|
9
|
+
id: core_1.Args.string({ required: true, description: 'Agent ID', ignoreStdin: true }),
|
|
10
|
+
key: core_1.Args.string({ required: true, description: 'Role key', ignoreStdin: true }),
|
|
11
|
+
};
|
|
12
|
+
static flags = {
|
|
13
|
+
'expected-version': core_1.Flags.integer({
|
|
14
|
+
required: true,
|
|
15
|
+
description: 'Compass version from agents roles list',
|
|
16
|
+
}),
|
|
17
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
18
|
+
};
|
|
19
|
+
async run() {
|
|
20
|
+
this.requireAuth();
|
|
21
|
+
const { args, flags } = await this.parse(RolesWithdraw);
|
|
22
|
+
try {
|
|
23
|
+
const receipt = await roles_1.roleApi.withdraw(args.id, args.key, flags['expected-version']);
|
|
24
|
+
this.log(flags.json
|
|
25
|
+
? JSON.stringify(receipt, null, 2)
|
|
26
|
+
: receipt.complete
|
|
27
|
+
? 'Role paused; Compass archived. Existing work and memory retained.'
|
|
28
|
+
: 'Role partially paused. Refresh and retry to reconcile remaining responsibilities.');
|
|
29
|
+
if (!receipt.complete)
|
|
30
|
+
this.failWithCliError({
|
|
31
|
+
code: 'ROLE_WITHDRAW_INCOMPLETE',
|
|
32
|
+
message: 'Withdrawal is incomplete; inspect and retry.',
|
|
33
|
+
retryable: true,
|
|
34
|
+
exit: 1,
|
|
35
|
+
details: receipt,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
this.handleApiError(error);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.default = RolesWithdraw;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
/**
|
|
3
|
+
* `skrr agents share <agent>` — the public, attributed link to a Store agent.
|
|
4
|
+
*
|
|
5
|
+
* Not `agent-shares`: that grants a NAMED person access to a private agent. A
|
|
6
|
+
* link is an address, not a permission (agent-distribution-2026-10-08,
|
|
7
|
+
* principle 1), so this works only for an agent with a public listing, and
|
|
8
|
+
* says what to do instead for one without.
|
|
9
|
+
*
|
|
10
|
+
* The printed URL carries the sharer's opaque code (`?s=`) and the channel
|
|
11
|
+
* (`?ch=`), so the publisher's analytics can say "this link drove N installs"
|
|
12
|
+
* without the link ever naming the sharer. Minting is idempotent: sharing the
|
|
13
|
+
* same agent the same way twice prints the same link.
|
|
14
|
+
*/
|
|
15
|
+
export default class AgentsShare extends BaseCommand {
|
|
16
|
+
static description: string;
|
|
17
|
+
static examples: string[];
|
|
18
|
+
static args: {
|
|
19
|
+
agent: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
20
|
+
};
|
|
21
|
+
static flags: {
|
|
22
|
+
channel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
23
|
+
qr: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
24
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
25
|
+
};
|
|
26
|
+
run(): Promise<void>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
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 agent_ref_1 = require("../../lib/agent-ref");
|
|
7
|
+
const agent_distribution_1 = require("../../lib/agent-distribution");
|
|
8
|
+
const terminal_qr_1 = require("../../lib/terminal-qr");
|
|
9
|
+
/** The channels a person sharing from a terminal can mean. */
|
|
10
|
+
const SHARE_CHANNELS = ['link', 'qr', 'cli'];
|
|
11
|
+
/**
|
|
12
|
+
* `skrr agents share <agent>` — the public, attributed link to a Store agent.
|
|
13
|
+
*
|
|
14
|
+
* Not `agent-shares`: that grants a NAMED person access to a private agent. A
|
|
15
|
+
* link is an address, not a permission (agent-distribution-2026-10-08,
|
|
16
|
+
* principle 1), so this works only for an agent with a public listing, and
|
|
17
|
+
* says what to do instead for one without.
|
|
18
|
+
*
|
|
19
|
+
* The printed URL carries the sharer's opaque code (`?s=`) and the channel
|
|
20
|
+
* (`?ch=`), so the publisher's analytics can say "this link drove N installs"
|
|
21
|
+
* without the link ever naming the sharer. Minting is idempotent: sharing the
|
|
22
|
+
* same agent the same way twice prints the same link.
|
|
23
|
+
*/
|
|
24
|
+
class AgentsShare extends base_command_1.BaseCommand {
|
|
25
|
+
static description = `Print a public, attributed link to a published agent — and a QR code a phone can scan (--qr). ` +
|
|
26
|
+
`For a private agent, use \`agent-shares create\`.`;
|
|
27
|
+
static examples = [
|
|
28
|
+
'<%= config.bin %> agents share agent_abc123',
|
|
29
|
+
'<%= config.bin %> agents share agent_abc123 --qr',
|
|
30
|
+
'<%= config.bin %> agents share https://skrr.ai/a/agent_abc123 --channel link',
|
|
31
|
+
'<%= config.bin %> agents share agent_abc123 --json',
|
|
32
|
+
];
|
|
33
|
+
static args = {
|
|
34
|
+
agent: core_1.Args.string({
|
|
35
|
+
description: 'The published agent: its id or a link to it',
|
|
36
|
+
required: true,
|
|
37
|
+
ignoreStdin: true,
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
static flags = {
|
|
41
|
+
channel: core_1.Flags.string({
|
|
42
|
+
description: 'How you are sharing it, recorded on the link for analytics. Defaults to cli, or qr with --qr',
|
|
43
|
+
options: [...SHARE_CHANNELS],
|
|
44
|
+
}),
|
|
45
|
+
qr: core_1.Flags.boolean({
|
|
46
|
+
description: 'Also draw a QR code (only in an interactive terminal without NO_COLOR; the URL is always printed)',
|
|
47
|
+
}),
|
|
48
|
+
json: core_1.Flags.boolean({ description: 'Print {agentId, channel, code, url} as JSON' }),
|
|
49
|
+
};
|
|
50
|
+
async run() {
|
|
51
|
+
this.requireAuth();
|
|
52
|
+
const { args, flags } = await this.parse(AgentsShare);
|
|
53
|
+
const baseURL = this.cliConfig.baseURL;
|
|
54
|
+
let agentId;
|
|
55
|
+
try {
|
|
56
|
+
({ agentId } = await (0, agent_ref_1.resolveAgentRef)(args.agent, { baseURL }));
|
|
57
|
+
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
if (err instanceof agent_ref_1.AgentRefError) {
|
|
60
|
+
this.failWithCliError({ message: err.message, code: err.code, exit: 1, retryable: false });
|
|
61
|
+
}
|
|
62
|
+
this.handleApiError(err);
|
|
63
|
+
}
|
|
64
|
+
// Attribution is the SHARER's channel — the one this share is made through,
|
|
65
|
+
// never the channel of a link that was passed in to name the agent.
|
|
66
|
+
const channel = (flags.channel ?? (flags.qr ? 'qr' : 'cli'));
|
|
67
|
+
let link;
|
|
68
|
+
try {
|
|
69
|
+
link = await (0, agent_distribution_1.mintAgentShareLink)({ baseURL, agentId, channel });
|
|
70
|
+
}
|
|
71
|
+
catch (err) {
|
|
72
|
+
if (err instanceof agent_distribution_1.AgentNotShareableError) {
|
|
73
|
+
this.failWithCliError({ message: err.message, code: err.code, exit: 1, retryable: false });
|
|
74
|
+
}
|
|
75
|
+
this.handleApiError(err, { subject: `agent ${agentId}` });
|
|
76
|
+
}
|
|
77
|
+
if (flags.json) {
|
|
78
|
+
this.log(JSON.stringify(link, null, 2));
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (flags.qr) {
|
|
82
|
+
const decision = (0, terminal_qr_1.qrRenderDecision)(link.url);
|
|
83
|
+
if (decision.render) {
|
|
84
|
+
for (const line of (0, terminal_qr_1.renderQr)(link.url))
|
|
85
|
+
this.log(line);
|
|
86
|
+
this.log('');
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
// The URL below is the share either way; say why the code is missing
|
|
90
|
+
// on stderr so a pipe still receives exactly one line.
|
|
91
|
+
this.logToStderr(`No QR code: ${decision.reason}. Share the link instead.`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
this.log(link.url);
|
|
95
|
+
if (process.stdout.isTTY) {
|
|
96
|
+
this.logToStderr(`Anyone with this link can open the listing on ${data_provider_1.BRAND.displayName}; installs through it are attributed to it.`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.default = AgentsShare;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { AgentVanityView } from '@skrr-ai/data-provider';
|
|
2
|
+
import { BaseCommand } from '../../base-command';
|
|
3
|
+
/** The human rendering of a vanity view; exported for the spec. */
|
|
4
|
+
export declare function renderAgentVanity(view: AgentVanityView, origin: string, log: (line: string) => void): void;
|
|
5
|
+
/**
|
|
6
|
+
* `skrr agents vanity <agent>` — the agent's alias in your publisher namespace,
|
|
7
|
+
* `/@<handle>/<slug>`, which 301s to its canonical `/a/<id>` listing
|
|
8
|
+
* (agent-distribution-2026-10-08.md, "Vanity URLs").
|
|
9
|
+
*/
|
|
10
|
+
export default class AgentsVanity extends BaseCommand {
|
|
11
|
+
static description: string;
|
|
12
|
+
static examples: string[];
|
|
13
|
+
static args: {
|
|
14
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
15
|
+
};
|
|
16
|
+
static flags: {
|
|
17
|
+
slug: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
};
|
|
20
|
+
run(): Promise<void>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderAgentVanity = renderAgentVanity;
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
6
|
+
const base_command_1 = require("../../base-command");
|
|
7
|
+
const web_url_1 = require("../../lib/web-url");
|
|
8
|
+
const visibility_1 = require("./visibility");
|
|
9
|
+
/** The human rendering of a vanity view; exported for the spec. */
|
|
10
|
+
function renderAgentVanity(view, origin, log) {
|
|
11
|
+
if (view.path) {
|
|
12
|
+
log(`Vanity address: ${origin}${view.path}`);
|
|
13
|
+
}
|
|
14
|
+
else if (view.slug) {
|
|
15
|
+
log(`Slug: ${view.slug}`);
|
|
16
|
+
log('It starts resolving at /@<handle>/' + view.slug + ' once you claim a publisher handle.');
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
log('No vanity address yet.');
|
|
20
|
+
if (view.suggestedSlug) {
|
|
21
|
+
log(`Publishing (or --slug) would claim: ${view.suggestedSlug}`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
if (view.retiredSlugs.length > 0) {
|
|
25
|
+
log(`Retired slugs (still resolve to this agent): ${view.retiredSlugs.join(', ')}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* `skrr agents vanity <agent>` — the agent's alias in your publisher namespace,
|
|
30
|
+
* `/@<handle>/<slug>`, which 301s to its canonical `/a/<id>` listing
|
|
31
|
+
* (agent-distribution-2026-10-08.md, "Vanity URLs").
|
|
32
|
+
*/
|
|
33
|
+
class AgentsVanity extends base_command_1.BaseCommand {
|
|
34
|
+
static description = "Show or change an agent's vanity address (/@<handle>/<slug>). A replaced slug keeps resolving to the same agent.";
|
|
35
|
+
static examples = [
|
|
36
|
+
'<%= config.bin %> agents vanity <agent-id>',
|
|
37
|
+
'<%= config.bin %> agents vanity <agent-id> --slug trip-planner',
|
|
38
|
+
'<%= config.bin %> agents vanity <agent-id> --json',
|
|
39
|
+
];
|
|
40
|
+
static args = {
|
|
41
|
+
id: core_1.Args.string({ description: 'Agent ID', required: true, ignoreStdin: true }),
|
|
42
|
+
};
|
|
43
|
+
static flags = {
|
|
44
|
+
slug: core_1.Flags.string({
|
|
45
|
+
description: 'Change the slug of a listed agent. Typed text is canonicalised (My Agent → my-agent); the old slug is retired and keeps working.',
|
|
46
|
+
}),
|
|
47
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
48
|
+
};
|
|
49
|
+
async run() {
|
|
50
|
+
this.requireAuth();
|
|
51
|
+
const { args, flags } = await this.parse(AgentsVanity);
|
|
52
|
+
let slug;
|
|
53
|
+
if (flags.slug !== undefined) {
|
|
54
|
+
const check = (0, data_provider_1.checkAgentSlug)(flags.slug);
|
|
55
|
+
if (!check.ok)
|
|
56
|
+
this.error((0, visibility_1.describeSlugRefusal)(flags.slug, check), { exit: 1 });
|
|
57
|
+
slug = check.slug;
|
|
58
|
+
}
|
|
59
|
+
let view;
|
|
60
|
+
try {
|
|
61
|
+
view =
|
|
62
|
+
slug !== undefined
|
|
63
|
+
? await data_provider_1.dataService.updateAgentVanity(args.id, { slug })
|
|
64
|
+
: await data_provider_1.dataService.getAgentVanity(args.id);
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
this.handleApiError(error, { subject: 'agent' });
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (flags.json) {
|
|
71
|
+
this.log(JSON.stringify(view, null, 2));
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
renderAgentVanity(view, (0, web_url_1.webOrigin)(this.cliConfig.baseURL), (line) => this.log(line));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.default = AgentsVanity;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StoreReleaseLicense } from '@skrr-ai/data-provider';
|
|
1
|
+
import type { AgentSlugCheck, StoreReleaseLicense } from '@skrr-ai/data-provider';
|
|
2
2
|
import { BaseCommand } from '../../base-command';
|
|
3
3
|
/**
|
|
4
4
|
* `--capability-rationale <permission-key>=<note>` → the publisher notes a
|
|
@@ -29,6 +29,24 @@ export declare function buildReleaseLicense(licenseId: string | undefined, remix
|
|
|
29
29
|
license?: StoreReleaseLicense;
|
|
30
30
|
error?: string;
|
|
31
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* `--trial-brief <text|@file>` → the brief the server records on the release
|
|
34
|
+
* (`agents/trialBrief.ts`). A value starting with `@` names a file to read;
|
|
35
|
+
* `@@…` is the escape for a brief that itself begins with `@`. Validated with
|
|
36
|
+
* the server's own normalizer so an over-long brief is refused here, before a
|
|
37
|
+
* request, with the same limit.
|
|
38
|
+
*/
|
|
39
|
+
export declare function resolveTrialBrief(value: string | undefined, readFile?: (path: string) => string): {
|
|
40
|
+
trialBrief?: string;
|
|
41
|
+
error?: string;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Whether a release published with these terms keeps its instructions from
|
|
45
|
+
* the public — the case where, without a brief, its listing has no trial.
|
|
46
|
+
*/
|
|
47
|
+
export declare function releaseIsSealed(price: number | undefined, sourceVisibility?: string): boolean;
|
|
48
|
+
/** One sentence for a slug the shared check refused, naming the canonical form. */
|
|
49
|
+
export declare function describeSlugRefusal(input: string, check: AgentSlugCheck): string;
|
|
32
50
|
export default class AgentsVisibility extends BaseCommand {
|
|
33
51
|
static description: string;
|
|
34
52
|
static examples: string[];
|
|
@@ -49,6 +67,8 @@ export default class AgentsVisibility extends BaseCommand {
|
|
|
49
67
|
dependency: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
50
68
|
license: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
51
69
|
remix: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
70
|
+
slug: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
71
|
+
'trial-brief': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
52
72
|
'source-visibility': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
53
73
|
};
|
|
54
74
|
run(): Promise<void>;
|
|
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.parseCapabilityRationales = parseCapabilityRationales;
|
|
4
4
|
exports.parseReleaseDependencies = parseReleaseDependencies;
|
|
5
5
|
exports.buildReleaseLicense = buildReleaseLicense;
|
|
6
|
+
exports.resolveTrialBrief = resolveTrialBrief;
|
|
7
|
+
exports.releaseIsSealed = releaseIsSealed;
|
|
8
|
+
exports.describeSlugRefusal = describeSlugRefusal;
|
|
9
|
+
const node_fs_1 = require("node:fs");
|
|
6
10
|
const core_1 = require("@oclif/core");
|
|
7
11
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
8
12
|
const base_command_1 = require("../../base-command");
|
|
@@ -68,6 +72,66 @@ function buildReleaseLicense(licenseId, remix) {
|
|
|
68
72
|
},
|
|
69
73
|
};
|
|
70
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* `--trial-brief <text|@file>` → the brief the server records on the release
|
|
77
|
+
* (`agents/trialBrief.ts`). A value starting with `@` names a file to read;
|
|
78
|
+
* `@@…` is the escape for a brief that itself begins with `@`. Validated with
|
|
79
|
+
* the server's own normalizer so an over-long brief is refused here, before a
|
|
80
|
+
* request, with the same limit.
|
|
81
|
+
*/
|
|
82
|
+
function resolveTrialBrief(value, readFile = (path) => (0, node_fs_1.readFileSync)(path, 'utf8')) {
|
|
83
|
+
if (value === undefined)
|
|
84
|
+
return {};
|
|
85
|
+
let text = value;
|
|
86
|
+
if (value.startsWith('@@')) {
|
|
87
|
+
text = value.slice(1);
|
|
88
|
+
}
|
|
89
|
+
else if (value.startsWith('@')) {
|
|
90
|
+
const path = value.slice(1);
|
|
91
|
+
if (!path)
|
|
92
|
+
return { error: '--trial-brief @<file> needs a file path after the @.' };
|
|
93
|
+
try {
|
|
94
|
+
text = readFile(path);
|
|
95
|
+
}
|
|
96
|
+
catch (err) {
|
|
97
|
+
return { error: `--trial-brief could not read ${path}: ${err.message}` };
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const normalized = (0, data_provider_1.normalizeTrialBrief)(text);
|
|
101
|
+
if (!normalized.ok) {
|
|
102
|
+
return {
|
|
103
|
+
error: normalized.reason === 'too_long'
|
|
104
|
+
? `--trial-brief is at most ${normalized.maxChars} characters.`
|
|
105
|
+
: '--trial-brief must be text.',
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
// Blank is sent as blank: an explicit "no brief" on this release.
|
|
109
|
+
return { trialBrief: normalized.brief ?? '' };
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Whether a release published with these terms keeps its instructions from
|
|
113
|
+
* the public — the case where, without a brief, its listing has no trial.
|
|
114
|
+
*/
|
|
115
|
+
function releaseIsSealed(price, sourceVisibility) {
|
|
116
|
+
if (sourceVisibility === 'public')
|
|
117
|
+
return false;
|
|
118
|
+
if (sourceVisibility === 'sealed' || sourceVisibility === 'licensed')
|
|
119
|
+
return true;
|
|
120
|
+
return (price ?? 0) > 0;
|
|
121
|
+
}
|
|
122
|
+
const SLUG_REFUSALS = {
|
|
123
|
+
empty: 'needs at least two letters or digits (a-z, 0-9)',
|
|
124
|
+
too_short: 'needs at least two letters or digits (a-z, 0-9)',
|
|
125
|
+
too_long: 'is at most 60 characters of a-z, 0-9 and hyphens',
|
|
126
|
+
reserved: 'is reserved; pick another',
|
|
127
|
+
};
|
|
128
|
+
/** One sentence for a slug the shared check refused, naming the canonical form. */
|
|
129
|
+
function describeSlugRefusal(input, check) {
|
|
130
|
+
if (check.ok)
|
|
131
|
+
return '';
|
|
132
|
+
const shown = check.slug && check.slug !== input ? ` (as "${check.slug}")` : '';
|
|
133
|
+
return `--slug "${input}"${shown} ${SLUG_REFUSALS[check.reason] ?? 'is not a valid slug'}.`;
|
|
134
|
+
}
|
|
71
135
|
class AgentsVisibility extends base_command_1.BaseCommand {
|
|
72
136
|
static description = 'Set the visibility of an agent';
|
|
73
137
|
static examples = [
|
|
@@ -79,6 +143,8 @@ class AgentsVisibility extends base_command_1.BaseCommand {
|
|
|
79
143
|
'<%= config.bin %> agents visibility <agent-id> --public --dependency skill:<skill-id>@<store-release-id>',
|
|
80
144
|
'<%= config.bin %> agents visibility <agent-id> --public --license mit --remix attributed --source-visibility public',
|
|
81
145
|
'<%= config.bin %> agents visibility <agent-id> --public --license proprietary --source-visibility sealed',
|
|
146
|
+
'<%= config.bin %> agents visibility <agent-id> --public --slug trip-planner',
|
|
147
|
+
'<%= config.bin %> agents visibility <agent-id> --public --price 5000000 --trial-brief @trial-brief.md',
|
|
82
148
|
];
|
|
83
149
|
static args = {
|
|
84
150
|
id: core_1.Args.string({ description: 'Agent ID', required: true, ignoreStdin: true }),
|
|
@@ -126,6 +192,18 @@ class AgentsVisibility extends base_command_1.BaseCommand {
|
|
|
126
192
|
description: "Whether a buyer's installed copy may be published as a derived listing: attributed (the fork credits this release) or none. Needs --license; defaults to none",
|
|
127
193
|
options: [...data_provider_1.STORE_RELEASE_REMIX_GRANTS],
|
|
128
194
|
}),
|
|
195
|
+
slug: core_1.Flags.string({
|
|
196
|
+
description: "The agent's address in your publisher namespace, /@<handle>/<slug> (an alias of /a/<id>). " +
|
|
197
|
+
'Typed text is canonicalised (My Agent → my-agent). Omit to keep the current slug, or to claim ' +
|
|
198
|
+
'one from the name on a first publish. A replaced slug keeps working for this agent.',
|
|
199
|
+
}),
|
|
200
|
+
'trial-brief': core_1.Flags.string({
|
|
201
|
+
description: 'What someone trying this agent from its listing should experience, as text or @<file>. ' +
|
|
202
|
+
'A trial of a release whose instructions are private (paid, sealed or licensed) runs on this ' +
|
|
203
|
+
'brief instead, and without one that listing has no trial. People who try it can read it back, ' +
|
|
204
|
+
'so never put your private instructions here. At most 4000 characters; recorded on this ' +
|
|
205
|
+
'release only, so pass it on every publish (like --language).',
|
|
206
|
+
}),
|
|
129
207
|
'source-visibility': core_1.Flags.string({
|
|
130
208
|
description: "Who may read the release's source, independent of price: licensed (license holders), public (anyone who sees the listing) or sealed (you only). Omit to keep the price-derived rule",
|
|
131
209
|
options: [...data_provider_1.STORE_RELEASE_SOURCE_VISIBILITIES],
|
|
@@ -171,6 +249,24 @@ class AgentsVisibility extends base_command_1.BaseCommand {
|
|
|
171
249
|
if ((license || sourceVisibility) && !isPublic) {
|
|
172
250
|
this.error('--license, --remix and --source-visibility are terms of a public release; pass them with --public.', { exit: 1 });
|
|
173
251
|
}
|
|
252
|
+
const { trialBrief, error: trialBriefError } = resolveTrialBrief(flags['trial-brief']);
|
|
253
|
+
if (trialBriefError)
|
|
254
|
+
this.error(trialBriefError, { exit: 1 });
|
|
255
|
+
if (trialBrief !== undefined && !isPublic) {
|
|
256
|
+
this.error('--trial-brief is recorded on a public release; pass it with --public.', {
|
|
257
|
+
exit: 1,
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
let slug;
|
|
261
|
+
if (flags.slug !== undefined) {
|
|
262
|
+
if (!isPublic) {
|
|
263
|
+
this.error('--slug names a public listing; pass it with --public.', { exit: 1 });
|
|
264
|
+
}
|
|
265
|
+
const check = (0, data_provider_1.checkAgentSlug)(flags.slug);
|
|
266
|
+
if (!check.ok)
|
|
267
|
+
this.error(describeSlugRefusal(flags.slug, check), { exit: 1 });
|
|
268
|
+
slug = check.slug;
|
|
269
|
+
}
|
|
174
270
|
let result;
|
|
175
271
|
try {
|
|
176
272
|
result = await data_provider_1.dataService.setAgentVisibility({
|
|
@@ -186,6 +282,8 @@ class AgentsVisibility extends base_command_1.BaseCommand {
|
|
|
186
282
|
dependencies,
|
|
187
283
|
license,
|
|
188
284
|
sourceVisibility,
|
|
285
|
+
...(trialBrief !== undefined ? { trialBrief } : {}),
|
|
286
|
+
...(slug !== undefined ? { slug } : {}),
|
|
189
287
|
});
|
|
190
288
|
}
|
|
191
289
|
catch (err) {
|
|
@@ -198,12 +296,26 @@ class AgentsVisibility extends base_command_1.BaseCommand {
|
|
|
198
296
|
const label = isPublic ? 'public' : 'private';
|
|
199
297
|
this.log(`Set agent ${args.id} visibility: ${label}`);
|
|
200
298
|
const recorded = result;
|
|
299
|
+
if (recorded?.vanity?.path) {
|
|
300
|
+
this.log(`Vanity address: ${recorded.vanity.path}`);
|
|
301
|
+
}
|
|
302
|
+
else if (recorded?.vanity?.slug) {
|
|
303
|
+
this.log(`Slug: ${recorded.vanity.slug} (claim a publisher handle for /@<handle>/${recorded.vanity.slug} to resolve)`);
|
|
304
|
+
}
|
|
201
305
|
if (recorded?.license) {
|
|
202
306
|
this.log(`License: ${recorded.license.id} (remix: ${recorded.license.remix})`);
|
|
203
307
|
}
|
|
204
308
|
if (recorded?.sourceVisibility) {
|
|
205
309
|
this.log(`Source visibility: ${recorded.sourceVisibility}`);
|
|
206
310
|
}
|
|
311
|
+
if (isPublic && recorded) {
|
|
312
|
+
if (recorded.trialBrief) {
|
|
313
|
+
this.log(`Trial brief: recorded (${recorded.trialBrief.length} characters)`);
|
|
314
|
+
}
|
|
315
|
+
else if (releaseIsSealed(recorded.price, recorded.sourceVisibility)) {
|
|
316
|
+
this.log('Trial: none. This release keeps its instructions private and has no trial brief, so its listing cannot be tried. Pass --trial-brief to add one.');
|
|
317
|
+
}
|
|
318
|
+
}
|
|
207
319
|
}
|
|
208
320
|
}
|
|
209
321
|
exports.default = AgentsVisibility;
|
|
@@ -9,6 +9,7 @@ export default class Commands extends BaseCommand {
|
|
|
9
9
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
10
|
search: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
11
|
schema: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
brief: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
13
|
audit: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
};
|
|
14
15
|
run(): Promise<void>;
|
|
@@ -9,6 +9,7 @@ class Commands extends base_command_1.BaseCommand {
|
|
|
9
9
|
static examples = [
|
|
10
10
|
'<%= config.bin %> commands',
|
|
11
11
|
'<%= config.bin %> commands --json',
|
|
12
|
+
'<%= config.bin %> commands --json --brief',
|
|
12
13
|
'<%= config.bin %> commands --search agent --json',
|
|
13
14
|
'<%= config.bin %> commands --search "publish release"',
|
|
14
15
|
'<%= config.bin %> commands --schema "agent message send"',
|
|
@@ -28,6 +29,10 @@ class Commands extends base_command_1.BaseCommand {
|
|
|
28
29
|
description: 'Filter commands by name, description, or examples',
|
|
29
30
|
}),
|
|
30
31
|
schema: core_1.Flags.boolean({ description: 'Return one command schema instead of the full list' }),
|
|
32
|
+
brief: core_1.Flags.boolean({
|
|
33
|
+
description: 'With --json: id, command and one-line description only (about 14x smaller than the full list). Use --schema "<command>" for one command\'s flags.',
|
|
34
|
+
exclusive: ['schema', 'audit'],
|
|
35
|
+
}),
|
|
31
36
|
audit: core_1.Flags.boolean({
|
|
32
37
|
description: 'Run command hygiene checks for agent-friendly CLI contracts',
|
|
33
38
|
exclusive: ['schema'],
|
|
@@ -101,20 +106,28 @@ class Commands extends base_command_1.BaseCommand {
|
|
|
101
106
|
// Search is a discovery operation: keep its JSON small enough to pass
|
|
102
107
|
// directly into an agent's next decision. Use --schema for full flags and
|
|
103
108
|
// argument metadata for one selected command.
|
|
104
|
-
const outputEntries =
|
|
105
|
-
? entries.map(({ id, command, description
|
|
106
|
-
|
|
107
|
-
command,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
const outputEntries = flags.brief
|
|
110
|
+
? entries.map(({ id, command, description }) => ({ id, command, description }))
|
|
111
|
+
: query
|
|
112
|
+
? entries.map(({ id, command, description, aliases, examples }) => ({
|
|
113
|
+
id,
|
|
114
|
+
command,
|
|
115
|
+
description,
|
|
116
|
+
aliases,
|
|
117
|
+
examples,
|
|
118
|
+
}))
|
|
119
|
+
: entries;
|
|
113
120
|
const payload = {
|
|
114
121
|
object: 'list',
|
|
115
122
|
data: outputEntries,
|
|
116
123
|
count: entries.length,
|
|
117
124
|
...(query ? { query: flags.search } : {}),
|
|
125
|
+
...(flags.brief
|
|
126
|
+
? {
|
|
127
|
+
brief: true,
|
|
128
|
+
hint: 'Run `skrr commands --schema "<command>" --json` for one command\'s flags.',
|
|
129
|
+
}
|
|
130
|
+
: {}),
|
|
118
131
|
};
|
|
119
132
|
if (flags.json) {
|
|
120
133
|
this.log(JSON.stringify(payload, null, 2));
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { BaseCommand } from '../../../base-command';
|
|
2
2
|
/**
|
|
3
|
-
* `skrr commitments
|
|
3
|
+
* `skrr commitments cadence-requests decide <id> <request-id> --approve`
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* wake through the same resolver a bypass-mode agent would have used; rejecting
|
|
9
|
-
* records the no and leaves the cadence alone.
|
|
5
|
+
* The server records concrete cadence proposals requiring an owner decision.
|
|
6
|
+
* Approval changes only the check schedule; it grants no execution permissions.
|
|
7
|
+
* Rejection records the decision and leaves the schedule unchanged.
|
|
10
8
|
*
|
|
11
9
|
* List the pending ones with `skrr commitments show <id>`.
|
|
12
10
|
*/
|
|
13
|
-
export default class
|
|
11
|
+
export default class CommitmentsCadenceRequestsDecide extends BaseCommand {
|
|
14
12
|
static description: string;
|
|
15
13
|
static examples: string[];
|
|
16
14
|
static args: {
|