@aopslabs/aops 0.3.7 → 0.3.9

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 (46) hide show
  1. package/LICENSE +54 -14
  2. package/NOTICE +3 -3
  3. package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/references/discuss/SKILL.md +4 -4
  4. package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/user-guides/aops-cli.md +1 -1
  5. package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/manifest.json +7 -7
  6. package/agent-assets-release/agent-assets/inventory.json +5 -5
  7. package/agent-assets-release/agent-assets/projection.json +1 -1
  8. package/agent-assets-release/agent-assets-release.json +39 -39
  9. package/agent-assets-release/agent-assets-release.sigstore.json +24 -24
  10. package/assets/agent-assets/core/references/discuss/SKILL.md +4 -4
  11. package/assets/agent-assets/core/user-guides/aops-cli.md +1 -1
  12. package/dist/commands/discuss.js +95 -41
  13. package/dist/commands/doc.js +223 -45
  14. package/dist/lib/agent-assets/native-fs.js +2 -2
  15. package/dist/lib/agent-assets/release-input.js +7 -1
  16. package/dist/lib/setup-official-catalog-bridge.js +14 -4
  17. package/native/bin/darwin-arm64/aops-agent-assets-fs +0 -0
  18. package/native/bin/darwin-x64/aops-agent-assets-fs +0 -0
  19. package/native/bin/linux-arm64/aops-agent-assets-fs +0 -0
  20. package/native/bin/linux-x64/aops-agent-assets-fs +0 -0
  21. package/native/bin/win32-x64/aops-agent-assets-fs.exe +0 -0
  22. package/native/manifest.json +49 -0
  23. package/native/qualifications/win32-x64.json +23 -0
  24. package/native/tui/darwin-arm64/aops-tui +0 -0
  25. package/native/tui/win32-x64/aops-tui.exe +0 -0
  26. package/package.json +10 -9
  27. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/SKILL.md +0 -0
  28. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/references/agentspace/SKILL.md +0 -0
  29. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/references/aops-cli-core/SKILL.md +0 -0
  30. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/references/chatv3/SKILL.md +0 -0
  31. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/references/collaborative-work/SKILL.md +0 -0
  32. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/references/docman/SKILL.md +0 -0
  33. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/references/hosted-chat/SKILL.md +0 -0
  34. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/references/mission/SKILL.md +0 -0
  35. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/references/projectman/SKILL.md +0 -0
  36. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/references/sys/SKILL.md +0 -0
  37. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/references/view/SKILL.md +0 -0
  38. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/references/working-disciplines/SKILL.md +0 -0
  39. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/user-guides/agent-assets.md +0 -0
  40. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/user-guides/agentspace.md +0 -0
  41. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/user-guides/aops-system.md +0 -0
  42. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/user-guides/chatv3.md +0 -0
  43. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/user-guides/docman.md +0 -0
  44. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/user-guides/projectman.md +0 -0
  45. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/user-guides/sys.md +0 -0
  46. /package/agent-assets-release/agent-assets/core/{8b06775d96e37f8aef535673b8b855c11f29042f3c70ec4f273b6df04dbe824a → 0ffc854a8e32500f3d82c10a1e1ee6376d57e616201a323638f0f9caf8fb2706}/files/user-guides/working-disciplines.md +0 -0
@@ -229,19 +229,41 @@ async function invokeDiscussionTool(options, context, params) {
229
229
  idempotencyKey: options.idempotencyKey,
230
230
  });
231
231
  }
232
+ export function resolveMutationOutcome(options) {
233
+ const mutationRequested = options.apply === true && options.preview !== true;
234
+ const hasIdempotencyKey = Boolean(normalizeNonEmpty(options.idempotencyKey));
235
+ return {
236
+ mutationRequested,
237
+ mutationApplied: mutationRequested === false ? false : hasIdempotencyKey ? null : true,
238
+ mutationOutcome: mutationRequested === false ? 'preview' : hasIdempotencyKey ? 'applied-or-replayed' : 'applied',
239
+ };
240
+ }
232
241
  function emitEnvelope(params) {
233
- const envelope = buildHostedSugarEnvelope({
234
- command: params.command,
235
- toolId: params.toolId,
236
- resolvedContext: buildResolvedContextRecord(params.resolvedContext),
237
- input: params.input,
238
- result: params.result,
242
+ const mutation = params.mutation === true ? resolveMutationOutcome(params.options) : undefined;
243
+ const envelope = compactPayload({
244
+ ...buildHostedSugarEnvelope({
245
+ command: params.command,
246
+ toolId: params.toolId,
247
+ resolvedContext: buildResolvedContextRecord(params.resolvedContext),
248
+ input: params.input,
249
+ result: params.result,
250
+ }),
251
+ mutationRequested: mutation?.mutationRequested,
252
+ mutationApplied: mutation?.mutationApplied,
253
+ mutationOutcome: mutation?.mutationOutcome,
239
254
  });
240
255
  if (params.options.json) {
241
256
  console.log(JSON.stringify(envelope, null, 2));
242
257
  return;
243
258
  }
244
- logSuccess(params.successMessage);
259
+ const successMessage = params.mutation !== true
260
+ ? params.successMessage
261
+ : mutation?.mutationOutcome === 'preview'
262
+ ? 'Preview completed; hosted state was not mutated.'
263
+ : mutation?.mutationOutcome === 'applied-or-replayed'
264
+ ? 'Apply request completed; idempotency may have replayed the original result, so no second write is claimed.'
265
+ : params.successMessage;
266
+ logSuccess(successMessage);
245
267
  console.log(JSON.stringify(params.result, null, 2));
246
268
  }
247
269
  async function readTextInput(params, label) {
@@ -273,6 +295,25 @@ function requireTopicSelector(value, flag) {
273
295
  throw new Error(`Provide ${flag} <topic-id|slug>.`);
274
296
  return selector;
275
297
  }
298
+ export function resolveTopicSelectorAliases(topic, id) {
299
+ const canonical = normalizeNonEmpty(topic);
300
+ const legacy = normalizeNonEmpty(id);
301
+ if (canonical && legacy && canonical !== legacy) {
302
+ throw new Error(`--topic and legacy --id conflict. Pass one selector, or provide the same value to both.`);
303
+ }
304
+ return requireTopicSelector(canonical ?? legacy, '--topic');
305
+ }
306
+ export function resolveAgentSelectorAliases(agent, legacyFor) {
307
+ const canonical = normalizeNonEmpty(agent);
308
+ const legacy = normalizeNonEmpty(legacyFor);
309
+ if (canonical && legacy && canonical !== legacy) {
310
+ throw new Error(`--agent and legacy --for conflict. Pass one agent selector, or provide the same value to both.`);
311
+ }
312
+ const selector = canonical ?? legacy;
313
+ if (!selector)
314
+ throw new Error('Provide --agent <agent-id>.');
315
+ return selector;
316
+ }
276
317
  async function resolveTopicId(options, context, selector) {
277
318
  const scopeId = requireScopeId(context);
278
319
  if (/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(selector)) {
@@ -493,6 +534,7 @@ export async function runDiscussStart(options = {}) {
493
534
  input: { data },
494
535
  result,
495
536
  successMessage: 'Hosted discussion topic started.',
537
+ mutation: true,
496
538
  });
497
539
  }
498
540
  catch (error) {
@@ -572,6 +614,7 @@ async function runDiscussChildTopic(options, params) {
572
614
  input: { data },
573
615
  result,
574
616
  successMessage: params.successMessage,
617
+ mutation: true,
575
618
  });
576
619
  }
577
620
  catch (error) {
@@ -647,7 +690,7 @@ export async function runDiscussList(options = {}) {
647
690
  export async function runDiscussGet(options = {}) {
648
691
  try {
649
692
  const context = await resolveDiscussionContext(options);
650
- const selector = requireTopicSelector(options.id, '--id');
693
+ const selector = resolveTopicSelectorAliases(options.topic, options.id);
651
694
  const topicId = await resolveTopicId(options, context, selector);
652
695
  const detail = await fetchTopicDetail(options, context, topicId);
653
696
  const result = compactPayload({
@@ -752,7 +795,7 @@ function parseSeq(value, flag) {
752
795
  export async function runDiscussTurn(options = {}) {
753
796
  try {
754
797
  ensureGuardedWrite(options, 'This command appends a turn to a hosted discussion topic.');
755
- const selector = requireTopicSelector(options.topic, '--topic');
798
+ const selector = resolveTopicSelectorAliases(options.topic, options.id);
756
799
  const agentId = normalizeNonEmpty(options.agent);
757
800
  if (!agentId)
758
801
  throw new Error('Provide --agent.');
@@ -804,6 +847,7 @@ export async function runDiscussTurn(options = {}) {
804
847
  input: { data },
805
848
  result,
806
849
  successMessage: 'Hosted discussion turn written.',
850
+ mutation: true,
807
851
  });
808
852
  }
809
853
  catch (error) {
@@ -814,7 +858,7 @@ export async function runDiscussTurn(options = {}) {
814
858
  export async function runDiscussStatus(options = {}) {
815
859
  try {
816
860
  const context = await resolveDiscussionContext(options);
817
- const selector = requireTopicSelector(options.id, '--id');
861
+ const selector = resolveTopicSelectorAliases(options.topic, options.id);
818
862
  const topicId = await resolveTopicId(options, context, selector);
819
863
  const detail = await fetchTopicDetail(options, context, topicId);
820
864
  const status = await fetchStatus(options, context, topicId);
@@ -841,7 +885,7 @@ export async function runDiscussStatus(options = {}) {
841
885
  export async function runDiscussDigest(options = {}) {
842
886
  try {
843
887
  const context = await resolveDiscussionContext(options);
844
- const selector = requireTopicSelector(options.id, '--id');
888
+ const selector = resolveTopicSelectorAliases(options.topic, options.id);
845
889
  const topicId = await resolveTopicId(options, context, selector);
846
890
  const detail = await fetchTopicDetail(options, context, topicId);
847
891
  const status = await fetchStatus(options, context, topicId);
@@ -904,9 +948,7 @@ function classifyWaitState(presentation, status, agentId) {
904
948
  }
905
949
  export async function runDiscussWait(options = {}) {
906
950
  try {
907
- const agentId = normalizeNonEmpty(options.for);
908
- if (!agentId)
909
- throw new Error('Provide --for <agent-id>.');
951
+ const agentId = resolveAgentSelectorAliases(options.agent, options.for);
910
952
  const timeoutSec = typeof options.timeoutSec === 'number' && Number.isFinite(options.timeoutSec)
911
953
  ? Math.max(0, options.timeoutSec)
912
954
  : 300;
@@ -914,7 +956,7 @@ export async function runDiscussWait(options = {}) {
914
956
  ? options.intervalSec
915
957
  : 5;
916
958
  const context = await resolveDiscussionContext(options);
917
- const selector = requireTopicSelector(options.id, '--id');
959
+ const selector = resolveTopicSelectorAliases(options.topic, options.id);
918
960
  const topicId = await resolveTopicId(options, context, selector);
919
961
  const deadline = Date.now() + timeoutSec * 1000;
920
962
  while (true) {
@@ -971,8 +1013,8 @@ export async function runDiscussWait(options = {}) {
971
1013
  }
972
1014
  }
973
1015
  function buildPersistentLoopPrompt(params) {
974
- const waitCommand = `aops-cli discuss wait --id ${params.topicSelector} --for ${params.agentId} --timeout-sec ${params.timeoutSec} --interval-sec ${params.intervalSec} --json`;
975
- const statusCommand = `aops-cli discuss status --id ${params.topicSelector} --prompt-for-next --json`;
1016
+ const waitCommand = `aops-cli discuss wait --topic ${params.topicSelector} --agent ${params.agentId} --timeout-sec ${params.timeoutSec} --interval-sec ${params.intervalSec} --json`;
1017
+ const statusCommand = `aops-cli discuss status --topic ${params.topicSelector} --prompt-for-next --json`;
976
1018
  const turnCommand = `aops-cli discuss turn --topic ${params.topicSelector} --agent ${params.agentId} --expect-next ${params.agentId} --kind statement --text "<turn metni>" --apply --json`;
977
1019
  return [
978
1020
  `Bu topic'te ${params.agentId} agent olarak kalici loopta calis.`,
@@ -1005,9 +1047,7 @@ function buildPersistentLoopPrompt(params) {
1005
1047
  }
1006
1048
  export async function runDiscussLoopPrompt(options = {}) {
1007
1049
  try {
1008
- const agentId = normalizeNonEmpty(options.for);
1009
- if (!agentId)
1010
- throw new Error('Provide --for <agent-id>.');
1050
+ const agentId = resolveAgentSelectorAliases(options.agent, options.for);
1011
1051
  const timeoutSec = typeof options.timeoutSec === 'number' && Number.isFinite(options.timeoutSec)
1012
1052
  ? Math.max(0, options.timeoutSec)
1013
1053
  : 540;
@@ -1015,7 +1055,7 @@ export async function runDiscussLoopPrompt(options = {}) {
1015
1055
  ? options.intervalSec
1016
1056
  : 5;
1017
1057
  const context = await resolveDiscussionContext(options);
1018
- const selector = requireTopicSelector(options.id, '--id');
1058
+ const selector = resolveTopicSelectorAliases(options.topic, options.id);
1019
1059
  const topicId = await resolveTopicId(options, context, selector);
1020
1060
  const detail = await fetchTopicDetail(options, context, topicId);
1021
1061
  if (!topicParticipants(detail.topic).some((participant) => participant.toLowerCase() === agentId.toLowerCase())) {
@@ -1028,8 +1068,8 @@ export async function runDiscussLoopPrompt(options = {}) {
1028
1068
  agentId,
1029
1069
  timeoutSec,
1030
1070
  intervalSec,
1031
- waitCommand: `aops-cli discuss wait --id ${topicSelector} --for ${agentId} --timeout-sec ${timeoutSec} --interval-sec ${intervalSec} --json`,
1032
- statusCommand: `aops-cli discuss status --id ${topicSelector} --prompt-for-next --json`,
1071
+ waitCommand: `aops-cli discuss wait --topic ${topicSelector} --agent ${agentId} --timeout-sec ${timeoutSec} --interval-sec ${intervalSec} --json`,
1072
+ statusCommand: `aops-cli discuss status --topic ${topicSelector} --prompt-for-next --json`,
1033
1073
  turnCommandTemplate: `aops-cli discuss turn --topic ${topicSelector} --agent ${agentId} --expect-next ${agentId} --kind <statement|final-stance> --text "<turn metni>" --apply --json`,
1034
1074
  prompt,
1035
1075
  });
@@ -1054,7 +1094,7 @@ export async function runDiscussConclude(options = {}) {
1054
1094
  try {
1055
1095
  ensureGuardedWrite(options, 'This command concludes a hosted discussion topic.');
1056
1096
  const context = await resolveDiscussionContext(options);
1057
- const selector = requireTopicSelector(options.topic, '--topic');
1097
+ const selector = resolveTopicSelectorAliases(options.topic, options.id);
1058
1098
  const topicId = await resolveTopicId(options, context, selector);
1059
1099
  const input = compactPayload({ topicId, updatedBy: normalizeNonEmpty(options.updatedBy) });
1060
1100
  const payload = await invokeDiscussionTool(options, context, {
@@ -1072,6 +1112,7 @@ export async function runDiscussConclude(options = {}) {
1072
1112
  input,
1073
1113
  result,
1074
1114
  successMessage: 'Hosted discussion topic concluded.',
1115
+ mutation: true,
1075
1116
  });
1076
1117
  }
1077
1118
  catch (error) {
@@ -1086,7 +1127,7 @@ export async function runDiscussAbandon(options = {}) {
1086
1127
  if (!reason)
1087
1128
  throw new Error('Provide --reason <text>.');
1088
1129
  const context = await resolveDiscussionContext(options);
1089
- const selector = requireTopicSelector(options.topic, '--topic');
1130
+ const selector = resolveTopicSelectorAliases(options.topic, options.id);
1090
1131
  const topicId = await resolveTopicId(options, context, selector);
1091
1132
  const input = compactPayload({ topicId, reason });
1092
1133
  const payload = await invokeDiscussionTool(options, context, {
@@ -1104,6 +1145,7 @@ export async function runDiscussAbandon(options = {}) {
1104
1145
  input,
1105
1146
  result,
1106
1147
  successMessage: 'Hosted discussion topic abandoned.',
1148
+ mutation: true,
1107
1149
  });
1108
1150
  }
1109
1151
  catch (error) {
@@ -1116,7 +1158,7 @@ export async function runDiscussOutput(options = {}) {
1116
1158
  ensureGuardedWrite(options, 'This command sets a hosted discussion output.');
1117
1159
  const context = await resolveDiscussionContext(options);
1118
1160
  const scopeId = requireScopeId(context);
1119
- const selector = requireTopicSelector(options.topic, '--topic');
1161
+ const selector = resolveTopicSelectorAliases(options.topic, options.id);
1120
1162
  const topicId = await resolveTopicId(options, context, selector);
1121
1163
  const outputKind = normalizeNonEmpty(options.outputKind);
1122
1164
  if (!outputKind)
@@ -1141,6 +1183,7 @@ export async function runDiscussOutput(options = {}) {
1141
1183
  input: { data },
1142
1184
  result,
1143
1185
  successMessage: 'Hosted discussion output set.',
1186
+ mutation: true,
1144
1187
  });
1145
1188
  }
1146
1189
  catch (error) {
@@ -1301,16 +1344,18 @@ Notes:
1301
1344
  `);
1302
1345
  const get = cmd.command('get')
1303
1346
  .description('Get a hosted discussion topic with its turns and outputs')
1304
- .option('--id <id>', 'Hosted topic id or slug')
1347
+ .option('--topic <topic>', 'Hosted topic id or slug')
1348
+ .option('--id <topic>', 'Legacy alias for --topic')
1305
1349
  .action((commandOptions) => runDiscussGet({ ...cmd.opts(), ...commandOptions }));
1306
1350
  addDiscussionContextOptions(get);
1307
1351
  get.addHelpText('after', `
1308
1352
  Examples:
1309
- aops-cli discuss get --id <topic> --json
1353
+ aops-cli discuss get --topic <topic> --json
1310
1354
  `);
1311
1355
  const turn = cmd.command('turn')
1312
1356
  .description('Append one turn to a hosted discussion topic (turn-order enforced server-side)')
1313
1357
  .option('--topic <id>', 'Hosted topic id or slug')
1358
+ .option('--id <id>', 'Legacy alias for --topic')
1314
1359
  .requiredOption('--agent <id>', 'Participant agent id')
1315
1360
  .requiredOption('--kind <kind>', `Turn kind: ${TURN_KINDS.join('|')}`)
1316
1361
  .option('--text <text>', 'Inline turn content')
@@ -1338,6 +1383,7 @@ Notes:
1338
1383
  const output = cmd.command('output')
1339
1384
  .description('Set a hosted discussion output (conclude-flow output authoring)')
1340
1385
  .option('--topic <id>', 'Hosted topic id or slug')
1386
+ .option('--id <id>', 'Legacy alias for --topic')
1341
1387
  .requiredOption('--output-kind <kind>', 'Output kind: consensus|disagreement|open-questions|final-stance|decision|agent-summary')
1342
1388
  .requiredOption('--owner <agent-id>', 'Owner agent id (must be a topic participant; server-enforced)')
1343
1389
  .option('--text <text>', 'Inline output content (must not contain _TBD_)')
@@ -1357,29 +1403,32 @@ Notes:
1357
1403
  `);
1358
1404
  const status = cmd.command('status')
1359
1405
  .description('Read hosted discussion state mapped to lifecycleState/nextTurn/openQuestions')
1360
- .option('--id <id>', 'Hosted topic id or slug')
1406
+ .option('--topic <topic>', 'Hosted topic id or slug')
1407
+ .option('--id <topic>', 'Legacy alias for --topic')
1361
1408
  .option('--prompt-for-next', 'Include a deterministic prompt template for the suggested next participant')
1362
1409
  .action((commandOptions) => runDiscussStatus({ ...cmd.opts(), ...commandOptions }));
1363
1410
  addDiscussionContextOptions(status);
1364
1411
  status.addHelpText('after', `
1365
1412
  Examples:
1366
- aops-cli discuss status --id <topic> --json
1367
- aops-cli discuss status --id <topic> --prompt-for-next --json
1413
+ aops-cli discuss status --topic <topic> --json
1414
+ aops-cli discuss status --topic <topic> --prompt-for-next --json
1368
1415
 
1369
1416
  Notes:
1370
1417
  - lifecycleState/nextTurn/openQuestions hosted status+get'ten turetilir (server truth)
1371
1418
  `);
1372
1419
  const wait = cmd.command('wait')
1373
1420
  .description('Poll hosted status until an agent may write, an operator block appears, or the topic is ready/done')
1374
- .option('--id <id>', 'Hosted topic id or slug')
1375
- .requiredOption('--for <agent-id>', 'Agent id waiting for its next allowed turn')
1421
+ .option('--topic <topic>', 'Hosted topic id or slug')
1422
+ .option('--id <topic>', 'Legacy alias for --topic')
1423
+ .option('--agent <agent-id>', 'Agent id waiting for its next allowed turn')
1424
+ .option('--for <agent-id>', 'Legacy alias for --agent')
1376
1425
  .option('--timeout-sec <sec>', 'Maximum seconds to wait', parseNonNegativeNumber, 300)
1377
1426
  .option('--interval-sec <sec>', 'Polling interval seconds', parsePositiveNumber, 5)
1378
1427
  .action((commandOptions) => runDiscussWait({ ...cmd.opts(), ...commandOptions }));
1379
1428
  addDiscussionContextOptions(wait);
1380
1429
  wait.addHelpText('after', `
1381
1430
  Examples:
1382
- aops-cli discuss wait --id <topic> --for codex --timeout-sec 540 --interval-sec 5 --json
1431
+ aops-cli discuss wait --topic <topic> --agent codex --timeout-sec 540 --interval-sec 5 --json
1383
1432
 
1384
1433
  Exit codes:
1385
1434
  0 requested agent is allowed to write the next turn
@@ -1389,31 +1438,35 @@ Exit codes:
1389
1438
  `);
1390
1439
  const loopPrompt = cmd.command('loop-prompt')
1391
1440
  .description('Print a persistent agent loop prompt for hosted discussion automation')
1392
- .option('--id <id>', 'Hosted topic id or slug')
1393
- .requiredOption('--for <agent-id>', 'Agent id that should keep waiting and writing turns')
1441
+ .option('--topic <topic>', 'Hosted topic id or slug')
1442
+ .option('--id <topic>', 'Legacy alias for --topic')
1443
+ .option('--agent <agent-id>', 'Agent id that should keep waiting and writing turns')
1444
+ .option('--for <agent-id>', 'Legacy alias for --agent')
1394
1445
  .option('--timeout-sec <sec>', 'Maximum seconds per wait cycle', parseNonNegativeNumber, 540)
1395
1446
  .option('--interval-sec <sec>', 'Polling interval seconds', parsePositiveNumber, 5)
1396
1447
  .action((commandOptions) => runDiscussLoopPrompt({ ...cmd.opts(), ...commandOptions }));
1397
1448
  addDiscussionContextOptions(loopPrompt);
1398
1449
  loopPrompt.addHelpText('after', `
1399
1450
  Examples:
1400
- aops-cli discuss loop-prompt --id <topic> --for claude
1401
- aops-cli discuss loop-prompt --id <topic> --for claude --timeout-sec 540 --interval-sec 5 --json
1451
+ aops-cli discuss loop-prompt --topic <topic> --agent claude
1452
+ aops-cli discuss loop-prompt --topic <topic> --agent claude --timeout-sec 540 --interval-sec 5 --json
1402
1453
  `);
1403
1454
  const digest = cmd.command('digest')
1404
1455
  .description('Build a non-interpretive hosted discussion context pack')
1405
- .option('--id <id>', 'Hosted topic id or slug')
1456
+ .option('--topic <topic>', 'Hosted topic id or slug')
1457
+ .option('--id <topic>', 'Legacy alias for --topic')
1406
1458
  .option('--prompt-for-next', 'Include a deterministic prompt template for the suggested next participant')
1407
1459
  .action((commandOptions) => runDiscussDigest({ ...cmd.opts(), ...commandOptions }));
1408
1460
  addDiscussionContextOptions(digest);
1409
1461
  digest.addHelpText('after', `
1410
1462
  Examples:
1411
- aops-cli discuss digest --id <topic> --json
1412
- aops-cli discuss digest --id <topic> --prompt-for-next --json
1463
+ aops-cli discuss digest --topic <topic> --json
1464
+ aops-cli discuss digest --topic <topic> --prompt-for-next --json
1413
1465
  `);
1414
1466
  const conclude = cmd.command('conclude')
1415
1467
  .description('Conclude a hosted discussion topic (server enforces min-turns + final-stance readiness)')
1416
1468
  .option('--topic <id>', 'Hosted topic id or slug')
1469
+ .option('--id <id>', 'Legacy alias for --topic')
1417
1470
  .option('--updated-by <agent-id>', 'Optional updatedBy actor')
1418
1471
  .option('--preview', 'Validate without mutating hosted state')
1419
1472
  .option('--apply', 'Conclude the topic')
@@ -1431,6 +1484,7 @@ Notes:
1431
1484
  const abandon = cmd.command('abandon')
1432
1485
  .description('Mark a hosted discussion topic as abandoned')
1433
1486
  .option('--topic <id>', 'Hosted topic id or slug')
1487
+ .option('--id <id>', 'Legacy alias for --topic')
1434
1488
  .requiredOption('--reason <text>', 'Reason recorded in topic metadata')
1435
1489
  .option('--preview', 'Validate without mutating hosted state')
1436
1490
  .option('--apply', 'Abandon the topic')