@opencode/client 0.0.0-dev-19555 → 0.0.0-dev-19559

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.
@@ -7,7 +7,6 @@ export declare const event: <D extends Rpc.Definition, Name extends keyof D["eve
7
7
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
8
8
  readonly location: {
9
9
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
10
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
11
10
  };
12
11
  readonly data: {
13
12
  readonly [x: string]: unknown;
@@ -1,4 +1,4 @@
1
- import type { AgentInfo, CommandInfo, ConfigEntry, FormCancelInput, FormInfo, FormReplyInput, IntegrationInfo, LocationRef, LocationGetOutput, McpResource, McpServer, ModelInfo, ModelRef, PermissionSavedInfo, PermissionRequest, PermissionReplyInput, Project, ProviderInfo, ReferenceInfo, SessionMessageInfo, SessionInfo, SessionInboxInfo, SessionInboxCompaction, ShellInfo, SkillInfo, VcsInfo, OpenCodeEvent, OpenCodeClient, WebSearchProvider } from "../promise";
1
+ import type { AgentInfo, CommandInfo, ConfigEntry, FormCancelInput, FormInfo, FormReplyInput, IntegrationInfo, LocationRef, McpResource, McpServer, ModelInfo, ModelRef, PermissionSavedInfo, PermissionRequest, PermissionReplyInput, Project, ProviderInfo, ReferenceInfo, SessionMessageInfo, SessionInfo, SessionInboxInfo, SessionInboxCompaction, ShellInfo, SkillInfo, VcsInfo, OpenCodeEvent, OpenCodeClient, WebSearchProvider } from "../promise";
2
2
  import { type SessionPromptInput } from "../promise";
3
3
  export type DataSessionStatus = "idle" | "running";
4
4
  type OpenCodeEventMap = {
@@ -129,7 +129,7 @@ export declare function createData(config: CreateDataInput): {
129
129
  invalidate: (ref?: LocationRef) => void;
130
130
  };
131
131
  location: {
132
- info(ref?: LocationRef): LocationGetOutput | undefined;
132
+ info(ref?: LocationRef): import("../promise").LocationPublicInfo | undefined;
133
133
  default(): LocationRef;
134
134
  syncInfo(ref?: LocationRef): Promise<void>;
135
135
  sync(ref?: LocationRef): Promise<void>;
@@ -16,7 +16,7 @@ export function locationKey(location) {
16
16
  return JSON.stringify([location.directory, location.workspaceID]);
17
17
  }
18
18
  function locationQuery(ref) {
19
- return { directory: ref.directory, workspace: ref.workspaceID };
19
+ return { directory: ref.directory };
20
20
  }
21
21
  function formRequestOptions(sessionID, ref) {
22
22
  if (sessionID !== "global" || !ref)
@@ -24,7 +24,6 @@ function formRequestOptions(sessionID, ref) {
24
24
  return {
25
25
  headers: {
26
26
  "x-opencode-directory": encodeURIComponent(ref.directory),
27
- ...(ref.workspaceID ? { "x-opencode-workspace": ref.workspaceID } : {}),
28
27
  },
29
28
  };
30
29
  }
@@ -583,8 +582,6 @@ export function createData(config) {
583
582
  const explicit = event.data.adopted?.includes(info.projectID);
584
583
  const directory = explicit ? store.project.info[info.projectID]?.canonical : info.location.directory;
585
584
  if (!directory) {
586
- if (info.location.workspaceID)
587
- continue;
588
585
  result.session.invalidate(sessionID);
589
586
  refresh(() => result.session.sync(sessionID));
590
587
  continue;
@@ -592,7 +589,6 @@ export function createData(config) {
592
589
  const adopted = Worktree.adopt({
593
590
  projectID: info.projectID,
594
591
  directory,
595
- workspaceID: info.location.workspaceID,
596
592
  }, event.data);
597
593
  if (!adopted)
598
594
  continue;
@@ -1170,7 +1166,7 @@ export function createData(config) {
1170
1166
  const vcs = locationResource("vcs", (location) => api().vcs.get({ location }));
1171
1167
  const shells = locationResource("shell", async (location) => {
1172
1168
  const response = await api().shell.list({ location });
1173
- const ref = { directory: response.location.directory, workspaceID: response.location.workspaceID };
1169
+ const ref = { directory: response.location.directory };
1174
1170
  return {
1175
1171
  location: response.location,
1176
1172
  data: Object.fromEntries(response.data.map((info) => [info.id, { ...info, location: ref }])),
@@ -1573,7 +1569,6 @@ export function createData(config) {
1573
1569
  });
1574
1570
  const location = {
1575
1571
  directory: response.location.directory,
1576
- workspaceID: response.location.workspaceID,
1577
1572
  };
1578
1573
  const locationID = locationKey(location);
1579
1574
  setStore("session", "form", sessionID, [
@@ -1659,7 +1654,7 @@ export function createData(config) {
1659
1654
  setStore("location", key, {});
1660
1655
  setStore("location", key, "info", location);
1661
1656
  if (!ref) {
1662
- setDefaultLocation({ directory: location.directory, workspaceID: location.workspaceID });
1657
+ setDefaultLocation({ directory: location.directory });
1663
1658
  }
1664
1659
  });
1665
1660
  },
@@ -1702,7 +1697,7 @@ export function createData(config) {
1702
1697
  agent: locationResource("agent", (location) => api().agent.list({ location })),
1703
1698
  command: locationResource("command", (location) => api().command.list({ location })),
1704
1699
  config: locationResource("config", async (location) => ({
1705
- location: { directory: location.directory, workspaceID: location.workspace },
1700
+ location: { directory: location.directory },
1706
1701
  data: await api().config.get({ location }),
1707
1702
  })),
1708
1703
  integration: locationResource("integration", (location) => api().integration.list({ location })),
package/dist/solid/pty.js CHANGED
@@ -9,8 +9,6 @@ export function createPtyClient(api, options) {
9
9
  const url = new URL(`/api/pty/${encodeURIComponent(input.ptyID)}/connect`, options.url);
10
10
  if (input.location?.directory)
11
11
  url.searchParams.set("location[directory]", input.location.directory);
12
- if (input.location?.workspace)
13
- url.searchParams.set("location[workspace]", input.location.workspace);
14
12
  if (input.cursor !== undefined)
15
13
  url.searchParams.set("cursor", String(input.cursor));
16
14
  url.searchParams.set("ticket", result.data.ticket);
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-19555",
4
+ "version": "0.0.0-dev-19559",
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-19555",
61
- "@opencode/protocol": "0.0.0-dev-19555"
60
+ "@opencode/schema": "0.0.0-dev-19559",
61
+ "@opencode/protocol": "0.0.0-dev-19559"
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-19555",
77
+ "@opencode/httpapi-codegen": "0.0.0-dev-19559",
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",