@opencode-ai/client 0.0.0-next-16419 → 0.0.0-next-16473

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.
@@ -158,7 +158,7 @@ export type Endpoint5_4Output = void;
158
158
  export type SessionRemoveOperation<E = never> = (input: Endpoint5_4Input) => Effect.Effect<Endpoint5_4Output, E>;
159
159
  export type Endpoint5_5Input = {
160
160
  readonly sessionID: Session.ID;
161
- readonly messageID?: SessionMessage.ID | undefined;
161
+ readonly boundary: Session.ForkRequestBoundary;
162
162
  };
163
163
  export type Endpoint5_5Output = Session.Info;
164
164
  export type SessionForkOperation<E = never> = (input: Endpoint5_5Input) => Effect.Effect<Endpoint5_5Output, E>;
@@ -414,8 +414,10 @@ export type Endpoint5_26Output = ({
414
414
  readonly data: {
415
415
  readonly sessionID: Session.ID;
416
416
  readonly parentID: Session.ID;
417
- readonly parentSeq: number;
418
- readonly from?: SessionMessage.ID | undefined;
417
+ readonly boundary: Session.ForkBoundary;
418
+ readonly instructions?: {
419
+ readonly [x: string & Brand.Brand<"Instruction.Key">]: string & Brand.Brand<"Instruction.Hash">;
420
+ } | undefined;
419
421
  };
420
422
  } | {
421
423
  readonly id: Event.ID;
@@ -453,8 +453,16 @@ export declare const make: (options?: {
453
453
  readonly data: {
454
454
  readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
455
455
  readonly parentID: string & import("effect/Brand").Brand<"SessionID">;
456
- readonly parentSeq: number;
457
- readonly from?: (string & import("effect/Brand").Brand<"Session.Message.ID">) | undefined;
456
+ readonly boundary: {
457
+ readonly type: "before";
458
+ readonly messageID: string & import("effect/Brand").Brand<"Session.Message.ID">;
459
+ } | {
460
+ readonly type: "through";
461
+ readonly messageID: string & import("effect/Brand").Brand<"Session.Message.ID">;
462
+ };
463
+ readonly instructions?: {
464
+ readonly [x: string & import("effect/Brand").Brand<"Instruction.Key">]: string & import("effect/Brand").Brand<"Instruction.Hash">;
465
+ } | undefined;
458
466
  };
459
467
  readonly durable: {
460
468
  readonly aggregateID: string;
@@ -41,7 +41,7 @@ const Endpoint5_1 = (raw) => (input) => preserveEffect()(raw["session.create"]({
41
41
  const Endpoint5_2 = (raw) => () => preserveEffect()(raw["session.active"]({}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
42
42
  const Endpoint5_3 = (raw) => (input) => preserveEffect()(raw["session.get"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
43
43
  const Endpoint5_4 = (raw) => (input) => preserveEffect()(raw["session.remove"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)));
44
- const Endpoint5_5 = (raw) => (input) => preserveEffect()(raw["session.fork"]({ params: { sessionID: input["sessionID"] }, payload: { messageID: input["messageID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
44
+ const Endpoint5_5 = (raw) => (input) => preserveEffect()(raw["session.fork"]({ params: { sessionID: input["sessionID"] }, payload: { boundary: input["boundary"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
45
45
  const Endpoint5_6 = (raw) => (input) => preserveEffect()(raw["session.switchAgent"]({ params: { sessionID: input["sessionID"] }, payload: { agent: input["agent"] } }).pipe(Effect.mapError(mapClientError)));
46
46
  const Endpoint5_7 = (raw) => (input) => preserveEffect()(raw["session.switchModel"]({ params: { sessionID: input["sessionID"] }, payload: { model: input["model"] } }).pipe(Effect.mapError(mapClientError)));
47
47
  const Endpoint5_8 = (raw) => (input) => preserveEffect()(raw["session.rename"]({ params: { sessionID: input["sessionID"] }, payload: { title: input["title"] } }).pipe(Effect.mapError(mapClientError)));
@@ -235,7 +235,7 @@ export function make(options) {
235
235
  fork: (input, requestOptions) => request({
236
236
  method: "POST",
237
237
  path: `/api/session/${encodeURIComponent(input.sessionID)}/fork`,
238
- body: { messageID: input["messageID"] },
238
+ body: { boundary: input["boundary"] },
239
239
  successStatus: 200,
240
240
  declaredStatuses: [404, 400, 401],
241
241
  empty: false,
@@ -22,6 +22,13 @@ export type PermissionEffect = "allow" | "deny" | "ask";
22
22
  export type PluginInfo = {
23
23
  id: string;
24
24
  };
25
+ export type SessionForkBoundary = {
26
+ type: "before";
27
+ messageID: string;
28
+ } | {
29
+ type: "through";
30
+ messageID: string;
31
+ };
25
32
  export type MoneyUSD = number;
26
33
  export type TokenUsageInfo = {
27
34
  input: number;
@@ -66,7 +73,6 @@ export type SessionPendingSyntheticData = {
66
73
  };
67
74
  };
68
75
  export type SessionPendingCompaction = {
69
- admittedSeq: number;
70
76
  id: string;
71
77
  sessionID: string;
72
78
  timeCreated: number;
@@ -949,8 +955,10 @@ export type SessionForked = {
949
955
  data: {
950
956
  sessionID: string;
951
957
  parentID: string;
952
- parentSeq: number;
953
- from?: string;
958
+ boundary: SessionForkBoundary;
959
+ instructions?: {
960
+ [x: string]: string;
961
+ };
954
962
  };
955
963
  };
956
964
  export type SessionInputPromoted = {
@@ -1804,7 +1812,6 @@ export type PromptAgentAttachment = {
1804
1812
  mention?: PromptMention;
1805
1813
  };
1806
1814
  export type SessionPendingSynthetic = {
1807
- admittedSeq: number;
1808
1815
  id: string;
1809
1816
  sessionID: string;
1810
1817
  timeCreated: number;
@@ -2453,7 +2460,7 @@ export type SessionInfo = {
2453
2460
  parentID?: string;
2454
2461
  fork?: {
2455
2462
  sessionID: string;
2456
- messageID?: string;
2463
+ boundary: SessionForkBoundary;
2457
2464
  };
2458
2465
  projectID: string;
2459
2466
  agent?: string;
@@ -2726,7 +2733,6 @@ export type SessionsResponse = {
2726
2733
  };
2727
2734
  };
2728
2735
  export type SessionPendingUser = {
2729
- admittedSeq: number;
2730
2736
  id: string;
2731
2737
  sessionID: string;
2732
2738
  timeCreated: number;
@@ -3444,9 +3450,14 @@ export type SessionForkInput = {
3444
3450
  readonly sessionID: {
3445
3451
  readonly sessionID: string;
3446
3452
  }["sessionID"];
3447
- readonly messageID?: {
3448
- readonly messageID?: string | undefined;
3449
- }["messageID"];
3453
+ readonly boundary: {
3454
+ readonly boundary: {
3455
+ readonly type: "before";
3456
+ readonly messageID: string;
3457
+ } | {
3458
+ readonly type: "through";
3459
+ };
3460
+ }["boundary"];
3450
3461
  };
3451
3462
  export type SessionForkOutput = {
3452
3463
  data: SessionInfo;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/client",
4
- "version": "0.0.0-next-16419",
4
+ "version": "0.0.0-next-16473",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -53,8 +53,8 @@
53
53
  "typecheck": "tsgo --noEmit"
54
54
  },
55
55
  "dependencies": {
56
- "@opencode-ai/schema": "0.0.0-next-16419",
57
- "@opencode-ai/protocol": "0.0.0-next-16419"
56
+ "@opencode-ai/schema": "0.0.0-next-16473",
57
+ "@opencode-ai/protocol": "0.0.0-next-16473"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "effect": "4.0.0-beta.101"
@@ -66,7 +66,7 @@
66
66
  },
67
67
  "devDependencies": {
68
68
  "@effect/platform-node": "4.0.0-beta.101",
69
- "@opencode-ai/httpapi-codegen": "0.0.0-next-16419",
69
+ "@opencode-ai/httpapi-codegen": "0.0.0-next-16473",
70
70
  "@tsconfig/bun": "1.0.9",
71
71
  "@types/bun": "1.3.13",
72
72
  "@typescript/native-preview": "7.0.0-dev.20251207.1",