@halcyonlabs/app 0.47.0-halcyon.520 → 0.47.0-halcyon.522

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 (137) hide show
  1. package/dist/index.d.ts +42 -42
  2. package/dist/index.js +1 -1
  3. package/host-daemon/dist/bb +1 -1
  4. package/host-daemon/dist/bb-chunks/{chunk-FLWGI25C.js → chunk-74TKKY2F.js} +1 -1
  5. package/host-daemon/dist/bb-chunks/{guide-2325FR7A.js → guide-FEN2PCII.js} +1 -1
  6. package/host-daemon/dist/bb-chunks/{plugin-GSR7L7WW.js → plugin-2LVTGSOX.js} +1 -1
  7. package/host-daemon/dist/daemon-bundle.mjs +117 -117
  8. package/package.json +2 -2
  9. package/server/dist/builtin-plugins/account-pool/dist/app.meta.json +2 -2
  10. package/server/dist/builtin-plugins/account-pool/dist/server.meta.json +2 -2
  11. package/server/dist/builtin-plugins/agent-annotations/dist/app.meta.json +2 -2
  12. package/server/dist/builtin-plugins/agent-annotations/dist/server.meta.json +2 -2
  13. package/server/dist/builtin-plugins/agent-board/dist/app.meta.json +2 -2
  14. package/server/dist/builtin-plugins/agent-board/dist/server.meta.json +2 -2
  15. package/server/dist/builtin-plugins/ask-user-question/dist/app.meta.json +2 -2
  16. package/server/dist/builtin-plugins/ask-user-question/dist/server.meta.json +2 -2
  17. package/server/dist/builtin-plugins/automations/dist/app.meta.json +2 -2
  18. package/server/dist/builtin-plugins/automations/dist/server.meta.json +2 -2
  19. package/server/dist/builtin-plugins/bb-account/dist/app.meta.json +2 -2
  20. package/server/dist/builtin-plugins/bb-account/dist/server.meta.json +2 -2
  21. package/server/dist/builtin-plugins/bb-ai/dist/server.meta.json +2 -2
  22. package/server/dist/builtin-plugins/bb-guide/dist/app.meta.json +2 -2
  23. package/server/dist/builtin-plugins/bb-guide/dist/server.meta.json +2 -2
  24. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-api-index.md +1 -1
  25. package/server/dist/builtin-plugins/browser-automation/dist/app.meta.json +2 -2
  26. package/server/dist/builtin-plugins/browser-automation/dist/host.meta.json +2 -2
  27. package/server/dist/builtin-plugins/browser-automation/dist/server.meta.json +2 -2
  28. package/server/dist/builtin-plugins/composer/dist/app.meta.json +2 -2
  29. package/server/dist/builtin-plugins/composer/dist/server.meta.json +2 -2
  30. package/server/dist/builtin-plugins/concurrency-limit/dist/app.meta.json +2 -2
  31. package/server/dist/builtin-plugins/concurrency-limit/dist/host.meta.json +2 -2
  32. package/server/dist/builtin-plugins/concurrency-limit/dist/server.meta.json +2 -2
  33. package/server/dist/builtin-plugins/connect/dist/app.meta.json +2 -2
  34. package/server/dist/builtin-plugins/connect/dist/server.meta.json +2 -2
  35. package/server/dist/builtin-plugins/connect-next/dist/app.meta.json +2 -2
  36. package/server/dist/builtin-plugins/connect-next/dist/server.meta.json +2 -2
  37. package/server/dist/builtin-plugins/custom-instructions/dist/server.meta.json +2 -2
  38. package/server/dist/builtin-plugins/docs/dist/app.meta.json +2 -2
  39. package/server/dist/builtin-plugins/docs/dist/server.meta.json +2 -2
  40. package/server/dist/builtin-plugins/drafts/dist/app.meta.json +2 -2
  41. package/server/dist/builtin-plugins/drafts/dist/server.meta.json +2 -2
  42. package/server/dist/builtin-plugins/environment-git-worktree/dist/app.meta.json +2 -2
  43. package/server/dist/builtin-plugins/environment-git-worktree/dist/host.meta.json +2 -2
  44. package/server/dist/builtin-plugins/environment-git-worktree/dist/server.meta.json +2 -2
  45. package/server/dist/builtin-plugins/environment-modal-sandbox/dist/app.meta.json +2 -2
  46. package/server/dist/builtin-plugins/environment-modal-sandbox/dist/server.meta.json +2 -2
  47. package/server/dist/builtin-plugins/environment-personal-workspace/dist/host.meta.json +2 -2
  48. package/server/dist/builtin-plugins/environment-personal-workspace/dist/server.meta.json +2 -2
  49. package/server/dist/builtin-plugins/environment-project-checkout/dist/app.meta.json +2 -2
  50. package/server/dist/builtin-plugins/environment-project-checkout/dist/host.meta.json +2 -2
  51. package/server/dist/builtin-plugins/environment-project-checkout/dist/server.meta.json +2 -2
  52. package/server/dist/builtin-plugins/github/dist/app.meta.json +2 -2
  53. package/server/dist/builtin-plugins/github/dist/server.meta.json +2 -2
  54. package/server/dist/builtin-plugins/github-pr-status/dist/app.meta.json +2 -2
  55. package/server/dist/builtin-plugins/github-pr-status/dist/host.meta.json +2 -2
  56. package/server/dist/builtin-plugins/github-pr-status/dist/server.meta.json +2 -2
  57. package/server/dist/builtin-plugins/inline-vis/dist/app.meta.json +2 -2
  58. package/server/dist/builtin-plugins/inline-vis/dist/server.meta.json +2 -2
  59. package/server/dist/builtin-plugins/keep-awake/dist/app.meta.json +2 -2
  60. package/server/dist/builtin-plugins/keep-awake/dist/host.meta.json +2 -2
  61. package/server/dist/builtin-plugins/keep-awake/dist/server.meta.json +2 -2
  62. package/server/dist/builtin-plugins/library/dist/app.meta.json +2 -2
  63. package/server/dist/builtin-plugins/library/dist/server.meta.json +2 -2
  64. package/server/dist/builtin-plugins/mcp/dist/server.meta.json +2 -2
  65. package/server/dist/builtin-plugins/memory/dist/app.meta.json +2 -2
  66. package/server/dist/builtin-plugins/memory/dist/server.meta.json +2 -2
  67. package/server/dist/builtin-plugins/monaco-editor/dist/app.meta.json +2 -2
  68. package/server/dist/builtin-plugins/monaco-editor/dist/server.meta.json +2 -2
  69. package/server/dist/builtin-plugins/navigation/dist/app.meta.json +2 -2
  70. package/server/dist/builtin-plugins/navigation/dist/server.meta.json +2 -2
  71. package/server/dist/builtin-plugins/notify-feed/dist/app.meta.json +2 -2
  72. package/server/dist/builtin-plugins/notify-feed/dist/server.meta.json +2 -2
  73. package/server/dist/builtin-plugins/orbit/dist/app.meta.json +2 -2
  74. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/manifest.json +3 -3
  75. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit/skills/messages/SKILL.md +1 -1
  76. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit/skills/thread-replies/SKILL.md +5 -0
  77. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit/skills/userland/SKILL.md +4 -4
  78. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/fixed-runner/linux-x64/manifest.json +4 -4
  79. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/revision +1 -1
  80. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/source.json +1 -1
  81. package/server/dist/builtin-plugins/orbit/dist/host.meta.json +2 -2
  82. package/server/dist/builtin-plugins/orbit/dist/server.js +362 -362
  83. package/server/dist/builtin-plugins/orbit/dist/server.meta.json +2 -2
  84. package/server/dist/builtin-plugins/orbit/skills/messages/SKILL.md +1 -1
  85. package/server/dist/builtin-plugins/orbit/skills/thread-replies/SKILL.md +5 -0
  86. package/server/dist/builtin-plugins/orbit/skills/userland/SKILL.md +4 -4
  87. package/server/dist/builtin-plugins/pdf-preview/dist/app.meta.json +2 -2
  88. package/server/dist/builtin-plugins/pdf-preview/dist/server.meta.json +2 -2
  89. package/server/dist/builtin-plugins/plugin-api-docs/dist/app.js +1 -1
  90. package/server/dist/builtin-plugins/plugin-api-docs/dist/app.meta.json +2 -2
  91. package/server/dist/builtin-plugins/plugin-api-docs/dist/server.js +1 -1
  92. package/server/dist/builtin-plugins/plugin-api-docs/dist/server.meta.json +2 -2
  93. package/server/dist/builtin-plugins/plugin-api-tester/dist/app.meta.json +2 -2
  94. package/server/dist/builtin-plugins/plugin-api-tester/dist/server.meta.json +2 -2
  95. package/server/dist/builtin-plugins/prompt-library/dist/app.meta.json +2 -2
  96. package/server/dist/builtin-plugins/prompt-library/dist/server.meta.json +2 -2
  97. package/server/dist/builtin-plugins/provider-acp/dist/app.meta.json +2 -2
  98. package/server/dist/builtin-plugins/provider-acp/dist/host.meta.json +2 -2
  99. package/server/dist/builtin-plugins/provider-acp/dist/server.meta.json +2 -2
  100. package/server/dist/builtin-plugins/provider-claude-code/dist/host.meta.json +2 -2
  101. package/server/dist/builtin-plugins/provider-claude-code/dist/server.meta.json +2 -2
  102. package/server/dist/builtin-plugins/provider-codex/dist/app.meta.json +2 -2
  103. package/server/dist/builtin-plugins/provider-codex/dist/host.meta.json +2 -2
  104. package/server/dist/builtin-plugins/provider-codex/dist/server.meta.json +2 -2
  105. package/server/dist/builtin-plugins/provider-pi/dist/app.meta.json +2 -2
  106. package/server/dist/builtin-plugins/provider-pi/dist/host.meta.json +2 -2
  107. package/server/dist/builtin-plugins/provider-pi/dist/server.meta.json +2 -2
  108. package/server/dist/builtin-plugins/provider-retry/dist/server.meta.json +2 -2
  109. package/server/dist/builtin-plugins/provider-usage/dist/app.meta.json +2 -2
  110. package/server/dist/builtin-plugins/provider-usage/dist/server.meta.json +2 -2
  111. package/server/dist/builtin-plugins/push-notifications/dist/app.meta.json +2 -2
  112. package/server/dist/builtin-plugins/push-notifications/dist/server.meta.json +2 -2
  113. package/server/dist/builtin-plugins/scheduled-send/dist/app.meta.json +2 -2
  114. package/server/dist/builtin-plugins/scheduled-send/dist/server.meta.json +2 -2
  115. package/server/dist/builtin-plugins/secrets/dist/app.meta.json +2 -2
  116. package/server/dist/builtin-plugins/secrets/dist/server.meta.json +2 -2
  117. package/server/dist/builtin-plugins/side-chat/dist/app.meta.json +2 -2
  118. package/server/dist/builtin-plugins/side-chat/dist/server.meta.json +2 -2
  119. package/server/dist/builtin-plugins/storage-retention/dist/app.meta.json +2 -2
  120. package/server/dist/builtin-plugins/storage-retention/dist/host.meta.json +2 -2
  121. package/server/dist/builtin-plugins/storage-retention/dist/server.meta.json +2 -2
  122. package/server/dist/builtin-plugins/tasks/dist/app.meta.json +2 -2
  123. package/server/dist/builtin-plugins/tasks/dist/host.meta.json +2 -2
  124. package/server/dist/builtin-plugins/tasks/dist/server.js +19 -19
  125. package/server/dist/builtin-plugins/tasks/dist/server.meta.json +2 -2
  126. package/server/dist/builtin-plugins/tasks/package.json +1 -1
  127. package/server/dist/builtin-plugins/tasks/skills/tasks/SKILL.md +5 -2
  128. package/server/dist/builtin-plugins/theme-preview/dist/app.meta.json +2 -2
  129. package/server/dist/builtin-plugins/theme-preview/dist/server.meta.json +2 -2
  130. package/server/dist/builtin-plugins/thread-list/dist/app.meta.json +2 -2
  131. package/server/dist/builtin-plugins/thread-list/dist/server.meta.json +2 -2
  132. package/server/dist/builtin-plugins/workflows/dist/app.meta.json +2 -2
  133. package/server/dist/builtin-plugins/workflows/dist/server.meta.json +2 -2
  134. package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-api-index.md +1 -1
  135. package/server/dist/plugin-sdk-runtime.js +9 -0
  136. package/server/dist/start-server.js +9 -1
  137. /package/host-daemon/dist/bb-chunks/{thread-ONWHRF2G.js → thread-JFZZVBRM.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -83,8 +83,8 @@ declare const appSettingsSchema: z$1.ZodObject<{
83
83
  providerOrder: z$1.ZodArray<z$1.ZodString>;
84
84
  defaultProviderId: z$1.ZodNullable<z$1.ZodString>;
85
85
  providerCompletedTurnDisplay: z$1.ZodRecord<z$1.ZodString, z$1.ZodEnum<{
86
- collapse: "collapse";
87
86
  flat: "flat";
87
+ collapse: "collapse";
88
88
  }>>;
89
89
  streamerMode: z$1.ZodBoolean;
90
90
  allowFastServiceTier: z$1.ZodBoolean;
@@ -105,8 +105,8 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
105
105
  providerOrder: z$1.ZodArray<z$1.ZodString>;
106
106
  defaultProviderId: z$1.ZodNullable<z$1.ZodString>;
107
107
  providerCompletedTurnDisplay: z$1.ZodRecord<z$1.ZodString, z$1.ZodEnum<{
108
- collapse: "collapse";
109
108
  flat: "flat";
109
+ collapse: "collapse";
110
110
  }>>;
111
111
  streamerMode: z$1.ZodBoolean;
112
112
  managedBranchPrefix: z$1.ZodString;
@@ -143,8 +143,8 @@ declare const appSettingsUpdateSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
143
143
  providerOrder: z$1.ZodArray<z$1.ZodString>;
144
144
  defaultProviderId: z$1.ZodNullable<z$1.ZodString>;
145
145
  providerCompletedTurnDisplay: z$1.ZodRecord<z$1.ZodString, z$1.ZodEnum<{
146
- collapse: "collapse";
147
146
  flat: "flat";
147
+ collapse: "collapse";
148
148
  }>>;
149
149
  streamerMode: z$1.ZodBoolean;
150
150
  machineServerUrl: z$1.ZodNullable<z$1.ZodString>;
@@ -524,8 +524,8 @@ declare const environmentSchema: z$1.ZodObject<{
524
524
  retireAt: z$1.ZodNullable<z$1.ZodNumber>;
525
525
  teardown: z$1.ZodNullable<z$1.ZodObject<{
526
526
  status: z$1.ZodEnum<{
527
- failed: "failed";
528
527
  running: "running";
528
+ failed: "failed";
529
529
  removed: "removed";
530
530
  }>;
531
531
  attempt: z$1.ZodNumber;
@@ -620,16 +620,16 @@ declare const hostSchema: z$1.ZodObject<{
620
620
  pendingLog: z$1.ZodString;
621
621
  teardown: z$1.ZodNullable<z$1.ZodObject<{
622
622
  status: z$1.ZodEnum<{
623
- failed: "failed";
624
623
  running: "running";
624
+ failed: "failed";
625
625
  removed: "removed";
626
626
  }>;
627
627
  attempt: z$1.ZodNumber;
628
628
  }, z$1.core.$strip>>;
629
629
  }, z$1.core.$strip>;
630
630
  maxPermissionMode: z$1.ZodEnum<{
631
- full: "full";
632
631
  auto: "auto";
632
+ full: "full";
633
633
  "accept-edits": "accept-edits";
634
634
  }>;
635
635
  delivery: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
@@ -732,8 +732,8 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
732
732
  providerThreadId: z$1.ZodString;
733
733
  objective: z$1.ZodString;
734
734
  status: z$1.ZodEnum<{
735
- active: "active";
736
735
  paused: "paused";
736
+ active: "active";
737
737
  budgetLimited: "budgetLimited";
738
738
  complete: "complete";
739
739
  }>;
@@ -1304,9 +1304,9 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
1304
1304
  step: z$1.ZodString;
1305
1305
  status: z$1.ZodOptional<z$1.ZodEnum<{
1306
1306
  pending: "pending";
1307
- active: "active";
1308
1307
  completed: "completed";
1309
1308
  failed: "failed";
1309
+ active: "active";
1310
1310
  }>>;
1311
1311
  }, z$1.core.$strip>>;
1312
1312
  explanation: z$1.ZodOptional<z$1.ZodString>;
@@ -1385,10 +1385,10 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
1385
1385
  }>;
1386
1386
  taskStatus: z$1.ZodEnum<{
1387
1387
  pending: "pending";
1388
+ running: "running";
1389
+ paused: "paused";
1388
1390
  completed: "completed";
1389
1391
  failed: "failed";
1390
- paused: "paused";
1391
- running: "running";
1392
1392
  killed: "killed";
1393
1393
  stopped: "stopped";
1394
1394
  }>;
@@ -1405,8 +1405,8 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
1405
1405
  index: z$1.ZodNumber;
1406
1406
  label: z$1.ZodString;
1407
1407
  state: z$1.ZodEnum<{
1408
- failed: "failed";
1409
1408
  running: "running";
1409
+ failed: "failed";
1410
1410
  queued: "queued";
1411
1411
  done: "done";
1412
1412
  skipped: "skipped";
@@ -2076,9 +2076,9 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
2076
2076
  step: z$1.ZodString;
2077
2077
  status: z$1.ZodOptional<z$1.ZodEnum<{
2078
2078
  pending: "pending";
2079
- active: "active";
2080
2079
  completed: "completed";
2081
2080
  failed: "failed";
2081
+ active: "active";
2082
2082
  }>>;
2083
2083
  }, z$1.core.$strip>>;
2084
2084
  explanation: z$1.ZodOptional<z$1.ZodString>;
@@ -2157,10 +2157,10 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
2157
2157
  }>;
2158
2158
  taskStatus: z$1.ZodEnum<{
2159
2159
  pending: "pending";
2160
+ running: "running";
2161
+ paused: "paused";
2160
2162
  completed: "completed";
2161
2163
  failed: "failed";
2162
- paused: "paused";
2163
- running: "running";
2164
2164
  killed: "killed";
2165
2165
  stopped: "stopped";
2166
2166
  }>;
@@ -2177,8 +2177,8 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
2177
2177
  index: z$1.ZodNumber;
2178
2178
  label: z$1.ZodString;
2179
2179
  state: z$1.ZodEnum<{
2180
- failed: "failed";
2181
2180
  running: "running";
2181
+ failed: "failed";
2182
2182
  queued: "queued";
2183
2183
  done: "done";
2184
2184
  skipped: "skipped";
@@ -2389,10 +2389,10 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
2389
2389
  }>;
2390
2390
  taskStatus: z$1.ZodEnum<{
2391
2391
  pending: "pending";
2392
+ running: "running";
2393
+ paused: "paused";
2392
2394
  completed: "completed";
2393
2395
  failed: "failed";
2394
- paused: "paused";
2395
- running: "running";
2396
2396
  killed: "killed";
2397
2397
  stopped: "stopped";
2398
2398
  }>;
@@ -2409,8 +2409,8 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
2409
2409
  index: z$1.ZodNumber;
2410
2410
  label: z$1.ZodString;
2411
2411
  state: z$1.ZodEnum<{
2412
- failed: "failed";
2413
2412
  running: "running";
2413
+ failed: "failed";
2414
2414
  queued: "queued";
2415
2415
  done: "done";
2416
2416
  skipped: "skipped";
@@ -2488,10 +2488,10 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
2488
2488
  }>;
2489
2489
  taskStatus: z$1.ZodEnum<{
2490
2490
  pending: "pending";
2491
+ running: "running";
2492
+ paused: "paused";
2491
2493
  completed: "completed";
2492
2494
  failed: "failed";
2493
- paused: "paused";
2494
- running: "running";
2495
2495
  killed: "killed";
2496
2496
  stopped: "stopped";
2497
2497
  }>;
@@ -2508,8 +2508,8 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
2508
2508
  index: z$1.ZodNumber;
2509
2509
  label: z$1.ZodString;
2510
2510
  state: z$1.ZodEnum<{
2511
- failed: "failed";
2512
2511
  running: "running";
2512
+ failed: "failed";
2513
2513
  queued: "queued";
2514
2514
  done: "done";
2515
2515
  skipped: "skipped";
@@ -2704,9 +2704,9 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
2704
2704
  step: z$1.ZodString;
2705
2705
  status: z$1.ZodOptional<z$1.ZodEnum<{
2706
2706
  pending: "pending";
2707
- active: "active";
2708
2707
  completed: "completed";
2709
2708
  failed: "failed";
2709
+ active: "active";
2710
2710
  }>>;
2711
2711
  }, z$1.core.$strip>>;
2712
2712
  explanation: z$1.ZodOptional<z$1.ZodString>;
@@ -2715,8 +2715,8 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
2715
2715
  threadId: z$1.ZodString;
2716
2716
  providerThreadId: z$1.ZodString;
2717
2717
  state: z$1.ZodEnum<{
2718
- idle: "idle";
2719
2718
  running: "running";
2719
+ idle: "idle";
2720
2720
  }>;
2721
2721
  }, z$1.core.$strip>, z$1.ZodObject<{
2722
2722
  type: z$1.ZodLiteral<"turn/diff/updated">;
@@ -3012,8 +3012,8 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
3012
3012
  command: "command";
3013
3013
  }>;
3014
3014
  origin: z$1.ZodEnum<{
3015
- user: "user";
3016
3015
  project: "project";
3016
+ user: "user";
3017
3017
  builtin: "builtin";
3018
3018
  }>;
3019
3019
  label: z$1.ZodString;
@@ -3102,8 +3102,8 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
3102
3102
  command: "command";
3103
3103
  }>;
3104
3104
  origin: z$1.ZodEnum<{
3105
- user: "user";
3106
3105
  project: "project";
3106
+ user: "user";
3107
3107
  builtin: "builtin";
3108
3108
  }>;
3109
3109
  label: z$1.ZodString;
@@ -3176,8 +3176,8 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
3176
3176
  }>;
3177
3177
  permissionMode: z$1.ZodEnum<{
3178
3178
  readonly: "readonly";
3179
- full: "full";
3180
3179
  auto: "auto";
3180
+ full: "full";
3181
3181
  "accept-edits": "accept-edits";
3182
3182
  "workspace-write": "workspace-write";
3183
3183
  }>;
@@ -3578,9 +3578,9 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
3578
3578
  threadId: z$1.ZodString;
3579
3579
  provisioningId: z$1.ZodString;
3580
3580
  status: z$1.ZodEnum<{
3581
- active: "active";
3582
3581
  completed: "completed";
3583
3582
  failed: "failed";
3583
+ active: "active";
3584
3584
  cancelled: "cancelled";
3585
3585
  }>;
3586
3586
  environmentId: z$1.ZodNullable<z$1.ZodString>;
@@ -3975,8 +3975,8 @@ type ReasoningLevel = z$1.infer<typeof reasoningLevelSchema>;
3975
3975
  declare const serviceTierSchema: z$1.ZodString;
3976
3976
  type ServiceTier = z$1.infer<typeof serviceTierSchema>;
3977
3977
  declare const permissionModeSchema: z$1.ZodEnum<{
3978
- full: "full";
3979
3978
  auto: "auto";
3979
+ full: "full";
3980
3980
  "accept-edits": "accept-edits";
3981
3981
  }>;
3982
3982
  type PermissionMode = z$1.infer<typeof permissionModeSchema>;
@@ -4020,8 +4020,8 @@ declare const promptTextMentionSchema: z$1.ZodObject<{
4020
4020
  command: "command";
4021
4021
  }>;
4022
4022
  origin: z$1.ZodEnum<{
4023
- user: "user";
4024
4023
  project: "project";
4024
+ user: "user";
4025
4025
  builtin: "builtin";
4026
4026
  }>;
4027
4027
  label: z$1.ZodString;
@@ -4085,8 +4085,8 @@ declare const promptInputSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
4085
4085
  command: "command";
4086
4086
  }>;
4087
4087
  origin: z$1.ZodEnum<{
4088
- user: "user";
4089
4088
  project: "project";
4089
+ user: "user";
4090
4090
  builtin: "builtin";
4091
4091
  }>;
4092
4092
  label: z$1.ZodString;
@@ -4145,8 +4145,8 @@ declare const resolvedThreadExecutionOptionsSchema: z$1.ZodObject<{
4145
4145
  serviceTier: z$1.ZodString;
4146
4146
  reasoningLevel: z$1.ZodString;
4147
4147
  permissionMode: z$1.ZodEnum<{
4148
- full: "full";
4149
4148
  auto: "auto";
4149
+ full: "full";
4150
4150
  "accept-edits": "accept-edits";
4151
4151
  }>;
4152
4152
  source: z$1.ZodEnum<{
@@ -4162,8 +4162,8 @@ declare const projectExecutionDefaultsSchema: z$1.ZodObject<{
4162
4162
  serviceTier: z$1.ZodString;
4163
4163
  reasoningLevel: z$1.ZodString;
4164
4164
  permissionMode: z$1.ZodEnum<{
4165
- full: "full";
4166
4165
  auto: "auto";
4166
+ full: "full";
4167
4167
  "accept-edits": "accept-edits";
4168
4168
  }>;
4169
4169
  }, z$1.core.$strip>;
@@ -4203,8 +4203,8 @@ declare const providerInfoSchema: z$1.ZodObject<{
4203
4203
  supportsFork: z$1.ZodBoolean;
4204
4204
  supportsSessionRewind: z$1.ZodBoolean;
4205
4205
  permissionModes: z$1.ZodArray<z$1.ZodEnum<{
4206
- full: "full";
4207
4206
  auto: "auto";
4207
+ full: "full";
4208
4208
  "accept-edits": "accept-edits";
4209
4209
  }>>;
4210
4210
  modelCatalogScope: z$1.ZodEnum<{
@@ -4240,8 +4240,8 @@ declare const providerInfoSchema: z$1.ZodObject<{
4240
4240
  }, z$1.core.$strip>;
4241
4241
  }, z$1.core.$strip>], "kind">>;
4242
4242
  completedTurnDisplay: z$1.ZodEnum<{
4243
- collapse: "collapse";
4244
4243
  flat: "flat";
4244
+ collapse: "collapse";
4245
4245
  }>;
4246
4246
  available: z$1.ZodBoolean;
4247
4247
  strings: z$1.ZodOptional<z$1.ZodObject<{
@@ -4397,8 +4397,8 @@ declare const threadQueuedMessageSchema: z$1.ZodObject<{
4397
4397
  command: "command";
4398
4398
  }>;
4399
4399
  origin: z$1.ZodEnum<{
4400
- user: "user";
4401
4400
  project: "project";
4401
+ user: "user";
4402
4402
  builtin: "builtin";
4403
4403
  }>;
4404
4404
  label: z$1.ZodString;
@@ -4444,8 +4444,8 @@ declare const threadQueuedMessageSchema: z$1.ZodObject<{
4444
4444
  model: z$1.ZodString;
4445
4445
  reasoningLevel: z$1.ZodString;
4446
4446
  permissionMode: z$1.ZodEnum<{
4447
- full: "full";
4448
4447
  auto: "auto";
4448
+ full: "full";
4449
4449
  "accept-edits": "accept-edits";
4450
4450
  }>;
4451
4451
  serviceTier: z$1.ZodString;
@@ -6131,8 +6131,8 @@ declare const hostDaemonCommandRegistry: {
6131
6131
  skillFilePath: z$1.ZodString;
6132
6132
  }, z$1.core.$strict>], "kind">>;
6133
6133
  instructionMode: z$1.ZodEnum<{
6134
- append: "append";
6135
6134
  replace: "replace";
6135
+ append: "append";
6136
6136
  }>;
6137
6137
  type: z$1.ZodLiteral<"thread.rewind.prepare">;
6138
6138
  leaseId: z$1.ZodString;
@@ -6280,8 +6280,8 @@ declare const hostDaemonCommandRegistry: {
6280
6280
  skillFilePath: z$1.ZodString;
6281
6281
  }, z$1.core.$strict>], "kind">>;
6282
6282
  instructionMode: z$1.ZodEnum<{
6283
- append: "append";
6284
6283
  replace: "replace";
6284
+ append: "append";
6285
6285
  }>;
6286
6286
  type: z$1.ZodLiteral<"thread.start">;
6287
6287
  requestId: z$1.ZodString;
@@ -6744,8 +6744,8 @@ declare const hostDaemonCommandRegistry: {
6744
6744
  envPassthrough: z$1.ZodArray<z$1.ZodString>;
6745
6745
  }, z$1.core.$strict>;
6746
6746
  instructionMode: z$1.ZodEnum<{
6747
- append: "append";
6748
6747
  replace: "replace";
6748
+ append: "append";
6749
6749
  }>;
6750
6750
  projectId: z$1.ZodString;
6751
6751
  providerId: z$1.ZodString;
@@ -6960,8 +6960,8 @@ declare const hostDaemonCommandRegistry: {
6960
6960
  envPassthrough: z$1.ZodArray<z$1.ZodString>;
6961
6961
  }, z$1.core.$strict>;
6962
6962
  instructionMode: z$1.ZodEnum<{
6963
- append: "append";
6964
6963
  replace: "replace";
6964
+ append: "append";
6965
6965
  }>;
6966
6966
  projectId: z$1.ZodString;
6967
6967
  providerId: z$1.ZodString;
@@ -8185,9 +8185,9 @@ declare const hostDaemonCommandRegistry: {
8185
8185
  executablePath: z$1.ZodNullable<z$1.ZodString>;
8186
8186
  installed: z$1.ZodBoolean;
8187
8187
  installSource: z$1.ZodEnum<{
8188
- external: "external";
8189
8188
  notInstalled: "notInstalled";
8190
8189
  npmGlobal: "npmGlobal";
8190
+ external: "external";
8191
8191
  }>;
8192
8192
  currentVersion: z$1.ZodNullable<z$1.ZodString>;
8193
8193
  latestVersion: z$1.ZodNullable<z$1.ZodString>;
@@ -8736,9 +8736,9 @@ declare const providerCliStatusResponseSchema: z$1.ZodRecord<z$1.ZodString, z$1.
8736
8736
  executablePath: z$1.ZodNullable<z$1.ZodString>;
8737
8737
  installed: z$1.ZodBoolean;
8738
8738
  installSource: z$1.ZodEnum<{
8739
- external: "external";
8740
8739
  notInstalled: "notInstalled";
8741
8740
  npmGlobal: "npmGlobal";
8741
+ external: "external";
8742
8742
  }>;
8743
8743
  currentVersion: z$1.ZodNullable<z$1.ZodString>;
8744
8744
  latestVersion: z$1.ZodNullable<z$1.ZodString>;
package/dist/index.js CHANGED
@@ -16175,7 +16175,7 @@ var PLUGIN_SDK_VERSION, PLUGIN_SDK_MAJOR;
16175
16175
  var init_plugin_sdk_version = __esm({
16176
16176
  "../domain/src/plugin-sdk-version.ts"() {
16177
16177
  "use strict";
16178
- PLUGIN_SDK_VERSION = "0.6.81";
16178
+ PLUGIN_SDK_VERSION = "0.6.82";
16179
16179
  PLUGIN_SDK_MAJOR = Number(PLUGIN_SDK_VERSION.split(".", 1)[0]);
16180
16180
  }
16181
16181
  });
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __createRequire } from "node:module";import { dirname as __pathDirname } from "node:path";import { fileURLToPath as __fileURLToPath } from "node:url";const require = __createRequire(import.meta.url);const __filename = __fileURLToPath(import.meta.url);const __dirname = __pathDirname(__filename);
3
- import{a as g,b as v,c as C}from"./bb-chunks/chunk-FLWGI25C.js";import{a as d,b as p,d as u}from"./bb-chunks/chunk-NCQMSH7M.js";import"./bb-chunks/chunk-5PWLIQO6.js";import{spawnSync as _}from"node:child_process";import{realpathSync as R}from"node:fs";import{resolve as S,win32 as B}from"node:path";var f="BB_CLI_REEXEC";function I(e){return e.platform==="win32"&&B.extname(e.target)===""?{command:e.nodePath,args:[e.target,...e.argv]}:{command:e.target,args:e.argv}}function x(e){try{return R(S(e))}catch{return null}}function b(e={}){let n=e.env??process.env;if(n[f]==="1")return;let r=n.BB_CLI?.trim();if(!r)return;let t=e.currentExecutablePath??process.argv[1];if(!t)return;let o=x(r),a=x(t);if(o===null||a===null||o===a)return;let i=e.argv??process.argv.slice(2),c={...n,[f]:"1"};if(e.reexec){e.reexec({target:o,argv:i,env:c});return}let l=I({argv:i,nodePath:process.execPath,platform:process.platform,target:o}),s=_(l.command,l.args,{env:c,stdio:"inherit"});if(s.error){process.stderr.write(`Moonlet: failed to re-exec BB_CLI=${o}: ${s.error.message}
3
+ import{a as g,b as v,c as C}from"./bb-chunks/chunk-74TKKY2F.js";import{a as d,b as p,d as u}from"./bb-chunks/chunk-NCQMSH7M.js";import"./bb-chunks/chunk-5PWLIQO6.js";import{spawnSync as _}from"node:child_process";import{realpathSync as R}from"node:fs";import{resolve as S,win32 as B}from"node:path";var f="BB_CLI_REEXEC";function I(e){return e.platform==="win32"&&B.extname(e.target)===""?{command:e.nodePath,args:[e.target,...e.argv]}:{command:e.target,args:e.argv}}function x(e){try{return R(S(e))}catch{return null}}function b(e={}){let n=e.env??process.env;if(n[f]==="1")return;let r=n.BB_CLI?.trim();if(!r)return;let t=e.currentExecutablePath??process.argv[1];if(!t)return;let o=x(r),a=x(t);if(o===null||a===null||o===a)return;let i=e.argv??process.argv.slice(2),c={...n,[f]:"1"};if(e.reexec){e.reexec({target:o,argv:i,env:c});return}let l=I({argv:i,nodePath:process.execPath,platform:process.platform,target:o}),s=_(l.command,l.args,{env:c,stdio:"inherit"});if(s.error){process.stderr.write(`Moonlet: failed to re-exec BB_CLI=${o}: ${s.error.message}
4
4
  `),process.exitCode=1;return}process.exit(s.status===null?1:s.status)}process.env.FORCE_COLOR!==void 0&&delete process.env.NO_COLOR;b();var m=new p;m.name("bb").description("Moonlet CLI - manage your AI coding agents").enablePositionalOptions().exitOverride().showSuggestionAfterError(!1).version(u());var O=new Set([...g.map(e=>e.name),"help"]);function A(e){let n,r=()=>n??=e.createCliRuntimeContext();return{getUrl:()=>e.resolveServerUrl(r()),getContext:()=>e.resolveContextSnapshot(r())}}async function L(e,n,r){let t=await import("./bb-chunks/plugin-cli-proxy-5UJXWD7T.js"),o=await t.fetchPluginCliContributions(n());if(o.outcome==="unreachable"){if(r)return;let s=t.describeUnreachableServer(n(),o.cause,o.lastTimeoutMs,o.attempts);console.error(s);let{isJsonInvocation:E,writeCliErrorEnvelope:y}=await import("./bb-chunks/cli-error-output-KERMGTKZ.js");y({code:"server_unreachable",hint:null,message:s},E(process.argv)),process.exit(1)}if(o.outcome==="invalid")return;let a=t.findPluginCliCommand(o.contributions,e);if(a===void 0){let s=await t.findDisabledPluginForCommand(n(),e);s!==null&&(console.error(`bb ${e} is provided by the "${s}" plugin, which is disabled \u2014 run \`bb plugin enable ${s}\` or enable it in Plugins.`),process.exit(1));return}let i=process.argv.slice(3),c=a.commands.find(s=>s.name===i[0]);c!==void 0&&a.rendersHelp!==!0&&i.slice(1).some(s=>s==="--help"||s==="-h")&&(console.log(c.usage),process.exit(0));let l=await t.runPluginCliCommand(n(),a.pluginId,i);l!==0&&await w({code:"plugin_command_failed",command:t.pluginCommandLabel(a,i),exitCode:l,token:null}),process.exit(l)}async function w(e){let[{appendCliErrorLogEntry:n},{commandPathLabel:r}]=await Promise.all([import("./bb-chunks/cli-error-log-PHJFENHA.js"),import("./bb-chunks/commander-errors-KICBMATT.js")]);n({at:new Date().toISOString(),cliVersion:u(),code:e.code,command:e.command??r(m,process.argv),exitCode:e.exitCode,threadId:process.env.BB_THREAD_ID??null,token:e.token})}async function P(e,n){e.exitCode===0&&process.exit(0);let[r,t]=await Promise.all([import("./bb-chunks/commander-errors-KICBMATT.js"),import("./bb-chunks/context-hints-MB45OW5W.js")]),o=await r.summarizeCommanderError({argv:process.argv,error:e,program:m,resolveHostId:n===null?async()=>null:t.createContextHostIdResolver(n)});r.writeCommanderErrorSummary(o,process.argv),await w({code:o.code,command:null,exitCode:e.exitCode,token:o.logToken}),process.exit(e.exitCode)}async function h(e){try{await m.parseAsync(process.argv)}catch(n){throw n instanceof d&&await P(n,e),n}}async function M(e){let n=await import("./bb-chunks/command-resolution-U7GVB5KQ.js");if(!n.hasHelpFlag(process.argv))return;let r=n.resolveInvocation(m,process.argv);if(r.unknownSubcommand===null)return;let t=`error: unknown command '${r.unknownSubcommand}'`;console.error(t),await P(new d(1,"commander.unknownCommand",t),e)}async function k(){let[{JSON_SHAPE_BY_COMMAND_PATH:e,jsonShapeHelp:n},r]=await Promise.all([import("./bb-chunks/json-shapes-TGDCNQZQ.js"),import("./bb-chunks/command-resolution-U7GVB5KQ.js")]);for(let t of Object.keys(e)){let o=r.resolveInvocation(m,["node","bb",...t.split(" ")]),a=n(t);a===null||o.path.join(" ")!==t||o.command.addHelpText("after",a)}}async function D(){let e=process.argv[2],n=v(e);if(n.length===0){await h(null);return}let[r,...t]=await Promise.all([import("./bb-chunks/context-env-6FWKR4UF.js"),...n.map(i=>i.load())]),o=A(r);m.addHelpText("after",()=>{let i=o.getContext(),c=i.projectId??"<unset>",l=i.threadId??"<unset>";return`
5
5
 
6
6
  Current context:
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __createRequire } from "node:module";import { dirname as __pathDirname } from "node:path";import { fileURLToPath as __fileURLToPath } from "node:url";const require = __createRequire(import.meta.url);const __filename = __fileURLToPath(import.meta.url);const __dirname = __pathDirname(__filename);
2
- function o(e,r,t){return{name:e,load:()=>r().then(t)}}var m=[o("browser",()=>import("./browser-YWW4LSQC.js"),e=>(r,t)=>e.registerBrowserCommands(r,t.getUrl)),o("status",()=>import("./status-V5WM5X7N.js"),e=>(r,t)=>e.registerStatusCommand(r,t.getUrl,t.getContext)),o("settings",()=>import("./settings-ZDANVHUG.js"),e=>(r,t)=>e.registerSettingsCommands(r,t.getUrl)),o("permissions",()=>import("./permissions-UXMMEOY7.js"),e=>(r,t)=>e.registerPermissionsCommands(r,t.getUrl)),o("schedule",()=>import("./schedule-CUTVMZ6I.js"),e=>(r,t)=>e.registerScheduleCommands(r,t.getUrl)),o("project",()=>import("./project-IPYG76GR.js"),e=>(r,t)=>e.registerProjectCommands(r,t.getUrl)),o("prompt-history",()=>import("./prompt-history-37FHCF4N.js"),e=>(r,t)=>e.registerPromptHistoryCommands(r,t.getUrl)),o("provider",()=>import("./provider-SVPSVN26.js"),e=>(r,t)=>e.registerProviderCommands(r,t.getUrl)),o("machine",()=>import("./machine-RNA5VRJ4.js"),e=>(r,t)=>e.registerMachineCommands(r,t.getUrl)),o("server",()=>import("./server-YTN2QPCV.js"),e=>(r,t)=>e.registerServerCommands(r,t.getUrl)),o("updates",()=>import("./updates-HHE6HZRW.js"),e=>(r,t)=>e.registerUpdatesCommands(r,t.getUrl)),o("terminal",()=>import("./terminal-NXRS5WZI.js"),e=>(r,t)=>e.registerTerminalCommands(r,t.getUrl)),o("thread",()=>import("./thread-ONWHRF2G.js"),e=>(r,t)=>e.registerThreadCommands(r,t.getUrl)),o("environment",()=>import("./environment-DKTU4W2U.js"),e=>(r,t)=>e.registerEnvironmentCommands(r,t.getUrl)),o("file",()=>import("./file-IAGKEA4Q.js"),e=>(r,t)=>e.registerFileCommands(r,t.getUrl)),o("theme",()=>import("./theme-KL6ESTKG.js"),e=>(r,t)=>e.registerThemeCommands(r,t.getUrl)),o("plugin",()=>import("./plugin-GSR7L7WW.js"),e=>(r,t)=>e.registerPluginCommands(r,t.getUrl)),o("marketplace",()=>import("./marketplace-A65SPNH3.js"),e=>(r,t)=>e.registerMarketplaceCommands(r,t.getUrl)),o("skill",()=>import("./skill-NI5AAJFF.js"),e=>(r,t)=>e.registerSkillCommands(r,t.getUrl,t.getContext)),o("guide",()=>import("./guide-2325FR7A.js"),e=>r=>e.registerGuideCommand(r)),o("diagnostics",()=>import("./diagnostics-WYPOAI5D.js"),e=>r=>e.registerDiagnosticsCommands(r)),o("voice",()=>import("./voice-BPMINO7T.js"),e=>(r,t)=>e.registerVoiceCommands(r,t.getUrl))];function n(e){if(e==="--version"||e==="-V")return[];let r=m.find(t=>t.name===e);return r===void 0?m:[r]}function i(e,r){return e===void 0||e.length===0||e.startsWith("-")||r.has(e)?null:e}export{m as a,n as b,i as c};
2
+ function o(e,r,t){return{name:e,load:()=>r().then(t)}}var m=[o("browser",()=>import("./browser-YWW4LSQC.js"),e=>(r,t)=>e.registerBrowserCommands(r,t.getUrl)),o("status",()=>import("./status-V5WM5X7N.js"),e=>(r,t)=>e.registerStatusCommand(r,t.getUrl,t.getContext)),o("settings",()=>import("./settings-ZDANVHUG.js"),e=>(r,t)=>e.registerSettingsCommands(r,t.getUrl)),o("permissions",()=>import("./permissions-UXMMEOY7.js"),e=>(r,t)=>e.registerPermissionsCommands(r,t.getUrl)),o("schedule",()=>import("./schedule-CUTVMZ6I.js"),e=>(r,t)=>e.registerScheduleCommands(r,t.getUrl)),o("project",()=>import("./project-IPYG76GR.js"),e=>(r,t)=>e.registerProjectCommands(r,t.getUrl)),o("prompt-history",()=>import("./prompt-history-37FHCF4N.js"),e=>(r,t)=>e.registerPromptHistoryCommands(r,t.getUrl)),o("provider",()=>import("./provider-SVPSVN26.js"),e=>(r,t)=>e.registerProviderCommands(r,t.getUrl)),o("machine",()=>import("./machine-RNA5VRJ4.js"),e=>(r,t)=>e.registerMachineCommands(r,t.getUrl)),o("server",()=>import("./server-YTN2QPCV.js"),e=>(r,t)=>e.registerServerCommands(r,t.getUrl)),o("updates",()=>import("./updates-HHE6HZRW.js"),e=>(r,t)=>e.registerUpdatesCommands(r,t.getUrl)),o("terminal",()=>import("./terminal-NXRS5WZI.js"),e=>(r,t)=>e.registerTerminalCommands(r,t.getUrl)),o("thread",()=>import("./thread-JFZZVBRM.js"),e=>(r,t)=>e.registerThreadCommands(r,t.getUrl)),o("environment",()=>import("./environment-DKTU4W2U.js"),e=>(r,t)=>e.registerEnvironmentCommands(r,t.getUrl)),o("file",()=>import("./file-IAGKEA4Q.js"),e=>(r,t)=>e.registerFileCommands(r,t.getUrl)),o("theme",()=>import("./theme-KL6ESTKG.js"),e=>(r,t)=>e.registerThemeCommands(r,t.getUrl)),o("plugin",()=>import("./plugin-2LVTGSOX.js"),e=>(r,t)=>e.registerPluginCommands(r,t.getUrl)),o("marketplace",()=>import("./marketplace-A65SPNH3.js"),e=>(r,t)=>e.registerMarketplaceCommands(r,t.getUrl)),o("skill",()=>import("./skill-NI5AAJFF.js"),e=>(r,t)=>e.registerSkillCommands(r,t.getUrl,t.getContext)),o("guide",()=>import("./guide-FEN2PCII.js"),e=>r=>e.registerGuideCommand(r)),o("diagnostics",()=>import("./diagnostics-WYPOAI5D.js"),e=>r=>e.registerDiagnosticsCommands(r)),o("voice",()=>import("./voice-BPMINO7T.js"),e=>(r,t)=>e.registerVoiceCommands(r,t.getUrl))];function n(e){if(e==="--version"||e==="-V")return[];let r=m.find(t=>t.name===e);return r===void 0?m:[r]}function i(e,r){return e===void 0||e.length===0||e.startsWith("-")||r.has(e)?null:e}export{m as a,n as b,i as c};
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __createRequire } from "node:module";import { dirname as __pathDirname } from "node:path";import { fileURLToPath as __fileURLToPath } from "node:url";const require = __createRequire(import.meta.url);const __filename = __fileURLToPath(import.meta.url);const __dirname = __pathDirname(__filename);
2
- import{a}from"./chunk-FLWGI25C.js";import{a as s,j as p}from"./chunk-JW4O2URB.js";import{b as d}from"./chunk-NCQMSH7M.js";import"./chunk-WWZ7D6EQ.js";import{H as u}from"./chunk-PJLXOC6S.js";import"./chunk-VLWNZSJS.js";import{a as c}from"./chunk-AIS4D5YM.js";import"./chunk-EGI3PDJP.js";import"./chunk-GQWB2BVL.js";import"./chunk-E7J2DJY7.js";import"./chunk-BNG7SSF7.js";import"./chunk-5PWLIQO6.js";function f(e){return e.registeredArguments.map(t=>{let o=`${t.name()}${t.variadic?"...":""}`;return t.required?`<${o}>`:`[${o}]`}).join(" ")}function g(e,t){return e.commands.flatMap(o=>{if(o.name()==="help")return[];let r=[...t,o.name()],i=g(o,r);return i.length>0?i:[{aliases:o.aliases(),arguments:f(o),description:o.description(),options:o.options.filter(n=>!n.hidden).map(n=>n.flags.replace(/^-\w, /u,"")),path:r.join(" ")}]})}async function C(e){let t=new d,o={getUrl:()=>"",getContext:()=>({serverUrl:""})};for(let n of a)(await n.load())(t,o);let r=g(t,[]);if(e===void 0)return r;let i=r.filter(n=>n.path===e||n.path.startsWith(`${e} `));if(i.length===0)throw new c({code:"invalid_value",hint:`Command groups: ${a.map(n=>n.name).join(", ")}`,message:`Unknown command group '${e}'.`});return i}function b(e,t){let r=[`bb ${[e.path,...e.aliases.map(n=>`|${n}`)].join("")}`,e.arguments].filter(n=>n.length>0).join(" "),i=t&&e.options.length>0?` ${e.options.map(n=>`[${n}]`).join(" ")}`:"";return`${r}${i}
2
+ import{a}from"./chunk-74TKKY2F.js";import{a as s,j as p}from"./chunk-JW4O2URB.js";import{b as d}from"./chunk-NCQMSH7M.js";import"./chunk-WWZ7D6EQ.js";import{H as u}from"./chunk-PJLXOC6S.js";import"./chunk-VLWNZSJS.js";import{a as c}from"./chunk-AIS4D5YM.js";import"./chunk-EGI3PDJP.js";import"./chunk-GQWB2BVL.js";import"./chunk-E7J2DJY7.js";import"./chunk-BNG7SSF7.js";import"./chunk-5PWLIQO6.js";function f(e){return e.registeredArguments.map(t=>{let o=`${t.name()}${t.variadic?"...":""}`;return t.required?`<${o}>`:`[${o}]`}).join(" ")}function g(e,t){return e.commands.flatMap(o=>{if(o.name()==="help")return[];let r=[...t,o.name()],i=g(o,r);return i.length>0?i:[{aliases:o.aliases(),arguments:f(o),description:o.description(),options:o.options.filter(n=>!n.hidden).map(n=>n.flags.replace(/^-\w, /u,"")),path:r.join(" ")}]})}async function C(e){let t=new d,o={getUrl:()=>"",getContext:()=>({serverUrl:""})};for(let n of a)(await n.load())(t,o);let r=g(t,[]);if(e===void 0)return r;let i=r.filter(n=>n.path===e||n.path.startsWith(`${e} `));if(i.length===0)throw new c({code:"invalid_value",hint:`Command groups: ${a.map(n=>n.name).join(", ")}`,message:`Unknown command group '${e}'.`});return i}function b(e,t){let r=[`bb ${[e.path,...e.aliases.map(n=>`|${n}`)].join("")}`,e.arguments].filter(n=>n.length>0).join(" "),i=t&&e.options.length>0?` ${e.options.map(n=>`[${n}]`).join(" ")}`:"";return`${r}${i}
3
3
  ${e.description}`}function j(e){e.command("guide [chapter] [group]").description("Show the Moonlet system overview and CLI guide; `bb guide commands [group]` lists every core command on one page").option("--json","Print machine-readable JSON output").action(p(async(t,o,r)=>{if(t==="commands"){let n=await C(o);if(s(r,{chapter:t,commands:n}))return;let m=n.map(l=>b(l,o!==void 0));console.log(m.join(`
4
4
  `)),o===void 0&&console.log("\nRun `bb guide commands <group>` (for example `bb guide commands thread`) to include every option. Commands contributed by plugins are listed by `bb plugin list`.");return}let i=u().render({chapter:t});if(t){if(s(r,i))return;console.log(i.content);return}s(r,{overview:i.content})||console.log(i.content)}))}export{C as buildCommandIndex,j as registerGuideCommand};
@@ -7,7 +7,7 @@ import{g as li}from"./chunk-GWLN6AGG.js";import{a as Lt,b as ai}from"./chunk-W3O
7
7
  `,n=this.i,o=oe;break;case P:return this.text+=i.slice(n),!1;default:}if(o===e)return this.text+=i.slice(n,this.prevI),!0}}captureNameChars(){let{chunk:e,i:n}=this;for(;;){let i=this.getCode();if(i===P)return this.name+=e.slice(n),P;if(!_o(i))return this.name+=e.slice(n,this.prevI),i===ae?oe:i}}skipSpaces(){for(;;){let e=this.getCodeNorm();if(e===P||!X(e))return e}}setXMLVersion(e){this.currentXMLVersion=e,e==="1.0"?(this.isChar=ml,this.getCode=this.getCode10):(this.isChar=fl,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=vl}sBeginWhitespace(){let e=this.i,n=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),n){case fe:if(this.state=An,this.text.length!==0)throw new Error("no-empty text at start");break;case P:break;default:this.unget(),this.state=V,this.xmlDeclPossible=!1}}sDoctype(){var e;let n=this.captureTo(Jl);switch(n){case j:{(e=this.doctypeHandler)===null||e===void 0||e.call(this,this.text),this.text="",this.state=V,this.doctype=!0;break}case P:break;default:this.text+=String.fromCodePoint(n),n===zo?this.state=Ie:At(n)&&(this.state=yl,this.q=n)}}sDoctypeQuote(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=gn)}sDTD(){let e=this.captureTo(Vl);e!==P&&(this.text+=String.fromCodePoint(e),e===Re?this.state=gn:e===fe?this.state=xl:At(e)&&(this.state=Il,this.q=e))}sDTDQuoted(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=Ie,this.q=null)}sDTDOpenWaka(){let e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case Ho:this.state=Rl,this.openWakaBang="";break;case G:this.state=Nl;break;default:this.state=Ie}}sDTDOpenWakaBang(){let e=String.fromCodePoint(this.getCodeNorm()),n=this.openWakaBang+=e;this.text+=e,n!=="-"&&(this.state=n==="--"?mn:Ie,this.openWakaBang="")}sDTDComment(){this.captureToChar(gt)&&(this.text+="-",this.state=Sl)}sDTDCommentEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=e===gt?Dl:mn}sDTDCommentEnded(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===j?this.state=Ie:(this.fail("malformed comment."),this.state=mn)}sDTDPI(){this.captureToChar(G)&&(this.text+="?",this.state=Bl)}sDTDPIEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===j&&(this.state=Ie)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:e}=this,{chunk:n}=this;e:for(;;)switch(this.getCode()){case ae:this.entity+=`${n.slice(e,this.prevI)}
8
8
  `,e=this.i;break;case ql:{let{entityReturnState:i}=this,o=this.entity+n.slice(e,this.prevI);this.state=i;let r;o===""?(this.fail("empty entity name."),r="&;"):(r=this.parseEntity(o),this.entity=""),(i!==V||this.textHandler!==void 0)&&(this.text+=r);break e}case P:this.entity+=n.slice(e);break e;default:}}sOpenWaka(){let e=this.getCode();if(je(e))this.state=jl,this.unget(),this.xmlDeclPossible=!1;else switch(e){case mt:this.state=Hl,this.xmlDeclPossible=!1;break;case Ho:this.state=Tl,this.openWakaBang="",this.xmlDeclPossible=!1;break;case G:this.state=Ol;break;default:this.fail("disallowed character in tag name"),this.state=V,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":!this.sawRoot&&!this.reportedTextBeforeRoot&&(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=hn,this.openWakaBang="";break;case"--":this.state=fn,this.openWakaBang="";break;case"DOCTYPE":this.state=gn,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(gt)&&(this.state=Pl)}sCommentEnding(){var e;let n=this.getCodeNorm();n===gt?(this.state=kl,(e=this.commentHandler)===null||e===void 0||e.call(this,this.text),this.text=""):(this.text+=`-${String.fromCodePoint(n)}`,this.state=fn)}sCommentEnded(){let e=this.getCodeNorm();e!==j?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(e)}`,this.state=fn):this.state=V}sCData(){this.captureToChar(Re)&&(this.state=Ql)}sCDataEnding(){let e=this.getCodeNorm();e===Re?this.state=_l:(this.text+=`]${String.fromCodePoint(e)}`,this.state=hn)}sCDataEnding2(){var e;let n=this.getCodeNorm();switch(n){case j:{(e=this.cdataHandler)===null||e===void 0||e.call(this,this.text),this.text="",this.state=V;break}case Re:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(n)}`,this.state=hn}}sPIFirstChar(){let e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=Lo):e===G||X(e)?(this.fail("processing instruction without a target."),this.state=e===G?pt:En):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(e),this.state=Lo)}sPIRest(){let{chunk:e,i:n}=this;for(;;){let i=this.getCodeNorm();if(i===P){this.piTarget+=e.slice(n);return}if(!this.nameCheck(i)){this.piTarget+=e.slice(n,this.prevI);let o=i===G;o||X(i)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=o?he:$o):this.state=o?pt:En:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(i));break}}}sPIBody(){if(this.text.length===0){let e=this.getCodeNorm();e===G?this.state=pt:X(e)||(this.text=String.fromCodePoint(e))}else this.captureToChar(G)&&(this.state=pt)}sPIEnding(){var e;let n=this.getCodeNorm();if(n===j){let{piTarget:i}=this;i.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),(e=this.piHandler)===null||e===void 0||e.call(this,{target:i,body:this.text}),this.piTarget=this.text="",this.state=V}else n===G?this.text+="?":(this.text+=`?${String.fromCodePoint(n)}`,this.state=En);this.xmlDeclPossible=!1}sXMLDeclNameStart(){let e=this.skipSpaces();if(e===G){this.state=he;return}e!==P&&(this.state=Ll,this.name=String.fromCodePoint(e))}sXMLDeclName(){let e=this.captureTo(Wl);if(e===G){this.state=he,this.name+=this.text,this.text="",this.fail("XML declaration is incomplete.");return}if(X(e)||e===xe){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=e===xe?Fo:$l}}sXMLDeclEq(){let e=this.getCodeNorm();if(e===G){this.state=he,this.fail("XML declaration is incomplete.");return}X(e)||(e!==xe&&this.fail("value required."),this.state=Fo)}sXMLDeclValueStart(){let e=this.getCodeNorm();if(e===G){this.state=he,this.fail("XML declaration is incomplete.");return}X(e)||(At(e)?this.q=e:(this.fail("value must be quoted."),this.q=Ko),this.state=Fl)}sXMLDeclValue(){let e=this.captureTo([this.q,G]);if(e===G){this.state=he,this.text="",this.fail("XML declaration is incomplete.");return}if(e===P)return;let n=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];let i=n;this.xmlDecl.version=i,/^1\.[0-9]+$/.test(i)?this.opt.forceXMLVersion||this.setXMLVersion(i):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(n)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=n;break;case"standalone":n!=="yes"&&n!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=n;break;default:}this.name="",this.state=Ml}sXMLDeclSeparator(){let e=this.getCodeNorm();if(e===G){this.state=he;return}X(e)||(this.fail("whitespace required."),this.unget()),this.state=$o}sXMLDeclEnding(){var e;this.getCodeNorm()===j?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),(e=this.xmldeclHandler)===null||e===void 0||e.call(this,this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=V):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){var e;let n=this.captureNameChars();if(n===P)return;let i=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=i.ns=Object.create(null)),(e=this.openTagStartHandler)===null||e===void 0||e.call(this,i),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),n){case j:this.openTag();break;case mt:this.state=bn;break;default:X(n)||this.fail("disallowed character in tag name."),this.state=Ue}}sOpenTagSlash(){this.getCode()===j?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=Ue)}sAttrib(){let e=this.skipSpaces();e!==P&&(je(e)?(this.unget(),this.state=Cn):e===j?this.openTag():e===mt?this.state=bn:this.fail("disallowed character in attribute name."))}sAttribName(){let e=this.captureNameChars();e===xe?this.state=Mo:X(e)?this.state=Ul:e===j?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):e!==P&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){let e=this.skipSpaces();switch(e){case P:return;case xe:this.state=Mo;break;default:this.fail("attribute without value."),this.text="",this.name="",e===j?this.openTag():je(e)?(this.unget(),this.state=Cn):(this.fail("disallowed character in attribute name."),this.state=Ue)}}sAttribValue(){let e=this.getCodeNorm();At(e)?(this.q=e,this.state=jo):X(e)||(this.fail("unquoted attribute value."),this.state=Uo,this.unget())}sAttribValueQuoted(){let{q:e,chunk:n}=this,{i}=this;for(;;)switch(this.getCode()){case e:this.pushAttrib(this.name,this.text+n.slice(i,this.prevI)),this.name=this.text="",this.q=null,this.state=Kl;return;case Ke:this.text+=n.slice(i,this.prevI),this.state=dt,this.entityReturnState=jo;return;case oe:case ae:case wn:this.text+=`${n.slice(i,this.prevI)} `,i=this.i;break;case fe:this.text+=n.slice(i,this.prevI),this.fail("disallowed character.");return;case P:this.text+=n.slice(i);return;default:}}sAttribValueClosed(){let e=this.getCodeNorm();X(e)?this.state=Ue:e===j?this.openTag():e===mt?this.state=bn:je(e)?(this.fail("no whitespace between attributes."),this.unget(),this.state=Cn):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){let e=this.captureTo(Yl);switch(e){case Ke:this.state=dt,this.entityReturnState=Uo;break;case fe:this.fail("disallowed character.");break;case P:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",e===j?this.openTag():this.state=Ue}}sCloseTag(){let e=this.captureNameChars();e===j?this.closeTag():X(e)?this.state=Gl:e!==P&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case j:this.closeTag();break;case P:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:e,forbiddenState:n}=this,{chunk:i,textHandler:o}=this;e:for(;;)switch(this.getCode()){case fe:{if(this.state=An,o!==void 0){let{text:r}=this,s=i.slice(e,this.prevI);r.length!==0?(o(r+s),this.text=""):s.length!==0&&o(s)}n=Ee;break e}case Ke:this.state=dt,this.entityReturnState=V,o!==void 0&&(this.text+=i.slice(e,this.prevI)),n=Ee;break e;case Re:switch(n){case Ee:n=Jo;break;case Jo:n=yn;break;case yn:break;default:throw new Error("impossible state")}break;case j:n===yn&&this.fail('the string "]]>" is disallowed in char data.'),n=Ee;break;case ae:o!==void 0&&(this.text+=`${i.slice(e,this.prevI)}
9
9
  `),e=this.i,n=Ee;break;case P:o!==void 0&&(this.text+=i.slice(e));break e;default:n=Ee}this.forbiddenState=n}handleTextOutsideRoot(){let{i:e}=this,{chunk:n,textHandler:i}=this,o=!1;e:for(;;){let r=this.getCode();switch(r){case fe:{if(this.state=An,i!==void 0){let{text:s}=this,a=n.slice(e,this.prevI);s.length!==0?(i(s+a),this.text=""):a.length!==0&&i(a)}break e}case Ke:this.state=dt,this.entityReturnState=V,i!==void 0&&(this.text+=n.slice(e,this.prevI)),o=!0;break e;case ae:i!==void 0&&(this.text+=`${n.slice(e,this.prevI)}
10
- `),e=this.i;break;case P:i!==void 0&&(this.text+=n.slice(e));break e;default:X(r)||(o=!0)}}o&&(!this.sawRoot&&!this.reportedTextBeforeRoot&&(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(e,n){var i;let{prefix:o,local:r}=this.qname(e),s={name:e,prefix:o,local:r,value:n};if(this.attribList.push(s),(i=this.attributeHandler)===null||i===void 0||i.call(this,s),o==="xmlns"){let a=n.trim();this.currentXMLVersion==="1.0"&&a===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[r]=a,In(this,r,a)}else if(e==="xmlns"){let a=n.trim();this.topNS[""]=a,In(this,"",a)}}pushAttribPlain(e,n){var i;let o={name:e,value:n};this.attribList.push(o),(i=this.attributeHandler)===null||i===void 0||i.call(this,o)}end(){var e,n;this.sawRoot||this.fail("document must contain a root element.");let{tags:i}=this;for(;i.length>0;){let r=i.pop();this.fail(`unclosed tag: ${r.name}`)}this.state!==Oo&&this.state!==V&&this.fail("unexpected end.");let{text:o}=this;return o.length!==0&&((e=this.textHandler)===null||e===void 0||e.call(this,o),this.text=""),this._closed=!0,(n=this.endHandler)===null||n===void 0||n.call(this),this._init(),this}resolve(e){var n,i;let o=this.topNS[e];if(o!==void 0)return o;let{tags:r}=this;for(let s=r.length-1;s>=0;s--)if(o=r[s].ns[e],o!==void 0)return o;return o=this.ns[e],o!==void 0?o:(i=(n=this.opt).resolvePrefix)===null||i===void 0?void 0:i.call(n,e)}qname(e){let n=e.indexOf(":");if(n===-1)return{prefix:"",local:e};let i=e.slice(n+1),o=e.slice(0,n);return(o===""||i===""||i.includes(":"))&&this.fail(`malformed name: ${e}.`),{prefix:o,local:i}}processAttribsNS(){var e;let{attribList:n}=this,i=this.tag;{let{prefix:s,local:a}=this.qname(i.name);i.prefix=s,i.local=a;let l=i.uri=(e=this.resolve(s))!==null&&e!==void 0?e:"";s!==""&&(s==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),l===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(s)}.`),i.uri=s))}if(n.length===0)return;let{attributes:o}=i,r=new Set;for(let s of n){let{name:a,prefix:l,local:c}=s,d,u;l===""?(d=a==="xmlns"?Se:"",u=a):(d=this.resolve(l),d===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(l)}.`),d=l),u=`{${d}}${c}`),r.has(u)&&this.fail(`duplicate attribute: ${u}.`),r.add(u),s.uri=d,o[a]=s}this.attribList=[]}processAttribsPlain(){let{attribList:e}=this,n=this.tag.attributes;for(let{name:i,value:o}of e)n[i]!==void 0&&this.fail(`duplicate attribute: ${i}.`),n[i]=o;this.attribList=[]}openTag(){var e;this.processAttribs();let{tags:n}=this,i=this.tag;i.isSelfClosing=!1,(e=this.openTagHandler)===null||e===void 0||e.call(this,i),n.push(i),this.state=V,this.name=""}openSelfClosingTag(){var e,n,i;this.processAttribs();let{tags:o}=this,r=this.tag;r.isSelfClosing=!0,(e=this.openTagHandler)===null||e===void 0||e.call(this,r),(n=this.closeTagHandler)===null||n===void 0||n.call(this,r),(this.tag=(i=o[o.length-1])!==null&&i!==void 0?i:null)===null&&(this.closedRoot=!0),this.state=V,this.name=""}closeTag(){let{tags:e,name:n}=this;if(this.state=V,this.name="",n===""){this.fail("weird empty close tag."),this.text+="</>";return}let i=this.closeTagHandler,o=e.length;for(;o-- >0;){let r=this.tag=e.pop();if(this.topNS=r.ns,i?.(r),r.name===n)break;this.fail("unexpected close tag.")}o===0?this.closedRoot=!0:o<0&&(this.fail(`unmatched closing tag: ${n}.`),this.text+=`</${n}>`)}parseEntity(e){if(e[0]!=="#"){let i=this.ENTITIES[e];return i!==void 0?i:(this.fail(this.isName(e)?"undefined entity.":"disallowed character in entity name."),`&${e};`)}let n=NaN;return e[1]==="x"&&/^#x[0-9a-f]+$/i.test(e)?n=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(n=parseInt(e.slice(1),10)),this.isChar(n)?String.fromCodePoint(n):(this.fail("malformed character entity."),`&${e};`)}};De.SaxesParser=xn});import{watch as qu}from"node:fs";import{homedir as Wr}from"node:os";import{access as is,readFile as Pt,realpath as Ju}from"node:fs/promises";import{dirname as Vu,join as Qe,relative as Wu,resolve as ge}from"node:path";import{createInterface as Yu}from"node:readline/promises";import{setTimeout as Xu}from"node:timers/promises";function Le(t){return t.startsWith("./")}var ci=/^[a-z0-9][a-z0-9-]*$/u,$t=48,Ft=32*1024,Mt=64,cs=/^[a-z0-9-]+\/[a-z0-9][a-z0-9-]*$/u;function ui(t){return cs.test(t)}var F=A.string().trim().min(1),us=A.record(A.string().max($t,`icon names are at most ${$t} characters`).regex(ci,'icon names use lowercase letters, digits and "-", starting with a letter or digit'),F.refine(t=>Le(t)&&t.toLowerCase().endsWith(".svg"),{message:'icon paths are plugin-relative .svg files starting with "./" (for example "./icons/receipt.svg")'})).refine(t=>Object.keys(t).length<=Mt,{message:`a plugin declares at most ${Mt} icons`}),ds=A.object({icon:F.optional(),logo:A.object({light:F,dark:F.optional()}).strict().optional(),experimental_icons:us.optional()}).strict().superRefine((t,e)=>{t.icon!==void 0&&Le(t.icon)&&!t.icon.toLowerCase().endsWith(".svg")&&e.addIssue({code:"custom",path:["icon"],message:'plugin-owned branding.icon paths must point at an .svg file (for example "./assets/icon.svg")'}),t.icon!==void 0&&ui(t.icon)&&e.addIssue({code:"custom",path:["icon"],message:`"${t.icon}" is a namespaced glyph ("<pluginId>/<name>"), which names a declared icon from a tool presentation or a provider declaration; branding.icon is the plugin's own mark, so name a host glyph ("Zap") or the SVG file itself ("./icons/logo.svg")`})}).refine(t=>t.icon!==void 0||t.logo!==void 0,{message:"must declare at least branding.icon or branding.logo.light"}),ps=A.object({name:F,description:F,branding:ds,experimental_providers:A.array(A.object({kind:A.enum(["agent"]),id:F,displayName:F}).strict()).optional(),server:F,app:F.optional(),host:F.optional(),skills:A.array(F).optional(),themes:A.array(A.object({id:A.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/).max(64),name:F,description:F.optional(),css:F,codeTheme:ni.optional()}).strict()).optional()}).strict(),di=A.object({name:F,version:F,engines:A.object({bb:F.optional(),bbPluginSdk:F.optional()}).optional(),bb:ps}).passthrough();var T="0.6.81",pi=Number(T.split(".",1)[0]);var et=["browser","diagnostics","environment","file","guide","help","machine","marketplace","permissions","plugin","project","prompt-history","provider","schedule","server","settings","skill","status","terminal","theme","thread","updates","voice"];function gi(t,e){return et.includes(e)?`bb plugin run ${t}`:`bb ${e}`}function mi(t,e){if(t.installedByDefault)return{kind:"builtin"};let{installs:n}=t;if(n!==null&&n>=25)return{kind:"count",installs:n};let i=t.publishedAt===void 0?NaN:Date.parse(t.publishedAt);return e-i<2592e6?{kind:"new"}:n===null?null:{kind:"count",installs:n}}var po=kt(me(),1),go=kt(to(),1);import{randomBytes as Ra}from"node:crypto";import{lstat as ro,mkdir as tn,readdir as so,readFile as ve,realpath as lt,rename as Sa,rm as ao,rmdir as Da,writeFile as ie}from"node:fs/promises";import{dirname as lo,isAbsolute as co,join as N,relative as uo}from"node:path";var no=[{target:"components/ui/button.tsx",content:`import * as React from "react";
10
+ `),e=this.i;break;case P:i!==void 0&&(this.text+=n.slice(e));break e;default:X(r)||(o=!0)}}o&&(!this.sawRoot&&!this.reportedTextBeforeRoot&&(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(e,n){var i;let{prefix:o,local:r}=this.qname(e),s={name:e,prefix:o,local:r,value:n};if(this.attribList.push(s),(i=this.attributeHandler)===null||i===void 0||i.call(this,s),o==="xmlns"){let a=n.trim();this.currentXMLVersion==="1.0"&&a===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[r]=a,In(this,r,a)}else if(e==="xmlns"){let a=n.trim();this.topNS[""]=a,In(this,"",a)}}pushAttribPlain(e,n){var i;let o={name:e,value:n};this.attribList.push(o),(i=this.attributeHandler)===null||i===void 0||i.call(this,o)}end(){var e,n;this.sawRoot||this.fail("document must contain a root element.");let{tags:i}=this;for(;i.length>0;){let r=i.pop();this.fail(`unclosed tag: ${r.name}`)}this.state!==Oo&&this.state!==V&&this.fail("unexpected end.");let{text:o}=this;return o.length!==0&&((e=this.textHandler)===null||e===void 0||e.call(this,o),this.text=""),this._closed=!0,(n=this.endHandler)===null||n===void 0||n.call(this),this._init(),this}resolve(e){var n,i;let o=this.topNS[e];if(o!==void 0)return o;let{tags:r}=this;for(let s=r.length-1;s>=0;s--)if(o=r[s].ns[e],o!==void 0)return o;return o=this.ns[e],o!==void 0?o:(i=(n=this.opt).resolvePrefix)===null||i===void 0?void 0:i.call(n,e)}qname(e){let n=e.indexOf(":");if(n===-1)return{prefix:"",local:e};let i=e.slice(n+1),o=e.slice(0,n);return(o===""||i===""||i.includes(":"))&&this.fail(`malformed name: ${e}.`),{prefix:o,local:i}}processAttribsNS(){var e;let{attribList:n}=this,i=this.tag;{let{prefix:s,local:a}=this.qname(i.name);i.prefix=s,i.local=a;let l=i.uri=(e=this.resolve(s))!==null&&e!==void 0?e:"";s!==""&&(s==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),l===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(s)}.`),i.uri=s))}if(n.length===0)return;let{attributes:o}=i,r=new Set;for(let s of n){let{name:a,prefix:l,local:c}=s,d,u;l===""?(d=a==="xmlns"?Se:"",u=a):(d=this.resolve(l),d===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(l)}.`),d=l),u=`{${d}}${c}`),r.has(u)&&this.fail(`duplicate attribute: ${u}.`),r.add(u),s.uri=d,o[a]=s}this.attribList=[]}processAttribsPlain(){let{attribList:e}=this,n=this.tag.attributes;for(let{name:i,value:o}of e)n[i]!==void 0&&this.fail(`duplicate attribute: ${i}.`),n[i]=o;this.attribList=[]}openTag(){var e;this.processAttribs();let{tags:n}=this,i=this.tag;i.isSelfClosing=!1,(e=this.openTagHandler)===null||e===void 0||e.call(this,i),n.push(i),this.state=V,this.name=""}openSelfClosingTag(){var e,n,i;this.processAttribs();let{tags:o}=this,r=this.tag;r.isSelfClosing=!0,(e=this.openTagHandler)===null||e===void 0||e.call(this,r),(n=this.closeTagHandler)===null||n===void 0||n.call(this,r),(this.tag=(i=o[o.length-1])!==null&&i!==void 0?i:null)===null&&(this.closedRoot=!0),this.state=V,this.name=""}closeTag(){let{tags:e,name:n}=this;if(this.state=V,this.name="",n===""){this.fail("weird empty close tag."),this.text+="</>";return}let i=this.closeTagHandler,o=e.length;for(;o-- >0;){let r=this.tag=e.pop();if(this.topNS=r.ns,i?.(r),r.name===n)break;this.fail("unexpected close tag.")}o===0?this.closedRoot=!0:o<0&&(this.fail(`unmatched closing tag: ${n}.`),this.text+=`</${n}>`)}parseEntity(e){if(e[0]!=="#"){let i=this.ENTITIES[e];return i!==void 0?i:(this.fail(this.isName(e)?"undefined entity.":"disallowed character in entity name."),`&${e};`)}let n=NaN;return e[1]==="x"&&/^#x[0-9a-f]+$/i.test(e)?n=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(n=parseInt(e.slice(1),10)),this.isChar(n)?String.fromCodePoint(n):(this.fail("malformed character entity."),`&${e};`)}};De.SaxesParser=xn});import{watch as qu}from"node:fs";import{homedir as Wr}from"node:os";import{access as is,readFile as Pt,realpath as Ju}from"node:fs/promises";import{dirname as Vu,join as Qe,relative as Wu,resolve as ge}from"node:path";import{createInterface as Yu}from"node:readline/promises";import{setTimeout as Xu}from"node:timers/promises";function Le(t){return t.startsWith("./")}var ci=/^[a-z0-9][a-z0-9-]*$/u,$t=48,Ft=32*1024,Mt=64,cs=/^[a-z0-9-]+\/[a-z0-9][a-z0-9-]*$/u;function ui(t){return cs.test(t)}var F=A.string().trim().min(1),us=A.record(A.string().max($t,`icon names are at most ${$t} characters`).regex(ci,'icon names use lowercase letters, digits and "-", starting with a letter or digit'),F.refine(t=>Le(t)&&t.toLowerCase().endsWith(".svg"),{message:'icon paths are plugin-relative .svg files starting with "./" (for example "./icons/receipt.svg")'})).refine(t=>Object.keys(t).length<=Mt,{message:`a plugin declares at most ${Mt} icons`}),ds=A.object({icon:F.optional(),logo:A.object({light:F,dark:F.optional()}).strict().optional(),experimental_icons:us.optional()}).strict().superRefine((t,e)=>{t.icon!==void 0&&Le(t.icon)&&!t.icon.toLowerCase().endsWith(".svg")&&e.addIssue({code:"custom",path:["icon"],message:'plugin-owned branding.icon paths must point at an .svg file (for example "./assets/icon.svg")'}),t.icon!==void 0&&ui(t.icon)&&e.addIssue({code:"custom",path:["icon"],message:`"${t.icon}" is a namespaced glyph ("<pluginId>/<name>"), which names a declared icon from a tool presentation or a provider declaration; branding.icon is the plugin's own mark, so name a host glyph ("Zap") or the SVG file itself ("./icons/logo.svg")`})}).refine(t=>t.icon!==void 0||t.logo!==void 0,{message:"must declare at least branding.icon or branding.logo.light"}),ps=A.object({name:F,description:F,branding:ds,experimental_providers:A.array(A.object({kind:A.enum(["agent"]),id:F,displayName:F}).strict()).optional(),server:F,app:F.optional(),host:F.optional(),skills:A.array(F).optional(),themes:A.array(A.object({id:A.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/).max(64),name:F,description:F.optional(),css:F,codeTheme:ni.optional()}).strict()).optional()}).strict(),di=A.object({name:F,version:F,engines:A.object({bb:F.optional(),bbPluginSdk:F.optional()}).optional(),bb:ps}).passthrough();var T="0.6.82",pi=Number(T.split(".",1)[0]);var et=["browser","diagnostics","environment","file","guide","help","machine","marketplace","permissions","plugin","project","prompt-history","provider","schedule","server","settings","skill","status","terminal","theme","thread","updates","voice"];function gi(t,e){return et.includes(e)?`bb plugin run ${t}`:`bb ${e}`}function mi(t,e){if(t.installedByDefault)return{kind:"builtin"};let{installs:n}=t;if(n!==null&&n>=25)return{kind:"count",installs:n};let i=t.publishedAt===void 0?NaN:Date.parse(t.publishedAt);return e-i<2592e6?{kind:"new"}:n===null?null:{kind:"count",installs:n}}var po=kt(me(),1),go=kt(to(),1);import{randomBytes as Ra}from"node:crypto";import{lstat as ro,mkdir as tn,readdir as so,readFile as ve,realpath as lt,rename as Sa,rm as ao,rmdir as Da,writeFile as ie}from"node:fs/promises";import{dirname as lo,isAbsolute as co,join as N,relative as uo}from"node:path";var no=[{target:"components/ui/button.tsx",content:`import * as React from "react";
11
11
  import { Slot } from "@radix-ui/react-slot";
12
12
  import { cva, type VariantProps } from "class-variance-authority";
13
13