@skrr-ai/cli 0.1.31 → 0.1.33
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/bin/run.js +2 -2
- package/dist/commands/agents/list.d.ts +2 -1
- package/dist/commands/agents/list.js +2 -1
- package/dist/commands/agents/show.js +2 -1
- package/dist/commands/balance/statement.js +8 -4
- package/dist/commands/browser/install.js +6 -2
- package/dist/commands/browser/uninstall.js +6 -2
- package/dist/commands/code/acp.js +2 -1
- package/dist/commands/code/doctor.d.ts +1 -1
- package/dist/commands/code/doctor.js +6 -5
- package/dist/commands/code/handover.d.ts +2 -2
- package/dist/commands/code/handover.js +2 -2
- package/dist/commands/code/index.d.ts +2 -2
- package/dist/commands/code/index.js +18 -17
- package/dist/commands/code/install.d.ts +3 -3
- package/dist/commands/code/install.js +18 -11
- package/dist/commands/code/migrate.js +3 -2
- package/dist/commands/code/oversky-agent.d.ts +5 -4
- package/dist/commands/code/oversky-agent.js +24 -22
- package/dist/commands/code/run.js +2 -1
- package/dist/commands/harnesses/list.d.ts +9 -1
- package/dist/commands/harnesses/list.js +28 -7
- package/dist/commands/harnesses/show.js +7 -2
- package/dist/commands/instructions/install.js +16 -6
- package/dist/commands/learning/delete.d.ts +9 -0
- package/dist/commands/learning/delete.js +39 -0
- package/dist/commands/learning/export.d.ts +5 -0
- package/dist/commands/learning/export.js +22 -0
- package/dist/commands/learning/reset.d.ts +9 -0
- package/dist/commands/learning/reset.js +34 -0
- package/dist/commands/learning/set.d.ts +10 -0
- package/dist/commands/learning/set.js +52 -0
- package/dist/commands/learning/status.d.ts +8 -0
- package/dist/commands/learning/status.js +35 -0
- package/dist/commands/logout.js +10 -5
- package/dist/commands/machines/dedicated/attach.js +2 -1
- package/dist/commands/tasks/runs.js +3 -1
- package/dist/commands/workspaces/use.js +2 -1
- package/dist/lib/adaptive-learning.d.ts +37 -0
- package/dist/lib/adaptive-learning.js +39 -0
- package/dist/lib/code-handover.d.ts +1 -1
- package/dist/lib/code-handover.js +3 -2
- package/dist/lib/config.d.ts +30 -4
- package/dist/lib/config.js +2 -1
- package/dist/lib/daemon-installer.d.ts +1 -1
- package/dist/lib/daemon-target.js +2 -2
- package/dist/lib/dedicated-lease-command.js +2 -1
- package/dist/lib/dedicated-machines.d.ts +2 -2
- package/dist/lib/dedicated-machines.js +6 -3
- package/dist/lib/exec-runtime-binary.d.ts +2 -2
- package/dist/lib/exec-runtime-binary.js +2 -2
- package/dist/lib/{sky-code-agent.d.ts → first-party-harness-agent.d.ts} +20 -19
- package/dist/lib/{sky-code-agent.js → first-party-harness-agent.js} +85 -47
- package/dist/lib/{sky-code-broker.d.ts → first-party-harness-broker.d.ts} +6 -6
- package/dist/lib/{sky-code-broker.js → first-party-harness-broker.js} +23 -23
- package/dist/lib/{sky-code-doctor.d.ts → first-party-harness-doctor.d.ts} +12 -2
- package/dist/lib/{sky-code-doctor.js → first-party-harness-doctor.js} +181 -94
- package/dist/lib/{sky-code-managed.d.ts → first-party-harness-managed.d.ts} +55 -30
- package/dist/lib/{sky-code-managed.js → first-party-harness-managed.js} +92 -35
- package/dist/lib/{sky-code.d.ts → first-party-harness.d.ts} +107 -36
- package/dist/lib/{sky-code.js → first-party-harness.js} +172 -73
- package/dist/lib/harness-provider-input.d.ts +35 -0
- package/dist/lib/harness-provider-input.js +57 -0
- package/dist/lib/harness-tiers.d.ts +8 -2
- package/dist/lib/harness-tiers.js +11 -6
- package/dist/lib/task-instruction-offer.js +10 -4
- package/dist/lib/worklogs.js +2 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/configRoot.d.ts +2 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/configRoot.js +2 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarness.d.ts +248 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarness.js +361 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessChannels.d.ts +147 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessChannels.js +180 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessHome.d.ts +111 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessHome.js +314 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/harnessTrust.d.ts +11 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/harnessTrust.js +14 -7
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +3 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +51 -14
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/releaseManifest.js +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/spawnEnv.d.ts +4 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/spawnEnv.js +4 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/configRoot.d.ts +2 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/configRoot.js +2 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarness.d.ts +248 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarness.js +332 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessChannels.d.ts +147 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessChannels.js +170 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessHome.d.ts +111 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessHome.js +303 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/harnessTrust.d.ts +11 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/harnessTrust.js +14 -7
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +3 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +12 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/releaseManifest.js +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/spawnEnv.d.ts +4 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/spawnEnv.js +4 -4
- package/dist/node_modules/@skrr-ai/auth-core/package.json +11 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +4816 -4782
- package/dist/node_modules/@skrr-ai/inference-broker/dist/cjs/index.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/inference-broker/dist/cjs/index.js +1 -1
- package/dist/node_modules/@skrr-ai/inference-broker/dist/cjs/managed-inference-broker.js +1 -1
- package/dist/node_modules/@skrr-ai/inference-broker/dist/esm/index.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/inference-broker/dist/esm/index.js +1 -1
- package/dist/node_modules/@skrr-ai/inference-broker/dist/esm/managed-inference-broker.js +1 -1
- package/dist/node_modules/@skrr-ai/inference-broker/package.json +1 -1
- package/oclif.manifest.json +27119 -26808
- package/package.json +5 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/skyCodeChannels.d.ts +0 -96
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/skyCodeChannels.js +0 -115
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/skyCodeChannels.d.ts +0 -96
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/skyCodeChannels.js +0 -107
package/bin/run.js
CHANGED
|
@@ -98,11 +98,11 @@ if (missingBuildPath) {
|
|
|
98
98
|
|
|
99
99
|
const oclif = require('@oclif/core');
|
|
100
100
|
|
|
101
|
-
// The workspace this machine works in (`
|
|
101
|
+
// The workspace this machine works in (`skrr workspaces use`) becomes
|
|
102
102
|
// `OVERSKY_WORKSPACE_ID` before any command runs, so every reader of that
|
|
103
103
|
// variable honours the selection without learning about a config file.
|
|
104
104
|
//
|
|
105
|
-
// Here rather than in `BaseCommand.init` because `
|
|
105
|
+
// Here rather than in `BaseCommand.init` because `skrr code` deliberately does
|
|
106
106
|
// not extend BaseCommand, and it is the command that needed this most.
|
|
107
107
|
//
|
|
108
108
|
// Best-effort: a read-only home or a corrupt config means "no selection", and a
|
|
@@ -17,7 +17,8 @@ export declare function agentRow(a: Record<string, unknown>): {
|
|
|
17
17
|
* showed a bare `No agents.` and named no next step, which is what the
|
|
18
18
|
* `commitments/list.ts` empty state was fixed to stop doing. Point at the
|
|
19
19
|
* shortest path a new user actually wants (`skrr code`, which lazily creates
|
|
20
|
-
* a
|
|
20
|
+
* a default agent for the first-party harness), and at `agents create` for the
|
|
21
|
+
* explicit path.
|
|
21
22
|
*
|
|
22
23
|
* Exported and pure so the wording is testable without an oclif runtime.
|
|
23
24
|
*/
|
|
@@ -27,7 +27,8 @@ function agentRow(a) {
|
|
|
27
27
|
* showed a bare `No agents.` and named no next step, which is what the
|
|
28
28
|
* `commitments/list.ts` empty state was fixed to stop doing. Point at the
|
|
29
29
|
* shortest path a new user actually wants (`skrr code`, which lazily creates
|
|
30
|
-
* a
|
|
30
|
+
* a default agent for the first-party harness), and at `agents create` for the
|
|
31
|
+
* explicit path.
|
|
31
32
|
*
|
|
32
33
|
* Exported and pure so the wording is testable without an oclif runtime.
|
|
33
34
|
*/
|
|
@@ -5,6 +5,7 @@ exports.agentExecutionOrderLines = agentExecutionOrderLines;
|
|
|
5
5
|
const core_1 = require("@oclif/core");
|
|
6
6
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
7
7
|
const base_command_1 = require("../../base-command");
|
|
8
|
+
const harness_provider_input_1 = require("../../lib/harness-provider-input");
|
|
8
9
|
const web_url_1 = require("../../lib/web-url");
|
|
9
10
|
const hosted_machines_1 = require("../../lib/hosted-machines");
|
|
10
11
|
/**
|
|
@@ -148,7 +149,7 @@ class AgentsShow extends base_command_1.BaseCommand {
|
|
|
148
149
|
for (const line of agentExecutionOrderLines(a))
|
|
149
150
|
this.log(line);
|
|
150
151
|
if (a.harnessName || a.harnessProvider || a.harnessStatus) {
|
|
151
|
-
this.log(`Harness: ${a.harnessName ?? a.harnessProvider ?? '-'}${a.harnessStatus ? ` (${a.harnessStatus})` : ''}`);
|
|
152
|
+
this.log(`Harness: ${a.harnessName ?? (typeof a.harnessProvider === 'string' ? (0, harness_provider_input_1.canonicalHarnessInput)(a.harnessProvider) : a.harnessProvider) ?? '-'}${a.harnessStatus ? ` (${a.harnessStatus})` : ''}`);
|
|
152
153
|
// An offline engine is the difference between "this agent works" and
|
|
153
154
|
// "this agent silently does nothing", and the display name alone cannot
|
|
154
155
|
// carry it: two runtimes for the same machine share an identical name,
|
|
@@ -9,6 +9,7 @@ exports.workspaceStatementOwnerOnlyMessage = workspaceStatementOwnerOnlyMessage;
|
|
|
9
9
|
const core_1 = require("@oclif/core");
|
|
10
10
|
const base_command_1 = require("../../base-command");
|
|
11
11
|
const format_1 = require("../../lib/format");
|
|
12
|
+
const harness_provider_input_1 = require("../../lib/harness-provider-input");
|
|
12
13
|
const balance_1 = require("../../lib/balance");
|
|
13
14
|
/**
|
|
14
15
|
* The canonical stored-value ledger — what a charge was FOR, and what incurred it.
|
|
@@ -145,10 +146,13 @@ class BalanceStatement extends base_command_1.BaseCommand {
|
|
|
145
146
|
event: (0, format_1.formatCell)(entry.eventType),
|
|
146
147
|
service: (0, format_1.formatCell)(entry.service),
|
|
147
148
|
model: (0, balance_1.displayModel)(entry.model),
|
|
148
|
-
// Which skrr product/harness billed it (
|
|
149
|
-
// in --json but never printed, so a human could not tell a code
|
|
150
|
-
// from a hosted run (OSK-4825).
|
|
151
|
-
|
|
149
|
+
// Which skrr product/harness billed it (the first-party harness, hosted,
|
|
150
|
+
// …). It was in --json but never printed, so a human could not tell a code
|
|
151
|
+
// session from a hosted run (OSK-4825). Canonical spelling, so a ledger
|
|
152
|
+
// written on both sides of a rename does not show one harness as two.
|
|
153
|
+
provider: (0, format_1.formatCell)(typeof entry.provider === 'string'
|
|
154
|
+
? (0, harness_provider_input_1.canonicalHarnessInput)(entry.provider)
|
|
155
|
+
: entry.provider),
|
|
152
156
|
// OSK-7641 — the command promises "what incurred it", and a bare
|
|
153
157
|
// session UUID does not answer that for anyone running more than one
|
|
154
158
|
// agent. Blank rather than '-' when the producer did not record one, so
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
|
+
const auth_core_1 = require("@skrr-ai/auth-core");
|
|
5
|
+
const harness_provider_input_1 = require("../../lib/harness-provider-input");
|
|
4
6
|
const browser_1 = require("../browser");
|
|
5
7
|
class BrowserInstall extends core_1.Command {
|
|
6
8
|
static description = 'Add a sentinel-owned skrr Browser MCP entry without overwriting user configuration';
|
|
@@ -10,7 +12,7 @@ class BrowserInstall extends core_1.Command {
|
|
|
10
12
|
// runtime this forwards to. Stating them only there meant a bare
|
|
11
13
|
// `skrr browser install` edited every detected harness config with
|
|
12
14
|
// nothing in this help to say so.
|
|
13
|
-
description:
|
|
15
|
+
description: `all, claude, codex, generic, or ${auth_core_1.FIRST_PARTY_HARNESS.provider}. \`all\` touches every detected ` +
|
|
14
16
|
'harness config and cannot be combined with --config.',
|
|
15
17
|
default: 'all',
|
|
16
18
|
}),
|
|
@@ -21,8 +23,10 @@ class BrowserInstall extends core_1.Command {
|
|
|
21
23
|
async run() {
|
|
22
24
|
const { flags } = await this.parse(BrowserInstall);
|
|
23
25
|
const args = ['install'];
|
|
26
|
+
// Any spelling of the first-party harness is accepted here and handed to the
|
|
27
|
+
// daemon in the spelling every installed daemon understands.
|
|
24
28
|
if (flags.harness)
|
|
25
|
-
args.push('--harness', flags.harness);
|
|
29
|
+
args.push('--harness', (0, harness_provider_input_1.daemonHarnessArgument)(flags.harness));
|
|
26
30
|
if (flags.config)
|
|
27
31
|
args.push('--config', flags.config);
|
|
28
32
|
if (flags['dry-run'])
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
|
+
const auth_core_1 = require("@skrr-ai/auth-core");
|
|
5
|
+
const harness_provider_input_1 = require("../../lib/harness-provider-input");
|
|
4
6
|
const browser_1 = require("../browser");
|
|
5
7
|
class BrowserUninstall extends core_1.Command {
|
|
6
8
|
static description = 'Remove only the skrr Browser MCP entries owned by this installation';
|
|
@@ -10,7 +12,7 @@ class BrowserUninstall extends core_1.Command {
|
|
|
10
12
|
// runtime this forwards to. Stating them only there meant a bare
|
|
11
13
|
// `skrr browser uninstall` edited every detected harness config with
|
|
12
14
|
// nothing in this help to say so.
|
|
13
|
-
description:
|
|
15
|
+
description: `all, claude, codex, generic, or ${auth_core_1.FIRST_PARTY_HARNESS.provider}. \`all\` touches every detected ` +
|
|
14
16
|
'harness config and cannot be combined with --config.',
|
|
15
17
|
default: 'all',
|
|
16
18
|
}),
|
|
@@ -21,8 +23,10 @@ class BrowserUninstall extends core_1.Command {
|
|
|
21
23
|
async run() {
|
|
22
24
|
const { flags } = await this.parse(BrowserUninstall);
|
|
23
25
|
const args = ['uninstall'];
|
|
26
|
+
// Any spelling of the first-party harness is accepted here and handed to the
|
|
27
|
+
// daemon in the spelling every installed daemon understands.
|
|
24
28
|
if (flags.harness)
|
|
25
|
-
args.push('--harness', flags.harness);
|
|
29
|
+
args.push('--harness', (0, harness_provider_input_1.daemonHarnessArgument)(flags.harness));
|
|
26
30
|
if (flags.config)
|
|
27
31
|
args.push('--config', flags.config);
|
|
28
32
|
if (flags['dry-run'])
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
|
+
const auth_core_1 = require("@skrr-ai/auth-core");
|
|
4
5
|
const index_1 = require("./index");
|
|
5
6
|
/**
|
|
6
7
|
* `skrr code acp` — speak the Agent Client Protocol over stdio.
|
|
@@ -16,7 +17,7 @@ const index_1 = require("./index");
|
|
|
16
17
|
* harness bug from a daemon bug.
|
|
17
18
|
*/
|
|
18
19
|
class CodeAcp extends core_1.Command {
|
|
19
|
-
static description =
|
|
20
|
+
static description = `Run the ${auth_core_1.FIRST_PARTY_HARNESS.displayName} ACP server over stdio (used by the skrr daemon)`;
|
|
20
21
|
static strict = false;
|
|
21
22
|
static examples = ['<%= config.bin %> code acp'];
|
|
22
23
|
async run() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command } from '@oclif/core';
|
|
2
2
|
/**
|
|
3
|
-
* `skrr code doctor` — diagnose the local
|
|
3
|
+
* `skrr code doctor` — diagnose the local first-party harness installation.
|
|
4
4
|
*
|
|
5
5
|
* Deliberately does NOT forward to the engine. The most important thing this
|
|
6
6
|
* command can tell you is that the engine is missing or unresolvable, and a
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
|
-
const
|
|
4
|
+
const auth_core_1 = require("@skrr-ai/auth-core");
|
|
5
|
+
const first_party_harness_doctor_1 = require("../../lib/first-party-harness-doctor");
|
|
5
6
|
/**
|
|
6
|
-
* `skrr code doctor` — diagnose the local
|
|
7
|
+
* `skrr code doctor` — diagnose the local first-party harness installation.
|
|
7
8
|
*
|
|
8
9
|
* Deliberately does NOT forward to the engine. The most important thing this
|
|
9
10
|
* command can tell you is that the engine is missing or unresolvable, and a
|
|
@@ -15,7 +16,7 @@ const sky_code_doctor_1 = require("../../lib/sky-code-doctor");
|
|
|
15
16
|
* command entirely.
|
|
16
17
|
*/
|
|
17
18
|
class CodeDoctor extends core_1.Command {
|
|
18
|
-
static description =
|
|
19
|
+
static description = `Diagnose the local ${auth_core_1.FIRST_PARTY_HARNESS.displayName} engine, config sources, and trust posture`;
|
|
19
20
|
static examples = [
|
|
20
21
|
'<%= config.bin %> code doctor',
|
|
21
22
|
'<%= config.bin %> code doctor --json',
|
|
@@ -25,12 +26,12 @@ class CodeDoctor extends core_1.Command {
|
|
|
25
26
|
};
|
|
26
27
|
async run() {
|
|
27
28
|
const { flags } = await this.parse(CodeDoctor);
|
|
28
|
-
const report = (0,
|
|
29
|
+
const report = (0, first_party_harness_doctor_1.runDoctor)();
|
|
29
30
|
if (flags.json) {
|
|
30
31
|
this.logJson(report);
|
|
31
32
|
}
|
|
32
33
|
else {
|
|
33
|
-
this.log((0,
|
|
34
|
+
this.log((0, first_party_harness_doctor_1.formatReport)(report));
|
|
34
35
|
}
|
|
35
36
|
if (report.status === 'fail')
|
|
36
37
|
this.exit(1);
|
|
@@ -5,8 +5,8 @@ import { BaseCommand } from '../../base-command';
|
|
|
5
5
|
*
|
|
6
6
|
* ── Why this is a sibling command and not a slash command in the TUI ────────
|
|
7
7
|
*
|
|
8
|
-
* The interactive session's transcript lives inside the
|
|
9
|
-
* is a separately released binary (`resolveEngine` in `lib/
|
|
8
|
+
* The interactive session's transcript lives inside the engine, which
|
|
9
|
+
* is a separately released binary (`resolveEngine` in `lib/first-party-harness.ts`), and
|
|
10
10
|
* the server holds none of it: a managed session calls
|
|
11
11
|
* `/api/agentic/sessions/:id/inference/{admit,release}` and the token endpoints,
|
|
12
12
|
* never `/ingest`. So neither this CLI nor the API can read what was said. The
|
|
@@ -12,8 +12,8 @@ const code_handover_1 = require("../../lib/code-handover");
|
|
|
12
12
|
*
|
|
13
13
|
* ── Why this is a sibling command and not a slash command in the TUI ────────
|
|
14
14
|
*
|
|
15
|
-
* The interactive session's transcript lives inside the
|
|
16
|
-
* is a separately released binary (`resolveEngine` in `lib/
|
|
15
|
+
* The interactive session's transcript lives inside the engine, which
|
|
16
|
+
* is a separately released binary (`resolveEngine` in `lib/first-party-harness.ts`), and
|
|
17
17
|
* the server holds none of it: a managed session calls
|
|
18
18
|
* `/api/agentic/sessions/:id/inference/{admit,release}` and the token endpoints,
|
|
19
19
|
* never `/ingest`. So neither this CLI nor the API can read what was said. The
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from '@oclif/core';
|
|
2
2
|
/**
|
|
3
|
-
* `skrr code` — launch the
|
|
4
|
-
* directory.
|
|
3
|
+
* `skrr code` — launch the first-party harness's interactive coding TUI in the
|
|
4
|
+
* current directory.
|
|
5
5
|
*
|
|
6
6
|
* Bare `skrr code` passes NO subcommand to the engine; the engine's default
|
|
7
7
|
* action is the interactive TUI. Everything after the command is forwarded
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.forwardToEngine = forwardToEngine;
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
5
|
+
const auth_core_1 = require("@skrr-ai/auth-core");
|
|
6
|
+
const first_party_harness_1 = require("../../lib/first-party-harness");
|
|
7
|
+
const first_party_harness_broker_1 = require("../../lib/first-party-harness-broker");
|
|
8
|
+
const first_party_harness_managed_1 = require("../../lib/first-party-harness-managed");
|
|
8
9
|
/**
|
|
9
|
-
* `skrr code` — launch the
|
|
10
|
-
* directory.
|
|
10
|
+
* `skrr code` — launch the first-party harness's interactive coding TUI in the
|
|
11
|
+
* current directory.
|
|
11
12
|
*
|
|
12
13
|
* Bare `skrr code` passes NO subcommand to the engine; the engine's default
|
|
13
14
|
* action is the interactive TUI. Everything after the command is forwarded
|
|
@@ -24,16 +25,16 @@ class Code extends core_1.Command {
|
|
|
24
25
|
// turning the top-level index into prose. Same trade the `skrr daemon`
|
|
25
26
|
// pass-throughs make: the note reaches whoever asks about this command, and
|
|
26
27
|
// nobody else.
|
|
27
|
-
static summary =
|
|
28
|
+
static summary = `Start the ${auth_core_1.FIRST_PARTY_HARNESS.displayName} interactive coding agent in this directory`;
|
|
28
29
|
static description = 'Everything after ' +
|
|
29
30
|
`\`code\` is forwarded to the engine unchanged, so engine flags are not listed here — ` +
|
|
30
|
-
`run
|
|
31
|
-
`flags. ${
|
|
31
|
+
`run \`${auth_core_1.FIRST_PARTY_HARNESS.command} run --help\` for this wrapper, or the engine's own help for its ` +
|
|
32
|
+
`flags. ${first_party_harness_managed_1.SKRR_AGENT_FLAG} is the one flag this wrapper consumes itself.`;
|
|
32
33
|
static strict = false;
|
|
33
34
|
static examples = [
|
|
34
35
|
'<%= config.bin %> code',
|
|
35
36
|
'<%= config.bin %> code --model claude-opus-5',
|
|
36
|
-
`<%= config.bin %> code ${
|
|
37
|
+
`<%= config.bin %> code ${first_party_harness_managed_1.SKRR_AGENT_FLAG} Engineer`,
|
|
37
38
|
'<%= config.bin %> code run "fix the failing test"',
|
|
38
39
|
'<%= config.bin %> code doctor',
|
|
39
40
|
];
|
|
@@ -78,17 +79,17 @@ exports.default = Code;
|
|
|
78
79
|
async function forwardToEngine(cmd, subcommand, passthrough, options = {}) {
|
|
79
80
|
// Unconditional: the engine must never see a flag it does not declare, whether
|
|
80
81
|
// or not this run brokers. `skrr code --agent x` remains the ENGINE's flag.
|
|
81
|
-
const { agentRef, engineArgv } = (0,
|
|
82
|
+
const { agentRef, engineArgv } = (0, first_party_harness_managed_1.takeOverskyAgentFlag)(passthrough);
|
|
82
83
|
// `logToStderr`, never `log`: `skrr code run --json` writes machine-readable
|
|
83
84
|
// output on stdout, and one friendly sentence in the middle of it is a parse
|
|
84
85
|
// error at the other end.
|
|
85
86
|
const say = (line) => cmd.logToStderr(line);
|
|
86
87
|
if (agentRef && !options.managed) {
|
|
87
|
-
say(`${
|
|
88
|
+
say(`${first_party_harness_managed_1.SKRR_AGENT_FLAG} has no effect here — this command does not host a managed ` +
|
|
88
89
|
'session. It was removed from the arguments passed to the engine.');
|
|
89
90
|
}
|
|
90
91
|
const managed = options.managed
|
|
91
|
-
? (0,
|
|
92
|
+
? (0, first_party_harness_broker_1.createManagedEngineHooks)({
|
|
92
93
|
subcommand,
|
|
93
94
|
passthrough: engineArgv,
|
|
94
95
|
...(agentRef ? { agentRef } : {}),
|
|
@@ -96,7 +97,7 @@ async function forwardToEngine(cmd, subcommand, passthrough, options = {}) {
|
|
|
96
97
|
})
|
|
97
98
|
: null;
|
|
98
99
|
try {
|
|
99
|
-
const code = await (0,
|
|
100
|
+
const code = await (0, first_party_harness_1.execEngine)((0, first_party_harness_1.buildEngineArgs)(subcommand, engineArgv), process.env, managed
|
|
100
101
|
? {
|
|
101
102
|
prepare: managed.prepare,
|
|
102
103
|
cleanup: managed.cleanup,
|
|
@@ -111,13 +112,13 @@ async function forwardToEngine(cmd, subcommand, passthrough, options = {}) {
|
|
|
111
112
|
cmd.exit(code);
|
|
112
113
|
}
|
|
113
114
|
catch (err) {
|
|
114
|
-
if (err instanceof
|
|
115
|
+
if (err instanceof first_party_harness_1.EngineStartRefusedError) {
|
|
115
116
|
// The engine never ran, so there is no engine code to pass through (OSK-8822).
|
|
116
117
|
// Silent here: the hook that refused already said why, once, on stderr.
|
|
117
|
-
cmd.exit(
|
|
118
|
+
cmd.exit(first_party_harness_1.ENGINE_START_REFUSED_EXIT_CODE);
|
|
118
119
|
}
|
|
119
|
-
if (err instanceof Error && err.message ===
|
|
120
|
-
cmd.log((0,
|
|
120
|
+
if (err instanceof Error && err.message === first_party_harness_1.ENGINE_NOT_INSTALLED) {
|
|
121
|
+
cmd.log((0, first_party_harness_1.notInstalledMessage)());
|
|
121
122
|
cmd.exit(127); // conventional "command not found"
|
|
122
123
|
}
|
|
123
124
|
throw err;
|
|
@@ -6,7 +6,7 @@ import { BaseCommand } from '../../base-command';
|
|
|
6
6
|
*
|
|
7
7
|
* `skrr code`'s not-installed message offered exactly two routes and neither
|
|
8
8
|
* worked without a browser: "In the web app: the runtime menu … → Install", or
|
|
9
|
-
* point
|
|
9
|
+
* point the engine-path override at a build you already have — which is the thing
|
|
10
10
|
* you are trying to obtain, and the route that gives up provenance. So the
|
|
11
11
|
* ordinary case for a coding harness (a dev box over SSH, a CI runner, a cloud
|
|
12
12
|
* VM) had no way in (dogfood OSK-276).
|
|
@@ -60,8 +60,8 @@ export default class CodeInstall extends BaseCommand {
|
|
|
60
60
|
/**
|
|
61
61
|
* Poll the job until it settles, printing each new log line.
|
|
62
62
|
*
|
|
63
|
-
* The daemon already writes a progress log — "Fetching the signed
|
|
64
|
-
*
|
|
63
|
+
* The daemon already writes a progress log — "Fetching the signed release
|
|
64
|
+
* manifest", "Verified and installed …" — and it is the only account
|
|
65
65
|
* of a hundred-megabyte download the user is waiting on. Printing only the
|
|
66
66
|
* lines not yet seen keeps a poll loop from repeating the whole log.
|
|
67
67
|
*/
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
|
+
const auth_core_1 = require("@skrr-ai/auth-core");
|
|
4
5
|
const base_command_1 = require("../../base-command");
|
|
5
6
|
const api_fetch_1 = require("../../lib/api-fetch");
|
|
6
7
|
const daemon_ref_1 = require("../../lib/daemon-ref");
|
|
7
8
|
const daemon_target_1 = require("../../lib/daemon-target");
|
|
8
|
-
const
|
|
9
|
+
const first_party_harness_1 = require("../../lib/first-party-harness");
|
|
9
10
|
/**
|
|
10
11
|
* `skrr code install` — install the engine from the terminal.
|
|
11
12
|
*
|
|
@@ -13,7 +14,7 @@ const sky_code_1 = require("../../lib/sky-code");
|
|
|
13
14
|
*
|
|
14
15
|
* `skrr code`'s not-installed message offered exactly two routes and neither
|
|
15
16
|
* worked without a browser: "In the web app: the runtime menu … → Install", or
|
|
16
|
-
* point
|
|
17
|
+
* point the engine-path override at a build you already have — which is the thing
|
|
17
18
|
* you are trying to obtain, and the route that gives up provenance. So the
|
|
18
19
|
* ordinary case for a coding harness (a dev box over SSH, a CI runner, a cloud
|
|
19
20
|
* VM) had no way in (dogfood OSK-276).
|
|
@@ -30,7 +31,7 @@ const sky_code_1 = require("../../lib/sky-code");
|
|
|
30
31
|
* verifies the signed manifest.
|
|
31
32
|
*/
|
|
32
33
|
class CodeInstall extends base_command_1.BaseCommand {
|
|
33
|
-
static description =
|
|
34
|
+
static description = `Install the ${auth_core_1.FIRST_PARTY_HARNESS.displayName} engine on this machine, through the daemon`;
|
|
34
35
|
static examples = [
|
|
35
36
|
'<%= config.bin %> code install',
|
|
36
37
|
'<%= config.bin %> code install --daemon d_6a323ae4...',
|
|
@@ -122,7 +123,7 @@ class CodeInstall extends base_command_1.BaseCommand {
|
|
|
122
123
|
});
|
|
123
124
|
}
|
|
124
125
|
if (!flags.json) {
|
|
125
|
-
this.log(
|
|
126
|
+
this.log(`${auth_core_1.FIRST_PARTY_HARNESS.displayName} installed. Run \`${this.config.bin} code\` to start it.`);
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
/** Which daemon the install targets, by the rule every daemon-picking command shares. */
|
|
@@ -158,8 +159,8 @@ class CodeInstall extends base_command_1.BaseCommand {
|
|
|
158
159
|
if (target.kind === 'this-machine') {
|
|
159
160
|
this.failWithCliError({
|
|
160
161
|
message: target.explicit
|
|
161
|
-
?
|
|
162
|
-
: `${
|
|
162
|
+
? first_party_harness_1.DEDICATED_RUNTIME_ENGINE_MESSAGE
|
|
163
|
+
: `${first_party_harness_1.DEDICATED_RUNTIME_ENGINE_MESSAGE} This command installs on the machine it runs on; ` +
|
|
163
164
|
'to install on another of your machines, name it with --daemon.',
|
|
164
165
|
code: 'DEDICATED_RUNTIME_ENGINE_SHIPS_WITH_IMAGE',
|
|
165
166
|
exit: 1,
|
|
@@ -199,7 +200,9 @@ class CodeInstall extends base_command_1.BaseCommand {
|
|
|
199
200
|
async installerNote(daemonId) {
|
|
200
201
|
try {
|
|
201
202
|
const res = await (0, api_fetch_1.apiFetch)(`/api/daemons/${encodeURIComponent(daemonId)}/cli-installers`, { credential: this.resolvedCredential });
|
|
202
|
-
|
|
203
|
+
// Any spelling: a daemon lists the provider the way it registered it, and
|
|
204
|
+
// one that predates or postdates a rename spells it differently.
|
|
205
|
+
const row = (res.providers ?? []).find((p) => (0, auth_core_1.isFirstPartyHarnessProvider)(p.provider));
|
|
203
206
|
const reason = row?.installDisabledReason?.trim();
|
|
204
207
|
if (!reason)
|
|
205
208
|
return null;
|
|
@@ -214,8 +217,8 @@ class CodeInstall extends base_command_1.BaseCommand {
|
|
|
214
217
|
/**
|
|
215
218
|
* Poll the job until it settles, printing each new log line.
|
|
216
219
|
*
|
|
217
|
-
* The daemon already writes a progress log — "Fetching the signed
|
|
218
|
-
*
|
|
220
|
+
* The daemon already writes a progress log — "Fetching the signed release
|
|
221
|
+
* manifest", "Verified and installed …" — and it is the only account
|
|
219
222
|
* of a hundred-megabyte download the user is waiting on. Printing only the
|
|
220
223
|
* lines not yet seen keeps a poll loop from repeating the whole log.
|
|
221
224
|
*/
|
|
@@ -263,8 +266,12 @@ class CodeInstall extends base_command_1.BaseCommand {
|
|
|
263
266
|
}
|
|
264
267
|
}
|
|
265
268
|
exports.default = CodeInstall;
|
|
266
|
-
/**
|
|
267
|
-
|
|
269
|
+
/**
|
|
270
|
+
* The daemon's id for skrr's own engine — the CANONICAL spelling, read from the
|
|
271
|
+
* identity module rather than written here. The install route accepts every
|
|
272
|
+
* spelling; canonical is what the platform stores and returns.
|
|
273
|
+
*/
|
|
274
|
+
const PROVIDER = auth_core_1.FIRST_PARTY_HARNESS.provider;
|
|
268
275
|
/** A 100 MB download over a hotel connection is the case this has to survive. */
|
|
269
276
|
const MAX_WAIT_MS = 10 * 60_000;
|
|
270
277
|
const POLL_INTERVAL_MS = 2_000;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
|
+
const auth_core_1 = require("@skrr-ai/auth-core");
|
|
4
5
|
const index_1 = require("./index");
|
|
5
6
|
/**
|
|
6
7
|
* `skrr code migrate opencode` — carry an existing OpenCode config across.
|
|
@@ -15,7 +16,7 @@ const index_1 = require("./index");
|
|
|
15
16
|
* currently relying on.
|
|
16
17
|
*/
|
|
17
18
|
class CodeMigrate extends core_1.Command {
|
|
18
|
-
static description =
|
|
19
|
+
static description = `Migrate an existing OpenCode configuration into ${auth_core_1.FIRST_PARTY_HARNESS.displayName}`;
|
|
19
20
|
static examples = [
|
|
20
21
|
'<%= config.bin %> code migrate opencode',
|
|
21
22
|
'<%= config.bin %> code migrate opencode --apply',
|
|
@@ -35,7 +36,7 @@ class CodeMigrate extends core_1.Command {
|
|
|
35
36
|
default: false,
|
|
36
37
|
}),
|
|
37
38
|
overwrite: core_1.Flags.boolean({
|
|
38
|
-
description:
|
|
39
|
+
description: `Replace existing ${auth_core_1.FIRST_PARTY_HARNESS.displayName} files, moving each aside to a timestamped .bak first`,
|
|
39
40
|
default: false,
|
|
40
41
|
dependsOn: ['apply'],
|
|
41
42
|
}),
|
|
@@ -4,7 +4,7 @@ import { Command } from '@oclif/core';
|
|
|
4
4
|
*
|
|
5
5
|
* ── Why the name carries the `oversky-` prefix ─────────────────────────────
|
|
6
6
|
*
|
|
7
|
-
* The engine owns `agent`: `
|
|
7
|
+
* The engine owns `agent`: the engine binary's `agent` is its own agent-management command.
|
|
8
8
|
* `skrr code` forwards argv VERBATIM, and oclif's spaced-topic dispatch collates
|
|
9
9
|
* `code agent …` into a command id BEFORE the forwarding command ever runs — so
|
|
10
10
|
* naming this `code:agent` would have silently taken that name away from the
|
|
@@ -17,7 +17,8 @@ import { Command } from '@oclif/core';
|
|
|
17
17
|
*
|
|
18
18
|
* ── Why the setting needed a command at all ────────────────────────────────
|
|
19
19
|
*
|
|
20
|
-
*
|
|
20
|
+
* The setting (`AGENT_CONFIG_KEY`, then under an older product-named key)
|
|
21
|
+
* predates this and had no way to be written: nothing in
|
|
21
22
|
* `cli/src` called `saveConfig` with it, so the refusal that told users to set it
|
|
22
23
|
* was pointing at a file it expected them to hand-edit — and `skrr logout` then
|
|
23
24
|
* rebuilt the config without the key and dropped it silently.
|
|
@@ -47,7 +48,7 @@ export default class CodeOverskyAgent extends Command {
|
|
|
47
48
|
* `allowCreate` is off by default, and that is the whole design of this branch:
|
|
48
49
|
* a command whose job is to answer a question must not create a server-side
|
|
49
50
|
* agent as a side effect of being asked. Without the guard, `skrr code
|
|
50
|
-
*
|
|
51
|
+
* skrr-agent` — the bare, most likely invocation, and the one a user runs to
|
|
51
52
|
* find out what is going on — would mint the default agent it then reported,
|
|
52
53
|
* making the answer true only because the question was asked.
|
|
53
54
|
*/
|
|
@@ -55,7 +56,7 @@ export default class CodeOverskyAgent extends Command {
|
|
|
55
56
|
/**
|
|
56
57
|
* Report a resolution failure as the refusal it is.
|
|
57
58
|
*
|
|
58
|
-
* `
|
|
59
|
+
* `FirstPartyHarnessAgentError` messages are already written to be actionable — they name
|
|
59
60
|
* the flag, the config key, and the candidates — so this prints the message
|
|
60
61
|
* rather than wrapping it in a second sentence that would push the useful part
|
|
61
62
|
* off the first line.
|