@opencode/server 2.2.2 → 2.2.3

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 (116) hide show
  1. package/dist/api.d.ts +16 -0
  2. package/dist/api.js +5 -5
  3. package/dist/auth.js +1 -1
  4. package/dist/chunks/{workerd-059rbh9c.js → service-status-059rbh9c.js} +1 -1
  5. package/dist/chunks/{workerd-0e4fm4yw.js → service-status-0e4fm4yw.js} +1 -1
  6. package/dist/chunks/{workerd-yemng8y6.js → service-status-0mnp9wde.js} +6 -6
  7. package/dist/chunks/{workerd-0pbbhyf6.js → service-status-0pbbhyf6.js} +2 -2
  8. package/dist/chunks/{workerd-1s3664te.js → service-status-1s3664te.js} +4 -4
  9. package/dist/chunks/service-status-1t8ee1b5.js +61 -0
  10. package/dist/chunks/{workerd-2835150m.js → service-status-2835150m.js} +2 -2
  11. package/dist/chunks/{workerd-2qjvs0kv.js → service-status-2qjvs0kv.js} +4 -4
  12. package/dist/chunks/{workerd-370cpmna.js → service-status-370cpmna.js} +2 -2
  13. package/dist/chunks/{workerd-ze052fvn.js → service-status-39fj7rnq.js} +11 -11
  14. package/dist/chunks/{workerd-0q7s66m2.js → service-status-39nnfjx1.js} +4 -4
  15. package/dist/chunks/{workerd-50xc6x42.js → service-status-50xc6x42.js} +3 -3
  16. package/dist/chunks/{workerd-5z5anmwp.js → service-status-5z5anmwp.js} +2 -2
  17. package/dist/chunks/{workerd-71pkxez6.js → service-status-6211mtn3.js} +33 -33
  18. package/dist/chunks/{workerd-74kxthdf.js → service-status-74kxthdf.js} +1 -1
  19. package/dist/chunks/{workerd-7b9xm1qg.js → service-status-7b9xm1qg.js} +1 -1
  20. package/dist/chunks/{workerd-7cd61xtm.js → service-status-7cd61xtm.js} +2 -2
  21. package/dist/chunks/{workerd-7dtbad8d.js → service-status-7dtbad8d.js} +1 -1
  22. package/dist/chunks/{workerd-7tewdwsb.js → service-status-7tewdwsb.js} +2 -2
  23. package/dist/chunks/{workerd-7x1re4zg.js → service-status-7x1re4zg.js} +2 -2
  24. package/dist/chunks/{workerd-zhns4s2s.js → service-status-9jpfpdce.js} +4 -4
  25. package/dist/chunks/{workerd-5553qfcy.js → service-status-ac10qb5k.js} +3 -3
  26. package/dist/chunks/{workerd-4gk9fc6f.js → service-status-bv5jg9y6.js} +29 -4
  27. package/dist/chunks/{workerd-wh109kze.js → service-status-dm74gm07.js} +6 -6
  28. package/dist/chunks/{workerd-f4exzdsf.js → service-status-f4exzdsf.js} +2 -2
  29. package/dist/chunks/{workerd-20b2yx1f.js → service-status-fvpjvjpp.js} +9 -9
  30. package/dist/chunks/{workerd-fvqb5t8b.js → service-status-fvqb5t8b.js} +5 -5
  31. package/dist/chunks/{workerd-gk0yxcp6.js → service-status-gk0yxcp6.js} +1 -1
  32. package/dist/chunks/{workerd-gqq6kfhc.js → service-status-gqq6kfhc.js} +1 -1
  33. package/dist/chunks/{workerd-j4at0y5c.js → service-status-j4at0y5c.js} +1 -1
  34. package/dist/chunks/{workerd-jc2vwkyw.js → service-status-jc2vwkyw.js} +2 -2
  35. package/dist/chunks/{workerd-r5696se6.js → service-status-r5696se6.js} +3 -3
  36. package/dist/chunks/{workerd-rxyx8sa0.js → service-status-rxyx8sa0.js} +2 -2
  37. package/dist/chunks/{workerd-skcryrty.js → service-status-skcryrty.js} +2 -2
  38. package/dist/chunks/{workerd-sqxx1p54.js → service-status-sqxx1p54.js} +2 -2
  39. package/dist/chunks/{workerd-vfkjeyp3.js → service-status-vfkjeyp3.js} +1 -1
  40. package/dist/chunks/{workerd-vtfzy3at.js → service-status-vtfzy3at.js} +2 -2
  41. package/dist/chunks/{workerd-vvp99hc9.js → service-status-vvp99hc9.js} +1 -1
  42. package/dist/chunks/{workerd-kqr36gas.js → service-status-w9jcwh65.js} +7 -7
  43. package/dist/chunks/{workerd-wqv43pj9.js → service-status-wqv43pj9.js} +2 -2
  44. package/dist/chunks/{workerd-xbqm7mpj.js → service-status-xbqm7mpj.js} +2 -2
  45. package/dist/chunks/{workerd-xpg37vzc.js → service-status-xpg37vzc.js} +2 -2
  46. package/dist/chunks/{workerd-yet0vexm.js → service-status-yet0vexm.js} +1 -1
  47. package/dist/chunks/{workerd-z9kgby92.js → service-status-zkg10e14.js} +4 -4
  48. package/dist/chunks/{workerd-zmgfywqd.js → service-status-zmgfywqd.js} +1 -1
  49. package/dist/chunks/{workerd-zyntahe8.js → service-status-zyntahe8.js} +1 -1
  50. package/dist/cors.js +1 -1
  51. package/dist/event-feed.js +5 -5
  52. package/dist/fetch.js +53 -53
  53. package/dist/handlers/agent.js +6 -6
  54. package/dist/handlers/command.js +6 -6
  55. package/dist/handlers/config.js +6 -6
  56. package/dist/handlers/credential.d.ts +3 -1
  57. package/dist/handlers/credential.js +7 -6
  58. package/dist/handlers/debug.js +6 -6
  59. package/dist/handlers/event.js +7 -7
  60. package/dist/handlers/form.js +6 -6
  61. package/dist/handlers/fs.js +6 -6
  62. package/dist/handlers/generate.js +6 -6
  63. package/dist/handlers/integration.d.ts +5 -0
  64. package/dist/handlers/integration.js +9 -7
  65. package/dist/handlers/location.js +6 -6
  66. package/dist/handlers/mcp.js +8 -8
  67. package/dist/handlers/media.js +1 -1
  68. package/dist/handlers/message.js +7 -7
  69. package/dist/handlers/migration.js +6 -6
  70. package/dist/handlers/model.js +6 -6
  71. package/dist/handlers/permission.js +6 -6
  72. package/dist/handlers/persistent-pty.js +10 -10
  73. package/dist/handlers/plugin.js +6 -6
  74. package/dist/handlers/project.js +6 -6
  75. package/dist/handlers/provider.js +6 -6
  76. package/dist/handlers/pty-socket.js +1 -1
  77. package/dist/handlers/pty.js +8 -8
  78. package/dist/handlers/reference.js +6 -6
  79. package/dist/handlers/rpc.js +6 -6
  80. package/dist/handlers/schedule.d.ts +30 -0
  81. package/dist/handlers/schedule.js +2 -2
  82. package/dist/handlers/server.js +9 -9
  83. package/dist/handlers/session-error.js +1 -1
  84. package/dist/handlers/session.js +7 -7
  85. package/dist/handlers/shell.js +6 -6
  86. package/dist/handlers/skill.js +6 -6
  87. package/dist/handlers/usage.js +6 -6
  88. package/dist/handlers/vcs.js +6 -6
  89. package/dist/handlers/voice.js +6 -6
  90. package/dist/handlers/websearch.js +6 -6
  91. package/dist/handlers/worktree.js +6 -6
  92. package/dist/handlers.js +47 -47
  93. package/dist/location.js +2 -2
  94. package/dist/media-uri.js +1 -1
  95. package/dist/middleware/authorization.js +2 -2
  96. package/dist/middleware/form-location.js +3 -3
  97. package/dist/middleware/schema-error.js +1 -1
  98. package/dist/middleware/session-location.js +3 -3
  99. package/dist/pairing.js +3 -3
  100. package/dist/process.js +55 -55
  101. package/dist/request-tracing.js +1 -1
  102. package/dist/routes.js +50 -50
  103. package/dist/server-info.js +1 -1
  104. package/dist/service-status.js +3 -3
  105. package/dist/workerd.d.ts +4 -3
  106. package/dist/workerd.js +68 -54
  107. package/package.json +8 -8
  108. package/dist/chunks/workerd-hdwd22w5.js +0 -47
  109. /package/dist/chunks/{workerd-9rqn6x4v.js → service-status-9rqn6x4v.js} +0 -0
  110. /package/dist/chunks/{workerd-bd8755ek.js → service-status-bd8755ek.js} +0 -0
  111. /package/dist/chunks/{workerd-h6rt5k9s.js → service-status-h6rt5k9s.js} +0 -0
  112. /package/dist/chunks/{workerd-n321d8vm.js → service-status-n321d8vm.js} +0 -0
  113. /package/dist/chunks/{workerd-q4bn6dy8.js → service-status-q4bn6dy8.js} +0 -0
  114. /package/dist/chunks/{workerd-smaf4a18.js → service-status-smaf4a18.js} +0 -0
  115. /package/dist/chunks/{workerd-xthc02cw.js → service-status-xthc02cw.js} +0 -0
  116. /package/dist/chunks/{workerd-yc7nft6q.js → service-status-yc7nft6q.js} +0 -0
package/dist/api.d.ts CHANGED
@@ -335,6 +335,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
335
335
  google: string & import("effect/Brand").Brand<"Provider.ID">;
336
336
  googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
337
337
  githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
338
+ claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
338
339
  amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
339
340
  azure: string & import("effect/Brand").Brand<"Provider.ID">;
340
341
  openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -357,6 +358,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
357
358
  google: string & import("effect/Brand").Brand<"Provider.ID">;
358
359
  googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
359
360
  githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
361
+ claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
360
362
  amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
361
363
  azure: string & import("effect/Brand").Brand<"Provider.ID">;
362
364
  openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -425,6 +427,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
425
427
  google: string & import("effect/Brand").Brand<"Provider.ID">;
426
428
  googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
427
429
  githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
430
+ claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
428
431
  amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
429
432
  azure: string & import("effect/Brand").Brand<"Provider.ID">;
430
433
  openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -447,6 +450,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
447
450
  google: string & import("effect/Brand").Brand<"Provider.ID">;
448
451
  googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
449
452
  githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
453
+ claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
450
454
  amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
451
455
  azure: string & import("effect/Brand").Brand<"Provider.ID">;
452
456
  openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -569,6 +573,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
569
573
  google: string & import("effect/Brand").Brand<"Provider.ID">;
570
574
  googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
571
575
  githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
576
+ claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
572
577
  amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
573
578
  azure: string & import("effect/Brand").Brand<"Provider.ID">;
574
579
  openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -592,6 +597,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
592
597
  google: string & import("effect/Brand").Brand<"Provider.ID">;
593
598
  googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
594
599
  githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
600
+ claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
595
601
  amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
596
602
  azure: string & import("effect/Brand").Brand<"Provider.ID">;
597
603
  openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -614,6 +620,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
614
620
  google: string & import("effect/Brand").Brand<"Provider.ID">;
615
621
  googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
616
622
  githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
623
+ claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
617
624
  amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
618
625
  azure: string & import("effect/Brand").Brand<"Provider.ID">;
619
626
  openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -649,6 +656,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
649
656
  google: string & import("effect/Brand").Brand<"Provider.ID">;
650
657
  googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
651
658
  githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
659
+ claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
652
660
  amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
653
661
  azure: string & import("effect/Brand").Brand<"Provider.ID">;
654
662
  openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -672,6 +680,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
672
680
  google: string & import("effect/Brand").Brand<"Provider.ID">;
673
681
  googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
674
682
  githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
683
+ claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
675
684
  amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
676
685
  azure: string & import("effect/Brand").Brand<"Provider.ID">;
677
686
  openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -694,6 +703,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
694
703
  google: string & import("effect/Brand").Brand<"Provider.ID">;
695
704
  googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
696
705
  githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
706
+ claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
697
707
  amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
698
708
  azure: string & import("effect/Brand").Brand<"Provider.ID">;
699
709
  openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -2468,6 +2478,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
2468
2478
  google: string & import("effect/Brand").Brand<"Provider.ID">;
2469
2479
  googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
2470
2480
  githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
2481
+ claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
2471
2482
  amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
2472
2483
  azure: string & import("effect/Brand").Brand<"Provider.ID">;
2473
2484
  openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -2510,6 +2521,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
2510
2521
  google: string & import("effect/Brand").Brand<"Provider.ID">;
2511
2522
  googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
2512
2523
  githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
2524
+ claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
2513
2525
  amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
2514
2526
  azure: string & import("effect/Brand").Brand<"Provider.ID">;
2515
2527
  openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -3874,6 +3886,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
3874
3886
  google: string & import("effect/Brand").Brand<"Provider.ID">;
3875
3887
  googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
3876
3888
  githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
3889
+ claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
3877
3890
  amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
3878
3891
  azure: string & import("effect/Brand").Brand<"Provider.ID">;
3879
3892
  openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -3896,6 +3909,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
3896
3909
  google: string & import("effect/Brand").Brand<"Provider.ID">;
3897
3910
  googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
3898
3911
  githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
3912
+ claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
3899
3913
  amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
3900
3914
  azure: string & import("effect/Brand").Brand<"Provider.ID">;
3901
3915
  openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -3956,6 +3970,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
3956
3970
  google: string & import("effect/Brand").Brand<"Provider.ID">;
3957
3971
  googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
3958
3972
  githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
3973
+ claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
3959
3974
  amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
3960
3975
  azure: string & import("effect/Brand").Brand<"Provider.ID">;
3961
3976
  openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -3978,6 +3993,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
3978
3993
  google: string & import("effect/Brand").Brand<"Provider.ID">;
3979
3994
  googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
3980
3995
  githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
3996
+ claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
3981
3997
  amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
3982
3998
  azure: string & import("effect/Brand").Brand<"Provider.ID">;
3983
3999
  openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
package/dist/api.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Api2
3
- } from "./chunks/workerd-r5696se6.js";
4
- import"./chunks/workerd-gk0yxcp6.js";
5
- import"./chunks/workerd-yet0vexm.js";
6
- import"./chunks/workerd-gqq6kfhc.js";
7
- import"./chunks/workerd-smaf4a18.js";
3
+ } from "./chunks/service-status-r5696se6.js";
4
+ import"./chunks/service-status-gk0yxcp6.js";
5
+ import"./chunks/service-status-yet0vexm.js";
6
+ import"./chunks/service-status-gqq6kfhc.js";
7
+ import"./chunks/service-status-smaf4a18.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/workerd-j4at0y5c.js";
10
+ } from "./chunks/service-status-j4at0y5c.js";
11
11
  export {
12
12
  Config2 as Config,
13
13
  SESSION_TTL_SECONDS2 as SESSION_TTL_SECONDS,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./workerd-smaf4a18.js";
3
+ } from "./service-status-smaf4a18.js";
4
4
 
5
5
  // src/handlers/schedule.ts
6
6
  import { Permission } from "@opencode/core/permission";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./workerd-r5696se6.js";
3
+ } from "./service-status-r5696se6.js";
4
4
 
5
5
  // src/handlers/config.ts
6
6
  import { Config } from "@opencode/core/config";
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  isAllowedCorsOrigin2
3
- } from "./workerd-q4bn6dy8.js";
3
+ } from "./service-status-q4bn6dy8.js";
4
4
  import {
5
5
  createRoutes2
6
- } from "./workerd-ze052fvn.js";
6
+ } from "./service-status-39fj7rnq.js";
7
7
  import {
8
8
  __export
9
- } from "./workerd-9rqn6x4v.js";
9
+ } from "./service-status-9rqn6x4v.js";
10
10
 
11
11
  // src/fetch.ts
12
12
  var exports_fetch = {};
13
13
  __export(exports_fetch, {
14
14
  ServerFetch: () => exports_fetch,
15
- make: () => make2
15
+ make: () => make3
16
16
  });
17
17
  import { Context, Effect, Layer } from "effect";
18
18
  import { HttpEffect, HttpMiddleware, HttpRouter, HttpServer } from "effect/http";
19
19
  import { SessionRestart } from "@opencode/core/session/execution/restart";
20
- var make2 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
20
+ var make3 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
21
21
  const context = yield* Layer.build(createRoutes2(options, () => [], boot.overrides ?? []).pipe(Layer.provide(HttpServer.layerServices)));
22
22
  yield* Effect.forkDetach(Context.get(context, SessionRestart.Service).resumeSuspendedSessions);
23
23
  return Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(HttpMiddleware.cors({ allowedOrigins: (origin) => isAllowedCorsOrigin2(origin, options), maxAge: 86400 }), HttpEffect.toWebHandlerWith(context));
24
24
  });
25
25
 
26
- export { make2, exports_fetch };
26
+ export { make3, exports_fetch };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./workerd-gqq6kfhc.js";
3
+ } from "./service-status-gqq6kfhc.js";
4
4
  import {
5
5
  Api2
6
- } from "./workerd-r5696se6.js";
6
+ } from "./service-status-r5696se6.js";
7
7
 
8
8
  // src/handlers/fs.ts
9
9
  import { FileSystem } from "@opencode/core/filesystem";
@@ -2,17 +2,17 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./workerd-gqq6kfhc.js";
5
+ } from "./service-status-gqq6kfhc.js";
6
6
  import {
7
7
  Api2
8
- } from "./workerd-r5696se6.js";
8
+ } from "./service-status-r5696se6.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./workerd-q4bn6dy8.js";
12
+ } from "./service-status-q4bn6dy8.js";
13
13
  import {
14
14
  runPtySocket2
15
- } from "./workerd-h6rt5k9s.js";
15
+ } from "./service-status-h6rt5k9s.js";
16
16
 
17
17
  // src/handlers/mcp.ts
18
18
  import { Location } from "@opencode/core/location";
@@ -0,0 +1,61 @@
1
+ import {
2
+ Api2
3
+ } from "./service-status-r5696se6.js";
4
+ import {
5
+ requireConnectable2
6
+ } from "./service-status-bv5jg9y6.js";
7
+
8
+ // src/handlers/credential.ts
9
+ import { Credential } from "@opencode/core/credential";
10
+ import { FileSystem } from "@opencode/core/filesystem";
11
+ import { Location } from "@opencode/core/location";
12
+ import { LocationServiceMap } from "@opencode/core/location-services";
13
+ import { AbsolutePath } from "@opencode/core/schema";
14
+ import { ConflictError } from "@opencode/protocol/errors";
15
+ import { Global } from "@opencode/util/global";
16
+ import { Effect } from "effect";
17
+ import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
18
+ var CredentialHandler2 = HttpApiBuilder.group(Api2, "server.credential", (handlers) => Effect.gen(function* () {
19
+ const global = yield* Global.Service;
20
+ const locations = yield* LocationServiceMap.Service;
21
+ const services = locations.get(Location.Ref.make({ directory: AbsolutePath.make(global.config) }));
22
+ return handlers.handle("credential.list", Effect.fn(function* () {
23
+ const credential = yield* Credential.Service;
24
+ return { data: entries(yield* credential.all()) };
25
+ })).handle("credential.create", Effect.fn(function* (ctx) {
26
+ yield* requireConnectable2(ctx.payload.integrationID).pipe(Effect.provide(services), Effect.catchIf((error) => error instanceof FileSystem.DirectoryNotFoundError, Effect.die));
27
+ const credential = yield* Credential.Service;
28
+ if (ctx.payload.id && (yield* credential.get(ctx.payload.id)))
29
+ return yield* new ConflictError({
30
+ resource: ctx.payload.id,
31
+ message: `Credential already exists: ${ctx.payload.id}`
32
+ });
33
+ const created = yield* credential.create(ctx.payload);
34
+ const entry = entries(yield* credential.list(created.integrationID)).find((item) => item.id === created.id);
35
+ return { data: entry ?? { ...created, active: false } };
36
+ })).handle("credential.update", Effect.fn(function* (ctx) {
37
+ const credential = yield* Credential.Service;
38
+ yield* credential.update(ctx.params.credentialID, { label: ctx.payload.label });
39
+ return HttpApiSchema.NoContent.make();
40
+ })).handle("credential.activate", Effect.fn(function* (ctx) {
41
+ const credential = yield* Credential.Service;
42
+ yield* credential.activate(ctx.params.credentialID);
43
+ return HttpApiSchema.NoContent.make();
44
+ })).handle("credential.remove", Effect.fn(function* (ctx) {
45
+ const credential = yield* Credential.Service;
46
+ yield* credential.remove(ctx.params.credentialID);
47
+ return HttpApiSchema.NoContent.make();
48
+ }));
49
+ }));
50
+ function entries(credentials) {
51
+ const selected = new Map(credentials.map((item) => [item.integrationID, item.id]));
52
+ return credentials.map((item) => ({
53
+ id: item.id,
54
+ integrationID: item.integrationID,
55
+ label: item.label,
56
+ active: selected.get(item.integrationID) === item.id,
57
+ value: item.value
58
+ }));
59
+ }
60
+
61
+ export { CredentialHandler2 };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  locationErrors2,
3
3
  awaitPlugins2
4
- } from "./workerd-gqq6kfhc.js";
4
+ } from "./service-status-gqq6kfhc.js";
5
5
  import {
6
6
  Api2
7
- } from "./workerd-r5696se6.js";
7
+ } from "./service-status-r5696se6.js";
8
8
 
9
9
  // src/handlers/voice.ts
10
10
  import { Location } from "@opencode/core/location";
@@ -2,17 +2,17 @@ import {
2
2
  locationErrors2,
3
3
  response2,
4
4
  requestRef2
5
- } from "./workerd-gqq6kfhc.js";
5
+ } from "./service-status-gqq6kfhc.js";
6
6
  import {
7
7
  Api2
8
- } from "./workerd-r5696se6.js";
8
+ } from "./service-status-r5696se6.js";
9
9
  import {
10
10
  CorsConfig2,
11
11
  isAllowedRequestOrigin2
12
- } from "./workerd-q4bn6dy8.js";
12
+ } from "./service-status-q4bn6dy8.js";
13
13
  import {
14
14
  runPtySocket2
15
- } from "./workerd-h6rt5k9s.js";
15
+ } from "./service-status-h6rt5k9s.js";
16
16
 
17
17
  // src/handlers/pty.ts
18
18
  import { Pty } from "@opencode/core/pty";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  awaitPlugins2,
3
3
  response2
4
- } from "./workerd-gqq6kfhc.js";
4
+ } from "./service-status-gqq6kfhc.js";
5
5
  import {
6
6
  Api2
7
- } from "./workerd-r5696se6.js";
7
+ } from "./service-status-r5696se6.js";
8
8
 
9
9
  // src/handlers/model.ts
10
10
  import { Model } from "@opencode/core/model";
@@ -1,36 +1,36 @@
1
1
  import {
2
2
  layer3
3
- } from "./workerd-gqq6kfhc.js";
3
+ } from "./service-status-gqq6kfhc.js";
4
4
  import {
5
5
  formLocationLayer2
6
- } from "./workerd-gk0yxcp6.js";
6
+ } from "./service-status-gk0yxcp6.js";
7
7
  import {
8
8
  sessionLocationLayer2
9
- } from "./workerd-yet0vexm.js";
9
+ } from "./service-status-yet0vexm.js";
10
10
  import {
11
11
  Api2
12
- } from "./workerd-r5696se6.js";
12
+ } from "./service-status-r5696se6.js";
13
13
  import {
14
14
  Config2
15
- } from "./workerd-j4at0y5c.js";
15
+ } from "./service-status-j4at0y5c.js";
16
16
  import {
17
17
  CorsConfig2
18
- } from "./workerd-q4bn6dy8.js";
18
+ } from "./service-status-q4bn6dy8.js";
19
19
  import {
20
20
  layer4
21
- } from "./workerd-7dtbad8d.js";
21
+ } from "./service-status-7dtbad8d.js";
22
22
  import {
23
23
  node2
24
- } from "./workerd-kqr36gas.js";
24
+ } from "./service-status-w9jcwh65.js";
25
25
  import {
26
26
  handlers2
27
- } from "./workerd-71pkxez6.js";
27
+ } from "./service-status-6211mtn3.js";
28
28
  import {
29
29
  authorizationLayer2
30
- } from "./workerd-7b9xm1qg.js";
30
+ } from "./service-status-7b9xm1qg.js";
31
31
  import {
32
32
  schemaErrorLayer2
33
- } from "./workerd-bd8755ek.js";
33
+ } from "./service-status-bd8755ek.js";
34
34
 
35
35
  // src/routes.ts
36
36
  import { Database } from "@opencode/core/database/database";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  __export
3
- } from "./workerd-9rqn6x4v.js";
3
+ } from "./service-status-9rqn6x4v.js";
4
4
 
5
5
  // src/service-status.ts
6
6
  var exports_service_status = {};
7
7
  __export(exports_service_status, {
8
8
  Status: () => exports_service_status,
9
- make: () => make4
9
+ make: () => make2
10
10
  });
11
11
  import { Effect, Ref } from "effect";
12
- var make4 = Effect.fnUntraced(function* (options = {}) {
12
+ var make2 = Effect.fnUntraced(function* (options = {}) {
13
13
  const current = yield* Ref.make(options.initial ?? { type: "starting" });
14
14
  const beginStopping = Ref.update(current, (status) => status.type === "stopping" ? status : { type: "stopping" });
15
15
  return {
@@ -20,4 +20,4 @@ var make4 = Effect.fnUntraced(function* (options = {}) {
20
20
  };
21
21
  });
22
22
 
23
- export { make4, exports_service_status };
23
+ export { make2, exports_service_status };
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  missingSession2
3
- } from "./workerd-smaf4a18.js";
3
+ } from "./service-status-smaf4a18.js";
4
4
  import {
5
5
  locationErrors2,
6
6
  response2,
7
7
  sessionInfo2
8
- } from "./workerd-gqq6kfhc.js";
8
+ } from "./service-status-gqq6kfhc.js";
9
9
  import {
10
10
  Api2
11
- } from "./workerd-r5696se6.js";
11
+ } from "./service-status-r5696se6.js";
12
12
 
13
13
  // src/handlers/permission.ts
14
14
  import { Instance } from "@opencode/core/instance/service";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  awaitPlugins2,
3
3
  response2
4
- } from "./workerd-gqq6kfhc.js";
4
+ } from "./service-status-gqq6kfhc.js";
5
5
  import {
6
6
  Api2
7
- } from "./workerd-r5696se6.js";
7
+ } from "./service-status-r5696se6.js";
8
8
 
9
9
  // src/handlers/usage.ts
10
10
  import { UsageLimits } from "@opencode/core/usage-limits";
@@ -1,102 +1,102 @@
1
1
  import {
2
2
  GenerateHandler2
3
- } from "./workerd-wqv43pj9.js";
3
+ } from "./service-status-wqv43pj9.js";
4
4
  import {
5
5
  VoiceHandler2
6
- } from "./workerd-2835150m.js";
6
+ } from "./service-status-2835150m.js";
7
7
  import {
8
8
  MessageHandler2
9
- } from "./workerd-5553qfcy.js";
9
+ } from "./service-status-ac10qb5k.js";
10
10
  import {
11
11
  ModelHandler2
12
- } from "./workerd-370cpmna.js";
12
+ } from "./service-status-370cpmna.js";
13
13
  import {
14
14
  ProviderHandler2
15
- } from "./workerd-vtfzy3at.js";
15
+ } from "./service-status-vtfzy3at.js";
16
16
  import {
17
17
  SessionHandler2
18
- } from "./workerd-z9kgby92.js";
18
+ } from "./service-status-zkg10e14.js";
19
19
  import {
20
20
  PermissionHandler2
21
- } from "./workerd-50xc6x42.js";
21
+ } from "./service-status-50xc6x42.js";
22
22
  import {
23
23
  FileSystemHandler2
24
- } from "./workerd-0pbbhyf6.js";
24
+ } from "./service-status-0pbbhyf6.js";
25
25
  import {
26
26
  FormHandler2
27
- } from "./workerd-7x1re4zg.js";
27
+ } from "./service-status-7x1re4zg.js";
28
28
  import {
29
29
  CommandHandler2
30
- } from "./workerd-xpg37vzc.js";
30
+ } from "./service-status-xpg37vzc.js";
31
31
  import {
32
32
  SkillHandler2
33
- } from "./workerd-xbqm7mpj.js";
33
+ } from "./service-status-xbqm7mpj.js";
34
34
  import {
35
35
  RpcHandler2
36
- } from "./workerd-zyntahe8.js";
36
+ } from "./service-status-zyntahe8.js";
37
37
  import {
38
38
  layer2
39
- } from "./workerd-20b2yx1f.js";
39
+ } from "./service-status-fvpjvjpp.js";
40
40
  import {
41
41
  EventHandler2
42
- } from "./workerd-zhns4s2s.js";
42
+ } from "./service-status-9jpfpdce.js";
43
43
  import {
44
44
  AgentHandler2
45
- } from "./workerd-f4exzdsf.js";
45
+ } from "./service-status-f4exzdsf.js";
46
46
  import {
47
47
  PluginHandler2
48
- } from "./workerd-sqxx1p54.js";
48
+ } from "./service-status-sqxx1p54.js";
49
49
  import {
50
50
  ServerHandler2
51
- } from "./workerd-wh109kze.js";
51
+ } from "./service-status-dm74gm07.js";
52
52
  import {
53
53
  DebugHandler2
54
- } from "./workerd-jc2vwkyw.js";
54
+ } from "./service-status-jc2vwkyw.js";
55
55
  import {
56
56
  PtyHandler2
57
- } from "./workerd-2qjvs0kv.js";
57
+ } from "./service-status-2qjvs0kv.js";
58
58
  import {
59
59
  PersistentPtyHandler2
60
- } from "./workerd-fvqb5t8b.js";
60
+ } from "./service-status-fvqb5t8b.js";
61
61
  import {
62
62
  ShellHandler2
63
- } from "./workerd-rxyx8sa0.js";
63
+ } from "./service-status-rxyx8sa0.js";
64
64
  import {
65
65
  ReferenceHandler2
66
- } from "./workerd-skcryrty.js";
66
+ } from "./service-status-skcryrty.js";
67
67
  import {
68
68
  LocationHandler2
69
- } from "./workerd-74kxthdf.js";
69
+ } from "./service-status-74kxthdf.js";
70
70
  import {
71
71
  IntegrationHandler2
72
- } from "./workerd-4gk9fc6f.js";
72
+ } from "./service-status-bv5jg9y6.js";
73
73
  import {
74
74
  WebSearchHandler2
75
- } from "./workerd-7cd61xtm.js";
75
+ } from "./service-status-7cd61xtm.js";
76
76
  import {
77
77
  UsageHandler2
78
- } from "./workerd-5z5anmwp.js";
78
+ } from "./service-status-5z5anmwp.js";
79
79
  import {
80
80
  McpHandler2
81
- } from "./workerd-1s3664te.js";
81
+ } from "./service-status-1s3664te.js";
82
82
  import {
83
83
  CredentialHandler2
84
- } from "./workerd-hdwd22w5.js";
84
+ } from "./service-status-1t8ee1b5.js";
85
85
  import {
86
86
  ProjectHandler2
87
- } from "./workerd-zmgfywqd.js";
87
+ } from "./service-status-zmgfywqd.js";
88
88
  import {
89
89
  WorktreeHandler2
90
- } from "./workerd-vfkjeyp3.js";
90
+ } from "./service-status-vfkjeyp3.js";
91
91
  import {
92
92
  VcsHandler2
93
- } from "./workerd-7tewdwsb.js";
93
+ } from "./service-status-7tewdwsb.js";
94
94
  import {
95
95
  MigrationHandler2
96
- } from "./workerd-vvp99hc9.js";
96
+ } from "./service-status-vvp99hc9.js";
97
97
  import {
98
98
  ConfigHandler2
99
- } from "./workerd-0e4fm4yw.js";
99
+ } from "./service-status-0e4fm4yw.js";
100
100
 
101
101
  // src/handlers.ts
102
102
  import { Layer } from "effect";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./workerd-r5696se6.js";
3
+ } from "./service-status-r5696se6.js";
4
4
 
5
5
  // src/handlers/location.ts
6
6
  import { Location } from "@opencode/core/location";
@@ -4,7 +4,7 @@ import {
4
4
  authorized2,
5
5
  verifySession2,
6
6
  sessionCookieName2
7
- } from "./workerd-j4at0y5c.js";
7
+ } from "./service-status-j4at0y5c.js";
8
8
 
9
9
  // src/middleware/authorization.ts
10
10
  import { UnauthorizedError } from "@opencode/protocol/errors";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  awaitPlugins2,
3
3
  response2
4
- } from "./workerd-gqq6kfhc.js";
4
+ } from "./service-status-gqq6kfhc.js";
5
5
  import {
6
6
  Api2
7
- } from "./workerd-r5696se6.js";
7
+ } from "./service-status-r5696se6.js";
8
8
 
9
9
  // src/handlers/websearch.ts
10
10
  import { WebSearch } from "@opencode/core/websearch";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./workerd-9rqn6x4v.js";
3
+ } from "./service-status-9rqn6x4v.js";
4
4
 
5
5
  // src/server-info.ts
6
6
  var exports_server_info = {};