chainlesschain 0.66.0 → 0.132.0

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 (143) hide show
  1. package/bin/chainlesschain.js +0 -0
  2. package/package.json +1 -1
  3. package/src/commands/a2a.js +380 -0
  4. package/src/commands/agent-network.js +254 -1
  5. package/src/commands/audit.js +302 -0
  6. package/src/commands/automation.js +271 -1
  7. package/src/commands/bi.js +348 -0
  8. package/src/commands/codegen.js +224 -0
  9. package/src/commands/collab.js +341 -0
  10. package/src/commands/compliance.js +1035 -0
  11. package/src/commands/cowork.js +221 -0
  12. package/src/commands/crosschain.js +218 -0
  13. package/src/commands/dbevo.js +284 -0
  14. package/src/commands/dev.js +252 -0
  15. package/src/commands/did.js +358 -0
  16. package/src/commands/dlp.js +341 -0
  17. package/src/commands/encrypt.js +341 -0
  18. package/src/commands/evomap.js +394 -0
  19. package/src/commands/export.js +256 -1
  20. package/src/commands/federation.js +283 -0
  21. package/src/commands/fusion.js +258 -0
  22. package/src/commands/governance.js +325 -0
  23. package/src/commands/hardening.js +411 -0
  24. package/src/commands/hook.js +148 -0
  25. package/src/commands/import.js +252 -0
  26. package/src/commands/incentive.js +322 -0
  27. package/src/commands/inference.js +318 -0
  28. package/src/commands/infra.js +244 -0
  29. package/src/commands/instinct.js +260 -0
  30. package/src/commands/ipfs.js +318 -0
  31. package/src/commands/kg.js +387 -0
  32. package/src/commands/llm.js +263 -0
  33. package/src/commands/lowcode.js +356 -0
  34. package/src/commands/marketplace.js +256 -0
  35. package/src/commands/mcp.js +221 -0
  36. package/src/commands/memory.js +248 -0
  37. package/src/commands/multimodal.js +296 -0
  38. package/src/commands/nlprog.js +356 -0
  39. package/src/commands/note.js +244 -0
  40. package/src/commands/ops.js +354 -0
  41. package/src/commands/orchestrate.js +166 -0
  42. package/src/commands/org.js +277 -0
  43. package/src/commands/p2p.js +390 -0
  44. package/src/commands/perception.js +290 -0
  45. package/src/commands/permmem.js +251 -0
  46. package/src/commands/plugin-ecosystem.js +273 -0
  47. package/src/commands/pqc.js +393 -0
  48. package/src/commands/privacy.js +321 -0
  49. package/src/commands/quantization.js +351 -0
  50. package/src/commands/rcache.js +271 -0
  51. package/src/commands/recommend.js +340 -0
  52. package/src/commands/reputation.js +261 -0
  53. package/src/commands/runtime.js +307 -0
  54. package/src/commands/scim.js +262 -0
  55. package/src/commands/session.js +258 -0
  56. package/src/commands/siem.js +246 -0
  57. package/src/commands/skill.js +267 -1
  58. package/src/commands/sla.js +259 -0
  59. package/src/commands/social.js +256 -0
  60. package/src/commands/sso.js +186 -1
  61. package/src/commands/stress.js +230 -0
  62. package/src/commands/sync.js +256 -0
  63. package/src/commands/tech.js +338 -0
  64. package/src/commands/tenant.js +351 -0
  65. package/src/commands/terraform.js +245 -0
  66. package/src/commands/tokens.js +269 -0
  67. package/src/commands/trust.js +249 -0
  68. package/src/commands/wallet.js +277 -0
  69. package/src/commands/workflow.js +171 -0
  70. package/src/commands/zkp.js +335 -0
  71. package/src/index.js +4 -0
  72. package/src/lib/a2a-protocol.js +451 -0
  73. package/src/lib/agent-coordinator.js +325 -0
  74. package/src/lib/agent-network.js +387 -0
  75. package/src/lib/agent-router.js +395 -0
  76. package/src/lib/aiops.js +478 -0
  77. package/src/lib/app-builder.js +239 -0
  78. package/src/lib/audit-logger.js +379 -0
  79. package/src/lib/automation-engine.js +330 -0
  80. package/src/lib/autonomous-developer.js +350 -0
  81. package/src/lib/bi-engine.js +338 -0
  82. package/src/lib/code-agent.js +323 -0
  83. package/src/lib/collaboration-governance.js +364 -0
  84. package/src/lib/community-governance.js +436 -0
  85. package/src/lib/compliance-manager.js +434 -0
  86. package/src/lib/content-recommendation.js +469 -0
  87. package/src/lib/cross-chain.js +345 -0
  88. package/src/lib/crypto-manager.js +350 -0
  89. package/src/lib/dbevo.js +338 -0
  90. package/src/lib/decentral-infra.js +340 -0
  91. package/src/lib/did-manager.js +367 -0
  92. package/src/lib/dlp-engine.js +389 -0
  93. package/src/lib/evomap-federation.js +177 -0
  94. package/src/lib/evomap-governance.js +276 -0
  95. package/src/lib/federation-hardening.js +259 -0
  96. package/src/lib/hardening-manager.js +348 -0
  97. package/src/lib/hook-manager.js +380 -0
  98. package/src/lib/inference-network.js +330 -0
  99. package/src/lib/instinct-manager.js +332 -0
  100. package/src/lib/ipfs-storage.js +334 -0
  101. package/src/lib/knowledge-exporter.js +381 -0
  102. package/src/lib/knowledge-graph.js +432 -0
  103. package/src/lib/knowledge-importer.js +379 -0
  104. package/src/lib/llm-providers.js +391 -0
  105. package/src/lib/mcp-registry.js +333 -0
  106. package/src/lib/memory-manager.js +330 -0
  107. package/src/lib/multimodal.js +346 -0
  108. package/src/lib/nl-programming.js +343 -0
  109. package/src/lib/note-versioning.js +327 -0
  110. package/src/lib/org-manager.js +323 -0
  111. package/src/lib/p2p-manager.js +387 -0
  112. package/src/lib/perception.js +346 -0
  113. package/src/lib/perf-tuning.js +4 -1
  114. package/src/lib/permanent-memory.js +320 -0
  115. package/src/lib/plugin-ecosystem.js +377 -0
  116. package/src/lib/pqc-manager.js +368 -0
  117. package/src/lib/privacy-computing.js +427 -0
  118. package/src/lib/protocol-fusion.js +417 -0
  119. package/src/lib/quantization.js +325 -0
  120. package/src/lib/reputation-optimizer.js +299 -0
  121. package/src/lib/response-cache.js +327 -0
  122. package/src/lib/scim-manager.js +329 -0
  123. package/src/lib/session-manager.js +329 -0
  124. package/src/lib/siem-exporter.js +333 -0
  125. package/src/lib/skill-loader.js +377 -0
  126. package/src/lib/skill-marketplace.js +325 -0
  127. package/src/lib/sla-manager.js +275 -0
  128. package/src/lib/social-manager.js +326 -0
  129. package/src/lib/sso-manager.js +332 -0
  130. package/src/lib/stress-tester.js +330 -0
  131. package/src/lib/sync-manager.js +326 -0
  132. package/src/lib/tech-learning-engine.js +369 -0
  133. package/src/lib/tenant-saas.js +460 -0
  134. package/src/lib/terraform-manager.js +363 -0
  135. package/src/lib/threat-intel.js +335 -0
  136. package/src/lib/token-incentive.js +293 -0
  137. package/src/lib/token-tracker.js +329 -0
  138. package/src/lib/trust-security.js +390 -0
  139. package/src/lib/ueba.js +389 -0
  140. package/src/lib/universal-runtime.js +325 -0
  141. package/src/lib/wallet-manager.js +326 -0
  142. package/src/lib/workflow-engine.js +322 -0
  143. package/src/lib/zkp-engine.js +274 -0
@@ -12,6 +12,19 @@ import {
12
12
  addTarget,
13
13
  exportLogs,
14
14
  getSIEMStats,
15
+ SIEM_FORMAT,
16
+ SIEM_TARGET_TYPE,
17
+ SIEM_SEVERITY,
18
+ SIEM_TARGET_STATUS,
19
+ SIEM_DEFAULT_BATCH_SIZE,
20
+ severityToCEF,
21
+ formatLog,
22
+ addTargetV2,
23
+ removeTarget,
24
+ setTargetStatus,
25
+ exportLogsV2,
26
+ getSIEMStatsV2,
27
+ listTargetsByStatus,
15
28
  } from "../lib/siem-exporter.js";
16
29
 
17
30
  export function registerSiemCommand(program) {
@@ -147,6 +160,239 @@ export function registerSiemCommand(program) {
147
160
  }
148
161
  }
149
162
 
163
+ await shutdown();
164
+ } catch (err) {
165
+ logger.error(`Failed: ${err.message}`);
166
+ process.exit(1);
167
+ }
168
+ });
169
+
170
+ // ═══════════════════════════════════════════════════════════════
171
+ // V2 Canonical Subcommands (Phase 51)
172
+ // ═══════════════════════════════════════════════════════════════
173
+
174
+ siem
175
+ .command("formats")
176
+ .description("List SIEM export formats (V2)")
177
+ .action(() => {
178
+ console.log(JSON.stringify(Object.values(SIEM_FORMAT), null, 2));
179
+ });
180
+
181
+ siem
182
+ .command("target-types")
183
+ .description("List SIEM target types (V2)")
184
+ .action(() => {
185
+ console.log(JSON.stringify(Object.values(SIEM_TARGET_TYPE), null, 2));
186
+ });
187
+
188
+ siem
189
+ .command("severities")
190
+ .description("List SIEM severity levels (V2)")
191
+ .action(() => {
192
+ console.log(JSON.stringify(Object.values(SIEM_SEVERITY), null, 2));
193
+ });
194
+
195
+ siem
196
+ .command("statuses")
197
+ .description("List SIEM target statuses (V2)")
198
+ .action(() => {
199
+ console.log(JSON.stringify(Object.values(SIEM_TARGET_STATUS), null, 2));
200
+ });
201
+
202
+ siem
203
+ .command("default-batch-size")
204
+ .description("Show default SIEM batch size (V2)")
205
+ .action(() => {
206
+ console.log(JSON.stringify({ batchSize: SIEM_DEFAULT_BATCH_SIZE }));
207
+ });
208
+
209
+ siem
210
+ .command("severity-cef <severity>")
211
+ .description("Map a SIEM severity to its CEF integer (0-10)")
212
+ .action((severity) => {
213
+ try {
214
+ console.log(JSON.stringify({ severity, cef: severityToCEF(severity) }));
215
+ } catch (err) {
216
+ logger.error(`Failed: ${err.message}`);
217
+ process.exit(1);
218
+ }
219
+ });
220
+
221
+ siem
222
+ .command("format-log <format>")
223
+ .description("Format a JSON log payload as cef|leef|json")
224
+ .option("-l, --log <json>", "Log object as JSON", "{}")
225
+ .action((format, options) => {
226
+ try {
227
+ const log = JSON.parse(options.log);
228
+ const result = formatLog(format, log);
229
+ console.log(
230
+ typeof result === "string" ? result : JSON.stringify(result, null, 2),
231
+ );
232
+ } catch (err) {
233
+ logger.error(`Failed: ${err.message}`);
234
+ process.exit(1);
235
+ }
236
+ });
237
+
238
+ siem
239
+ .command("add-target-v2")
240
+ .description("Add a SIEM target via canonical options (V2)")
241
+ .option("-t, --type <type>", "Target type")
242
+ .option("-u, --url <url>", "Target URL")
243
+ .option("-f, --format <fmt>", "Export format", "json")
244
+ .option("-c, --config <json>", "Config JSON", "{}")
245
+ .action(async (options) => {
246
+ try {
247
+ const ctx = await bootstrap({ verbose: program.opts().verbose });
248
+ if (!ctx.db) {
249
+ logger.error("Database not available");
250
+ process.exit(1);
251
+ }
252
+ const db = ctx.db.getDatabase();
253
+ ensureSIEMTables(db);
254
+
255
+ let config = {};
256
+ try {
257
+ config = JSON.parse(options.config);
258
+ } catch (_err) {
259
+ logger.error("Invalid --config JSON");
260
+ process.exit(1);
261
+ }
262
+ const target = addTargetV2(db, {
263
+ type: options.type,
264
+ url: options.url,
265
+ format: options.format,
266
+ config,
267
+ });
268
+ console.log(JSON.stringify(target, null, 2));
269
+
270
+ await shutdown();
271
+ } catch (err) {
272
+ logger.error(`Failed: ${err.message}`);
273
+ process.exit(1);
274
+ }
275
+ });
276
+
277
+ siem
278
+ .command("remove-target <target-id>")
279
+ .description("Remove a SIEM target (V2)")
280
+ .action(async (targetId) => {
281
+ try {
282
+ const ctx = await bootstrap({ verbose: program.opts().verbose });
283
+ if (!ctx.db) {
284
+ logger.error("Database not available");
285
+ process.exit(1);
286
+ }
287
+ const db = ctx.db.getDatabase();
288
+ ensureSIEMTables(db);
289
+
290
+ console.log(JSON.stringify(removeTarget(db, targetId), null, 2));
291
+
292
+ await shutdown();
293
+ } catch (err) {
294
+ logger.error(`Failed: ${err.message}`);
295
+ process.exit(1);
296
+ }
297
+ });
298
+
299
+ siem
300
+ .command("set-status <target-id> <status>")
301
+ .description("Transition a SIEM target's status (V2)")
302
+ .action(async (targetId, status) => {
303
+ try {
304
+ const ctx = await bootstrap({ verbose: program.opts().verbose });
305
+ if (!ctx.db) {
306
+ logger.error("Database not available");
307
+ process.exit(1);
308
+ }
309
+ const db = ctx.db.getDatabase();
310
+ ensureSIEMTables(db);
311
+
312
+ console.log(
313
+ JSON.stringify(setTargetStatus(db, targetId, status), null, 2),
314
+ );
315
+
316
+ await shutdown();
317
+ } catch (err) {
318
+ logger.error(`Failed: ${err.message}`);
319
+ process.exit(1);
320
+ }
321
+ });
322
+
323
+ siem
324
+ .command("export-v2 <target-id>")
325
+ .description("Batch-export logs to a target (V2)")
326
+ .option("-l, --logs <json>", "Logs as JSON array", "[]")
327
+ .option("-b, --batch-size <n>", "Batch size override")
328
+ .action(async (targetId, options) => {
329
+ try {
330
+ const ctx = await bootstrap({ verbose: program.opts().verbose });
331
+ if (!ctx.db) {
332
+ logger.error("Database not available");
333
+ process.exit(1);
334
+ }
335
+ const db = ctx.db.getDatabase();
336
+ ensureSIEMTables(db);
337
+
338
+ let logs = [];
339
+ try {
340
+ logs = JSON.parse(options.logs);
341
+ } catch (_err) {
342
+ logger.error("Invalid --logs JSON");
343
+ process.exit(1);
344
+ }
345
+ const r = exportLogsV2(db, {
346
+ targetId,
347
+ logs,
348
+ batchSize: options.batchSize ? Number(options.batchSize) : undefined,
349
+ });
350
+ console.log(JSON.stringify(r, null, 2));
351
+
352
+ await shutdown();
353
+ } catch (err) {
354
+ logger.error(`Failed: ${err.message}`);
355
+ process.exit(1);
356
+ }
357
+ });
358
+
359
+ siem
360
+ .command("stats-v2")
361
+ .description("Show extended SIEM stats (byFormat/byType/byStatus, V2)")
362
+ .action(async () => {
363
+ try {
364
+ const ctx = await bootstrap({ verbose: program.opts().verbose });
365
+ if (!ctx.db) {
366
+ logger.error("Database not available");
367
+ process.exit(1);
368
+ }
369
+ const db = ctx.db.getDatabase();
370
+ ensureSIEMTables(db);
371
+
372
+ console.log(JSON.stringify(getSIEMStatsV2(), null, 2));
373
+
374
+ await shutdown();
375
+ } catch (err) {
376
+ logger.error(`Failed: ${err.message}`);
377
+ process.exit(1);
378
+ }
379
+ });
380
+
381
+ siem
382
+ .command("by-status <status>")
383
+ .description("List SIEM targets filtered by status (V2)")
384
+ .action(async (status) => {
385
+ try {
386
+ const ctx = await bootstrap({ verbose: program.opts().verbose });
387
+ if (!ctx.db) {
388
+ logger.error("Database not available");
389
+ process.exit(1);
390
+ }
391
+ const db = ctx.db.getDatabase();
392
+ ensureSIEMTables(db);
393
+
394
+ console.log(JSON.stringify(listTargetsByStatus(status), null, 2));
395
+
150
396
  await shutdown();
151
397
  } catch (err) {
152
398
  logger.error(`Failed: ${err.message}`);
@@ -11,7 +11,41 @@ import ora from "ora";
11
11
  import fs from "fs";
12
12
  import path from "path";
13
13
  import { logger } from "../lib/logger.js";
14
- import { CLISkillLoader, LAYER_NAMES } from "../lib/skill-loader.js";
14
+ import {
15
+ CLISkillLoader,
16
+ LAYER_NAMES,
17
+ SKILL_MATURITY_V2,
18
+ EXECUTION_LIFECYCLE_V2,
19
+ getMaxActiveSkillsPerOwnerV2,
20
+ setMaxActiveSkillsPerOwnerV2,
21
+ getMaxPendingExecutionsPerSkillV2,
22
+ setMaxPendingExecutionsPerSkillV2,
23
+ getSkillIdleMsV2,
24
+ setSkillIdleMsV2,
25
+ getExecStuckMsV2,
26
+ setExecStuckMsV2,
27
+ registerSkillV2,
28
+ getSkillV2,
29
+ listSkillsV2,
30
+ setSkillStatusV2,
31
+ activateSkillV2,
32
+ deprecateSkillV2,
33
+ archiveSkillV2,
34
+ touchSkillV2,
35
+ getActiveSkillCountV2,
36
+ createExecutionV2,
37
+ getExecutionV2,
38
+ listExecutionsV2,
39
+ setExecutionStatusV2,
40
+ startExecutionV2,
41
+ succeedExecutionV2,
42
+ failExecutionV2,
43
+ cancelExecutionV2,
44
+ getPendingExecutionCountV2,
45
+ autoDeprecateIdleSkillsV2,
46
+ autoFailStuckExecutionsV2,
47
+ getSkillLoaderStatsV2,
48
+ } from "../lib/skill-loader.js";
15
49
  import { getElectronUserDataDir } from "../lib/paths.js";
16
50
  import { findProjectRoot } from "../lib/project-detector.js";
17
51
  import {
@@ -695,4 +729,236 @@ export function registerSkillCommand(program) {
695
729
  ` ${chalk.bold("Total:")} ${allSkills.length} skills resolved\n`,
696
730
  );
697
731
  });
732
+
733
+ // ─── V2 Governance Layer ──────────────────────────────────────────
734
+ const out = (obj) => console.log(JSON.stringify(obj, null, 2));
735
+ const tryRun = (fn) => {
736
+ try {
737
+ fn();
738
+ } catch (err) {
739
+ logger.error(err.message);
740
+ process.exit(1);
741
+ }
742
+ };
743
+
744
+ skill
745
+ .command("skill-maturities-v2")
746
+ .description("List V2 skill maturity states")
747
+ .action(() => out(Object.values(SKILL_MATURITY_V2)));
748
+
749
+ skill
750
+ .command("execution-lifecycles-v2")
751
+ .description("List V2 execution lifecycle states")
752
+ .action(() => out(Object.values(EXECUTION_LIFECYCLE_V2)));
753
+
754
+ skill
755
+ .command("stats-v2")
756
+ .description("V2 skill-loader stats")
757
+ .action(() => out(getSkillLoaderStatsV2()));
758
+
759
+ skill
760
+ .command("get-max-active-skills-v2")
761
+ .description("Get max active skills per owner (V2)")
762
+ .action(() =>
763
+ out({ maxActiveSkillsPerOwner: getMaxActiveSkillsPerOwnerV2() }),
764
+ );
765
+
766
+ skill
767
+ .command("set-max-active-skills-v2 <n>")
768
+ .description("Set max active skills per owner (V2)")
769
+ .action((n) =>
770
+ tryRun(() => {
771
+ setMaxActiveSkillsPerOwnerV2(Number(n));
772
+ out({ maxActiveSkillsPerOwner: getMaxActiveSkillsPerOwnerV2() });
773
+ }),
774
+ );
775
+
776
+ skill
777
+ .command("get-max-pending-executions-v2")
778
+ .description("Get max pending executions per skill (V2)")
779
+ .action(() =>
780
+ out({
781
+ maxPendingExecutionsPerSkill: getMaxPendingExecutionsPerSkillV2(),
782
+ }),
783
+ );
784
+
785
+ skill
786
+ .command("set-max-pending-executions-v2 <n>")
787
+ .description("Set max pending executions per skill (V2)")
788
+ .action((n) =>
789
+ tryRun(() => {
790
+ setMaxPendingExecutionsPerSkillV2(Number(n));
791
+ out({
792
+ maxPendingExecutionsPerSkill: getMaxPendingExecutionsPerSkillV2(),
793
+ });
794
+ }),
795
+ );
796
+
797
+ skill
798
+ .command("get-skill-idle-ms-v2")
799
+ .description("Get skill idle threshold (V2)")
800
+ .action(() => out({ skillIdleMs: getSkillIdleMsV2() }));
801
+
802
+ skill
803
+ .command("set-skill-idle-ms-v2 <ms>")
804
+ .description("Set skill idle threshold (V2)")
805
+ .action((ms) =>
806
+ tryRun(() => {
807
+ setSkillIdleMsV2(Number(ms));
808
+ out({ skillIdleMs: getSkillIdleMsV2() });
809
+ }),
810
+ );
811
+
812
+ skill
813
+ .command("get-exec-stuck-ms-v2")
814
+ .description("Get execution stuck threshold (V2)")
815
+ .action(() => out({ execStuckMs: getExecStuckMsV2() }));
816
+
817
+ skill
818
+ .command("set-exec-stuck-ms-v2 <ms>")
819
+ .description("Set execution stuck threshold (V2)")
820
+ .action((ms) =>
821
+ tryRun(() => {
822
+ setExecStuckMsV2(Number(ms));
823
+ out({ execStuckMs: getExecStuckMsV2() });
824
+ }),
825
+ );
826
+
827
+ skill
828
+ .command("active-skill-count-v2 <ownerId>")
829
+ .description("Active skill count for owner (V2)")
830
+ .action((ownerId) =>
831
+ out({ ownerId, count: getActiveSkillCountV2(ownerId) }),
832
+ );
833
+
834
+ skill
835
+ .command("pending-execution-count-v2 <skillId>")
836
+ .description("Pending execution count for skill (V2)")
837
+ .action((skillId) =>
838
+ out({ skillId, count: getPendingExecutionCountV2(skillId) }),
839
+ );
840
+
841
+ skill
842
+ .command("register-skill-v2 <id>")
843
+ .description("Register a V2 skill")
844
+ .requiredOption("-o, --owner <id>", "owner id")
845
+ .requiredOption("-n, --name <name>", "skill name")
846
+ .option("-l, --layer <layer>", "skill layer", "workspace")
847
+ .action((id, opts) =>
848
+ tryRun(() =>
849
+ out(
850
+ registerSkillV2(id, {
851
+ ownerId: opts.owner,
852
+ name: opts.name,
853
+ layer: opts.layer,
854
+ }),
855
+ ),
856
+ ),
857
+ );
858
+
859
+ skill
860
+ .command("get-skill-v2 <id>")
861
+ .description("Get a V2 skill")
862
+ .action((id) => out(getSkillV2(id)));
863
+
864
+ skill
865
+ .command("list-skills-v2")
866
+ .description("List V2 skills")
867
+ .option("-o, --owner <id>", "filter by owner")
868
+ .option("-s, --status <status>", "filter by status")
869
+ .option("-l, --layer <layer>", "filter by layer")
870
+ .action((opts) =>
871
+ out(
872
+ listSkillsV2({
873
+ ownerId: opts.owner,
874
+ status: opts.status,
875
+ layer: opts.layer,
876
+ }),
877
+ ),
878
+ );
879
+
880
+ skill
881
+ .command("set-skill-status-v2 <id> <next>")
882
+ .description("Set V2 skill status")
883
+ .action((id, next) => tryRun(() => out(setSkillStatusV2(id, next))));
884
+
885
+ skill
886
+ .command("activate-skill-v2 <id>")
887
+ .description("Activate a V2 skill")
888
+ .action((id) => tryRun(() => out(activateSkillV2(id))));
889
+
890
+ skill
891
+ .command("deprecate-skill-v2 <id>")
892
+ .description("Deprecate a V2 skill")
893
+ .action((id) => tryRun(() => out(deprecateSkillV2(id))));
894
+
895
+ skill
896
+ .command("archive-skill-v2 <id>")
897
+ .description("Archive a V2 skill")
898
+ .action((id) => tryRun(() => out(archiveSkillV2(id))));
899
+
900
+ skill
901
+ .command("touch-skill-v2 <id>")
902
+ .description("Touch a V2 skill")
903
+ .action((id) => tryRun(() => out(touchSkillV2(id))));
904
+
905
+ skill
906
+ .command("create-execution-v2 <id>")
907
+ .description("Create a V2 execution")
908
+ .requiredOption("-s, --skill <id>", "skill id")
909
+ .option("-k, --kind <kind>", "execution kind", "invoke")
910
+ .action((id, opts) =>
911
+ tryRun(() =>
912
+ out(createExecutionV2(id, { skillId: opts.skill, kind: opts.kind })),
913
+ ),
914
+ );
915
+
916
+ skill
917
+ .command("get-execution-v2 <id>")
918
+ .description("Get a V2 execution")
919
+ .action((id) => out(getExecutionV2(id)));
920
+
921
+ skill
922
+ .command("list-executions-v2")
923
+ .description("List V2 executions")
924
+ .option("-s, --skill <id>", "filter by skill")
925
+ .option("-t, --status <status>", "filter by status")
926
+ .action((opts) =>
927
+ out(listExecutionsV2({ skillId: opts.skill, status: opts.status })),
928
+ );
929
+
930
+ skill
931
+ .command("set-execution-status-v2 <id> <next>")
932
+ .description("Set V2 execution status")
933
+ .action((id, next) => tryRun(() => out(setExecutionStatusV2(id, next))));
934
+
935
+ skill
936
+ .command("start-execution-v2 <id>")
937
+ .description("Start a V2 execution")
938
+ .action((id) => tryRun(() => out(startExecutionV2(id))));
939
+
940
+ skill
941
+ .command("succeed-execution-v2 <id>")
942
+ .description("Succeed a V2 execution")
943
+ .action((id) => tryRun(() => out(succeedExecutionV2(id))));
944
+
945
+ skill
946
+ .command("fail-execution-v2 <id>")
947
+ .description("Fail a V2 execution")
948
+ .action((id) => tryRun(() => out(failExecutionV2(id))));
949
+
950
+ skill
951
+ .command("cancel-execution-v2 <id>")
952
+ .description("Cancel a V2 execution")
953
+ .action((id) => tryRun(() => out(cancelExecutionV2(id))));
954
+
955
+ skill
956
+ .command("auto-deprecate-idle-skills-v2")
957
+ .description("Auto-deprecate idle V2 skills")
958
+ .action(() => out(autoDeprecateIdleSkillsV2()));
959
+
960
+ skill
961
+ .command("auto-fail-stuck-executions-v2")
962
+ .description("Auto-fail stuck V2 executions")
963
+ .action(() => out(autoFailStuckExecutionsV2()));
698
964
  }