@skrr-ai/cli 0.1.128 → 0.1.129
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 +12 -0
- package/dist/base-command.js +35 -0
- package/dist/commands/agenda/trigger/list.d.ts +2 -1
- package/dist/commands/agenda/trigger/list.js +55 -6
- package/dist/commands/agents/create.js +3 -1
- package/dist/commands/browser/persistent-profile.d.ts +22 -0
- package/dist/commands/browser/persistent-profile.js +46 -0
- package/dist/commands/commitments/create.js +3 -1
- package/dist/commands/commitments/effective-policy.js +6 -0
- package/dist/commands/commitments/explain.js +10 -1
- package/dist/commands/commitments/plan.d.ts +14 -0
- package/dist/commands/commitments/plan.js +32 -0
- package/dist/commands/commitments/preflight.d.ts +1 -1
- package/dist/commands/commitments/preflight.js +12 -4
- package/dist/commands/commitments/show.d.ts +9 -0
- package/dist/commands/commitments/show.js +14 -1
- package/dist/commands/compass/revisions.d.ts +6 -2
- package/dist/commands/compass/revisions.js +13 -5
- package/dist/commands/compass/tactic.d.ts +5 -0
- package/dist/commands/compass/tactic.js +14 -0
- package/dist/commands/followups/plans/create.js +1 -1
- package/dist/commands/harnesses/list.js +1 -1
- package/dist/commands/northstars/governance/configure.js +1 -1
- package/dist/commands/northstars/intents/decide.js +2 -3
- package/dist/commands/northstars/review-now.js +5 -0
- package/dist/commands/northstars/reviews.js +15 -3
- package/dist/commands/spaces/auto-executor/runs.d.ts +9 -1
- package/dist/commands/spaces/auto-executor/runs.js +18 -1
- package/dist/commands/spaces/heartbeats/create.js +7 -5
- package/dist/commands/spaces/heartbeats/update.js +5 -3
- package/dist/commands/store/artifacts/releases.d.ts +20 -0
- package/dist/commands/store/artifacts/releases.js +85 -0
- package/dist/commands/store/library.d.ts +14 -0
- package/dist/commands/store/library.js +71 -0
- package/dist/commands/tasks/list.d.ts +48 -0
- package/dist/commands/tasks/list.js +141 -9
- package/dist/commands/tasks/remind.js +23 -11
- package/dist/commands/tasks/retry-schedule.js +6 -3
- package/dist/commands/tasks/schedule.js +29 -7
- package/dist/commands/tasks/show.js +4 -0
- package/dist/lib/agent-trigger-listing.d.ts +26 -0
- package/dist/lib/agent-trigger-listing.js +63 -0
- package/dist/lib/agentic-stream.js +138 -41
- package/dist/lib/commitment-ledgers.js +3 -1
- package/dist/lib/commitments.d.ts +24 -0
- package/dist/lib/commitments.js +64 -4
- package/dist/lib/compasses.d.ts +2 -0
- package/dist/lib/iso-instant.d.ts +52 -0
- package/dist/lib/iso-instant.js +162 -0
- package/dist/lib/northstars.d.ts +43 -0
- package/dist/lib/northstars.js +122 -6
- package/dist/lib/proposals.js +6 -2
- package/dist/lib/store-artifact-releases.d.ts +39 -0
- package/dist/lib/store-artifact-releases.js +12 -0
- package/dist/lib/store-library.d.ts +37 -0
- package/dist/lib/store-library.js +12 -0
- package/dist/lib/task-calendar.d.ts +19 -0
- package/dist/lib/task-calendar.js +72 -0
- package/dist/lib/task-recurrence-outcome.js +3 -1
- package/dist/lib/task-recurrence-summary.d.ts +15 -0
- package/dist/lib/task-recurrence-summary.js +228 -0
- package/dist/lib/task-reminder.d.ts +28 -0
- package/dist/lib/task-reminder.js +50 -0
- package/dist/lib/triggers.d.ts +13 -2
- package/dist/lib/triggers.js +22 -12
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonWire.js +11 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/executorStopReceipt.d.ts +123 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/executorStopReceipt.js +160 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +1 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +17 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonWire.js +11 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/executorStopReceipt.d.ts +123 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/executorStopReceipt.js +173 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +1 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +2 -0
- package/dist/node_modules/@skrr-ai/auth-core/package.json +1 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +6755 -6672
- package/oclif.manifest.json +263 -29
- package/package.json +1 -1
|
@@ -29,7 +29,7 @@ class LookbackPlansCreate extends base_command_1.BaseCommand {
|
|
|
29
29
|
try {
|
|
30
30
|
const result = await lookbackPlans_1.lookbackPlansApi.create(body);
|
|
31
31
|
if (flags.json) {
|
|
32
|
-
this.
|
|
32
|
+
this.printJsonResult(result);
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
// The four create commands say when the server recorded weaker provenance than the CLI
|
|
@@ -96,7 +96,7 @@ function emptyListMessage(input) {
|
|
|
96
96
|
exports.ALIAS_MARKER = '*';
|
|
97
97
|
function harnessNameCell(row) {
|
|
98
98
|
// The same rule the web sidebar renders (OSK-9290): a name stored under an
|
|
99
|
-
// older spelling or
|
|
99
|
+
// older spelling or retired-brand name is not a second product.
|
|
100
100
|
const name = row.name ? (0, data_provider_1.canonicalizeHarnessLabel)(row.name) : (0, format_1.formatCell)(row.name);
|
|
101
101
|
return (0, harness_labels_1.isAliasCoveringSharedName)(row) ? `${exports.ALIAS_MARKER} ${name}` : name;
|
|
102
102
|
}
|
|
@@ -45,7 +45,7 @@ class NorthstarsGovernanceConfigure extends base_command_1.BaseCommand {
|
|
|
45
45
|
multiple: true,
|
|
46
46
|
}),
|
|
47
47
|
'require-approval-for': core_1.Flags.string({
|
|
48
|
-
description:
|
|
48
|
+
description: `Change class that always needs a human (repeatable; replaces the current list). ${northstars_1.CRITICAL_COMMITMENT_APPROVAL_NOTE}. With critical_commitment removed, a bounded_auto review may apply a one-tier-step promotion to critical without asking`,
|
|
49
49
|
options: [...northstars_1.NORTHSTAR_APPROVAL_TRIGGERS],
|
|
50
50
|
multiple: true,
|
|
51
51
|
}),
|
|
@@ -74,14 +74,13 @@ class NorthstarsIntentsDecide extends base_command_1.BaseCommand {
|
|
|
74
74
|
(ctx.decision === 'reject' && verdict === 'rejected'));
|
|
75
75
|
if (alreadyHolds) {
|
|
76
76
|
if (flags.json) {
|
|
77
|
-
this.
|
|
78
|
-
ok: true,
|
|
77
|
+
this.printJsonResult({
|
|
79
78
|
verdict,
|
|
80
79
|
replayed: true,
|
|
81
80
|
...(body.decidedAt ? { decidedAt: body.decidedAt } : {}),
|
|
82
81
|
...(body.decidedByYou !== undefined ? { decidedByYou: body.decidedByYou } : {}),
|
|
83
82
|
reasonText: text,
|
|
84
|
-
}
|
|
83
|
+
});
|
|
85
84
|
}
|
|
86
85
|
else {
|
|
87
86
|
this.log(`${args.intentId} → ${verdict}`);
|
|
@@ -46,6 +46,11 @@ class NorthstarsReviewNow extends base_command_1.BaseCommand {
|
|
|
46
46
|
this.log(`Review ${String(review.id)} (${String(review.status)})`);
|
|
47
47
|
}
|
|
48
48
|
this.log((0, northstars_1.describeReviewAllocations)(result));
|
|
49
|
+
// The allocation above gives each commitment at least 1/day; when the budget is smaller than
|
|
50
|
+
// the number of active commitments that adds up to more than the budget (OSK-21334).
|
|
51
|
+
const floorNote = (0, northstars_1.runBudgetFloorNote)(result.runBudgetFloor);
|
|
52
|
+
if (floorNote)
|
|
53
|
+
this.log(` ! ${floorNote}`);
|
|
49
54
|
this.log(`Applied ${String(result.appliedIntents ?? 0)} intent(s)`);
|
|
50
55
|
if (governanceRun) {
|
|
51
56
|
this.log(governanceRun.reserved
|
|
@@ -28,20 +28,32 @@ class NorthstarsReviews extends base_command_1.BaseCommand {
|
|
|
28
28
|
description: 'Filter by review status',
|
|
29
29
|
options: [...northstars_1.NORTHSTAR_REVIEW_STATUSES],
|
|
30
30
|
}),
|
|
31
|
-
review: core_1.Flags.string({
|
|
31
|
+
review: core_1.Flags.string({
|
|
32
|
+
description: 'Show ONE review in full, including its intents. Takes the full id or the short form `intents list` prints in REVIEW',
|
|
33
|
+
}),
|
|
32
34
|
wide: northstars_1.northstarWideFlag,
|
|
33
35
|
};
|
|
34
36
|
async run() {
|
|
35
37
|
this.requireAuth();
|
|
36
38
|
const { args, flags } = await this.parse(NorthstarsReviews);
|
|
37
39
|
if (flags.review) {
|
|
38
|
-
let
|
|
40
|
+
let looked;
|
|
39
41
|
try {
|
|
40
|
-
|
|
42
|
+
// The full id, or the short form `northstars intents list` prints in REVIEW.
|
|
43
|
+
looked = await (0, northstars_1.lookupReview)(args.northstarId, flags.review);
|
|
41
44
|
}
|
|
42
45
|
catch (err) {
|
|
43
46
|
this.handleApiError(err);
|
|
44
47
|
}
|
|
48
|
+
if ('ambiguous' in looked) {
|
|
49
|
+
this.failWithCliError({
|
|
50
|
+
message: `\`${flags.review}\` is the start of ${looked.ambiguous.length} reviews of this northstar (${looked.ambiguous.join(', ')}). Pass more of the id.`,
|
|
51
|
+
code: 'REVIEW_REF_AMBIGUOUS',
|
|
52
|
+
exit: 2,
|
|
53
|
+
retryable: false,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
const review = looked.review;
|
|
45
57
|
if (flags.json) {
|
|
46
58
|
this.log(JSON.stringify(review, null, 2));
|
|
47
59
|
return;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import { type SpaceJudgmentTurnRecord } from '@skrr-ai/data-provider';
|
|
1
|
+
import { type SpaceJudgmentTurnRecord, type SpaceOrchestrationRunsResponse } from '@skrr-ai/data-provider';
|
|
2
2
|
import { BaseCommand } from '../../../base-command';
|
|
3
3
|
/** Who held the Space's judgment turn at this tick (OSK-18003). */
|
|
4
4
|
export declare function judgmentTurnLabel(turn?: SpaceJudgmentTurnRecord): string;
|
|
5
|
+
/**
|
|
6
|
+
* The first line of `runs`. The server's `enabled` is "the routine is active", which is false for a
|
|
7
|
+
* board the SYSTEM put to sleep as well as for one its owner turned off, so `runs` printed
|
|
8
|
+
* "Orchestration: disabled" for a sleeping board while `preview` said "enabled (sleeping: …)".
|
|
9
|
+
* Those are different states with different remedies (a task event wakes one; only the owner
|
|
10
|
+
* re-enables the other).
|
|
11
|
+
*/
|
|
12
|
+
export declare function orchestrationLine(result: Pick<SpaceOrchestrationRunsResponse, 'enabled' | 'autoExecuteEnabled' | 'lifecycleState' | 'suspensionReason'>): string;
|
|
5
13
|
export default class SpacesAutoExecutorRuns extends BaseCommand {
|
|
6
14
|
static description: string;
|
|
7
15
|
static examples: string[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.judgmentTurnLabel = judgmentTurnLabel;
|
|
4
|
+
exports.orchestrationLine = orchestrationLine;
|
|
4
5
|
const core_1 = require("@oclif/core");
|
|
5
6
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
6
7
|
const base_command_1 = require("../../../base-command");
|
|
@@ -16,6 +17,22 @@ function judgmentTurnLabel(turn) {
|
|
|
16
17
|
}
|
|
17
18
|
return ' turn: unreadable, Leader stood down';
|
|
18
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* The first line of `runs`. The server's `enabled` is "the routine is active", which is false for a
|
|
22
|
+
* board the SYSTEM put to sleep as well as for one its owner turned off, so `runs` printed
|
|
23
|
+
* "Orchestration: disabled" for a sleeping board while `preview` said "enabled (sleeping: …)".
|
|
24
|
+
* Those are different states with different remedies (a task event wakes one; only the owner
|
|
25
|
+
* re-enables the other).
|
|
26
|
+
*/
|
|
27
|
+
function orchestrationLine(result) {
|
|
28
|
+
if (result.autoExecuteEnabled === false)
|
|
29
|
+
return 'Orchestration: disabled (turned off by the owner)';
|
|
30
|
+
if (result.autoExecuteEnabled === true && result.lifecycleState === 'sleeping') {
|
|
31
|
+
const why = result.suspensionReason ? `: ${result.suspensionReason.replace(/_/g, ' ')}` : '';
|
|
32
|
+
return `Orchestration: sleeping${why} — enabled; a task that can start, or \`run\`, wakes it`;
|
|
33
|
+
}
|
|
34
|
+
return `Orchestration: ${result.enabled ? 'enabled' : 'disabled'}`;
|
|
35
|
+
}
|
|
19
36
|
class SpacesAutoExecutorRuns extends base_command_1.BaseCommand {
|
|
20
37
|
static description = "List a space's recent auto-orchestration runs and its Lead health";
|
|
21
38
|
static examples = [
|
|
@@ -46,7 +63,7 @@ class SpacesAutoExecutorRuns extends base_command_1.BaseCommand {
|
|
|
46
63
|
this.log(JSON.stringify((0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, spaceRef, 'execution', { result }), null, 2));
|
|
47
64
|
return;
|
|
48
65
|
}
|
|
49
|
-
this.log(
|
|
66
|
+
this.log(orchestrationLine(result));
|
|
50
67
|
this.log(`Lead health: ${result.leadHealth}`);
|
|
51
68
|
if (result.consecutiveFailures > 0) {
|
|
52
69
|
this.log(`Failures: ${result.consecutiveFailures} consecutive`);
|
|
@@ -8,8 +8,8 @@ const space_output_1 = require("../../../lib/space-output");
|
|
|
8
8
|
class SpacesHeartbeatsCreate extends base_command_1.BaseCommand {
|
|
9
9
|
static description = 'Create a heartbeat for an agent in a space';
|
|
10
10
|
static examples = [
|
|
11
|
-
'<%= config.bin %> spaces heartbeats create <space-id> --agent <agent-id> --frequency
|
|
12
|
-
'<%= config.bin %> spaces heartbeats create <space-id> --agent <agent-id> --frequency
|
|
11
|
+
'<%= config.bin %> spaces heartbeats create <space-id> --agent <agent-id> --frequency daily --prompt "Good morning"',
|
|
12
|
+
'<%= config.bin %> spaces heartbeats create <space-id> --agent <agent-id> --frequency 4h --prompt "Brief" --timezone America/New_York',
|
|
13
13
|
'<%= config.bin %> spaces heartbeats create <space-id> --from-json heartbeat.json',
|
|
14
14
|
];
|
|
15
15
|
static args = {
|
|
@@ -21,10 +21,12 @@ class SpacesHeartbeatsCreate extends base_command_1.BaseCommand {
|
|
|
21
21
|
description: 'Path to a JSON file (or "-" for stdin) to use as the request body',
|
|
22
22
|
}),
|
|
23
23
|
agent: core_1.Flags.string({ description: 'Agent ID (required unless set via --from-json)' }),
|
|
24
|
-
frequency: core_1.Flags.string({
|
|
24
|
+
frequency: core_1.Flags.string({
|
|
25
|
+
description: 'How often it runs, as a ladder key: 1m, 2m, 5m, 10m, 15m, 30m, hourly, 2h, 4h, 8h, daily, 2d, 4d, weekly, 2w. Not a cron expression. The time of day is fixed by the key (daily is 09:00 in --timezone).',
|
|
26
|
+
}),
|
|
25
27
|
prompt: core_1.Flags.string({ description: 'Prompt sent to the agent on each heartbeat' }),
|
|
26
28
|
timezone: core_1.Flags.string({
|
|
27
|
-
description: 'Timezone
|
|
29
|
+
description: 'Timezone the schedule runs in (e.g. America/New_York)',
|
|
28
30
|
}),
|
|
29
31
|
'max-unread-before-extend': core_1.Flags.integer({
|
|
30
32
|
description: 'Max unread messages before extending the schedule (1-10)',
|
|
@@ -63,7 +65,7 @@ class SpacesHeartbeatsCreate extends base_command_1.BaseCommand {
|
|
|
63
65
|
});
|
|
64
66
|
}
|
|
65
67
|
if (!payload.frequency || typeof payload.frequency !== 'string') {
|
|
66
|
-
this.error('A frequency is required. Pass --frequency <
|
|
68
|
+
this.error('A frequency is required. Pass --frequency <key> (for example daily, or 4h) or include it in --from-json.', {
|
|
67
69
|
exit: 1,
|
|
68
70
|
});
|
|
69
71
|
}
|
|
@@ -8,7 +8,7 @@ const space_output_1 = require("../../../lib/space-output");
|
|
|
8
8
|
class SpacesHeartbeatsUpdate extends base_command_1.BaseCommand {
|
|
9
9
|
static description = 'Update a heartbeat for an agent in a space';
|
|
10
10
|
static examples = [
|
|
11
|
-
'<%= config.bin %> spaces heartbeats update <space-id> <agent-id> --frequency
|
|
11
|
+
'<%= config.bin %> spaces heartbeats update <space-id> <agent-id> --frequency weekly',
|
|
12
12
|
'<%= config.bin %> spaces heartbeats update <space-id> <agent-id> --enabled false',
|
|
13
13
|
'<%= config.bin %> spaces heartbeats update <space-id> <agent-id> --from-json patch.json',
|
|
14
14
|
];
|
|
@@ -21,9 +21,11 @@ class SpacesHeartbeatsUpdate extends base_command_1.BaseCommand {
|
|
|
21
21
|
'from-json': core_1.Flags.string({
|
|
22
22
|
description: 'Path to a JSON file (or "-" for stdin) to use as the patch body',
|
|
23
23
|
}),
|
|
24
|
-
frequency: core_1.Flags.string({
|
|
24
|
+
frequency: core_1.Flags.string({
|
|
25
|
+
description: 'How often it runs, as a ladder key: 1m, 2m, 5m, 10m, 15m, 30m, hourly, 2h, 4h, 8h, daily, 2d, 4d, weekly, 2w. Not a cron expression. The time of day is fixed by the key (daily is 09:00 in --timezone).',
|
|
26
|
+
}),
|
|
25
27
|
prompt: core_1.Flags.string({ description: 'Prompt sent to the agent on each heartbeat' }),
|
|
26
|
-
timezone: core_1.Flags.string({ description: 'Timezone
|
|
28
|
+
timezone: core_1.Flags.string({ description: 'Timezone the schedule runs in' }),
|
|
27
29
|
enabled: core_1.Flags.boolean({ description: 'Enable or disable the heartbeat', allowNo: true }),
|
|
28
30
|
'max-unread-before-extend': core_1.Flags.integer({
|
|
29
31
|
description: 'Max unread messages before extending (1-10)',
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
/**
|
|
3
|
+
* Your own publication history for one skill, newest first, with the admission
|
|
4
|
+
* state a curator left on each release. `store artifacts receipt` reads one
|
|
5
|
+
* release in full.
|
|
6
|
+
*/
|
|
7
|
+
export default class StoreArtifactsReleases extends BaseCommand {
|
|
8
|
+
static description: string;
|
|
9
|
+
static examples: string[];
|
|
10
|
+
static args: {
|
|
11
|
+
entityType: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
12
|
+
entityId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
13
|
+
};
|
|
14
|
+
static flags: {
|
|
15
|
+
limit: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
before: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
};
|
|
19
|
+
run(): Promise<void>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
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 format_1 = require("../../../lib/format");
|
|
6
|
+
const list_output_1 = require("../../../lib/list-output");
|
|
7
|
+
const store_artifact_releases_1 = require("../../../lib/store-artifact-releases");
|
|
8
|
+
/**
|
|
9
|
+
* Your own publication history for one skill, newest first, with the admission
|
|
10
|
+
* state a curator left on each release. `store artifacts receipt` reads one
|
|
11
|
+
* release in full.
|
|
12
|
+
*/
|
|
13
|
+
class StoreArtifactsReleases extends base_command_1.BaseCommand {
|
|
14
|
+
static description = 'List the releases you published for your own skill, newest first, with each release’s admission state and review note';
|
|
15
|
+
static examples = [
|
|
16
|
+
'<%= config.bin %> store artifacts releases skill <skill-id>',
|
|
17
|
+
'<%= config.bin %> store artifacts releases skill <skill-id> --limit 50 --json',
|
|
18
|
+
'<%= config.bin %> store artifacts releases skill <skill-id> --before 7',
|
|
19
|
+
];
|
|
20
|
+
static args = {
|
|
21
|
+
// The history route is served for skills only. An action release is read
|
|
22
|
+
// one at a time with `store artifacts receipt action <id> <releaseId>`.
|
|
23
|
+
entityType: core_1.Args.string({
|
|
24
|
+
required: true,
|
|
25
|
+
ignoreStdin: true,
|
|
26
|
+
options: ['skill'],
|
|
27
|
+
description: 'Only skills have a release history read; for an action use `receipt`',
|
|
28
|
+
}),
|
|
29
|
+
entityId: core_1.Args.string({ required: true, ignoreStdin: true, description: 'Skill id' }),
|
|
30
|
+
};
|
|
31
|
+
static flags = {
|
|
32
|
+
limit: core_1.Flags.integer({ description: 'How many releases (1-50)', min: 1, max: 50 }),
|
|
33
|
+
before: core_1.Flags.integer({
|
|
34
|
+
description: 'Only releases numbered below this one (the page cursor printed with a page)',
|
|
35
|
+
min: 1,
|
|
36
|
+
}),
|
|
37
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
38
|
+
};
|
|
39
|
+
async run() {
|
|
40
|
+
this.requireAuth();
|
|
41
|
+
const { args, flags } = await this.parse(StoreArtifactsReleases);
|
|
42
|
+
let history;
|
|
43
|
+
try {
|
|
44
|
+
history = await (0, store_artifact_releases_1.listSkillArtifactReleases)(args.entityId, {
|
|
45
|
+
limit: flags.limit,
|
|
46
|
+
before: flags.before,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
this.handleApiError(error);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const releases = history?.data ?? [];
|
|
54
|
+
const nextBefore = history?.nextBefore ?? null;
|
|
55
|
+
if (flags.json) {
|
|
56
|
+
this.printJsonResult((0, list_output_1.listResult)({ data: releases, next_cursor: nextBefore === null ? null : String(nextBefore) }, 'data'));
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (releases.length === 0) {
|
|
60
|
+
this.log('No releases published for this skill.');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
(0, format_1.renderTable)(releases.map((release) => ({
|
|
64
|
+
number: String(release.releaseNumber),
|
|
65
|
+
release: release.releaseId,
|
|
66
|
+
version: release.versionLabel ?? '-',
|
|
67
|
+
status: release.status ?? '-',
|
|
68
|
+
admission: release.admission?.state ?? '-',
|
|
69
|
+
note: release.admission?.review?.note ?? '-',
|
|
70
|
+
published: release.publishedAt ? String(release.publishedAt).slice(0, 10) : '-',
|
|
71
|
+
})), [
|
|
72
|
+
{ key: 'number', header: '#' },
|
|
73
|
+
{ key: 'release', header: 'RELEASE' },
|
|
74
|
+
{ key: 'version', header: 'VERSION' },
|
|
75
|
+
{ key: 'status', header: 'STATUS' },
|
|
76
|
+
{ key: 'admission', header: 'ADMISSION' },
|
|
77
|
+
{ key: 'note', header: 'REVIEW NOTE', maxWidth: 40 },
|
|
78
|
+
{ key: 'published', header: 'PUBLISHED' },
|
|
79
|
+
], (line) => this.log(line));
|
|
80
|
+
if (nextBefore !== null) {
|
|
81
|
+
this.log(`More: run again with --before ${nextBefore}`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
exports.default = StoreArtifactsReleases;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
/**
|
|
3
|
+
* The Skill, Action and Service copies you bought, and whether each can still
|
|
4
|
+
* be used (the web Library page). `store installs` lists the Agent purchases;
|
|
5
|
+
* this is the other three kinds.
|
|
6
|
+
*/
|
|
7
|
+
export default class StoreLibrary extends BaseCommand {
|
|
8
|
+
static description: string;
|
|
9
|
+
static examples: string[];
|
|
10
|
+
static flags: {
|
|
11
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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 format_1 = require("../../lib/format");
|
|
6
|
+
const store_library_1 = require("../../lib/store-library");
|
|
7
|
+
const workspaces_1 = require("../../lib/workspaces");
|
|
8
|
+
const KINDS = [
|
|
9
|
+
['skill', 'skills'],
|
|
10
|
+
['action', 'actions'],
|
|
11
|
+
['service', 'services'],
|
|
12
|
+
];
|
|
13
|
+
/**
|
|
14
|
+
* The Skill, Action and Service copies you bought, and whether each can still
|
|
15
|
+
* be used (the web Library page). `store installs` lists the Agent purchases;
|
|
16
|
+
* this is the other three kinds.
|
|
17
|
+
*/
|
|
18
|
+
class StoreLibrary extends base_command_1.BaseCommand {
|
|
19
|
+
static description = 'List the Skill, Action and Service copies you bought from the Store and whether each is still usable (Agent purchases: `store installs`)';
|
|
20
|
+
static examples = [
|
|
21
|
+
'<%= config.bin %> store library',
|
|
22
|
+
'<%= config.bin %> store library --json',
|
|
23
|
+
];
|
|
24
|
+
static flags = {
|
|
25
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
26
|
+
};
|
|
27
|
+
async run() {
|
|
28
|
+
this.requireAuth();
|
|
29
|
+
const { flags } = await this.parse(StoreLibrary);
|
|
30
|
+
const workspaceId = await (0, workspaces_1.ambientWorkspaceId)();
|
|
31
|
+
let library;
|
|
32
|
+
try {
|
|
33
|
+
library = await (0, store_library_1.getStoreLibraryItems)(workspaceId);
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
this.handleApiError(error);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (flags.json) {
|
|
40
|
+
this.printJsonResult({ workspaceId: workspaceId ?? null, ...library });
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const rows = KINDS.flatMap(([kind, key]) => (library?.[key] ?? []).map((item) => ({
|
|
44
|
+
kind,
|
|
45
|
+
source: item.sourceId,
|
|
46
|
+
copy: item.copyId ?? '-',
|
|
47
|
+
name: item.name ?? '-',
|
|
48
|
+
// `copyAvailable` is the server's verdict; the states say why when it is false.
|
|
49
|
+
state: item.copyAvailable ? 'available' : 'unavailable',
|
|
50
|
+
reason: item.copyAvailable
|
|
51
|
+
? '-'
|
|
52
|
+
: [item.entitlementState, item.fulfillmentState].filter(Boolean).join(' / ') ||
|
|
53
|
+
'copy missing',
|
|
54
|
+
})));
|
|
55
|
+
if (rows.length === 0) {
|
|
56
|
+
this.log(workspaceId
|
|
57
|
+
? `No Skill, Action or Service purchases found in workspace ${workspaceId}.`
|
|
58
|
+
: 'No Skill, Action or Service purchases found; select a workspace with --workspace to check another scope.');
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
(0, format_1.renderTable)(rows, [
|
|
62
|
+
{ key: 'kind', header: 'KIND' },
|
|
63
|
+
{ key: 'source', header: 'SOURCE' },
|
|
64
|
+
{ key: 'copy', header: 'YOUR COPY' },
|
|
65
|
+
{ key: 'name', header: 'NAME', maxWidth: 32 },
|
|
66
|
+
{ key: 'state', header: 'STATE' },
|
|
67
|
+
{ key: 'reason', header: 'REASON', maxWidth: 36 },
|
|
68
|
+
], (line) => this.log(line));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.default = StoreLibrary;
|
|
@@ -2,6 +2,40 @@ import type { TaskListParams } from '@skrr-ai/data-provider';
|
|
|
2
2
|
import { BaseCommand } from '../../base-command';
|
|
3
3
|
import { type ListWarning } from '../../lib/list-output';
|
|
4
4
|
type ListFlags = Record<string, unknown>;
|
|
5
|
+
/** Which workspace a list reads, and why (OSK-21284). */
|
|
6
|
+
export type ListWorkspaceScope = {
|
|
7
|
+
source: 'all';
|
|
8
|
+
} | {
|
|
9
|
+
source: 'default';
|
|
10
|
+
workspaceId: string;
|
|
11
|
+
workspaceName?: string;
|
|
12
|
+
workspaceCount: number;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A plain `tasks list` named no workspace, and the server answers that with a list across EVERY
|
|
16
|
+
* workspace the person belongs to. Its access filter has branches that belong to no single
|
|
17
|
+
* workspace, so no index can serve it in order: on production it timed out after about 6 s while
|
|
18
|
+
* the same list naming a workspace answered in about a second. `skrr workspaces list` already says
|
|
19
|
+
* an unselected session "resolves to your default workspace"; a list now reads it too.
|
|
20
|
+
*
|
|
21
|
+
* --all-workspaces the old, wider list, asked for by name (`workspaceScope=all`)
|
|
22
|
+
* a selected workspace, `--workspace`, or `skrr workspaces use` untouched: the choice stands
|
|
23
|
+
* an autonomous Agent session untouched: a workspace-less Agent session stays personal
|
|
24
|
+
* `--space`, `--calendar` untouched: a Space names its own scope
|
|
25
|
+
*
|
|
26
|
+
* Returns nothing when there is nothing to apply, and `source: 'default'` when the caller's
|
|
27
|
+
* default workspace should be used. `lookupDefault` is injected so the rule is tested without the
|
|
28
|
+
* network; a lookup that fails or finds no default changes nothing.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveListWorkspace(flags: {
|
|
31
|
+
'all-workspaces'?: boolean;
|
|
32
|
+
space?: string;
|
|
33
|
+
calendar?: string;
|
|
34
|
+
}, env: NodeJS.ProcessEnv, lookupDefault: () => Promise<{
|
|
35
|
+
id: string;
|
|
36
|
+
name?: string;
|
|
37
|
+
count: number;
|
|
38
|
+
} | null>): Promise<ListWorkspaceScope | undefined>;
|
|
5
39
|
/**
|
|
6
40
|
* E12: inside an agent session an unfiltered `tasks list --json` returned the
|
|
7
41
|
* first page of EVERYTHING, which in practice was cancelled test tasks. When the
|
|
@@ -51,6 +85,19 @@ export declare function nextColumnWidth(rows: Array<{
|
|
|
51
85
|
* is the one name an agent scanning 43 keys does not guess (OSK-10692).
|
|
52
86
|
*/
|
|
53
87
|
export declare function taskRef(t: Record<string, unknown>): string;
|
|
88
|
+
/**
|
|
89
|
+
* A calendar row in `--json`: the Task it places, by the names `tasks show` resolves.
|
|
90
|
+
*
|
|
91
|
+
* The server's occurrence `id` is `<taskId>:<kind>:<instant>`, a key for the occurrence, and the
|
|
92
|
+
* list shaping every other `tasks list` row gets (`ref` and `url` read off the row itself, and
|
|
93
|
+
* `nextAction` off its actionability) turned it into an `id`, a `url` and a `ref` that named
|
|
94
|
+
* nothing: `tasks show` refused the first two and the third was "-" (OSK-21586, OSK-21587). So the
|
|
95
|
+
* row's `id`, `ref` and `url` are the Task's, and the occurrence key is `occurrenceId`. A missing
|
|
96
|
+
* answer is `null`, never a placeholder.
|
|
97
|
+
*/
|
|
98
|
+
export declare function calendarJsonRow(baseURL: string, row: Record<string, unknown>): Record<string, unknown>;
|
|
99
|
+
/** The calendar response with its rows made addressable; everything else stays as the server sent it. */
|
|
100
|
+
export declare function calendarJsonResponse(baseURL: string, response: unknown): unknown;
|
|
54
101
|
/** Evidence about managed execution only; unmanaged work is outside this projection. */
|
|
55
102
|
export declare function taskExecution(t: Record<string, unknown>): Record<string, unknown>;
|
|
56
103
|
export declare function taskPageSummary(items: Array<Record<string, unknown>>, hasMore: boolean): {
|
|
@@ -123,6 +170,7 @@ export default class TasksList extends BaseCommand {
|
|
|
123
170
|
'explicit-only': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
124
171
|
subscribed: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
125
172
|
'include-snoozed': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
173
|
+
'all-workspaces': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
126
174
|
'external-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
127
175
|
'external-key-prefix': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
128
176
|
'description-format': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|