@skrr-ai/cli 0.1.148 → 0.1.150

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.
@@ -1,4 +1,4 @@
1
- import type { AgentRemovalKind, DeleteAgentResponse } from '@skrr-ai/data-provider';
1
+ import type { AgentRemovalKind, DeleteAgentResponse, PersonalContextErasure } from '@skrr-ai/data-provider';
2
2
  import { BaseCommand } from '../../base-command';
3
3
  /**
4
4
  * The confirmation question. Deleting an agent installed from the store only
@@ -16,6 +16,22 @@ export declare function agentRemovalReport(agentId: string, response: DeleteAgen
16
16
  * nothing (an older server, or an uninstall, which erases nothing).
17
17
  */
18
18
  export declare function agentErasureReport(response: DeleteAgentResponse | undefined): string[];
19
+ /**
20
+ * The outcome a person is looking for, said once before the qualifiers (OSK-22388).
21
+ *
22
+ * Deleting an agent that never held anything still prints a handful of "not confirmed" lines: the
23
+ * server removes what it can prove came from the agent and cannot certify that fourteen stores
24
+ * hold no older copies, and a platform-wide review is open that no agent delete can clear. Every
25
+ * one of those is true and stays exactly as worded, and the state stays `unknown`, never
26
+ * complete. But five lines of qualifiers with nothing to say that nothing is wrong or what to do
27
+ * read as a failed delete. So when nothing of THIS agent's own is owed, say that first.
28
+ *
29
+ * Deliberately narrow, so reassurance is never printed where it would be false: the access fence
30
+ * committed, no retry of the agent's own exists in any state, no store of its own has rows no
31
+ * predicate covers, and the result does not contradict itself. A platform-wide item does not stop
32
+ * it, because it is not this agent's.
33
+ */
34
+ export declare function agentErasureHeadline(erasure: PersonalContextErasure | null | undefined): string | null;
19
35
  /**
20
36
  * What stays behind: Goals the Agent owned and open Tasks assigned to it. They are the owner's own
21
37
  * work, so deleting the Agent does not remove them, and until now the receipt never said so
@@ -4,6 +4,7 @@ exports.DELETION_SETTLE_TIMEOUT_MS = void 0;
4
4
  exports.agentRemovalQuestion = agentRemovalQuestion;
5
5
  exports.agentRemovalReport = agentRemovalReport;
6
6
  exports.agentErasureReport = agentErasureReport;
7
+ exports.agentErasureHeadline = agentErasureHeadline;
7
8
  exports.agentRetainedReport = agentRetainedReport;
8
9
  exports.isDeleteInProgressRefusal = isDeleteInProgressRefusal;
9
10
  exports.waitForAgentGone = waitForAgentGone;
@@ -57,7 +58,42 @@ function agentErasureReport(response) {
57
58
  if ((0, data_provider_1.agentRemovalKind)(response) !== 'deleted')
58
59
  return [];
59
60
  const erasure = response && 'erasure' in response ? response.erasure : undefined;
60
- return (0, data_provider_1.describePersonalContextErasure)(erasure)?.lines ?? [];
61
+ const lines = (0, data_provider_1.describePersonalContextErasure)(erasure)?.lines ?? [];
62
+ const headline = agentErasureHeadline(erasure);
63
+ // After the access line, before the qualifiers it explains.
64
+ return headline && lines.length > 0 ? [lines[0], headline, ...lines.slice(1)] : lines;
65
+ }
66
+ /**
67
+ * The outcome a person is looking for, said once before the qualifiers (OSK-22388).
68
+ *
69
+ * Deleting an agent that never held anything still prints a handful of "not confirmed" lines: the
70
+ * server removes what it can prove came from the agent and cannot certify that fourteen stores
71
+ * hold no older copies, and a platform-wide review is open that no agent delete can clear. Every
72
+ * one of those is true and stays exactly as worded, and the state stays `unknown`, never
73
+ * complete. But five lines of qualifiers with nothing to say that nothing is wrong or what to do
74
+ * read as a failed delete. So when nothing of THIS agent's own is owed, say that first.
75
+ *
76
+ * Deliberately narrow, so reassurance is never printed where it would be false: the access fence
77
+ * committed, no retry of the agent's own exists in any state, no store of its own has rows no
78
+ * predicate covers, and the result does not contradict itself. A platform-wide item does not stop
79
+ * it, because it is not this agent's.
80
+ */
81
+ function agentErasureHeadline(erasure) {
82
+ if (!erasure || typeof erasure !== 'object')
83
+ return null;
84
+ if ((0, data_provider_1.describePersonalContextErasure)(erasure)?.state !== 'unknown')
85
+ return null;
86
+ if (erasure.fence !== 'committed' || erasure.physical === 'complete')
87
+ return null;
88
+ if (!Array.isArray(erasure.stores) || !Array.isArray(erasure.debts))
89
+ return null;
90
+ const ownDebt = erasure.debts.some((debt) => debt?.scope !== 'platform');
91
+ const ownUncovered = erasure.stores.some((store) => store?.scope !== 'platform' &&
92
+ typeof store?.unclassifiedCount === 'number' &&
93
+ store.unclassifiedCount > 0);
94
+ if (ownDebt || ownUncovered)
95
+ return null;
96
+ return 'Nothing is pending for this agent and there is nothing for you to do. The lines below are limits on what the server can certify, not data it found.';
61
97
  }
62
98
  /**
63
99
  * What stays behind: Goals the Agent owned and open Tasks assigned to it. They are the owner's own
@@ -812,6 +812,15 @@ class AgentsSpawn extends base_command_1.BaseCommand {
812
812
  this.log(` ${schedule.kind}: ${state}` +
813
813
  (schedule.triggerId ? ` (${schedule.triggerId})` : '') +
814
814
  (schedule.reason ? ` — ${schedule.reason}` : ''));
815
+ if (schedule.modeKept) {
816
+ // The spec asked for a mode the existing watcher is not in: say it was NOT applied (OSK-22695).
817
+ const kept = schedule.modeKept.existing;
818
+ const wanted = schedule.modeKept.requested;
819
+ this.log(` NOT applied: this watcher stays in mode ${kept.mode} (executePlan ${kept.executePlan}); the spec asks for ` +
820
+ `${wanted.mode} (executePlan ${wanted.executePlan}). Change it with ` +
821
+ `\`${this.config.bin} agents triggers update ${result.agentId} ${schedule.triggerId} --builtin-type smart_schedule_delta_watch ` +
822
+ `--builtin-config '{"targetAgentId":"${result.agentId}","mode":"${wanted.mode}","executePlan":${wanted.executePlan},"approveNextRunSuggestion":false}'\`.`);
823
+ }
815
824
  }
816
825
  if (o.schedules?.some((schedule) => schedule.triggerId)) {
817
826
  this.log(` Preflight: ${this.config.bin} triggers preflight <trigger-id>`);
@@ -54,6 +54,9 @@ class AgentsTodosList extends base_command_1.BaseCommand {
54
54
  }
55
55
  this.log(`Day: ${date} in ${(0, schedule_1.describeTimeZone)(timezone)}`);
56
56
  (0, schedule_1.renderTodoList)(response.todos ?? [], (line) => this.log(line), timezone);
57
+ const hint = (0, schedule_1.failedTodoHint)(response.todos ?? [], args.id, this.config.bin);
58
+ if (hint)
59
+ this.log(hint);
57
60
  }
58
61
  }
59
62
  exports.default = AgentsTodosList;
@@ -28,9 +28,12 @@ export declare function storeAgentRow(a: Record<string, unknown>): {
28
28
  export default class SearchAgents extends BaseCommand {
29
29
  static description: string;
30
30
  static examples: string[];
31
+ static args: {
32
+ query: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
33
+ };
31
34
  static flags: {
32
35
  json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
33
- query: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
36
+ query: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
34
37
  category: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
35
38
  limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
36
39
  };
@@ -7,6 +7,7 @@ const data_provider_1 = require("@skrr-ai/data-provider");
7
7
  const base_command_1 = require("../../base-command");
8
8
  const format_1 = require("../../lib/format");
9
9
  const web_url_1 = require("../../lib/web-url");
10
+ const search_query_1 = require("../../lib/search-query");
10
11
  /**
11
12
  * Render a numeric-ish store metric to one decimal place.
12
13
  *
@@ -41,16 +42,17 @@ function storeAgentRow(a) {
41
42
  class SearchAgents extends base_command_1.BaseCommand {
42
43
  static description = 'Search agents in the skrr store';
43
44
  static examples = [
45
+ '<%= config.bin %> search agents "code review"',
44
46
  '<%= config.bin %> search agents --query "code review"',
45
47
  '<%= config.bin %> search agents --query productivity --category automation',
46
48
  '<%= config.bin %> search agents --query "data analysis" --limit 10 --json',
47
49
  ];
50
+ static args = { query: core_1.Args.string({ description: 'Search term', ignoreStdin: true }) };
48
51
  static flags = {
49
52
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
50
53
  query: core_1.Flags.string({
51
54
  char: 'q',
52
55
  description: 'Search query',
53
- required: true,
54
56
  }),
55
57
  category: core_1.Flags.string({
56
58
  char: 'c',
@@ -63,11 +65,12 @@ class SearchAgents extends base_command_1.BaseCommand {
63
65
  };
64
66
  async run() {
65
67
  this.requireAuth();
66
- const { flags } = await this.parse(SearchAgents);
68
+ const { args, flags } = await this.parse(SearchAgents);
69
+ const query = (0, search_query_1.resolveSearchQuery)(this, args.query, flags.query, 'search agents');
67
70
  let response;
68
71
  try {
69
72
  response = await data_provider_1.dataService.getStoreAgents({
70
- q: flags.query,
73
+ q: query,
71
74
  category: flags.category,
72
75
  limit: flags.limit,
73
76
  });
@@ -31,9 +31,12 @@ export declare function storeSearchRow(type: 'agent' | 'skill' | 'team' | 'task'
31
31
  export default class SearchAll extends BaseCommand {
32
32
  static description: string;
33
33
  static examples: string[];
34
+ static args: {
35
+ query: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
36
+ };
34
37
  static flags: {
35
38
  json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
36
- query: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
39
+ query: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
37
40
  limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
38
41
  };
39
42
  run(): Promise<void>;
@@ -9,6 +9,7 @@ const format_1 = require("../../lib/format");
9
9
  const web_url_1 = require("../../lib/web-url");
10
10
  const skill_store_pagination_1 = require("../../lib/skill-store-pagination");
11
11
  const search_display_1 = require("../../lib/search-display");
12
+ const search_query_1 = require("../../lib/search-query");
12
13
  const PLAIN_DESCRIPTION_RE = /<[^>]*>/g;
13
14
  const PLAIN_DESCRIPTION_RE_2 = /&nbsp;/g;
14
15
  const PLAIN_DESCRIPTION_RE_3 = /&amp;/g;
@@ -71,17 +72,20 @@ function storeSearchRow(type, doc) {
71
72
  class SearchAll extends base_command_1.BaseCommand {
72
73
  static description = 'Search your tasks and spaces plus store agents, skills, and teams in one shot';
73
74
  static examples = [
75
+ '<%= config.bin %> search all "code review"',
74
76
  '<%= config.bin %> search all --query "code review"',
75
77
  '<%= config.bin %> search all --query dogfood --limit 5 --json',
76
78
  ];
79
+ static args = { query: core_1.Args.string({ description: 'Search term', ignoreStdin: true }) };
77
80
  static flags = {
78
81
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
79
- query: core_1.Flags.string({ char: 'q', description: 'Search query', required: true }),
82
+ query: core_1.Flags.string({ char: 'q', description: 'Search query' }),
80
83
  limit: core_1.Flags.integer({ description: 'Per-bucket result limit', default: 10 }),
81
84
  };
82
85
  async run() {
83
86
  this.requireAuth();
84
- const { flags } = await this.parse(SearchAll);
87
+ const { args, flags } = await this.parse(SearchAll);
88
+ const query = (0, search_query_1.resolveSearchQuery)(this, args.query, flags.query, 'search all');
85
89
  const validBucket = (value) => {
86
90
  const rows = Array.isArray(value) ? value
87
91
  : value && typeof value === 'object' ? value.data : undefined;
@@ -90,11 +94,11 @@ class SearchAll extends base_command_1.BaseCommand {
90
94
  const items = (b) => Array.isArray(b) ? b : (b?.data ?? []);
91
95
  const names = ['agents', 'skills', 'teams', 'tasks', 'spaces'];
92
96
  const outcomes = await Promise.allSettled([
93
- data_provider_1.dataService.getStoreAgents({ q: flags.query, limit: flags.limit }),
94
- data_provider_1.dataService.getStoreSkills({ q: flags.query, limit: flags.limit }),
95
- data_provider_1.dataService.getStoreTeams({ q: flags.query, limit: flags.limit }),
96
- data_provider_1.dataService.listTasks({ q: flags.query, limit: flags.limit }),
97
- data_provider_1.dataService.listSpaces({ q: flags.query, limit: flags.limit }),
97
+ data_provider_1.dataService.getStoreAgents({ q: query, limit: flags.limit }),
98
+ data_provider_1.dataService.getStoreSkills({ q: query, limit: flags.limit }),
99
+ data_provider_1.dataService.getStoreTeams({ q: query, limit: flags.limit }),
100
+ data_provider_1.dataService.listTasks({ q: query, limit: flags.limit }),
101
+ data_provider_1.dataService.listSpaces({ q: query, limit: flags.limit }),
98
102
  ]);
99
103
  const [agents, skills, teams, tasks, spaces] = outcomes.map((outcome) => outcome.status === 'fulfilled' && validBucket(outcome.value) ? outcome.value : undefined);
100
104
  const failed = names.filter((_, index) => outcomes[index].status === 'rejected' ||
@@ -2,9 +2,12 @@ import { BaseCommand } from '../../base-command';
2
2
  export default class SearchTeams extends BaseCommand {
3
3
  static description: string;
4
4
  static examples: string[];
5
+ static args: {
6
+ query: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
7
+ };
5
8
  static flags: {
6
9
  json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
7
- query: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
10
+ query: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
11
  limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
9
12
  };
10
13
  run(): Promise<void>;
@@ -4,19 +4,21 @@ 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 search_query_1 = require("../../lib/search-query");
7
8
  class SearchTeams extends base_command_1.BaseCommand {
8
9
  static description = 'Search agent teams in the skrr store';
9
10
  static examples = [
11
+ '<%= config.bin %> search teams research',
10
12
  '<%= config.bin %> search teams --query "research"',
11
13
  '<%= config.bin %> search teams --query "customer support" --limit 10',
12
14
  '<%= config.bin %> search teams --query marketing --json',
13
15
  ];
16
+ static args = { query: core_1.Args.string({ description: 'Search term', ignoreStdin: true }) };
14
17
  static flags = {
15
18
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
16
19
  query: core_1.Flags.string({
17
20
  char: 'q',
18
21
  description: 'Search query',
19
- required: true,
20
22
  }),
21
23
  limit: core_1.Flags.integer({
22
24
  description: 'Maximum number of results',
@@ -25,11 +27,12 @@ class SearchTeams extends base_command_1.BaseCommand {
25
27
  };
26
28
  async run() {
27
29
  this.requireAuth();
28
- const { flags } = await this.parse(SearchTeams);
30
+ const { args, flags } = await this.parse(SearchTeams);
31
+ const query = (0, search_query_1.resolveSearchQuery)(this, args.query, flags.query, 'search teams');
29
32
  let response;
30
33
  try {
31
34
  response = await data_provider_1.dataService.getStoreTeams({
32
- q: flags.query,
35
+ q: query,
33
36
  limit: flags.limit,
34
37
  });
35
38
  }
@@ -410,7 +410,7 @@
410
410
  "id": "authoring",
411
411
  "title": "Write a Commitment: sources, keys, cadence and budgets",
412
412
  "readWhen": "you draft or change a Commitment's contract: what it watches, how often, where its work goes, what it may spend",
413
- "tokens": 1200,
413
+ "tokens": 1198,
414
414
  "aliases": [],
415
415
  "explains": [
416
416
  "COMMITMENT_MODE_RETIRED",
@@ -454,7 +454,7 @@
454
454
  "id": "speaking",
455
455
  "title": "A Commitment finds; its Agent speaks",
456
456
  "readWhen": "a Commitment run found something and you must decide whether the owner hears of it",
457
- "tokens": 320,
457
+ "tokens": 321,
458
458
  "aliases": [],
459
459
  "explains": []
460
460
  },
@@ -709,7 +709,7 @@
709
709
  ]
710
710
  }
711
711
  ],
712
- "hash": "094f13baf76b8cc49ff78f524d5806068a955865810f5d9171d2d630fe16e2c1",
712
+ "hash": "d7037274c9bfdf6c66b2bd4562adc98431aaac99f57f08e81ccd01573dcf658e",
713
713
  "tokens": 545
714
714
  },
715
715
  "routedIndex": {
@@ -1123,7 +1123,7 @@
1123
1123
  "id": "authoring",
1124
1124
  "title": "Write a Commitment: sources, keys, cadence and budgets",
1125
1125
  "readWhen": "you draft or change a Commitment's contract: what it watches, how often, where its work goes, what it may spend",
1126
- "tokens": 1200,
1126
+ "tokens": 1198,
1127
1127
  "aliases": [],
1128
1128
  "explains": [
1129
1129
  "COMMITMENT_MODE_RETIRED",
@@ -1167,7 +1167,7 @@
1167
1167
  "id": "speaking",
1168
1168
  "title": "A Commitment finds; its Agent speaks",
1169
1169
  "readWhen": "a Commitment run found something and you must decide whether the owner hears of it",
1170
- "tokens": 320,
1170
+ "tokens": 321,
1171
1171
  "aliases": [],
1172
1172
  "explains": []
1173
1173
  },
@@ -1353,7 +1353,7 @@
1353
1353
  ]
1354
1354
  }
1355
1355
  ],
1356
- "hash": "86969256907c1a1f9a35abfb01eae0f510a5fd52fac5ebc6a959d9a5fcb3382a",
1356
+ "hash": "25f5bbb8e2982fd45f1d22a0666c68a34c7d7813f17d6d6b9317136c64a1b9d5",
1357
1357
  "tokens": 494
1358
1358
  },
1359
1359
  "cards": {
@@ -1747,7 +1747,7 @@
1747
1747
  "routed": true,
1748
1748
  "aliases": [],
1749
1749
  "body": "## Concept model\n\n| Noun | Question it answers |\n| --- | --- |\n| **Compass** | What does good look like for this Agent, and what may it never trade away? |\n| **Northstar** | Which Commitments should exist, at what priority and on what budget? |\n| **Commitment** | Which outcome does this Agent keep true, and how does it keep checking? |\n| **Check** | What did one wake of a Commitment see, decide and do? |\n\nA Commitment is not a unit of work. A **Task** is one unit of work and a **Goal** is a dated\noutcome with key results; a Commitment watches both and may create Tasks, and is neither.\n\n## Decide\n\nFive mechanisms make something happen later, and the noun alone does not pick one:\n\n| Mechanism | What it is for | The signal that picks it |\n| --- | --- | --- |\n| **Follow-up** | Coming back to one thing, once or a bounded few times: a reminder, a watch, a check-in, an agreed action | The ask ends: \"look tomorrow\", \"tell me when CI is green\" |\n| **Trigger** | Running the Agent with a set prompt on a schedule, an event, once, or on demand | The person names when, and every run does the same work |\n| **Heartbeat** | Checking in on a conversation, group chat or Space at a frequency that backs off while unread | The person wants regular contact, not an outcome held |\n| **Commitment** | Keeping an outcome true: watched sources, a cadence and a loop that decides when to act | \"Keep X true\", \"watch this metric\": no end, and stale evidence matters |\n| **Workflow** | Running a durable graph of Tasks in order | Repeatable work whose steps depend on each other |\n\nA one-off \"look at it tomorrow\" is a follow-up, never a Commitment. Standing observation is a\nCommitment with a freshness contract, not a recurring trigger or a task board left running.\n\n## Workflow\n\n### Start a Commitment\n\n1. Read the Agent's Commitments first, and change one rather than add a near-duplicate.\n2. Create it and turn it on in one call: the outcome, what it watches, how often it checks, where\n its work goes. Turning it on runs Preflight; a refusal keeps the draft and reports the code,\n reason and fix.\n3. Leave it a draft only when the person asked to see it first.\n4. Read it back, and tell the person what it watches, how often, and whether it is on.\n\n## Authority\n\n| Actor | May do | Only a person may do |\n| --- | --- | --- |\n| Agent | Read the Commitments of an Agent it can view; create one, change it and turn it on; request a check; pause one; decide whether a finding is worth telling the owner | Lift a stop a person made; set or clear a concurrency limit; choose the Task review policy; approve an action proposal or a cadence change; configure a Northstar's governance or decide its intents |\n| Person | Everything in both columns | — |\n\nA Commitment grants no permission: its runs work under the Agent's own. A Check never writes an\nowner-facing message, and a Compass never creates, rewrites, pauses or archives a Commitment. The\nserver cannot always tell an Agent from the person whose login it holds, so an accepted call is\nnot permission: the right-hand column stays a person's.\n\n## Live state\n\n- `skrr commitments list --agent <agent-id>` — an Agent's Commitments, with status and assessment.\n- `skrr commitments show <commitment-id>` — the contract, its next check and the last one.\n- `skrr commitments roster --agent <agent-id>` — each loop: whether it is armed, its next wake, runs today.\n\n## Related guides\n\n- `tasks` — the Tasks a Commitment creates or watches.\n- `spaces` — Goals, and Workflows: durable graphs of Tasks.\n- `agents` — the Agent a Commitment belongs to, and where its runs execute.\n- `communication` — whether, what and how to tell the owner.",
1750
- "hash": "eb283ae15f588c7245fb4bbcc0249d31ca5a541efbe6ac77c98a2bc0a3e8ec30",
1750
+ "hash": "546e39b76cff98a814bf24ed66d4213eb13ced8de1d0ab2b4390694292f2069d",
1751
1751
  "tokens": 1169,
1752
1752
  "sections": [
1753
1753
  {
@@ -1780,7 +1780,7 @@
1780
1780
  "id": "authoring",
1781
1781
  "title": "Write a Commitment: sources, keys, cadence and budgets",
1782
1782
  "readWhen": "you draft or change a Commitment's contract: what it watches, how often, where its work goes, what it may spend",
1783
- "tokens": 1200,
1783
+ "tokens": 1198,
1784
1784
  "aliases": [],
1785
1785
  "explains": [
1786
1786
  "COMMITMENT_MODE_RETIRED",
@@ -1824,7 +1824,7 @@
1824
1824
  "id": "speaking",
1825
1825
  "title": "A Commitment finds; its Agent speaks",
1826
1826
  "readWhen": "a Commitment run found something and you must decide whether the owner hears of it",
1827
- "tokens": 320,
1827
+ "tokens": 321,
1828
1828
  "aliases": [],
1829
1829
  "explains": []
1830
1830
  },
@@ -5806,7 +5806,7 @@
5806
5806
  "id": "authoring",
5807
5807
  "title": "Write a Commitment: sources, keys, cadence and budgets",
5808
5808
  "readWhen": "you draft or change a Commitment's contract: what it watches, how often, where its work goes, what it may spend",
5809
- "tokens": 1200,
5809
+ "tokens": 1198,
5810
5810
  "aliases": [],
5811
5811
  "explains": [
5812
5812
  "COMMITMENT_MODE_RETIRED",
@@ -5850,7 +5850,7 @@
5850
5850
  "id": "speaking",
5851
5851
  "title": "A Commitment finds; its Agent speaks",
5852
5852
  "readWhen": "a Commitment run found something and you must decide whether the owner hears of it",
5853
- "tokens": 320,
5853
+ "tokens": 321,
5854
5854
  "aliases": [],
5855
5855
  "explains": []
5856
5856
  },
@@ -5922,7 +5922,7 @@
5922
5922
  "id": "authoring",
5923
5923
  "title": "Write a Commitment: sources, keys, cadence and budgets",
5924
5924
  "readWhen": "you draft or change a Commitment's contract: what it watches, how often, where its work goes, what it may spend",
5925
- "tokens": 1200,
5925
+ "tokens": 1198,
5926
5926
  "aliases": [],
5927
5927
  "explains": [
5928
5928
  "COMMITMENT_MODE_RETIRED",
@@ -5966,7 +5966,7 @@
5966
5966
  "id": "speaking",
5967
5967
  "title": "A Commitment finds; its Agent speaks",
5968
5968
  "readWhen": "a Commitment run found something and you must decide whether the owner hears of it",
5969
- "tokens": 320,
5969
+ "tokens": 321,
5970
5970
  "aliases": [],
5971
5971
  "explains": []
5972
5972
  },
@@ -6040,7 +6040,7 @@
6040
6040
  "id": "authoring",
6041
6041
  "title": "Write a Commitment: sources, keys, cadence and budgets",
6042
6042
  "readWhen": "you draft or change a Commitment's contract: what it watches, how often, where its work goes, what it may spend",
6043
- "tokens": 1200,
6043
+ "tokens": 1198,
6044
6044
  "aliases": [],
6045
6045
  "explains": [
6046
6046
  "COMMITMENT_MODE_RETIRED",
@@ -6084,7 +6084,7 @@
6084
6084
  "id": "speaking",
6085
6085
  "title": "A Commitment finds; its Agent speaks",
6086
6086
  "readWhen": "a Commitment run found something and you must decide whether the owner hears of it",
6087
- "tokens": 320,
6087
+ "tokens": 321,
6088
6088
  "aliases": [],
6089
6089
  "explains": []
6090
6090
  },
@@ -6128,9 +6128,9 @@
6128
6128
  "COMMITMENT_CONCURRENCY_REQUIRES_OWNER_DECISION",
6129
6129
  "COMMITMENT_TASK_REVIEW_POLICY_OWNER_REQUIRED"
6130
6130
  ],
6131
- "body": "Read this when you draft or change a Commitment's contract: what it watches, how often, where its work goes, what it may spend.\n\nA Commitment starts as a draft; create and turn it on in one call unless the person asked to\nreview it first. Activation runs Preflight — a refusal keeps the draft and reports the code,\nreason and fix. An active contract spends compute on every check, so make it say exactly what\nwill be watched.\n\n- **Outcome and criteria**: the state to hold true, and how you will know it holds.\n- **Watched sources**: what each check reads. A source the platform reads itself (Tasks, a Goal,\n GitHub, metric snapshots it records) needs only its name and scope. A value only a run can read,\n such as a dashboard or an outside CI rate, is an `agent_run` key you declare.\n- **Declared keys**: the operator declares the keys, and the agent fills them. A run may report any\n key, but only a declared one can move the loop, and only as its `changeRule` says: `any` change,\n or `numeric_delta` with `minDelta`, `minRatio`, `direction` and `absoluteFloor`.\n- **Cadence**: `interval` (`1m` to `365d`), `daily` at `HH:MM` times in a timezone,\n `event_plus_interval`, or `manual`. Only `event_plus_interval` reads events (CLI:\n `--event-driven`), and an event is an accelerator, not a delivery receipt: a missed one is not\n replayed, and each interval re-checks current state, while it is running. Silence means no\n event was seen, not that none happened. `skrr triggers event-catalog --json` marks each event's\n `commitmentWake` and how to select it (`watchedSource` or `attachedSensor`); a selection that cannot\n wake it is set aside and named by the write.\n- **Delivery**: where its work goes. `report_only` reports and changes nothing.\n- **Budgets**: `policy.executionBudget` caps runs, sensing runs and cost per day. `0` blocks; `null`\n is no limit.\n- **Event sources**: `policy.executionBudget.allowedEventSources` limits which sources may wake it.\n An empty or missing list allows every source; name sources to restrict it.\n- **Interruptions**: `policy.maxUserNudgesPerDay` caps messages to the person: `0` mutes, `null` is\n no limit. `minUserNudgeIntervalMs` is the least gap between two.\n- **Quiet hours**: `policy.quietHours` is `{enabled, start, end, timezone}`. Times are 24-hour\n `HH:MM`; `enabled: true` needs both, and they must differ. A window may cross midnight, and `end`\n is outside it. `timezone` is an IANA name; omitted means UTC, not the person's zone.\n\n## Example\n\nA daily, report-only watch on a deploy failure rate:\n\nSave this as `commitment.json`:\n\n```json\n{\n \"agentId\": \"<agent-id>\",\n \"title\": \"Deploy failure rate\",\n \"status\": \"draft\",\n \"target\": { \"outcome\": \"A rise in the deploy failure rate is reported the day it happens\" },\n \"cadence\": { \"mode\": \"daily\", \"times\": [\"09:00\"], \"timezone\": \"America/New_York\" },\n \"delivery\": { \"mode\": \"report_only\" },\n \"watchedSources\": [{\n \"source\": \"agent_run\",\n \"config\": { \"keys\": [{\n \"key\": \"deploys.failure_rate_7d\",\n \"label\": \"Deploy failure rate, last 7 days\",\n \"changeRule\": { \"mode\": \"numeric_delta\", \"minDelta\": 0.02, \"direction\": \"up\" }\n }] }\n }],\n \"policy\": { \"executionBudget\": { \"maxRunsPerDay\": 2, \"maxObservationRunsPerDay\": 2 } }\n}\n```\n\n```bash\nskrr commitments create --from-json commitment.json --activate --json\n```\n\n`create` prints a `Warning:` for anything the body leaves inert, such as an `agent_run` source\nwith no keys. `--activate` turns it on in the same call: it runs Preflight, and a refusal keeps\nthe draft and reports it, such as Always-On being off for the Agent. Drop `--activate` only when\nthe person asked to review it first; `skrr commitments resume` turns a draft on later, and\n`skrr commitments update` changes it.\n\n## Refusals\n\n| Code | Cause | Fix |\n| --- | --- | --- |\n| `COMMITMENT_MODE_RETIRED` | The body carries `mode`; Commitment modes are retired. | Leave it out: runs work under the Agent's own permissions. |\n| `COMMITMENT_POLICY_RETIRED` | The body carries a retired permission-tier policy field. | Remove the field the refusal names. |\n| `COMMITMENT_DELIVERY_REQUIRED` | A coding Commitment names no delivery. | Choose where its work goes. |\n| `COMMITMENT_CONCURRENCY_REQUIRES_OWNER_DECISION` | An Agent set or cleared a finite concurrency limit. | Recommend the limit; the person sets it. |\n| `COMMITMENT_TASK_REVIEW_POLICY_OWNER_REQUIRED` | Only the owner chooses the Task review policy. | Leave it out and ask the owner. |",
6132
- "hash": "8e2ed95ad9aa146cd1b1ee8d0a2181f8d52dd22d98104bfde7b175fd721099bd",
6133
- "tokens": 1200,
6131
+ "body": "Read this when you draft or change a Commitment's contract: what it watches, how often, where its work goes, what it may spend.\n\nA Commitment starts as a draft; create and turn it on in one call unless the person asked to\nreview it first. Activation runs Preflight — a refusal keeps the draft and reports the code,\nreason and fix. An active contract spends compute on every check, so make it say exactly what\nwill be watched.\n\n- **Outcome and criteria**: the state to hold true, and how you will know it holds.\n- **Watched sources**: what each check reads. A source the platform reads itself (Tasks, a Goal,\n GitHub, metric snapshots it records) needs only its name and scope. A value only a run can read,\n such as a dashboard or an outside CI rate, is an `agent_run` key you declare.\n- **Declared keys**: the operator declares the keys, and the agent fills them. A run may report any\n key, but only a declared one can move the loop, and only as its `changeRule` says: `any` change,\n or `numeric_delta` with `minDelta`, `minRatio`, `direction` and `absoluteFloor`.\n- **Cadence**: `interval` (`1m` to `365d`), `daily` at `HH:MM` times in a timezone,\n `event_plus_interval`, or `manual`. Only `event_plus_interval` reads events, and an event is an\n accelerator, not a delivery receipt: a missed one is not replayed, and each interval re-checks\n current state, while it is running. Silence means no event was seen, not that none happened. A\n selection that cannot wake it is set aside and named by the write.\n- **Events (CLI)**: `--event-driven` sets `event_plus_interval`; `skrr triggers event-catalog --json`\n shows each event's `commitmentWake` and how to select it.\n- **Delivery**: where its work goes. `report_only` reports and changes nothing.\n- **Budgets**: `policy.executionBudget` caps runs, sensing runs and cost per day. `0` blocks; `null`\n is no limit.\n- **Event sources**: `policy.executionBudget.allowedEventSources` limits which sources may wake it.\n An empty or missing list allows every source; name sources to restrict it.\n- **Interruptions**: `policy.maxUserNudgesPerDay` caps messages to the person: `0` mutes, `null` is\n no limit. `minUserNudgeIntervalMs` is the least gap between two.\n- **Quiet hours**: `policy.quietHours` is `{enabled, start, end, timezone}`. Times are 24-hour\n `HH:MM`; `enabled: true` needs both, and they must differ. A window may cross midnight, and `end`\n is outside it. `timezone` is an IANA name; omitted means UTC, not the person's zone.\n\n## Example\n\nA daily, report-only watch on a deploy failure rate:\n\nSave this as `commitment.json`:\n\n```json\n{\n \"agentId\": \"<agent-id>\",\n \"title\": \"Deploy failure rate\",\n \"status\": \"draft\",\n \"target\": { \"outcome\": \"A rise in the deploy failure rate is reported the day it happens\" },\n \"cadence\": { \"mode\": \"daily\", \"times\": [\"09:00\"], \"timezone\": \"America/New_York\" },\n \"delivery\": { \"mode\": \"report_only\" },\n \"watchedSources\": [{\n \"source\": \"agent_run\",\n \"config\": { \"keys\": [{\n \"key\": \"deploys.failure_rate_7d\",\n \"label\": \"Deploy failure rate, last 7 days\",\n \"changeRule\": { \"mode\": \"numeric_delta\", \"minDelta\": 0.02, \"direction\": \"up\" }\n }] }\n }],\n \"policy\": { \"executionBudget\": { \"maxRunsPerDay\": 2, \"maxObservationRunsPerDay\": 2 } }\n}\n```\n\n```bash\nskrr commitments create --from-json commitment.json --activate --json\n```\n\n`create` prints a `Warning:` for anything the body leaves inert, such as an `agent_run` source\nwith no keys. `--activate` turns it on in the same call: it runs Preflight, and a refusal keeps\nthe draft and reports it, such as Always-On being off for the Agent. Drop `--activate` only when\nthe person asked to review it first; `skrr commitments resume` turns a draft on later, and\n`skrr commitments update` changes it.\n\n## Refusals\n\n| Code | Cause | Fix |\n| --- | --- | --- |\n| `COMMITMENT_MODE_RETIRED` | The body carries `mode`; Commitment modes are retired. | Leave it out: runs work under the Agent's own permissions. |\n| `COMMITMENT_POLICY_RETIRED` | The body carries a retired permission-tier policy field. | Remove the field the refusal names. |\n| `COMMITMENT_DELIVERY_REQUIRED` | A coding Commitment names no delivery. | Choose where its work goes. |\n| `COMMITMENT_CONCURRENCY_REQUIRES_OWNER_DECISION` | An Agent set or cleared a finite concurrency limit. | Recommend the limit; the person sets it. |\n| `COMMITMENT_TASK_REVIEW_POLICY_OWNER_REQUIRED` | Only the owner chooses the Task review policy. | Leave it out and ask the owner. |",
6132
+ "hash": "041de8f03ba449aae61ed3761b98e415b737210da453bfae321e014d4b5365f5",
6133
+ "tokens": 1198,
6134
6134
  "sections": [
6135
6135
  {
6136
6136
  "id": "model",
@@ -6162,7 +6162,7 @@
6162
6162
  "id": "authoring",
6163
6163
  "title": "Write a Commitment: sources, keys, cadence and budgets",
6164
6164
  "readWhen": "you draft or change a Commitment's contract: what it watches, how often, where its work goes, what it may spend",
6165
- "tokens": 1200,
6165
+ "tokens": 1198,
6166
6166
  "aliases": [],
6167
6167
  "explains": [
6168
6168
  "COMMITMENT_MODE_RETIRED",
@@ -6206,7 +6206,7 @@
6206
6206
  "id": "speaking",
6207
6207
  "title": "A Commitment finds; its Agent speaks",
6208
6208
  "readWhen": "a Commitment run found something and you must decide whether the owner hears of it",
6209
- "tokens": 320,
6209
+ "tokens": 321,
6210
6210
  "aliases": [],
6211
6211
  "explains": []
6212
6212
  },
@@ -6278,7 +6278,7 @@
6278
6278
  "id": "authoring",
6279
6279
  "title": "Write a Commitment: sources, keys, cadence and budgets",
6280
6280
  "readWhen": "you draft or change a Commitment's contract: what it watches, how often, where its work goes, what it may spend",
6281
- "tokens": 1200,
6281
+ "tokens": 1198,
6282
6282
  "aliases": [],
6283
6283
  "explains": [
6284
6284
  "COMMITMENT_MODE_RETIRED",
@@ -6322,7 +6322,7 @@
6322
6322
  "id": "speaking",
6323
6323
  "title": "A Commitment finds; its Agent speaks",
6324
6324
  "readWhen": "a Commitment run found something and you must decide whether the owner hears of it",
6325
- "tokens": 320,
6325
+ "tokens": 321,
6326
6326
  "aliases": [],
6327
6327
  "explains": []
6328
6328
  },
@@ -6394,7 +6394,7 @@
6394
6394
  "id": "authoring",
6395
6395
  "title": "Write a Commitment: sources, keys, cadence and budgets",
6396
6396
  "readWhen": "you draft or change a Commitment's contract: what it watches, how often, where its work goes, what it may spend",
6397
- "tokens": 1200,
6397
+ "tokens": 1198,
6398
6398
  "aliases": [],
6399
6399
  "explains": [
6400
6400
  "COMMITMENT_MODE_RETIRED",
@@ -6438,7 +6438,7 @@
6438
6438
  "id": "speaking",
6439
6439
  "title": "A Commitment finds; its Agent speaks",
6440
6440
  "readWhen": "a Commitment run found something and you must decide whether the owner hears of it",
6441
- "tokens": 320,
6441
+ "tokens": 321,
6442
6442
  "aliases": [],
6443
6443
  "explains": []
6444
6444
  },
@@ -6516,7 +6516,7 @@
6516
6516
  "id": "authoring",
6517
6517
  "title": "Write a Commitment: sources, keys, cadence and budgets",
6518
6518
  "readWhen": "you draft or change a Commitment's contract: what it watches, how often, where its work goes, what it may spend",
6519
- "tokens": 1200,
6519
+ "tokens": 1198,
6520
6520
  "aliases": [],
6521
6521
  "explains": [
6522
6522
  "COMMITMENT_MODE_RETIRED",
@@ -6560,7 +6560,7 @@
6560
6560
  "id": "speaking",
6561
6561
  "title": "A Commitment finds; its Agent speaks",
6562
6562
  "readWhen": "a Commitment run found something and you must decide whether the owner hears of it",
6563
- "tokens": 320,
6563
+ "tokens": 321,
6564
6564
  "aliases": [],
6565
6565
  "explains": []
6566
6566
  },
@@ -6598,9 +6598,9 @@
6598
6598
  "version": 4,
6599
6599
  "aliases": [],
6600
6600
  "explains": [],
6601
- "body": "Read this when a Commitment run found something and you must decide whether the owner hears of it.\n\nA Check never writes to the owner, and it does not hand you a prepared message or brief: whether\nthe owner hears of what a run found is your call, from what you saw and what you already said.\n\n- Decide with everything in view: what you already said, whether the owner replied, what another\n surface already raised. One message, a different message or nothing are all valid outcomes, and\n silence is often the right one.\n- To speak from the run, send it with `skrr agent message send` where the run allows it: it is\n delivered under the owner's limits and counted for this Commitment. Otherwise return a\n `status_update` or `report` action intent with its `text` for the Commitment's report\n destinations. A `message` action intent is recorded but never delivered. Write the words yourself.\n- The owner's limits (mute, quiet hours, a daily nudge cap) apply when you deliver, whichever way\n you send it: whatever is delivered counts against them, and a delivery they do not allow is\n suppressed: the cycle shows it as a stop at \"reach\" where the platform recorded it, and `skrr agent\n message send` answers with its status.\n\n`skrr commitments reports <commitment-id>` lists where its reports go and on what condition; the\ndefault sends only on a material change.",
6602
- "hash": "0e16cd15a9b31d7f5fbd477d623213e8c30d735c028841491691dab809b12c14",
6603
- "tokens": 320,
6601
+ "body": "Read this when a Commitment run found something and you must decide whether the owner hears of it.\n\nA Check never writes to the owner, and it does not hand you a prepared message or brief: whether\nthe owner hears of what a run found is your call, from what you saw and what you already said.\n\n- Decide with everything in view: what you already said, whether the owner replied, what another\n surface already raised. One message, a different message or nothing are all valid outcomes, and\n silence is often the right one.\n- To speak from the run, return a `status_update` or `report` action intent with its `text` for the\n Commitment's report destinations. A `message` action intent is recorded but never delivered. Write\n the words yourself.\n- Where the run allows it, send the message with `skrr agent message send` instead: it is delivered\n under the owner's limits and counted for this Commitment.\n- The owner's limits (mute, quiet hours, a daily nudge cap) apply when you deliver, whichever way\n you send it: whatever is delivered counts against them, and a delivery they do not allow is\n suppressed: the cycle shows it as a stop at \"reach\" where the platform recorded it.\n`skrr agent message send` answers with the delivery status.\n\n`skrr commitments reports <commitment-id>` lists where its reports go and on what condition; the\ndefault sends only on a material change.",
6602
+ "hash": "a9eab050ab37ec41a67494e31436307731c5e241ada628fe00b915e06eb566bd",
6603
+ "tokens": 321,
6604
6604
  "sections": [
6605
6605
  {
6606
6606
  "id": "model",
@@ -6632,7 +6632,7 @@
6632
6632
  "id": "authoring",
6633
6633
  "title": "Write a Commitment: sources, keys, cadence and budgets",
6634
6634
  "readWhen": "you draft or change a Commitment's contract: what it watches, how often, where its work goes, what it may spend",
6635
- "tokens": 1200,
6635
+ "tokens": 1198,
6636
6636
  "aliases": [],
6637
6637
  "explains": [
6638
6638
  "COMMITMENT_MODE_RETIRED",
@@ -6676,7 +6676,7 @@
6676
6676
  "id": "speaking",
6677
6677
  "title": "A Commitment finds; its Agent speaks",
6678
6678
  "readWhen": "a Commitment run found something and you must decide whether the owner hears of it",
6679
- "tokens": 320,
6679
+ "tokens": 321,
6680
6680
  "aliases": [],
6681
6681
  "explains": []
6682
6682
  },
@@ -6752,7 +6752,7 @@
6752
6752
  "id": "authoring",
6753
6753
  "title": "Write a Commitment: sources, keys, cadence and budgets",
6754
6754
  "readWhen": "you draft or change a Commitment's contract: what it watches, how often, where its work goes, what it may spend",
6755
- "tokens": 1200,
6755
+ "tokens": 1198,
6756
6756
  "aliases": [],
6757
6757
  "explains": [
6758
6758
  "COMMITMENT_MODE_RETIRED",
@@ -6796,7 +6796,7 @@
6796
6796
  "id": "speaking",
6797
6797
  "title": "A Commitment finds; its Agent speaks",
6798
6798
  "readWhen": "a Commitment run found something and you must decide whether the owner hears of it",
6799
- "tokens": 320,
6799
+ "tokens": 321,
6800
6800
  "aliases": [],
6801
6801
  "explains": []
6802
6802
  },
@@ -6870,7 +6870,7 @@
6870
6870
  "id": "authoring",
6871
6871
  "title": "Write a Commitment: sources, keys, cadence and budgets",
6872
6872
  "readWhen": "you draft or change a Commitment's contract: what it watches, how often, where its work goes, what it may spend",
6873
- "tokens": 1200,
6873
+ "tokens": 1198,
6874
6874
  "aliases": [],
6875
6875
  "explains": [
6876
6876
  "COMMITMENT_MODE_RETIRED",
@@ -6914,7 +6914,7 @@
6914
6914
  "id": "speaking",
6915
6915
  "title": "A Commitment finds; its Agent speaks",
6916
6916
  "readWhen": "a Commitment run found something and you must decide whether the owner hears of it",
6917
- "tokens": 320,
6917
+ "tokens": 321,
6918
6918
  "aliases": [],
6919
6919
  "explains": []
6920
6920
  },
@@ -616,6 +616,8 @@ export declare class AgenticStreamClient {
616
616
  * (OSK-12197) instead of leaving `[y/N]` open after the run stopped asking.
617
617
  */
618
618
  private readonly openPermissionPrompts;
619
+ /** Unbound asks held for their bound twin (OSK-22641), by `toolUseId`. */
620
+ private readonly heldUnboundAsks;
619
621
  private readonly browserPermissionRequests;
620
622
  /**
621
623
  * Tool calls THIS client refused (the person answered no, or nobody was asked
@@ -794,6 +796,20 @@ export declare class AgenticStreamClient {
794
796
  private answerText;
795
797
  private applySessionOutput;
796
798
  private installHandlers;
799
+ /**
800
+ * One server ask, one prompt (OSK-11796, OSK-22641).
801
+ *
802
+ * A cloud run raises the SAME ask twice for one tool call, 0.1-0.8 s apart: first the agent hook's own
803
+ * emit, which carries `permissionSuggestions` and no `permissionBinding`, then the worker's bound ask for
804
+ * the same `toolUseId`. A decision is only accepted on the bound one (`PERMISSION_BINDING_REQUIRED`
805
+ * otherwise), and the two have different generation keys, so each used to open its own prompt: the first
806
+ * could not be answered and was then aborted when the bound twin arrived, which read as a prompt that
807
+ * showed twice and swallowed the first `y`. An unbound ask is therefore held for `UNBOUND_ASK_HOLD_MS`
808
+ * and dropped when the bound ask for the same call shows up; one with no twin (a server that predates the
809
+ * binding) is prompted after the hold exactly as before.
810
+ */
811
+ private onPermissionRequest;
812
+ private admitPermissionRequest;
797
813
  private handlePermission;
798
814
  private replayPermissionDecision;
799
815
  /** Protected asks record an exact response; neither a click nor its receipt proves execution. */
@@ -209,6 +209,8 @@ async function discardTypeAhead(input, windowMs = exports.TYPE_AHEAD_DISCARD_MS)
209
209
  if (sawInterrupt)
210
210
  process.kill(process.pid, 'SIGINT');
211
211
  }
212
+ /** How long an unbound permission ask waits for the bound ask the worker raises for the same call. */
213
+ const UNBOUND_ASK_HOLD_MS = 2000;
212
214
  const permissionGeneration = (event) => JSON.stringify([
213
215
  event.sessionId,
214
216
  event.toolUseId,
@@ -875,6 +877,8 @@ class AgenticStreamClient {
875
877
  * (OSK-12197) instead of leaving `[y/N]` open after the run stopped asking.
876
878
  */
877
879
  openPermissionPrompts = new Map();
880
+ /** Unbound asks held for their bound twin (OSK-22641), by `toolUseId`. */
881
+ heldUnboundAsks = new Map();
878
882
  browserPermissionRequests = new Set();
879
883
  /**
880
884
  * Tool calls THIS client refused (the person answered no, or nobody was asked
@@ -1112,6 +1116,9 @@ class AgenticStreamClient {
1112
1116
  this.pendingEnvelopes.clear();
1113
1117
  this.browserPermissionRequests.clear();
1114
1118
  this.deniedToolUseIds.clear();
1119
+ for (const timer of this.heldUnboundAsks.values())
1120
+ clearTimeout(timer);
1121
+ this.heldUnboundAsks.clear();
1115
1122
  this.deniedLabelled.clear();
1116
1123
  this.permissionGenerations.clear();
1117
1124
  this.permissionEpochs.clear();
@@ -1763,27 +1770,7 @@ class AgenticStreamClient {
1763
1770
  socket.on('permission:request', (event) => {
1764
1771
  if (!match(event))
1765
1772
  return;
1766
- // Authoritative receipt replays can arrive while this generation's TTY
1767
- // prompt is open. Retire it before the ordinary request dedup check.
1768
- if (this.replayPermissionDecision(event))
1769
- return;
1770
- // One ask, one answer (OSK-11796). The same `permission:request` can
1771
- // arrive twice — a `session:join` replay overlapping the live emit, or
1772
- // fan-out through a second room — and each copy used to emit its own
1773
- // `permission.requested` AND send its own approve/deny, so a duplicate
1774
- // delivery produced a duplicate prompt and a racing second decision.
1775
- if (!this.firstTimeSeen('permission', event.permissionBinding ? permissionGeneration(event) : event.toolUseId))
1776
- return;
1777
- if (event.toolUseId) {
1778
- this.openPermissionPrompts.get(event.toolUseId)?.abort();
1779
- this.permissionGenerations.set(event.toolUseId, {
1780
- key: permissionGeneration(event),
1781
- bound: !!event.permissionBinding,
1782
- });
1783
- if (event.permissionBinding)
1784
- this.permissionEpochs.set(this.options.sessionId, event.permissionBinding.epoch);
1785
- }
1786
- void this.handlePermission(event);
1773
+ this.onPermissionRequest(event);
1787
1774
  });
1788
1775
  socket.on('permission:cancel', (event) => {
1789
1776
  if (!match(event))
@@ -1804,6 +1791,70 @@ class AgenticStreamClient {
1804
1791
  this.finish('failed', event);
1805
1792
  });
1806
1793
  }
1794
+ /**
1795
+ * One server ask, one prompt (OSK-11796, OSK-22641).
1796
+ *
1797
+ * A cloud run raises the SAME ask twice for one tool call, 0.1-0.8 s apart: first the agent hook's own
1798
+ * emit, which carries `permissionSuggestions` and no `permissionBinding`, then the worker's bound ask for
1799
+ * the same `toolUseId`. A decision is only accepted on the bound one (`PERMISSION_BINDING_REQUIRED`
1800
+ * otherwise), and the two have different generation keys, so each used to open its own prompt: the first
1801
+ * could not be answered and was then aborted when the bound twin arrived, which read as a prompt that
1802
+ * showed twice and swallowed the first `y`. An unbound ask is therefore held for `UNBOUND_ASK_HOLD_MS`
1803
+ * and dropped when the bound ask for the same call shows up; one with no twin (a server that predates the
1804
+ * binding) is prompted after the hold exactly as before.
1805
+ */
1806
+ onPermissionRequest(event) {
1807
+ // Authoritative receipt replays can arrive while this generation's TTY
1808
+ // prompt is open. Retire it before the ordinary request dedup check.
1809
+ if (this.replayPermissionDecision(event))
1810
+ return;
1811
+ const id = event.toolUseId;
1812
+ const plainToolAsk = !event.purpose && event.runtimeElicitation === undefined && event.toolName !== 'ComputerUse';
1813
+ if (id && plainToolAsk) {
1814
+ if (event.permissionBinding) {
1815
+ const held = this.heldUnboundAsks.get(id);
1816
+ if (held) {
1817
+ clearTimeout(held);
1818
+ this.heldUnboundAsks.delete(id);
1819
+ }
1820
+ }
1821
+ else {
1822
+ // The bound ask for this call was already seen, or an unbound one is already held.
1823
+ if (this.permissionGenerations.get(id)?.bound || this.heldUnboundAsks.has(id))
1824
+ return;
1825
+ if (!this.permissionGenerations.has(id)) {
1826
+ const timer = setTimeout(() => {
1827
+ this.heldUnboundAsks.delete(id);
1828
+ if (!this.closed)
1829
+ this.admitPermissionRequest(event);
1830
+ }, UNBOUND_ASK_HOLD_MS);
1831
+ timer.unref?.();
1832
+ this.heldUnboundAsks.set(id, timer);
1833
+ return;
1834
+ }
1835
+ }
1836
+ }
1837
+ this.admitPermissionRequest(event);
1838
+ }
1839
+ admitPermissionRequest(event) {
1840
+ // One ask, one answer (OSK-11796). The same `permission:request` can
1841
+ // arrive twice — a `session:join` replay overlapping the live emit, or
1842
+ // fan-out through a second room — and each copy used to emit its own
1843
+ // `permission.requested` AND send its own approve/deny, so a duplicate
1844
+ // delivery produced a duplicate prompt and a racing second decision.
1845
+ if (!this.firstTimeSeen('permission', event.permissionBinding ? permissionGeneration(event) : event.toolUseId))
1846
+ return;
1847
+ if (event.toolUseId) {
1848
+ this.openPermissionPrompts.get(event.toolUseId)?.abort();
1849
+ this.permissionGenerations.set(event.toolUseId, {
1850
+ key: permissionGeneration(event),
1851
+ bound: !!event.permissionBinding,
1852
+ });
1853
+ if (event.permissionBinding)
1854
+ this.permissionEpochs.set(this.options.sessionId, event.permissionBinding.epoch);
1855
+ }
1856
+ void this.handlePermission(event);
1857
+ }
1807
1858
  async handlePermission(event) {
1808
1859
  if (this.closed)
1809
1860
  return;
@@ -2138,6 +2189,12 @@ class AgenticStreamClient {
2138
2189
  */
2139
2190
  handlePermissionCancel(event) {
2140
2191
  const toolUseId = typeof event.toolUseId === 'string' ? event.toolUseId : undefined;
2192
+ // An unbound ask still being held for its bound twin was cancelled before it was ever shown.
2193
+ const heldAsk = toolUseId ? this.heldUnboundAsks.get(toolUseId) : undefined;
2194
+ if (toolUseId && heldAsk) {
2195
+ clearTimeout(heldAsk);
2196
+ this.heldUnboundAsks.delete(toolUseId);
2197
+ }
2141
2198
  const generation = toolUseId ? this.permissionGenerations.get(toolUseId) : undefined;
2142
2199
  if (generation &&
2143
2200
  (generation.bound || event.permissionBinding) &&
@@ -49,8 +49,8 @@ export interface BalanceStatus {
49
49
  * "a new session can start". Part of it may be FROZEN rather than in flight;
50
50
  * see `heldBreakdown`. */
51
51
  heldMicros?: number;
52
- /** Only when asked for (`getBalance({ holds: 'breakdown' })`). */
53
- heldBreakdown?: HeldBreakdown;
52
+ /** Only when asked for (`getBalance({ holds: 'breakdown' })`); `null` when the server tried and could not read the holds in time. */
53
+ heldBreakdown?: HeldBreakdown | null;
54
54
  currency?: string;
55
55
  autoRefillEnabled?: boolean;
56
56
  refillIntervalValue?: number;
@@ -147,8 +147,8 @@ export interface WorkspaceBalance {
147
147
  availableMicros: number;
148
148
  postedBalanceMicros: number;
149
149
  heldMicros: number;
150
- /** Only when asked for (`getWorkspaceBalance(id, { holds: 'breakdown' })`). */
151
- heldBreakdown?: HeldBreakdown;
150
+ /** Only when asked for (`getWorkspaceBalance(id, { holds: 'breakdown' })`); `null` when the server tried and could not read the holds in time. */
151
+ heldBreakdown?: HeldBreakdown | null;
152
152
  }
153
153
  export declare function getWorkspaceBalance(workspaceId: string, options?: {
154
154
  holds?: 'breakdown';
@@ -176,7 +176,7 @@ export declare function workspaceBalanceLines(balance: Pick<WorkspaceBalance, 'a
176
176
  * The lines that say what a Held figure is made of, indented under it. Empty when the server did not
177
177
  * send a breakdown (an older server ignores the request), so nothing is invented for it.
178
178
  */
179
- export declare function heldBreakdownLines(held: HeldBreakdown | undefined): string[];
179
+ export declare function heldBreakdownLines(held: HeldBreakdown | null | undefined): string[];
180
180
  /**
181
181
  * Render micros as currency. Micros are millionths of a unit, and the balance
182
182
  * that refuses a session is compared against a price — so this rounds to cents
@@ -138,19 +138,26 @@ function workspaceBalanceLines(balance) {
138
138
  * send a breakdown (an older server ignores the request), so nothing is invented for it.
139
139
  */
140
140
  function heldBreakdownLines(held) {
141
- if (!held)
141
+ if (held === undefined)
142
142
  return [];
143
+ // Asked for and not available (the server gave up reading thousands of holds in time): say so,
144
+ // because silence is also what an older server looks like.
145
+ if (held === null) {
146
+ return [
147
+ ' (the in-flight / frozen split is unavailable right now; retry in a moment)',
148
+ ];
149
+ }
143
150
  const lines = [];
144
151
  if (held.inFlightMicros > 0) {
145
152
  lines.push(` in flight ${formatCreditsWithUsd(held.inFlightMicros)}` +
146
- ` (${held.inFlightCount} running or just ended; clears when they settle)`);
153
+ ` (${held.inFlightCount} hold${held.inFlightCount === 1 ? '' : 's'} on work still running or just ended; clears when it settles)`);
147
154
  }
148
155
  if (held.frozenMicros > 0) {
149
156
  const since = held.oldestFrozenAt
150
157
  ? `, the oldest since ${held.oldestFrozenAt.slice(0, 10)}`
151
158
  : '';
152
159
  lines.push(` frozen ${formatCreditsWithUsd(held.frozenMicros)}` +
153
- ` (${held.frozenCount} turn${held.frozenCount === 1 ? '' : 's'} that ended without settling${since};` +
160
+ ` (${held.frozenCount} hold${held.frozenCount === 1 ? '' : 's'} from work that ended without settling${since};` +
154
161
  ' held until billing clears them)');
155
162
  }
156
163
  if (held.unattributedMicros > 0) {
@@ -14,7 +14,19 @@ function eventWakeLines(caps) {
14
14
  lines.push(` configured sources: ${(caps.configuredSources ?? []).join(', ') || 'none'}`);
15
15
  lines.push(` eligible sources: ${(caps.eligibleSources ?? []).join(', ') || 'none'}`);
16
16
  lines.push(` materialized sources: ${(caps.materializedSources ?? []).join(', ') || 'none'}`);
17
- if ((caps.dormantSources ?? []).length) {
17
+ const wakeableWhenActive = caps.wakeableWhenActive ?? [];
18
+ const eventless = caps.eventlessSources ?? [];
19
+ if (wakeableWhenActive.length || eventless.length) {
20
+ // The server told the causes apart (OSK-22595): a source that would wake once it is active on an
21
+ // event_plus_interval cadence is not the same as one that produces no events.
22
+ if (wakeableWhenActive.length) {
23
+ lines.push(` would wake once active on event_plus_interval: ${wakeableWhenActive.join(', ')} (no event wake is planned for them yet)`);
24
+ }
25
+ if (eventless.length) {
26
+ lines.push(` no events exist for: ${eventless.join(', ')} (see \`skrr triggers event-catalog\`; they can be read by a check but never wake it)`);
27
+ }
28
+ }
29
+ else if ((caps.dormantSources ?? []).length) {
18
30
  lines.push(` dormant sources: ${caps.dormantSources.join(', ')} (configured, but no event wake is planned for them)`);
19
31
  }
20
32
  if ((caps.unroutableSources ?? []).length) {
@@ -713,6 +713,10 @@ export type EventWakeCapabilities = {
713
713
  eligibleSources?: string[];
714
714
  materializedSources?: string[];
715
715
  dormantSources?: string[];
716
+ /** Dormant sources whose events could wake it once it is active on event_plus_interval (OSK-22595). */
717
+ wakeableWhenActive?: string[];
718
+ /** Dormant sources that produce no events at all. */
719
+ eventlessSources?: string[];
716
720
  unroutableSources?: {
717
721
  source?: string;
718
722
  reason?: string;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Why a scheduled run FAILED, in words (OSK-22666).
3
+ *
4
+ * The record carries the cause (`errorCode`, and a sentence for it), but the text surfaces printed the
5
+ * status alone, or the generic code the executor wrote (`scheduled_agent_chat_threw`), so a To-Do refused
6
+ * for lack of credit read as `failed` with nothing to do about it. A balance refusal names whose balance
7
+ * and the command that shows it; any other failure prints the sentence the record gives, and a failure
8
+ * with no sentence returns undefined rather than a guess.
9
+ */
10
+ export declare function failedRunCause(input: {
11
+ errorCode?: string;
12
+ message?: string;
13
+ /** For a narrow table cell: the cause alone, with no next step (the trace carries the full sentence). */
14
+ short?: boolean;
15
+ }): string | undefined;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.failedRunCause = failedRunCause;
4
+ /**
5
+ * Why a scheduled run FAILED, in words (OSK-22666).
6
+ *
7
+ * The record carries the cause (`errorCode`, and a sentence for it), but the text surfaces printed the
8
+ * status alone, or the generic code the executor wrote (`scheduled_agent_chat_threw`), so a To-Do refused
9
+ * for lack of credit read as `failed` with nothing to do about it. A balance refusal names whose balance
10
+ * and the command that shows it; any other failure prints the sentence the record gives, and a failure
11
+ * with no sentence returns undefined rather than a guess.
12
+ */
13
+ function failedRunCause(input) {
14
+ if (input.errorCode === 'UNIFIED_BILLING_INSUFFICIENT_BALANCE') {
15
+ if (input.short)
16
+ return 'Workspace has no available credit';
17
+ return ('The workspace this agent runs in has no available balance for this run. Add credit there, ' +
18
+ 'or check it with `skrr balance show`, then schedule it again.');
19
+ }
20
+ const message = typeof input.message === 'string' ? input.message.trim() : '';
21
+ return message || undefined;
22
+ }
@@ -34,8 +34,21 @@ function sensorLine(row) {
34
34
  `cannot be read just now (${row.sourceReason ?? row.access})`;
35
35
  return `${name} ${why}.`;
36
36
  }
37
- if (!row.observation?.id)
38
- return `${name} is ready, but no signal has ever been received.`;
37
+ // Rotating the secret fails every sender still on the old one, and the signal that last arrived (if any)
38
+ // came before it, so nothing says the sensor is blind now (OSK-22594).
39
+ const rotatedAt = row.secretRotatedAt;
40
+ const heardAfterRotation = rotatedAt && row.observation?.observedAt
41
+ ? Date.parse(row.observation.observedAt) > Date.parse(rotatedAt)
42
+ : false;
43
+ const rotationNote = rotatedAt && !heardAfterRotation
44
+ ? ` Its secret was rotated ${rotatedAt}; senders still using the old secret are rejected.`
45
+ : '';
46
+ if (!row.observation?.id) {
47
+ return `${name} is ready, but no signal has ever been received.${rotationNote}`;
48
+ }
49
+ if (rotationNote && row.observation.freshness === 'fresh') {
50
+ return `${name}: its last signal came before its secret was rotated.${rotationNote}`;
51
+ }
39
52
  if (row.observation.freshness && row.observation.freshness !== 'fresh') {
40
53
  return `${name}: its last signal (${row.observation.observedAt ?? 'time unknown'}) is stale.`;
41
54
  }
@@ -203,6 +203,17 @@ export interface ApplyProactiveAgentResponse {
203
203
  triggerId: string | null;
204
204
  enabled: boolean | null;
205
205
  reason?: string;
206
+ /** The existing watcher kept a mode other than the one the spec asked for (OSK-22695). */
207
+ modeKept?: {
208
+ existing: {
209
+ mode: string;
210
+ executePlan: boolean;
211
+ };
212
+ requested: {
213
+ mode: string;
214
+ executePlan: boolean;
215
+ };
216
+ };
206
217
  }>;
207
218
  };
208
219
  defaultWatchers?: Array<{
@@ -268,6 +268,7 @@ export interface ScheduleTraceEvent {
268
268
  reason?: string;
269
269
  detail?: {
270
270
  reasonCode?: string;
271
+ errorCode?: string;
271
272
  };
272
273
  }
273
274
  export interface ScheduleTrace {
@@ -394,8 +395,10 @@ export declare function todoPolicyBlockMessage(reason?: string): string | undefi
394
395
  * person needs, which is that "pending" here no longer means "not yet".
395
396
  */
396
397
  export declare function todoLateMessage(todo: Pick<Todo, 'status' | 'late'>): string | undefined;
397
- /** Print explanations alongside the trace rows that recorded policy blocks. */
398
+ /** Print explanations alongside the trace rows that recorded policy blocks and failed runs. */
398
399
  export declare function renderTodoPolicyTraceDetails(events: ScheduleTraceEvent[], log: (line: string) => void): void;
400
+ /** The line under a To-Do list that has failed rows: the list says `failed`, the trace says why. */
401
+ export declare function failedTodoHint(todos: Array<Pick<Todo, 'status'>>, agentId?: string, bin?: string): string | undefined;
399
402
  /**
400
403
  * Render a To-Do list as a table. `timeZone` names the zone the WHEN column is
401
404
  * shown in (and is labelled on every row); omitted, rows keep the raw UTC
@@ -15,6 +15,7 @@ exports.describePlanRequest = describePlanRequest;
15
15
  exports.todoPolicyBlockMessage = todoPolicyBlockMessage;
16
16
  exports.todoLateMessage = todoLateMessage;
17
17
  exports.renderTodoPolicyTraceDetails = renderTodoPolicyTraceDetails;
18
+ exports.failedTodoHint = failedTodoHint;
18
19
  exports.renderTodoList = renderTodoList;
19
20
  exports.renderCapacityWarning = renderCapacityWarning;
20
21
  exports.renderReplacementPreview = renderReplacementPreview;
@@ -46,6 +47,7 @@ exports.formatStamp = formatStamp;
46
47
  const data_provider_1 = require("@skrr-ai/data-provider");
47
48
  const format_1 = require("./format");
48
49
  const triggers_1 = require("./triggers");
50
+ const failedRunCause_1 = require("./failedRunCause");
49
51
  const RENDER_PROPOSAL_RE = / 00:00:00 /;
50
52
  function isPlanAccepted(value) {
51
53
  return (Boolean(value) &&
@@ -255,16 +257,30 @@ function todoLateMessage(todo) {
255
257
  return undefined;
256
258
  return `${todo.late.message} (${(0, format_1.formatElapsed)(todo.late.bySeconds)} past its time)`;
257
259
  }
258
- /** Print explanations alongside the trace rows that recorded policy blocks. */
260
+ /** Print explanations alongside the trace rows that recorded policy blocks and failed runs. */
259
261
  function renderTodoPolicyTraceDetails(events, log) {
260
262
  for (const event of events) {
261
- const message = event.type === 'todo_execution_failed'
263
+ const label = event.id ?? event.summary ?? 'To-Do';
264
+ const policy = event.type === 'todo_execution_failed'
262
265
  ? todoPolicyBlockMessage(event.detail?.reasonCode ?? event.reason)
263
266
  : undefined;
264
- if (message)
265
- log(` ${event.id ?? event.summary ?? 'To-Do'}: ${message}`);
267
+ if (policy) {
268
+ log(` ${label}: ${policy}`);
269
+ continue;
270
+ }
271
+ if (event.status === 'failed') {
272
+ const cause = (0, failedRunCause_1.failedRunCause)({ errorCode: event.detail?.errorCode, message: event.reason });
273
+ if (cause && cause !== event.summary)
274
+ log(` ${label}: ${cause}`);
275
+ }
266
276
  }
267
277
  }
278
+ /** The line under a To-Do list that has failed rows: the list says `failed`, the trace says why. */
279
+ function failedTodoHint(todos, agentId, bin = 'skrr') {
280
+ if (!todos.some((todo) => todo.status === 'failed'))
281
+ return undefined;
282
+ return `A failed to-do's cause is in the trace: ${bin} agents schedule-trace ${agentId ?? '<agent-id>'}`;
283
+ }
268
284
  /**
269
285
  * Render a To-Do list as a table. `timeZone` names the zone the WHEN column is
270
286
  * shown in (and is labelled on every row); omitted, rows keep the raw UTC
@@ -214,6 +214,7 @@ export interface TriggerFireRecord {
214
214
  outcome?: string;
215
215
  reason?: string;
216
216
  errorMessage?: string;
217
+ errorCode?: string;
217
218
  executionRef?: string;
218
219
  conversationId?: string;
219
220
  durationMs?: number;
@@ -80,6 +80,7 @@ const node_fs_1 = require("node:fs");
80
80
  const http_error_1 = require("./http-error");
81
81
  const format_1 = require("./format");
82
82
  const planOutcome_1 = require("./planOutcome");
83
+ const failedRunCause_1 = require("./failedRunCause");
83
84
  const PARSE_JSON_ARRAY_RE = /^[[{]/;
84
85
  const ARMED_STATE_LABEL_RE = /^skipped:(.+)$/;
85
86
  const WEBHOOK_INGEST_URL_RE = /\/+$/;
@@ -2169,6 +2170,11 @@ function renderFireAudit(fires, log, waiting, options = {}) {
2169
2170
  policyAuditExplanation(fire)?.summary ??
2170
2171
  coalescedAuditExplanation(fire)?.summary ??
2171
2172
  (0, planOutcome_1.fireAuditPlanOutcomeSummary)(fire) ??
2173
+ // A failed run's executor code (`scheduled_agent_chat_threw`) names where it failed, not why;
2174
+ // the record's own cause is the part a person can act on (OSK-22666).
2175
+ (fire.outcome === 'failed'
2176
+ ? (0, failedRunCause_1.failedRunCause)({ errorCode: fire.errorCode, message: fire.errorMessage, short: true })
2177
+ : undefined) ??
2172
2178
  (fire.reason ? fireReasonText(fire.reason) : undefined) ??
2173
2179
  fire.errorMessage ??
2174
2180
  '',
@@ -56741,7 +56741,7 @@ var C1 = ["task_write", "journal_write", "page_write", "charter_write", "memory_
56741
56741
  var $1 = ["principal_automation", "member_automation"];
56742
56742
  var P1 = ["interactive", ...$1];
56743
56743
  var N1 = ["auto", "propose", "refuse"];
56744
- var z1 = Object.freeze({ task_write: Object.freeze({ principal_automation: "auto", member_automation: "propose" }), journal_write: Object.freeze({ principal_automation: "auto", member_automation: "propose" }), page_write: Object.freeze({ principal_automation: "propose", member_automation: "propose" }), charter_write: Object.freeze({ principal_automation: "propose", member_automation: "propose" }), memory_write: Object.freeze({ principal_automation: "propose", member_automation: "propose" }), skill_write: Object.freeze({ principal_automation: "propose", member_automation: "propose" }), kr_assess: Object.freeze({ principal_automation: "auto", member_automation: "propose" }) });
56744
+ var z1 = Object.freeze({ task_write: Object.freeze({ principal_automation: "auto", member_automation: "auto" }), journal_write: Object.freeze({ principal_automation: "auto", member_automation: "propose" }), page_write: Object.freeze({ principal_automation: "propose", member_automation: "propose" }), charter_write: Object.freeze({ principal_automation: "propose", member_automation: "propose" }), memory_write: Object.freeze({ principal_automation: "propose", member_automation: "propose" }), skill_write: Object.freeze({ principal_automation: "propose", member_automation: "propose" }), kr_assess: Object.freeze({ principal_automation: "auto", member_automation: "propose" }) });
56745
56745
  var M1 = Object.freeze({ task_write: "commitment_action_bundle", journal_write: "commitment_action_bundle", page_write: "page_suggestion", charter_write: "page_suggestion", memory_write: "memory_proposal", skill_write: "space_lesson", kr_assess: "commitment_action_bundle" });
56746
56746
  var L1 = Object.freeze({ REFUSED: "SPACE_WRITE_REFUSED", REQUIRES_LOOP: "SPACE_WRITE_REQUIRES_LOOP", UNAVAILABLE: "SPACE_WRITE_POLICY_UNAVAILABLE", CEILING: "SPACE_WRITE_POLICY_CEILING", INVALID: "SPACE_WRITE_POLICY_INVALID", HOLD_REFUSED: "SPACE_WRITE_HOLD_REFUSED", TOO_LARGE: "SPACE_WRITE_PROPOSAL_TOO_LARGE", PROPOSAL_UNAVAILABLE: "SPACE_WRITE_PROPOSAL_UNAVAILABLE", LESSON_REQUIRED: "SPACE_SKILL_LESSON_REQUIRED", PROMOTION_PERSON_REQUIRED: "SPACE_SKILL_PROMOTION_PERSON_REQUIRED" });
56747
56747
  var j1 = "pending_approval";
@@ -83642,9 +83642,15 @@
83642
83642
  },
83643
83643
  "search:agents": {
83644
83644
  "aliases": [],
83645
- "args": {},
83645
+ "args": {
83646
+ "query": {
83647
+ "description": "Search term",
83648
+ "name": "query"
83649
+ }
83650
+ },
83646
83651
  "description": "Search agents in the skrr store",
83647
83652
  "examples": [
83653
+ "<%= config.bin %> search agents \"code review\"",
83648
83654
  "<%= config.bin %> search agents --query \"code review\"",
83649
83655
  "<%= config.bin %> search agents --query productivity --category automation",
83650
83656
  "<%= config.bin %> search agents --query \"data analysis\" --limit 10 --json"
@@ -83693,7 +83699,6 @@
83693
83699
  "char": "q",
83694
83700
  "description": "Search query",
83695
83701
  "name": "query",
83696
- "required": true,
83697
83702
  "hasDynamicHelp": false,
83698
83703
  "multiple": false,
83699
83704
  "type": "option"
@@ -83735,9 +83740,15 @@
83735
83740
  },
83736
83741
  "search:all": {
83737
83742
  "aliases": [],
83738
- "args": {},
83743
+ "args": {
83744
+ "query": {
83745
+ "description": "Search term",
83746
+ "name": "query"
83747
+ }
83748
+ },
83739
83749
  "description": "Search your tasks and spaces plus store agents, skills, and teams in one shot",
83740
83750
  "examples": [
83751
+ "<%= config.bin %> search all \"code review\"",
83741
83752
  "<%= config.bin %> search all --query \"code review\"",
83742
83753
  "<%= config.bin %> search all --query dogfood --limit 5 --json"
83743
83754
  ],
@@ -83785,7 +83796,6 @@
83785
83796
  "char": "q",
83786
83797
  "description": "Search query",
83787
83798
  "name": "query",
83788
- "required": true,
83789
83799
  "hasDynamicHelp": false,
83790
83800
  "multiple": false,
83791
83801
  "type": "option"
@@ -84262,9 +84272,15 @@
84262
84272
  },
84263
84273
  "search:teams": {
84264
84274
  "aliases": [],
84265
- "args": {},
84275
+ "args": {
84276
+ "query": {
84277
+ "description": "Search term",
84278
+ "name": "query"
84279
+ }
84280
+ },
84266
84281
  "description": "Search agent teams in the skrr store",
84267
84282
  "examples": [
84283
+ "<%= config.bin %> search teams research",
84268
84284
  "<%= config.bin %> search teams --query \"research\"",
84269
84285
  "<%= config.bin %> search teams --query \"customer support\" --limit 10",
84270
84286
  "<%= config.bin %> search teams --query marketing --json"
@@ -84313,7 +84329,6 @@
84313
84329
  "char": "q",
84314
84330
  "description": "Search query",
84315
84331
  "name": "query",
84316
- "required": true,
84317
84332
  "hasDynamicHelp": false,
84318
84333
  "multiple": false,
84319
84334
  "type": "option"
@@ -144381,5 +144396,5 @@
144381
144396
  ]
144382
144397
  }
144383
144398
  },
144384
- "version": "0.1.148"
144399
+ "version": "0.1.150"
144385
144400
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skrr-ai/cli",
3
- "version": "0.1.148",
3
+ "version": "0.1.150",
4
4
  "description": "Command-line interface for skrr",
5
5
  "license": "ISC",
6
6
  "author": "skrr",