@skrr-ai/cli 0.1.69 → 0.1.71
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/commands/agents/chat.js +7 -2
- package/dist/commands/harnesses/leases/billing.d.ts +2 -1
- package/dist/commands/harnesses/leases/billing.js +8 -3
- package/dist/commands/machines/dedicated/create.d.ts +1 -0
- package/dist/commands/machines/dedicated/create.js +9 -8
- package/dist/commands/machines/dedicated/restore.d.ts +1 -0
- package/dist/commands/machines/dedicated/restore.js +7 -1
- package/dist/commands/machines/dedicated/spending-limit.d.ts +3 -2
- package/dist/commands/machines/dedicated/spending-limit.js +7 -3
- package/dist/commands/store/installs.js +7 -2
- package/dist/commands/store/updates.js +2 -0
- package/dist/commands/workspaces/list.js +1 -0
- package/dist/lib/dedicated-machines.d.ts +5 -5
- package/dist/lib/dedicated-machines.js +7 -5
- package/dist/lib/dedicated-service.js +2 -0
- package/dist/node_modules/@skrr-ai/data-provider/index.js +1 -1
- package/oclif.manifest.json +34766 -34720
- package/package.json +1 -1
|
@@ -374,6 +374,8 @@ class AgentsChat extends base_command_1.BaseCommand {
|
|
|
374
374
|
async run() {
|
|
375
375
|
this.requireAuth();
|
|
376
376
|
const { args, flags } = await this.parse(AgentsChat);
|
|
377
|
+
if (flags.quick && flags.task)
|
|
378
|
+
this.error('--task requires a runtime session; remove --quick to bind this turn.', { exit: 2 });
|
|
377
379
|
if (flags.json && !flags['no-stream'] && !flags.quick) {
|
|
378
380
|
this.error('--json is only supported with --no-stream or --quick; use --jsonl for streaming.', {
|
|
379
381
|
exit: 2,
|
|
@@ -413,6 +415,7 @@ class AgentsChat extends base_command_1.BaseCommand {
|
|
|
413
415
|
}
|
|
414
416
|
}
|
|
415
417
|
// OSK-2946 — resolve the explicit binding, or warn that there isn't one.
|
|
418
|
+
let boundTaskId;
|
|
416
419
|
let taskContextBlock = null;
|
|
417
420
|
if (flags.task) {
|
|
418
421
|
let task;
|
|
@@ -423,6 +426,7 @@ class AgentsChat extends base_command_1.BaseCommand {
|
|
|
423
426
|
this.handleApiError(err);
|
|
424
427
|
}
|
|
425
428
|
const taskId = String(task.id ?? flags.task);
|
|
429
|
+
boundTaskId = taskId;
|
|
426
430
|
taskContextBlock = [
|
|
427
431
|
'You are working on a specific skrr task. This is your canonical scope:',
|
|
428
432
|
` task id: ${taskId}`,
|
|
@@ -441,8 +445,8 @@ class AgentsChat extends base_command_1.BaseCommand {
|
|
|
441
445
|
` skrr tasks complete ${taskId} --summary "<what you did>" --deliverables "<refs>"`,
|
|
442
446
|
'',
|
|
443
447
|
'This is a chat turn, not a managed task run: the task is NOT checked out and its ' +
|
|
444
|
-
'status is not managed for you.
|
|
445
|
-
'
|
|
448
|
+
'status is not managed for you. The runtime session is bound to this task for ' +
|
|
449
|
+
'task context and artifact uploads; use the canonical id above.',
|
|
446
450
|
].join('\n');
|
|
447
451
|
if (!flags.jsonl) {
|
|
448
452
|
this.log(`Bound to task ${task.identifier ?? taskId} (chat turn — task not checked out)`);
|
|
@@ -515,6 +519,7 @@ class AgentsChat extends base_command_1.BaseCommand {
|
|
|
515
519
|
try {
|
|
516
520
|
started = await data_provider_1.dataService.startAgenticChat({
|
|
517
521
|
agentId: args.agentId,
|
|
522
|
+
taskId: boundTaskId,
|
|
518
523
|
text: contextParts ? `${contextParts}\n\n${prompt}` : prompt,
|
|
519
524
|
conversationId: threadConversationId,
|
|
520
525
|
workspaceId: process.env.OVERSKY_WORKSPACE_ID,
|
|
@@ -17,8 +17,9 @@ export default class HarnessesLeasesBilling extends BaseCommand {
|
|
|
17
17
|
lease: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
18
18
|
};
|
|
19
19
|
static flags: {
|
|
20
|
+
'no-spending-limit': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
20
21
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
21
|
-
'spending-limit-cents': import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
22
|
+
'spending-limit-cents': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
22
23
|
};
|
|
23
24
|
run(): Promise<void>;
|
|
24
25
|
}
|
|
@@ -33,25 +33,30 @@ class HarnessesLeasesBilling extends base_command_1.BaseCommand {
|
|
|
33
33
|
lease: core_1.Args.string({ ignoreStdin: true, description: 'Lease ID', required: true }),
|
|
34
34
|
};
|
|
35
35
|
static flags = {
|
|
36
|
+
'no-spending-limit': core_1.Flags.boolean({ description: 'Remove a Dedicated Runtime cap. Other hosted products refuse this.', exclusive: ['spending-limit-cents'] }),
|
|
36
37
|
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
37
38
|
'spending-limit-cents': core_1.Flags.integer({
|
|
38
39
|
description: 'New monthly cap in cents. Refused below what the month has already spent or is projected to. Who pays for a lease is set at create and cannot be changed.',
|
|
39
|
-
|
|
40
|
+
exclusive: ['no-spending-limit'],
|
|
40
41
|
min: 1,
|
|
41
42
|
}),
|
|
42
43
|
};
|
|
43
44
|
async run() {
|
|
44
45
|
this.requireAuth();
|
|
45
46
|
const { args, flags } = await this.parse(HarnessesLeasesBilling);
|
|
47
|
+
if (flags['spending-limit-cents'] === undefined && !flags['no-spending-limit']) {
|
|
48
|
+
this.error('Choose --spending-limit-cents or --no-spending-limit.', { exit: 2 });
|
|
49
|
+
}
|
|
46
50
|
try {
|
|
47
51
|
const response = await (0, harnesses_1.setHarnessLeaseBilling)(args.lease, {
|
|
48
|
-
spendingLimitCents: flags['spending-limit-cents'],
|
|
52
|
+
spendingLimitCents: flags['no-spending-limit'] ? null : flags['spending-limit-cents'],
|
|
49
53
|
});
|
|
50
54
|
if (flags.json) {
|
|
51
55
|
this.log(JSON.stringify(response, null, 2));
|
|
52
56
|
return;
|
|
53
57
|
}
|
|
54
|
-
this.log(`${args.lease} monthly spending cap
|
|
58
|
+
this.log(flags['no-spending-limit'] ? `${args.lease} has no monthly spending cap.` :
|
|
59
|
+
`${args.lease} monthly spending cap set to $${(flags['spending-limit-cents'] / 100).toFixed(2)}.`);
|
|
55
60
|
}
|
|
56
61
|
catch (err) {
|
|
57
62
|
this.handleApiError(err);
|
|
@@ -13,6 +13,7 @@ export default class DedicatedMachinesCreate extends DedicatedLeaseCommand {
|
|
|
13
13
|
'retention-class': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
14
|
'backup-profile': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
15
|
'spending-limit-cents': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
'no-spending-limit': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
17
|
repository: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
18
|
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
19
|
'request-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
@@ -41,13 +41,14 @@ class DedicatedMachinesCreate extends dedicated_lease_command_1.DedicatedLeaseCo
|
|
|
41
41
|
'backup-profile': core_1.Flags.string({
|
|
42
42
|
description: 'crash-consistent (AWS Backup) or application-consistent (guest fsfreeze while the daemon is reachable; scheduled DLM when that plan is enabled). Defaults to the product catalog value.',
|
|
43
43
|
}),
|
|
44
|
-
// Not required, and no client-side value either. Every lease has a cap:
|
|
45
|
-
// when create names none, the server applies the product's default cap,
|
|
46
|
-
// the "default monthly cap" `machines dedicated catalog` shows. Marking the
|
|
47
|
-
// flag required contradicted that catalog line (OSK-8691), and restating
|
|
48
|
-
// the default here would be the `--storage-gb` bug above.
|
|
49
44
|
'spending-limit-cents': core_1.Flags.integer({
|
|
50
|
-
description:
|
|
45
|
+
description: 'Optional monthly spending cap in cents. New machines default to no cap; restore inherits the source cap.',
|
|
46
|
+
min: 1,
|
|
47
|
+
exclusive: ['no-spending-limit'],
|
|
48
|
+
}),
|
|
49
|
+
'no-spending-limit': core_1.Flags.boolean({
|
|
50
|
+
description: 'Run without a monthly spending cap. Compute and retained storage still bill.',
|
|
51
|
+
exclusive: ['spending-limit-cents'],
|
|
51
52
|
}),
|
|
52
53
|
repository: core_1.Flags.string({
|
|
53
54
|
description: 'Default GitHub repository (owner/repo) for git credentials on the machine. Requires the GitHub App installed for it; a clone of another repository the App covers still works.',
|
|
@@ -81,7 +82,7 @@ class DedicatedMachinesCreate extends dedicated_lease_command_1.DedicatedLeaseCo
|
|
|
81
82
|
requestId,
|
|
82
83
|
displayName: flags.name,
|
|
83
84
|
sizePreset,
|
|
84
|
-
monthlySpendingLimitCents: flags['spending-limit-cents'],
|
|
85
|
+
monthlySpendingLimitCents: flags['no-spending-limit'] ? null : flags['spending-limit-cents'],
|
|
85
86
|
regionClass: flags['region-class'],
|
|
86
87
|
storageGb: flags['storage-gb'],
|
|
87
88
|
retentionClass: flags['retention-class'],
|
|
@@ -100,7 +101,7 @@ class DedicatedMachinesCreate extends dedicated_lease_command_1.DedicatedLeaseCo
|
|
|
100
101
|
sizePreset,
|
|
101
102
|
storageGb: flags['storage-gb'],
|
|
102
103
|
retentionClass: flags['retention-class'],
|
|
103
|
-
spendingLimitCents: flags['spending-limit-cents'],
|
|
104
|
+
spendingLimitCents: flags['no-spending-limit'] ? null : flags['spending-limit-cents'],
|
|
104
105
|
});
|
|
105
106
|
if (flags['dry-run']) {
|
|
106
107
|
if (flags.json) {
|
|
@@ -25,6 +25,7 @@ export default class DedicatedMachinesRestore extends DedicatedLeaseCommand {
|
|
|
25
25
|
interval: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
26
26
|
name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
27
27
|
'spending-limit-cents': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
28
|
+
'no-spending-limit': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
28
29
|
'request-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
29
30
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
30
31
|
};
|
|
@@ -36,8 +36,13 @@ class DedicatedMachinesRestore extends dedicated_lease_command_1.DedicatedLeaseC
|
|
|
36
36
|
description: 'Display name for the new machine (defaults to the deleted one, "(restored)")',
|
|
37
37
|
}),
|
|
38
38
|
'spending-limit-cents': core_1.Flags.integer({
|
|
39
|
-
description:
|
|
39
|
+
description: 'Optional monthly spending cap in cents. New machines default to no cap; restore inherits the source cap.',
|
|
40
40
|
min: 1,
|
|
41
|
+
exclusive: ['no-spending-limit'],
|
|
42
|
+
}),
|
|
43
|
+
'no-spending-limit': core_1.Flags.boolean({
|
|
44
|
+
description: 'Run without a monthly spending cap. Compute and retained storage still bill.',
|
|
45
|
+
exclusive: ['spending-limit-cents'],
|
|
41
46
|
}),
|
|
42
47
|
'request-id': core_1.Flags.string({
|
|
43
48
|
description: 'Idempotency key. Reuse it to safely retry the same restore.',
|
|
@@ -53,6 +58,7 @@ class DedicatedMachinesRestore extends dedicated_lease_command_1.DedicatedLeaseC
|
|
|
53
58
|
...this.scopeFrom(flags),
|
|
54
59
|
requestId,
|
|
55
60
|
...(flags.name ? { displayName: flags.name } : {}),
|
|
61
|
+
...(flags['no-spending-limit'] ? { monthlySpendingLimitCents: null } : {}),
|
|
56
62
|
...(flags['spending-limit-cents'] !== undefined
|
|
57
63
|
? { monthlySpendingLimitCents: flags['spending-limit-cents'] }
|
|
58
64
|
: {}),
|
|
@@ -2,7 +2,7 @@ import { DedicatedLeaseCommand } from '../../../lib/dedicated-lease-command';
|
|
|
2
2
|
/**
|
|
3
3
|
* `skrr machines dedicated spending-limit` — change the monthly cap after create.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* An optional cap is a spending guardrail on a machine with no wall-clock TTL: when a
|
|
6
6
|
* month's spend reaches it, the platform stops compute and keeps the workspace.
|
|
7
7
|
* It could be set at create and changed from the web lease card, but not from
|
|
8
8
|
* here — so an operator who hit it at 2am had to find a browser to raise it,
|
|
@@ -15,7 +15,8 @@ export default class DedicatedMachinesSpendingLimit extends DedicatedLeaseComman
|
|
|
15
15
|
lease: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
16
16
|
};
|
|
17
17
|
static flags: {
|
|
18
|
-
cents: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
cents: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
+
'no-spending-limit': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
20
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
20
21
|
};
|
|
21
22
|
run(): Promise<void>;
|
|
@@ -6,7 +6,7 @@ const dedicated_machines_1 = require("../../../lib/dedicated-machines");
|
|
|
6
6
|
/**
|
|
7
7
|
* `skrr machines dedicated spending-limit` — change the monthly cap after create.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* An optional cap is a spending guardrail on a machine with no wall-clock TTL: when a
|
|
10
10
|
* month's spend reaches it, the platform stops compute and keeps the workspace.
|
|
11
11
|
* It could be set at create and changed from the web lease card, but not from
|
|
12
12
|
* here — so an operator who hit it at 2am had to find a browser to raise it,
|
|
@@ -28,16 +28,20 @@ class DedicatedMachinesSpendingLimit extends dedicated_lease_command_1.Dedicated
|
|
|
28
28
|
static flags = {
|
|
29
29
|
cents: core_1.Flags.integer({
|
|
30
30
|
description: 'New monthly cap in cents (30000 = $300). Refused below what this month has already spent or is projected to.',
|
|
31
|
-
|
|
31
|
+
exclusive: ['no-spending-limit'],
|
|
32
32
|
min: 1,
|
|
33
33
|
}),
|
|
34
|
+
'no-spending-limit': core_1.Flags.boolean({ description: 'Remove the cap. Compute and storage still bill.', exclusive: ['cents'] }),
|
|
34
35
|
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
35
36
|
};
|
|
36
37
|
async run() {
|
|
37
38
|
this.requireAuth();
|
|
38
39
|
const { args, flags } = await this.parse(DedicatedMachinesSpendingLimit);
|
|
40
|
+
if (flags.cents === undefined && !flags['no-spending-limit']) {
|
|
41
|
+
this.error('Choose --cents or --no-spending-limit.', { exit: 2 });
|
|
42
|
+
}
|
|
39
43
|
const leaseId = await this.resolveLeaseArg(args.lease);
|
|
40
|
-
const response = await this.callDedicated(() => (0, dedicated_machines_1.setDedicatedRuntimeSpendingLimit)(leaseId, flags.cents, this.scopeFrom(flags)));
|
|
44
|
+
const response = await this.callDedicated(() => (0, dedicated_machines_1.setDedicatedRuntimeSpendingLimit)(leaseId, flags['no-spending-limit'] ? null : flags.cents, this.scopeFrom(flags)));
|
|
41
45
|
if (flags.json) {
|
|
42
46
|
this.log(JSON.stringify(response, null, 2));
|
|
43
47
|
return;
|
|
@@ -4,6 +4,7 @@ const core_1 = require("@oclif/core");
|
|
|
4
4
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
5
|
const base_command_1 = require("../../base-command");
|
|
6
6
|
const format_1 = require("../../lib/format");
|
|
7
|
+
const workspaces_1 = require("../../lib/workspaces");
|
|
7
8
|
/** The buyer's installed copies, including stopped copies and their source releases. */
|
|
8
9
|
class StoreInstalls extends base_command_1.BaseCommand {
|
|
9
10
|
static description = 'List your Store installs and the releases they came from';
|
|
@@ -17,6 +18,8 @@ class StoreInstalls extends base_command_1.BaseCommand {
|
|
|
17
18
|
async run() {
|
|
18
19
|
this.requireAuth();
|
|
19
20
|
const { flags } = await this.parse(StoreInstalls);
|
|
21
|
+
const workspaceId = await (0, workspaces_1.ambientWorkspaceId)();
|
|
22
|
+
(0, data_provider_1.setWorkspaceIdHeader)(workspaceId ?? null);
|
|
20
23
|
let response;
|
|
21
24
|
try {
|
|
22
25
|
response = await data_provider_1.dataService.getStoreInstalls();
|
|
@@ -27,11 +30,13 @@ class StoreInstalls extends base_command_1.BaseCommand {
|
|
|
27
30
|
}
|
|
28
31
|
const installs = response?.installs ?? [];
|
|
29
32
|
if (flags.json) {
|
|
30
|
-
this.log(JSON.stringify({ object: 'list', data: installs }, null, 2));
|
|
33
|
+
this.log(JSON.stringify({ object: 'list', workspaceId: workspaceId ?? null, data: installs }, null, 2));
|
|
31
34
|
return;
|
|
32
35
|
}
|
|
33
36
|
if (installs.length === 0) {
|
|
34
|
-
this.log(
|
|
37
|
+
this.log(workspaceId
|
|
38
|
+
? `No Store installs found in workspace ${workspaceId}.`
|
|
39
|
+
: 'No Store installs found; select a workspace with --workspace to check another scope.');
|
|
35
40
|
return;
|
|
36
41
|
}
|
|
37
42
|
(0, format_1.renderTable)(installs.map((install) => ({
|
|
@@ -4,6 +4,7 @@ const core_1 = require("@oclif/core");
|
|
|
4
4
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
5
|
const base_command_1 = require("../../base-command");
|
|
6
6
|
const format_1 = require("../../lib/format");
|
|
7
|
+
const workspaces_1 = require("../../lib/workspaces");
|
|
7
8
|
/**
|
|
8
9
|
* What is waiting on you across everything you installed.
|
|
9
10
|
*
|
|
@@ -37,6 +38,7 @@ class StoreUpdates extends base_command_1.BaseCommand {
|
|
|
37
38
|
async run() {
|
|
38
39
|
this.requireAuth();
|
|
39
40
|
const { flags } = await this.parse(StoreUpdates);
|
|
41
|
+
(0, data_provider_1.setWorkspaceIdHeader)((await (0, workspaces_1.ambientWorkspaceId)()) ?? null);
|
|
40
42
|
let installs;
|
|
41
43
|
try {
|
|
42
44
|
installs = await data_provider_1.dataService.getStoreInstalls();
|
|
@@ -30,6 +30,7 @@ class WorkspacesList extends base_command_1.BaseCommand {
|
|
|
30
30
|
if (flags.json) {
|
|
31
31
|
this.log(JSON.stringify({
|
|
32
32
|
selected: current ?? null,
|
|
33
|
+
defaultWorkspaceId: listing.defaultWorkspaceId,
|
|
33
34
|
workspaces: rows.map((r) => ({ ...r, inUse: r.id === current })),
|
|
34
35
|
}, null, 2));
|
|
35
36
|
return;
|
|
@@ -244,7 +244,7 @@ export interface CreateDedicatedRuntimeInput extends DedicatedRuntimeScope {
|
|
|
244
244
|
storageGb?: number;
|
|
245
245
|
retentionClass?: string;
|
|
246
246
|
backupProfile?: 'crash-consistent' | 'application-consistent';
|
|
247
|
-
monthlySpendingLimitCents?: number;
|
|
247
|
+
monthlySpendingLimitCents?: number | null;
|
|
248
248
|
repositoryRef?: string;
|
|
249
249
|
}
|
|
250
250
|
export interface DedicatedRuntimeResponse {
|
|
@@ -267,7 +267,7 @@ export declare function dedicatedRuntimeCreateInput(input: {
|
|
|
267
267
|
requestId: string;
|
|
268
268
|
displayName: string;
|
|
269
269
|
sizePreset: string;
|
|
270
|
-
monthlySpendingLimitCents?: number;
|
|
270
|
+
monthlySpendingLimitCents?: number | null;
|
|
271
271
|
regionClass?: string;
|
|
272
272
|
storageGb?: number;
|
|
273
273
|
retentionClass?: string;
|
|
@@ -345,7 +345,7 @@ export declare function growDedicatedRuntime(leaseId: string, storageGb: number,
|
|
|
345
345
|
*/
|
|
346
346
|
export declare function restoreDeletedDedicatedRuntime(leaseId: string, options?: {
|
|
347
347
|
displayName?: string;
|
|
348
|
-
monthlySpendingLimitCents?: number;
|
|
348
|
+
monthlySpendingLimitCents?: number | null;
|
|
349
349
|
requestId?: string;
|
|
350
350
|
} & DedicatedRuntimeScope): Promise<DedicatedRuntimeResponse>;
|
|
351
351
|
/**
|
|
@@ -356,7 +356,7 @@ export declare function restoreDeletedDedicatedRuntime(leaseId: string, options?
|
|
|
356
356
|
* already spent (or is projected to) is refused rather than stopping the machine
|
|
357
357
|
* on the next reconciler pass.
|
|
358
358
|
*/
|
|
359
|
-
export declare function setDedicatedRuntimeSpendingLimit(leaseId: string, spendingLimitCents: number, scope?: DedicatedRuntimeScope): Promise<DedicatedRuntimeResponse>;
|
|
359
|
+
export declare function setDedicatedRuntimeSpendingLimit(leaseId: string, spendingLimitCents: number | null, scope?: DedicatedRuntimeScope): Promise<DedicatedRuntimeResponse>;
|
|
360
360
|
export declare function closeDedicatedRuntimeIncidentHold(leaseId: string, options?: {
|
|
361
361
|
requestId?: string;
|
|
362
362
|
} & DedicatedRuntimeScope): Promise<DedicatedRuntimeResponse>;
|
|
@@ -687,7 +687,7 @@ export interface DedicatedCreateChoices {
|
|
|
687
687
|
sizePreset: string;
|
|
688
688
|
storageGb?: number;
|
|
689
689
|
retentionClass?: string;
|
|
690
|
-
spendingLimitCents?: number;
|
|
690
|
+
spendingLimitCents?: number | null;
|
|
691
691
|
}
|
|
692
692
|
/**
|
|
693
693
|
* What a create is about to buy, in the words and numbers the catalog uses.
|
|
@@ -569,15 +569,16 @@ function dedicatedSpendSummary(lease) {
|
|
|
569
569
|
const billing = lease.billing;
|
|
570
570
|
if (!billing)
|
|
571
571
|
return '-';
|
|
572
|
-
const cap = billing.monthlySpendLimitCents
|
|
572
|
+
const cap = billing.monthlySpendLimitCents !== undefined
|
|
573
|
+
? billing.monthlySpendLimitCents : billing.spendingLimitCents;
|
|
573
574
|
if (billing.spendStatusUnavailable) {
|
|
574
|
-
return `spend unavailable right now · cap ${formatUsdCents(cap)}`;
|
|
575
|
+
return `spend unavailable right now · ${cap === null ? 'no monthly cap' : `cap ${formatUsdCents(cap)}`}`;
|
|
575
576
|
}
|
|
576
577
|
const spent = billing.currentMonthSpendCents;
|
|
577
578
|
const projected = billing.projectedCurrentMonthSpendCents;
|
|
578
579
|
const parts = [
|
|
579
580
|
`${formatUsdCents(spent)} this month for machines of this type`,
|
|
580
|
-
`${formatUsdCents(cap)} cap for this machine`,
|
|
581
|
+
cap === null ? 'no monthly cap' : `${formatUsdCents(cap)} cap for this machine`,
|
|
581
582
|
];
|
|
582
583
|
if (typeof projected === 'number' && projected !== spent) {
|
|
583
584
|
parts.push(`projected ${formatUsdCents(projected)}`);
|
|
@@ -1117,10 +1118,11 @@ function dedicatedCreateSummary(catalog, choices) {
|
|
|
1117
1118
|
? `${retentionClass}${choices.retentionClass === undefined ? ' (catalog default)' : ''}`
|
|
1118
1119
|
: 'server default';
|
|
1119
1120
|
const retains = retentionClass !== undefined && retentionClass !== 'none';
|
|
1120
|
-
const capCents = choices.spendingLimitCents
|
|
1121
|
+
const capCents = choices.spendingLimitCents !== undefined
|
|
1122
|
+
? choices.spendingLimitCents : catalog?.defaultMonthlySpendingLimitCents;
|
|
1121
1123
|
const cap = capCents !== undefined && capCents !== null
|
|
1122
1124
|
? `${formatUsdCents(capCents)} per month${choices.spendingLimitCents === undefined ? ' (catalog default)' : ''}`
|
|
1123
|
-
: 'server default';
|
|
1125
|
+
: capCents === null ? 'no cap — compute and retained storage still bill' : 'server default';
|
|
1124
1126
|
return [
|
|
1125
1127
|
`Create Dedicated Runtime "${choices.name}" — it bills while it runs:`,
|
|
1126
1128
|
` size ${choices.sizePreset} — ${spec}`,
|
|
@@ -416,6 +416,8 @@ function socketOptions(token) {
|
|
|
416
416
|
path: '/ws/agentic',
|
|
417
417
|
auth: {
|
|
418
418
|
token,
|
|
419
|
+
// This proves origin only; the normal CLI token retains full execution authority.
|
|
420
|
+
...(process.env.OVERSKY_SESSION_TOKEN ? { executionOriginToken: process.env.OVERSKY_SESSION_TOKEN } : {}),
|
|
419
421
|
...(0, data_provider_1.getClientIdentityAuth)(),
|
|
420
422
|
clientPlatform: 'cli',
|
|
421
423
|
clientOs: process.platform === 'darwin' ? 'macos' : process.platform,
|
|
@@ -46685,7 +46685,7 @@ var gR = Object.freeze({ __proto__: null, acceptAgentIntuition: function(e2, t2,
|
|
|
46685
46685
|
});
|
|
46686
46686
|
}, startAgenticChat: function(e2) {
|
|
46687
46687
|
var t2, n2, o2 = { endpoint: "agents", endpointType: "agents", agent_id: e2.agentId, conversationId: null !== (t2 = e2.conversationId) && void 0 !== t2 ? t2 : "new", text: e2.text, endpointOption: { endpoint: "agents", agent_id: e2.agentId } };
|
|
46688
|
-
return e2.context && (o2.context = e2.context), e2.workspaceId && (o2.workspaceId = e2.workspaceId), (null === (n2 = e2.skillRefs) || void 0 === n2 ? void 0 : n2.length) && (o2.skillRefs = e2.skillRefs), e2.executionEnvironment && (o2.executionEnvironment = e2.executionEnvironment), e2.preferredDaemonId && (o2.preferredDaemonId = e2.preferredDaemonId), e2.permissionMode && (o2.permissionMode = e2.permissionMode), oR.post(mc(), o2);
|
|
46688
|
+
return e2.taskId && (o2.taskId = e2.taskId), e2.context && (o2.context = e2.context), e2.workspaceId && (o2.workspaceId = e2.workspaceId), (null === (n2 = e2.skillRefs) || void 0 === n2 ? void 0 : n2.length) && (o2.skillRefs = e2.skillRefs), e2.executionEnvironment && (o2.executionEnvironment = e2.executionEnvironment), e2.preferredDaemonId && (o2.preferredDaemonId = e2.preferredDaemonId), e2.permissionMode && (o2.permissionMode = e2.permissionMode), oR.post(mc(), o2);
|
|
46689
46689
|
}, startAllTasks: function(e2) {
|
|
46690
46690
|
return oR.post(fa(e2));
|
|
46691
46691
|
}, startConnectOnboarding: function(e2) {
|