@skrr-ai/cli 0.1.98 → 0.1.99

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.
Files changed (59) hide show
  1. package/dist/base-command.d.ts +7 -0
  2. package/dist/base-command.js +10 -1
  3. package/dist/commands/agents/create.js +3 -3
  4. package/dist/commands/commitments/create.js +29 -8
  5. package/dist/commands/commitments/observations.js +3 -1
  6. package/dist/commands/commitments/update.js +69 -14
  7. package/dist/commands/signals/monitors/create.d.ts +2 -2
  8. package/dist/commands/signals/monitors/create.js +2 -2
  9. package/dist/commands/signals/monitors/list.d.ts +2 -2
  10. package/dist/commands/signals/monitors/list.js +2 -2
  11. package/dist/commands/signals/monitors/pause.d.ts +2 -2
  12. package/dist/commands/signals/monitors/pause.js +2 -2
  13. package/dist/commands/signals/monitors/resume.d.ts +2 -2
  14. package/dist/commands/signals/monitors/resume.js +2 -2
  15. package/dist/commands/signals/monitors/revise.d.ts +2 -2
  16. package/dist/commands/signals/monitors/revise.js +2 -2
  17. package/dist/commands/signals/monitors/show.d.ts +2 -2
  18. package/dist/commands/signals/monitors/show.js +2 -2
  19. package/dist/commands/signals/monitors/test.d.ts +2 -2
  20. package/dist/commands/signals/monitors/test.js +2 -2
  21. package/dist/commands/signals/monitors/transitions.d.ts +2 -2
  22. package/dist/commands/signals/monitors/transitions.js +2 -2
  23. package/dist/commands/signals/monitors/validate.d.ts +2 -2
  24. package/dist/commands/signals/monitors/validate.js +2 -2
  25. package/dist/commands/signals/schemas/list.d.ts +2 -2
  26. package/dist/commands/signals/schemas/list.js +2 -2
  27. package/dist/commands/signals/schemas/show.d.ts +2 -2
  28. package/dist/commands/signals/schemas/show.js +2 -2
  29. package/dist/commands/signals/sources/list.d.ts +2 -2
  30. package/dist/commands/signals/sources/list.js +2 -2
  31. package/dist/commands/signals/sources/receipts.d.ts +2 -2
  32. package/dist/commands/signals/sources/receipts.js +2 -2
  33. package/dist/commands/signals/sources/show.d.ts +2 -2
  34. package/dist/commands/signals/sources/show.js +2 -2
  35. package/dist/commands/tasks/assign.js +3 -4
  36. package/dist/commands/tasks/complete.d.ts +1 -0
  37. package/dist/commands/tasks/complete.js +1 -0
  38. package/dist/commands/tasks/create.js +4 -2
  39. package/dist/commands/tasks/deliverable/add.d.ts +1 -0
  40. package/dist/commands/tasks/deliverable/add.js +1 -0
  41. package/dist/commands/tasks/result/submit.d.ts +1 -0
  42. package/dist/commands/tasks/result/submit.js +1 -0
  43. package/dist/commands/tasks/resume/save.d.ts +1 -0
  44. package/dist/commands/tasks/resume/save.js +1 -0
  45. package/dist/commands/tasks/retry.js +38 -6
  46. package/dist/commands/tasks/show.js +3 -1
  47. package/dist/commands/tasks/update.js +31 -4
  48. package/dist/commands/tasks/updates/add.d.ts +1 -0
  49. package/dist/commands/tasks/updates/add.js +1 -0
  50. package/dist/lib/commitments.js +34 -2
  51. package/dist/lib/dedicated-machines.d.ts +5 -7
  52. package/dist/lib/dedicated-machines.js +16 -10
  53. package/dist/lib/signals.js +22 -13
  54. package/dist/lib/space-usage.js +1 -1
  55. package/dist/node_modules/@skrr-ai/data-provider/index.js +35 -19
  56. package/dist/signal-command.d.ts +11 -0
  57. package/dist/signal-command.js +15 -0
  58. package/oclif.manifest.json +1273 -24
  59. package/package.json +1 -1
@@ -21,6 +21,13 @@ type OclifArgOutput = {
21
21
  [name: string]: unknown;
22
22
  };
23
23
  export declare abstract class BaseCommand extends Command {
24
+ /**
25
+ * Managed commands normally require the daemon's delegated CLI credential.
26
+ * A command whose complete managed path uses the bound-session endpoints
27
+ * declares that policy locally, so its narrower actor does not depend on
28
+ * acquiring unrelated account authority. Human invocations are unaffected.
29
+ */
30
+ static autonomousCredentialPolicy: 'delegated' | 'bound-session';
24
31
  /** Add the owning agent's web detail link without overwriting resource URLs. */
25
32
  protected withAgentContext<T>(agentId: string, value: T): T & {
26
33
  agentUrl: string | null;
@@ -109,6 +109,13 @@ function describeAbsentGuestDaemon(outcome, bin) {
109
109
  return (0, daemonBrokerRefusal_1.describeGuestDaemonUnavailable)(outcome, { bin, onGuest, descriptorPresent });
110
110
  }
111
111
  class BaseCommand extends core_1.Command {
112
+ /**
113
+ * Managed commands normally require the daemon's delegated CLI credential.
114
+ * A command whose complete managed path uses the bound-session endpoints
115
+ * declares that policy locally, so its narrower actor does not depend on
116
+ * acquiring unrelated account authority. Human invocations are unaffected.
117
+ */
118
+ static autonomousCredentialPolicy = 'delegated';
112
119
  /** Add the owning agent's web detail link without overwriting resource URLs. */
113
120
  withAgentContext(agentId, value) {
114
121
  const agentUrl = (0, web_url_1.agentUrlFrom)(this.cliConfig.baseURL, { id: agentId });
@@ -236,7 +243,9 @@ class BaseCommand extends core_1.Command {
236
243
  // state. The restricted session token (or a null credential when it is
237
244
  // missing) is the only adapter authority exposed to the command.
238
245
  let autonomousCredential = (0, credential_resolver_1.resolveTrustedAutonomousCredential)();
239
- if ((0, delegated_cli_1.isDelegatedCliSession)()) {
246
+ const boundSessionCommand = Boolean(autonomousCredential &&
247
+ this.constructor.autonomousCredentialPolicy === 'bound-session');
248
+ if ((0, delegated_cli_1.isDelegatedCliSession)() && !boundSessionCommand) {
240
249
  try {
241
250
  const delegatedCredential = await (0, delegated_cli_1.fetchDelegatedCliCredential)();
242
251
  if (!delegatedCredential) {
@@ -407,9 +407,9 @@ class AgentsCreate extends base_command_1.BaseCommand {
407
407
  // declared a requirement the server does not model has NOT declared it, and
408
408
  // finding that out later — from a run that landed somewhere it should not
409
409
  // have — is the expensive way (OSK-7704).
410
- // relationshipLoops is an input-only provisioning control. The server
411
- // applies it by deciding which system commitments to seed, so it is not an
412
- // Agent document field and is intentionally absent from the response.
410
+ // The server persists relationshipLoops as creation-time provisioning intent.
411
+ // It is a platform control, so it does not participate in the editable
412
+ // definition-field round-trip warning.
413
413
  const unapplied = unappliedPayloadKeys(payload, created, [
414
414
  'relationshipLoops',
415
415
  ...(0, agent_config_1.deprecatedFieldNames)(created),
@@ -163,12 +163,36 @@ class CommitmentsCreate extends base_command_1.BaseCommand {
163
163
  '<%= config.bin %> commitments create --agent <agent-id> --title "SLA" --outcome "p95 under 200ms" --criterion "p95 latency confirmed" --evaluator metric --measure <measure-id>',
164
164
  '<%= config.bin %> commitments create --agent <agent-id> --title "AWS cost watch" --outcome "Cost regressions are investigated" --agent-directive-file ./aws-cost-policy.md',
165
165
  '<%= config.bin %> commitments create --from-json commitment.json --json',
166
+ `# Replace <agent-id> with your Agent ID; this creates a draft, not a running loop.
167
+ cat > commitment.json <<'JSON'
168
+ {
169
+ "agentId": "<agent-id>",
170
+ "title": "Daily queue review",
171
+ "status": "draft",
172
+ "target": { "outcome": "Queue changes are reviewed" },
173
+ "cadence": { "mode": "daily", "times": ["09:15", "17:45"], "timezone": "Asia/Shanghai" },
174
+ "watchedSources": [{
175
+ "source": "agent_run",
176
+ "config": { "keys": [
177
+ { "key": "queue.depth", "label": "Queue depth", "requireArtifact": true,
178
+ "changeRule": { "mode": "numeric_delta", "minDelta": 2, "absoluteFloor": 1 } },
179
+ "queue.status"
180
+ ] }
181
+ }],
182
+ "policy": {
183
+ "maxUserNudgesPerDay": 0,
184
+ "executionBudget": { "maxRunsPerDay": 0, "maxObservationRunsPerDay": 0, "maxCostUsdPerDay": 0 }
185
+ }
186
+ }
187
+ JSON
188
+ <%= config.bin %> commitments preflight --from-json commitment.json
189
+ <%= config.bin %> commitments create --from-json commitment.json --json`,
166
190
  '<%= config.bin %> commitments create --agent <agent-id> --title "Keep CI healthy" --outcome "Failed checks are repaired" --watch github --github-event check_run_failed --event-driven --delivery draft-pr --repo owner/repo --base main --status draft',
167
191
  ];
168
192
  static flags = {
169
193
  json: core_1.Flags.boolean({ description: 'Output the created commitment as JSON' }),
170
194
  'from-json': core_1.Flags.string({
171
- description: 'Path to a JSON file (or "-" for stdin) for fields not exposed as flags',
195
+ description: 'JSON file (or "-" for stdin) for fields not exposed as flags. See examples below for daily times, named agent_run keys and zero budgets.',
172
196
  }),
173
197
  agent: core_1.Flags.string({ description: 'Agent that owns and watches this commitment (required)' }),
174
198
  kind: core_1.Flags.string({
@@ -256,13 +280,10 @@ class CommitmentsCreate extends base_command_1.BaseCommand {
256
280
  repo: core_1.Flags.string({ description: 'Delivery repository, owner/repo' }),
257
281
  base: core_1.Flags.string({ description: 'Delivery target branch' }),
258
282
  isolation: core_1.Flags.string({
259
- // Omitting this is not the same as passing `shared`: an omitted value
260
- // leaves the daemon's own isolation heuristic in force, while `shared` is
261
- // an explicit contract that suppresses it. Say so here, because `--help`
262
- // is where someone decides which of the two they mean.
263
- description: 'Where autonomous runs do their work. "ephemeral" cuts a one-shot git worktree per run ' +
264
- 'and destroys it after; "shared" lands them on the daemon working tree, in place. ' +
265
- 'Omit to leave the runtime default. Cannot be combined with a remediation capability.',
283
+ // Keep the CLI optional without declaring a default; the server owns
284
+ // Commitment isolation policy. Describe only its supported vocabulary.
285
+ description: 'Each run uses an "ephemeral" Git worktree. Requires the Agent working directory ' +
286
+ 'to be in a Git repository with an initial commit. Omit to keep the platform default.',
266
287
  options: [...commitments_1.COMMITMENT_EXECUTION_ISOLATION_MODES],
267
288
  hidden: true,
268
289
  }),
@@ -90,7 +90,9 @@ class CommitmentsObservations extends base_command_1.BaseCommand {
90
90
  'changed-only': core_1.Flags.boolean({
91
91
  description: 'Only readings the server judged a material change',
92
92
  }),
93
- since: core_1.Flags.string({ description: 'ISO date — only observations made after it' }),
93
+ since: core_1.Flags.string({
94
+ description: 'ISO date — inclusive lower bound on platform recordedAt; source observedAt is separate.',
95
+ }),
94
96
  cursor: core_1.Flags.string({
95
97
  description: 'Continue from the next_cursor emitted by a previous page',
96
98
  }),
@@ -38,6 +38,15 @@ class CommitmentsUpdate extends base_command_1.BaseCommand {
38
38
  '<%= config.bin %> commitments update <commitment-id> --watch tasks --watch github',
39
39
  '<%= config.bin %> commitments update <commitment-id> --criterion "signups confirmed" --evaluator metric --measure <measure-id>',
40
40
  '<%= config.bin %> commitments update <commitment-id> --agent-directive-file ./review-policy.md',
41
+ `# Read the current contract and use its version for --if-version.
42
+ <%= config.bin %> commitments show <commitment-id> --json
43
+ cat > commitment-patch.json <<'JSON'
44
+ {
45
+ "cadence": { "mode": "daily", "times": ["09:15", "17:45"], "timezone": "Asia/Shanghai" },
46
+ "policy": { "executionBudget": { "maxObservationRunsPerDay": 0 } }
47
+ }
48
+ JSON
49
+ <%= config.bin %> commitments update <commitment-id> --from-json commitment-patch.json --if-version <observed-version> --json`,
41
50
  ];
42
51
  static args = {
43
52
  id: core_1.Args.string({ description: 'Commitment ID', required: true, ignoreStdin: true }),
@@ -49,7 +58,7 @@ class CommitmentsUpdate extends base_command_1.BaseCommand {
49
58
  description: 'Skip the confirmation prompt for an irreversible status change',
50
59
  }),
51
60
  'from-json': core_1.Flags.string({
52
- description: 'Path to a JSON file (or "-" for stdin) for fields not exposed as flags',
61
+ description: 'JSON patch file (or "-" for stdin). See examples below. JSON cadence and watchedSources replace those fields; policy is deep-merged.',
53
62
  }),
54
63
  'if-version': core_1.Flags.integer({
55
64
  description: 'Only update this observed contract version; returns a conflict if it changed',
@@ -89,7 +98,7 @@ class CommitmentsUpdate extends base_command_1.BaseCommand {
89
98
  description: 'Watched source the criterion reads (implies --evaluator source_state), e.g. github',
90
99
  }),
91
100
  watch: core_1.Flags.string({
92
- description: 'Watched source (repeatable). Replaces the existing set. Some sources need companion flags: --watch-space, --watch-monitor.',
101
+ description: 'Watched source (repeatable). Replaces the selected set and retains config for matching bindings. Some sources need companion flags: --watch-space, --watch-monitor.',
93
102
  multiple: true,
94
103
  options: [...commitments_1.COMMITMENT_WATCHED_SOURCES],
95
104
  }),
@@ -112,9 +121,8 @@ class CommitmentsUpdate extends base_command_1.BaseCommand {
112
121
  isolation: core_1.Flags.string({
113
122
  // Sent as a single-key `policy` patch. The API deep-merges it, so this
114
123
  // cannot blank an autonomy mode or an attention budget set elsewhere.
115
- description: 'Where autonomous runs do their work: "ephemeral" (one-shot git worktree per run) or ' +
116
- '"shared" (the daemon working tree, in place). Cannot be combined with a remediation ' +
117
- 'capability.',
124
+ description: 'Each run uses an "ephemeral" Git worktree. Requires the Agent working directory ' +
125
+ 'to be in a Git repository with an initial commit.',
118
126
  options: [...commitments_1.COMMITMENT_EXECUTION_ISOLATION_MODES],
119
127
  }),
120
128
  'max-concurrent-runs': core_1.Flags.string({
@@ -135,6 +143,7 @@ class CommitmentsUpdate extends base_command_1.BaseCommand {
135
143
  this.error('--evaluator and --measure require at least one --criterion.', { exit: 1 });
136
144
  }
137
145
  const watched = (0, triggers_1.splitRepeated)(flags.watch);
146
+ const wantsSources = Boolean(watched?.length || flags['watch-space']?.length || flags['watch-monitor']?.length);
138
147
  const wantsTarget = flags.outcome !== undefined || flags.deadline !== undefined || criteria.length > 0;
139
148
  const wantsCadence = flags.cadence !== undefined ||
140
149
  flags['cadence-mode'] !== undefined ||
@@ -153,6 +162,7 @@ class CommitmentsUpdate extends base_command_1.BaseCommand {
153
162
  let current;
154
163
  if (wantsTarget ||
155
164
  wantsCadence ||
165
+ wantsSources ||
156
166
  authoredDelivery ||
157
167
  flags['task-review-policy'] !== undefined) {
158
168
  try {
@@ -259,17 +269,48 @@ class CommitmentsUpdate extends base_command_1.BaseCommand {
259
269
  spaceIds: resolvedSpaceIds,
260
270
  monitorIds: (0, triggers_1.splitRepeated)(flags['watch-monitor']),
261
271
  });
262
- if (built)
263
- payload.watchedSources = built;
272
+ if (built) {
273
+ // Flags replace the selected source SET, not the declarations of a
274
+ // retained binding. In particular agent_run's named keys are JSON
275
+ // authored; rebuilding a bare source silently erased them (OSK-15110).
276
+ const declarations = Array.isArray(payload.watchedSources)
277
+ ? payload.watchedSources
278
+ : current?.watchedSources ?? [];
279
+ payload.watchedSources = built.map((next) => {
280
+ const scopeKey = next.source === 'space' ? 'spaceId'
281
+ : next.source === 'monitor' ? 'monitorId' : undefined;
282
+ const nextConfig = next.config;
283
+ const prior = declarations.find((binding) => binding?.source === next.source &&
284
+ (!scopeKey || binding.config?.[scopeKey] === nextConfig?.[scopeKey]));
285
+ if (!prior)
286
+ return next;
287
+ return {
288
+ ...prior,
289
+ ...next,
290
+ ...(nextConfig ? { config: { ...prior.config, ...nextConfig } } : {}),
291
+ };
292
+ });
293
+ // Do not overwrite declarations changed after our merge read.
294
+ if (payload.expectedVersion === undefined)
295
+ payload.expectedVersion = current?.version;
296
+ }
264
297
  if (wantsCadence) {
265
298
  const existing = current?.cadence ?? {};
266
- const cadence = {};
267
- if (existing.mode)
268
- cadence.mode = existing.mode;
269
- if (existing.intervalMs)
270
- cadence.intervalMs = existing.intervalMs;
271
- if (existing.timezone)
272
- cadence.timezone = existing.timezone;
299
+ const storedCadence = {};
300
+ for (const key of ['mode', 'intervalMs', 'times', 'jitterRatio', 'timezone']) {
301
+ if (existing[key] !== undefined)
302
+ storedCadence[key] = existing[key];
303
+ }
304
+ if (payload.cadence !== undefined) {
305
+ if (!payload.cadence || typeof payload.cadence !== 'object' || Array.isArray(payload.cadence)) {
306
+ this.error('cadence must be a JSON object when using cadence flags.', { exit: 1 });
307
+ }
308
+ }
309
+ const authoredCadence = payload.cadence;
310
+ const cadence = {
311
+ ...storedCadence,
312
+ ...authoredCadence,
313
+ };
273
314
  if (flags.cadence) {
274
315
  cadence.intervalMs = (0, commitments_1.parseIntervalToMs)(flags.cadence);
275
316
  // Setting an interval on a manual commitment implies interval mode.
@@ -280,7 +321,21 @@ class CommitmentsUpdate extends base_command_1.BaseCommand {
280
321
  cadence.mode = flags['cadence-mode'];
281
322
  if (flags.timezone)
282
323
  cadence.timezone = flags.timezone;
324
+ // A mode change must not carry the previous mode's fields into the
325
+ // replacement. Keep explicitly authored fields so invalid combinations
326
+ // are refused rather than silently discarding what the user requested.
327
+ if (cadence.mode !== existing.mode) {
328
+ if (cadence.mode !== 'daily' && !Object.hasOwn(authoredCadence ?? {}, 'times')) {
329
+ delete cadence.times;
330
+ }
331
+ if (cadence.mode !== 'sampled' && !Object.hasOwn(authoredCadence ?? {}, 'jitterRatio')) {
332
+ delete cadence.jitterRatio;
333
+ }
334
+ }
283
335
  payload.cadence = cadence;
336
+ if (payload.expectedVersion === undefined && current?.version !== undefined) {
337
+ payload.expectedVersion = current.version;
338
+ }
284
339
  }
285
340
  const concurrencyPatch = (0, commitments_1.commitmentConcurrencyEnvelopePatch)({
286
341
  rawValue: flags['max-concurrent-runs'],
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../../base-command';
2
- export default class MonitorsCreate extends BaseCommand {
1
+ import { SignalCommand } from '../../../signal-command';
2
+ export default class MonitorsCreate extends SignalCommand {
3
3
  static description: string;
4
4
  static flags: {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../../base-command");
4
+ const signal_command_1 = require("../../../signal-command");
5
5
  const signals_1 = require("../../../lib/signals");
6
6
  const prompt_1 = require("../../../lib/prompt");
7
- class MonitorsCreate extends base_command_1.BaseCommand {
7
+ class MonitorsCreate extends signal_command_1.SignalCommand {
8
8
  static description = 'Validate, then create, a Signal Monitor (a repeated monitorId answers 409: use revise)';
9
9
  static flags = {
10
10
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../../base-command';
2
- export default class MonitorsList extends BaseCommand {
1
+ import { SignalCommand } from '../../../signal-command';
2
+ export default class MonitorsList extends SignalCommand {
3
3
  static description: string;
4
4
  static flags: {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../../base-command");
4
+ const signal_command_1 = require("../../../signal-command");
5
5
  const signals_1 = require("../../../lib/signals");
6
- class MonitorsList extends base_command_1.BaseCommand {
6
+ class MonitorsList extends signal_command_1.SignalCommand {
7
7
  static description = 'List Signal Monitors in the current workspace';
8
8
  static flags = { json: core_1.Flags.boolean({ description: 'Output as JSON' }) };
9
9
  async run() {
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../../base-command';
2
- export default class MonitorsPause extends BaseCommand {
1
+ import { SignalCommand } from '../../../signal-command';
2
+ export default class MonitorsPause extends SignalCommand {
3
3
  static description: string;
4
4
  static flags: {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../../base-command");
4
+ const signal_command_1 = require("../../../signal-command");
5
5
  const signals_1 = require("../../../lib/signals");
6
- class MonitorsPause extends base_command_1.BaseCommand {
6
+ class MonitorsPause extends signal_command_1.SignalCommand {
7
7
  static description = 'Pause a Signal Monitor';
8
8
  static flags = { json: core_1.Flags.boolean({ description: 'Output as JSON' }) };
9
9
  static args = { id: core_1.Args.string({ required: true, ignoreStdin: true }) };
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../../base-command';
2
- export default class MonitorsResume extends BaseCommand {
1
+ import { SignalCommand } from '../../../signal-command';
2
+ export default class MonitorsResume extends SignalCommand {
3
3
  static description: string;
4
4
  static flags: {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../../base-command");
4
+ const signal_command_1 = require("../../../signal-command");
5
5
  const signals_1 = require("../../../lib/signals");
6
- class MonitorsResume extends base_command_1.BaseCommand {
6
+ class MonitorsResume extends signal_command_1.SignalCommand {
7
7
  static description = 'Resume a paused Signal Monitor';
8
8
  static flags = { json: core_1.Flags.boolean({ description: 'Output as JSON' }) };
9
9
  static args = { id: core_1.Args.string({ required: true, ignoreStdin: true }) };
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../../base-command';
2
- export default class MonitorsRevise extends BaseCommand {
1
+ import { SignalCommand } from '../../../signal-command';
2
+ export default class MonitorsRevise extends SignalCommand {
3
3
  static description: string;
4
4
  static flags: {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../../base-command");
4
+ const signal_command_1 = require("../../../signal-command");
5
5
  const signals_1 = require("../../../lib/signals");
6
6
  const prompt_1 = require("../../../lib/prompt");
7
- class MonitorsRevise extends base_command_1.BaseCommand {
7
+ class MonitorsRevise extends signal_command_1.SignalCommand {
8
8
  static description = 'Create an immutable revision of a Signal Monitor';
9
9
  static flags = {
10
10
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../../base-command';
2
- export default class MonitorsShow extends BaseCommand {
1
+ import { SignalCommand } from '../../../signal-command';
2
+ export default class MonitorsShow extends SignalCommand {
3
3
  static description: string;
4
4
  static flags: {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../../base-command");
4
+ const signal_command_1 = require("../../../signal-command");
5
5
  const signals_1 = require("../../../lib/signals");
6
- class MonitorsShow extends base_command_1.BaseCommand {
6
+ class MonitorsShow extends signal_command_1.SignalCommand {
7
7
  static description = 'Show one Signal Monitor';
8
8
  static flags = { json: core_1.Flags.boolean({ description: 'Output as JSON' }) };
9
9
  static args = { id: core_1.Args.string({ required: true, ignoreStdin: true }) };
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../../base-command';
2
- export default class MonitorsTest extends BaseCommand {
1
+ import { SignalCommand } from '../../../signal-command';
2
+ export default class MonitorsTest extends SignalCommand {
3
3
  static description: string;
4
4
  static flags: {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../../base-command");
4
+ const signal_command_1 = require("../../../signal-command");
5
5
  const signals_1 = require("../../../lib/signals");
6
6
  const prompt_1 = require("../../../lib/prompt");
7
- class MonitorsTest extends base_command_1.BaseCommand {
7
+ class MonitorsTest extends signal_command_1.SignalCommand {
8
8
  static description = 'Simulate one CloudEvent against a Monitor; records no receipt, transition, wake or run';
9
9
  static flags = {
10
10
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../../base-command';
2
- export default class MonitorsTransitions extends BaseCommand {
1
+ import { SignalCommand } from '../../../signal-command';
2
+ export default class MonitorsTransitions extends SignalCommand {
3
3
  static description: string;
4
4
  static flags: {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../../base-command");
4
+ const signal_command_1 = require("../../../signal-command");
5
5
  const signals_1 = require("../../../lib/signals");
6
- class MonitorsTransitions extends base_command_1.BaseCommand {
6
+ class MonitorsTransitions extends signal_command_1.SignalCommand {
7
7
  static description = 'List the recorded state transitions of a Signal Monitor';
8
8
  static flags = { json: core_1.Flags.boolean({ description: 'Output as JSON' }) };
9
9
  static args = { id: core_1.Args.string({ required: true, ignoreStdin: true }) };
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../../base-command';
2
- export default class MonitorsValidate extends BaseCommand {
1
+ import { SignalCommand } from '../../../signal-command';
2
+ export default class MonitorsValidate extends SignalCommand {
3
3
  static description: string;
4
4
  static flags: {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../../base-command");
4
+ const signal_command_1 = require("../../../signal-command");
5
5
  const signals_1 = require("../../../lib/signals");
6
6
  const prompt_1 = require("../../../lib/prompt");
7
- class MonitorsValidate extends base_command_1.BaseCommand {
7
+ class MonitorsValidate extends signal_command_1.SignalCommand {
8
8
  static description = 'Compile-only check of a Monitor definition; nothing is persisted';
9
9
  static flags = {
10
10
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../../base-command';
2
- export default class SchemasList extends BaseCommand {
1
+ import { SignalCommand } from '../../../signal-command';
2
+ export default class SchemasList extends SignalCommand {
3
3
  static description: string;
4
4
  static flags: {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../../base-command");
4
+ const signal_command_1 = require("../../../signal-command");
5
5
  const signals_1 = require("../../../lib/signals");
6
- class SchemasList extends base_command_1.BaseCommand {
6
+ class SchemasList extends signal_command_1.SignalCommand {
7
7
  static description = 'List Signal schemas (read-only)';
8
8
  static flags = { json: core_1.Flags.boolean({ description: 'Output as JSON' }) };
9
9
  async run() {
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../../base-command';
2
- export default class SchemasShow extends BaseCommand {
1
+ import { SignalCommand } from '../../../signal-command';
2
+ export default class SchemasShow extends SignalCommand {
3
3
  static description: string;
4
4
  static flags: {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../../base-command");
4
+ const signal_command_1 = require("../../../signal-command");
5
5
  const signals_1 = require("../../../lib/signals");
6
- class SchemasShow extends base_command_1.BaseCommand {
6
+ class SchemasShow extends signal_command_1.SignalCommand {
7
7
  static description = 'Show one Signal schema (read-only)';
8
8
  static flags = { json: core_1.Flags.boolean({ description: 'Output as JSON' }) };
9
9
  static args = { id: core_1.Args.string({ required: true, ignoreStdin: true }) };
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../../base-command';
2
- export default class SourcesList extends BaseCommand {
1
+ import { SignalCommand } from '../../../signal-command';
2
+ export default class SourcesList extends SignalCommand {
3
3
  static description: string;
4
4
  static flags: {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../../base-command");
4
+ const signal_command_1 = require("../../../signal-command");
5
5
  const signals_1 = require("../../../lib/signals");
6
- class SourcesList extends base_command_1.BaseCommand {
6
+ class SourcesList extends signal_command_1.SignalCommand {
7
7
  static description = 'List Signal sources (read-only; credentials are never shown)';
8
8
  static flags = { json: core_1.Flags.boolean({ description: 'Output as JSON' }) };
9
9
  async run() {
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../../base-command';
2
- export default class SourcesReceipts extends BaseCommand {
1
+ import { SignalCommand } from '../../../signal-command';
2
+ export default class SourcesReceipts extends SignalCommand {
3
3
  static description: string;
4
4
  static flags: {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../../base-command");
4
+ const signal_command_1 = require("../../../signal-command");
5
5
  const signals_1 = require("../../../lib/signals");
6
- class SourcesReceipts extends base_command_1.BaseCommand {
6
+ class SourcesReceipts extends signal_command_1.SignalCommand {
7
7
  static description = 'List recent redacted receipts of a Signal source';
8
8
  static flags = { json: core_1.Flags.boolean({ description: 'Output as JSON' }) };
9
9
  static args = { id: core_1.Args.string({ required: true, ignoreStdin: true }) };
@@ -1,5 +1,5 @@
1
- import { BaseCommand } from '../../../base-command';
2
- export default class SourcesShow extends BaseCommand {
1
+ import { SignalCommand } from '../../../signal-command';
2
+ export default class SourcesShow extends SignalCommand {
3
3
  static description: string;
4
4
  static flags: {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
- const base_command_1 = require("../../../base-command");
4
+ const signal_command_1 = require("../../../signal-command");
5
5
  const signals_1 = require("../../../lib/signals");
6
- class SourcesShow extends base_command_1.BaseCommand {
6
+ class SourcesShow extends signal_command_1.SignalCommand {
7
7
  static description = 'Show one Signal source (read-only)';
8
8
  static flags = { json: core_1.Flags.boolean({ description: 'Output as JSON' }) };
9
9
  static args = { id: core_1.Args.string({ required: true, ignoreStdin: true }) };
@@ -196,11 +196,10 @@ class TasksAssign extends base_command_1.BaseCommand {
196
196
  if (flags.json) {
197
197
  this.log(JSON.stringify({
198
198
  ...(0, web_url_1.withTaskUrl)(this.cliConfig.baseURL, updated),
199
- // What each free-text reference actually became — so a caller can
200
- // verify the resolution rather than trust it.
199
+ // Keep request details separate from the canonical assignee arrays
200
+ // returned by the server, especially when removing co-assignees.
201
+ assignmentAction: flags.remove ? 'remove' : flags.replace ? 'replace' : 'add',
201
202
  resolved: [...people.resolved, ...agents.resolved],
202
- assigneeUserIds: userIds,
203
- assigneeAgentIds: agentIds,
204
203
  }, null, 2));
205
204
  return;
206
205
  }
@@ -10,6 +10,7 @@ export declare function describePendingReview({ statusType, taskId, resultId, bi
10
10
  }>;
11
11
  }): string | null;
12
12
  export default class TasksComplete extends BaseCommand {
13
+ static autonomousCredentialPolicy: "bound-session";
13
14
  static description: string;
14
15
  static examples: string[];
15
16
  static args: {