@skrr-ai/cli 0.1.34 → 0.1.35

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.
@@ -42,6 +42,7 @@ class HostedMachinesResume extends base_command_1.BaseCommand {
42
42
  workspaceId: flags.workspace,
43
43
  intervalMs: Math.max(1, flags.interval) * 1000,
44
44
  timeoutMs,
45
+ ignoreInitialPaused: true,
45
46
  }),
46
47
  };
47
48
  }
@@ -162,6 +162,7 @@ export declare function waitForHostedMachineReady(id: string, options: HostedMac
162
162
  intervalMs: number;
163
163
  timeoutMs?: number;
164
164
  onSnapshot?: (session: HostedMachineSession) => void;
165
+ ignoreInitialPaused?: boolean;
165
166
  }): Promise<HostedMachineSession>;
166
167
  /**
167
168
  * Human-readable age of an engine's last heartbeat, e.g. `9d`, `4h`, `12m`.
@@ -230,6 +230,7 @@ class HostedMachineReadyTimeoutError extends Error {
230
230
  exports.HostedMachineReadyTimeoutError = HostedMachineReadyTimeoutError;
231
231
  async function waitForHostedMachineReady(id, options) {
232
232
  const startedAt = Date.now();
233
+ let observedResumeProgress = false;
233
234
  while (true) {
234
235
  const response = await getHostedMachine(id, options);
235
236
  const session = response.session;
@@ -244,6 +245,9 @@ async function waitForHostedMachineReady(id, options) {
244
245
  const detail = hostedMachineErrorSummary(session);
245
246
  throw new Error(`Hosted Machine ${id} reached ${status}${detail ? `: ${detail}` : ''}`);
246
247
  }
248
+ if (status !== 'paused') {
249
+ observedResumeProgress = true;
250
+ }
247
251
  // Async resume deliberately rolls a recoverable failure back to `paused`
248
252
  // so the retained workspace remains resumable. That is terminal for THIS
249
253
  // wait operation even though it is not terminal for the machine. The
@@ -251,6 +255,19 @@ async function waitForHostedMachineReady(id, options) {
251
255
  // row here belongs to the attempt we just started.
252
256
  if (status === 'paused') {
253
257
  const detail = hostedMachineErrorSummary(session);
258
+ // The resume endpoint enqueues asynchronously. Its first read can still
259
+ // return the old, clean `paused` row before the worker persists
260
+ // `resuming`; treating that snapshot as the attempt's terminal state
261
+ // makes `resume --wait` fail while the machine is actually starting.
262
+ // Once progress has been observed — or the paused row carries an error —
263
+ // it is a real rollback and remains terminal for this wait.
264
+ if (options.ignoreInitialPaused && !observedResumeProgress && !detail) {
265
+ if (options.timeoutMs && Date.now() - startedAt >= options.timeoutMs) {
266
+ throw new HostedMachineReadyTimeoutError(id, hostedMachineProgressSummary(session));
267
+ }
268
+ await sleep(options.intervalMs);
269
+ continue;
270
+ }
254
271
  throw new Error(`Hosted Machine ${id} returned to paused before it became ready${detail ? `: ${detail}` : ''}`);
255
272
  }
256
273
  if (options.timeoutMs && Date.now() - startedAt >= options.timeoutMs) {
@@ -63,15 +63,17 @@ export interface FirstPartyHarnessIdentity {
63
63
  /**
64
64
  * THE identity — the only literal product name in the codebase.
65
65
  *
66
- * Phase: EXPAND. `provider` is still the spelling every stored row carries;
67
- * `skrr-code` is accepted everywhere so the flip can follow once every reader
68
- * has shipped.
66
+ * Phase: FLIPPED. `skrr-code` is canonical — stored, returned and rendered.
67
+ * `sky-code` is still accepted on every ingress, and it is still the WIRE
68
+ * spelling: daemons on users' machines may predate the rename, so the server
69
+ * and a daemon keep exchanging `sky-code` until contract (OSK-8663) empties
70
+ * `aliases` and moves `wireProvider`.
69
71
  */
70
72
  declare const IDENTITY: {
71
73
  readonly displayName: "skrr Code";
72
74
  readonly command: "skrr code";
73
- readonly provider: "sky-code";
74
- readonly aliases: readonly ["skrr-code"];
75
+ readonly provider: "skrr-code";
76
+ readonly aliases: readonly ["sky-code"];
75
77
  readonly wireProvider: "sky-code";
76
78
  };
77
79
  /** The canonical slug, as a literal type. */
@@ -99,15 +99,17 @@ function defineIdentity(identity) {
99
99
  /**
100
100
  * THE identity — the only literal product name in the codebase.
101
101
  *
102
- * Phase: EXPAND. `provider` is still the spelling every stored row carries;
103
- * `skrr-code` is accepted everywhere so the flip can follow once every reader
104
- * has shipped.
102
+ * Phase: FLIPPED. `skrr-code` is canonical — stored, returned and rendered.
103
+ * `sky-code` is still accepted on every ingress, and it is still the WIRE
104
+ * spelling: daemons on users' machines may predate the rename, so the server
105
+ * and a daemon keep exchanging `sky-code` until contract (OSK-8663) empties
106
+ * `aliases` and moves `wireProvider`.
105
107
  */
106
108
  const IDENTITY = {
107
109
  displayName: 'skrr Code',
108
110
  command: 'skrr code',
109
- provider: 'sky-code',
110
- aliases: ['skrr-code'],
111
+ provider: 'skrr-code',
112
+ aliases: ['sky-code'],
111
113
  wireProvider: 'sky-code',
112
114
  };
113
115
  exports.FIRST_PARTY_HARNESS = defineIdentity(IDENTITY);
@@ -63,15 +63,17 @@ export interface FirstPartyHarnessIdentity {
63
63
  /**
64
64
  * THE identity — the only literal product name in the codebase.
65
65
  *
66
- * Phase: EXPAND. `provider` is still the spelling every stored row carries;
67
- * `skrr-code` is accepted everywhere so the flip can follow once every reader
68
- * has shipped.
66
+ * Phase: FLIPPED. `skrr-code` is canonical — stored, returned and rendered.
67
+ * `sky-code` is still accepted on every ingress, and it is still the WIRE
68
+ * spelling: daemons on users' machines may predate the rename, so the server
69
+ * and a daemon keep exchanging `sky-code` until contract (OSK-8663) empties
70
+ * `aliases` and moves `wireProvider`.
69
71
  */
70
72
  declare const IDENTITY: {
71
73
  readonly displayName: "skrr Code";
72
74
  readonly command: "skrr code";
73
- readonly provider: "sky-code";
74
- readonly aliases: readonly ["skrr-code"];
75
+ readonly provider: "skrr-code";
76
+ readonly aliases: readonly ["sky-code"];
75
77
  readonly wireProvider: "sky-code";
76
78
  };
77
79
  /** The canonical slug, as a literal type. */
@@ -70,15 +70,17 @@ function defineIdentity(identity) {
70
70
  /**
71
71
  * THE identity — the only literal product name in the codebase.
72
72
  *
73
- * Phase: EXPAND. `provider` is still the spelling every stored row carries;
74
- * `skrr-code` is accepted everywhere so the flip can follow once every reader
75
- * has shipped.
73
+ * Phase: FLIPPED. `skrr-code` is canonical — stored, returned and rendered.
74
+ * `sky-code` is still accepted on every ingress, and it is still the WIRE
75
+ * spelling: daemons on users' machines may predate the rename, so the server
76
+ * and a daemon keep exchanging `sky-code` until contract (OSK-8663) empties
77
+ * `aliases` and moves `wireProvider`.
76
78
  */
77
79
  const IDENTITY = {
78
80
  displayName: 'skrr Code',
79
81
  command: 'skrr code',
80
- provider: 'sky-code',
81
- aliases: ['skrr-code'],
82
+ provider: 'skrr-code',
83
+ aliases: ['sky-code'],
82
84
  wireProvider: 'sky-code',
83
85
  };
84
86
  export const FIRST_PARTY_HARNESS = defineIdentity(IDENTITY);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skrr-ai/auth-core",
3
- "version": "0.1.9",
3
+ "version": "0.2.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "types": "dist/esm/index.d.ts",
6
6
  "exports": {
@@ -38796,7 +38796,7 @@ function Xu(t2, n2) {
38796
38796
  var i2 = qu[t2];
38797
38797
  return i2 ? b([], i2, true) : [];
38798
38798
  }
38799
- var Qu = Object.freeze(((Gu = { claude: Object.freeze([{ value: "sonnet", label: "Sonnet", description: "Balanced \u2014 the default for most work" }, { value: "opus", label: "Opus", description: "Most capable, highest cost" }, { value: "haiku", label: "Haiku", description: "Fastest and cheapest" }, { value: "opusplan", label: "Opus plan", description: "Opus while planning, Sonnet while executing" }]), codex: Object.freeze([{ value: "gpt-5.6-sol", label: "GPT-5.6 Sol", description: "Frontier agentic coding \u2014 the Codex default", efforts: Object.freeze(["low", "medium", "high", "xhigh", "max", "ultra"]), defaultEffort: "low" }, { value: "gpt-5.6-terra", label: "GPT-5.6 Terra", description: "Balanced capability and cost", efforts: Object.freeze(["low", "medium", "high", "xhigh", "max", "ultra"]), defaultEffort: "medium" }, { value: "gpt-5.6-luna", label: "GPT-5.6 Luna", description: "Fast, high-volume work", efforts: Object.freeze(["low", "medium", "high", "xhigh", "max"]), defaultEffort: "medium" }, { value: "gpt-5.5", label: "GPT-5.5", description: "Previous generation", efforts: Object.freeze(["low", "medium", "high", "xhigh"]), defaultEffort: "medium" }, { value: "gpt-5.4", label: "GPT-5.4", description: "Previous generation", efforts: Object.freeze(["low", "medium", "high", "xhigh"]), defaultEffort: "medium" }, { value: "gpt-5.4-mini", label: "GPT-5.4 Mini", description: "Smallest and cheapest", efforts: Object.freeze(["low", "medium", "high", "xhigh"]), defaultEffort: "medium" }, { value: "gpt-5.3-codex-spark", label: "GPT-5.3 Codex Spark", description: "Low-latency coding", efforts: Object.freeze(["low", "medium", "high", "xhigh"]), defaultEffort: "high" }]), gemini: Object.freeze([{ value: "gemini-2.5-pro", label: "Gemini 2.5 Pro" }, { value: "gemini-2.5-flash", label: "Gemini 2.5 Flash", description: "Faster and cheaper" }]), "gemini-acp": Object.freeze([{ value: "gemini-2.5-pro", label: "Gemini 2.5 Pro" }, { value: "gemini-2.5-flash", label: "Gemini 2.5 Flash", description: "Faster and cheaper" }]) })[e.FIRST_PARTY_HARNESS_PROVIDER] = Object.freeze([{ value: "anthropic/claude-opus-5", label: "Claude Opus 5", description: "Most capable \u2014 the skrr Code default" }, { value: "openai/gpt-5.6", label: "GPT-5.6", description: "OpenAI alias for current Sol" }, { value: "anthropic/claude-fable-5", label: "Claude Fable 5", description: "Premium long-horizon work" }, { value: "anthropic/claude-sonnet-5", label: "Claude Sonnet 5", description: "Balanced capability and cost" }, { value: "openai/gpt-5.6-sol", label: "GPT-5.6 Sol", description: "OpenAI frontier" }, { value: "openai/gpt-5.6-terra", label: "GPT-5.6 Terra", description: "OpenAI balanced tier" }, { value: "openai/gpt-5.6-luna", label: "GPT-5.6 Luna", description: "OpenAI fast tier" }, { value: "google/gemini-3-pro", label: "Gemini 3 Pro", description: "Google direct; requires an enabled provider policy" }]), Gu));
38799
+ var Qu = Object.freeze(((Gu = { claude: Object.freeze([{ value: "sonnet", label: "Sonnet", description: "Balanced \u2014 the default for most work" }, { value: "opus", label: "Opus", description: "Most capable, highest cost" }, { value: "haiku", label: "Haiku", description: "Fastest and cheapest" }, { value: "opusplan", label: "Opus plan", description: "Opus while planning, Sonnet while executing" }]), codex: Object.freeze([{ value: "gpt-5.6-sol", label: "GPT-5.6 Sol", description: "Frontier agentic coding \u2014 the Codex default", efforts: Object.freeze(["low", "medium", "high", "xhigh", "max", "ultra"]), defaultEffort: "low" }, { value: "gpt-5.6-terra", label: "GPT-5.6 Terra", description: "Balanced capability and cost", efforts: Object.freeze(["low", "medium", "high", "xhigh", "max", "ultra"]), defaultEffort: "medium" }, { value: "gpt-5.6-luna", label: "GPT-5.6 Luna", description: "Fast, high-volume work", efforts: Object.freeze(["low", "medium", "high", "xhigh", "max"]), defaultEffort: "medium" }, { value: "gpt-5.5", label: "GPT-5.5", description: "Previous generation", efforts: Object.freeze(["low", "medium", "high", "xhigh"]), defaultEffort: "medium" }, { value: "gpt-5.4", label: "GPT-5.4", description: "Previous generation", efforts: Object.freeze(["low", "medium", "high", "xhigh"]), defaultEffort: "medium" }, { value: "gpt-5.4-mini", label: "GPT-5.4 Mini", description: "Smallest and cheapest", efforts: Object.freeze(["low", "medium", "high", "xhigh"]), defaultEffort: "medium" }, { value: "gpt-5.3-codex-spark", label: "GPT-5.3 Codex Spark", description: "Low-latency coding", efforts: Object.freeze(["low", "medium", "high", "xhigh"]), defaultEffort: "high" }]), gemini: Object.freeze([{ value: "gemini-2.5-pro", label: "Gemini 2.5 Pro" }, { value: "gemini-2.5-flash", label: "Gemini 2.5 Flash", description: "Faster and cheaper" }]), "gemini-acp": Object.freeze([{ value: "gemini-2.5-pro", label: "Gemini 2.5 Pro" }, { value: "gemini-2.5-flash", label: "Gemini 2.5 Flash", description: "Faster and cheaper" }]) })[e.FIRST_PARTY_HARNESS_PROVIDER] = Object.freeze([{ value: "anthropic/claude-opus-5", label: "Claude Opus 5", description: "Most capable \u2014 the ".concat(e.FIRST_PARTY_HARNESS.displayName, " default") }, { value: "openai/gpt-5.6", label: "GPT-5.6", description: "OpenAI alias for current Sol" }, { value: "anthropic/claude-fable-5", label: "Claude Fable 5", description: "Premium long-horizon work" }, { value: "anthropic/claude-sonnet-5", label: "Claude Sonnet 5", description: "Balanced capability and cost" }, { value: "openai/gpt-5.6-sol", label: "GPT-5.6 Sol", description: "OpenAI frontier" }, { value: "openai/gpt-5.6-terra", label: "GPT-5.6 Terra", description: "OpenAI balanced tier" }, { value: "openai/gpt-5.6-luna", label: "GPT-5.6 Luna", description: "OpenAI fast tier" }, { value: "google/gemini-3-pro", label: "Gemini 3 Pro", description: "Google direct; requires an enabled provider policy" }]), Gu));
38800
38800
  var Zu = Object.freeze(/* @__PURE__ */ new Set(["hermes", "kimi", "gemini-acp", "opencode-acp"]));
38801
38801
  var Ju = 128;
38802
38802
  var $u = Object.freeze(/* @__PURE__ */ new Set(["default", "auto", "inherit", "none"]));