@opencode/client 0.0.0-dev-19626 → 0.0.0-dev-19628

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.
@@ -2523,40 +2523,31 @@ export interface ReferenceApi<E = never> {
2523
2523
  readonly list: ReferenceListOperation<E>;
2524
2524
  }
2525
2525
  export type WorktreeListInput = {
2526
- readonly location?: {
2527
- readonly directory?: string | undefined;
2528
- } | undefined;
2526
+ readonly projectID: Project.ID;
2529
2527
  };
2530
2528
  export type WorktreeListOutput = Worktree.List;
2531
- export type WorktreeListOperation<E = never> = (input?: WorktreeListInput) => Effect.Effect<WorktreeListOutput, E>;
2529
+ export type WorktreeListOperation<E = never> = (input: WorktreeListInput) => Effect.Effect<WorktreeListOutput, E>;
2532
2530
  export type WorktreeCreateInput = {
2533
- readonly location?: {
2534
- readonly directory?: string | undefined;
2535
- } | undefined;
2536
- readonly strategy?: Worktree.StrategyID | undefined;
2531
+ readonly projectID: Project.ID;
2537
2532
  readonly from?: AbsolutePath | undefined;
2538
2533
  readonly branch?: string | undefined;
2539
2534
  readonly directory?: AbsolutePath | undefined;
2540
2535
  readonly name?: string | undefined;
2541
2536
  };
2542
2537
  export type WorktreeCreateOutput = Worktree.Info;
2543
- export type WorktreeCreateOperation<E = never> = (input?: WorktreeCreateInput) => Effect.Effect<WorktreeCreateOutput, E>;
2538
+ export type WorktreeCreateOperation<E = never> = (input: WorktreeCreateInput) => Effect.Effect<WorktreeCreateOutput, E>;
2544
2539
  export type WorktreeRemoveInput = {
2545
- readonly location?: {
2546
- readonly directory?: string | undefined;
2547
- } | undefined;
2540
+ readonly projectID: Project.ID;
2548
2541
  readonly directory: AbsolutePath;
2549
2542
  readonly force: boolean;
2550
2543
  };
2551
2544
  export type WorktreeRemoveOutput = void;
2552
2545
  export type WorktreeRemoveOperation<E = never> = (input: WorktreeRemoveInput) => Effect.Effect<WorktreeRemoveOutput, E>;
2553
2546
  export type WorktreeRefreshInput = {
2554
- readonly location?: {
2555
- readonly directory?: string | undefined;
2556
- } | undefined;
2547
+ readonly projectID: Project.ID;
2557
2548
  };
2558
2549
  export type WorktreeRefreshOutput = void;
2559
- export type WorktreeRefreshOperation<E = never> = (input?: WorktreeRefreshInput) => Effect.Effect<WorktreeRefreshOutput, E>;
2550
+ export type WorktreeRefreshOperation<E = never> = (input: WorktreeRefreshInput) => Effect.Effect<WorktreeRefreshOutput, E>;
2560
2551
  export interface WorktreeApi<E = never> {
2561
2552
  readonly list: WorktreeListOperation<E>;
2562
2553
  readonly create: WorktreeCreateOperation<E>;
@@ -2431,13 +2431,13 @@ export declare const make: (options?: {
2431
2431
  list: (input?: import("./api.js").ReferenceListInput) => Effect.Effect<import("./api.js").ReferenceListOutput, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
2432
2432
  };
2433
2433
  worktree: {
2434
- list: (input?: import("./api.js").WorktreeListInput) => Effect.Effect<readonly {
2434
+ list: (input: import("./api.js").WorktreeListInput) => Effect.Effect<readonly {
2435
2435
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
2436
2436
  readonly strategy?: string | undefined;
2437
- }[], import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("effect/Schema").SchemaError | import("@opencode/protocol/groups/worktree").WorktreeError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
2438
- create: (input?: import("./api.js").WorktreeCreateInput) => Effect.Effect<import("@opencode/schema/worktree").Info, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("effect/Schema").SchemaError | import("@opencode/protocol/groups/worktree").WorktreeError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
2439
- remove: (input: import("./api.js").WorktreeRemoveInput) => Effect.Effect<void, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("effect/Schema").SchemaError | import("@opencode/protocol/groups/worktree").WorktreeError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
2440
- refresh: (input?: import("./api.js").WorktreeRefreshInput) => Effect.Effect<void, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("effect/Schema").SchemaError | import("@opencode/protocol/groups/worktree").WorktreeError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
2437
+ }[], import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").ProjectNotFoundError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
2438
+ create: (input: import("./api.js").WorktreeCreateInput) => Effect.Effect<import("@opencode/schema/worktree").Info, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").ProjectNotFoundError | import("effect/Schema").SchemaError | import("@opencode/protocol/groups/worktree").WorktreeError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
2439
+ remove: (input: import("./api.js").WorktreeRemoveInput) => Effect.Effect<void, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").ProjectNotFoundError | import("effect/Schema").SchemaError | import("@opencode/protocol/groups/worktree").WorktreeError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
2440
+ refresh: (input: import("./api.js").WorktreeRefreshInput) => Effect.Effect<void, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").ProjectNotFoundError | import("effect/Schema").SchemaError | import("@opencode/protocol/groups/worktree").WorktreeError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
2441
2441
  };
2442
2442
  vcs: {
2443
2443
  get: (input?: import("./api.js").VcsGetInput) => Effect.Effect<import("./api.js").VcsGetOutput, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
@@ -2430,13 +2430,13 @@ export declare const make: (options?: {
2430
2430
  list: (input?: ReferenceListInput) => Effect.Effect<ReferenceListOutput, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
2431
2431
  };
2432
2432
  worktree: {
2433
- list: (input?: WorktreeListInput) => Effect.Effect<readonly {
2433
+ list: (input: WorktreeListInput) => Effect.Effect<readonly {
2434
2434
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
2435
2435
  readonly strategy?: string | undefined;
2436
- }[], import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | Schema.SchemaError | import("@opencode/protocol/groups/worktree").WorktreeError | ClientError | HttpClientError.HttpClientError, never>;
2437
- create: (input?: WorktreeCreateInput) => Effect.Effect<import("@opencode/schema/worktree").Info, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | Schema.SchemaError | import("@opencode/protocol/groups/worktree").WorktreeError | ClientError | HttpClientError.HttpClientError, never>;
2438
- remove: (input: WorktreeRemoveInput) => Effect.Effect<void, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | Schema.SchemaError | import("@opencode/protocol/groups/worktree").WorktreeError | ClientError | HttpClientError.HttpClientError, never>;
2439
- refresh: (input?: WorktreeRefreshInput) => Effect.Effect<void, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | Schema.SchemaError | import("@opencode/protocol/groups/worktree").WorktreeError | ClientError | HttpClientError.HttpClientError, never>;
2436
+ }[], import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").ProjectNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
2437
+ create: (input: WorktreeCreateInput) => Effect.Effect<import("@opencode/schema/worktree").Info, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").ProjectNotFoundError | Schema.SchemaError | import("@opencode/protocol/groups/worktree").WorktreeError | ClientError | HttpClientError.HttpClientError, never>;
2438
+ remove: (input: WorktreeRemoveInput) => Effect.Effect<void, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").ProjectNotFoundError | Schema.SchemaError | import("@opencode/protocol/groups/worktree").WorktreeError | ClientError | HttpClientError.HttpClientError, never>;
2439
+ refresh: (input: WorktreeRefreshInput) => Effect.Effect<void, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").ProjectNotFoundError | Schema.SchemaError | import("@opencode/protocol/groups/worktree").WorktreeError | ClientError | HttpClientError.HttpClientError, never>;
2440
2440
  };
2441
2441
  vcs: {
2442
2442
  get: (input?: VcsGetInput) => Effect.Effect<VcsGetOutput, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
@@ -492,22 +492,20 @@ const adaptGroupShell = (raw) => ({
492
492
  });
493
493
  const EndpointReferenceList = (raw) => (input) => preserveEffect()(raw["reference.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
494
494
  const adaptGroupReference = (raw) => ({ list: EndpointReferenceList(raw) });
495
- const EndpointWorktreeList = (raw) => (input) => preserveEffect()(raw["worktree.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
495
+ const EndpointWorktreeList = (raw) => (input) => preserveEffect()(raw["worktree.list"]({ query: { projectID: input["projectID"] } }).pipe(Effect.mapError(mapClientError)));
496
496
  const EndpointWorktreeCreate = (raw) => (input) => preserveEffect()(raw["worktree.create"]({
497
- query: { location: input?.["location"] },
498
497
  payload: {
499
- strategy: input?.["strategy"],
500
- from: input?.["from"],
501
- branch: input?.["branch"],
502
- directory: input?.["directory"],
503
- name: input?.["name"],
498
+ projectID: input["projectID"],
499
+ from: input["from"],
500
+ branch: input["branch"],
501
+ directory: input["directory"],
502
+ name: input["name"],
504
503
  },
505
504
  }).pipe(Effect.mapError(mapClientError)));
506
505
  const EndpointWorktreeRemove = (raw) => (input) => preserveEffect()(raw["worktree.remove"]({
507
- query: { location: input["location"] },
508
- payload: { directory: input["directory"], force: input["force"] },
506
+ payload: { projectID: input["projectID"], directory: input["directory"], force: input["force"] },
509
507
  }).pipe(Effect.mapError(mapClientError)));
510
- const EndpointWorktreeRefresh = (raw) => (input) => preserveEffect()(raw["worktree.refresh"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
508
+ const EndpointWorktreeRefresh = (raw) => (input) => preserveEffect()(raw["worktree.refresh"]({ payload: { projectID: input["projectID"] } }).pipe(Effect.mapError(mapClientError)));
511
509
  const adaptGroupWorktree = (raw) => ({
512
510
  list: EndpointWorktreeList(raw),
513
511
  create: EndpointWorktreeCreate(raw),
@@ -218,10 +218,10 @@ export declare function make(options: ClientOptions): {
218
218
  list: (input?: import("./index.js").ReferenceListInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").ReferenceListOutput>;
219
219
  };
220
220
  worktree: {
221
- list: (input?: import("./index.js").WorktreeListInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").WorktreeList>;
222
- create: (input?: import("./index.js").WorktreeCreateInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").WorktreeInfo>;
221
+ list: (input: import("./index.js").WorktreeListInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").WorktreeList>;
222
+ create: (input: import("./index.js").WorktreeCreateInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").WorktreeInfo>;
223
223
  remove: (input: import("./index.js").WorktreeRemoveInput, requestOptions?: OpenCode.RequestOptions) => Promise<void>;
224
- refresh: (input?: import("./index.js").WorktreeRefreshInput, requestOptions?: OpenCode.RequestOptions) => Promise<void>;
224
+ refresh: (input: import("./index.js").WorktreeRefreshInput, requestOptions?: OpenCode.RequestOptions) => Promise<void>;
225
225
  };
226
226
  vcs: {
227
227
  get: (input?: import("./index.js").VcsGetInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").VcsGetOutput>;
@@ -225,10 +225,10 @@ export declare function make(options: ClientOptions): {
225
225
  list: (input?: ReferenceListInput, requestOptions?: RequestOptions) => Promise<ReferenceListOutput>;
226
226
  };
227
227
  worktree: {
228
- list: (input?: WorktreeListInput, requestOptions?: RequestOptions) => Promise<import("./types.js").WorktreeList>;
229
- create: (input?: WorktreeCreateInput, requestOptions?: RequestOptions) => Promise<import("./types.js").WorktreeInfo>;
228
+ list: (input: WorktreeListInput, requestOptions?: RequestOptions) => Promise<import("./types.js").WorktreeList>;
229
+ create: (input: WorktreeCreateInput, requestOptions?: RequestOptions) => Promise<import("./types.js").WorktreeInfo>;
230
230
  remove: (input: WorktreeRemoveInput, requestOptions?: RequestOptions) => Promise<void>;
231
- refresh: (input?: WorktreeRefreshInput, requestOptions?: RequestOptions) => Promise<void>;
231
+ refresh: (input: WorktreeRefreshInput, requestOptions?: RequestOptions) => Promise<void>;
232
232
  };
233
233
  vcs: {
234
234
  get: (input?: VcsGetInput, requestOptions?: RequestOptions) => Promise<VcsGetOutput>;
@@ -1204,41 +1204,39 @@ export function make(options) {
1204
1204
  list: (input, requestOptions) => request({
1205
1205
  method: "GET",
1206
1206
  path: `/api/worktree`,
1207
- query: { location: input?.["location"] },
1207
+ query: { projectID: input["projectID"] },
1208
1208
  successStatus: 200,
1209
- declaredStatuses: [400, 401],
1209
+ declaredStatuses: [400, 401, 404],
1210
1210
  empty: false,
1211
1211
  }, requestOptions),
1212
1212
  create: (input, requestOptions) => request({
1213
1213
  method: "POST",
1214
1214
  path: `/api/worktree`,
1215
- query: { location: input?.["location"] },
1216
1215
  body: {
1217
- strategy: input?.["strategy"],
1218
- from: input?.["from"],
1219
- branch: input?.["branch"],
1220
- directory: input?.["directory"],
1221
- name: input?.["name"],
1216
+ projectID: input["projectID"],
1217
+ from: input["from"],
1218
+ branch: input["branch"],
1219
+ directory: input["directory"],
1220
+ name: input["name"],
1222
1221
  },
1223
1222
  successStatus: 200,
1224
- declaredStatuses: [400, 401],
1223
+ declaredStatuses: [400, 401, 404],
1225
1224
  empty: false,
1226
1225
  }, requestOptions),
1227
1226
  remove: (input, requestOptions) => request({
1228
1227
  method: "DELETE",
1229
1228
  path: `/api/worktree`,
1230
- query: { location: input["location"] },
1231
- body: { directory: input["directory"], force: input["force"] },
1229
+ body: { projectID: input["projectID"], directory: input["directory"], force: input["force"] },
1232
1230
  successStatus: 204,
1233
- declaredStatuses: [400, 401],
1231
+ declaredStatuses: [400, 401, 404],
1234
1232
  empty: true,
1235
1233
  }, requestOptions),
1236
1234
  refresh: (input, requestOptions) => request({
1237
1235
  method: "POST",
1238
1236
  path: `/api/worktree/refresh`,
1239
- query: { location: input?.["location"] },
1237
+ body: { projectID: input["projectID"] },
1240
1238
  successStatus: 204,
1241
- declaredStatuses: [400, 401],
1239
+ declaredStatuses: [400, 401, 404],
1242
1240
  empty: true,
1243
1241
  }, requestOptions),
1244
1242
  },
@@ -8141,49 +8141,42 @@ export type ReferenceListOutput = {
8141
8141
  data: Array<ReferenceInfo>;
8142
8142
  };
8143
8143
  export type WorktreeListInput = {
8144
- readonly location?: {
8145
- readonly location?: {
8146
- readonly directory?: string | undefined;
8147
- } | undefined;
8148
- }["location"];
8144
+ readonly projectID: {
8145
+ readonly projectID: string;
8146
+ }["projectID"];
8149
8147
  };
8150
8148
  export type WorktreeListOutput = WorktreeList;
8151
8149
  export type WorktreeCreateInput = {
8152
- readonly location?: {
8153
- readonly location?: {
8154
- readonly directory?: string | undefined;
8155
- } | undefined;
8156
- }["location"];
8157
- readonly strategy?: {
8158
- readonly strategy?: string;
8150
+ readonly projectID: {
8151
+ readonly projectID: string;
8159
8152
  readonly from?: string;
8160
8153
  readonly branch?: string;
8161
8154
  readonly directory?: string;
8162
8155
  readonly name?: string;
8163
- }["strategy"];
8156
+ }["projectID"];
8164
8157
  readonly from?: {
8165
- readonly strategy?: string;
8158
+ readonly projectID: string;
8166
8159
  readonly from?: string;
8167
8160
  readonly branch?: string;
8168
8161
  readonly directory?: string;
8169
8162
  readonly name?: string;
8170
8163
  }["from"];
8171
8164
  readonly branch?: {
8172
- readonly strategy?: string;
8165
+ readonly projectID: string;
8173
8166
  readonly from?: string;
8174
8167
  readonly branch?: string;
8175
8168
  readonly directory?: string;
8176
8169
  readonly name?: string;
8177
8170
  }["branch"];
8178
8171
  readonly directory?: {
8179
- readonly strategy?: string;
8172
+ readonly projectID: string;
8180
8173
  readonly from?: string;
8181
8174
  readonly branch?: string;
8182
8175
  readonly directory?: string;
8183
8176
  readonly name?: string;
8184
8177
  }["directory"];
8185
8178
  readonly name?: {
8186
- readonly strategy?: string;
8179
+ readonly projectID: string;
8187
8180
  readonly from?: string;
8188
8181
  readonly branch?: string;
8189
8182
  readonly directory?: string;
@@ -8192,27 +8185,27 @@ export type WorktreeCreateInput = {
8192
8185
  };
8193
8186
  export type WorktreeCreateOutput = WorktreeInfo;
8194
8187
  export type WorktreeRemoveInput = {
8195
- readonly location?: {
8196
- readonly location?: {
8197
- readonly directory?: string | undefined;
8198
- } | undefined;
8199
- }["location"];
8188
+ readonly projectID: {
8189
+ readonly projectID: string;
8190
+ readonly directory: string;
8191
+ readonly force: boolean;
8192
+ }["projectID"];
8200
8193
  readonly directory: {
8194
+ readonly projectID: string;
8201
8195
  readonly directory: string;
8202
8196
  readonly force: boolean;
8203
8197
  }["directory"];
8204
8198
  readonly force: {
8199
+ readonly projectID: string;
8205
8200
  readonly directory: string;
8206
8201
  readonly force: boolean;
8207
8202
  }["force"];
8208
8203
  };
8209
8204
  export type WorktreeRemoveOutput = void;
8210
8205
  export type WorktreeRefreshInput = {
8211
- readonly location?: {
8212
- readonly location?: {
8213
- readonly directory?: string | undefined;
8214
- } | undefined;
8215
- }["location"];
8206
+ readonly projectID: {
8207
+ readonly projectID: string;
8208
+ }["projectID"];
8216
8209
  };
8217
8210
  export type WorktreeRefreshOutput = void;
8218
8211
  export type VcsGetInput = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/client",
4
- "version": "0.0.0-dev-19626",
4
+ "version": "0.0.0-dev-19628",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -57,8 +57,8 @@
57
57
  "typecheck": "tsgo --noEmit"
58
58
  },
59
59
  "dependencies": {
60
- "@opencode/schema": "0.0.0-dev-19626",
61
- "@opencode/protocol": "0.0.0-dev-19626"
60
+ "@opencode/schema": "0.0.0-dev-19628",
61
+ "@opencode/protocol": "0.0.0-dev-19628"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "effect": "4.0.0-rc.112",
@@ -74,7 +74,7 @@
74
74
  },
75
75
  "devDependencies": {
76
76
  "@effect/platform-node": "4.0.0-rc.112",
77
- "@opencode/httpapi-codegen": "0.0.0-dev-19626",
77
+ "@opencode/httpapi-codegen": "0.0.0-dev-19628",
78
78
  "@tsconfig/bun": "1.0.9",
79
79
  "@types/bun": "1.4.0",
80
80
  "@typescript/native-preview": "7.0.0-dev.20251207.1",