@opencode/server 0.0.0-beta-19381 → 0.0.0-beta-19419

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/dist/api.d.ts CHANGED
@@ -3707,6 +3707,28 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
3707
3707
  }>>, never, never>;
3708
3708
  readonly text: import("effect/Schema").String;
3709
3709
  readonly recent: import("effect/Schema").String;
3710
+ readonly cost: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").Finite, "Money.USD"> & {
3711
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
3712
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").Finite, "Money.USD"> & {
3713
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
3714
+ }>, never, never>;
3715
+ readonly tokens: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
3716
+ readonly input: import("effect/Schema").Finite;
3717
+ readonly output: import("effect/Schema").Finite;
3718
+ readonly reasoning: import("effect/Schema").Finite;
3719
+ readonly cache: import("effect/Schema").Struct<{
3720
+ readonly read: import("effect/Schema").Finite;
3721
+ readonly write: import("effect/Schema").Finite;
3722
+ }>;
3723
+ }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
3724
+ readonly input: import("effect/Schema").Finite;
3725
+ readonly output: import("effect/Schema").Finite;
3726
+ readonly reasoning: import("effect/Schema").Finite;
3727
+ readonly cache: import("effect/Schema").Struct<{
3728
+ readonly read: import("effect/Schema").Finite;
3729
+ readonly write: import("effect/Schema").Finite;
3730
+ }>;
3731
+ }>>, never, never>;
3710
3732
  readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
3711
3733
  create: () => string & import("effect/Brand").Brand<"SessionID">;
3712
3734
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -3816,6 +3838,28 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
3816
3838
  }>>, never, never>;
3817
3839
  readonly text: import("effect/Schema").String;
3818
3840
  readonly recent: import("effect/Schema").String;
3841
+ readonly cost: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").Finite, "Money.USD"> & {
3842
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
3843
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").Finite, "Money.USD"> & {
3844
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
3845
+ }>, never, never>;
3846
+ readonly tokens: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
3847
+ readonly input: import("effect/Schema").Finite;
3848
+ readonly output: import("effect/Schema").Finite;
3849
+ readonly reasoning: import("effect/Schema").Finite;
3850
+ readonly cache: import("effect/Schema").Struct<{
3851
+ readonly read: import("effect/Schema").Finite;
3852
+ readonly write: import("effect/Schema").Finite;
3853
+ }>;
3854
+ }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
3855
+ readonly input: import("effect/Schema").Finite;
3856
+ readonly output: import("effect/Schema").Finite;
3857
+ readonly reasoning: import("effect/Schema").Finite;
3858
+ readonly cache: import("effect/Schema").Struct<{
3859
+ readonly read: import("effect/Schema").Finite;
3860
+ readonly write: import("effect/Schema").Finite;
3861
+ }>;
3862
+ }>>, never, never>;
3819
3863
  readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
3820
3864
  create: () => string & import("effect/Brand").Brand<"SessionID">;
3821
3865
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -3866,6 +3910,28 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
3866
3910
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
3867
3911
  fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
3868
3912
  }>, never, never>;
3913
+ readonly cost: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").Finite, "Money.USD"> & {
3914
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
3915
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").Finite, "Money.USD"> & {
3916
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
3917
+ }>, never, never>;
3918
+ readonly tokens: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
3919
+ readonly input: import("effect/Schema").Finite;
3920
+ readonly output: import("effect/Schema").Finite;
3921
+ readonly reasoning: import("effect/Schema").Finite;
3922
+ readonly cache: import("effect/Schema").Struct<{
3923
+ readonly read: import("effect/Schema").Finite;
3924
+ readonly write: import("effect/Schema").Finite;
3925
+ }>;
3926
+ }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
3927
+ readonly input: import("effect/Schema").Finite;
3928
+ readonly output: import("effect/Schema").Finite;
3929
+ readonly reasoning: import("effect/Schema").Finite;
3930
+ readonly cache: import("effect/Schema").Struct<{
3931
+ readonly read: import("effect/Schema").Finite;
3932
+ readonly write: import("effect/Schema").Finite;
3933
+ }>;
3934
+ }>>, never, never>;
3869
3935
  readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
3870
3936
  create: () => string & import("effect/Brand").Brand<"SessionID">;
3871
3937
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -3892,6 +3958,28 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
3892
3958
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
3893
3959
  fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
3894
3960
  }>, never, never>;
3961
+ readonly cost: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").Finite, "Money.USD"> & {
3962
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
3963
+ }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").Finite, "Money.USD"> & {
3964
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
3965
+ }>, never, never>;
3966
+ readonly tokens: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
3967
+ readonly input: import("effect/Schema").Finite;
3968
+ readonly output: import("effect/Schema").Finite;
3969
+ readonly reasoning: import("effect/Schema").Finite;
3970
+ readonly cache: import("effect/Schema").Struct<{
3971
+ readonly read: import("effect/Schema").Finite;
3972
+ readonly write: import("effect/Schema").Finite;
3973
+ }>;
3974
+ }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
3975
+ readonly input: import("effect/Schema").Finite;
3976
+ readonly output: import("effect/Schema").Finite;
3977
+ readonly reasoning: import("effect/Schema").Finite;
3978
+ readonly cache: import("effect/Schema").Struct<{
3979
+ readonly read: import("effect/Schema").Finite;
3980
+ readonly write: import("effect/Schema").Finite;
3981
+ }>;
3982
+ }>>, never, never>;
3895
3983
  readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
3896
3984
  create: () => string & import("effect/Brand").Brand<"SessionID">;
3897
3985
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -7586,6 +7674,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
7586
7674
  readonly text: string;
7587
7675
  readonly reason: "auto" | "manual";
7588
7676
  readonly recent: string;
7677
+ readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
7589
7678
  readonly model?: {
7590
7679
  readonly id: string & import("effect/Brand").Brand<"Model.ID">;
7591
7680
  readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -7594,6 +7683,15 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
7594
7683
  readonly providerState?: {
7595
7684
  readonly [x: string]: unknown;
7596
7685
  } | undefined;
7686
+ readonly tokens?: {
7687
+ readonly input: number;
7688
+ readonly output: number;
7689
+ readonly reasoning: number;
7690
+ readonly cache: {
7691
+ readonly read: number;
7692
+ readonly write: number;
7693
+ };
7694
+ } | undefined;
7597
7695
  readonly providerContext?: {
7598
7696
  readonly version: 1;
7599
7697
  readonly provenance: {
@@ -7631,6 +7729,16 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
7631
7729
  readonly status?: number | undefined;
7632
7730
  };
7633
7731
  readonly reason: "auto" | "manual";
7732
+ readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
7733
+ readonly tokens?: {
7734
+ readonly input: number;
7735
+ readonly output: number;
7736
+ readonly reasoning: number;
7737
+ readonly cache: {
7738
+ readonly read: number;
7739
+ readonly write: number;
7740
+ };
7741
+ } | undefined;
7634
7742
  readonly inputID?: (string & import("effect/Brand").Brand<"Session.Message.ID">) | undefined;
7635
7743
  };
7636
7744
  readonly durable: {
package/dist/process.js CHANGED
@@ -97,7 +97,7 @@ function dispatch(password, status, application, version) {
97
97
  return yield* healthResponse(status, version);
98
98
  }
99
99
  const state = yield* status.current, app = yield* Ref.get(application), ready = state.type === "ready" && Option.isSome(app);
100
- if ((url.pathname === "/api" || url.pathname.startsWith("/api/") || url.pathname === "/openapi.json") && (!ready || !hasPtyConnectTicketURL(url) && !hasPersistentPtyConnectTicketURL(url)) && !(yield* authorizedRequest(request, auth)))
100
+ if ((!ready || !hasPtyConnectTicketURL(url) && !hasPersistentPtyConnectTicketURL(url)) && !(yield* authorizedRequest(request, auth)))
101
101
  return unauthorized();
102
102
  if (ready)
103
103
  return yield* app.value;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/server",
4
- "version": "0.0.0-beta-19381",
4
+ "version": "0.0.0-beta-19419",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -30,17 +30,17 @@
30
30
  "dependencies": {
31
31
  "@effect/platform-node": "4.0.0-rc.112",
32
32
  "@effect/platform-node-shared": "4.0.0-rc.112",
33
- "@opencode/core": "0.0.0-beta-19381",
34
- "@opencode/protocol": "0.0.0-beta-19381",
35
- "@opencode/schema": "0.0.0-beta-19381",
36
- "@opencode/simulation": "0.0.0-beta-19381",
37
- "@opencode/util": "0.0.0-beta-19381",
33
+ "@opencode/core": "0.0.0-beta-19419",
34
+ "@opencode/protocol": "0.0.0-beta-19419",
35
+ "@opencode/schema": "0.0.0-beta-19419",
36
+ "@opencode/simulation": "0.0.0-beta-19419",
37
+ "@opencode/util": "0.0.0-beta-19419",
38
38
  "drizzle-orm": "1.0.0-rc.5-169397b",
39
39
  "effect": "4.0.0-rc.112"
40
40
  },
41
41
  "devDependencies": {
42
- "@opencode/client": "0.0.0-beta-19381",
43
- "@opencode/plugin": "0.0.0-beta-19381",
42
+ "@opencode/client": "0.0.0-beta-19419",
43
+ "@opencode/plugin": "0.0.0-beta-19419",
44
44
  "@tsconfig/bun": "1.0.9",
45
45
  "@types/bun": "1.4.0",
46
46
  "@typescript/native-preview": "7.0.0-dev.20251207.1"