@aspectlylabs/mikka 0.0.647 → 0.0.651

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.
package/client.js CHANGED
@@ -2423,6 +2423,7 @@ var harnessInfoSchema = z7.object({
2423
2423
  computerBroker: z7.literal(true).optional(),
2424
2424
  /** Run-scoped CLI approvals and policy-version checks are supported. */
2425
2425
  toolApproval: z7.literal(true).optional(),
2426
+ activeTurnSteer: z7.literal(true).optional(),
2426
2427
  /**
2427
2428
  * The CLI exists but `installed` stays false because the daemon cannot run it
2428
2429
  * in a sandbox. `missing` names the absent packages; empty means the machine
@@ -2607,6 +2608,24 @@ import { z as z12 } from "zod";
2607
2608
 
2608
2609
  // ../protocol/src/user-error-codes.ts
2609
2610
  var USER_ERROR_CODES = {
2611
+ review_auth_required: [],
2612
+ review_not_found: [],
2613
+ not_owner_terminal: [],
2614
+ review_machine_gone: [],
2615
+ review_binding_changed: [],
2616
+ review_checkout_unavailable: [],
2617
+ review_preview_unavailable: ["configuration", "runtime", "protocol", "scope_changed", "limit"],
2618
+ terminal_unsupported: ["local_device", "runtime_version"],
2619
+ terminal_already_controlled: [],
2620
+ terminal_binding_changed: [],
2621
+ terminal_ended: [],
2622
+ terminal_input_too_large: [],
2623
+ terminal_invalid_request: [],
2624
+ terminal_request_conflict: [],
2625
+ terminal_input_uncertain: [],
2626
+ terminal_limit: [],
2627
+ terminal_unavailable: ["configuration", "runtime", "protocol", "installation", "lease"],
2628
+ terminal_control_unavailable: ["fence_unavailable", "fence_lost"],
2610
2629
  review_scope_denied: ["sponsored_placement"],
2611
2630
  workspace_not_found: [],
2612
2631
  workspace_snapshot_unavailable: [],
@@ -2690,6 +2709,8 @@ var USER_ERROR_CODES = {
2690
2709
  web_auth_exchange_rejected: [],
2691
2710
  web_auth_session_expired: [],
2692
2711
  factory_spec_approval_required: [],
2712
+ factory_visual_evidence_required: [],
2713
+ factory_public_evidence_required: [],
2693
2714
  map_invalid_request: ["invalid_query", "invalid_token"],
2694
2715
  map_not_found: [],
2695
2716
  map_snapshot_changed: ["source_changed"],
@@ -2943,6 +2964,7 @@ var runSafePoint = z14.object({
2943
2964
  checkpoint: z14.enum(["ready", "unavailable"]),
2944
2965
  checkpointTakenAt: z14.iso.datetime({ offset: true }).optional()
2945
2966
  }).strict().refine((value) => value.checkpoint === "ready" ? value.checkpointTakenAt !== void 0 && Date.parse(value.observedAt) >= Date.parse(value.checkpointTakenAt) : value.checkpointTakenAt === void 0, { message: "A ready final checkpoint requires its acknowledged snapshot time" });
2967
+ var runVisualEvidence = z14.array(z14.object({ captureId: z14.uuid(), publicSafe: z14.literal(true) }).strict()).max(40);
2946
2968
  var runReport = z14.object({
2947
2969
  repositorySelection: runRepositorySelection.optional(),
2948
2970
  /** Worktree base journaled before the adapter started; never agent-supplied. */
@@ -3011,6 +3033,10 @@ var runReport = z14.object({
3011
3033
  previewDatabaseBranch: z14.string().trim().min(1).max(500).optional(),
3012
3034
  /** Acceptance criteria the agent checked, with evidence. */
3013
3035
  criteria: z14.array(runCriterion).max(200).optional(),
3036
+ /** Captures from this run whose full visible content was checked for public sharing.
3037
+ * This is an explicit content review, not an automatic pixel-redaction claim.
3038
+ * The server resolves capture ownership and creates the existing share URL. */
3039
+ visualEvidence: runVisualEvidence.optional(),
3014
3040
  /** A review completes once; this verdict never changes daemon-owned verification. */
3015
3041
  reviewVerdict: reviewVerdict.optional(),
3016
3042
  /**
@@ -4516,6 +4542,7 @@ var runCommandSchema = z24.discriminatedUnion("kind", [
4516
4542
  messageId: z24.uuid(),
4517
4543
  text: z24.string().min(1).max(1e5)
4518
4544
  }),
4545
+ z24.object({ kind: z24.literal("steer"), runId: id3, messageId: z24.uuid(), text: z24.string().min(1).max(1e5) }),
4519
4546
  z24.object({ kind: z24.literal("stop"), runId: id3 }),
4520
4547
  // A host notification carries addresses only; peer content remains behind
4521
4548
  // the authenticated mailbox read and retains its original provenance.
@@ -4537,7 +4564,8 @@ var runCommandsResponse = z24.object({
4537
4564
  deviceCommands: z24.array(deviceManagementCommand).max(1).optional().catch(void 0)
4538
4565
  });
4539
4566
  var runCommandsAck = z24.object({
4540
- delivered: z24.array(z24.uuid()).max(500)
4567
+ delivered: z24.array(z24.uuid()).max(500),
4568
+ refusedSteers: z24.array(z24.uuid()).max(500).optional()
4541
4569
  });
4542
4570
  var FS_MAX_ENTRIES = 500;
4543
4571
  var fsBrowseRequest = z24.object({
@@ -5069,7 +5097,7 @@ import { join } from "node:path";
5069
5097
  // package.json
5070
5098
  var package_default = {
5071
5099
  name: "@mikka/daemon",
5072
- version: "0.0.647",
5100
+ version: "0.0.651",
5073
5101
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
5074
5102
  type: "module",
5075
5103
  private: true,
@@ -5137,7 +5165,7 @@ var package_default = {
5137
5165
  engines: {
5138
5166
  node: ">=22"
5139
5167
  },
5140
- gitHead: "afc34a9fb79de0e2cb5f4427b676620b4937ecb8"
5168
+ gitHead: "1a57df9c1a1d8e475820afad14e3fa0e6429c60b"
5141
5169
  };
5142
5170
 
5143
5171
  // src/paths.ts
package/http-link.js CHANGED
@@ -2054,6 +2054,24 @@ function causeFields(cause, depth = 4) {
2054
2054
 
2055
2055
  // ../protocol/src/user-error-codes.ts
2056
2056
  var USER_ERROR_CODES = {
2057
+ review_auth_required: [],
2058
+ review_not_found: [],
2059
+ not_owner_terminal: [],
2060
+ review_machine_gone: [],
2061
+ review_binding_changed: [],
2062
+ review_checkout_unavailable: [],
2063
+ review_preview_unavailable: ["configuration", "runtime", "protocol", "scope_changed", "limit"],
2064
+ terminal_unsupported: ["local_device", "runtime_version"],
2065
+ terminal_already_controlled: [],
2066
+ terminal_binding_changed: [],
2067
+ terminal_ended: [],
2068
+ terminal_input_too_large: [],
2069
+ terminal_invalid_request: [],
2070
+ terminal_request_conflict: [],
2071
+ terminal_input_uncertain: [],
2072
+ terminal_limit: [],
2073
+ terminal_unavailable: ["configuration", "runtime", "protocol", "installation", "lease"],
2074
+ terminal_control_unavailable: ["fence_unavailable", "fence_lost"],
2057
2075
  review_scope_denied: ["sponsored_placement"],
2058
2076
  workspace_not_found: [],
2059
2077
  workspace_snapshot_unavailable: [],
@@ -2137,6 +2155,8 @@ var USER_ERROR_CODES = {
2137
2155
  web_auth_exchange_rejected: [],
2138
2156
  web_auth_session_expired: [],
2139
2157
  factory_spec_approval_required: [],
2158
+ factory_visual_evidence_required: [],
2159
+ factory_public_evidence_required: [],
2140
2160
  map_invalid_request: ["invalid_query", "invalid_token"],
2141
2161
  map_not_found: [],
2142
2162
  map_snapshot_changed: ["source_changed"],
@@ -3949,6 +3969,7 @@ var harnessInfoSchema = z18.object({
3949
3969
  computerBroker: z18.literal(true).optional(),
3950
3970
  /** Run-scoped CLI approvals and policy-version checks are supported. */
3951
3971
  toolApproval: z18.literal(true).optional(),
3972
+ activeTurnSteer: z18.literal(true).optional(),
3952
3973
  /**
3953
3974
  * The CLI exists but `installed` stays false because the daemon cannot run it
3954
3975
  * in a sandbox. `missing` names the absent packages; empty means the machine
@@ -4202,6 +4223,7 @@ var runSafePoint = z22.object({
4202
4223
  checkpoint: z22.enum(["ready", "unavailable"]),
4203
4224
  checkpointTakenAt: z22.iso.datetime({ offset: true }).optional()
4204
4225
  }).strict().refine((value) => value.checkpoint === "ready" ? value.checkpointTakenAt !== void 0 && Date.parse(value.observedAt) >= Date.parse(value.checkpointTakenAt) : value.checkpointTakenAt === void 0, { message: "A ready final checkpoint requires its acknowledged snapshot time" });
4226
+ var runVisualEvidence = z22.array(z22.object({ captureId: z22.uuid(), publicSafe: z22.literal(true) }).strict()).max(40);
4205
4227
  var runReport = z22.object({
4206
4228
  repositorySelection: runRepositorySelection.optional(),
4207
4229
  /** Worktree base journaled before the adapter started; never agent-supplied. */
@@ -4270,6 +4292,10 @@ var runReport = z22.object({
4270
4292
  previewDatabaseBranch: z22.string().trim().min(1).max(500).optional(),
4271
4293
  /** Acceptance criteria the agent checked, with evidence. */
4272
4294
  criteria: z22.array(runCriterion).max(200).optional(),
4295
+ /** Captures from this run whose full visible content was checked for public sharing.
4296
+ * This is an explicit content review, not an automatic pixel-redaction claim.
4297
+ * The server resolves capture ownership and creates the existing share URL. */
4298
+ visualEvidence: runVisualEvidence.optional(),
4273
4299
  /** A review completes once; this verdict never changes daemon-owned verification. */
4274
4300
  reviewVerdict: reviewVerdict.optional(),
4275
4301
  /**
@@ -4944,6 +4970,7 @@ var runEventsAccepted = z26.object({
4944
4970
  var COMMANDS_SKIP_PARAM = "skip";
4945
4971
  var COMMANDS_DAEMON_LATEST_PARAM = "daemonLatest";
4946
4972
  var COMMANDS_SKIP_DEVICE_COMMANDS_PARAM = "skipDeviceCommands";
4973
+ var ACTIVE_TURN_STEER_HEADER = "x-mikka-active-turn-steer";
4947
4974
  var MAILBOX_NOTICE_HEADER = "x-mikka-mailbox-notices";
4948
4975
  var runCommandSchema = z26.discriminatedUnion("kind", [
4949
4976
  z26.object({
@@ -4952,6 +4979,7 @@ var runCommandSchema = z26.discriminatedUnion("kind", [
4952
4979
  messageId: z26.uuid(),
4953
4980
  text: z26.string().min(1).max(1e5)
4954
4981
  }),
4982
+ z26.object({ kind: z26.literal("steer"), runId: id3, messageId: z26.uuid(), text: z26.string().min(1).max(1e5) }),
4955
4983
  z26.object({ kind: z26.literal("stop"), runId: id3 }),
4956
4984
  // A host notification carries addresses only; peer content remains behind
4957
4985
  // the authenticated mailbox read and retains its original provenance.
@@ -4973,7 +5001,8 @@ var runCommandsResponse = z26.object({
4973
5001
  deviceCommands: z26.array(deviceManagementCommand).max(1).optional().catch(void 0)
4974
5002
  });
4975
5003
  var runCommandsAck = z26.object({
4976
- delivered: z26.array(z26.uuid()).max(500)
5004
+ delivered: z26.array(z26.uuid()).max(500),
5005
+ refusedSteers: z26.array(z26.uuid()).max(500).optional()
4977
5006
  });
4978
5007
  var FS_MAX_ENTRIES = 500;
4979
5008
  var fsBrowseRequest = z26.object({
@@ -5481,17 +5510,35 @@ var CAPTURE_MAX_BYTES = {
5481
5510
  video: 1e8
5482
5511
  };
5483
5512
  var RECORDING_MAX_SECONDS = 300;
5513
+ var CAPTURE_MAX_DURATION_MS = 36e5;
5484
5514
  var CAPTURE_TITLE_MAX = 200;
5485
5515
  var sha256 = z33.string().regex(/^[a-f0-9]{64}$/);
5486
5516
  var title = z33.string().trim().min(1).max(CAPTURE_TITLE_MAX);
5517
+ var recordingStep = z33.object({
5518
+ atMs: z33.number().int().min(0).max(CAPTURE_MAX_DURATION_MS),
5519
+ label: title,
5520
+ source: z33.enum(["action", "mark"]),
5521
+ durationMs: z33.number().int().min(0).max(CAPTURE_MAX_DURATION_MS).nullable().optional()
5522
+ }).strict().refine((step) => step.durationMs == null || step.source === "action" && step.durationMs <= step.atMs, {
5523
+ message: "An action duration must fit its recorded end offset."
5524
+ });
5487
5525
  var captureUploadRequest = z33.object({
5488
5526
  /** Stable client id, persisted before the first network attempt. */
5489
5527
  captureId: z33.uuid().optional(),
5490
5528
  title,
5491
5529
  contentType: z33.enum(CAPTURE_CONTENT_TYPES),
5492
5530
  size: z33.number().int().min(1).max(CAPTURE_MAX_BYTES.video),
5493
- sha256
5494
- }).strict();
5531
+ sha256,
5532
+ /** Final, processed video duration and its remapped timeline. */
5533
+ durationMs: z33.number().int().min(1).max(CAPTURE_MAX_DURATION_MS).optional(),
5534
+ steps: z33.array(recordingStep).max(200).optional()
5535
+ }).strict().superRefine((value, ctx) => {
5536
+ if (value.durationMs !== void 0 || value.steps !== void 0) {
5537
+ if (!value.contentType.startsWith("video/")) ctx.addIssue({ code: "custom", message: "Only videos carry a recording timeline." });
5538
+ if (value.steps?.some((step) => value.durationMs === void 0 || step.atMs > value.durationMs))
5539
+ ctx.addIssue({ code: "custom", message: "Recording steps must fit the final video duration." });
5540
+ }
5541
+ });
5495
5542
  var captureUploadTarget = z33.discriminatedUnion("target", [
5496
5543
  z33.object({ target: z33.literal("storage"), url: z33.url({ protocol: /^https$/ }), headers: z33.record(z33.string(), z33.string()) }),
5497
5544
  z33.object({ target: z33.literal("server") })
@@ -5516,7 +5563,12 @@ var screenCaptureRequest = z33.discriminatedUnion("action", [
5516
5563
  z33.object({ action: z33.literal("start_recording"), title, maxSeconds: z33.number().int().min(5).max(RECORDING_MAX_SECONDS).optional() }).strict(),
5517
5564
  z33.object({ action: z33.literal("stop_recording") }).strict(),
5518
5565
  // A step on the recording's timeline: an action's own description, or a moment the agent marks.
5519
- z33.object({ action: z33.literal("step"), label: title, source: z33.enum(["action", "mark"]) }).strict()
5566
+ z33.object({
5567
+ action: z33.literal("step"),
5568
+ label: title,
5569
+ source: z33.enum(["action", "mark"]),
5570
+ durationMs: z33.number().int().min(0).max(RECORDING_MAX_SECONDS * 1e3).optional()
5571
+ }).strict().refine((step) => step.durationMs === void 0 || step.source === "action", { message: "Only actions have a duration." })
5520
5572
  ]);
5521
5573
  var screenCaptureResponse = z33.discriminatedUnion("action", [
5522
5574
  z33.object({ action: z33.literal("screenshot"), capture: captureView }),
@@ -5572,7 +5624,7 @@ var InvalidIdError = class extends DaemonError {
5572
5624
  // package.json
5573
5625
  var package_default = {
5574
5626
  name: "@mikka/daemon",
5575
- version: "0.0.647",
5627
+ version: "0.0.651",
5576
5628
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
5577
5629
  type: "module",
5578
5630
  private: true,
@@ -5640,7 +5692,7 @@ var package_default = {
5640
5692
  engines: {
5641
5693
  node: ">=22"
5642
5694
  },
5643
- gitHead: "afc34a9fb79de0e2cb5f4427b676620b4937ecb8"
5695
+ gitHead: "1a57df9c1a1d8e475820afad14e3fa0e6429c60b"
5644
5696
  };
5645
5697
 
5646
5698
  // src/paths.ts
@@ -7173,6 +7225,7 @@ var HttpServerLink = class {
7173
7225
  ...initialRepository ? { [INITIAL_REPOSITORY_HEADER]: "1" } : {},
7174
7226
  [SUBSCRIPTION_MODEL_CATALOGUE_HEADER]: "1",
7175
7227
  [MAILBOX_NOTICE_HEADER]: "1",
7228
+ [ACTIVE_TURN_STEER_HEADER]: "1",
7176
7229
  [WORKSPACE_REQUEST_HEADER]: "1",
7177
7230
  [WORKSPACE_DIFF_REQUEST_HEADER]: "1",
7178
7231
  [WORKSPACE_GIT_REQUEST_HEADER]: "1",
@@ -7306,14 +7359,14 @@ var HttpServerLink = class {
7306
7359
  }
7307
7360
  return { contentType, body: response.body };
7308
7361
  }
7309
- async beginCapture(runId, request2) {
7310
- return this.call("POST", capturePaths.begin(checkId(runId)), { body: request2, schema: captureUploadResponse });
7362
+ async beginCapture(runId, request2, signal) {
7363
+ return this.call("POST", capturePaths.begin(checkId(runId)), { body: request2, schema: captureUploadResponse, signal });
7311
7364
  }
7312
- async resumeCapture(runId, captureId) {
7313
- return this.call("POST", capturePaths.upload(checkId(runId), checkId(captureId)), { schema: captureUploadResponse });
7365
+ async resumeCapture(runId, captureId, signal) {
7366
+ return this.call("POST", capturePaths.upload(checkId(runId), checkId(captureId)), { schema: captureUploadResponse, signal });
7314
7367
  }
7315
7368
  /** Straight to object storage with the signed headers, or to the server when it has no bucket. */
7316
- async sendCapture(runId, captureId, upload, bytes, contentType) {
7369
+ async sendCapture(runId, captureId, upload, bytes, contentType, signal) {
7317
7370
  const server = upload.target === "server";
7318
7371
  let response;
7319
7372
  try {
@@ -7322,7 +7375,7 @@ var HttpServerLink = class {
7322
7375
  headers: server ? { "content-type": contentType, [CLIENT_VERSION_HEADER]: this.clientVersion, ...this.credential ? { authorization: `Bearer ${this.credential}` } : {}, ...this.protectionBypass ? { "x-vercel-protection-bypass": this.protectionBypass } : {} } : upload.headers,
7323
7376
  body: bytes,
7324
7377
  redirect: "error",
7325
- signal: AbortSignal.timeout(3e5)
7378
+ signal: signal ? AbortSignal.any([signal, AbortSignal.timeout(3e5)]) : AbortSignal.timeout(3e5)
7326
7379
  });
7327
7380
  } catch (error) {
7328
7381
  throw new ServerUnreachableError(error);
@@ -7331,8 +7384,8 @@ var HttpServerLink = class {
7331
7384
  if (response.status === 401 && server) throw new SessionRejectedError();
7332
7385
  if (!response.ok) throw new DaemonError(response.status, `PUT capture failed: ${response.status}`, { status: response.status });
7333
7386
  }
7334
- async completeCapture(runId, captureId) {
7335
- const { capture } = await this.call("POST", capturePaths.complete(checkId(runId), checkId(captureId)), { schema: captureCompleteResponse, timeoutMs: 12e4 });
7387
+ async completeCapture(runId, captureId, signal) {
7388
+ const { capture } = await this.call("POST", capturePaths.complete(checkId(runId), checkId(captureId)), { schema: captureCompleteResponse, timeoutMs: 12e4, signal });
7336
7389
  return capture;
7337
7390
  }
7338
7391
  async screenCapture(runId, request2, signal) {
@@ -7408,10 +7461,10 @@ var HttpServerLink = class {
7408
7461
  }
7409
7462
  }
7410
7463
  }
7411
- async ackCommands(deviceId, delivered) {
7412
- if (delivered.length === 0) return;
7464
+ async ackCommands(deviceId, delivered, refusedSteers = []) {
7465
+ if (!delivered.length && !refusedSteers.length) return;
7413
7466
  await this.call("POST", devicePaths.commandsAck(checkId(deviceId)), {
7414
- body: { delivered }
7467
+ body: { delivered, ...refusedSteers.length ? { refusedSteers } : {} }
7415
7468
  });
7416
7469
  }
7417
7470
  async fetchFsRequests(deviceId, waitSeconds, { signal } = {}) {
package/login.js CHANGED
@@ -2440,6 +2440,7 @@ var harnessInfoSchema = z7.object({
2440
2440
  computerBroker: z7.literal(true).optional(),
2441
2441
  /** Run-scoped CLI approvals and policy-version checks are supported. */
2442
2442
  toolApproval: z7.literal(true).optional(),
2443
+ activeTurnSteer: z7.literal(true).optional(),
2443
2444
  /**
2444
2445
  * The CLI exists but `installed` stays false because the daemon cannot run it
2445
2446
  * in a sandbox. `missing` names the absent packages; empty means the machine
@@ -2648,6 +2649,24 @@ function causeFields(cause, depth = 4) {
2648
2649
 
2649
2650
  // ../protocol/src/user-error-codes.ts
2650
2651
  var USER_ERROR_CODES = {
2652
+ review_auth_required: [],
2653
+ review_not_found: [],
2654
+ not_owner_terminal: [],
2655
+ review_machine_gone: [],
2656
+ review_binding_changed: [],
2657
+ review_checkout_unavailable: [],
2658
+ review_preview_unavailable: ["configuration", "runtime", "protocol", "scope_changed", "limit"],
2659
+ terminal_unsupported: ["local_device", "runtime_version"],
2660
+ terminal_already_controlled: [],
2661
+ terminal_binding_changed: [],
2662
+ terminal_ended: [],
2663
+ terminal_input_too_large: [],
2664
+ terminal_invalid_request: [],
2665
+ terminal_request_conflict: [],
2666
+ terminal_input_uncertain: [],
2667
+ terminal_limit: [],
2668
+ terminal_unavailable: ["configuration", "runtime", "protocol", "installation", "lease"],
2669
+ terminal_control_unavailable: ["fence_unavailable", "fence_lost"],
2651
2670
  review_scope_denied: ["sponsored_placement"],
2652
2671
  workspace_not_found: [],
2653
2672
  workspace_snapshot_unavailable: [],
@@ -2731,6 +2750,8 @@ var USER_ERROR_CODES = {
2731
2750
  web_auth_exchange_rejected: [],
2732
2751
  web_auth_session_expired: [],
2733
2752
  factory_spec_approval_required: [],
2753
+ factory_visual_evidence_required: [],
2754
+ factory_public_evidence_required: [],
2734
2755
  map_invalid_request: ["invalid_query", "invalid_token"],
2735
2756
  map_not_found: [],
2736
2757
  map_snapshot_changed: ["source_changed"],
@@ -2984,6 +3005,7 @@ var runSafePoint = z14.object({
2984
3005
  checkpoint: z14.enum(["ready", "unavailable"]),
2985
3006
  checkpointTakenAt: z14.iso.datetime({ offset: true }).optional()
2986
3007
  }).strict().refine((value) => value.checkpoint === "ready" ? value.checkpointTakenAt !== void 0 && Date.parse(value.observedAt) >= Date.parse(value.checkpointTakenAt) : value.checkpointTakenAt === void 0, { message: "A ready final checkpoint requires its acknowledged snapshot time" });
3008
+ var runVisualEvidence = z14.array(z14.object({ captureId: z14.uuid(), publicSafe: z14.literal(true) }).strict()).max(40);
2987
3009
  var runReport = z14.object({
2988
3010
  repositorySelection: runRepositorySelection.optional(),
2989
3011
  /** Worktree base journaled before the adapter started; never agent-supplied. */
@@ -3052,6 +3074,10 @@ var runReport = z14.object({
3052
3074
  previewDatabaseBranch: z14.string().trim().min(1).max(500).optional(),
3053
3075
  /** Acceptance criteria the agent checked, with evidence. */
3054
3076
  criteria: z14.array(runCriterion).max(200).optional(),
3077
+ /** Captures from this run whose full visible content was checked for public sharing.
3078
+ * This is an explicit content review, not an automatic pixel-redaction claim.
3079
+ * The server resolves capture ownership and creates the existing share URL. */
3080
+ visualEvidence: runVisualEvidence.optional(),
3055
3081
  /** A review completes once; this verdict never changes daemon-owned verification. */
3056
3082
  reviewVerdict: reviewVerdict.optional(),
3057
3083
  /**
@@ -4556,6 +4582,7 @@ var runCommandSchema = z24.discriminatedUnion("kind", [
4556
4582
  messageId: z24.uuid(),
4557
4583
  text: z24.string().min(1).max(1e5)
4558
4584
  }),
4585
+ z24.object({ kind: z24.literal("steer"), runId: id3, messageId: z24.uuid(), text: z24.string().min(1).max(1e5) }),
4559
4586
  z24.object({ kind: z24.literal("stop"), runId: id3 }),
4560
4587
  // A host notification carries addresses only; peer content remains behind
4561
4588
  // the authenticated mailbox read and retains its original provenance.
@@ -4577,7 +4604,8 @@ var runCommandsResponse = z24.object({
4577
4604
  deviceCommands: z24.array(deviceManagementCommand).max(1).optional().catch(void 0)
4578
4605
  });
4579
4606
  var runCommandsAck = z24.object({
4580
- delivered: z24.array(z24.uuid()).max(500)
4607
+ delivered: z24.array(z24.uuid()).max(500),
4608
+ refusedSteers: z24.array(z24.uuid()).max(500).optional()
4581
4609
  });
4582
4610
  var FS_MAX_ENTRIES = 500;
4583
4611
  var fsBrowseRequest = z24.object({
@@ -5121,7 +5149,7 @@ var ServerUnreachableError = class extends DaemonError {
5121
5149
  // package.json
5122
5150
  var package_default = {
5123
5151
  name: "@mikka/daemon",
5124
- version: "0.0.647",
5152
+ version: "0.0.651",
5125
5153
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
5126
5154
  type: "module",
5127
5155
  private: true,
@@ -5189,7 +5217,7 @@ var package_default = {
5189
5217
  engines: {
5190
5218
  node: ">=22"
5191
5219
  },
5192
- gitHead: "afc34a9fb79de0e2cb5f4427b676620b4937ecb8"
5220
+ gitHead: "1a57df9c1a1d8e475820afad14e3fa0e6429c60b"
5193
5221
  };
5194
5222
 
5195
5223
  // src/paths.ts
@@ -5245,17 +5273,35 @@ var CAPTURE_MAX_BYTES = {
5245
5273
  video: 1e8
5246
5274
  };
5247
5275
  var RECORDING_MAX_SECONDS = 300;
5276
+ var CAPTURE_MAX_DURATION_MS = 36e5;
5248
5277
  var CAPTURE_TITLE_MAX = 200;
5249
5278
  var sha256 = z33.string().regex(/^[a-f0-9]{64}$/);
5250
5279
  var title = z33.string().trim().min(1).max(CAPTURE_TITLE_MAX);
5280
+ var recordingStep = z33.object({
5281
+ atMs: z33.number().int().min(0).max(CAPTURE_MAX_DURATION_MS),
5282
+ label: title,
5283
+ source: z33.enum(["action", "mark"]),
5284
+ durationMs: z33.number().int().min(0).max(CAPTURE_MAX_DURATION_MS).nullable().optional()
5285
+ }).strict().refine((step) => step.durationMs == null || step.source === "action" && step.durationMs <= step.atMs, {
5286
+ message: "An action duration must fit its recorded end offset."
5287
+ });
5251
5288
  var captureUploadRequest = z33.object({
5252
5289
  /** Stable client id, persisted before the first network attempt. */
5253
5290
  captureId: z33.uuid().optional(),
5254
5291
  title,
5255
5292
  contentType: z33.enum(CAPTURE_CONTENT_TYPES),
5256
5293
  size: z33.number().int().min(1).max(CAPTURE_MAX_BYTES.video),
5257
- sha256
5258
- }).strict();
5294
+ sha256,
5295
+ /** Final, processed video duration and its remapped timeline. */
5296
+ durationMs: z33.number().int().min(1).max(CAPTURE_MAX_DURATION_MS).optional(),
5297
+ steps: z33.array(recordingStep).max(200).optional()
5298
+ }).strict().superRefine((value, ctx) => {
5299
+ if (value.durationMs !== void 0 || value.steps !== void 0) {
5300
+ if (!value.contentType.startsWith("video/")) ctx.addIssue({ code: "custom", message: "Only videos carry a recording timeline." });
5301
+ if (value.steps?.some((step) => value.durationMs === void 0 || step.atMs > value.durationMs))
5302
+ ctx.addIssue({ code: "custom", message: "Recording steps must fit the final video duration." });
5303
+ }
5304
+ });
5259
5305
  var captureUploadTarget = z33.discriminatedUnion("target", [
5260
5306
  z33.object({ target: z33.literal("storage"), url: z33.url({ protocol: /^https$/ }), headers: z33.record(z33.string(), z33.string()) }),
5261
5307
  z33.object({ target: z33.literal("server") })
@@ -5280,7 +5326,12 @@ var screenCaptureRequest = z33.discriminatedUnion("action", [
5280
5326
  z33.object({ action: z33.literal("start_recording"), title, maxSeconds: z33.number().int().min(5).max(RECORDING_MAX_SECONDS).optional() }).strict(),
5281
5327
  z33.object({ action: z33.literal("stop_recording") }).strict(),
5282
5328
  // A step on the recording's timeline: an action's own description, or a moment the agent marks.
5283
- z33.object({ action: z33.literal("step"), label: title, source: z33.enum(["action", "mark"]) }).strict()
5329
+ z33.object({
5330
+ action: z33.literal("step"),
5331
+ label: title,
5332
+ source: z33.enum(["action", "mark"]),
5333
+ durationMs: z33.number().int().min(0).max(RECORDING_MAX_SECONDS * 1e3).optional()
5334
+ }).strict().refine((step) => step.durationMs === void 0 || step.source === "action", { message: "Only actions have a duration." })
5284
5335
  ]);
5285
5336
  var screenCaptureResponse = z33.discriminatedUnion("action", [
5286
5337
  z33.object({ action: z33.literal("screenshot"), capture: captureView }),