@opencode/server 0.0.0-dev-1360 → 0.0.0-dev-1361

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 (144) hide show
  1. package/dist/api.d.ts +171 -2
  2. package/dist/api.js +5 -5
  3. package/dist/auth.js +1 -1
  4. package/dist/chunks/{auth-0wjm8gvs.js → cors-0wjm8gvs.js} +2 -2
  5. package/dist/chunks/{auth-10sj2tcf.js → cors-10sj2tcf.js} +1 -1
  6. package/dist/chunks/{auth-1z9qd4y2.js → cors-1z9qd4y2.js} +4 -4
  7. package/dist/chunks/{auth-29nx48hm.js → cors-29nx48hm.js} +1 -1
  8. package/dist/chunks/{auth-2tmcamrc.js → cors-2tmcamrc.js} +2 -2
  9. package/dist/chunks/{auth-2p8psxn9.js → cors-3cx4ac5j.js} +17 -13
  10. package/dist/chunks/{auth-74nxvsrn.js → cors-3xkwxcke.js} +7 -4
  11. package/dist/chunks/cors-5fn432p6.js +44 -0
  12. package/dist/chunks/{auth-z3e7v67k.js → cors-5pdfedjd.js} +5 -5
  13. package/dist/chunks/{auth-59yyxpa4.js → cors-6cmsxt3d.js} +8 -8
  14. package/dist/chunks/{auth-6pm6ek88.js → cors-6pm6ek88.js} +1 -1
  15. package/dist/chunks/{auth-7dkb5ks8.js → cors-7dkb5ks8.js} +2 -2
  16. package/dist/chunks/{auth-8nezxn08.js → cors-8nezxn08.js} +1 -1
  17. package/dist/chunks/{auth-8qsq6tbs.js → cors-8qsq6tbs.js} +2 -2
  18. package/dist/chunks/{auth-8sb6qqpn.js → cors-8sb6qqpn.js} +1 -1
  19. package/dist/chunks/{auth-8xdajgpr.js → cors-8xdajgpr.js} +2 -2
  20. package/dist/chunks/{auth-9hynp6rm.js → cors-9hynp6rm.js} +2 -2
  21. package/dist/chunks/{auth-am27j67f.js → cors-am27j67f.js} +1 -1
  22. package/dist/chunks/{auth-br4x4prt.js → cors-br4x4prt.js} +1 -1
  23. package/dist/chunks/{auth-ca564221.js → cors-ca564221.js} +1 -1
  24. package/dist/chunks/{auth-csnx1nj3.js → cors-csnx1nj3.js} +2 -2
  25. package/dist/chunks/{auth-djr0jy89.js → cors-djr0jy89.js} +1 -1
  26. package/dist/chunks/{auth-0q7s66m2.js → cors-e6e4kz0w.js} +4 -4
  27. package/dist/chunks/{auth-ehyp3zqd.js → cors-ehyp3zqd.js} +1 -1
  28. package/dist/chunks/{auth-em7ed65n.js → cors-em7ed65n.js} +2 -2
  29. package/dist/chunks/{auth-enx9e1dz.js → cors-enx9e1dz.js} +4 -4
  30. package/dist/chunks/{auth-exwy1kbj.js → cors-exwy1kbj.js} +2 -2
  31. package/dist/chunks/{auth-f3gr6hfv.js → cors-f3gr6hfv.js} +2 -2
  32. package/dist/chunks/{auth-ey0z35hy.js → cors-fa6nnfxm.js} +38 -35
  33. package/dist/chunks/{auth-g23ffrnz.js → cors-g23ffrnz.js} +2 -2
  34. package/dist/chunks/{auth-g4964mny.js → cors-g4964mny.js} +3 -3
  35. package/dist/chunks/{auth-xcshf76p.js → cors-hb1ty1t1.js} +5 -6
  36. package/dist/chunks/{auth-j4at0y5c.js → cors-j4at0y5c.js} +1 -1
  37. package/dist/chunks/{auth-javgytnb.js → cors-javgytnb.js} +2 -2
  38. package/dist/chunks/{auth-k74zefsg.js → cors-k74zefsg.js} +1 -1
  39. package/dist/chunks/{auth-ka2mtp6f.js → cors-ka2mtp6f.js} +2 -2
  40. package/dist/chunks/{auth-kmwr1xw9.js → cors-kmwr1xw9.js} +3 -3
  41. package/dist/chunks/{auth-1aar1z9e.js → cors-msvebcy2.js} +5 -5
  42. package/dist/chunks/{auth-myqk22k5.js → cors-myqk22k5.js} +2 -2
  43. package/dist/chunks/{auth-n2zyxnzr.js → cors-n2zyxnzr.js} +1 -1
  44. package/dist/chunks/{auth-nvb61mgq.js → cors-nvb61mgq.js} +4 -4
  45. package/dist/chunks/{auth-p3bbq7g3.js → cors-p3bbq7g3.js} +1 -1
  46. package/dist/chunks/{auth-prwd5gwt.js → cors-prwd5gwt.js} +2 -2
  47. package/dist/chunks/{auth-qq3f8fnn.js → cors-qq3f8fnn.js} +2 -2
  48. package/dist/chunks/{auth-qssmdh31.js → cors-qssmdh31.js} +4 -4
  49. package/dist/chunks/{auth-rgbnpstw.js → cors-rgbnpstw.js} +2 -2
  50. package/dist/chunks/{auth-rjhxbsc4.js → cors-rjhxbsc4.js} +2 -2
  51. package/dist/chunks/{auth-s0zgx365.js → cors-s0zgx365.js} +2 -2
  52. package/dist/chunks/{auth-gaegw7xv.js → cors-sv3a4xc1.js} +16 -12
  53. package/dist/chunks/{auth-t32e1bbt.js → cors-t32e1bbt.js} +1 -1
  54. package/dist/chunks/{auth-w9jcwh65.js → cors-v9t81kwn.js} +8 -8
  55. package/dist/chunks/cors-w6xb5z15.js +196 -0
  56. package/dist/chunks/{auth-whvq72as.js → cors-whvq72as.js} +3 -3
  57. package/dist/chunks/{auth-wsvmph03.js → cors-wsvmph03.js} +2 -2
  58. package/dist/chunks/{auth-x2qy7jg1.js → cors-x2qy7jg1.js} +1 -1
  59. package/dist/chunks/{auth-yc92za0p.js → cors-yc92za0p.js} +2 -2
  60. package/dist/chunks/{auth-tjxfj8xj.js → cors-z5c20bjd.js} +29 -12
  61. package/dist/content-headers.js +1 -1
  62. package/dist/cors.js +1 -1
  63. package/dist/event-feed.d.ts +14 -2
  64. package/dist/event-feed.js +3 -3
  65. package/dist/fetch.d.ts +1 -1
  66. package/dist/fetch.js +65 -63
  67. package/dist/handlers/agent.js +6 -6
  68. package/dist/handlers/artifact.js +3 -3
  69. package/dist/handlers/automation.js +2 -2
  70. package/dist/handlers/blob.js +3 -3
  71. package/dist/handlers/command.js +6 -6
  72. package/dist/handlers/config.js +6 -6
  73. package/dist/handlers/credential.js +7 -7
  74. package/dist/handlers/debug.js +6 -6
  75. package/dist/handlers/event.js +7 -7
  76. package/dist/handlers/experimental/browser-tunnel.js +4 -4
  77. package/dist/handlers/flag.js +6 -6
  78. package/dist/handlers/form.js +6 -6
  79. package/dist/handlers/fs.js +8 -8
  80. package/dist/handlers/generate.js +6 -6
  81. package/dist/handlers/integration.js +6 -6
  82. package/dist/handlers/job.js +2 -2
  83. package/dist/handlers/location.js +6 -6
  84. package/dist/handlers/machine.js +1 -1
  85. package/dist/handlers/mcp.js +8 -8
  86. package/dist/handlers/media.js +2 -2
  87. package/dist/handlers/message.js +7 -7
  88. package/dist/handlers/migration.js +6 -6
  89. package/dist/handlers/model.js +6 -6
  90. package/dist/handlers/permission.js +6 -6
  91. package/dist/handlers/persistent-pty.d.ts +1 -1
  92. package/dist/handlers/persistent-pty.js +20 -18
  93. package/dist/handlers/plugin.js +6 -6
  94. package/dist/handlers/project.js +6 -6
  95. package/dist/handlers/provider.js +6 -6
  96. package/dist/handlers/pty-socket.js +1 -1
  97. package/dist/handlers/pty.js +8 -8
  98. package/dist/handlers/push.js +1 -1
  99. package/dist/handlers/reference.js +6 -6
  100. package/dist/handlers/rpc.js +6 -6
  101. package/dist/handlers/server.js +9 -9
  102. package/dist/handlers/session-error.js +1 -1
  103. package/dist/handlers/session.js +7 -7
  104. package/dist/handlers/shell.js +6 -6
  105. package/dist/handlers/skill.js +6 -6
  106. package/dist/handlers/space.d.ts +44 -0
  107. package/dist/handlers/space.js +7 -0
  108. package/dist/handlers/usage.js +6 -6
  109. package/dist/handlers/vcs.js +6 -6
  110. package/dist/handlers/voice.js +6 -6
  111. package/dist/handlers/websearch.js +6 -6
  112. package/dist/handlers/worktree.js +6 -6
  113. package/dist/handlers.d.ts +2 -1
  114. package/dist/handlers.js +58 -56
  115. package/dist/location.js +2 -2
  116. package/dist/media-uri.js +1 -1
  117. package/dist/middleware/authorization.js +2 -2
  118. package/dist/middleware/defect-response.js +1 -1
  119. package/dist/middleware/form-location.js +3 -3
  120. package/dist/middleware/schema-error.js +1 -1
  121. package/dist/middleware/session-location.js +3 -3
  122. package/dist/pairing.js +5 -5
  123. package/dist/process.js +68 -66
  124. package/dist/range.js +1 -1
  125. package/dist/request-site.js +2 -2
  126. package/dist/request-tracing.js +1 -1
  127. package/dist/routes.d.ts +3 -2
  128. package/dist/routes.js +62 -60
  129. package/dist/server-info.js +3 -3
  130. package/dist/service-status.js +3 -3
  131. package/dist/space-store.d.ts +49 -0
  132. package/dist/space-store.js +16 -0
  133. package/dist/workerd.js +66 -64
  134. package/package.json +8 -8
  135. /package/dist/chunks/{auth-017ycvbx.js → cors-017ycvbx.js} +0 -0
  136. /package/dist/chunks/{auth-9rqn6x4v.js → cors-9rqn6x4v.js} +0 -0
  137. /package/dist/chunks/{auth-bd8755ek.js → cors-bd8755ek.js} +0 -0
  138. /package/dist/chunks/{auth-n26yr6pw.js → cors-n26yr6pw.js} +0 -0
  139. /package/dist/chunks/{auth-q187pxxd.js → cors-q187pxxd.js} +0 -0
  140. /package/dist/chunks/{auth-q4bn6dy8.js → cors-q4bn6dy8.js} +0 -0
  141. /package/dist/chunks/{auth-qpnw2qd1.js → cors-qpnw2qd1.js} +0 -0
  142. /package/dist/chunks/{auth-rqgv9x42.js → cors-rqgv9x42.js} +0 -0
  143. /package/dist/chunks/{auth-xthc02cw.js → cors-xthc02cw.js} +0 -0
  144. /package/dist/chunks/{auth-yc7nft6q.js → cors-yc7nft6q.js} +0 -0
package/dist/api.d.ts CHANGED
@@ -6695,6 +6695,124 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
6695
6695
  readonly cursor: import("effect/Schema").NullOr<import("effect/Schema").String>;
6696
6696
  readonly truncated: import("effect/Schema").optional<import("effect/Schema").Boolean>;
6697
6697
  }>;
6698
+ }, import("effect/Schema").Struct<{
6699
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
6700
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
6701
+ };
6702
+ readonly created: import("effect/Schema").Finite;
6703
+ readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
6704
+ readonly type: import("effect/Schema").Literal<"experimental.space.resync">;
6705
+ readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
6706
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
6707
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
6708
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6709
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6710
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
6711
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6712
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6713
+ }>, never, never>;
6714
+ }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
6715
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
6716
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
6717
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6718
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6719
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
6720
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6721
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6722
+ }>, never, never>;
6723
+ }>>, never, never>;
6724
+ readonly data: import("effect/Schema").Struct<{
6725
+ readonly space: import("effect/Schema").String;
6726
+ }>;
6727
+ }> & {
6728
+ type: "experimental.space.resync";
6729
+ durability: "ephemeral";
6730
+ durable: undefined;
6731
+ data: import("effect/Schema").Struct<{
6732
+ readonly space: import("effect/Schema").String;
6733
+ }>;
6734
+ }, import("effect/Schema").Struct<{
6735
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
6736
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
6737
+ };
6738
+ readonly created: import("effect/Schema").Finite;
6739
+ readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
6740
+ readonly type: import("effect/Schema").Literal<"experimental.space.updated">;
6741
+ readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
6742
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
6743
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
6744
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6745
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6746
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
6747
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6748
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6749
+ }>, never, never>;
6750
+ }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
6751
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
6752
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
6753
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6754
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6755
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
6756
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6757
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6758
+ }>, never, never>;
6759
+ }>>, never, never>;
6760
+ readonly data: import("effect/Schema").Struct<{
6761
+ readonly space: import("effect/Schema").String;
6762
+ readonly key: import("effect/Schema").String;
6763
+ readonly value: import("effect/Schema").String;
6764
+ readonly revision: import("effect/Schema").Int;
6765
+ }>;
6766
+ }> & {
6767
+ type: "experimental.space.updated";
6768
+ durability: "ephemeral";
6769
+ durable: undefined;
6770
+ data: import("effect/Schema").Struct<{
6771
+ readonly space: import("effect/Schema").String;
6772
+ readonly key: import("effect/Schema").String;
6773
+ readonly value: import("effect/Schema").String;
6774
+ readonly revision: import("effect/Schema").Int;
6775
+ }>;
6776
+ }, import("effect/Schema").Struct<{
6777
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
6778
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
6779
+ };
6780
+ readonly created: import("effect/Schema").Finite;
6781
+ readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
6782
+ readonly type: import("effect/Schema").Literal<"experimental.space.deleted">;
6783
+ readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
6784
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
6785
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
6786
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6787
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6788
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
6789
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6790
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6791
+ }>, never, never>;
6792
+ }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
6793
+ readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
6794
+ readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
6795
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6796
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6797
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
6798
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6799
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6800
+ }>, never, never>;
6801
+ }>>, never, never>;
6802
+ readonly data: import("effect/Schema").Struct<{
6803
+ readonly space: import("effect/Schema").String;
6804
+ readonly key: import("effect/Schema").String;
6805
+ readonly revision: import("effect/Schema").Int;
6806
+ }>;
6807
+ }> & {
6808
+ type: "experimental.space.deleted";
6809
+ durability: "ephemeral";
6810
+ durable: undefined;
6811
+ data: import("effect/Schema").Struct<{
6812
+ readonly space: import("effect/Schema").String;
6813
+ readonly key: import("effect/Schema").String;
6814
+ readonly revision: import("effect/Schema").Int;
6815
+ }>;
6698
6816
  }, import("effect/Schema").Struct<{
6699
6817
  readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
6700
6818
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -6715,7 +6833,9 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
6715
6833
  readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
6716
6834
  }>>;
6717
6835
  readonly type: import("effect/Schema").Literal<"server.connected">;
6718
- readonly data: import("effect/Schema").Struct<{}>;
6836
+ readonly data: import("effect/Schema").Struct<{
6837
+ readonly stream: import("effect/Schema").optional<import("effect/Schema").String>;
6838
+ }>;
6719
6839
  }>[]]>>, import("effect/Schema").Never, {
6720
6840
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
6721
6841
  readonly created: number;
@@ -8222,6 +8342,53 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
8222
8342
  readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
8223
8343
  } | undefined;
8224
8344
  readonly data: {};
8345
+ } | {
8346
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
8347
+ readonly created: number;
8348
+ readonly metadata?: {
8349
+ readonly [x: string]: unknown;
8350
+ } | undefined;
8351
+ readonly type: "experimental.space.deleted";
8352
+ readonly location?: {
8353
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
8354
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
8355
+ } | undefined;
8356
+ readonly data: {
8357
+ readonly space: string;
8358
+ readonly key: string;
8359
+ readonly revision: number;
8360
+ };
8361
+ } | {
8362
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
8363
+ readonly created: number;
8364
+ readonly metadata?: {
8365
+ readonly [x: string]: unknown;
8366
+ } | undefined;
8367
+ readonly type: "experimental.space.resync";
8368
+ readonly location?: {
8369
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
8370
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
8371
+ } | undefined;
8372
+ readonly data: {
8373
+ readonly space: string;
8374
+ };
8375
+ } | {
8376
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
8377
+ readonly created: number;
8378
+ readonly metadata?: {
8379
+ readonly [x: string]: unknown;
8380
+ } | undefined;
8381
+ readonly type: "experimental.space.updated";
8382
+ readonly location?: {
8383
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
8384
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
8385
+ } | undefined;
8386
+ readonly data: {
8387
+ readonly space: string;
8388
+ readonly key: string;
8389
+ readonly value: string;
8390
+ readonly revision: number;
8391
+ };
8225
8392
  } | {
8226
8393
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
8227
8394
  readonly created: number;
@@ -9204,5 +9371,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
9204
9371
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
9205
9372
  } | undefined;
9206
9373
  readonly type: "server.connected";
9207
- readonly data: {};
9374
+ readonly data: {
9375
+ readonly stream?: string | undefined;
9376
+ };
9208
9377
  }>, never, never, never>, false>>;
package/dist/api.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Api2
3
- } from "./chunks/auth-whvq72as.js";
4
- import"./chunks/auth-ehyp3zqd.js";
5
- import"./chunks/auth-ca564221.js";
6
- import"./chunks/auth-br4x4prt.js";
7
- import"./chunks/auth-rqgv9x42.js";
3
+ } from "./chunks/cors-whvq72as.js";
4
+ import"./chunks/cors-ehyp3zqd.js";
5
+ import"./chunks/cors-ca564221.js";
6
+ import"./chunks/cors-br4x4prt.js";
7
+ import"./chunks/cors-rqgv9x42.js";
8
8
  export {
9
9
  Api2 as Api
10
10
  };
package/dist/auth.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  verifySession2,
8
8
  sessionCookieName2,
9
9
  exports_auth
10
- } from "./chunks/auth-j4at0y5c.js";
10
+ } from "./chunks/cors-j4at0y5c.js";
11
11
  export {
12
12
  Config2 as Config,
13
13
  SESSION_TTL_SECONDS2 as SESSION_TTL_SECONDS,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./auth-br4x4prt.js";
3
+ } from "./cors-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./auth-whvq72as.js";
6
+ } from "./cors-whvq72as.js";
7
7
 
8
8
  // src/handlers/vcs.ts
9
9
  import { Vcs } from "@opencode/core/vcs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./auth-whvq72as.js";
3
+ } from "./cors-whvq72as.js";
4
4
 
5
5
  // src/handlers/migration.ts
6
6
  import { V1Migration } from "@opencode/core/database/v1-migration";
@@ -2,18 +2,18 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./auth-br4x4prt.js";
5
+ } from "./cors-br4x4prt.js";
6
6
  import {
7
7
  Api2
8
- } from "./auth-whvq72as.js";
8
+ } from "./cors-whvq72as.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./auth-q4bn6dy8.js";
12
+ } from "./cors-q4bn6dy8.js";
13
13
  import {
14
14
  runPtySocket2,
15
15
  holdLocation2
16
- } from "./auth-q187pxxd.js";
16
+ } from "./cors-q187pxxd.js";
17
17
 
18
18
  // src/handlers/pty.ts
19
19
  import { Pty } from "@opencode/core/pty";
@@ -4,7 +4,7 @@ import {
4
4
  authorized2,
5
5
  verifySession2,
6
6
  sessionCookieName2
7
- } from "./auth-j4at0y5c.js";
7
+ } from "./cors-j4at0y5c.js";
8
8
 
9
9
  // src/middleware/authorization.ts
10
10
  import { UnauthorizedError } from "@opencode/protocol/errors";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./auth-br4x4prt.js";
3
+ } from "./cors-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./auth-whvq72as.js";
6
+ } from "./cors-whvq72as.js";
7
7
 
8
8
  // src/handlers/integration.ts
9
9
  import { Integration } from "@opencode/core/integration";
@@ -1,39 +1,42 @@
1
1
  import {
2
2
  layer4
3
- } from "./auth-br4x4prt.js";
3
+ } from "./cors-br4x4prt.js";
4
4
  import {
5
5
  formLocationLayer2
6
- } from "./auth-ca564221.js";
6
+ } from "./cors-ca564221.js";
7
7
  import {
8
8
  sessionLocationLayer2
9
- } from "./auth-ehyp3zqd.js";
9
+ } from "./cors-ehyp3zqd.js";
10
10
  import {
11
11
  Api2
12
- } from "./auth-whvq72as.js";
12
+ } from "./cors-whvq72as.js";
13
13
  import {
14
14
  Config2
15
- } from "./auth-j4at0y5c.js";
15
+ } from "./cors-j4at0y5c.js";
16
+ import {
17
+ node2
18
+ } from "./cors-w6xb5z15.js";
16
19
  import {
17
20
  CorsConfig2
18
- } from "./auth-q4bn6dy8.js";
21
+ } from "./cors-q4bn6dy8.js";
19
22
  import {
20
23
  layer2
21
- } from "./auth-z3e7v67k.js";
24
+ } from "./cors-5pdfedjd.js";
22
25
  import {
23
- node2
24
- } from "./auth-w9jcwh65.js";
26
+ node3
27
+ } from "./cors-v9t81kwn.js";
25
28
  import {
26
29
  handlers2
27
- } from "./auth-ey0z35hy.js";
30
+ } from "./cors-fa6nnfxm.js";
28
31
  import {
29
32
  authorizationLayer2
30
- } from "./auth-29nx48hm.js";
33
+ } from "./cors-29nx48hm.js";
31
34
  import {
32
35
  schemaErrorLayer2
33
- } from "./auth-bd8755ek.js";
36
+ } from "./cors-bd8755ek.js";
34
37
  import {
35
38
  defectResponseLayer2
36
- } from "./auth-n26yr6pw.js";
39
+ } from "./cors-n26yr6pw.js";
37
40
 
38
41
  // src/routes.ts
39
42
  import { Database } from "@opencode/core/database/database";
@@ -117,6 +120,7 @@ var applicationServiceNodes = [
117
120
  BrowserTunnelGateway.node,
118
121
  Credential.node,
119
122
  WellKnown.node,
123
+ node3,
120
124
  node2,
121
125
  LocationServiceMap.node,
122
126
  LocationActivity.node,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./auth-br4x4prt.js";
3
+ } from "./cors-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./auth-whvq72as.js";
6
+ } from "./cors-whvq72as.js";
7
7
 
8
8
  // src/handlers/skill.ts
9
9
  import { Skill } from "@opencode/core/skill";
@@ -13,10 +13,13 @@ import { HttpApiBuilder } from "effect/http-api";
13
13
  var SkillHandler2 = HttpApiBuilder.group(Api2, "server.skill", (handlers) => handlers.handle("skill.list", () => response2(Skill.Service.use((skill) => skill.list()))).handle("skill.file", (ctx) => Effect.gen(function* () {
14
14
  const skills = yield* Skill.Service;
15
15
  const raw = new URL(ctx.request.url, "http://localhost").pathname.split("/").slice(6).join("/");
16
+ const notFound = new FileNotFoundError({ path: raw, message: `File not found: ${raw}` });
16
17
  const file = yield* Effect.try({
17
- try: () => decodeURIComponent(raw),
18
- catch: () => new FileNotFoundError({ path: raw, message: `File not found: ${raw}` })
18
+ try: () => Skill.parseFilePath(decodeURIComponent(raw)),
19
+ catch: () => notFound
19
20
  });
21
+ if (!file)
22
+ return yield* notFound;
20
23
  return yield* skills.read(ctx.params.skillID, file).pipe(Effect.catchTags({
21
24
  "Skill.NotFoundError": (error) => Effect.fail(new SkillNotFoundError({ skill: ctx.params.skillID, message: `Skill not found: ${error.skill}` })),
22
25
  "Skill.FileNotFoundError": (error) => Effect.fail(new FileNotFoundError({ path: error.file, message: `File not found: ${error.file}` })),
@@ -0,0 +1,44 @@
1
+ import {
2
+ Service2
3
+ } from "./cors-w6xb5z15.js";
4
+
5
+ // src/handlers/space.ts
6
+ import { InvalidRequestError } from "@opencode/protocol/errors";
7
+ import { Space } from "@opencode/schema/space";
8
+ import { Effect } from "effect";
9
+ import { HttpApiSchema } from "effect/http-api";
10
+ var streamNotFound = () => new InvalidRequestError({ message: "No open event stream has this ID", kind: "stream_not_found", field: "stream" });
11
+ var makeSpace2 = Effect.gen(function* () {
12
+ const store = yield* Service2;
13
+ return {
14
+ set: Effect.fn("SpaceHandler.set")(function* (space, key, value) {
15
+ if (new TextEncoder().encode(value).length > Space.MaxValueBytes)
16
+ return yield* new InvalidRequestError({ message: "Value exceeds 1 MiB of UTF-8", field: "value" });
17
+ yield* store.set(space, key, value);
18
+ return HttpApiSchema.NoContent.make();
19
+ }),
20
+ sync: Effect.fn("SpaceHandler.sync")(function* (space, cursor) {
21
+ return yield* store.sync(space, cursor);
22
+ }),
23
+ subscribe: Effect.fn("SpaceHandler.subscribe")(function* (payload) {
24
+ if (!(yield* store.subscribe(payload.stream, payload.spaces)))
25
+ return yield* streamNotFound();
26
+ return HttpApiSchema.NoContent.make();
27
+ }),
28
+ unsubscribe: Effect.fn("SpaceHandler.unsubscribe")(function* (payload) {
29
+ if (!(yield* store.unsubscribe(payload.stream, payload.spaces)))
30
+ return yield* streamNotFound();
31
+ return HttpApiSchema.NoContent.make();
32
+ }),
33
+ reset: Effect.fn("SpaceHandler.reset")(function* () {
34
+ yield* store.resetEpoch;
35
+ return HttpApiSchema.NoContent.make();
36
+ }),
37
+ remove: Effect.fn("SpaceHandler.remove")(function* (space, key) {
38
+ yield* store.remove(space, key);
39
+ return HttpApiSchema.NoContent.make();
40
+ })
41
+ };
42
+ });
43
+
44
+ export { makeSpace2 };
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  __export
3
- } from "./auth-9rqn6x4v.js";
3
+ } from "./cors-9rqn6x4v.js";
4
4
 
5
5
  // src/server-info.ts
6
6
  var exports_server_info = {};
7
7
  __export(exports_server_info, {
8
8
  ServerInfo: () => exports_server_info,
9
- Service: () => Service2,
9
+ Service: () => Service3,
10
10
  connectionURLs: () => connectionURLs2,
11
11
  layer: () => layer2
12
12
  });
13
13
  import { Context, Layer } from "effect";
14
14
  import { networkInterfaces } from "node:os";
15
15
 
16
- class Service2 extends Context.Service()("@opencode/server/ServerInfo") {
16
+ class Service3 extends Context.Service()("@opencode/server/ServerInfo") {
17
17
  }
18
18
  function layer2(urls, tmp, app = {}) {
19
- return Layer.succeed(Service2, Service2.of({ urls, app, paths: { tmp } }));
19
+ return Layer.succeed(Service3, Service3.of({ urls, app, paths: { tmp } }));
20
20
  }
21
21
  function connectionURLs2(value, requestedHostname) {
22
22
  const url = new URL(value);
@@ -38,4 +38,4 @@ function connectionURLs2(value, requestedHostname) {
38
38
  ];
39
39
  }
40
40
 
41
- export { Service2, layer2, connectionURLs2, exports_server_info };
41
+ export { Service3, layer2, connectionURLs2, exports_server_info };
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  Api2
3
- } from "./auth-whvq72as.js";
3
+ } from "./cors-whvq72as.js";
4
4
  import {
5
5
  SESSION_TTL_SECONDS2,
6
6
  Config2,
7
7
  issueSession2,
8
8
  sessionCookieName2
9
- } from "./auth-j4at0y5c.js";
10
- import {
11
- Service2
12
- } from "./auth-z3e7v67k.js";
9
+ } from "./cors-j4at0y5c.js";
13
10
  import {
14
11
  Service3
15
- } from "./auth-w9jcwh65.js";
12
+ } from "./cors-5pdfedjd.js";
13
+ import {
14
+ Service5
15
+ } from "./cors-v9t81kwn.js";
16
16
 
17
17
  // src/handlers/server.ts
18
18
  import { hostname } from "node:os";
@@ -22,10 +22,10 @@ import { HttpApiBuilder } from "effect/http-api";
22
22
  import { PersistentPty } from "@opencode/core/persistent-pty";
23
23
  import { UnauthorizedError } from "@opencode/protocol/errors";
24
24
  var ServerHandler2 = HttpApiBuilder.group(Api2, "server.server", (handlers) => Effect.gen(function* () {
25
- const pairing = yield* Service3;
25
+ const pairing = yield* Service5;
26
26
  const auth = yield* Config2;
27
27
  return handlers.handle("server.info", () => Effect.gen(function* () {
28
- const info = yield* Service2;
28
+ const info = yield* Service3;
29
29
  return {
30
30
  version: info.app.version ?? "unknown",
31
31
  pid: process.pid ?? 0,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./auth-rqgv9x42.js";
3
+ } from "./cors-rqgv9x42.js";
4
4
 
5
5
  // src/handlers/automation.ts
6
6
  import { Automation } from "@opencode/core/automation";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./auth-br4x4prt.js";
3
+ } from "./cors-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./auth-whvq72as.js";
6
+ } from "./cors-whvq72as.js";
7
7
 
8
8
  // src/handlers/reference.ts
9
9
  import { Reference } from "@opencode/core/reference";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./auth-whvq72as.js";
3
+ } from "./cors-whvq72as.js";
4
4
 
5
5
  // src/handlers/project.ts
6
6
  import { Project } from "@opencode/core/project";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./auth-br4x4prt.js";
3
+ } from "./cors-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./auth-whvq72as.js";
6
+ } from "./cors-whvq72as.js";
7
7
 
8
8
  // src/handlers/form.ts
9
9
  import { Form } from "@opencode/core/form";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./auth-9rqn6x4v.js";
3
+ } from "./cors-9rqn6x4v.js";
4
4
 
5
5
  // src/range.ts
6
6
  var exports_range = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Api2
3
- } from "./auth-whvq72as.js";
3
+ } from "./cors-whvq72as.js";
4
4
  import {
5
5
  requireConnectable2
6
- } from "./auth-2tmcamrc.js";
6
+ } from "./cors-2tmcamrc.js";
7
7
 
8
8
  // src/handlers/credential.ts
9
9
  import { Credential } from "@opencode/core/credential";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./auth-br4x4prt.js";
3
+ } from "./cors-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./auth-whvq72as.js";
6
+ } from "./cors-whvq72as.js";
7
7
 
8
8
  // src/handlers/flag.ts
9
9
  import { Flag } from "@opencode/core/flag";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./auth-whvq72as.js";
3
+ } from "./cors-whvq72as.js";
4
4
 
5
5
  // src/handlers/config.ts
6
6
  import { Config } from "@opencode/core/config";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./auth-rqgv9x42.js";
3
+ } from "./cors-rqgv9x42.js";
4
4
 
5
5
  // src/location.ts
6
6
  import { FileSystem } from "@opencode/core/filesystem";
@@ -2,7 +2,7 @@ import {
2
2
  locationErrors2,
3
3
  sessionInfo2,
4
4
  requestRef2
5
- } from "./auth-br4x4prt.js";
5
+ } from "./cors-br4x4prt.js";
6
6
 
7
7
  // src/middleware/form-location.ts
8
8
  import { Instance } from "@opencode/core/instance/service";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  requestRef2
3
- } from "./auth-br4x4prt.js";
3
+ } from "./cors-br4x4prt.js";
4
4
  import {
5
5
  Api2
6
- } from "./auth-whvq72as.js";
6
+ } from "./cors-whvq72as.js";
7
7
 
8
8
  // src/handlers/debug.ts
9
9
  import { LocationServiceMap } from "@opencode/core/location-service-map";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CONTENT_SECURITY_POLICY2,
3
3
  disposition2
4
- } from "./auth-t32e1bbt.js";
4
+ } from "./cors-t32e1bbt.js";
5
5
 
6
6
  // src/handlers/media.ts
7
7
  import { Database } from "@opencode/core/database/database";