@skrr-ai/cli 0.1.102 → 0.1.104

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 (52) hide show
  1. package/dist/base-command.js +24 -0
  2. package/dist/commands/agent/message/send.js +6 -2
  3. package/dist/commands/agents/triggers/create.js +7 -17
  4. package/dist/commands/agents/triggers/update.js +41 -28
  5. package/dist/commands/commitments/create.js +2 -0
  6. package/dist/commands/commitments/preflight.js +18 -1
  7. package/dist/commands/commitments/roster.d.ts +15 -0
  8. package/dist/commands/commitments/roster.js +39 -0
  9. package/dist/commands/commitments/show.js +1 -1
  10. package/dist/commands/commitments/status.d.ts +17 -0
  11. package/dist/commands/commitments/status.js +41 -0
  12. package/dist/commands/commitments/update.js +12 -0
  13. package/dist/commands/daemon/logs.d.ts +106 -1
  14. package/dist/commands/daemon/logs.js +311 -15
  15. package/dist/commands/followups/checkin.js +46 -3
  16. package/dist/commands/tasks/approvals/resolve.d.ts +12 -0
  17. package/dist/commands/tasks/approvals/resolve.js +21 -5
  18. package/dist/commands/triggers/create.js +8 -17
  19. package/dist/commands/triggers/fire.js +3 -0
  20. package/dist/commands/triggers/update.js +41 -27
  21. package/dist/commands/widgets/check.d.ts +39 -0
  22. package/dist/commands/widgets/check.js +179 -0
  23. package/dist/lib/agent-mailbox.d.ts +0 -1
  24. package/dist/lib/agent-mailbox.js +0 -1
  25. package/dist/lib/commitment-loop-status.d.ts +16 -0
  26. package/dist/lib/commitment-loop-status.js +164 -0
  27. package/dist/lib/commitments.d.ts +28 -1
  28. package/dist/lib/commitments.js +184 -5
  29. package/dist/lib/delegated-cli.d.ts +23 -1
  30. package/dist/lib/delegated-cli.js +61 -4
  31. package/dist/lib/first-party-harness.d.ts +1 -1
  32. package/dist/lib/first-party-harness.js +1 -1
  33. package/dist/lib/session-task-write.d.ts +13 -0
  34. package/dist/lib/session-task-write.js +63 -3
  35. package/dist/lib/triggers.d.ts +26 -0
  36. package/dist/lib/triggers.js +134 -1
  37. package/dist/lib/widgetCheck.d.ts +123 -0
  38. package/dist/lib/widgetCheck.js +998 -0
  39. package/dist/lib/widgetStaticScan.d.ts +111 -0
  40. package/dist/lib/widgetStaticScan.js +833 -0
  41. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/deviceIdentityBridge.d.ts +9 -1
  42. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/deviceIdentityBridge.js +12 -0
  43. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/telemetryRedaction.d.ts +61 -0
  44. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/telemetryRedaction.js +177 -0
  45. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/deviceIdentityBridge.d.ts +9 -1
  46. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/deviceIdentityBridge.js +12 -0
  47. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/telemetryRedaction.d.ts +61 -0
  48. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/telemetryRedaction.js +171 -0
  49. package/dist/node_modules/@skrr-ai/auth-core/package.json +11 -1
  50. package/dist/node_modules/@skrr-ai/data-provider/index.js +11908 -8693
  51. package/oclif.manifest.json +219 -6
  52. package/package.json +2 -2
@@ -16838,7 +16838,7 @@
16838
16838
  "type": "option"
16839
16839
  },
16840
16840
  "max-fires-per-day": {
16841
- "description": "Daily fire cap (schedule/stochastic)",
16841
+ "description": "Daily fire cap (schedule, stochastic and self_scheduled triggers only)",
16842
16842
  "name": "max-fires-per-day",
16843
16843
  "hasDynamicHelp": false,
16844
16844
  "multiple": false,
@@ -18253,7 +18253,7 @@
18253
18253
  "type": "option"
18254
18254
  },
18255
18255
  "max-fires-per-day": {
18256
- "description": "Daily fire cap",
18256
+ "description": "Daily fire cap (schedule, stochastic and self_scheduled triggers only)",
18257
18257
  "name": "max-fires-per-day",
18258
18258
  "hasDynamicHelp": false,
18259
18259
  "multiple": false,
@@ -28528,7 +28528,7 @@
28528
28528
  "<%= config.bin %> commitments create --agent <agent-id> --title \"SLA\" --outcome \"p95 under 200ms\" --criterion \"p95 latency confirmed\" --evaluator metric --measure <measure-id>",
28529
28529
  "<%= config.bin %> commitments create --agent <agent-id> --title \"AWS cost watch\" --outcome \"Cost regressions are investigated\" --agent-directive-file ./aws-cost-policy.md",
28530
28530
  "<%= config.bin %> commitments create --from-json commitment.json --json",
28531
- "# Replace <agent-id> with your Agent ID; this creates a draft, not a running loop.\ncat > commitment.json <<'JSON'\n{\n \"agentId\": \"<agent-id>\",\n \"title\": \"Daily queue review\",\n \"status\": \"draft\",\n \"target\": { \"outcome\": \"Queue changes are reviewed\" },\n \"cadence\": { \"mode\": \"daily\", \"times\": [\"09:15\", \"17:45\"], \"timezone\": \"Asia/Shanghai\" },\n \"watchedSources\": [{\n \"source\": \"agent_run\",\n \"config\": { \"keys\": [\n { \"key\": \"queue.depth\", \"label\": \"Queue depth\", \"requireArtifact\": true,\n \"changeRule\": { \"mode\": \"numeric_delta\", \"minDelta\": 2, \"absoluteFloor\": 1 } },\n \"queue.status\"\n ] }\n }],\n \"policy\": {\n \"maxUserNudgesPerDay\": 0,\n \"executionBudget\": { \"maxRunsPerDay\": 0, \"maxObservationRunsPerDay\": 0, \"maxCostUsdPerDay\": 0 }\n }\n}\nJSON\n<%= config.bin %> commitments preflight --from-json commitment.json\n<%= config.bin %> commitments create --from-json commitment.json --json",
28531
+ "# Replace <agent-id> with your Agent ID; this creates a draft, not a running loop.\n# In \"policy\", 0 is a ZERO budget (nothing may run or be spent), not \"no limit\".\n# To remove a limit set it to null (e.g. \"maxCostUsdPerDay\": null) or leave the key out.\ncat > commitment.json <<'JSON'\n{\n \"agentId\": \"<agent-id>\",\n \"title\": \"Daily queue review\",\n \"status\": \"draft\",\n \"target\": { \"outcome\": \"Queue changes are reviewed\" },\n \"cadence\": { \"mode\": \"daily\", \"times\": [\"09:15\", \"17:45\"], \"timezone\": \"Asia/Shanghai\" },\n \"watchedSources\": [{\n \"source\": \"agent_run\",\n \"config\": { \"keys\": [\n { \"key\": \"queue.depth\", \"label\": \"Queue depth\", \"requireArtifact\": true,\n \"changeRule\": { \"mode\": \"numeric_delta\", \"minDelta\": 2, \"absoluteFloor\": 1 } },\n \"queue.status\"\n ] }\n }],\n \"policy\": {\n \"maxUserNudgesPerDay\": 0,\n \"executionBudget\": { \"maxRunsPerDay\": 0, \"maxObservationRunsPerDay\": 0, \"maxCostUsdPerDay\": 0 }\n }\n}\nJSON\n<%= config.bin %> commitments preflight --from-json commitment.json\n<%= config.bin %> commitments create --from-json commitment.json --json",
28532
28532
  "<%= 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"
28533
28533
  ],
28534
28534
  "flags": {
@@ -34380,6 +34380,81 @@
34380
34380
  "resume.js"
34381
34381
  ]
34382
34382
  },
34383
+ "commitments:roster": {
34384
+ "aliases": [],
34385
+ "args": {},
34386
+ "description": "List an agent's commitments with each one's loop state (healthy, blocked, paused, unarmed, degraded, inactive, unknown)",
34387
+ "examples": [
34388
+ "<%= config.bin %> commitments roster --agent agent_abc123",
34389
+ "<%= config.bin %> commitments roster --agent agent_abc123 --json"
34390
+ ],
34391
+ "flags": {
34392
+ "bare": {
34393
+ "description": "Bare mode — ignore keychain/file credential sources. Token must come from env or --token.",
34394
+ "name": "bare",
34395
+ "allowNo": false,
34396
+ "type": "boolean"
34397
+ },
34398
+ "token": {
34399
+ "description": "Bearer token for this invocation (debugging/impersonation). Overrides env and stored creds.",
34400
+ "name": "token",
34401
+ "hasDynamicHelp": false,
34402
+ "multiple": false,
34403
+ "type": "option"
34404
+ },
34405
+ "workspace": {
34406
+ "description": "Workspace ID for workspace-scoped requests (also sets X-Workspace-Id).",
34407
+ "name": "workspace",
34408
+ "hasDynamicHelp": false,
34409
+ "multiple": false,
34410
+ "type": "option"
34411
+ },
34412
+ "profile": {
34413
+ "description": "Which stored session to use. Each profile keeps its own credential and deployment, so signing into one does not sign you out of another. Also OVERSKY_PROFILE. List them with `profiles list`.",
34414
+ "name": "profile",
34415
+ "hasDynamicHelp": false,
34416
+ "multiple": false,
34417
+ "type": "option"
34418
+ },
34419
+ "raw": {
34420
+ "description": "With --json, keep the Mongo storage fields (_id next to id, __v) that the CLI otherwise strips. Also OVERSKY_CLI_RAW=1.",
34421
+ "name": "raw",
34422
+ "allowNo": false,
34423
+ "type": "boolean"
34424
+ },
34425
+ "agent": {
34426
+ "description": "Agent ID",
34427
+ "name": "agent",
34428
+ "required": true,
34429
+ "hasDynamicHelp": false,
34430
+ "multiple": false,
34431
+ "type": "option"
34432
+ },
34433
+ "json": {
34434
+ "description": "Output as JSON",
34435
+ "name": "json",
34436
+ "allowNo": false,
34437
+ "type": "boolean"
34438
+ }
34439
+ },
34440
+ "hasDynamicHelp": false,
34441
+ "hiddenAliases": [],
34442
+ "id": "commitments:roster",
34443
+ "pluginAlias": "@skrr-ai/cli",
34444
+ "pluginName": "@skrr-ai/cli",
34445
+ "pluginType": "core",
34446
+ "strict": true,
34447
+ "enableJsonFlag": false,
34448
+ "autonomousCredentialPolicy": "delegated",
34449
+ "resolveSpaceFlag": true,
34450
+ "isESM": false,
34451
+ "relativePath": [
34452
+ "dist",
34453
+ "commands",
34454
+ "commitments",
34455
+ "roster.js"
34456
+ ]
34457
+ },
34383
34458
  "commitments:show": {
34384
34459
  "aliases": [],
34385
34460
  "args": {
@@ -34459,6 +34534,79 @@
34459
34534
  "show.js"
34460
34535
  ]
34461
34536
  },
34537
+ "commitments:status": {
34538
+ "aliases": [],
34539
+ "args": {
34540
+ "commitmentId": {
34541
+ "description": "Commitment ID",
34542
+ "name": "commitmentId",
34543
+ "required": true
34544
+ }
34545
+ },
34546
+ "description": "Show whether a commitment's loop is installed and working: state, next wakes, source access, last stop, cost",
34547
+ "examples": [
34548
+ "<%= config.bin %> commitments status obj_abc123",
34549
+ "<%= config.bin %> commitments status obj_abc123 --json"
34550
+ ],
34551
+ "flags": {
34552
+ "bare": {
34553
+ "description": "Bare mode — ignore keychain/file credential sources. Token must come from env or --token.",
34554
+ "name": "bare",
34555
+ "allowNo": false,
34556
+ "type": "boolean"
34557
+ },
34558
+ "token": {
34559
+ "description": "Bearer token for this invocation (debugging/impersonation). Overrides env and stored creds.",
34560
+ "name": "token",
34561
+ "hasDynamicHelp": false,
34562
+ "multiple": false,
34563
+ "type": "option"
34564
+ },
34565
+ "workspace": {
34566
+ "description": "Workspace ID for workspace-scoped requests (also sets X-Workspace-Id).",
34567
+ "name": "workspace",
34568
+ "hasDynamicHelp": false,
34569
+ "multiple": false,
34570
+ "type": "option"
34571
+ },
34572
+ "profile": {
34573
+ "description": "Which stored session to use. Each profile keeps its own credential and deployment, so signing into one does not sign you out of another. Also OVERSKY_PROFILE. List them with `profiles list`.",
34574
+ "name": "profile",
34575
+ "hasDynamicHelp": false,
34576
+ "multiple": false,
34577
+ "type": "option"
34578
+ },
34579
+ "raw": {
34580
+ "description": "With --json, keep the Mongo storage fields (_id next to id, __v) that the CLI otherwise strips. Also OVERSKY_CLI_RAW=1.",
34581
+ "name": "raw",
34582
+ "allowNo": false,
34583
+ "type": "boolean"
34584
+ },
34585
+ "json": {
34586
+ "description": "Output as JSON",
34587
+ "name": "json",
34588
+ "allowNo": false,
34589
+ "type": "boolean"
34590
+ }
34591
+ },
34592
+ "hasDynamicHelp": false,
34593
+ "hiddenAliases": [],
34594
+ "id": "commitments:status",
34595
+ "pluginAlias": "@skrr-ai/cli",
34596
+ "pluginName": "@skrr-ai/cli",
34597
+ "pluginType": "core",
34598
+ "strict": true,
34599
+ "enableJsonFlag": false,
34600
+ "autonomousCredentialPolicy": "delegated",
34601
+ "resolveSpaceFlag": true,
34602
+ "isESM": false,
34603
+ "relativePath": [
34604
+ "dist",
34605
+ "commands",
34606
+ "commitments",
34607
+ "status.js"
34608
+ ]
34609
+ },
34462
34610
  "commitments:subject": {
34463
34611
  "aliases": [],
34464
34612
  "args": {
@@ -125393,7 +125541,7 @@
125393
125541
  "type": "option"
125394
125542
  },
125395
125543
  "max-fires-per-day": {
125396
- "description": "Daily fire cap",
125544
+ "description": "Daily fire cap (schedule, stochastic and self_scheduled triggers only)",
125397
125545
  "name": "max-fires-per-day",
125398
125546
  "hasDynamicHelp": false,
125399
125547
  "multiple": false,
@@ -127177,7 +127325,7 @@
127177
127325
  "type": "option"
127178
127326
  },
127179
127327
  "max-fires-per-day": {
127180
- "description": "Daily fire cap",
127328
+ "description": "Daily fire cap (schedule, stochastic and self_scheduled triggers only)",
127181
127329
  "name": "max-fires-per-day",
127182
127330
  "hasDynamicHelp": false,
127183
127331
  "multiple": false,
@@ -129093,6 +129241,71 @@
129093
129241
  "add.js"
129094
129242
  ]
129095
129243
  },
129244
+ "widgets:check": {
129245
+ "aliases": [],
129246
+ "args": {
129247
+ "file": {
129248
+ "description": "File to check, or - for stdin. Text containing a widget block, or a JSON widget (a payload, a ui_widget part, or the ui_widget_render arguments, one or an array).",
129249
+ "name": "file",
129250
+ "required": true
129251
+ }
129252
+ },
129253
+ "description": "Check a generative-UI widget offline before sending it: grammar, size limits, JavaScript syntax and likely sandbox failures. Runs entirely offline: it reaches no API, so it needs no sign-in and has no route to keep in parity.",
129254
+ "examples": [
129255
+ "<%= config.bin %> widgets check reply.md",
129256
+ "<%= config.bin %> widgets check - < reply.md",
129257
+ "<%= config.bin %> widgets check widget.json --json",
129258
+ "<%= config.bin %> widgets check widget.json --render-fence > block.txt"
129259
+ ],
129260
+ "flags": {
129261
+ "json": {
129262
+ "description": "Output the report as JSON: { ok, widgets: [{ id, title, bytes, limits, complete, accepted, ok, issues }], errors, warnings, summary }",
129263
+ "name": "json",
129264
+ "allowNo": false,
129265
+ "type": "boolean"
129266
+ },
129267
+ "format": {
129268
+ "description": "How to read the input: auto (JSON if it parses as JSON, otherwise text that contains a widget block), fence, or json",
129269
+ "name": "format",
129270
+ "default": "auto",
129271
+ "hasDynamicHelp": false,
129272
+ "multiple": false,
129273
+ "options": [
129274
+ "auto",
129275
+ "fence",
129276
+ "json"
129277
+ ],
129278
+ "type": "option"
129279
+ },
129280
+ "strict": {
129281
+ "description": "Also fail (exit 1) on warnings",
129282
+ "name": "strict",
129283
+ "allowNo": false,
129284
+ "type": "boolean"
129285
+ },
129286
+ "render-fence": {
129287
+ "description": "For a JSON widget: print the correctly delimited block to stdout (the report goes to stderr), verified by parsing it back",
129288
+ "name": "render-fence",
129289
+ "allowNo": false,
129290
+ "type": "boolean"
129291
+ }
129292
+ },
129293
+ "hasDynamicHelp": false,
129294
+ "hiddenAliases": [],
129295
+ "id": "widgets:check",
129296
+ "pluginAlias": "@skrr-ai/cli",
129297
+ "pluginName": "@skrr-ai/cli",
129298
+ "pluginType": "core",
129299
+ "strict": true,
129300
+ "enableJsonFlag": false,
129301
+ "isESM": false,
129302
+ "relativePath": [
129303
+ "dist",
129304
+ "commands",
129305
+ "widgets",
129306
+ "check.js"
129307
+ ]
129308
+ },
129096
129309
  "widgets:list": {
129097
129310
  "aliases": [],
129098
129311
  "args": {},
@@ -132240,5 +132453,5 @@
132240
132453
  ]
132241
132454
  }
132242
132455
  },
132243
- "version": "0.1.102"
132456
+ "version": "0.1.104"
132244
132457
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skrr-ai/cli",
3
- "version": "0.1.102",
3
+ "version": "0.1.104",
4
4
  "description": "Command-line interface for skrr",
5
5
  "license": "ISC",
6
6
  "author": "skrr",
@@ -55,7 +55,7 @@
55
55
  "@oclif/core": "^4.0.0",
56
56
  "@oclif/plugin-autocomplete": "^3.2.56",
57
57
  "@oclif/plugin-warn-if-update-available": "^3.1.0",
58
- "@skrr-ai/auth-core": "^0.4.21",
58
+ "@skrr-ai/auth-core": "^0.4.22",
59
59
  "proper-lockfile": "^4.1.2",
60
60
  "qrcode-terminal": "^0.12.0",
61
61
  "socket.io-client": "^4.8.3",