@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
|
@@ -29,11 +29,8 @@ class CommitmentsRemediate extends base_command_1.BaseCommand {
|
|
|
29
29
|
static flags = {
|
|
30
30
|
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
31
31
|
action: core_1.Flags.string({
|
|
32
|
-
description: '
|
|
33
|
-
|
|
34
|
-
// is deliberately absent from the product CLI: v2 authority changes are
|
|
35
|
-
// explicit Mode changes, never a hidden risk/approval tier.
|
|
36
|
-
options: commitments_1.COMMITMENT_REMEDIATION_ACTIONS.filter((action) => action !== 'tighten_policy'),
|
|
32
|
+
description: 'Adjust lifecycle or reporting. Agent permissions and Workspace administration have their own controls.',
|
|
33
|
+
options: commitments_1.COMMITMENT_REMEDIATION_ACTIONS,
|
|
37
34
|
required: true,
|
|
38
35
|
}),
|
|
39
36
|
reason: core_1.Flags.string({ description: 'Why (recorded on the boundary-change ledger)' }),
|
|
@@ -52,7 +52,7 @@ class CommitmentsShow extends base_command_1.BaseCommand {
|
|
|
52
52
|
(0, commitments_1.renderCommitmentSummary)(response.commitment, (line) => this.log(line), response.latestCheck);
|
|
53
53
|
// Whose permissions a run uses (OSK-11975) — read from the operating state,
|
|
54
54
|
// which carries the same projection preflight reports (OSK-12065).
|
|
55
|
-
const autonomy = response.operatingState?.
|
|
55
|
+
const autonomy = response.operatingState?.execution;
|
|
56
56
|
for (const line of (0, commitments_1.permissionLines)(autonomy?.permissions))
|
|
57
57
|
this.log(line);
|
|
58
58
|
// `show` is the first surface a person reaches after linking something, and
|
|
@@ -264,22 +264,22 @@ class CommitmentsUpdate extends base_command_1.BaseCommand {
|
|
|
264
264
|
if (flags.isolation)
|
|
265
265
|
nextPolicy.executionIsolation = flags.isolation;
|
|
266
266
|
if (concurrencyPatch) {
|
|
267
|
-
const existingEnvelope = nextPolicy.
|
|
268
|
-
typeof nextPolicy.
|
|
269
|
-
!Array.isArray(nextPolicy.
|
|
270
|
-
? nextPolicy.
|
|
267
|
+
const existingEnvelope = nextPolicy.executionBudget &&
|
|
268
|
+
typeof nextPolicy.executionBudget === 'object' &&
|
|
269
|
+
!Array.isArray(nextPolicy.executionBudget)
|
|
270
|
+
? nextPolicy.executionBudget
|
|
271
271
|
: {};
|
|
272
|
-
nextPolicy.
|
|
272
|
+
nextPolicy.executionBudget = { ...existingEnvelope, ...concurrencyPatch };
|
|
273
273
|
}
|
|
274
274
|
payload.policy = nextPolicy;
|
|
275
275
|
}
|
|
276
276
|
const finalPolicy = payload.policy && typeof payload.policy === 'object' && !Array.isArray(payload.policy)
|
|
277
277
|
? payload.policy
|
|
278
278
|
: undefined;
|
|
279
|
-
const finalEnvelope = finalPolicy?.
|
|
280
|
-
typeof finalPolicy.
|
|
281
|
-
!Array.isArray(finalPolicy.
|
|
282
|
-
? finalPolicy.
|
|
279
|
+
const finalEnvelope = finalPolicy?.executionBudget &&
|
|
280
|
+
typeof finalPolicy.executionBudget === 'object' &&
|
|
281
|
+
!Array.isArray(finalPolicy.executionBudget)
|
|
282
|
+
? finalPolicy.executionBudget
|
|
283
283
|
: undefined;
|
|
284
284
|
if (process.env.OVERSKY_AUTONOMOUS_SESSION === '1' &&
|
|
285
285
|
finalEnvelope &&
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { BaseCommand } from '../../base-command';
|
|
2
|
-
export declare function wakePolicyHeadline(
|
|
3
|
-
workPromotionModel?: string;
|
|
4
|
-
}): string;
|
|
2
|
+
export declare function wakePolicyHeadline(_result?: unknown): string;
|
|
5
3
|
/**
|
|
6
4
|
* `skrr commitments wake-capabilities <id>` — which wakes an Agent may pick.
|
|
7
5
|
*
|
|
@@ -5,15 +5,8 @@ const core_1 = require("@oclif/core");
|
|
|
5
5
|
const base_command_1 = require("../../base-command");
|
|
6
6
|
const commitments_1 = require("../../lib/commitments");
|
|
7
7
|
const format_1 = require("../../lib/format");
|
|
8
|
-
function wakePolicyHeadline(
|
|
9
|
-
return
|
|
10
|
-
? 'Wake behavior: configured Commitment sources may wake it automatically; there is no separate permission level.'
|
|
11
|
-
: // The Commitment's Monitor/Prepare/Execute mode is a different field —
|
|
12
|
-
// this policy predates the current wake contract, which is why a
|
|
13
|
-
// Commitment already in `execute` mode can still carry the legacy
|
|
14
|
-
// marker. Naming the field avoids the "migrate to what it already is"
|
|
15
|
-
// contradiction.
|
|
16
|
-
'Wake behavior: this Commitment predates the current wake contract and runs the compatibility policy. Re-saving its mode (Monitor, Prepare, or Execute) stamps the current policy.';
|
|
8
|
+
function wakePolicyHeadline(_result) {
|
|
9
|
+
return 'Wake behavior: configured sources may wake the Agent within lifecycle and execution budgets.';
|
|
17
10
|
}
|
|
18
11
|
/**
|
|
19
12
|
* `skrr commitments wake-capabilities <id>` — which wakes an Agent may pick.
|
|
@@ -38,7 +31,7 @@ class CommitmentsWakeCapabilities extends base_command_1.BaseCommand {
|
|
|
38
31
|
};
|
|
39
32
|
static flags = {
|
|
40
33
|
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
41
|
-
verbose: core_1.Flags.boolean({ description: 'Include
|
|
34
|
+
verbose: core_1.Flags.boolean({ description: 'Include wake-source diagnostics' }),
|
|
42
35
|
};
|
|
43
36
|
async run() {
|
|
44
37
|
this.requireAuth();
|
|
@@ -54,16 +47,7 @@ class CommitmentsWakeCapabilities extends base_command_1.BaseCommand {
|
|
|
54
47
|
this.log(JSON.stringify(result, null, 2));
|
|
55
48
|
return;
|
|
56
49
|
}
|
|
57
|
-
|
|
58
|
-
this.log(wakePolicyHeadline(result));
|
|
59
|
-
const selected = result.selectedCapabilityIds;
|
|
60
|
-
if (flags.verbose) {
|
|
61
|
-
this.log(`Raw compatibility mode: ${result.mode}`);
|
|
62
|
-
this.log(selected === undefined
|
|
63
|
-
? 'Raw allowlist: not configured'
|
|
64
|
-
: `Raw allowlist: ${selected.length ? selected.join(', ') : '(empty)'}`);
|
|
65
|
-
}
|
|
66
|
-
this.log('');
|
|
50
|
+
this.log(wakePolicyHeadline());
|
|
67
51
|
const visible = new Set(result.visibleCapabilities.map((item) => item.id));
|
|
68
52
|
(0, format_1.renderTable)(result.eligibleCapabilities.map((item) => ({
|
|
69
53
|
id: item.id,
|
|
@@ -74,7 +58,7 @@ class CommitmentsWakeCapabilities extends base_command_1.BaseCommand {
|
|
|
74
58
|
{ key: 'id', header: 'CAPABILITY' },
|
|
75
59
|
{ key: 'kind', header: 'KIND' },
|
|
76
60
|
{ key: 'source', header: 'SOURCE' },
|
|
77
|
-
{ key: 'offered', header:
|
|
61
|
+
{ key: 'offered', header: 'ACTIVE' },
|
|
78
62
|
], (line) => this.log(line));
|
|
79
63
|
}
|
|
80
64
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DistributionAttributionsResponse } from '@skrr-ai/data-provider';
|
|
2
|
+
import { BaseCommand } from '../../base-command';
|
|
3
|
+
/** The human rendering; exported for the spec. */
|
|
4
|
+
export declare function renderAttributions(view: DistributionAttributionsResponse, log: (line: string) => void): void;
|
|
5
|
+
/**
|
|
6
|
+
* `skrr earnings attributions` — what your share links drove
|
|
7
|
+
* (agent-distribution-2026-10-08.md, "Affiliate"). Read-only, and only ever
|
|
8
|
+
* your own codes.
|
|
9
|
+
*/
|
|
10
|
+
export default class EarningsAttributions extends BaseCommand {
|
|
11
|
+
static description: string;
|
|
12
|
+
static examples: string[];
|
|
13
|
+
static flags: {
|
|
14
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderAttributions = renderAttributions;
|
|
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
|
+
/** tokenCredits are micro-dollars (1,000,000 = $1.00), as everywhere in earnings. */
|
|
8
|
+
const CREDITS_PER_USD = 1_000_000;
|
|
9
|
+
function amount(value, currency) {
|
|
10
|
+
if (currency === 'tokenCredits' || currency === 'USD') {
|
|
11
|
+
return `$${(value / CREDITS_PER_USD).toFixed(2)}`;
|
|
12
|
+
}
|
|
13
|
+
return `${value} ${currency}`;
|
|
14
|
+
}
|
|
15
|
+
const REWARD_STATE_LABEL = {
|
|
16
|
+
none: 'measured, no reward',
|
|
17
|
+
pending: 'reward pending',
|
|
18
|
+
available: 'reward available',
|
|
19
|
+
reversed: 'reward reversed',
|
|
20
|
+
};
|
|
21
|
+
/** The human rendering; exported for the spec. */
|
|
22
|
+
function renderAttributions(view, log) {
|
|
23
|
+
const plural = view.installs === 1 ? '' : 's';
|
|
24
|
+
log(`Your links drove ${view.installs} install${plural}.`);
|
|
25
|
+
log(` Paid: ${view.paidInstalls}${view.refundedInstalls ? ` (${view.refundedInstalls} refunded)` : ''}`);
|
|
26
|
+
if (view.gross.length > 0) {
|
|
27
|
+
log(` Sales: ${view.gross.map((g) => amount(g.amount, g.currency)).join(', ')}`);
|
|
28
|
+
}
|
|
29
|
+
if (view.rateBps > 0) {
|
|
30
|
+
log(` Rewards: ${amount(view.rewards.pending, 'tokenCredits')} pending, ` +
|
|
31
|
+
`${amount(view.rewards.available, 'tokenCredits')} available ` +
|
|
32
|
+
`(rate ${(view.rateBps / 100).toFixed(2)}%)`);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
log(' Rewards: not enabled — paid installs are measured, nothing is paid yet.');
|
|
36
|
+
}
|
|
37
|
+
if (view.recent.length === 0) {
|
|
38
|
+
if (view.installs === 0)
|
|
39
|
+
log('Share an agent (skrr agents embed, or a share link) to see what it drives.');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
log('');
|
|
43
|
+
log('Recent paid installs:');
|
|
44
|
+
for (const row of view.recent) {
|
|
45
|
+
const when = row.createdAt.slice(0, 10);
|
|
46
|
+
const name = row.agentName || row.agentId;
|
|
47
|
+
const refunded = row.refundedAt ? ', refunded' : '';
|
|
48
|
+
log(` ${when} ${name} ${amount(row.gross, row.currency)} via ${row.channel ?? 'unknown'} ` +
|
|
49
|
+
`(${REWARD_STATE_LABEL[row.rewardState] ?? row.rewardState}${refunded})`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* `skrr earnings attributions` — what your share links drove
|
|
54
|
+
* (agent-distribution-2026-10-08.md, "Affiliate"). Read-only, and only ever
|
|
55
|
+
* your own codes.
|
|
56
|
+
*/
|
|
57
|
+
class EarningsAttributions extends base_command_1.BaseCommand {
|
|
58
|
+
static description = 'Show the installs your share links drove, the paid ones, and any reward they earned (read-only)';
|
|
59
|
+
static examples = [
|
|
60
|
+
'<%= config.bin %> earnings attributions',
|
|
61
|
+
'<%= config.bin %> earnings attributions --json',
|
|
62
|
+
];
|
|
63
|
+
static flags = {
|
|
64
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
65
|
+
};
|
|
66
|
+
async run() {
|
|
67
|
+
this.requireAuth();
|
|
68
|
+
const { flags } = await this.parse(EarningsAttributions);
|
|
69
|
+
try {
|
|
70
|
+
const view = await data_provider_1.dataService.getDistributionAttributions();
|
|
71
|
+
if (flags.json) {
|
|
72
|
+
this.log(JSON.stringify(view, null, 2));
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
renderAttributions(view, (line) => this.log(line));
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
this.handleApiError(error, { subject: 'attributions' });
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.default = EarningsAttributions;
|
|
@@ -11,12 +11,13 @@ const earnings_1 = require("../../lib/earnings");
|
|
|
11
11
|
*/
|
|
12
12
|
class Earnings extends base_command_1.BaseCommand {
|
|
13
13
|
static description = 'Show your publisher earnings: available and pending balance, payout window and automatic payouts (read-only). ' +
|
|
14
|
-
'See `earnings statements` and `earnings payouts` for the history behind it.';
|
|
14
|
+
'See `earnings statements` and `earnings payouts` for the history behind it, and `earnings attributions` for what your share links drove.';
|
|
15
15
|
static examples = [
|
|
16
16
|
'<%= config.bin %> earnings',
|
|
17
17
|
'<%= config.bin %> earnings --json',
|
|
18
18
|
'<%= config.bin %> earnings statements',
|
|
19
19
|
'<%= config.bin %> earnings payouts',
|
|
20
|
+
'<%= config.bin %> earnings attributions',
|
|
20
21
|
];
|
|
21
22
|
static flags = {
|
|
22
23
|
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
@@ -61,9 +61,10 @@ class GenerateRecoveryCode extends base_command_1.BaseCommand {
|
|
|
61
61
|
process.stdout.write(result.formatted + '\n');
|
|
62
62
|
// All metadata and warnings to stderr so stdout remains clean.
|
|
63
63
|
process.stderr.write('\n');
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
// The code itself is on stdout, ABOVE. It used to be printed again here, so
|
|
65
|
+
// an interactive terminal (stdout and stderr share the screen, and scrollback
|
|
66
|
+
// keeps both) held two copies of a one-time credential.
|
|
67
|
+
process.stderr.write(' Account Recovery Code is printed above (copy now — this is the only time it will be shown).\n');
|
|
67
68
|
process.stderr.write('\n');
|
|
68
69
|
process.stderr.write(' WARNING: Store this somewhere safe. It will not be shown again.\n');
|
|
69
70
|
process.stderr.write(' If lost, run this command again to generate a new code (the old one is revoked).\n');
|
|
@@ -12,6 +12,7 @@ export default class GitHubAllowTools extends BaseCommand {
|
|
|
12
12
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
13
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
14
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
16
|
};
|
|
16
17
|
run(): Promise<void>;
|
|
17
18
|
}
|
|
@@ -21,6 +21,7 @@ export default class GitHubAppInstall extends BaseCommand {
|
|
|
21
21
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
22
22
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
23
23
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
24
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
24
25
|
};
|
|
25
26
|
run(): Promise<void>;
|
|
26
27
|
}
|
|
@@ -15,6 +15,7 @@ export default class GitHubAppStatus extends BaseCommand {
|
|
|
15
15
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
16
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
17
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
18
19
|
};
|
|
19
20
|
run(): Promise<void>;
|
|
20
21
|
}
|
|
@@ -25,6 +25,7 @@ export default class GitHubConnect extends BaseCommand {
|
|
|
25
25
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
26
26
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
27
27
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
28
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
28
29
|
};
|
|
29
30
|
run(): Promise<void>;
|
|
30
31
|
}
|
|
@@ -10,6 +10,7 @@ export default class GitHubConnections extends BaseCommand {
|
|
|
10
10
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
11
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
12
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
};
|
|
14
15
|
run(): Promise<void>;
|
|
15
16
|
}
|
|
@@ -10,6 +10,7 @@ export default class GitHubDisconnect extends BaseCommand {
|
|
|
10
10
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
11
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
12
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
};
|
|
14
15
|
run(): Promise<void>;
|
|
15
16
|
}
|
|
@@ -14,6 +14,7 @@ export default class GitHubFinalize extends BaseCommand {
|
|
|
14
14
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
15
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
16
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
18
|
};
|
|
18
19
|
run(): Promise<void>;
|
|
19
20
|
}
|
|
@@ -12,6 +12,7 @@ export default class GitHubReconnect extends BaseCommand {
|
|
|
12
12
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
13
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
14
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
16
|
};
|
|
16
17
|
run(): Promise<void>;
|
|
17
18
|
}
|
|
@@ -16,6 +16,7 @@ export default class GitHubRun extends BaseCommand {
|
|
|
16
16
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
17
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
18
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
20
|
};
|
|
20
21
|
run(): Promise<void>;
|
|
21
22
|
}
|
|
@@ -15,6 +15,7 @@ export default class GitHubTools extends BaseCommand {
|
|
|
15
15
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
16
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
17
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
18
19
|
};
|
|
19
20
|
run(): Promise<void>;
|
|
20
21
|
}
|
|
@@ -15,6 +15,7 @@ export default class IntegrationsConnectionsConnect extends BaseCommand {
|
|
|
15
15
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
16
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
17
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
18
19
|
};
|
|
19
20
|
run(): Promise<void>;
|
|
20
21
|
}
|
|
@@ -13,6 +13,7 @@ export default class IntegrationsConnectionsDisconnect extends BaseCommand {
|
|
|
13
13
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
14
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
15
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
17
|
};
|
|
17
18
|
run(): Promise<void>;
|
|
18
19
|
}
|
|
@@ -14,6 +14,7 @@ export default class IntegrationsConnectionsFinalize extends BaseCommand {
|
|
|
14
14
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
15
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
16
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
18
|
};
|
|
18
19
|
run(): Promise<void>;
|
|
19
20
|
}
|
|
@@ -10,6 +10,7 @@ export default class IntegrationsConnectionsList extends BaseCommand {
|
|
|
10
10
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
11
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
12
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
};
|
|
14
15
|
run(): Promise<void>;
|
|
15
16
|
}
|
|
@@ -15,6 +15,7 @@ export default class IntegrationsConnectionsReconnect extends BaseCommand {
|
|
|
15
15
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
16
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
17
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
18
19
|
};
|
|
19
20
|
run(): Promise<void>;
|
|
20
21
|
}
|
|
@@ -16,6 +16,7 @@ export default class IntegrationsExecute extends BaseCommand {
|
|
|
16
16
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
17
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
18
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
20
|
};
|
|
20
21
|
run(): Promise<void>;
|
|
21
22
|
}
|
|
@@ -14,6 +14,7 @@ export default class IntegrationsSearch extends BaseCommand {
|
|
|
14
14
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
15
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
16
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
18
|
};
|
|
18
19
|
run(): Promise<void>;
|
|
19
20
|
}
|
|
@@ -9,6 +9,7 @@ export default class IntegrationsToolkits extends BaseCommand {
|
|
|
9
9
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
10
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
11
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
13
|
};
|
|
13
14
|
run(): Promise<void>;
|
|
14
15
|
}
|
|
@@ -14,6 +14,7 @@ export default class IntegrationsToolsAllow extends BaseCommand {
|
|
|
14
14
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
15
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
16
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
18
|
};
|
|
18
19
|
run(): Promise<void>;
|
|
19
20
|
}
|
|
@@ -11,6 +11,7 @@ export default class IntegrationsToolsList extends BaseCommand {
|
|
|
11
11
|
token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
12
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
13
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
raw: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
15
|
};
|
|
15
16
|
run(): Promise<void>;
|
|
16
17
|
}
|
package/dist/commands/login.js
CHANGED
|
@@ -13,6 +13,8 @@ const login_1 = require("../lib/login");
|
|
|
13
13
|
const device_code_1 = require("../lib/device-code");
|
|
14
14
|
const api_fetch_1 = require("../lib/api-fetch");
|
|
15
15
|
const auth_storage_1 = require("../lib/auth-storage");
|
|
16
|
+
const credential_resolver_1 = require("../lib/credential-resolver");
|
|
17
|
+
const node_adapter_1 = require("../lib/node-adapter");
|
|
16
18
|
const prompt_1 = require("../lib/prompt");
|
|
17
19
|
/**
|
|
18
20
|
* `skrr login`
|
|
@@ -218,6 +220,16 @@ class Login extends base_command_1.BaseCommand {
|
|
|
218
220
|
});
|
|
219
221
|
// Only now is the new pointer earned.
|
|
220
222
|
undoBaseURL = null;
|
|
223
|
+
// Adopt the credential this login just stored. `BaseCommand.init()`
|
|
224
|
+
// resolved this process's credential BEFORE the login ran — the old,
|
|
225
|
+
// possibly revoked session, or nothing at all — and the adapter keeps
|
|
226
|
+
// that override until told otherwise. The hand-off below is the first
|
|
227
|
+
// authenticated call after login, so it went out under the stale
|
|
228
|
+
// credential: `POST /api/daemons/daemon-handoff` answered 401, the
|
|
229
|
+
// adapter fell back to brokering through a daemon that had no
|
|
230
|
+
// credential yet, and the freshly installed daemon was left signed out.
|
|
231
|
+
this.resolvedCredential = await (0, credential_resolver_1.resolveCredential)({ bareMode: this.bareMode });
|
|
232
|
+
(0, node_adapter_1.setAdapterCredentialOverride)(this.resolvedCredential);
|
|
221
233
|
this.log('');
|
|
222
234
|
this.log(`Signed in via ${result.flow} on ${(0, config_1.describeDeployment)(this.cliConfig.baseURL)}. ` +
|
|
223
235
|
`Run \`${this.config.bin} whoami\` to confirm your identity.`);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DedicatedLeaseCommand } from '../../../lib/dedicated-lease-command';
|
|
2
|
+
import { type ComputerDaemonLogResult } from '../../../lib/machine-daemon-log';
|
|
3
|
+
/** One line as it prints: UTC time (the daemon's clock), level, then the daemon's own text. */
|
|
4
|
+
export declare function formatDaemonLogLine(line: ComputerDaemonLogResult['lines'][number]): string;
|
|
5
|
+
export default class DedicatedMachinesLogs extends DedicatedLeaseCommand {
|
|
6
|
+
static summary: string;
|
|
7
|
+
static description: string;
|
|
8
|
+
static examples: string[];
|
|
9
|
+
static args: {
|
|
10
|
+
lease: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
11
|
+
};
|
|
12
|
+
static flags: {
|
|
13
|
+
lines: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
since: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
level: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
};
|
|
18
|
+
run(): Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatDaemonLogLine = formatDaemonLogLine;
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const dedicated_lease_command_1 = require("../../../lib/dedicated-lease-command");
|
|
6
|
+
const machine_daemon_log_1 = require("../../../lib/machine-daemon-log");
|
|
7
|
+
/** One line as it prints: UTC time (the daemon's clock), level, then the daemon's own text. */
|
|
8
|
+
function formatDaemonLogLine(line) {
|
|
9
|
+
const at = new Date(line.at).toISOString().replace('T', ' ').replace('Z', '');
|
|
10
|
+
return `${at} ${line.level.toUpperCase().padEnd(5)} ${line.text}`;
|
|
11
|
+
}
|
|
12
|
+
class DedicatedMachinesLogs extends dedicated_lease_command_1.DedicatedLeaseCommand {
|
|
13
|
+
static summary = "Read the tail of a Dedicated Runtime machine's daemon log";
|
|
14
|
+
static description = "Shows the last lines the machine's daemon logged about itself — why it reconnected, " +
|
|
15
|
+
're-registered or failed to sign in — so you can debug it without reading syslog, which ' +
|
|
16
|
+
"the machine's workload user cannot. The daemon keeps a short, recent log in memory and " +
|
|
17
|
+
"redacts credentials before keeping a line; it is not the machine's system log and it does " +
|
|
18
|
+
'not survive a daemon restart (the start time is printed). A machine whose image predates ' +
|
|
19
|
+
'this says so: update it with `machines dedicated update-image`. Anyone the machine is ' +
|
|
20
|
+
'shared with at the watch tier or above can read it; each read is on the audit record.';
|
|
21
|
+
static examples = [
|
|
22
|
+
'<%= config.bin %> machines dedicated logs <lease-id>',
|
|
23
|
+
'<%= config.bin %> machines dedicated logs <lease-id> --since 30m --level warn',
|
|
24
|
+
'<%= config.bin %> machines dedicated logs <lease-id> --lines 300 --json',
|
|
25
|
+
];
|
|
26
|
+
static args = {
|
|
27
|
+
lease: core_1.Args.string({
|
|
28
|
+
ignoreStdin: true,
|
|
29
|
+
description: dedicated_lease_command_1.DEDICATED_LEASE_ARG_DESCRIPTION,
|
|
30
|
+
required: true,
|
|
31
|
+
}),
|
|
32
|
+
};
|
|
33
|
+
static flags = {
|
|
34
|
+
lines: core_1.Flags.integer({
|
|
35
|
+
description: `The newest N lines (1-${machine_daemon_log_1.COMPUTER_DAEMON_LOG_LIMITS.maxLines})`,
|
|
36
|
+
default: machine_daemon_log_1.COMPUTER_DAEMON_LOG_LIMITS.defaultLines,
|
|
37
|
+
min: 1,
|
|
38
|
+
max: machine_daemon_log_1.COMPUTER_DAEMON_LOG_LIMITS.maxLines,
|
|
39
|
+
}),
|
|
40
|
+
since: core_1.Flags.string({
|
|
41
|
+
description: 'Only lines from this long ago: 90s, 30m, 2h, 1d (at most 24h)',
|
|
42
|
+
}),
|
|
43
|
+
level: core_1.Flags.string({
|
|
44
|
+
description: 'Only this level and above',
|
|
45
|
+
options: [...machine_daemon_log_1.COMPUTER_DAEMON_LOG_LEVELS],
|
|
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(DedicatedMachinesLogs);
|
|
52
|
+
const leaseId = await this.resolveLeaseArg(args.lease);
|
|
53
|
+
let sinceMs;
|
|
54
|
+
try {
|
|
55
|
+
sinceMs = flags.since ? (0, machine_daemon_log_1.parseDaemonLogSince)(flags.since) : undefined;
|
|
56
|
+
}
|
|
57
|
+
catch (err) {
|
|
58
|
+
this.error(err instanceof Error ? err.message : String(err), { exit: 2 });
|
|
59
|
+
}
|
|
60
|
+
let result;
|
|
61
|
+
try {
|
|
62
|
+
result = await (0, machine_daemon_log_1.getMachineDaemonLog)(`lease:${leaseId}`, {
|
|
63
|
+
lines: flags.lines,
|
|
64
|
+
...(sinceMs !== undefined ? { sinceMs } : {}),
|
|
65
|
+
...(flags.level
|
|
66
|
+
? { level: flags.level }
|
|
67
|
+
: {}),
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
catch (err) {
|
|
71
|
+
const failure = (0, machine_daemon_log_1.describeDaemonLogFailure)(err, { bin: this.config.bin, leaseId });
|
|
72
|
+
if (failure)
|
|
73
|
+
this.failWithCliError({ ...failure, exit: 1 });
|
|
74
|
+
return this.callDedicated(async () => {
|
|
75
|
+
throw err;
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (flags.json) {
|
|
79
|
+
this.log(JSON.stringify(result, null, 2));
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if (result.lines.length === 0) {
|
|
83
|
+
// Empty is "nothing matched in what the daemon still holds", never "the
|
|
84
|
+
// daemon logged nothing": the log is a short in-memory window.
|
|
85
|
+
this.log(flags.since || flags.level
|
|
86
|
+
? 'No log lines match those filters in what the daemon still holds.'
|
|
87
|
+
: 'The daemon has logged nothing since it started (or since its log was last cleared by a restart).');
|
|
88
|
+
}
|
|
89
|
+
for (const line of result.lines)
|
|
90
|
+
this.log(formatDaemonLogLine(line));
|
|
91
|
+
const started = new Date(result.startedAt).toISOString();
|
|
92
|
+
const notes = [`daemon started ${started}`];
|
|
93
|
+
if (result.truncated)
|
|
94
|
+
notes.push('more matched than this shows: raise --lines or narrow --since');
|
|
95
|
+
if (result.ringFull)
|
|
96
|
+
notes.push("older lines have rolled off the daemon's short log");
|
|
97
|
+
if (result.redactedLines > 0) {
|
|
98
|
+
notes.push(`${result.redactedLines} line(s) in the log had credential-shaped text masked`);
|
|
99
|
+
}
|
|
100
|
+
this.log(`-- ${notes.join('; ')}`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.default = DedicatedMachinesLogs;
|
|
@@ -80,7 +80,7 @@ class DedicatedMachinesPowerSet extends dedicated_lease_command_1.DedicatedLease
|
|
|
80
80
|
this.log(JSON.stringify({ ok: false, ...refusal }, null, 2));
|
|
81
81
|
}
|
|
82
82
|
else {
|
|
83
|
-
this.log(`
|
|
83
|
+
this.log(`On demand is not available for ${leaseId}: ${refusal.reason}`);
|
|
84
84
|
this.log(` ${refusal.detail}`);
|
|
85
85
|
this.log(` Fix: ${refusal.fix}`);
|
|
86
86
|
this.log(' The power policy was not changed.');
|