@aspectlylabs/mikka 0.0.201 → 0.0.202

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/login.js CHANGED
@@ -3170,10 +3170,19 @@ var runCommandSchema = z14.discriminatedUnion("kind", [
3170
3170
  messageId: z14.uuid(),
3171
3171
  text: z14.string().min(1).max(1e5)
3172
3172
  }),
3173
- z14.object({ kind: z14.literal("stop"), runId: id2 })
3173
+ z14.object({ kind: z14.literal("stop"), runId: id2 }),
3174
+ // A host notification carries addresses only; peer content remains behind
3175
+ // the authenticated mailbox read and retains its original provenance.
3176
+ z14.object({ kind: z14.literal("mailbox_notice"), runId: id2, messageIds: z14.array(z14.uuid()).min(1).max(50) })
3174
3177
  ]);
3175
3178
  var runCommandsResponse = z14.object({
3176
- commands: z14.array(runCommandSchema).max(500)
3179
+ commands: z14.array(runCommandSchema).max(500),
3180
+ /**
3181
+ * Runs queued for this device (outside `skip`), so it claims them now
3182
+ * instead of on its next heartbeat. A queued run also ends the long-poll.
3183
+ * Absent from older servers; the heartbeat still claims either way.
3184
+ */
3185
+ queuedRuns: z14.array(id2).max(100).optional()
3177
3186
  });
3178
3187
  var runCommandsAck = z14.object({
3179
3188
  delivered: z14.array(z14.uuid()).max(500)
@@ -3761,7 +3770,7 @@ var ServerUnreachableError = class extends DaemonError {
3761
3770
  // package.json
3762
3771
  var package_default = {
3763
3772
  name: "@mikka/daemon",
3764
- version: "0.0.201",
3773
+ version: "0.0.202",
3765
3774
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
3766
3775
  type: "module",
3767
3776
  private: true,
@@ -3785,7 +3794,7 @@ var package_default = {
3785
3794
  daemon: "tsx bin/mikka.ts daemon",
3786
3795
  dev: "tsx watch bin/mikka.ts daemon --dev --server memory",
3787
3796
  typecheck: "tsgo --noEmit -p tsconfig.json",
3788
- test: "vitest run && pnpm test:mailbox-cli && pnpm test:repository-identity && pnpm test:github-credentials",
3797
+ test: "vitest run && pnpm test:mailbox-cli && pnpm test:repository-identity && pnpm test:github-credentials && pnpm test:local-git-origin-sandbox",
3789
3798
  "test:mailbox-cli": "node --import tsx --test --test-timeout=60000 test/run-mailbox.node-test.ts",
3790
3799
  "codex:types": 'codex app-server generate-ts --out "${TMPDIR:-/tmp}/mikka-codex-types" && echo "Generated; compare v2/ with src/adapters/codex-protocol.ts"',
3791
3800
  "test:real": "MIKKA_REAL_AGENTS=${MIKKA_REAL_AGENTS:-claude_code,codex,cursor} vitest run test/real-agents.test.ts",
@@ -3794,7 +3803,8 @@ var package_default = {
3794
3803
  "test:package": "node --test test/package.test.mjs",
3795
3804
  "test:repository-identity": "node --experimental-strip-types --test test/repository-identity-pure.node-test.ts",
3796
3805
  "test:github-credentials": "node --test test/github-credentials.node-test.mjs",
3797
- "test:run-container": "node --import tsx --test --test-timeout=900000 test/run-container.docker-test.ts"
3806
+ "test:run-container": "node --import tsx --test --test-timeout=900000 test/run-container.docker-test.ts",
3807
+ "test:local-git-origin-sandbox": "node --import tsx --test --test-timeout=60000 test/local-git-origin.sandbox-test.ts"
3798
3808
  },
3799
3809
  dependencies: {
3800
3810
  "@agentclientprotocol/sdk": "1.9.0",
@@ -3821,7 +3831,7 @@ var package_default = {
3821
3831
  engines: {
3822
3832
  node: ">=24"
3823
3833
  },
3824
- gitHead: "7228666f9bd7f23fc81bd205dd685611ae42744c"
3834
+ gitHead: "310c7e9903774873cd2ce3cf627d36ef96b3d765"
3825
3835
  };
3826
3836
 
3827
3837
  // src/paths.ts
@@ -3834,8 +3844,20 @@ import { z as z26 } from "zod";
3834
3844
  import { NetworkConfigSchema } from "@anthropic-ai/sandbox-runtime";
3835
3845
  var NETWORK_DECISION_MS = 5 * 6e4;
3836
3846
 
3837
- // ../protocol/src/capture.ts
3847
+ // ../protocol/src/mailbox.ts
3838
3848
  import { z as z23 } from "zod";
3849
+ var mailboxSend = z23.object({ to: z23.uuid(), key: z23.uuid().describe("Stable idempotency key; reuse only to retry this exact envelope."), text: z23.string().trim().min(1).max(4e3), replyTo: z23.uuid().optional() }).strict();
3850
+ var mailboxAck = z23.object({ ids: z23.array(z23.uuid()).max(50) }).strict();
3851
+ var mailboxInputs = {
3852
+ mailbox_recipients: z23.object({}).strict(),
3853
+ mailbox_send: mailboxSend,
3854
+ mailbox_inbox: z23.object({}).strict(),
3855
+ mailbox_ack: mailboxAck,
3856
+ mailbox_sent: z23.object({}).strict()
3857
+ };
3858
+
3859
+ // ../protocol/src/capture.ts
3860
+ import { z as z24 } from "zod";
3839
3861
  var CAPTURE_CONTENT_TYPES = [
3840
3862
  "image/png",
3841
3863
  "image/jpeg",
@@ -3851,65 +3873,51 @@ var CAPTURE_MAX_BYTES = {
3851
3873
  };
3852
3874
  var RECORDING_MAX_SECONDS = 300;
3853
3875
  var CAPTURE_TITLE_MAX = 200;
3854
- var sha256 = z23.string().regex(/^[a-f0-9]{64}$/);
3855
- var title = z23.string().trim().min(1).max(CAPTURE_TITLE_MAX);
3856
- var captureUploadRequest = z23.object({
3876
+ var sha256 = z24.string().regex(/^[a-f0-9]{64}$/);
3877
+ var title = z24.string().trim().min(1).max(CAPTURE_TITLE_MAX);
3878
+ var captureUploadRequest = z24.object({
3857
3879
  /** Stable client id, persisted before the first network attempt. */
3858
- captureId: z23.uuid().optional(),
3880
+ captureId: z24.uuid().optional(),
3859
3881
  title,
3860
- contentType: z23.enum(CAPTURE_CONTENT_TYPES),
3861
- size: z23.number().int().min(1).max(CAPTURE_MAX_BYTES.video),
3882
+ contentType: z24.enum(CAPTURE_CONTENT_TYPES),
3883
+ size: z24.number().int().min(1).max(CAPTURE_MAX_BYTES.video),
3862
3884
  sha256
3863
3885
  }).strict();
3864
- var captureUploadTarget = z23.discriminatedUnion("target", [
3865
- z23.object({ target: z23.literal("storage"), url: z23.url({ protocol: /^https$/ }), headers: z23.record(z23.string(), z23.string()) }),
3866
- z23.object({ target: z23.literal("server") })
3886
+ var captureUploadTarget = z24.discriminatedUnion("target", [
3887
+ z24.object({ target: z24.literal("storage"), url: z24.url({ protocol: /^https$/ }), headers: z24.record(z24.string(), z24.string()) }),
3888
+ z24.object({ target: z24.literal("server") })
3867
3889
  ]);
3868
- var captureUploadResponse = z23.object({
3869
- captureId: z23.uuid(),
3890
+ var captureUploadResponse = z24.object({
3891
+ captureId: z24.uuid(),
3870
3892
  upload: captureUploadTarget
3871
3893
  });
3872
- var captureView = z23.object({
3873
- id: z23.uuid(),
3874
- kind: z23.enum(CAPTURE_KINDS),
3875
- contentType: z23.enum(CAPTURE_CONTENT_TYPES),
3876
- title: z23.string(),
3877
- size: z23.number().int().nonnegative(),
3878
- durationMs: z23.number().int().nonnegative().nullable(),
3879
- source: z23.enum(CAPTURE_SOURCES),
3880
- createdAt: z23.iso.datetime()
3881
- });
3882
- var captureCompleteResponse = z23.object({ capture: captureView });
3883
- var screenCaptureRequest = z23.discriminatedUnion("action", [
3884
- z23.object({ action: z23.literal("screenshot"), title }).strict(),
3885
- z23.object({ action: z23.literal("start_recording"), title, maxSeconds: z23.number().int().min(5).max(RECORDING_MAX_SECONDS).optional() }).strict(),
3886
- z23.object({ action: z23.literal("stop_recording") }).strict(),
3894
+ var captureView = z24.object({
3895
+ id: z24.uuid(),
3896
+ kind: z24.enum(CAPTURE_KINDS),
3897
+ contentType: z24.enum(CAPTURE_CONTENT_TYPES),
3898
+ title: z24.string(),
3899
+ size: z24.number().int().nonnegative(),
3900
+ durationMs: z24.number().int().nonnegative().nullable(),
3901
+ source: z24.enum(CAPTURE_SOURCES),
3902
+ createdAt: z24.iso.datetime()
3903
+ });
3904
+ var captureCompleteResponse = z24.object({ capture: captureView });
3905
+ var screenCaptureRequest = z24.discriminatedUnion("action", [
3906
+ z24.object({ action: z24.literal("screenshot"), title }).strict(),
3907
+ z24.object({ action: z24.literal("start_recording"), title, maxSeconds: z24.number().int().min(5).max(RECORDING_MAX_SECONDS).optional() }).strict(),
3908
+ z24.object({ action: z24.literal("stop_recording") }).strict(),
3887
3909
  // A step on the recording's timeline: an action's own description, or a moment the agent marks.
3888
- z23.object({ action: z23.literal("step"), label: title, source: z23.enum(["action", "mark"]) }).strict()
3910
+ z24.object({ action: z24.literal("step"), label: title, source: z24.enum(["action", "mark"]) }).strict()
3889
3911
  ]);
3890
- var screenCaptureResponse = z23.discriminatedUnion("action", [
3891
- z23.object({ action: z23.literal("screenshot"), capture: captureView }),
3892
- z23.object({ action: z23.literal("start_recording"), recordingId: z23.uuid(), stopsAt: z23.iso.datetime() }),
3893
- z23.object({ action: z23.literal("stop_recording"), capture: captureView }),
3894
- z23.object({ action: z23.literal("step"), recorded: z23.boolean() })
3912
+ var screenCaptureResponse = z24.discriminatedUnion("action", [
3913
+ z24.object({ action: z24.literal("screenshot"), capture: captureView }),
3914
+ z24.object({ action: z24.literal("start_recording"), recordingId: z24.uuid(), stopsAt: z24.iso.datetime() }),
3915
+ z24.object({ action: z24.literal("stop_recording"), capture: captureView }),
3916
+ z24.object({ action: z24.literal("step"), recorded: z24.boolean() })
3895
3917
  ]);
3896
3918
 
3897
3919
  // src/run-mailbox.ts
3898
3920
  import { z as z25 } from "zod";
3899
-
3900
- // ../protocol/src/mailbox.ts
3901
- import { z as z24 } from "zod";
3902
- var mailboxSend = z24.object({ to: z24.uuid(), key: z24.uuid().describe("Stable idempotency key; reuse only to retry this exact envelope."), text: z24.string().trim().min(1).max(4e3), replyTo: z24.uuid().optional() }).strict();
3903
- var mailboxAck = z24.object({ ids: z24.array(z24.uuid()).max(50) }).strict();
3904
- var mailboxInputs = {
3905
- mailbox_recipients: z24.object({}).strict(),
3906
- mailbox_send: mailboxSend,
3907
- mailbox_inbox: z24.object({}).strict(),
3908
- mailbox_ack: mailboxAck,
3909
- mailbox_sent: z24.object({}).strict()
3910
- };
3911
-
3912
- // src/run-mailbox.ts
3913
3921
  var requestSchema = z25.union([
3914
3922
  z25.object({ operation: z25.literal("list") }).strict(),
3915
3923
  z25.object({ operation: z25.literal("call"), name: z25.enum(Object.keys(mailboxInputs)), arguments: z25.unknown() }).strict()