opendevbrowser 0.0.19 → 0.0.21

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 (173) hide show
  1. package/README.md +32 -24
  2. package/dist/automation/coordinator.d.ts +61 -2
  3. package/dist/automation/coordinator.d.ts.map +1 -1
  4. package/dist/browser/browser-manager.d.ts +6 -1
  5. package/dist/browser/browser-manager.d.ts.map +1 -1
  6. package/dist/browser/canvas-manager.d.ts +4 -0
  7. package/dist/browser/canvas-manager.d.ts.map +1 -1
  8. package/dist/browser/manager-types.d.ts +6 -1
  9. package/dist/browser/manager-types.d.ts.map +1 -1
  10. package/dist/browser/ops-browser-manager.d.ts +6 -1
  11. package/dist/browser/ops-browser-manager.d.ts.map +1 -1
  12. package/dist/browser/screencast-recorder.d.ts.map +1 -1
  13. package/dist/browser/session-inspector.d.ts +39 -0
  14. package/dist/browser/session-inspector.d.ts.map +1 -1
  15. package/dist/canvas/document-store.d.ts +14 -5
  16. package/dist/canvas/document-store.d.ts.map +1 -1
  17. package/dist/canvas/starters/catalog.d.ts.map +1 -1
  18. package/dist/canvas/types.d.ts +120 -9
  19. package/dist/canvas/types.d.ts.map +1 -1
  20. package/dist/challenges/action-loop.d.ts +2 -1
  21. package/dist/challenges/action-loop.d.ts.map +1 -1
  22. package/dist/challenges/capture.d.ts +14 -0
  23. package/dist/challenges/capture.d.ts.map +1 -0
  24. package/dist/challenges/index.d.ts +3 -1
  25. package/dist/challenges/index.d.ts.map +1 -1
  26. package/dist/challenges/inspect-plan.d.ts +40 -0
  27. package/dist/challenges/inspect-plan.d.ts.map +1 -0
  28. package/dist/challenges/orchestrator.d.ts.map +1 -1
  29. package/dist/challenges/types.d.ts +34 -0
  30. package/dist/challenges/types.d.ts.map +1 -1
  31. package/dist/{chunk-YBQECXZX.js → chunk-3VA6XR25.js} +3 -3
  32. package/dist/chunk-3VA6XR25.js.map +1 -0
  33. package/dist/{chunk-W4IHGDXV.js → chunk-4KVXCXV3.js} +25778 -24279
  34. package/dist/chunk-4KVXCXV3.js.map +1 -0
  35. package/dist/{chunk-5FZQJRBQ.js → chunk-ZE2E7ZGH.js} +3013 -1010
  36. package/dist/chunk-ZE2E7ZGH.js.map +1 -0
  37. package/dist/cli/commands/challenge-automation-mode.d.ts +3 -0
  38. package/dist/cli/commands/challenge-automation-mode.d.ts.map +1 -0
  39. package/dist/cli/commands/inspiredesign.d.ts +25 -0
  40. package/dist/cli/commands/inspiredesign.d.ts.map +1 -0
  41. package/dist/cli/commands/macro-resolve.d.ts.map +1 -1
  42. package/dist/cli/commands/nav/review-desktop.d.ts +7 -0
  43. package/dist/cli/commands/nav/review-desktop.d.ts.map +1 -0
  44. package/dist/cli/commands/nav/review-shared.d.ts +10 -0
  45. package/dist/cli/commands/nav/review-shared.d.ts.map +1 -0
  46. package/dist/cli/commands/nav/review.d.ts.map +1 -1
  47. package/dist/cli/commands/serve.d.ts.map +1 -1
  48. package/dist/cli/commands/session/inspector-audit.d.ts +7 -0
  49. package/dist/cli/commands/session/inspector-audit.d.ts.map +1 -0
  50. package/dist/cli/commands/session/inspector-plan.d.ts +7 -0
  51. package/dist/cli/commands/session/inspector-plan.d.ts.map +1 -0
  52. package/dist/cli/commands/session/inspector-shared.d.ts +11 -0
  53. package/dist/cli/commands/session/inspector-shared.d.ts.map +1 -0
  54. package/dist/cli/commands/session/inspector.d.ts +1 -11
  55. package/dist/cli/commands/session/inspector.d.ts.map +1 -1
  56. package/dist/cli/commands/status-capabilities.d.ts +7 -0
  57. package/dist/cli/commands/status-capabilities.d.ts.map +1 -0
  58. package/dist/cli/daemon-client.d.ts.map +1 -1
  59. package/dist/cli/daemon-commands.d.ts.map +1 -1
  60. package/dist/cli/daemon-status.d.ts +5 -0
  61. package/dist/cli/daemon-status.d.ts.map +1 -1
  62. package/dist/cli/daemon.d.ts +5 -0
  63. package/dist/cli/daemon.d.ts.map +1 -1
  64. package/dist/cli/help.d.ts +2 -0
  65. package/dist/cli/help.d.ts.map +1 -1
  66. package/dist/cli/index.js +660 -244
  67. package/dist/cli/index.js.map +1 -1
  68. package/dist/cli/remote-manager.d.ts +6 -0
  69. package/dist/cli/remote-manager.d.ts.map +1 -1
  70. package/dist/cli/utils/parse.d.ts +1 -0
  71. package/dist/cli/utils/parse.d.ts.map +1 -1
  72. package/dist/cli/utils/skills.d.ts +1 -1
  73. package/dist/cli/utils/skills.d.ts.map +1 -1
  74. package/dist/cli/utils/workflow-message.d.ts +3 -0
  75. package/dist/cli/utils/workflow-message.d.ts.map +1 -1
  76. package/dist/config.d.ts +1 -0
  77. package/dist/config.d.ts.map +1 -1
  78. package/dist/core/bootstrap.d.ts.map +1 -1
  79. package/dist/core/runtime-assemblies.d.ts +2 -1
  80. package/dist/core/runtime-assemblies.d.ts.map +1 -1
  81. package/dist/core/types.d.ts +1 -1
  82. package/dist/core/types.d.ts.map +1 -1
  83. package/dist/desktop/runtime.d.ts +1 -0
  84. package/dist/desktop/runtime.d.ts.map +1 -1
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.js +729 -448
  87. package/dist/index.js.map +1 -1
  88. package/dist/inspiredesign/handoff.d.ts +34 -0
  89. package/dist/inspiredesign/handoff.d.ts.map +1 -0
  90. package/dist/opendevbrowser.d.ts.map +1 -1
  91. package/dist/opendevbrowser.js +729 -448
  92. package/dist/opendevbrowser.js.map +1 -1
  93. package/dist/providers/browser-fallback.d.ts.map +1 -1
  94. package/dist/providers/constraint.d.ts +11 -0
  95. package/dist/providers/constraint.d.ts.map +1 -1
  96. package/dist/providers/cookie-source.d.ts +8 -0
  97. package/dist/providers/cookie-source.d.ts.map +1 -0
  98. package/dist/providers/index.d.ts.map +1 -1
  99. package/dist/providers/inspiredesign-capture.d.ts +17 -0
  100. package/dist/providers/inspiredesign-capture.d.ts.map +1 -0
  101. package/dist/providers/inspiredesign-contract.d.ts +110 -0
  102. package/dist/providers/inspiredesign-contract.d.ts.map +1 -0
  103. package/dist/providers/renderer.d.ts +23 -0
  104. package/dist/providers/renderer.d.ts.map +1 -1
  105. package/dist/providers/runtime-bundle.d.ts +2 -1
  106. package/dist/providers/runtime-bundle.d.ts.map +1 -1
  107. package/dist/providers/runtime-factory.d.ts +4 -2
  108. package/dist/providers/runtime-factory.d.ts.map +1 -1
  109. package/dist/providers/shopping/index.d.ts +1 -1
  110. package/dist/providers/types.d.ts +3 -2
  111. package/dist/providers/types.d.ts.map +1 -1
  112. package/dist/providers/workflow-contracts.d.ts +1 -1
  113. package/dist/providers/workflow-contracts.d.ts.map +1 -1
  114. package/dist/providers/workflow-handoff.d.ts +14 -0
  115. package/dist/providers/workflow-handoff.d.ts.map +1 -0
  116. package/dist/providers/workflows.d.ts +21 -2
  117. package/dist/providers/workflows.d.ts.map +1 -1
  118. package/dist/{providers-G36AM3Z2.js → providers-ZIVHHH4F.js} +6 -2
  119. package/dist/public-surface/generated-manifest.d.ts +143 -7
  120. package/dist/public-surface/generated-manifest.d.ts.map +1 -1
  121. package/dist/public-surface/source.d.ts +102 -3
  122. package/dist/public-surface/source.d.ts.map +1 -1
  123. package/dist/relay/protocol.d.ts +1 -1
  124. package/dist/relay/protocol.d.ts.map +1 -1
  125. package/dist/relay/relay-server.d.ts +1 -0
  126. package/dist/relay/relay-server.d.ts.map +1 -1
  127. package/dist/skills/skill-loader.js +1 -1
  128. package/dist/tools/automation-shared.d.ts +6 -0
  129. package/dist/tools/automation-shared.d.ts.map +1 -0
  130. package/dist/tools/index.d.ts.map +1 -1
  131. package/dist/tools/inspiredesign_run.d.ts +4 -0
  132. package/dist/tools/inspiredesign_run.d.ts.map +1 -0
  133. package/dist/tools/review_desktop.d.ts +4 -0
  134. package/dist/tools/review_desktop.d.ts.map +1 -0
  135. package/dist/tools/session_inspector.d.ts.map +1 -1
  136. package/dist/tools/session_inspector_audit.d.ts +4 -0
  137. package/dist/tools/session_inspector_audit.d.ts.map +1 -0
  138. package/dist/tools/session_inspector_plan.d.ts +4 -0
  139. package/dist/tools/session_inspector_plan.d.ts.map +1 -0
  140. package/dist/tools/status_capabilities.d.ts +4 -0
  141. package/dist/tools/status_capabilities.d.ts.map +1 -0
  142. package/extension/dist/background.js +70 -10
  143. package/extension/dist/canvas/canvas-runtime.js +14 -1
  144. package/extension/dist/ops/ops-runtime.js +18 -1
  145. package/extension/dist/popup.js +29 -16
  146. package/extension/dist/services/ConnectionManager.js +27 -2
  147. package/extension/manifest.json +1 -1
  148. package/extension/popup.html +11 -0
  149. package/package.json +5 -5
  150. package/skills/AGENTS.md +2 -2
  151. package/skills/opendevbrowser-best-practices/SKILL.md +50 -15
  152. package/skills/opendevbrowser-best-practices/artifacts/canvas-governance-playbook.md +31 -12
  153. package/skills/opendevbrowser-best-practices/artifacts/command-channel-reference.md +64 -15
  154. package/skills/opendevbrowser-best-practices/artifacts/provider-workflows.md +4 -0
  155. package/skills/opendevbrowser-best-practices/artifacts/skill-runtime-surface-matrix.md +11 -10
  156. package/skills/opendevbrowser-best-practices/assets/templates/canvas-blocker-checklist.json +28 -22
  157. package/skills/opendevbrowser-best-practices/assets/templates/canvas-generation-plan.v1.json +18 -17
  158. package/skills/opendevbrowser-best-practices/assets/templates/canvas-handshake-example.json +135 -17
  159. package/skills/opendevbrowser-best-practices/assets/templates/skill-runtime-pack-matrix.json +55 -8
  160. package/skills/opendevbrowser-best-practices/assets/templates/surface-audit-checklist.json +18 -4
  161. package/skills/opendevbrowser-best-practices/scripts/odb-workflow.sh +16 -4
  162. package/skills/opendevbrowser-best-practices/scripts/run-robustness-audit.sh +3 -1
  163. package/skills/opendevbrowser-best-practices/scripts/validate-skill-assets.sh +68 -25
  164. package/skills/opendevbrowser-design-agent/SKILL.md +9 -4
  165. package/skills/opendevbrowser-design-agent/artifacts/design-workflows.md +15 -6
  166. package/skills/opendevbrowser-design-agent/assets/templates/canvas-generation-plan.design.v1.json +18 -17
  167. package/skills/opendevbrowser-design-agent/scripts/design-workflow.sh +11 -0
  168. package/skills/opendevbrowser-design-agent/scripts/validate-skill-assets.sh +57 -0
  169. package/skills/opendevbrowser-product-presentation-asset/SKILL.md +2 -2
  170. package/dist/chunk-5FZQJRBQ.js.map +0 -1
  171. package/dist/chunk-W4IHGDXV.js.map +0 -1
  172. package/dist/chunk-YBQECXZX.js.map +0 -1
  173. /package/dist/{providers-G36AM3Z2.js.map → providers-ZIVHHH4F.js.map} +0 -0
@@ -4,7 +4,9 @@ import {
4
4
  ScriptRunner,
5
5
  buildAnnotateResult,
6
6
  buildBrowserReviewResult,
7
+ buildCorrelatedAuditBundle,
7
8
  buildLoopbackSessionRelayEndpoint,
9
+ captureInspiredesignReferenceFromManager,
8
10
  classifySessionRelayEndpoint,
9
11
  createAutomationCoordinator,
10
12
  createCoreRuntimeAssemblies,
@@ -12,21 +14,24 @@ import {
12
14
  executeMacroWithRuntime,
13
15
  extractExtension,
14
16
  fetchDaemonStatusFromMetadata,
17
+ getCurrentDaemonFingerprint,
15
18
  inspectSession,
16
19
  onboarding_metadata_default,
20
+ readDaemonMetadata,
21
+ requireChallengeOrchestrationConfig,
17
22
  resolveBundledProviderRuntime,
18
23
  resolveSessionRelayRoute,
19
24
  startDaemon
20
- } from "./chunk-W4IHGDXV.js";
21
- import "./chunk-YBQECXZX.js";
22
- import "./chunk-Y2KL55OG.js";
25
+ } from "./chunk-4KVXCXV3.js";
26
+ import "./chunk-3VA6XR25.js";
23
27
  import "./chunk-TBUCZX4A.js";
28
+ import "./chunk-Y2KL55OG.js";
24
29
  import {
25
30
  CHALLENGE_AUTOMATION_MODES,
26
31
  buildBlockerArtifacts,
27
32
  classifyBlockerSignal,
28
33
  createRequestId
29
- } from "./chunk-5FZQJRBQ.js";
34
+ } from "./chunk-ZE2E7ZGH.js";
30
35
  import "./chunk-FUSXMW3G.js";
31
36
 
32
37
  // src/cli/remote-manager.ts
@@ -301,6 +306,13 @@ var RemoteManager = class {
301
306
  ...options
302
307
  });
303
308
  }
309
+ inspectChallengePlan(input) {
310
+ return this.client.call("session.inspectPlan", {
311
+ sessionId: input.sessionId,
312
+ ...typeof input.targetId === "string" ? { targetId: input.targetId } : {},
313
+ ...typeof input.runMode === "string" ? { challengeAutomationMode: input.runMode } : {}
314
+ });
315
+ }
304
316
  createSessionInspector() {
305
317
  return {
306
318
  status: (sessionId) => this.status(sessionId),
@@ -494,7 +506,7 @@ var RemoteRelay = class {
494
506
 
495
507
  // src/skills/skill-nudge.ts
496
508
  var SKILL_NUDGE_MARKER = "[opendevbrowser:skill-nudge]";
497
- var SKILL_NUDGE_MESSAGE = `${SKILL_NUDGE_MARKER} If this task likely matches a skill, start with skill("${onboarding_metadata_default.skillName}", "${onboarding_metadata_default.skillTopic}"). For frontend, UI, screenshot-to-code, or /canvas design work, then load skill("${onboarding_metadata_default.designSkillName}"). Use the canonical opendevbrowser-* packs and start with the bundled quick-start lane before low-level browser commands.`;
509
+ var SKILL_NUDGE_MESSAGE = `${SKILL_NUDGE_MARKER} If this task likely matches a skill, start with skill("${onboarding_metadata_default.skillName}", "${onboarding_metadata_default.skillTopic}"). For frontend, UI, screenshot-to-code, or /canvas design work, then load skill("${onboarding_metadata_default.designSkillName}", "${onboarding_metadata_default.designSkillTopic}"). Use the canonical opendevbrowser-* packs and start with the bundled quick-start lane before low-level browser commands.`;
498
510
  function createSkillNudgeState() {
499
511
  return { pending: false, requestedAtMs: null };
500
512
  }
@@ -1089,26 +1101,71 @@ function createStatusTool(deps) {
1089
1101
  });
1090
1102
  }
1091
1103
 
1092
- // src/tools/session_inspector.ts
1104
+ // src/tools/status_capabilities.ts
1093
1105
  import { tool as tool5 } from "@opencode-ai/plugin";
1106
+
1107
+ // src/tools/automation-shared.ts
1108
+ function requireAutomationCoordinator(deps) {
1109
+ return deps.automationCoordinator ?? failure("Automation coordinator unavailable.", "automation_coordinator_unavailable");
1110
+ }
1111
+ function requireSessionInspectorHandle(deps) {
1112
+ const inspector = deps.manager.createSessionInspector?.();
1113
+ return inspector ?? failure(
1114
+ "Session inspector is unavailable for the current runtime.",
1115
+ "session_inspector_unavailable"
1116
+ );
1117
+ }
1118
+
1119
+ // src/tools/status_capabilities.ts
1094
1120
  var z5 = tool5.schema;
1095
- function createSessionInspectorTool(deps) {
1121
+ var challengeAutomationModeSchema = z5.enum(CHALLENGE_AUTOMATION_MODES);
1122
+ function createStatusCapabilitiesTool(deps) {
1096
1123
  return tool5({
1124
+ description: "Inspect runtime capability discovery for the host and an optional session.",
1125
+ args: {
1126
+ sessionId: z5.string().optional().describe("Optional session id"),
1127
+ targetId: z5.string().optional().describe("Optional target id"),
1128
+ challengeAutomationMode: challengeAutomationModeSchema.optional().describe("Optional browser-scoped computer-use mode override")
1129
+ },
1130
+ async execute(args) {
1131
+ try {
1132
+ const coordinator = requireAutomationCoordinator(deps);
1133
+ if (typeof coordinator === "string") {
1134
+ return coordinator;
1135
+ }
1136
+ const result = await coordinator.statusCapabilities({
1137
+ browserSessionId: args.sessionId,
1138
+ targetId: args.targetId,
1139
+ runMode: args.challengeAutomationMode
1140
+ });
1141
+ return ok(result);
1142
+ } catch (error) {
1143
+ return failure(serializeError(error).message, "status_capabilities_failed");
1144
+ }
1145
+ }
1146
+ });
1147
+ }
1148
+
1149
+ // src/tools/session_inspector.ts
1150
+ import { tool as tool6 } from "@opencode-ai/plugin";
1151
+ var z6 = tool6.schema;
1152
+ function createSessionInspectorTool(deps) {
1153
+ return tool6({
1097
1154
  description: "Capture a session-first diagnostic bundle with relay health, trace proof, and a suggested next action.",
1098
1155
  args: {
1099
- sessionId: z5.string().describe("Session id"),
1100
- includeUrls: z5.boolean().optional().describe("Include target URLs in the targets summary"),
1101
- sinceConsoleSeq: z5.number().int().optional().describe("Resume cursor for console events"),
1102
- sinceNetworkSeq: z5.number().int().optional().describe("Resume cursor for network events"),
1103
- sinceExceptionSeq: z5.number().int().optional().describe("Resume cursor for exception events"),
1104
- max: z5.number().int().optional().describe("Max events per diagnostics channel"),
1105
- requestId: z5.string().optional().describe("Optional trace request id")
1156
+ sessionId: z6.string().describe("Session id"),
1157
+ includeUrls: z6.boolean().optional().describe("Include target URLs in the targets summary"),
1158
+ sinceConsoleSeq: z6.number().int().optional().describe("Resume cursor for console events"),
1159
+ sinceNetworkSeq: z6.number().int().optional().describe("Resume cursor for network events"),
1160
+ sinceExceptionSeq: z6.number().int().optional().describe("Resume cursor for exception events"),
1161
+ max: z6.number().int().optional().describe("Max events per diagnostics channel"),
1162
+ requestId: z6.string().optional().describe("Optional trace request id")
1106
1163
  },
1107
1164
  async execute(args) {
1108
1165
  try {
1109
- const inspector = deps.manager.createSessionInspector?.();
1110
- if (!inspector) {
1111
- return failure("Session inspector is unavailable for the current runtime.", "session_inspector_unavailable");
1166
+ const inspector = requireSessionInspectorHandle(deps);
1167
+ if (typeof inspector === "string") {
1168
+ return inspector;
1112
1169
  }
1113
1170
  await deps.relay?.refresh?.().catch(() => void 0);
1114
1171
  const relayStatus = deps.relay?.status?.() ?? null;
@@ -1130,15 +1187,113 @@ function createSessionInspectorTool(deps) {
1130
1187
  });
1131
1188
  }
1132
1189
 
1190
+ // src/tools/session_inspector_plan.ts
1191
+ import { tool as tool7 } from "@opencode-ai/plugin";
1192
+ var z7 = tool7.schema;
1193
+ var challengeAutomationModeSchema2 = z7.enum(CHALLENGE_AUTOMATION_MODES);
1194
+ function createSessionInspectorPlanTool(deps) {
1195
+ return tool7({
1196
+ description: "Inspect browser-scoped computer-use policy, eligibility, and safe suggested steps.",
1197
+ args: {
1198
+ sessionId: z7.string().describe("Session id"),
1199
+ targetId: z7.string().optional().describe("Optional target id"),
1200
+ challengeAutomationMode: challengeAutomationModeSchema2.optional().describe("Optional browser-scoped computer-use mode override")
1201
+ },
1202
+ async execute(args) {
1203
+ try {
1204
+ const coordinator = requireAutomationCoordinator(deps);
1205
+ if (typeof coordinator === "string") {
1206
+ return coordinator;
1207
+ }
1208
+ const result = await coordinator.inspectChallengePlan({
1209
+ browserSessionId: args.sessionId,
1210
+ targetId: args.targetId,
1211
+ runMode: args.challengeAutomationMode
1212
+ });
1213
+ return ok(result);
1214
+ } catch (error) {
1215
+ return failure(serializeError(error).message, "session_inspector_plan_failed");
1216
+ }
1217
+ }
1218
+ });
1219
+ }
1220
+
1221
+ // src/tools/session_inspector_audit.ts
1222
+ import { tool as tool8 } from "@opencode-ai/plugin";
1223
+ var z8 = tool8.schema;
1224
+ var challengeAutomationModeSchema3 = z8.enum(CHALLENGE_AUTOMATION_MODES);
1225
+ function createSessionInspectorAuditTool(deps) {
1226
+ return tool8({
1227
+ description: "Capture a correlated audit bundle across desktop evidence, browser review, and policy state.",
1228
+ args: {
1229
+ sessionId: z8.string().describe("Session id"),
1230
+ targetId: z8.string().optional().describe("Optional target id"),
1231
+ reason: z8.string().optional().describe("Optional audit reason"),
1232
+ maxChars: z8.number().int().optional().describe("Max characters for review output"),
1233
+ cursor: z8.string().optional().describe("Cursor for paging"),
1234
+ includeUrls: z8.boolean().optional().describe("Include target URLs in the targets summary"),
1235
+ sinceConsoleSeq: z8.number().int().optional().describe("Resume cursor for console events"),
1236
+ sinceNetworkSeq: z8.number().int().optional().describe("Resume cursor for network events"),
1237
+ sinceExceptionSeq: z8.number().int().optional().describe("Resume cursor for exception events"),
1238
+ max: z8.number().int().optional().describe("Max events per diagnostics channel"),
1239
+ requestId: z8.string().optional().describe("Optional trace request id"),
1240
+ challengeAutomationMode: challengeAutomationModeSchema3.optional().describe("Optional browser-scoped computer-use mode override")
1241
+ },
1242
+ async execute(args) {
1243
+ try {
1244
+ const coordinator = requireAutomationCoordinator(deps);
1245
+ if (typeof coordinator === "string") {
1246
+ return coordinator;
1247
+ }
1248
+ const inspector = requireSessionInspectorHandle(deps);
1249
+ if (typeof inspector === "string") {
1250
+ return inspector;
1251
+ }
1252
+ await deps.relay?.refresh?.().catch(() => void 0);
1253
+ const review = await coordinator.reviewDesktop({
1254
+ browserSessionId: args.sessionId,
1255
+ targetId: args.targetId,
1256
+ reason: args.reason,
1257
+ maxChars: args.maxChars,
1258
+ cursor: args.cursor
1259
+ });
1260
+ const challengePlan = await coordinator.inspectChallengePlan({
1261
+ browserSessionId: args.sessionId,
1262
+ targetId: args.targetId,
1263
+ runMode: args.challengeAutomationMode
1264
+ });
1265
+ const result = await buildCorrelatedAuditBundle({
1266
+ handle: inspector,
1267
+ browserSessionId: args.sessionId,
1268
+ targetId: args.targetId,
1269
+ observation: review.observation,
1270
+ review: review.verification,
1271
+ challengePlan,
1272
+ includeUrls: args.includeUrls,
1273
+ sinceConsoleSeq: args.sinceConsoleSeq,
1274
+ sinceNetworkSeq: args.sinceNetworkSeq,
1275
+ sinceExceptionSeq: args.sinceExceptionSeq,
1276
+ max: args.max,
1277
+ requestId: args.requestId,
1278
+ relayStatus: deps.relay?.status?.() ?? null
1279
+ });
1280
+ return ok(result);
1281
+ } catch (error) {
1282
+ return failure(serializeError(error).message, "session_inspector_audit_failed");
1283
+ }
1284
+ }
1285
+ });
1286
+ }
1287
+
1133
1288
  // src/tools/targets_list.ts
1134
- import { tool as tool6 } from "@opencode-ai/plugin";
1135
- var z6 = tool6.schema;
1289
+ import { tool as tool9 } from "@opencode-ai/plugin";
1290
+ var z9 = tool9.schema;
1136
1291
  function createTargetsListTool(deps) {
1137
- return tool6({
1292
+ return tool9({
1138
1293
  description: "List targets (tabs) in the current session.",
1139
1294
  args: {
1140
- sessionId: z6.string().describe("Session id"),
1141
- includeUrls: z6.boolean().optional().describe("Include target URLs")
1295
+ sessionId: z9.string().describe("Session id"),
1296
+ includeUrls: z9.boolean().optional().describe("Include target URLs")
1142
1297
  },
1143
1298
  async execute(args) {
1144
1299
  try {
@@ -1155,14 +1310,14 @@ function createTargetsListTool(deps) {
1155
1310
  }
1156
1311
 
1157
1312
  // src/tools/target_use.ts
1158
- import { tool as tool7 } from "@opencode-ai/plugin";
1159
- var z7 = tool7.schema;
1313
+ import { tool as tool10 } from "@opencode-ai/plugin";
1314
+ var z10 = tool10.schema;
1160
1315
  function createTargetUseTool(deps) {
1161
- return tool7({
1316
+ return tool10({
1162
1317
  description: "Set the active target (tab).",
1163
1318
  args: {
1164
- sessionId: z7.string().describe("Session id"),
1165
- targetId: z7.string().describe("Target id")
1319
+ sessionId: z10.string().describe("Session id"),
1320
+ targetId: z10.string().describe("Target id")
1166
1321
  },
1167
1322
  async execute(args) {
1168
1323
  try {
@@ -1180,14 +1335,14 @@ function createTargetUseTool(deps) {
1180
1335
  }
1181
1336
 
1182
1337
  // src/tools/target_new.ts
1183
- import { tool as tool8 } from "@opencode-ai/plugin";
1184
- var z8 = tool8.schema;
1338
+ import { tool as tool11 } from "@opencode-ai/plugin";
1339
+ var z11 = tool11.schema;
1185
1340
  function createTargetNewTool(deps) {
1186
- return tool8({
1341
+ return tool11({
1187
1342
  description: "Open a new target (tab).",
1188
1343
  args: {
1189
- sessionId: z8.string().describe("Session id"),
1190
- url: z8.string().optional().describe("Optional URL to open")
1344
+ sessionId: z11.string().describe("Session id"),
1345
+ url: z11.string().optional().describe("Optional URL to open")
1191
1346
  },
1192
1347
  async execute(args) {
1193
1348
  try {
@@ -1201,14 +1356,14 @@ function createTargetNewTool(deps) {
1201
1356
  }
1202
1357
 
1203
1358
  // src/tools/target_close.ts
1204
- import { tool as tool9 } from "@opencode-ai/plugin";
1205
- var z9 = tool9.schema;
1359
+ import { tool as tool12 } from "@opencode-ai/plugin";
1360
+ var z12 = tool12.schema;
1206
1361
  function createTargetCloseTool(deps) {
1207
- return tool9({
1362
+ return tool12({
1208
1363
  description: "Close a target (tab).",
1209
1364
  args: {
1210
- sessionId: z9.string().describe("Session id"),
1211
- targetId: z9.string().describe("Target id")
1365
+ sessionId: z12.string().describe("Session id"),
1366
+ targetId: z12.string().describe("Target id")
1212
1367
  },
1213
1368
  async execute(args) {
1214
1369
  try {
@@ -1222,15 +1377,15 @@ function createTargetCloseTool(deps) {
1222
1377
  }
1223
1378
 
1224
1379
  // src/tools/page.ts
1225
- import { tool as tool10 } from "@opencode-ai/plugin";
1226
- var z10 = tool10.schema;
1380
+ import { tool as tool13 } from "@opencode-ai/plugin";
1381
+ var z13 = tool13.schema;
1227
1382
  function createPageTool(deps) {
1228
- return tool10({
1383
+ return tool13({
1229
1384
  description: "Open or focus a named page, optionally navigating to a URL.",
1230
1385
  args: {
1231
- sessionId: z10.string().describe("Active browser session id"),
1232
- name: z10.string().describe("Stable page name"),
1233
- url: z10.string().optional().describe("Optional URL to open")
1386
+ sessionId: z13.string().describe("Active browser session id"),
1387
+ name: z13.string().describe("Stable page name"),
1388
+ url: z13.string().optional().describe("Optional URL to open")
1234
1389
  },
1235
1390
  async execute(args) {
1236
1391
  try {
@@ -1249,13 +1404,13 @@ function createPageTool(deps) {
1249
1404
  }
1250
1405
 
1251
1406
  // src/tools/list.ts
1252
- import { tool as tool11 } from "@opencode-ai/plugin";
1253
- var z11 = tool11.schema;
1407
+ import { tool as tool14 } from "@opencode-ai/plugin";
1408
+ var z14 = tool14.schema;
1254
1409
  function createListTool(deps) {
1255
- return tool11({
1410
+ return tool14({
1256
1411
  description: "List named pages in the current session.",
1257
1412
  args: {
1258
- sessionId: z11.string().describe("Active browser session id")
1413
+ sessionId: z14.string().describe("Active browser session id")
1259
1414
  },
1260
1415
  async execute(args) {
1261
1416
  try {
@@ -1269,14 +1424,14 @@ function createListTool(deps) {
1269
1424
  }
1270
1425
 
1271
1426
  // src/tools/close.ts
1272
- import { tool as tool12 } from "@opencode-ai/plugin";
1273
- var z12 = tool12.schema;
1427
+ import { tool as tool15 } from "@opencode-ai/plugin";
1428
+ var z15 = tool15.schema;
1274
1429
  function createCloseTool(deps) {
1275
- return tool12({
1430
+ return tool15({
1276
1431
  description: "Close a named page within the current session.",
1277
1432
  args: {
1278
- sessionId: z12.string().describe("Active browser session id"),
1279
- name: z12.string().describe("Named page to close")
1433
+ sessionId: z15.string().describe("Active browser session id"),
1434
+ name: z15.string().describe("Named page to close")
1280
1435
  },
1281
1436
  async execute(args) {
1282
1437
  try {
@@ -1290,18 +1445,18 @@ function createCloseTool(deps) {
1290
1445
  }
1291
1446
 
1292
1447
  // src/tools/goto.ts
1293
- import { tool as tool13 } from "@opencode-ai/plugin";
1294
- var z13 = tool13.schema;
1295
- var waitUntilSchema = z13.enum(["domcontentloaded", "load", "networkidle"]);
1448
+ import { tool as tool16 } from "@opencode-ai/plugin";
1449
+ var z16 = tool16.schema;
1450
+ var waitUntilSchema = z16.enum(["domcontentloaded", "load", "networkidle"]);
1296
1451
  function createGotoTool(deps) {
1297
- return tool13({
1452
+ return tool16({
1298
1453
  description: "Navigate the active target to a URL.",
1299
1454
  args: {
1300
- sessionId: z13.string().describe("Session id"),
1301
- url: z13.string().describe("URL to navigate to"),
1302
- targetId: z13.string().optional().describe("Optional target id"),
1455
+ sessionId: z16.string().describe("Session id"),
1456
+ url: z16.string().describe("URL to navigate to"),
1457
+ targetId: z16.string().optional().describe("Optional target id"),
1303
1458
  waitUntil: waitUntilSchema.optional().describe("Load state to wait for"),
1304
- timeoutMs: z13.number().int().optional().describe("Timeout in milliseconds")
1459
+ timeoutMs: z16.number().int().optional().describe("Timeout in milliseconds")
1305
1460
  },
1306
1461
  async execute(args) {
1307
1462
  try {
@@ -1322,20 +1477,20 @@ function createGotoTool(deps) {
1322
1477
  }
1323
1478
 
1324
1479
  // src/tools/wait.ts
1325
- import { tool as tool14 } from "@opencode-ai/plugin";
1326
- var z14 = tool14.schema;
1327
- var waitUntilSchema2 = z14.enum(["domcontentloaded", "load", "networkidle"]);
1328
- var waitStateSchema = z14.enum(["attached", "visible", "hidden"]);
1480
+ import { tool as tool17 } from "@opencode-ai/plugin";
1481
+ var z17 = tool17.schema;
1482
+ var waitUntilSchema2 = z17.enum(["domcontentloaded", "load", "networkidle"]);
1483
+ var waitStateSchema = z17.enum(["attached", "visible", "hidden"]);
1329
1484
  function createWaitTool(deps) {
1330
- return tool14({
1485
+ return tool17({
1331
1486
  description: "Wait for a load state or a ref state.",
1332
1487
  args: {
1333
- sessionId: z14.string().describe("Session id"),
1334
- targetId: z14.string().optional().describe("Optional target id"),
1488
+ sessionId: z17.string().describe("Session id"),
1489
+ targetId: z17.string().optional().describe("Optional target id"),
1335
1490
  until: waitUntilSchema2.optional().describe("Load state to wait for"),
1336
- ref: z14.string().optional().describe("Ref to wait for"),
1491
+ ref: z17.string().optional().describe("Ref to wait for"),
1337
1492
  state: waitStateSchema.optional().describe("Ref state to wait for"),
1338
- timeoutMs: z14.number().int().optional().describe("Timeout in milliseconds")
1493
+ timeoutMs: z17.number().int().optional().describe("Timeout in milliseconds")
1339
1494
  },
1340
1495
  async execute(args) {
1341
1496
  try {
@@ -1367,18 +1522,18 @@ function createWaitTool(deps) {
1367
1522
  }
1368
1523
 
1369
1524
  // src/tools/snapshot.ts
1370
- import { tool as tool15 } from "@opencode-ai/plugin";
1371
- var z15 = tool15.schema;
1372
- var formatSchema = z15.enum(["outline", "actionables"]);
1525
+ import { tool as tool18 } from "@opencode-ai/plugin";
1526
+ var z18 = tool18.schema;
1527
+ var formatSchema = z18.enum(["outline", "actionables"]);
1373
1528
  function createSnapshotTool(deps) {
1374
- return tool15({
1529
+ return tool18({
1375
1530
  description: "Capture a snapshot of the current page and return refs.",
1376
1531
  args: {
1377
- sessionId: z15.string().describe("Session id"),
1378
- targetId: z15.string().optional().describe("Optional target id"),
1532
+ sessionId: z18.string().describe("Session id"),
1533
+ targetId: z18.string().optional().describe("Optional target id"),
1379
1534
  format: formatSchema.optional().describe("Snapshot format"),
1380
- maxChars: z15.number().int().optional().describe("Max characters for snapshot output"),
1381
- cursor: z15.string().optional().describe("Cursor for paging")
1535
+ maxChars: z18.number().int().optional().describe("Max characters for snapshot output"),
1536
+ cursor: z18.string().optional().describe("Cursor for paging")
1382
1537
  },
1383
1538
  async execute(args) {
1384
1539
  try {
@@ -1399,16 +1554,16 @@ function createSnapshotTool(deps) {
1399
1554
  }
1400
1555
 
1401
1556
  // src/tools/review.ts
1402
- import { tool as tool16 } from "@opencode-ai/plugin";
1403
- var z16 = tool16.schema;
1557
+ import { tool as tool19 } from "@opencode-ai/plugin";
1558
+ var z19 = tool19.schema;
1404
1559
  function createReviewTool(deps) {
1405
- return tool16({
1560
+ return tool19({
1406
1561
  description: "Capture a first-class review payload with status and actionables.",
1407
1562
  args: {
1408
- sessionId: z16.string().describe("Session id"),
1409
- targetId: z16.string().optional().describe("Optional target id"),
1410
- maxChars: z16.number().int().optional().describe("Max characters for review output"),
1411
- cursor: z16.string().optional().describe("Cursor for paging")
1563
+ sessionId: z19.string().describe("Session id"),
1564
+ targetId: z19.string().optional().describe("Optional target id"),
1565
+ maxChars: z19.number().int().optional().describe("Max characters for review output"),
1566
+ cursor: z19.string().optional().describe("Cursor for paging")
1412
1567
  },
1413
1568
  async execute(args) {
1414
1569
  try {
@@ -1428,16 +1583,50 @@ function createReviewTool(deps) {
1428
1583
  });
1429
1584
  }
1430
1585
 
1586
+ // src/tools/review_desktop.ts
1587
+ import { tool as tool20 } from "@opencode-ai/plugin";
1588
+ var z20 = tool20.schema;
1589
+ function createReviewDesktopTool(deps) {
1590
+ return tool20({
1591
+ description: "Capture desktop-assisted browser review with read-only desktop evidence and browser-owned verification.",
1592
+ args: {
1593
+ sessionId: z20.string().describe("Session id"),
1594
+ targetId: z20.string().optional().describe("Optional target id"),
1595
+ reason: z20.string().optional().describe("Optional audit reason"),
1596
+ maxChars: z20.number().int().optional().describe("Max characters for review output"),
1597
+ cursor: z20.string().optional().describe("Cursor for paging")
1598
+ },
1599
+ async execute(args) {
1600
+ try {
1601
+ const coordinator = requireAutomationCoordinator(deps);
1602
+ if (typeof coordinator === "string") {
1603
+ return coordinator;
1604
+ }
1605
+ const result = await coordinator.reviewDesktop({
1606
+ browserSessionId: args.sessionId,
1607
+ targetId: args.targetId,
1608
+ reason: args.reason,
1609
+ maxChars: args.maxChars,
1610
+ cursor: args.cursor
1611
+ });
1612
+ return ok(result);
1613
+ } catch (error) {
1614
+ return failure(serializeError(error).message, "review_desktop_failed");
1615
+ }
1616
+ }
1617
+ });
1618
+ }
1619
+
1431
1620
  // src/tools/click.ts
1432
- import { tool as tool17 } from "@opencode-ai/plugin";
1433
- var z17 = tool17.schema;
1621
+ import { tool as tool21 } from "@opencode-ai/plugin";
1622
+ var z21 = tool21.schema;
1434
1623
  function createClickTool(deps) {
1435
- return tool17({
1624
+ return tool21({
1436
1625
  description: "Click a referenced element.",
1437
1626
  args: {
1438
- sessionId: z17.string().describe("Session id"),
1439
- targetId: z17.string().optional().describe("Optional target id"),
1440
- ref: z17.string().describe("Element ref")
1627
+ sessionId: z21.string().describe("Session id"),
1628
+ targetId: z21.string().optional().describe("Optional target id"),
1629
+ ref: z21.string().describe("Element ref")
1441
1630
  },
1442
1631
  async execute(args) {
1443
1632
  try {
@@ -1451,15 +1640,15 @@ function createClickTool(deps) {
1451
1640
  }
1452
1641
 
1453
1642
  // src/tools/hover.ts
1454
- import { tool as tool18 } from "@opencode-ai/plugin";
1455
- var z18 = tool18.schema;
1643
+ import { tool as tool22 } from "@opencode-ai/plugin";
1644
+ var z22 = tool22.schema;
1456
1645
  function createHoverTool(deps) {
1457
- return tool18({
1646
+ return tool22({
1458
1647
  description: "Hover over an element by ref.",
1459
1648
  args: {
1460
- sessionId: z18.string().describe("Active browser session id"),
1461
- targetId: z18.string().optional().describe("Optional target id"),
1462
- ref: z18.string().describe("Element ref from snapshot")
1649
+ sessionId: z22.string().describe("Active browser session id"),
1650
+ targetId: z22.string().optional().describe("Optional target id"),
1651
+ ref: z22.string().describe("Element ref from snapshot")
1463
1652
  },
1464
1653
  async execute(args) {
1465
1654
  try {
@@ -1473,16 +1662,16 @@ function createHoverTool(deps) {
1473
1662
  }
1474
1663
 
1475
1664
  // src/tools/press.ts
1476
- import { tool as tool19 } from "@opencode-ai/plugin";
1477
- var z19 = tool19.schema;
1665
+ import { tool as tool23 } from "@opencode-ai/plugin";
1666
+ var z23 = tool23.schema;
1478
1667
  function createPressTool(deps) {
1479
- return tool19({
1668
+ return tool23({
1480
1669
  description: "Press a keyboard key, optionally focusing a ref first.",
1481
1670
  args: {
1482
- sessionId: z19.string().describe("Active browser session id"),
1483
- targetId: z19.string().optional().describe("Optional target id"),
1484
- key: z19.string().describe("Keyboard key to press, e.g. Enter or ArrowDown"),
1485
- ref: z19.string().optional().describe("Optional element ref to focus first")
1671
+ sessionId: z23.string().describe("Active browser session id"),
1672
+ targetId: z23.string().optional().describe("Optional target id"),
1673
+ key: z23.string().describe("Keyboard key to press, e.g. Enter or ArrowDown"),
1674
+ ref: z23.string().optional().describe("Optional element ref to focus first")
1486
1675
  },
1487
1676
  async execute(args) {
1488
1677
  try {
@@ -1496,15 +1685,15 @@ function createPressTool(deps) {
1496
1685
  }
1497
1686
 
1498
1687
  // src/tools/check.ts
1499
- import { tool as tool20 } from "@opencode-ai/plugin";
1500
- var z20 = tool20.schema;
1688
+ import { tool as tool24 } from "@opencode-ai/plugin";
1689
+ var z24 = tool24.schema;
1501
1690
  function createCheckTool(deps) {
1502
- return tool20({
1691
+ return tool24({
1503
1692
  description: "Check a checkbox or toggle by ref.",
1504
1693
  args: {
1505
- sessionId: z20.string().describe("Active browser session id"),
1506
- targetId: z20.string().optional().describe("Optional target id"),
1507
- ref: z20.string().describe("Element ref from snapshot")
1694
+ sessionId: z24.string().describe("Active browser session id"),
1695
+ targetId: z24.string().optional().describe("Optional target id"),
1696
+ ref: z24.string().describe("Element ref from snapshot")
1508
1697
  },
1509
1698
  async execute(args) {
1510
1699
  try {
@@ -1518,15 +1707,15 @@ function createCheckTool(deps) {
1518
1707
  }
1519
1708
 
1520
1709
  // src/tools/uncheck.ts
1521
- import { tool as tool21 } from "@opencode-ai/plugin";
1522
- var z21 = tool21.schema;
1710
+ import { tool as tool25 } from "@opencode-ai/plugin";
1711
+ var z25 = tool25.schema;
1523
1712
  function createUncheckTool(deps) {
1524
- return tool21({
1713
+ return tool25({
1525
1714
  description: "Uncheck a checkbox or toggle by ref.",
1526
1715
  args: {
1527
- sessionId: z21.string().describe("Active browser session id"),
1528
- targetId: z21.string().optional().describe("Optional target id"),
1529
- ref: z21.string().describe("Element ref from snapshot")
1716
+ sessionId: z25.string().describe("Active browser session id"),
1717
+ targetId: z25.string().optional().describe("Optional target id"),
1718
+ ref: z25.string().describe("Element ref from snapshot")
1530
1719
  },
1531
1720
  async execute(args) {
1532
1721
  try {
@@ -1540,18 +1729,18 @@ function createUncheckTool(deps) {
1540
1729
  }
1541
1730
 
1542
1731
  // src/tools/type.ts
1543
- import { tool as tool22 } from "@opencode-ai/plugin";
1544
- var z22 = tool22.schema;
1732
+ import { tool as tool26 } from "@opencode-ai/plugin";
1733
+ var z26 = tool26.schema;
1545
1734
  function createTypeTool(deps) {
1546
- return tool22({
1735
+ return tool26({
1547
1736
  description: "Type text into a referenced input.",
1548
1737
  args: {
1549
- sessionId: z22.string().describe("Session id"),
1550
- targetId: z22.string().optional().describe("Optional target id"),
1551
- ref: z22.string().describe("Element ref"),
1552
- text: z22.string().describe("Text to type"),
1553
- clear: z22.boolean().optional().describe("Clear before typing"),
1554
- submit: z22.boolean().optional().describe("Press Enter after typing")
1738
+ sessionId: z26.string().describe("Session id"),
1739
+ targetId: z26.string().optional().describe("Optional target id"),
1740
+ ref: z26.string().describe("Element ref"),
1741
+ text: z26.string().describe("Text to type"),
1742
+ clear: z26.boolean().optional().describe("Clear before typing"),
1743
+ submit: z26.boolean().optional().describe("Press Enter after typing")
1555
1744
  },
1556
1745
  async execute(args) {
1557
1746
  try {
@@ -1572,16 +1761,16 @@ function createTypeTool(deps) {
1572
1761
  }
1573
1762
 
1574
1763
  // src/tools/select.ts
1575
- import { tool as tool23 } from "@opencode-ai/plugin";
1576
- var z23 = tool23.schema;
1764
+ import { tool as tool27 } from "@opencode-ai/plugin";
1765
+ var z27 = tool27.schema;
1577
1766
  function createSelectTool(deps) {
1578
- return tool23({
1767
+ return tool27({
1579
1768
  description: "Select options in a referenced select element.",
1580
1769
  args: {
1581
- sessionId: z23.string().describe("Session id"),
1582
- targetId: z23.string().optional().describe("Optional target id"),
1583
- ref: z23.string().describe("Element ref"),
1584
- values: z23.array(z23.string()).describe("Values to select")
1770
+ sessionId: z27.string().describe("Session id"),
1771
+ targetId: z27.string().optional().describe("Optional target id"),
1772
+ ref: z27.string().describe("Element ref"),
1773
+ values: z27.array(z27.string()).describe("Values to select")
1585
1774
  },
1586
1775
  async execute(args) {
1587
1776
  try {
@@ -1595,16 +1784,16 @@ function createSelectTool(deps) {
1595
1784
  }
1596
1785
 
1597
1786
  // src/tools/scroll.ts
1598
- import { tool as tool24 } from "@opencode-ai/plugin";
1599
- var z24 = tool24.schema;
1787
+ import { tool as tool28 } from "@opencode-ai/plugin";
1788
+ var z28 = tool28.schema;
1600
1789
  function createScrollTool(deps) {
1601
- return tool24({
1790
+ return tool28({
1602
1791
  description: "Scroll the page or a referenced element.",
1603
1792
  args: {
1604
- sessionId: z24.string().describe("Session id"),
1605
- targetId: z24.string().optional().describe("Optional target id"),
1606
- dy: z24.number().describe("Scroll delta in pixels"),
1607
- ref: z24.string().optional().describe("Optional element ref to scroll")
1793
+ sessionId: z28.string().describe("Session id"),
1794
+ targetId: z28.string().optional().describe("Optional target id"),
1795
+ dy: z28.number().describe("Scroll delta in pixels"),
1796
+ ref: z28.string().optional().describe("Optional element ref to scroll")
1608
1797
  },
1609
1798
  async execute(args) {
1610
1799
  try {
@@ -1618,16 +1807,16 @@ function createScrollTool(deps) {
1618
1807
  }
1619
1808
 
1620
1809
  // src/tools/scroll_into_view.ts
1621
- import { tool as tool25 } from "@opencode-ai/plugin";
1622
- var z25 = tool25.schema;
1810
+ import { tool as tool29 } from "@opencode-ai/plugin";
1811
+ var z29 = tool29.schema;
1623
1812
  function createScrollIntoViewTool(deps) {
1624
- return tool25({
1813
+ return tool29({
1625
1814
  description: "Scroll an element into view by ref.",
1626
1815
  args: {
1627
- sessionId: z25.string().describe("Active browser session id"),
1628
- targetId: z25.string().optional().describe("Optional target id"),
1629
- ref: z25.string().describe("Element ref from snapshot")
1630
- },
1816
+ sessionId: z29.string().describe("Active browser session id"),
1817
+ targetId: z29.string().optional().describe("Optional target id"),
1818
+ ref: z29.string().describe("Element ref from snapshot")
1819
+ },
1631
1820
  async execute(args) {
1632
1821
  try {
1633
1822
  const result = await deps.manager.scrollIntoView(args.sessionId, args.ref, args.targetId);
@@ -1640,16 +1829,16 @@ function createScrollIntoViewTool(deps) {
1640
1829
  }
1641
1830
 
1642
1831
  // src/tools/upload.ts
1643
- import { tool as tool26 } from "@opencode-ai/plugin";
1644
- var z26 = tool26.schema;
1832
+ import { tool as tool30 } from "@opencode-ai/plugin";
1833
+ var z30 = tool30.schema;
1645
1834
  function createUploadTool(deps) {
1646
- return tool26({
1835
+ return tool30({
1647
1836
  description: "Upload files to an input or chooser by ref.",
1648
1837
  args: {
1649
- sessionId: z26.string().describe("Active browser session id"),
1650
- targetId: z26.string().optional().describe("Optional target id"),
1651
- ref: z26.string().describe("Element ref"),
1652
- files: z26.array(z26.string()).min(1).describe("Local host file paths")
1838
+ sessionId: z30.string().describe("Active browser session id"),
1839
+ targetId: z30.string().optional().describe("Optional target id"),
1840
+ ref: z30.string().describe("Element ref"),
1841
+ files: z30.array(z30.string()).min(1).describe("Local host file paths")
1653
1842
  },
1654
1843
  async execute(args) {
1655
1844
  try {
@@ -1667,17 +1856,17 @@ function createUploadTool(deps) {
1667
1856
  }
1668
1857
 
1669
1858
  // src/tools/pointer_move.ts
1670
- import { tool as tool27 } from "@opencode-ai/plugin";
1671
- var z27 = tool27.schema;
1859
+ import { tool as tool31 } from "@opencode-ai/plugin";
1860
+ var z31 = tool31.schema;
1672
1861
  function createPointerMoveTool(deps) {
1673
- return tool27({
1862
+ return tool31({
1674
1863
  description: "Move the pointer to viewport coordinates.",
1675
1864
  args: {
1676
- sessionId: z27.string().describe("Active browser session id"),
1677
- targetId: z27.string().optional().describe("Optional target id"),
1678
- x: z27.number().describe("Viewport x coordinate"),
1679
- y: z27.number().describe("Viewport y coordinate"),
1680
- steps: z27.number().int().positive().optional().describe("Optional move interpolation step count")
1865
+ sessionId: z31.string().describe("Active browser session id"),
1866
+ targetId: z31.string().optional().describe("Optional target id"),
1867
+ x: z31.number().describe("Viewport x coordinate"),
1868
+ y: z31.number().describe("Viewport y coordinate"),
1869
+ steps: z31.number().int().positive().optional().describe("Optional move interpolation step count")
1681
1870
  },
1682
1871
  async execute(args) {
1683
1872
  try {
@@ -1691,18 +1880,18 @@ function createPointerMoveTool(deps) {
1691
1880
  }
1692
1881
 
1693
1882
  // src/tools/pointer_down.ts
1694
- import { tool as tool28 } from "@opencode-ai/plugin";
1695
- var z28 = tool28.schema;
1883
+ import { tool as tool32 } from "@opencode-ai/plugin";
1884
+ var z32 = tool32.schema;
1696
1885
  function createPointerDownTool(deps) {
1697
- return tool28({
1886
+ return tool32({
1698
1887
  description: "Move to viewport coordinates and press a mouse button.",
1699
1888
  args: {
1700
- sessionId: z28.string().describe("Active browser session id"),
1701
- targetId: z28.string().optional().describe("Optional target id"),
1702
- x: z28.number().describe("Viewport x coordinate"),
1703
- y: z28.number().describe("Viewport y coordinate"),
1704
- button: z28.enum(["left", "middle", "right"]).optional().describe("Mouse button to press"),
1705
- clickCount: z28.number().int().positive().optional().describe("Associated click count")
1889
+ sessionId: z32.string().describe("Active browser session id"),
1890
+ targetId: z32.string().optional().describe("Optional target id"),
1891
+ x: z32.number().describe("Viewport x coordinate"),
1892
+ y: z32.number().describe("Viewport y coordinate"),
1893
+ button: z32.enum(["left", "middle", "right"]).optional().describe("Mouse button to press"),
1894
+ clickCount: z32.number().int().positive().optional().describe("Associated click count")
1706
1895
  },
1707
1896
  async execute(args) {
1708
1897
  try {
@@ -1723,18 +1912,18 @@ function createPointerDownTool(deps) {
1723
1912
  }
1724
1913
 
1725
1914
  // src/tools/pointer_up.ts
1726
- import { tool as tool29 } from "@opencode-ai/plugin";
1727
- var z29 = tool29.schema;
1915
+ import { tool as tool33 } from "@opencode-ai/plugin";
1916
+ var z33 = tool33.schema;
1728
1917
  function createPointerUpTool(deps) {
1729
- return tool29({
1918
+ return tool33({
1730
1919
  description: "Move to viewport coordinates and release a mouse button.",
1731
1920
  args: {
1732
- sessionId: z29.string().describe("Active browser session id"),
1733
- targetId: z29.string().optional().describe("Optional target id"),
1734
- x: z29.number().describe("Viewport x coordinate"),
1735
- y: z29.number().describe("Viewport y coordinate"),
1736
- button: z29.enum(["left", "middle", "right"]).optional().describe("Mouse button to release"),
1737
- clickCount: z29.number().int().positive().optional().describe("Associated click count")
1921
+ sessionId: z33.string().describe("Active browser session id"),
1922
+ targetId: z33.string().optional().describe("Optional target id"),
1923
+ x: z33.number().describe("Viewport x coordinate"),
1924
+ y: z33.number().describe("Viewport y coordinate"),
1925
+ button: z33.enum(["left", "middle", "right"]).optional().describe("Mouse button to release"),
1926
+ clickCount: z33.number().int().positive().optional().describe("Associated click count")
1738
1927
  },
1739
1928
  async execute(args) {
1740
1929
  try {
@@ -1755,19 +1944,19 @@ function createPointerUpTool(deps) {
1755
1944
  }
1756
1945
 
1757
1946
  // src/tools/pointer_drag.ts
1758
- import { tool as tool30 } from "@opencode-ai/plugin";
1759
- var z30 = tool30.schema;
1947
+ import { tool as tool34 } from "@opencode-ai/plugin";
1948
+ var z34 = tool34.schema;
1760
1949
  function createPointerDragTool(deps) {
1761
- return tool30({
1950
+ return tool34({
1762
1951
  description: "Drag the pointer between two viewport coordinates.",
1763
1952
  args: {
1764
- sessionId: z30.string().describe("Active browser session id"),
1765
- targetId: z30.string().optional().describe("Optional target id"),
1766
- fromX: z30.number().describe("Start x coordinate"),
1767
- fromY: z30.number().describe("Start y coordinate"),
1768
- toX: z30.number().describe("End x coordinate"),
1769
- toY: z30.number().describe("End y coordinate"),
1770
- steps: z30.number().int().positive().optional().describe("Optional drag interpolation step count")
1953
+ sessionId: z34.string().describe("Active browser session id"),
1954
+ targetId: z34.string().optional().describe("Optional target id"),
1955
+ fromX: z34.number().describe("Start x coordinate"),
1956
+ fromY: z34.number().describe("Start y coordinate"),
1957
+ toX: z34.number().describe("End x coordinate"),
1958
+ toY: z34.number().describe("End y coordinate"),
1959
+ steps: z34.number().int().positive().optional().describe("Optional drag interpolation step count")
1771
1960
  },
1772
1961
  async execute(args) {
1773
1962
  try {
@@ -1787,16 +1976,16 @@ function createPointerDragTool(deps) {
1787
1976
  }
1788
1977
 
1789
1978
  // src/tools/dom_get_html.ts
1790
- import { tool as tool31 } from "@opencode-ai/plugin";
1791
- var z31 = tool31.schema;
1979
+ import { tool as tool35 } from "@opencode-ai/plugin";
1980
+ var z35 = tool35.schema;
1792
1981
  function createDomGetHtmlTool(deps) {
1793
- return tool31({
1982
+ return tool35({
1794
1983
  description: "Get outerHTML for a referenced element.",
1795
1984
  args: {
1796
- sessionId: z31.string().describe("Session id"),
1797
- targetId: z31.string().optional().describe("Optional target id"),
1798
- ref: z31.string().describe("Element ref"),
1799
- maxChars: z31.number().int().optional().describe("Max characters")
1985
+ sessionId: z35.string().describe("Session id"),
1986
+ targetId: z35.string().optional().describe("Optional target id"),
1987
+ ref: z35.string().describe("Element ref"),
1988
+ maxChars: z35.number().int().optional().describe("Max characters")
1800
1989
  },
1801
1990
  async execute(args) {
1802
1991
  try {
@@ -1819,16 +2008,16 @@ function createDomGetHtmlTool(deps) {
1819
2008
  }
1820
2009
 
1821
2010
  // src/tools/dom_get_text.ts
1822
- import { tool as tool32 } from "@opencode-ai/plugin";
1823
- var z32 = tool32.schema;
2011
+ import { tool as tool36 } from "@opencode-ai/plugin";
2012
+ var z36 = tool36.schema;
1824
2013
  function createDomGetTextTool(deps) {
1825
- return tool32({
2014
+ return tool36({
1826
2015
  description: "Get inner text for a referenced element.",
1827
2016
  args: {
1828
- sessionId: z32.string().describe("Session id"),
1829
- targetId: z32.string().optional().describe("Optional target id"),
1830
- ref: z32.string().describe("Element ref"),
1831
- maxChars: z32.number().int().optional().describe("Max characters")
2017
+ sessionId: z36.string().describe("Session id"),
2018
+ targetId: z36.string().optional().describe("Optional target id"),
2019
+ ref: z36.string().describe("Element ref"),
2020
+ maxChars: z36.number().int().optional().describe("Max characters")
1832
2021
  },
1833
2022
  async execute(args) {
1834
2023
  try {
@@ -1851,16 +2040,16 @@ function createDomGetTextTool(deps) {
1851
2040
  }
1852
2041
 
1853
2042
  // src/tools/get_attr.ts
1854
- import { tool as tool33 } from "@opencode-ai/plugin";
1855
- var z33 = tool33.schema;
2043
+ import { tool as tool37 } from "@opencode-ai/plugin";
2044
+ var z37 = tool37.schema;
1856
2045
  function createGetAttrTool(deps) {
1857
- return tool33({
2046
+ return tool37({
1858
2047
  description: "Get a DOM attribute value by ref.",
1859
2048
  args: {
1860
- sessionId: z33.string().describe("Active browser session id"),
1861
- targetId: z33.string().optional().describe("Optional target id"),
1862
- ref: z33.string().describe("Element ref from snapshot"),
1863
- name: z33.string().describe("Attribute name, e.g. href or aria-label")
2049
+ sessionId: z37.string().describe("Active browser session id"),
2050
+ targetId: z37.string().optional().describe("Optional target id"),
2051
+ ref: z37.string().describe("Element ref from snapshot"),
2052
+ name: z37.string().describe("Attribute name, e.g. href or aria-label")
1864
2053
  },
1865
2054
  async execute(args) {
1866
2055
  try {
@@ -1874,15 +2063,15 @@ function createGetAttrTool(deps) {
1874
2063
  }
1875
2064
 
1876
2065
  // src/tools/get_value.ts
1877
- import { tool as tool34 } from "@opencode-ai/plugin";
1878
- var z34 = tool34.schema;
2066
+ import { tool as tool38 } from "@opencode-ai/plugin";
2067
+ var z38 = tool38.schema;
1879
2068
  function createGetValueTool(deps) {
1880
- return tool34({
2069
+ return tool38({
1881
2070
  description: "Get the input value for an element by ref.",
1882
2071
  args: {
1883
- sessionId: z34.string().describe("Active browser session id"),
1884
- targetId: z34.string().optional().describe("Optional target id"),
1885
- ref: z34.string().describe("Element ref from snapshot")
2072
+ sessionId: z38.string().describe("Active browser session id"),
2073
+ targetId: z38.string().optional().describe("Optional target id"),
2074
+ ref: z38.string().describe("Element ref from snapshot")
1886
2075
  },
1887
2076
  async execute(args) {
1888
2077
  try {
@@ -1896,15 +2085,15 @@ function createGetValueTool(deps) {
1896
2085
  }
1897
2086
 
1898
2087
  // src/tools/is_visible.ts
1899
- import { tool as tool35 } from "@opencode-ai/plugin";
1900
- var z35 = tool35.schema;
2088
+ import { tool as tool39 } from "@opencode-ai/plugin";
2089
+ var z39 = tool39.schema;
1901
2090
  function createIsVisibleTool(deps) {
1902
- return tool35({
2091
+ return tool39({
1903
2092
  description: "Check if an element is visible by ref.",
1904
2093
  args: {
1905
- sessionId: z35.string().describe("Active browser session id"),
1906
- targetId: z35.string().optional().describe("Optional target id"),
1907
- ref: z35.string().describe("Element ref from snapshot")
2094
+ sessionId: z39.string().describe("Active browser session id"),
2095
+ targetId: z39.string().optional().describe("Optional target id"),
2096
+ ref: z39.string().describe("Element ref from snapshot")
1908
2097
  },
1909
2098
  async execute(args) {
1910
2099
  try {
@@ -1918,15 +2107,15 @@ function createIsVisibleTool(deps) {
1918
2107
  }
1919
2108
 
1920
2109
  // src/tools/is_enabled.ts
1921
- import { tool as tool36 } from "@opencode-ai/plugin";
1922
- var z36 = tool36.schema;
2110
+ import { tool as tool40 } from "@opencode-ai/plugin";
2111
+ var z40 = tool40.schema;
1923
2112
  function createIsEnabledTool(deps) {
1924
- return tool36({
2113
+ return tool40({
1925
2114
  description: "Check if an element is enabled by ref.",
1926
2115
  args: {
1927
- sessionId: z36.string().describe("Active browser session id"),
1928
- targetId: z36.string().optional().describe("Optional target id"),
1929
- ref: z36.string().describe("Element ref from snapshot")
2116
+ sessionId: z40.string().describe("Active browser session id"),
2117
+ targetId: z40.string().optional().describe("Optional target id"),
2118
+ ref: z40.string().describe("Element ref from snapshot")
1930
2119
  },
1931
2120
  async execute(args) {
1932
2121
  try {
@@ -1940,15 +2129,15 @@ function createIsEnabledTool(deps) {
1940
2129
  }
1941
2130
 
1942
2131
  // src/tools/is_checked.ts
1943
- import { tool as tool37 } from "@opencode-ai/plugin";
1944
- var z37 = tool37.schema;
2132
+ import { tool as tool41 } from "@opencode-ai/plugin";
2133
+ var z41 = tool41.schema;
1945
2134
  function createIsCheckedTool(deps) {
1946
- return tool37({
2135
+ return tool41({
1947
2136
  description: "Check if an element is checked by ref.",
1948
2137
  args: {
1949
- sessionId: z37.string().describe("Active browser session id"),
1950
- targetId: z37.string().optional().describe("Optional target id"),
1951
- ref: z37.string().describe("Element ref from snapshot")
2138
+ sessionId: z41.string().describe("Active browser session id"),
2139
+ targetId: z41.string().optional().describe("Optional target id"),
2140
+ ref: z41.string().describe("Element ref from snapshot")
1952
2141
  },
1953
2142
  async execute(args) {
1954
2143
  try {
@@ -1962,20 +2151,20 @@ function createIsCheckedTool(deps) {
1962
2151
  }
1963
2152
 
1964
2153
  // src/tools/run.ts
1965
- import { tool as tool38 } from "@opencode-ai/plugin";
1966
- var z38 = tool38.schema;
1967
- var stepSchema = z38.object({
1968
- action: z38.string().describe("Action name"),
1969
- args: z38.record(z38.string(), z38.unknown()).optional().describe("Action arguments")
2154
+ import { tool as tool42 } from "@opencode-ai/plugin";
2155
+ var z42 = tool42.schema;
2156
+ var stepSchema = z42.object({
2157
+ action: z42.string().describe("Action name"),
2158
+ args: z42.record(z42.string(), z42.unknown()).optional().describe("Action arguments")
1970
2159
  });
1971
2160
  function createRunTool(deps) {
1972
- return tool38({
2161
+ return tool42({
1973
2162
  description: "Run multiple actions in a single tool call.",
1974
2163
  args: {
1975
- sessionId: z38.string().describe("Session id"),
1976
- steps: z38.array(stepSchema).describe("Steps to execute"),
1977
- stopOnError: z38.boolean().optional().describe("Stop when a step fails"),
1978
- maxSnapshotChars: z38.number().int().optional().describe("Default maxChars for snapshot steps")
2164
+ sessionId: z42.string().describe("Session id"),
2165
+ steps: z42.array(stepSchema).describe("Steps to execute"),
2166
+ stopOnError: z42.boolean().optional().describe("Stop when a step fails"),
2167
+ maxSnapshotChars: z42.number().int().optional().describe("Default maxChars for snapshot steps")
1979
2168
  },
1980
2169
  async execute(args) {
1981
2170
  try {
@@ -2008,13 +2197,13 @@ function normalizeSteps(steps, maxSnapshotChars) {
2008
2197
  }
2009
2198
 
2010
2199
  // src/tools/prompting_guide.ts
2011
- import { tool as tool39 } from "@opencode-ai/plugin";
2012
- var z39 = tool39.schema;
2200
+ import { tool as tool43 } from "@opencode-ai/plugin";
2201
+ var z43 = tool43.schema;
2013
2202
  function createPromptingGuideTool(deps) {
2014
- return tool39({
2203
+ return tool43({
2015
2204
  description: `Start here for first-contact OpenDevBrowser guidance, including ${onboarding_metadata_default.skillName} ${onboarding_metadata_default.skillTopic}.`,
2016
2205
  args: {
2017
- topic: z39.string().optional().describe("Optional topic for guidance")
2206
+ topic: z43.string().optional().describe("Optional topic for guidance")
2018
2207
  },
2019
2208
  async execute(args) {
2020
2209
  try {
@@ -2028,15 +2217,15 @@ function createPromptingGuideTool(deps) {
2028
2217
  }
2029
2218
 
2030
2219
  // src/tools/console_poll.ts
2031
- import { tool as tool40 } from "@opencode-ai/plugin";
2032
- var z40 = tool40.schema;
2220
+ import { tool as tool44 } from "@opencode-ai/plugin";
2221
+ var z44 = tool44.schema;
2033
2222
  function createConsolePollTool(deps) {
2034
- return tool40({
2223
+ return tool44({
2035
2224
  description: "Poll console events for the active target.",
2036
2225
  args: {
2037
- sessionId: z40.string().describe("Session id"),
2038
- sinceSeq: z40.number().int().optional().describe("Sequence to resume from"),
2039
- max: z40.number().int().optional().describe("Max events to return")
2226
+ sessionId: z44.string().describe("Session id"),
2227
+ sinceSeq: z44.number().int().optional().describe("Sequence to resume from"),
2228
+ max: z44.number().int().optional().describe("Max events to return")
2040
2229
  },
2041
2230
  async execute(args) {
2042
2231
  try {
@@ -2054,15 +2243,15 @@ function createConsolePollTool(deps) {
2054
2243
  }
2055
2244
 
2056
2245
  // src/tools/network_poll.ts
2057
- import { tool as tool41 } from "@opencode-ai/plugin";
2058
- var z41 = tool41.schema;
2246
+ import { tool as tool45 } from "@opencode-ai/plugin";
2247
+ var z45 = tool45.schema;
2059
2248
  function createNetworkPollTool(deps) {
2060
- return tool41({
2249
+ return tool45({
2061
2250
  description: "Poll network events for the active target.",
2062
2251
  args: {
2063
- sessionId: z41.string().describe("Session id"),
2064
- sinceSeq: z41.number().int().optional().describe("Sequence to resume from"),
2065
- max: z41.number().int().optional().describe("Max events to return")
2252
+ sessionId: z45.string().describe("Session id"),
2253
+ sinceSeq: z45.number().int().optional().describe("Sequence to resume from"),
2254
+ max: z45.number().int().optional().describe("Max events to return")
2066
2255
  },
2067
2256
  async execute(args) {
2068
2257
  try {
@@ -2080,18 +2269,18 @@ function createNetworkPollTool(deps) {
2080
2269
  }
2081
2270
 
2082
2271
  // src/tools/debug_trace_snapshot.ts
2083
- import { tool as tool42 } from "@opencode-ai/plugin";
2084
- var z42 = tool42.schema;
2272
+ import { tool as tool46 } from "@opencode-ai/plugin";
2273
+ var z46 = tool46.schema;
2085
2274
  function createDebugTraceSnapshotTool(deps) {
2086
- return tool42({
2275
+ return tool46({
2087
2276
  description: "Capture a combined debug trace snapshot (page + console + network + exceptions).",
2088
2277
  args: {
2089
- sessionId: z42.string().describe("Session id"),
2090
- sinceConsoleSeq: z42.number().int().optional().describe("Resume cursor for console events"),
2091
- sinceNetworkSeq: z42.number().int().optional().describe("Resume cursor for network events"),
2092
- sinceExceptionSeq: z42.number().int().optional().describe("Resume cursor for exception events"),
2093
- max: z42.number().int().optional().describe("Max events per channel"),
2094
- requestId: z42.string().optional().describe("Optional trace request id")
2278
+ sessionId: z46.string().describe("Session id"),
2279
+ sinceConsoleSeq: z46.number().int().optional().describe("Resume cursor for console events"),
2280
+ sinceNetworkSeq: z46.number().int().optional().describe("Resume cursor for network events"),
2281
+ sinceExceptionSeq: z46.number().int().optional().describe("Resume cursor for exception events"),
2282
+ max: z46.number().int().optional().describe("Max events per channel"),
2283
+ requestId: z46.string().optional().describe("Optional trace request id")
2095
2284
  },
2096
2285
  async execute(args) {
2097
2286
  try {
@@ -2201,8 +2390,8 @@ function extractHosts(events) {
2201
2390
  }
2202
2391
 
2203
2392
  // src/tools/cookie_import.ts
2204
- import { tool as tool43 } from "@opencode-ai/plugin";
2205
- var z43 = tool43.schema;
2393
+ import { tool as tool47 } from "@opencode-ai/plugin";
2394
+ var z47 = tool47.schema;
2206
2395
  function validateCookieRecord(cookie) {
2207
2396
  const name = cookie.name?.trim();
2208
2397
  if (!name) {
@@ -2281,23 +2470,23 @@ function validateCookieRecord(cookie) {
2281
2470
  };
2282
2471
  }
2283
2472
  function createCookieImportTool(deps) {
2284
- return tool43({
2473
+ return tool47({
2285
2474
  description: "Import validated cookies into the current session context.",
2286
2475
  args: {
2287
- sessionId: z43.string().describe("Session id"),
2288
- cookies: z43.array(z43.object({
2289
- name: z43.string().min(1),
2290
- value: z43.string(),
2291
- url: z43.string().optional(),
2292
- domain: z43.string().optional(),
2293
- path: z43.string().optional(),
2294
- expires: z43.number().optional(),
2295
- httpOnly: z43.boolean().optional(),
2296
- secure: z43.boolean().optional(),
2297
- sameSite: z43.enum(["Strict", "Lax", "None"]).optional()
2476
+ sessionId: z47.string().describe("Session id"),
2477
+ cookies: z47.array(z47.object({
2478
+ name: z47.string().min(1),
2479
+ value: z47.string(),
2480
+ url: z47.string().optional(),
2481
+ domain: z47.string().optional(),
2482
+ path: z47.string().optional(),
2483
+ expires: z47.number().optional(),
2484
+ httpOnly: z47.boolean().optional(),
2485
+ secure: z47.boolean().optional(),
2486
+ sameSite: z47.enum(["Strict", "Lax", "None"]).optional()
2298
2487
  })).min(1).describe("Cookies to import"),
2299
- strict: z43.boolean().optional().describe("Reject on first invalid cookie (default true)"),
2300
- requestId: z43.string().optional().describe("Optional trace request id")
2488
+ strict: z47.boolean().optional().describe("Reject on first invalid cookie (default true)"),
2489
+ requestId: z47.string().optional().describe("Optional trace request id")
2301
2490
  },
2302
2491
  async execute(args) {
2303
2492
  try {
@@ -2339,8 +2528,8 @@ function createCookieImportTool(deps) {
2339
2528
  }
2340
2529
 
2341
2530
  // src/tools/cookie_list.ts
2342
- import { tool as tool44 } from "@opencode-ai/plugin";
2343
- var z44 = tool44.schema;
2531
+ import { tool as tool48 } from "@opencode-ai/plugin";
2532
+ var z48 = tool48.schema;
2344
2533
  function normalizeCookieUrls(urls) {
2345
2534
  if (!urls || urls.length === 0) {
2346
2535
  return void 0;
@@ -2371,12 +2560,12 @@ function normalizeCookieUrls(urls) {
2371
2560
  return normalized;
2372
2561
  }
2373
2562
  function createCookieListTool(deps) {
2374
- return tool44({
2563
+ return tool48({
2375
2564
  description: "List cookies in the current session context with optional URL filtering.",
2376
2565
  args: {
2377
- sessionId: z44.string().describe("Session id"),
2378
- urls: z44.array(z44.string().min(1)).optional().describe("Optional URL filters for cookie scoping"),
2379
- requestId: z44.string().optional().describe("Optional trace request id")
2566
+ sessionId: z48.string().describe("Session id"),
2567
+ urls: z48.array(z48.string().min(1)).optional().describe("Optional URL filters for cookie scoping"),
2568
+ requestId: z48.string().optional().describe("Optional trace request id")
2380
2569
  },
2381
2570
  async execute(args) {
2382
2571
  try {
@@ -2416,7 +2605,7 @@ function createCookieListTool(deps) {
2416
2605
  }
2417
2606
 
2418
2607
  // src/tools/macro_resolve.ts
2419
- import { tool as tool45 } from "@opencode-ai/plugin";
2608
+ import { tool as tool49 } from "@opencode-ai/plugin";
2420
2609
 
2421
2610
  // src/tools/workflow-runtime.ts
2422
2611
  var resolveProviderRuntime = async (deps, options) => {
@@ -2430,7 +2619,7 @@ var resolveProviderRuntime = async (deps, options) => {
2430
2619
  };
2431
2620
 
2432
2621
  // src/tools/macro_resolve.ts
2433
- var z45 = tool45.schema;
2622
+ var z49 = tool49.schema;
2434
2623
  async function loadMacroRuntime() {
2435
2624
  try {
2436
2625
  const module = await import("./macros-ND2M7LWU.js");
@@ -2478,13 +2667,13 @@ function parseFallbackMacro(expression, defaultProvider) {
2478
2667
  };
2479
2668
  }
2480
2669
  function createMacroResolveTool(deps) {
2481
- return tool45({
2670
+ return tool49({
2482
2671
  description: "Resolve a macro expression to a provider action with provenance metadata.",
2483
2672
  args: {
2484
- expression: z45.string().min(2).describe('Macro expression, e.g. @web.search("query")'),
2485
- defaultProvider: z45.string().optional().describe("Default provider fallback"),
2486
- includeCatalog: z45.boolean().optional().describe("Include available runtime macro names"),
2487
- execute: z45.boolean().optional().describe("Execute the resolved provider action and include execution payload")
2673
+ expression: z49.string().min(2).describe('Macro expression, e.g. @web.search("query")'),
2674
+ defaultProvider: z49.string().optional().describe("Default provider fallback"),
2675
+ includeCatalog: z49.boolean().optional().describe("Include available runtime macro names"),
2676
+ execute: z49.boolean().optional().describe("Execute the resolved provider action and include execution payload")
2488
2677
  },
2489
2678
  async execute(args) {
2490
2679
  try {
@@ -2532,14 +2721,14 @@ function createMacroResolveTool(deps) {
2532
2721
  }
2533
2722
 
2534
2723
  // src/tools/clone_page.ts
2535
- import { tool as tool46 } from "@opencode-ai/plugin";
2536
- var z46 = tool46.schema;
2724
+ import { tool as tool50 } from "@opencode-ai/plugin";
2725
+ var z50 = tool50.schema;
2537
2726
  function createClonePageTool(deps) {
2538
- return tool46({
2727
+ return tool50({
2539
2728
  description: "Export the active page as a React component and CSS bundle.",
2540
2729
  args: {
2541
- sessionId: z46.string().describe("Active browser session id"),
2542
- targetId: z46.string().optional().describe("Optional target id")
2730
+ sessionId: z50.string().describe("Active browser session id"),
2731
+ targetId: z50.string().optional().describe("Optional target id")
2543
2732
  },
2544
2733
  async execute(args) {
2545
2734
  try {
@@ -2553,15 +2742,15 @@ function createClonePageTool(deps) {
2553
2742
  }
2554
2743
 
2555
2744
  // src/tools/clone_component.ts
2556
- import { tool as tool47 } from "@opencode-ai/plugin";
2557
- var z47 = tool47.schema;
2745
+ import { tool as tool51 } from "@opencode-ai/plugin";
2746
+ var z51 = tool51.schema;
2558
2747
  function createCloneComponentTool(deps) {
2559
- return tool47({
2748
+ return tool51({
2560
2749
  description: "Export a selected element subtree as a React component and CSS bundle.",
2561
2750
  args: {
2562
- sessionId: z47.string().describe("Active browser session id"),
2563
- targetId: z47.string().optional().describe("Optional target id"),
2564
- ref: z47.string().describe("Element ref from snapshot")
2751
+ sessionId: z51.string().describe("Active browser session id"),
2752
+ targetId: z51.string().optional().describe("Optional target id"),
2753
+ ref: z51.string().describe("Element ref from snapshot")
2565
2754
  },
2566
2755
  async execute(args) {
2567
2756
  try {
@@ -2575,14 +2764,14 @@ function createCloneComponentTool(deps) {
2575
2764
  }
2576
2765
 
2577
2766
  // src/tools/perf.ts
2578
- import { tool as tool48 } from "@opencode-ai/plugin";
2579
- var z48 = tool48.schema;
2767
+ import { tool as tool52 } from "@opencode-ai/plugin";
2768
+ var z52 = tool52.schema;
2580
2769
  function createPerfTool(deps) {
2581
- return tool48({
2770
+ return tool52({
2582
2771
  description: "Fetch lightweight performance metrics from the active page.",
2583
2772
  args: {
2584
- sessionId: z48.string().describe("Active browser session id"),
2585
- targetId: z48.string().optional().describe("Optional target id")
2773
+ sessionId: z52.string().describe("Active browser session id"),
2774
+ targetId: z52.string().optional().describe("Optional target id")
2586
2775
  },
2587
2776
  async execute(args) {
2588
2777
  try {
@@ -2596,17 +2785,17 @@ function createPerfTool(deps) {
2596
2785
  }
2597
2786
 
2598
2787
  // src/tools/screenshot.ts
2599
- import { tool as tool49 } from "@opencode-ai/plugin";
2600
- var z49 = tool49.schema;
2788
+ import { tool as tool53 } from "@opencode-ai/plugin";
2789
+ var z53 = tool53.schema;
2601
2790
  function createScreenshotTool(deps) {
2602
- return tool49({
2791
+ return tool53({
2603
2792
  description: "Capture a screenshot of the active page.",
2604
2793
  args: {
2605
- sessionId: z49.string().describe("Active browser session id"),
2606
- targetId: z49.string().optional().describe("Optional target id"),
2607
- path: z49.string().optional().describe("Optional output file path"),
2608
- ref: z49.string().optional().describe("Optional snapshot ref for an element capture"),
2609
- fullPage: z49.boolean().optional().describe("Capture the full scrollable page")
2794
+ sessionId: z53.string().describe("Active browser session id"),
2795
+ targetId: z53.string().optional().describe("Optional target id"),
2796
+ path: z53.string().optional().describe("Optional output file path"),
2797
+ ref: z53.string().optional().describe("Optional snapshot ref for an element capture"),
2798
+ fullPage: z53.boolean().optional().describe("Capture the full scrollable page")
2610
2799
  },
2611
2800
  async execute(args) {
2612
2801
  try {
@@ -2625,17 +2814,17 @@ function createScreenshotTool(deps) {
2625
2814
  }
2626
2815
 
2627
2816
  // src/tools/screencast_start.ts
2628
- import { tool as tool50 } from "@opencode-ai/plugin";
2629
- var z50 = tool50.schema;
2817
+ import { tool as tool54 } from "@opencode-ai/plugin";
2818
+ var z54 = tool54.schema;
2630
2819
  function createScreencastStartTool(deps) {
2631
- return tool50({
2820
+ return tool54({
2632
2821
  description: "Start a browser screencast replay capture.",
2633
2822
  args: {
2634
- sessionId: z50.string().describe("Active browser session id"),
2635
- targetId: z50.string().optional().describe("Optional target id"),
2636
- outputDir: z50.string().optional().describe("Optional screencast output directory"),
2637
- intervalMs: z50.number().int().min(250).optional().describe("Frame capture interval in milliseconds"),
2638
- maxFrames: z50.number().int().min(1).optional().describe("Maximum frame count before auto-stop")
2823
+ sessionId: z54.string().describe("Active browser session id"),
2824
+ targetId: z54.string().optional().describe("Optional target id"),
2825
+ outputDir: z54.string().optional().describe("Optional screencast output directory"),
2826
+ intervalMs: z54.number().int().min(250).optional().describe("Frame capture interval in milliseconds"),
2827
+ maxFrames: z54.number().int().min(1).optional().describe("Maximum frame count before auto-stop")
2639
2828
  },
2640
2829
  async execute(args) {
2641
2830
  try {
@@ -2654,14 +2843,14 @@ function createScreencastStartTool(deps) {
2654
2843
  }
2655
2844
 
2656
2845
  // src/tools/screencast_stop.ts
2657
- import { tool as tool51 } from "@opencode-ai/plugin";
2658
- var z51 = tool51.schema;
2846
+ import { tool as tool55 } from "@opencode-ai/plugin";
2847
+ var z55 = tool55.schema;
2659
2848
  function createScreencastStopTool(deps) {
2660
- return tool51({
2849
+ return tool55({
2661
2850
  description: "Stop a browser screencast replay capture.",
2662
2851
  args: {
2663
- sessionId: z51.string().describe("Browser session id that owns the screencast"),
2664
- screencastId: z51.string().describe("Active screencast id")
2852
+ sessionId: z55.string().describe("Browser session id that owns the screencast"),
2853
+ screencastId: z55.string().describe("Active screencast id")
2665
2854
  },
2666
2855
  async execute(args) {
2667
2856
  try {
@@ -2675,16 +2864,16 @@ function createScreencastStopTool(deps) {
2675
2864
  }
2676
2865
 
2677
2866
  // src/tools/dialog.ts
2678
- import { tool as tool52 } from "@opencode-ai/plugin";
2679
- var z52 = tool52.schema;
2867
+ import { tool as tool56 } from "@opencode-ai/plugin";
2868
+ var z56 = tool56.schema;
2680
2869
  function createDialogTool(deps) {
2681
- return tool52({
2870
+ return tool56({
2682
2871
  description: "Inspect or handle a JavaScript dialog.",
2683
2872
  args: {
2684
- sessionId: z52.string().describe("Active browser session id"),
2685
- targetId: z52.string().optional().describe("Optional target id"),
2686
- action: z52.enum(["status", "accept", "dismiss"]).optional().describe("Dialog action"),
2687
- promptText: z52.string().optional().describe("Prompt text to submit when accepting a prompt dialog")
2873
+ sessionId: z56.string().describe("Active browser session id"),
2874
+ targetId: z56.string().optional().describe("Optional target id"),
2875
+ action: z56.enum(["status", "accept", "dismiss"]).optional().describe("Dialog action"),
2876
+ promptText: z56.string().optional().describe("Prompt text to submit when accepting a prompt dialog")
2688
2877
  },
2689
2878
  async execute(args) {
2690
2879
  try {
@@ -2702,7 +2891,7 @@ function createDialogTool(deps) {
2702
2891
  }
2703
2892
 
2704
2893
  // src/tools/desktop_status.ts
2705
- import { tool as tool53 } from "@opencode-ai/plugin";
2894
+ import { tool as tool57 } from "@opencode-ai/plugin";
2706
2895
 
2707
2896
  // src/tools/desktop-shared.ts
2708
2897
  function isRecord(value) {
@@ -2732,7 +2921,7 @@ function desktopToolFailure(error, code) {
2732
2921
 
2733
2922
  // src/tools/desktop_status.ts
2734
2923
  function createDesktopStatusTool(deps) {
2735
- return tool53({
2924
+ return tool57({
2736
2925
  description: "Inspect sibling desktop observation availability.",
2737
2926
  args: {},
2738
2927
  async execute() {
@@ -2750,13 +2939,13 @@ function createDesktopStatusTool(deps) {
2750
2939
  }
2751
2940
 
2752
2941
  // src/tools/desktop_windows.ts
2753
- import { tool as tool54 } from "@opencode-ai/plugin";
2754
- var z53 = tool54.schema;
2942
+ import { tool as tool58 } from "@opencode-ai/plugin";
2943
+ var z57 = tool58.schema;
2755
2944
  function createDesktopWindowsTool(deps) {
2756
- return tool54({
2945
+ return tool58({
2757
2946
  description: "List observable desktop windows.",
2758
2947
  args: {
2759
- reason: z53.string().optional().describe("Optional audit reason")
2948
+ reason: z57.string().optional().describe("Optional audit reason")
2760
2949
  },
2761
2950
  async execute(args) {
2762
2951
  const runtime = requireDesktopRuntime(deps);
@@ -2773,13 +2962,13 @@ function createDesktopWindowsTool(deps) {
2773
2962
  }
2774
2963
 
2775
2964
  // src/tools/desktop_active_window.ts
2776
- import { tool as tool55 } from "@opencode-ai/plugin";
2777
- var z54 = tool55.schema;
2965
+ import { tool as tool59 } from "@opencode-ai/plugin";
2966
+ var z58 = tool59.schema;
2778
2967
  function createDesktopActiveWindowTool(deps) {
2779
- return tool55({
2968
+ return tool59({
2780
2969
  description: "Inspect the active desktop window.",
2781
2970
  args: {
2782
- reason: z54.string().optional().describe("Optional audit reason")
2971
+ reason: z58.string().optional().describe("Optional audit reason")
2783
2972
  },
2784
2973
  async execute(args) {
2785
2974
  const runtime = requireDesktopRuntime(deps);
@@ -2796,13 +2985,13 @@ function createDesktopActiveWindowTool(deps) {
2796
2985
  }
2797
2986
 
2798
2987
  // src/tools/desktop_capture_desktop.ts
2799
- import { tool as tool56 } from "@opencode-ai/plugin";
2800
- var z55 = tool56.schema;
2988
+ import { tool as tool60 } from "@opencode-ai/plugin";
2989
+ var z59 = tool60.schema;
2801
2990
  function createDesktopCaptureDesktopTool(deps) {
2802
- return tool56({
2991
+ return tool60({
2803
2992
  description: "Capture the current desktop surface.",
2804
2993
  args: {
2805
- reason: z55.string().describe("Audit reason for the capture")
2994
+ reason: z59.string().describe("Audit reason for the capture")
2806
2995
  },
2807
2996
  async execute(args) {
2808
2997
  const runtime = requireDesktopRuntime(deps);
@@ -2819,14 +3008,14 @@ function createDesktopCaptureDesktopTool(deps) {
2819
3008
  }
2820
3009
 
2821
3010
  // src/tools/desktop_capture_window.ts
2822
- import { tool as tool57 } from "@opencode-ai/plugin";
2823
- var z56 = tool57.schema;
3011
+ import { tool as tool61 } from "@opencode-ai/plugin";
3012
+ var z60 = tool61.schema;
2824
3013
  function createDesktopCaptureWindowTool(deps) {
2825
- return tool57({
3014
+ return tool61({
2826
3015
  description: "Capture a specific desktop window.",
2827
3016
  args: {
2828
- windowId: z56.string().describe("Desktop window id"),
2829
- reason: z56.string().describe("Audit reason for the capture")
3017
+ windowId: z60.string().describe("Desktop window id"),
3018
+ reason: z60.string().describe("Audit reason for the capture")
2830
3019
  },
2831
3020
  async execute(args) {
2832
3021
  const runtime = requireDesktopRuntime(deps);
@@ -2843,14 +3032,14 @@ function createDesktopCaptureWindowTool(deps) {
2843
3032
  }
2844
3033
 
2845
3034
  // src/tools/desktop_accessibility_snapshot.ts
2846
- import { tool as tool58 } from "@opencode-ai/plugin";
2847
- var z57 = tool58.schema;
3035
+ import { tool as tool62 } from "@opencode-ai/plugin";
3036
+ var z61 = tool62.schema;
2848
3037
  function createDesktopAccessibilitySnapshotTool(deps) {
2849
- return tool58({
3038
+ return tool62({
2850
3039
  description: "Capture desktop accessibility state.",
2851
3040
  args: {
2852
- reason: z57.string().describe("Audit reason for the accessibility snapshot"),
2853
- windowId: z57.string().optional().describe("Optional desktop window id")
3041
+ reason: z61.string().describe("Audit reason for the accessibility snapshot"),
3042
+ windowId: z61.string().optional().describe("Optional desktop window id")
2854
3043
  },
2855
3044
  async execute(args) {
2856
3045
  const runtime = requireDesktopRuntime(deps);
@@ -2867,25 +3056,25 @@ function createDesktopAccessibilitySnapshotTool(deps) {
2867
3056
  }
2868
3057
 
2869
3058
  // src/tools/annotate.ts
2870
- import { tool as tool59 } from "@opencode-ai/plugin";
2871
- var z58 = tool59.schema;
2872
- var screenshotModeSchema = z58.enum(["visible", "full", "none"]);
2873
- var transportSchema = z58.enum(["auto", "direct", "relay"]);
3059
+ import { tool as tool63 } from "@opencode-ai/plugin";
3060
+ var z62 = tool63.schema;
3061
+ var screenshotModeSchema = z62.enum(["visible", "full", "none"]);
3062
+ var transportSchema = z62.enum(["auto", "direct", "relay"]);
2874
3063
  function createAnnotateTool(deps) {
2875
- return tool59({
3064
+ return tool63({
2876
3065
  description: "Request interactive annotations via direct (CDP) or relay transport.",
2877
3066
  args: {
2878
- sessionId: z58.string().describe("Session id"),
2879
- stored: z58.boolean().optional().describe("Fetch the latest payload explicitly sent from popup/canvas surfaces"),
2880
- includeScreenshots: z58.boolean().optional().describe("When fetching stored payloads, prefer screenshots if still available in memory"),
3067
+ sessionId: z62.string().describe("Session id"),
3068
+ stored: z62.boolean().optional().describe("Fetch the latest payload explicitly sent from popup/canvas surfaces"),
3069
+ includeScreenshots: z62.boolean().optional().describe("When fetching stored payloads, prefer screenshots if still available in memory"),
2881
3070
  transport: transportSchema.optional().describe("auto | direct | relay (default: auto)"),
2882
- targetId: z58.string().optional().describe("Optional target id for direct mode"),
2883
- tabId: z58.number().int().optional().describe("Optional Chrome tab id for relay mode"),
2884
- url: z58.string().optional().describe("Optional URL to open before annotating"),
3071
+ targetId: z62.string().optional().describe("Optional target id for direct mode"),
3072
+ tabId: z62.number().int().optional().describe("Optional Chrome tab id for relay mode"),
3073
+ url: z62.string().optional().describe("Optional URL to open before annotating"),
2885
3074
  screenshotMode: screenshotModeSchema.optional().describe("visible | full | none (default: visible)"),
2886
- debug: z58.boolean().optional().describe("Include debug metadata"),
2887
- context: z58.string().optional().describe("Optional context for the annotator"),
2888
- timeoutMs: z58.number().int().optional().describe("Timeout in milliseconds")
3075
+ debug: z62.boolean().optional().describe("Include debug metadata"),
3076
+ context: z62.string().optional().describe("Optional context for the annotator"),
3077
+ timeoutMs: z62.number().int().optional().describe("Timeout in milliseconds")
2889
3078
  },
2890
3079
  async execute(args) {
2891
3080
  try {
@@ -2934,36 +3123,36 @@ function createAnnotateTool(deps) {
2934
3123
  }
2935
3124
 
2936
3125
  // src/tools/research_run.ts
2937
- import { tool as tool60 } from "@opencode-ai/plugin";
2938
- var z59 = tool60.schema;
2939
- var sourceSelectionSchema = z59.enum(["auto", "web", "community", "social", "shopping", "all"]);
2940
- var sourceSchema = z59.enum(["web", "community", "social", "shopping"]);
2941
- var modeSchema = z59.enum(["compact", "json", "md", "context", "path"]);
2942
- var cookiePolicySchema = z59.enum(["off", "auto", "required"]);
2943
- var challengeAutomationModeSchema = z59.enum(CHALLENGE_AUTOMATION_MODES);
3126
+ import { tool as tool64 } from "@opencode-ai/plugin";
3127
+ var z63 = tool64.schema;
3128
+ var sourceSelectionSchema = z63.enum(["auto", "web", "community", "social", "shopping", "all"]);
3129
+ var sourceSchema = z63.enum(["web", "community", "social", "shopping"]);
3130
+ var modeSchema = z63.enum(["compact", "json", "md", "context", "path"]);
3131
+ var cookiePolicySchema = z63.enum(["off", "auto", "required"]);
3132
+ var challengeAutomationModeSchema4 = z63.enum(CHALLENGE_AUTOMATION_MODES);
2944
3133
  function createResearchRunTool(deps) {
2945
- return tool60({
3134
+ return tool64({
2946
3135
  description: "Run cross-source research with strict timebox and artifact outputs.",
2947
3136
  args: {
2948
- topic: z59.string().min(1).describe("Research topic"),
2949
- days: z59.number().int().positive().optional().describe("Timebox in days"),
2950
- from: z59.string().optional().describe("ISO start date"),
2951
- to: z59.string().optional().describe("ISO end date"),
3137
+ topic: z63.string().min(1).describe("Research topic"),
3138
+ days: z63.number().int().positive().optional().describe("Timebox in days"),
3139
+ from: z63.string().optional().describe("ISO start date"),
3140
+ to: z63.string().optional().describe("ISO end date"),
2952
3141
  sourceSelection: sourceSelectionSchema.optional().describe("auto|web|community|social|shopping|all"),
2953
- sources: z59.array(sourceSchema).optional().describe("Explicit source list"),
3142
+ sources: z63.array(sourceSchema).optional().describe("Explicit source list"),
2954
3143
  mode: modeSchema.optional().describe("compact|json|md|context|path"),
2955
- includeEngagement: z59.boolean().optional().describe("Include engagement enrichment"),
2956
- limitPerSource: z59.number().int().positive().optional().describe("Result limit per source"),
2957
- outputDir: z59.string().optional().describe("Optional artifact output directory"),
2958
- ttlHours: z59.number().int().positive().optional().describe("Artifact retention TTL in hours"),
2959
- useCookies: z59.boolean().optional().describe("Enable/disable provider cookie injection for this run"),
2960
- challengeAutomationMode: challengeAutomationModeSchema.optional().describe("Challenge automation mode: off|browser|browser_with_helper"),
3144
+ includeEngagement: z63.boolean().optional().describe("Include engagement enrichment"),
3145
+ limitPerSource: z63.number().int().positive().optional().describe("Result limit per source"),
3146
+ outputDir: z63.string().optional().describe("Optional artifact output directory"),
3147
+ ttlHours: z63.number().int().positive().optional().describe("Artifact retention TTL in hours"),
3148
+ useCookies: z63.boolean().optional().describe("Enable/disable provider cookie injection for this run"),
3149
+ challengeAutomationMode: challengeAutomationModeSchema4.optional().describe("Challenge automation mode: off|browser|browser_with_helper"),
2961
3150
  cookiePolicyOverride: cookiePolicySchema.optional().describe("Override cookie policy: off|auto|required")
2962
3151
  },
2963
3152
  async execute(args) {
2964
3153
  try {
2965
3154
  const runtime = await resolveProviderRuntime(deps);
2966
- const { runResearchWorkflow } = await import("./providers-G36AM3Z2.js");
3155
+ const { runResearchWorkflow } = await import("./providers-ZIVHHH4F.js");
2967
3156
  const result = await runResearchWorkflow(runtime, {
2968
3157
  topic: args.topic,
2969
3158
  days: args.days,
@@ -2989,32 +3178,32 @@ function createResearchRunTool(deps) {
2989
3178
  }
2990
3179
 
2991
3180
  // src/tools/shopping_run.ts
2992
- import { tool as tool61 } from "@opencode-ai/plugin";
2993
- var z60 = tool61.schema;
2994
- var sortSchema = z60.enum(["best_deal", "lowest_price", "highest_rating", "fastest_shipping"]);
2995
- var modeSchema2 = z60.enum(["compact", "json", "md", "context", "path"]);
2996
- var cookiePolicySchema2 = z60.enum(["off", "auto", "required"]);
2997
- var challengeAutomationModeSchema2 = z60.enum(CHALLENGE_AUTOMATION_MODES);
3181
+ import { tool as tool65 } from "@opencode-ai/plugin";
3182
+ var z64 = tool65.schema;
3183
+ var sortSchema = z64.enum(["best_deal", "lowest_price", "highest_rating", "fastest_shipping"]);
3184
+ var modeSchema2 = z64.enum(["compact", "json", "md", "context", "path"]);
3185
+ var cookiePolicySchema2 = z64.enum(["off", "auto", "required"]);
3186
+ var challengeAutomationModeSchema5 = z64.enum(CHALLENGE_AUTOMATION_MODES);
2998
3187
  function createShoppingRunTool(deps) {
2999
- return tool61({
3188
+ return tool65({
3000
3189
  description: "Run shopping/deal intelligence across shopping providers.",
3001
3190
  args: {
3002
- query: z60.string().min(1).describe("Shopping query"),
3003
- providers: z60.array(z60.string()).optional().describe("Optional provider allow-list"),
3004
- budget: z60.number().positive().optional().describe("Optional budget amount"),
3005
- region: z60.string().optional().describe("Region hint"),
3191
+ query: z64.string().min(1).describe("Shopping query"),
3192
+ providers: z64.array(z64.string()).optional().describe("Optional provider allow-list"),
3193
+ budget: z64.number().positive().optional().describe("Optional budget amount"),
3194
+ region: z64.string().optional().describe("Region hint"),
3006
3195
  sort: sortSchema.optional().describe("best_deal|lowest_price|highest_rating|fastest_shipping"),
3007
3196
  mode: modeSchema2.optional().describe("compact|json|md|context|path"),
3008
- outputDir: z60.string().optional().describe("Optional artifact output directory"),
3009
- ttlHours: z60.number().int().positive().optional().describe("Artifact retention TTL in hours"),
3010
- useCookies: z60.boolean().optional().describe("Enable/disable provider cookie injection for this run"),
3011
- challengeAutomationMode: challengeAutomationModeSchema2.optional().describe("Challenge automation mode: off|browser|browser_with_helper"),
3197
+ outputDir: z64.string().optional().describe("Optional artifact output directory"),
3198
+ ttlHours: z64.number().int().positive().optional().describe("Artifact retention TTL in hours"),
3199
+ useCookies: z64.boolean().optional().describe("Enable/disable provider cookie injection for this run"),
3200
+ challengeAutomationMode: challengeAutomationModeSchema5.optional().describe("Challenge automation mode: off|browser|browser_with_helper"),
3012
3201
  cookiePolicyOverride: cookiePolicySchema2.optional().describe("Override cookie policy: off|auto|required")
3013
3202
  },
3014
3203
  async execute(args) {
3015
3204
  try {
3016
3205
  const runtime = await resolveProviderRuntime(deps);
3017
- const { runShoppingWorkflow } = await import("./providers-G36AM3Z2.js");
3206
+ const { runShoppingWorkflow } = await import("./providers-ZIVHHH4F.js");
3018
3207
  const result = await runShoppingWorkflow(runtime, {
3019
3208
  query: args.query,
3020
3209
  providers: args.providers,
@@ -3037,10 +3226,10 @@ function createShoppingRunTool(deps) {
3037
3226
  }
3038
3227
 
3039
3228
  // src/tools/product_video_run.ts
3040
- import { tool as tool62 } from "@opencode-ai/plugin";
3041
- var z61 = tool62.schema;
3042
- var cookiePolicySchema3 = z61.enum(["off", "auto", "required"]);
3043
- var challengeAutomationModeSchema3 = z61.enum(CHALLENGE_AUTOMATION_MODES);
3229
+ import { tool as tool66 } from "@opencode-ai/plugin";
3230
+ var z65 = tool66.schema;
3231
+ var cookiePolicySchema3 = z65.enum(["off", "auto", "required"]);
3232
+ var challengeAutomationModeSchema6 = z65.enum(CHALLENGE_AUTOMATION_MODES);
3044
3233
  async function captureScreenshotBuffer(deps, url) {
3045
3234
  let sessionId = null;
3046
3235
  try {
@@ -3064,26 +3253,26 @@ async function captureScreenshotBuffer(deps, url) {
3064
3253
  }
3065
3254
  }
3066
3255
  function createProductVideoRunTool(deps) {
3067
- return tool62({
3256
+ return tool66({
3068
3257
  description: "Collect a product presentation asset pack for video/UGC workflows.",
3069
3258
  args: {
3070
- product_url: z61.string().optional().describe("Product URL"),
3071
- product_name: z61.string().optional().describe("Product name"),
3072
- provider_hint: z61.string().optional().describe("Optional provider hint"),
3073
- include_screenshots: z61.boolean().optional().describe("Include screenshots (default true)"),
3074
- include_all_images: z61.boolean().optional().describe("Include all discovered images (default true)"),
3075
- include_copy: z61.boolean().optional().describe("Include product copy extraction (default true)"),
3076
- output_dir: z61.string().optional().describe("Optional output directory"),
3077
- ttl_hours: z61.number().int().positive().optional().describe("Artifact retention TTL in hours"),
3078
- timeoutMs: z61.number().int().positive().optional().describe("Workflow timeout in milliseconds"),
3079
- useCookies: z61.boolean().optional().describe("Enable/disable provider cookie injection for this run"),
3080
- challengeAutomationMode: challengeAutomationModeSchema3.optional().describe("Challenge automation mode: off|browser|browser_with_helper"),
3259
+ product_url: z65.string().optional().describe("Product URL"),
3260
+ product_name: z65.string().optional().describe("Product name"),
3261
+ provider_hint: z65.string().optional().describe("Optional provider hint"),
3262
+ include_screenshots: z65.boolean().optional().describe("Include screenshots (default true)"),
3263
+ include_all_images: z65.boolean().optional().describe("Include all discovered images (default true)"),
3264
+ include_copy: z65.boolean().optional().describe("Include product copy extraction (default true)"),
3265
+ output_dir: z65.string().optional().describe("Optional output directory"),
3266
+ ttl_hours: z65.number().int().positive().optional().describe("Artifact retention TTL in hours"),
3267
+ timeoutMs: z65.number().int().positive().optional().describe("Workflow timeout in milliseconds"),
3268
+ useCookies: z65.boolean().optional().describe("Enable/disable provider cookie injection for this run"),
3269
+ challengeAutomationMode: challengeAutomationModeSchema6.optional().describe("Challenge automation mode: off|browser|browser_with_helper"),
3081
3270
  cookiePolicyOverride: cookiePolicySchema3.optional().describe("Override cookie policy: off|auto|required")
3082
3271
  },
3083
3272
  async execute(args) {
3084
3273
  try {
3085
3274
  const runtime = await resolveProviderRuntime(deps);
3086
- const { runProductVideoWorkflow } = await import("./providers-G36AM3Z2.js");
3275
+ const { runProductVideoWorkflow } = await import("./providers-ZIVHHH4F.js");
3087
3276
  const includeScreenshots = args.include_screenshots ?? true;
3088
3277
  const result = await runProductVideoWorkflow(runtime, {
3089
3278
  product_url: args.product_url,
@@ -3109,15 +3298,70 @@ function createProductVideoRunTool(deps) {
3109
3298
  });
3110
3299
  }
3111
3300
 
3301
+ // src/tools/inspiredesign_run.ts
3302
+ import { tool as tool67 } from "@opencode-ai/plugin";
3303
+ var z66 = tool67.schema;
3304
+ var modeSchema3 = z66.enum(["compact", "json", "md", "context", "path"]);
3305
+ var captureModeSchema = z66.enum(["off", "deep"]);
3306
+ var cookiePolicySchema4 = z66.enum(["off", "auto", "required"]);
3307
+ var challengeAutomationModeSchema7 = z66.enum(CHALLENGE_AUTOMATION_MODES);
3308
+ function createInspiredesignRunTool(deps) {
3309
+ return tool67({
3310
+ description: "Run the inspiredesign workflow directly.",
3311
+ args: {
3312
+ brief: z66.string().min(1).describe("Inspiredesign brief"),
3313
+ urls: z66.array(z66.string()).optional().describe("Inspiration URLs to analyze"),
3314
+ captureMode: captureModeSchema.optional().describe("Capture mode: off|deep"),
3315
+ includePrototypeGuidance: z66.boolean().optional().describe("Include prototype guidance output"),
3316
+ mode: modeSchema3.optional().describe("compact|json|md|context|path"),
3317
+ timeoutMs: z66.number().int().positive().optional().describe("Workflow timeout in milliseconds"),
3318
+ outputDir: z66.string().optional().describe("Optional artifact output directory"),
3319
+ ttlHours: z66.number().int().positive().optional().describe("Artifact retention TTL in hours"),
3320
+ useCookies: z66.boolean().optional().describe("Enable/disable provider cookie injection for this run"),
3321
+ challengeAutomationMode: challengeAutomationModeSchema7.optional().describe("Challenge automation mode: off|browser|browser_with_helper"),
3322
+ cookiePolicyOverride: cookiePolicySchema4.optional().describe("Override cookie policy: off|auto|required")
3323
+ },
3324
+ async execute(args) {
3325
+ try {
3326
+ const runtime = await resolveProviderRuntime(deps);
3327
+ const { runInspiredesignWorkflow } = await import("./providers-ZIVHHH4F.js");
3328
+ const captureMode = args.captureMode ?? "off";
3329
+ const cookieSource = deps.config.get().providers?.cookieSource;
3330
+ const result = await runInspiredesignWorkflow(runtime, {
3331
+ brief: args.brief,
3332
+ urls: args.urls,
3333
+ captureMode,
3334
+ includePrototypeGuidance: args.includePrototypeGuidance,
3335
+ mode: args.mode ?? "compact",
3336
+ timeoutMs: args.timeoutMs,
3337
+ outputDir: args.outputDir,
3338
+ ttlHours: args.ttlHours,
3339
+ useCookies: args.useCookies,
3340
+ challengeAutomationMode: args.challengeAutomationMode,
3341
+ cookiePolicyOverride: args.cookiePolicyOverride
3342
+ }, {
3343
+ captureReference: captureMode === "deep" ? async (url, options) => captureInspiredesignReferenceFromManager(deps.manager, url, {
3344
+ ...options,
3345
+ cookieSource
3346
+ }) : void 0
3347
+ });
3348
+ return ok(result);
3349
+ } catch (error) {
3350
+ return failure(serializeError(error).message, "inspiredesign_run_failed");
3351
+ }
3352
+ }
3353
+ });
3354
+ }
3355
+
3112
3356
  // src/tools/canvas.ts
3113
- import { tool as tool63 } from "@opencode-ai/plugin";
3114
- var z62 = tool63.schema;
3357
+ import { tool as tool68 } from "@opencode-ai/plugin";
3358
+ var z67 = tool68.schema;
3115
3359
  function createCanvasTool(deps) {
3116
- return tool63({
3360
+ return tool68({
3117
3361
  description: "Execute a typed design-canvas command such as canvas.session.open, canvas.feedback.next, or canvas.document.patch.",
3118
3362
  args: {
3119
- command: z62.string().min(1).describe("Canvas command name"),
3120
- params: z62.record(z62.string(), z62.unknown()).optional().describe("Canvas command payload")
3363
+ command: z67.string().min(1).describe("Canvas command name"),
3364
+ params: z67.record(z67.string(), z67.unknown()).optional().describe("Canvas command payload")
3121
3365
  },
3122
3366
  async execute(args) {
3123
3367
  if (!deps.canvasManager) {
@@ -3141,9 +3385,9 @@ function createCanvasTool(deps) {
3141
3385
  }
3142
3386
 
3143
3387
  // src/tools/skill_list.ts
3144
- import { tool as tool64 } from "@opencode-ai/plugin";
3388
+ import { tool as tool69 } from "@opencode-ai/plugin";
3145
3389
  function createSkillListTool(deps) {
3146
- return tool64({
3390
+ return tool69({
3147
3391
  description: "List bundled and discovered skill packs before choosing a local onboarding or workflow lane.",
3148
3392
  args: {},
3149
3393
  async execute() {
@@ -3162,14 +3406,14 @@ function createSkillListTool(deps) {
3162
3406
  }
3163
3407
 
3164
3408
  // src/tools/skill_load.ts
3165
- import { tool as tool65 } from "@opencode-ai/plugin";
3166
- var z63 = tool65.schema;
3409
+ import { tool as tool70 } from "@opencode-ai/plugin";
3410
+ var z68 = tool70.schema;
3167
3411
  function createSkillLoadTool(deps) {
3168
- return tool65({
3412
+ return tool70({
3169
3413
  description: `Load a local skill directly; start with ${onboarding_metadata_default.skillName} ${onboarding_metadata_default.skillTopic} before low-level browser commands.`,
3170
3414
  args: {
3171
- name: z63.string().describe("Name of the skill to load (e.g., 'opendevbrowser-login-automation', 'opendevbrowser-form-testing')"),
3172
- topic: z63.string().optional().describe("Optional topic to filter the skill content")
3415
+ name: z68.string().describe("Name of the skill to load (e.g., 'opendevbrowser-login-automation', 'opendevbrowser-form-testing')"),
3416
+ topic: z68.string().optional().describe("Optional topic to filter the skill content")
3173
3417
  },
3174
3418
  async execute(args) {
3175
3419
  try {
@@ -3204,7 +3448,19 @@ function createTools(deps) {
3204
3448
  opendevbrowser_connect: wrap("opendevbrowser_connect", createConnectTool(deps)),
3205
3449
  opendevbrowser_disconnect: wrap("opendevbrowser_disconnect", createDisconnectTool(deps)),
3206
3450
  opendevbrowser_status: wrap("opendevbrowser_status", createStatusTool(deps)),
3451
+ opendevbrowser_status_capabilities: wrap(
3452
+ "opendevbrowser_status_capabilities",
3453
+ createStatusCapabilitiesTool(deps)
3454
+ ),
3207
3455
  opendevbrowser_session_inspector: wrap("opendevbrowser_session_inspector", createSessionInspectorTool(deps)),
3456
+ opendevbrowser_session_inspector_plan: wrap(
3457
+ "opendevbrowser_session_inspector_plan",
3458
+ createSessionInspectorPlanTool(deps)
3459
+ ),
3460
+ opendevbrowser_session_inspector_audit: wrap(
3461
+ "opendevbrowser_session_inspector_audit",
3462
+ createSessionInspectorAuditTool(deps)
3463
+ ),
3208
3464
  opendevbrowser_targets_list: wrap("opendevbrowser_targets_list", createTargetsListTool(deps)),
3209
3465
  opendevbrowser_target_use: wrap("opendevbrowser_target_use", createTargetUseTool(deps)),
3210
3466
  opendevbrowser_target_new: wrap("opendevbrowser_target_new", createTargetNewTool(deps)),
@@ -3216,6 +3472,7 @@ function createTools(deps) {
3216
3472
  opendevbrowser_wait: wrap("opendevbrowser_wait", createWaitTool(deps)),
3217
3473
  opendevbrowser_snapshot: wrap("opendevbrowser_snapshot", createSnapshotTool(deps)),
3218
3474
  opendevbrowser_review: wrap("opendevbrowser_review", createReviewTool(deps)),
3475
+ opendevbrowser_review_desktop: wrap("opendevbrowser_review_desktop", createReviewDesktopTool(deps)),
3219
3476
  opendevbrowser_click: wrap("opendevbrowser_click", createClickTool(deps)),
3220
3477
  opendevbrowser_hover: wrap("opendevbrowser_hover", createHoverTool(deps)),
3221
3478
  opendevbrowser_press: wrap("opendevbrowser_press", createPressTool(deps)),
@@ -3248,6 +3505,7 @@ function createTools(deps) {
3248
3505
  opendevbrowser_research_run: wrap("opendevbrowser_research_run", createResearchRunTool(deps)),
3249
3506
  opendevbrowser_shopping_run: wrap("opendevbrowser_shopping_run", createShoppingRunTool(deps)),
3250
3507
  opendevbrowser_product_video_run: wrap("opendevbrowser_product_video_run", createProductVideoRunTool(deps)),
3508
+ opendevbrowser_inspiredesign_run: wrap("opendevbrowser_inspiredesign_run", createInspiredesignRunTool(deps)),
3251
3509
  opendevbrowser_canvas: wrap("opendevbrowser_canvas", createCanvasTool(deps)),
3252
3510
  opendevbrowser_clone_page: wrap("opendevbrowser_clone_page", createClonePageTool(deps)),
3253
3511
  opendevbrowser_clone_component: wrap("opendevbrowser_clone_component", createCloneComponentTool(deps)),
@@ -3314,6 +3572,8 @@ var OpenDevBrowserPlugin = async ({ directory, worktree }) => {
3314
3572
  if (!daemonClient) {
3315
3573
  daemonClient = new DaemonClient({ autoRenew: true });
3316
3574
  }
3575
+ const currentConfig = configStore.get();
3576
+ const challengeConfig = requireChallengeOrchestrationConfig(currentConfig);
3317
3577
  manager = new RemoteManager(daemonClient);
3318
3578
  canvasManager = new RemoteCanvasManager(daemonClient);
3319
3579
  desktopRuntime = new RemoteDesktopRuntime(daemonClient);
@@ -3326,12 +3586,17 @@ var OpenDevBrowserPlugin = async ({ directory, worktree }) => {
3326
3586
  browserFallbackPort
3327
3587
  } = createCoreRuntimeAssemblies({
3328
3588
  cacheRoot: core.cacheRoot,
3329
- config: configStore.get(),
3330
- manager
3589
+ config: currentConfig,
3590
+ manager,
3591
+ challengeConfig
3331
3592
  }));
3332
3593
  automationCoordinator = createAutomationCoordinator({
3333
3594
  manager,
3334
- desktopRuntime
3595
+ desktopRuntime,
3596
+ challengeMode: challengeConfig.mode,
3597
+ governedLanes: challengeConfig.governed,
3598
+ helperBridgeEnabled: challengeConfig.optionalComputerUseBridge.enabled,
3599
+ snapshotMaxChars: currentConfig.snapshot.maxChars
3335
3600
  });
3336
3601
  toolDeps.manager = manager;
3337
3602
  toolDeps.canvasManager = canvasManager;
@@ -3353,14 +3618,30 @@ var OpenDevBrowserPlugin = async ({ directory, worktree }) => {
3353
3618
  const deadline = Date.now() + 2e3;
3354
3619
  let attempt = 0;
3355
3620
  let lastError = null;
3621
+ const currentFingerprint = getCurrentDaemonFingerprint();
3356
3622
  while (attempt < 2 && Date.now() < deadline) {
3357
3623
  attempt += 1;
3358
3624
  const status = await fetchDaemonStatusFromMetadata(currentConfig);
3359
- if (status?.ok) {
3625
+ if (status?.ok && status.fingerprint === currentFingerprint) {
3360
3626
  bindRemote();
3361
3627
  await relay?.refresh?.();
3362
3628
  return;
3363
3629
  }
3630
+ if (status?.ok) {
3631
+ const metadata = readDaemonMetadata();
3632
+ const daemonPort = metadata?.port ?? currentConfig.daemonPort;
3633
+ const daemonToken = metadata?.token ?? currentConfig.daemonToken;
3634
+ if (daemonPort > 0 && daemonToken) {
3635
+ try {
3636
+ await fetch(`http://127.0.0.1:${daemonPort}/stop`, {
3637
+ method: "POST",
3638
+ headers: { Authorization: `Bearer ${daemonToken}` }
3639
+ });
3640
+ } catch (error) {
3641
+ lastError = error instanceof Error ? error : new Error(String(error));
3642
+ }
3643
+ }
3644
+ }
3364
3645
  try {
3365
3646
  const { stop } = await startDaemon({ config: currentConfig, directory, worktree });
3366
3647
  hubStop = stop;