@skrr-ai/cli 0.1.73 → 0.1.75

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.
@@ -9,7 +9,7 @@ const store_advisories_1 = require("../../../lib/store-advisories");
9
9
  * reversible side. Lifting it later takes two (`close`, then `confirm`).
10
10
  */
11
11
  class StoreAdvisoriesIssue extends base_command_1.BaseCommand {
12
- static description = 'Issue a Store advisory against a published release. `revoke` stops every installed copy running it from running unattended. Store curators only.';
12
+ static description = 'Issue a Store advisory against a published release. `revoke` stops unattended runs; `pause_execution` also stops manual chat. Store curators only.';
13
13
  static examples = [
14
14
  '<%= config.bin %> store advisories issue agent_abc123 ar_def456 --remedy revoke --summary "Posts connector tokens to a third-party host" --evidence https://example.com/report',
15
15
  '<%= config.bin %> store advisories issue agent_abc123 ar_def456 --remedy withdraw --summary "Breaks on the new calendar API"',
@@ -24,7 +24,7 @@ class StoreAdvisoriesIssue extends base_command_1.BaseCommand {
24
24
  };
25
25
  static flags = {
26
26
  remedy: core_1.Flags.string({
27
- description: 'notify: tell installers · withdraw: stop new installs and updates · revoke: withdraw, and stop unattended runs of every copy running it',
27
+ description: 'notify: tell installers · withdraw: stop installs and updates · revoke: also stop unattended runs · pause_execution: also stop manual chat',
28
28
  options: [...data_provider_1.STORE_RELEASE_ADVISORY_ISSUABLE_REMEDIES],
29
29
  required: true,
30
30
  }),
@@ -69,6 +69,21 @@ class StoreInstall extends base_command_1.BaseCommand {
69
69
  // A read failure must not block an install — the server re-checks anyway.
70
70
  this.warn(`Could not check what you own (${err.message}); continuing.`);
71
71
  }
72
+ if (alreadyInstalled) {
73
+ // A purchase survives uninstall. Only a usable copy is already installed;
74
+ // an uninstalled copy is restored by the install route. Keep the server
75
+ // as the final authority if this status read is unavailable.
76
+ try {
77
+ const status = await data_provider_1.dataService.getAgentPurchaseStatus(args.agentId);
78
+ if (status.purchased && status.stopReason === 'uninstalled') {
79
+ alreadyInstalled = false;
80
+ }
81
+ }
82
+ catch (err) {
83
+ this.warn(`Could not check the installed copy (${err.message}); continuing.`);
84
+ alreadyInstalled = false;
85
+ }
86
+ }
72
87
  if (alreadyInstalled) {
73
88
  this.error(`${args.agentId} is already installed. See it: skrr store updates, or update it: skrr store update ${args.agentId}`, { exit: 1 });
74
89
  }
@@ -41889,13 +41889,19 @@ function FE(e2, t2, n2, o2, r2) {
41889
41889
  var a3, i2, s2, c2 = WE(e3.parts), l2 = (function(e4) {
41890
41890
  var t4;
41891
41891
  return null !== (t4 = e4.toolUseId) && void 0 !== t4 ? t4 : e4.requestId;
41892
- })(t3), u2 = KE(c2, l2, t3.requestId), d2 = S(S(S({ status: "pending", requestId: t3.requestId }, t3.toolUseId ? { toolUseId: t3.toolUseId } : {}), { requestedAt: r3 }), t3.inputPreview ? { reason: t3.inputPreview } : {});
41893
- if (u2 >= 0) {
41894
- var p2 = c2[u2], m2 = QE(c2, u2, S(S({}, p2), { name: null !== (a3 = t3.toolName) && void 0 !== a3 ? a3 : p2.name, input: VE(p2.input) ? p2.input : GE(t3), executionTarget: null !== (i2 = p2.executionTarget) && void 0 !== i2 ? i2 : XE(n3), permission: d2, state: HE(p2.state) }));
41895
- return S(S({}, e3), { parts: m2, pending: BE(m2), updatedAt: r3 });
41896
- }
41897
- var f2 = { id: o3(), kind: "tool", callId: l2, name: null !== (s2 = t3.toolName) && void 0 !== s2 ? s2 : "tool", state: "pending", input: GE(t3), permission: d2, executionTarget: XE(n3) }, g2 = w(w([], c2, true), [f2], false);
41898
- return S(S({}, e3), { parts: g2, pending: true, updatedAt: r3 });
41892
+ })(t3), u2 = KE(c2, l2, t3.requestId), d2 = u2 >= 0 ? u2 : (function(e4, t4) {
41893
+ if (t4.toolUseId || "exec_command" !== t4.toolName || !t4.inputPreview) return -1;
41894
+ var n4 = e4.flatMap(function(e5, n5) {
41895
+ return "tool" !== e5.kind || "exec_command" !== e5.name || qE(e5.state) || e5.permission || !e5.input || "object" != typeof e5.input ? [] : e5.input.command === t4.inputPreview ? [n5] : [];
41896
+ });
41897
+ return 1 === n4.length ? n4[0] : -1;
41898
+ })(c2, t3), p2 = S(S(S({ status: "pending", requestId: t3.requestId }, t3.toolUseId ? { toolUseId: t3.toolUseId } : {}), { requestedAt: r3 }), t3.inputPreview ? { reason: t3.inputPreview } : {});
41899
+ if (d2 >= 0) {
41900
+ var m2 = c2[d2], f2 = QE(c2, d2, S(S({}, m2), { name: null !== (a3 = t3.toolName) && void 0 !== a3 ? a3 : m2.name, input: VE(m2.input) ? m2.input : GE(t3), executionTarget: null !== (i2 = m2.executionTarget) && void 0 !== i2 ? i2 : XE(n3), permission: p2, state: HE(m2.state) }));
41901
+ return S(S({}, e3), { parts: f2, pending: BE(f2), updatedAt: r3 });
41902
+ }
41903
+ var g2 = { id: o3(), kind: "tool", callId: l2, name: null !== (s2 = t3.toolName) && void 0 !== s2 ? s2 : "tool", state: "pending", input: GE(t3), permission: p2, executionTarget: XE(n3) }, v2 = w(w([], c2, true), [g2], false);
41904
+ return S(S({}, e3), { parts: v2, pending: true, updatedAt: r3 });
41899
41905
  })(e2, t2, n2, o2, r2);
41900
41906
  case "permission-resolved":
41901
41907
  return (function(e3, t3, n3, o3) {