@opencode/client 2.2.0 → 2.2.2
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/chunks/{service-timing-wcsbjfhx.js → pty-handoff-0e3ghr9a.js} +500 -374
- package/dist/chunks/{service-timing-myz4ngx9.js → pty-handoff-15p82y03.js} +5 -5
- package/dist/chunks/{service-timing-jpd9ebw3.js → pty-handoff-5d2vkjb7.js} +17 -17
- package/dist/chunks/pty-handoff-60xe5cbf.js +4 -0
- package/dist/chunks/{service-timing-8ye1ye6f.js → pty-handoff-8ye1ye6f.js} +2 -2
- package/dist/chunks/{service-timing-rxd7awy0.js → pty-handoff-bb4rz2ry.js} +231 -126
- package/dist/chunks/{service-timing-8we1dz3p.js → pty-handoff-cvg5j6d1.js} +6 -5
- package/dist/chunks/{service-timing-cyxwqteg.js → pty-handoff-f6hq5twr.js} +10 -2
- package/dist/chunks/{service-timing-gecjxyvt.js → pty-handoff-gecjxyvt.js} +1 -1
- package/dist/chunks/{service-timing-ab9bm97w.js → pty-handoff-kdshn947.js} +1 -1
- package/dist/chunks/{service-timing-js54wxgp.js → pty-handoff-nwcpakzx.js} +2 -2
- package/dist/chunks/{service-timing-knyqkv17.js → pty-handoff-pgwvv4px.js} +2 -2
- package/dist/chunks/{service-timing-ryy6kscr.js → pty-handoff-ryy6kscr.js} +1 -1
- package/dist/chunks/pty-handoff-wcnmkks2.js +30 -0
- package/dist/chunks/{service-timing-7f0py9js.js → pty-handoff-y2etg5bs.js} +2 -2
- package/dist/contract.d.ts +1 -1
- package/dist/contract.js +3 -1
- package/dist/effect/api/api.d.ts +634 -342
- package/dist/effect/client.d.ts +390 -121
- package/dist/effect/client.js +12 -12
- package/dist/effect/generated/client-error.js +3 -3
- package/dist/effect/generated/client.d.ts +425 -122
- package/dist/effect/generated/client.js +5 -5
- package/dist/effect/generated/index.js +8 -8
- package/dist/effect/index.js +12 -12
- package/dist/effect/rpc.js +4 -4
- package/dist/effect/service.js +6 -6
- package/dist/promise/api.d.ts +3 -0
- package/dist/promise/client.d.ts +206 -137
- package/dist/promise/client.js +11 -11
- package/dist/promise/generated/client-error.js +3 -3
- package/dist/promise/generated/client.d.ts +242 -138
- package/dist/promise/generated/client.js +4 -4
- package/dist/promise/generated/index.js +14 -12
- package/dist/promise/generated/types.d.ts +745 -466
- package/dist/promise/generated/types.js +7 -5
- package/dist/promise/index.js +18 -16
- package/dist/promise/rpc.js +2 -2
- package/dist/promise/service.js +6 -6
- package/dist/pty-handoff.js +4 -4
- package/dist/rpc-runtime.js +1 -1
- package/dist/service-contender.js +1 -1
- package/dist/service-probe.js +3 -3
- package/dist/service-timing.js +1 -1
- package/dist/service-version.js +1 -1
- package/dist/service.js +1 -1
- package/dist/shared-events.js +1 -1
- package/dist/solid/connection.js +1 -1
- package/dist/solid/data.js +9 -9
- package/dist/solid/index.js +13 -13
- package/dist/solid/pty.js +1 -1
- package/dist/solid/retention.js +1 -1
- package/dist/solid/usage.js +1 -1
- package/package.json +8 -8
- package/dist/chunks/service-timing-b80wmp2t.js +0 -30
- package/dist/chunks/service-timing-vmytr4q8.js +0 -4
- /package/dist/chunks/{service-timing-6mptkzbc.js → pty-handoff-6mptkzbc.js} +0 -0
- /package/dist/chunks/{service-timing-6mq2wh8y.js → pty-handoff-6mq2wh8y.js} +0 -0
- /package/dist/chunks/{service-timing-8s2anffy.js → pty-handoff-8s2anffy.js} +0 -0
- /package/dist/chunks/{service-timing-9rqn6x4v.js → pty-handoff-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{service-timing-gne7h7mq.js → pty-handoff-gne7h7mq.js} +0 -0
- /package/dist/chunks/{service-timing-m2eywc8w.js → pty-handoff-m2eywc8w.js} +0 -0
- /package/dist/chunks/{service-timing-qav6mfdz.js → pty-handoff-qav6mfdz.js} +0 -0
- /package/dist/chunks/{service-timing-sxt88q69.js → pty-handoff-sxt88q69.js} +0 -0
- /package/dist/chunks/{service-timing-ve4aws36.js → pty-handoff-ve4aws36.js} +0 -0
- /package/dist/chunks/{service-timing-vyas3vgt.js → pty-handoff-vyas3vgt.js} +0 -0
- /package/dist/chunks/{service-timing-xgnj2w4v.js → pty-handoff-xgnj2w4v.js} +0 -0
- /package/dist/chunks/{service-timing-ydhz1zrh.js → pty-handoff-ydhz1zrh.js} +0 -0
|
@@ -7,17 +7,17 @@ var isAgentNotFoundError2 = (value) => typeof value === "object" && value !== nu
|
|
|
7
7
|
var isPluginNotFoundError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "PluginNotFoundError";
|
|
8
8
|
var isInvalidCursorError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "InvalidCursorError";
|
|
9
9
|
var isSessionNotFoundError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "SessionNotFoundError";
|
|
10
|
-
var isConflictError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "ConflictError";
|
|
11
|
-
var isUnknownError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "UnknownError";
|
|
12
10
|
var isMessageNotFoundError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "MessageNotFoundError";
|
|
11
|
+
var isConflictError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "ConflictError";
|
|
13
12
|
var isCommandNotFoundError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "CommandNotFoundError";
|
|
14
13
|
var isCommandExecutionError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "CommandExecutionError";
|
|
15
|
-
var isSkillNotFoundError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "SkillNotFoundError";
|
|
16
14
|
var isSessionBusyError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "SessionBusyError";
|
|
17
|
-
var
|
|
15
|
+
var isUnknownError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "UnknownError";
|
|
18
16
|
var isFormNotFoundError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "FormNotFoundError";
|
|
19
17
|
var isFormInvalidAnswerError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "FormInvalidAnswerError";
|
|
20
18
|
var isFormAlreadySettledError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "FormAlreadySettledError";
|
|
19
|
+
var isSkillNotFoundError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "SkillNotFoundError";
|
|
20
|
+
var isInstructionEntryValueTooLargeError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "InstructionEntryValueTooLargeError";
|
|
21
21
|
var isProviderNotFoundError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "ProviderNotFoundError";
|
|
22
22
|
var isModelNotFoundError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "ModelNotFoundError";
|
|
23
23
|
var isUnsupportedModelError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "UnsupportedModelError";
|
|
@@ -34,8 +34,9 @@ var isFileNotFoundError2 = (value) => typeof value === "object" && value !== nul
|
|
|
34
34
|
var isRpcError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "RpcError";
|
|
35
35
|
var isRpcInternalError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "RpcInternalError";
|
|
36
36
|
var isPtyNotFoundError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "PtyNotFoundError";
|
|
37
|
+
var isScheduleNotFoundError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "ScheduleNotFoundError";
|
|
37
38
|
var isShellNotFoundError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "ShellNotFoundError";
|
|
38
39
|
var isWorktreeError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "WorktreeError";
|
|
39
40
|
var isVcsInitNotSupportedError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "VcsInitNotSupportedError";
|
|
40
41
|
|
|
41
|
-
export { isInvalidRequestError2, isUnauthorizedError2, isLocationNotFoundError2, isServiceUnavailableError2, isAgentNotFoundError2, isPluginNotFoundError2, isInvalidCursorError2, isSessionNotFoundError2,
|
|
42
|
+
export { isInvalidRequestError2, isUnauthorizedError2, isLocationNotFoundError2, isServiceUnavailableError2, isAgentNotFoundError2, isPluginNotFoundError2, isInvalidCursorError2, isSessionNotFoundError2, isMessageNotFoundError2, isConflictError2, isCommandNotFoundError2, isCommandExecutionError2, isSessionBusyError2, isUnknownError2, isFormNotFoundError2, isFormInvalidAnswerError2, isFormAlreadySettledError2, isSkillNotFoundError2, isInstructionEntryValueTooLargeError2, isProviderNotFoundError2, isModelNotFoundError2, isUnsupportedModelError2, isProviderRequestError2, isIntegrationNotFoundError2, isIntegrationAttemptNotFoundError2, isIntegrationMethodNotFoundError2, isMcpServerNotFoundError2, isForbiddenError2, isProjectNotFoundError2, isPermissionSavedNotFoundError2, isPermissionNotFoundError2, isFileNotFoundError2, isRpcError2, isRpcInternalError2, isPtyNotFoundError2, isScheduleNotFoundError2, isShellNotFoundError2, isWorktreeError2, isVcsInitNotSupportedError2 };
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
isFormNotFoundError2,
|
|
3
3
|
isFormAlreadySettledError2,
|
|
4
4
|
isPermissionNotFoundError2
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./pty-handoff-cvg5j6d1.js";
|
|
6
6
|
|
|
7
7
|
// src/solid/data.ts
|
|
8
8
|
import { Worktree } from "@opencode/schema/worktree";
|
|
@@ -555,6 +555,10 @@ function createData2(config) {
|
|
|
555
555
|
if (store.session.info[event.data.sessionID])
|
|
556
556
|
setStore("session", "info", event.data.sessionID, "permissions", event.data.permissions);
|
|
557
557
|
return;
|
|
558
|
+
case "session.metadata.updated":
|
|
559
|
+
if (store.session.info[event.data.sessionID])
|
|
560
|
+
setStore("session", "info", event.data.sessionID, "metadata", reconcile(event.data.metadata));
|
|
561
|
+
return;
|
|
558
562
|
case "session.archived":
|
|
559
563
|
if (store.session.info[event.data.sessionID])
|
|
560
564
|
setStore("session", "info", event.data.sessionID, "time", "archived", event.created);
|
|
@@ -883,6 +887,10 @@ function createData2(config) {
|
|
|
883
887
|
return;
|
|
884
888
|
case "session.execution.started":
|
|
885
889
|
setSessionActive(event.data.sessionID, "running");
|
|
890
|
+
if (!store.session.info[event.data.sessionID] && !sync.has(`session:${event.data.sessionID}`))
|
|
891
|
+
return;
|
|
892
|
+
result.session.invalidate(event.data.sessionID);
|
|
893
|
+
refresh(() => result.session.sync(event.data.sessionID));
|
|
886
894
|
return;
|
|
887
895
|
case "session.compaction.started":
|
|
888
896
|
if (event.data.inputID)
|
|
@@ -1183,7 +1191,7 @@ function createData2(config) {
|
|
|
1183
1191
|
};
|
|
1184
1192
|
}
|
|
1185
1193
|
const vcs = locationResource("vcs", (location) => api().vcs.get({ location }));
|
|
1186
|
-
const usageLimits = locationResource("usageLimits", (location) => api().usage.limits({ location }));
|
|
1194
|
+
const usageLimits = locationResource("usageLimits", (location) => api().experimental.usage.limits({ location }));
|
|
1187
1195
|
const shells = locationResource("shell", async (location) => {
|
|
1188
1196
|
const response = await api().shell.list({ location });
|
|
1189
1197
|
const ref = { directory: response.location.directory };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/promise/generated/client-error.ts
|
|
2
|
-
class
|
|
2
|
+
class ClientError3 extends Error {
|
|
3
3
|
reason;
|
|
4
4
|
name = "ClientError";
|
|
5
5
|
constructor(reason, options) {
|
|
@@ -9,4 +9,4 @@ class ClientError2 extends Error {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export {
|
|
12
|
+
export { ClientError3 };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
make7
|
|
3
|
+
} from "./pty-handoff-gecjxyvt.js";
|
|
4
|
+
import {
|
|
5
|
+
make6
|
|
6
|
+
} from "./pty-handoff-0e3ghr9a.js";
|
|
7
|
+
import {
|
|
8
|
+
makeRpc2
|
|
9
|
+
} from "./pty-handoff-kdshn947.js";
|
|
10
|
+
import {
|
|
11
|
+
__export
|
|
12
|
+
} from "./pty-handoff-9rqn6x4v.js";
|
|
13
|
+
|
|
14
|
+
// src/promise/client.ts
|
|
15
|
+
var exports_client3 = {};
|
|
16
|
+
__export(exports_client3, {
|
|
17
|
+
OpenCode: () => exports_client3,
|
|
18
|
+
make: () => make5
|
|
19
|
+
});
|
|
20
|
+
function make5(options) {
|
|
21
|
+
const raw = make6(options);
|
|
22
|
+
const events = make7((signal, onActivity) => raw.event.subscribe(undefined, { signal, onActivity }));
|
|
23
|
+
return {
|
|
24
|
+
...raw,
|
|
25
|
+
rpc: Object.assign(makeRpc2(raw, events), raw.rpc),
|
|
26
|
+
event: events
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { make5, exports_client3 };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// src/effect/generated/client-error.ts
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
|
|
4
|
-
class
|
|
4
|
+
class ClientError2 extends Schema.TaggedError()("ClientError", {
|
|
5
5
|
cause: Schema.Defect()
|
|
6
6
|
}) {
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export {
|
|
9
|
+
export { ClientError2 };
|
package/dist/contract.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ClientApi, effectOmitEndpoints, groupNames, promiseOmitEndpoints } from "@opencode/protocol/client";
|
|
1
|
+
export { ClientApi, clientNamespace, effectOmitEndpoints, groupNames, promiseOmitEndpoints } from "@opencode/protocol/client";
|
package/dist/contract.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClientApi2,
|
|
3
|
+
clientNamespace2,
|
|
3
4
|
effectOmitEndpoints2,
|
|
4
5
|
groupNames2,
|
|
5
6
|
promiseOmitEndpoints2
|
|
6
|
-
} from "./chunks/
|
|
7
|
+
} from "./chunks/pty-handoff-60xe5cbf.js";
|
|
7
8
|
export {
|
|
8
9
|
ClientApi2 as ClientApi,
|
|
10
|
+
clientNamespace2 as clientNamespace,
|
|
9
11
|
effectOmitEndpoints2 as effectOmitEndpoints,
|
|
10
12
|
groupNames2 as groupNames,
|
|
11
13
|
promiseOmitEndpoints2 as promiseOmitEndpoints
|