@opencode/client 2.1.3 → 2.2.0
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-6mq2wh8y.js +33 -0
- package/dist/chunks/{service-probe-y2etg5bs.js → service-timing-7f0py9js.js} +2 -2
- package/dist/chunks/{service-probe-ezt8t3fk.js → service-timing-8we1dz3p.js} +6 -2
- package/dist/chunks/{service-probe-8ye1ye6f.js → service-timing-8ye1ye6f.js} +2 -2
- package/dist/chunks/{service-probe-6vp15eh6.js → service-timing-ab9bm97w.js} +1 -1
- package/dist/chunks/service-timing-b80wmp2t.js +30 -0
- package/dist/chunks/{service-probe-61wt4y9h.js → service-timing-cyxwqteg.js} +111 -75
- package/dist/chunks/{service-probe-8bbb028w.js → service-timing-gecjxyvt.js} +5 -1
- package/dist/chunks/{service-probe-xwk4fryp.js → service-timing-jpd9ebw3.js} +17 -17
- package/dist/chunks/{service-probe-nwcpakzx.js → service-timing-js54wxgp.js} +2 -2
- package/dist/chunks/{service-probe-v1n69e13.js → service-timing-knyqkv17.js} +8 -2
- package/dist/chunks/{service-probe-9j12j8xw.js → service-timing-myz4ngx9.js} +5 -5
- package/dist/chunks/{service-probe-5r97ebd4.js → service-timing-rxd7awy0.js} +59 -22
- package/dist/chunks/{service-probe-ryy6kscr.js → service-timing-ryy6kscr.js} +1 -1
- package/dist/chunks/{service-probe-g22sa7qz.js → service-timing-wcsbjfhx.js} +129 -36
- package/dist/contract.js +1 -1
- package/dist/effect/api/api.d.ts +104 -14
- package/dist/effect/api.d.ts +1 -0
- package/dist/effect/client.d.ts +901 -885
- package/dist/effect/client.js +12 -12
- package/dist/effect/generated/client-error.js +3 -3
- package/dist/effect/generated/client.d.ts +515 -503
- 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.d.ts +1 -1
- package/dist/effect/service.js +11 -11
- package/dist/mcp.d.ts +44 -0
- package/dist/mcp.js +110 -0
- package/dist/promise/api.d.ts +1 -0
- package/dist/promise/client.d.ts +16 -5
- package/dist/promise/client.js +11 -11
- package/dist/promise/generated/client-error.js +3 -3
- package/dist/promise/generated/client.d.ts +17 -6
- package/dist/promise/generated/client.js +4 -4
- package/dist/promise/generated/index.js +17 -9
- package/dist/promise/generated/types.d.ts +1165 -3509
- package/dist/promise/generated/types.js +10 -2
- package/dist/promise/index.d.ts +1 -0
- package/dist/promise/index.js +21 -13
- package/dist/promise/rpc.js +2 -2
- package/dist/promise/service.d.ts +2 -2
- package/dist/promise/service.js +12 -11
- package/dist/pty-handoff.js +4 -1
- 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.d.ts +7 -2
- package/dist/shared-events.js +1 -1
- package/dist/solid/connection.js +1 -1
- package/dist/solid/data.d.ts +11 -1
- package/dist/solid/data.js +9 -9
- package/dist/solid/index.d.ts +1 -0
- package/dist/solid/index.js +16 -12
- package/dist/solid/pty.js +1 -1
- package/dist/solid/retention.d.ts +10 -0
- package/dist/solid/retention.js +6 -0
- package/dist/solid/usage.js +1 -1
- package/package.json +15 -8
- package/dist/chunks/service-probe-9p0yrv34.js +0 -30
- /package/dist/chunks/{service-probe-6mptkzbc.js → service-timing-6mptkzbc.js} +0 -0
- /package/dist/chunks/{service-probe-8s2anffy.js → service-timing-8s2anffy.js} +0 -0
- /package/dist/chunks/{service-probe-9rqn6x4v.js → service-timing-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{service-probe-gne7h7mq.js → service-timing-gne7h7mq.js} +0 -0
- /package/dist/chunks/{service-probe-m2eywc8w.js → service-timing-m2eywc8w.js} +0 -0
- /package/dist/chunks/{service-probe-qav6mfdz.js → service-timing-qav6mfdz.js} +0 -0
- /package/dist/chunks/{service-probe-sxt88q69.js → service-timing-sxt88q69.js} +0 -0
- /package/dist/chunks/{service-probe-ve4aws36.js → service-timing-ve4aws36.js} +0 -0
- /package/dist/chunks/{service-probe-vmytr4q8.js → service-timing-vmytr4q8.js} +0 -0
- /package/dist/chunks/{service-probe-vyas3vgt.js → service-timing-vyas3vgt.js} +0 -0
- /package/dist/chunks/{service-probe-xgnj2w4v.js → service-timing-xgnj2w4v.js} +0 -0
- /package/dist/chunks/{service-probe-ydhz1zrh.js → service-timing-ydhz1zrh.js} +0 -0
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
isLocationNotFoundError2,
|
|
5
5
|
isServiceUnavailableError2,
|
|
6
6
|
isAgentNotFoundError2,
|
|
7
|
+
isPluginNotFoundError2,
|
|
7
8
|
isInvalidCursorError2,
|
|
8
9
|
isSessionNotFoundError2,
|
|
9
10
|
isConflictError2,
|
|
@@ -18,10 +19,14 @@ import {
|
|
|
18
19
|
isFormInvalidAnswerError2,
|
|
19
20
|
isFormAlreadySettledError2,
|
|
20
21
|
isProviderNotFoundError2,
|
|
22
|
+
isModelNotFoundError2,
|
|
23
|
+
isUnsupportedModelError2,
|
|
24
|
+
isProviderRequestError2,
|
|
21
25
|
isIntegrationNotFoundError2,
|
|
22
26
|
isIntegrationAttemptNotFoundError2,
|
|
23
27
|
isIntegrationMethodNotFoundError2,
|
|
24
28
|
isMcpServerNotFoundError2,
|
|
29
|
+
isForbiddenError2,
|
|
25
30
|
isProjectNotFoundError2,
|
|
26
31
|
isPermissionSavedNotFoundError2,
|
|
27
32
|
isPermissionNotFoundError2,
|
|
@@ -29,11 +34,10 @@ import {
|
|
|
29
34
|
isRpcError2,
|
|
30
35
|
isRpcInternalError2,
|
|
31
36
|
isPtyNotFoundError2,
|
|
32
|
-
isForbiddenError2,
|
|
33
37
|
isShellNotFoundError2,
|
|
34
38
|
isWorktreeError2,
|
|
35
39
|
isVcsInitNotSupportedError2
|
|
36
|
-
} from "../../chunks/service-
|
|
40
|
+
} from "../../chunks/service-timing-8we1dz3p.js";
|
|
37
41
|
export {
|
|
38
42
|
isAgentNotFoundError2 as isAgentNotFoundError,
|
|
39
43
|
isCommandExecutionError2 as isCommandExecutionError,
|
|
@@ -53,10 +57,13 @@ export {
|
|
|
53
57
|
isLocationNotFoundError2 as isLocationNotFoundError,
|
|
54
58
|
isMcpServerNotFoundError2 as isMcpServerNotFoundError,
|
|
55
59
|
isMessageNotFoundError2 as isMessageNotFoundError,
|
|
60
|
+
isModelNotFoundError2 as isModelNotFoundError,
|
|
56
61
|
isPermissionNotFoundError2 as isPermissionNotFoundError,
|
|
57
62
|
isPermissionSavedNotFoundError2 as isPermissionSavedNotFoundError,
|
|
63
|
+
isPluginNotFoundError2 as isPluginNotFoundError,
|
|
58
64
|
isProjectNotFoundError2 as isProjectNotFoundError,
|
|
59
65
|
isProviderNotFoundError2 as isProviderNotFoundError,
|
|
66
|
+
isProviderRequestError2 as isProviderRequestError,
|
|
60
67
|
isPtyNotFoundError2 as isPtyNotFoundError,
|
|
61
68
|
isRpcError2 as isRpcError,
|
|
62
69
|
isRpcInternalError2 as isRpcInternalError,
|
|
@@ -67,6 +74,7 @@ export {
|
|
|
67
74
|
isSkillNotFoundError2 as isSkillNotFoundError,
|
|
68
75
|
isUnauthorizedError2 as isUnauthorizedError,
|
|
69
76
|
isUnknownError2 as isUnknownError,
|
|
77
|
+
isUnsupportedModelError2 as isUnsupportedModelError,
|
|
70
78
|
isVcsInitNotSupportedError2 as isVcsInitNotSupportedError,
|
|
71
79
|
isWorktreeError2 as isWorktreeError
|
|
72
80
|
};
|
package/dist/promise/index.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ export * from "./generated/index.js";
|
|
|
3
3
|
export { OpenCode } from "./client.js";
|
|
4
4
|
export type { AgentApi, CommandApi, ConfigApi, EventApi, IntegrationApi, ModelApi, PluginApi, ProviderApi, ReferenceApi, RpcApi, RpcCallOptions, RpcClient, RpcEventPayload, WebSearchApi, SessionApi, SkillApi, } from "./api.js";
|
|
5
5
|
export type { EventSubscribeOutput as OpenCodeEvent } from "./generated/types.js";
|
|
6
|
+
export type { MediaFileAttachment as PromptMediaFileAttachment, Attachment as PromptAttachment, } from "@opencode/schema/prompt";
|
|
6
7
|
export type OpenCodeClient = ReturnType<typeof OpenCode.make>;
|
package/dist/promise/index.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import"../chunks/service-
|
|
1
|
+
import"../chunks/service-timing-m2eywc8w.js";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "../chunks/service-
|
|
5
|
-
import"../chunks/service-
|
|
6
|
-
import"../chunks/service-
|
|
3
|
+
exports_client
|
|
4
|
+
} from "../chunks/service-timing-b80wmp2t.js";
|
|
5
|
+
import"../chunks/service-timing-vyas3vgt.js";
|
|
6
|
+
import"../chunks/service-timing-wcsbjfhx.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
} from "../chunks/service-
|
|
10
|
-
import"../chunks/service-
|
|
8
|
+
ClientError2
|
|
9
|
+
} from "../chunks/service-timing-js54wxgp.js";
|
|
10
|
+
import"../chunks/service-timing-ab9bm97w.js";
|
|
11
11
|
import {
|
|
12
12
|
isInvalidRequestError2,
|
|
13
13
|
isUnauthorizedError2,
|
|
14
14
|
isLocationNotFoundError2,
|
|
15
15
|
isServiceUnavailableError2,
|
|
16
16
|
isAgentNotFoundError2,
|
|
17
|
+
isPluginNotFoundError2,
|
|
17
18
|
isInvalidCursorError2,
|
|
18
19
|
isSessionNotFoundError2,
|
|
19
20
|
isConflictError2,
|
|
@@ -28,10 +29,14 @@ import {
|
|
|
28
29
|
isFormInvalidAnswerError2,
|
|
29
30
|
isFormAlreadySettledError2,
|
|
30
31
|
isProviderNotFoundError2,
|
|
32
|
+
isModelNotFoundError2,
|
|
33
|
+
isUnsupportedModelError2,
|
|
34
|
+
isProviderRequestError2,
|
|
31
35
|
isIntegrationNotFoundError2,
|
|
32
36
|
isIntegrationAttemptNotFoundError2,
|
|
33
37
|
isIntegrationMethodNotFoundError2,
|
|
34
38
|
isMcpServerNotFoundError2,
|
|
39
|
+
isForbiddenError2,
|
|
35
40
|
isProjectNotFoundError2,
|
|
36
41
|
isPermissionSavedNotFoundError2,
|
|
37
42
|
isPermissionNotFoundError2,
|
|
@@ -39,15 +44,14 @@ import {
|
|
|
39
44
|
isRpcError2,
|
|
40
45
|
isRpcInternalError2,
|
|
41
46
|
isPtyNotFoundError2,
|
|
42
|
-
isForbiddenError2,
|
|
43
47
|
isShellNotFoundError2,
|
|
44
48
|
isWorktreeError2,
|
|
45
49
|
isVcsInitNotSupportedError2
|
|
46
|
-
} from "../chunks/service-
|
|
47
|
-
import"../chunks/service-
|
|
50
|
+
} from "../chunks/service-timing-8we1dz3p.js";
|
|
51
|
+
import"../chunks/service-timing-gecjxyvt.js";
|
|
48
52
|
export {
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
ClientError2 as ClientError,
|
|
54
|
+
exports_client as OpenCode,
|
|
51
55
|
isAgentNotFoundError2 as isAgentNotFoundError,
|
|
52
56
|
isCommandExecutionError2 as isCommandExecutionError,
|
|
53
57
|
isCommandNotFoundError2 as isCommandNotFoundError,
|
|
@@ -66,10 +70,13 @@ export {
|
|
|
66
70
|
isLocationNotFoundError2 as isLocationNotFoundError,
|
|
67
71
|
isMcpServerNotFoundError2 as isMcpServerNotFoundError,
|
|
68
72
|
isMessageNotFoundError2 as isMessageNotFoundError,
|
|
73
|
+
isModelNotFoundError2 as isModelNotFoundError,
|
|
69
74
|
isPermissionNotFoundError2 as isPermissionNotFoundError,
|
|
70
75
|
isPermissionSavedNotFoundError2 as isPermissionSavedNotFoundError,
|
|
76
|
+
isPluginNotFoundError2 as isPluginNotFoundError,
|
|
71
77
|
isProjectNotFoundError2 as isProjectNotFoundError,
|
|
72
78
|
isProviderNotFoundError2 as isProviderNotFoundError,
|
|
79
|
+
isProviderRequestError2 as isProviderRequestError,
|
|
73
80
|
isPtyNotFoundError2 as isPtyNotFoundError,
|
|
74
81
|
isRpcError2 as isRpcError,
|
|
75
82
|
isRpcInternalError2 as isRpcInternalError,
|
|
@@ -80,6 +87,7 @@ export {
|
|
|
80
87
|
isSkillNotFoundError2 as isSkillNotFoundError,
|
|
81
88
|
isUnauthorizedError2 as isUnauthorizedError,
|
|
82
89
|
isUnknownError2 as isUnknownError,
|
|
90
|
+
isUnsupportedModelError2 as isUnsupportedModelError,
|
|
83
91
|
isVcsInitNotSupportedError2 as isVcsInitNotSupportedError,
|
|
84
92
|
isWorktreeError2 as isWorktreeError
|
|
85
93
|
};
|
package/dist/promise/rpc.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DiscoverOptions, Endpoint, EnsureOptions, StopOptions } from "../service.js";
|
|
2
|
-
import { headers } from "../service-probe.js";
|
|
2
|
+
import { fallback, headers } from "../service-probe.js";
|
|
3
3
|
export * from "../service.js";
|
|
4
|
-
export { headers };
|
|
4
|
+
export { fallback, headers };
|
|
5
5
|
/** Discover a healthy, compatible local service without starting one. */
|
|
6
6
|
export declare function discover(options?: DiscoverOptions): Promise<{
|
|
7
7
|
url: string;
|
package/dist/promise/service.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
spawnServiceContender2,
|
|
3
3
|
contenderPool2
|
|
4
|
-
} from "../chunks/service-
|
|
4
|
+
} from "../chunks/service-timing-ve4aws36.js";
|
|
5
5
|
import {
|
|
6
6
|
defaultEnsureTiming2,
|
|
7
7
|
ensureTiming2
|
|
8
|
-
} from "../chunks/service-
|
|
8
|
+
} from "../chunks/service-timing-xgnj2w4v.js";
|
|
9
9
|
import {
|
|
10
10
|
matchesVersion2
|
|
11
|
-
} from "../chunks/service-
|
|
12
|
-
import {
|
|
13
|
-
prepare2,
|
|
14
|
-
environment2,
|
|
15
|
-
complete2,
|
|
16
|
-
clear2
|
|
17
|
-
} from "../chunks/service-probe-v1n69e13.js";
|
|
11
|
+
} from "../chunks/service-timing-sxt88q69.js";
|
|
18
12
|
import {
|
|
19
13
|
decide2,
|
|
20
14
|
fallback2,
|
|
21
15
|
same2,
|
|
22
16
|
probeResult2,
|
|
23
17
|
headers2
|
|
24
|
-
} from "../chunks/service-
|
|
25
|
-
import
|
|
18
|
+
} from "../chunks/service-timing-8ye1ye6f.js";
|
|
19
|
+
import {
|
|
20
|
+
prepare2,
|
|
21
|
+
environment2,
|
|
22
|
+
complete2,
|
|
23
|
+
clear2
|
|
24
|
+
} from "../chunks/service-timing-knyqkv17.js";
|
|
25
|
+
import"../chunks/service-timing-qav6mfdz.js";
|
|
26
26
|
|
|
27
27
|
// src/promise/service.ts
|
|
28
28
|
import { readFile, rm } from "node:fs/promises";
|
|
@@ -182,6 +182,7 @@ export {
|
|
|
182
182
|
Service,
|
|
183
183
|
discover,
|
|
184
184
|
ensure,
|
|
185
|
+
fallback2 as fallback,
|
|
185
186
|
headers2 as headers,
|
|
186
187
|
stop
|
|
187
188
|
};
|
package/dist/pty-handoff.js
CHANGED
|
@@ -4,7 +4,10 @@ import {
|
|
|
4
4
|
complete2,
|
|
5
5
|
clear2,
|
|
6
6
|
exports_pty_handoff
|
|
7
|
-
} from "./chunks/service-
|
|
7
|
+
} from "./chunks/service-timing-knyqkv17.js";
|
|
8
|
+
import"./chunks/service-timing-8ye1ye6f.js";
|
|
9
|
+
import"./chunks/service-timing-xgnj2w4v.js";
|
|
10
|
+
import"./chunks/service-timing-sxt88q69.js";
|
|
8
11
|
export {
|
|
9
12
|
exports_pty_handoff as PtyHandoff,
|
|
10
13
|
clear2 as clear,
|
package/dist/rpc-runtime.js
CHANGED
package/dist/service-probe.js
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
same2,
|
|
5
5
|
probeResult2,
|
|
6
6
|
headers2
|
|
7
|
-
} from "./chunks/service-
|
|
8
|
-
import"./chunks/service-
|
|
9
|
-
import"./chunks/service-
|
|
7
|
+
} from "./chunks/service-timing-8ye1ye6f.js";
|
|
8
|
+
import"./chunks/service-timing-xgnj2w4v.js";
|
|
9
|
+
import"./chunks/service-timing-sxt88q69.js";
|
|
10
10
|
export {
|
|
11
11
|
decide2 as decide,
|
|
12
12
|
fallback2 as fallback,
|
package/dist/service-timing.js
CHANGED
package/dist/service-version.js
CHANGED
package/dist/service.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunks/service-
|
|
1
|
+
import"./chunks/service-timing-qav6mfdz.js";
|
package/dist/shared-events.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export * as SharedEvents from "./shared-events.js";
|
|
2
|
-
|
|
2
|
+
/** The members of event union `A` whose type matches one of `Type`, including `rpc.*` events. */
|
|
3
|
+
export type SelectedEvent<A extends {
|
|
4
|
+
readonly type: string;
|
|
5
|
+
}, Type extends string> = A extends unknown ? [Extract<Type, A["type"]>] extends [never] ? never : A : never;
|
|
6
|
+
export type SubscribeOptions<Type extends string = string> = {
|
|
7
|
+
readonly types?: ReadonlyArray<Type>;
|
|
3
8
|
readonly signal?: AbortSignal;
|
|
4
9
|
/** Reports transport activity on the shared stream, including keepalive frames that carry no event. */
|
|
5
10
|
readonly onActivity?: () => void;
|
|
@@ -7,5 +12,5 @@ export type SubscribeOptions = {
|
|
|
7
12
|
export declare function make<A extends {
|
|
8
13
|
readonly type: string;
|
|
9
14
|
}>(connect: (signal: AbortSignal, onActivity: () => void) => AsyncIterable<A>): {
|
|
10
|
-
subscribe(options?: SubscribeOptions): AsyncIterable<A
|
|
15
|
+
subscribe<Type extends Exclude<A["type"], "server.connected"> = Exclude<A["type"], "server.connected">>(options?: SubscribeOptions<Type>): AsyncIterable<SelectedEvent<A, Type | "server.connected">>;
|
|
11
16
|
};
|
package/dist/shared-events.js
CHANGED
package/dist/solid/connection.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
defaultIdleTimeout2,
|
|
3
3
|
foregroundIdleThreshold2,
|
|
4
4
|
createClientConnection2
|
|
5
|
-
} from "../chunks/service-
|
|
5
|
+
} from "../chunks/service-timing-ydhz1zrh.js";
|
|
6
6
|
export {
|
|
7
7
|
createClientConnection2 as createClientConnection,
|
|
8
8
|
defaultIdleTimeout2 as defaultIdleTimeout,
|
package/dist/solid/data.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentInfo, CommandInfo, ConfigEntry, SessionFormCancelInput, FormInfo, SessionFormReplyInput, IntegrationInfo, LocationRef, 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, SessionFormCancelInput, FormInfo, SessionFormReplyInput, IntegrationInfo, LocationRef, McpResource, McpServer, ModelInfo, ModelRef, PermissionSavedInfo, PermissionRequest, PermissionReplyInput, Project, ProviderInfo, ReferenceInfo, SessionMessageInfo, SessionInfo, SessionInboxInfo, SessionInboxCompaction, ShellInfo, SkillInfo, UsageLimitsInfo, VcsInfo, OpenCodeEvent, OpenCodeClient, WebSearchProvider } from "../promise";
|
|
2
2
|
import { type SessionPromptInput } from "../promise";
|
|
3
3
|
export type DataSessionStatus = "idle" | "running";
|
|
4
4
|
/**
|
|
@@ -29,6 +29,11 @@ export type CreateDataInput = {
|
|
|
29
29
|
};
|
|
30
30
|
/** Receives failed event-driven reads. Explicit reads still reject to their caller. */
|
|
31
31
|
readonly onError?: (error: unknown) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Drops the payload of inline `data:` files in tool results before they enter the store. For clients that never
|
|
34
|
+
* render tool-result files: a session full of screenshots otherwise keeps hundreds of MB of base64 alive.
|
|
35
|
+
*/
|
|
36
|
+
readonly omitToolFileData?: boolean;
|
|
32
37
|
};
|
|
33
38
|
export declare const settleMs = 150;
|
|
34
39
|
export type FormWithLocation = FormInfo & {
|
|
@@ -149,6 +154,11 @@ export declare function createData(config: CreateDataInput): {
|
|
|
149
154
|
sync: (ref?: LocationRef) => Promise<void>;
|
|
150
155
|
invalidate: (ref?: LocationRef) => void;
|
|
151
156
|
};
|
|
157
|
+
usage: {
|
|
158
|
+
limits: (ref?: LocationRef) => UsageLimitsInfo | null | undefined;
|
|
159
|
+
sync: (ref?: LocationRef) => Promise<void>;
|
|
160
|
+
invalidate: (ref?: LocationRef) => void;
|
|
161
|
+
};
|
|
152
162
|
agent: {
|
|
153
163
|
list: (ref?: LocationRef) => AgentInfo[] | undefined;
|
|
154
164
|
sync: (ref?: LocationRef) => Promise<void>;
|
package/dist/solid/data.js
CHANGED
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
settleMs2,
|
|
3
3
|
locationKey2,
|
|
4
4
|
createData2
|
|
5
|
-
} from "../chunks/service-
|
|
6
|
-
import"../chunks/service-
|
|
7
|
-
import"../chunks/service-
|
|
8
|
-
import"../chunks/service-
|
|
9
|
-
import"../chunks/service-
|
|
10
|
-
import"../chunks/service-
|
|
11
|
-
import"../chunks/service-
|
|
12
|
-
import"../chunks/service-
|
|
13
|
-
import"../chunks/service-
|
|
5
|
+
} from "../chunks/service-timing-cyxwqteg.js";
|
|
6
|
+
import"../chunks/service-timing-m2eywc8w.js";
|
|
7
|
+
import"../chunks/service-timing-b80wmp2t.js";
|
|
8
|
+
import"../chunks/service-timing-vyas3vgt.js";
|
|
9
|
+
import"../chunks/service-timing-wcsbjfhx.js";
|
|
10
|
+
import"../chunks/service-timing-js54wxgp.js";
|
|
11
|
+
import"../chunks/service-timing-ab9bm97w.js";
|
|
12
|
+
import"../chunks/service-timing-8we1dz3p.js";
|
|
13
|
+
import"../chunks/service-timing-gecjxyvt.js";
|
|
14
14
|
export {
|
|
15
15
|
createData2 as createData,
|
|
16
16
|
locationKey2 as locationKey,
|
package/dist/solid/index.d.ts
CHANGED
package/dist/solid/index.js
CHANGED
|
@@ -1,33 +1,37 @@
|
|
|
1
|
-
import"../chunks/service-
|
|
2
|
-
import"../chunks/service-
|
|
3
|
-
import"../chunks/service-
|
|
4
|
-
import"../chunks/service-
|
|
5
|
-
import"../chunks/service-
|
|
6
|
-
import"../chunks/service-
|
|
7
|
-
import"../chunks/service-
|
|
8
|
-
import"../chunks/service-
|
|
1
|
+
import"../chunks/service-timing-js54wxgp.js";
|
|
2
|
+
import"../chunks/service-timing-wcsbjfhx.js";
|
|
3
|
+
import"../chunks/service-timing-8we1dz3p.js";
|
|
4
|
+
import"../chunks/service-timing-vyas3vgt.js";
|
|
5
|
+
import"../chunks/service-timing-gecjxyvt.js";
|
|
6
|
+
import"../chunks/service-timing-ab9bm97w.js";
|
|
7
|
+
import"../chunks/service-timing-b80wmp2t.js";
|
|
8
|
+
import"../chunks/service-timing-m2eywc8w.js";
|
|
9
9
|
import {
|
|
10
10
|
settleMs2,
|
|
11
11
|
locationKey2,
|
|
12
12
|
createData2
|
|
13
|
-
} from "../chunks/service-
|
|
13
|
+
} from "../chunks/service-timing-cyxwqteg.js";
|
|
14
14
|
import {
|
|
15
15
|
defaultIdleTimeout2,
|
|
16
16
|
foregroundIdleThreshold2,
|
|
17
17
|
createClientConnection2
|
|
18
|
-
} from "../chunks/service-
|
|
18
|
+
} from "../chunks/service-timing-ydhz1zrh.js";
|
|
19
19
|
import {
|
|
20
20
|
createPtyClient2,
|
|
21
21
|
createPersistentPtyClient2
|
|
22
|
-
} from "../chunks/service-
|
|
22
|
+
} from "../chunks/service-timing-gne7h7mq.js";
|
|
23
|
+
import {
|
|
24
|
+
createSessionRetention2
|
|
25
|
+
} from "../chunks/service-timing-6mq2wh8y.js";
|
|
23
26
|
import {
|
|
24
27
|
lastAssistantWithUsage2
|
|
25
|
-
} from "../chunks/service-
|
|
28
|
+
} from "../chunks/service-timing-8s2anffy.js";
|
|
26
29
|
export {
|
|
27
30
|
createClientConnection2 as createClientConnection,
|
|
28
31
|
createData2 as createData,
|
|
29
32
|
createPersistentPtyClient2 as createPersistentPtyClient,
|
|
30
33
|
createPtyClient2 as createPtyClient,
|
|
34
|
+
createSessionRetention2 as createSessionRetention,
|
|
31
35
|
defaultIdleTimeout2 as defaultIdleTimeout,
|
|
32
36
|
foregroundIdleThreshold2 as foregroundIdleThreshold,
|
|
33
37
|
lastAssistantWithUsage2 as lastAssistantWithUsage,
|
package/dist/solid/pty.js
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Accessor } from "solid-js";
|
|
2
|
+
import type { Data } from "./data";
|
|
3
|
+
export declare function createSessionRetention(input: {
|
|
4
|
+
session: Pick<Data["session"], "list" | "root" | "evict"> & {
|
|
5
|
+
message?: Pick<Data["session"]["message"], "list">;
|
|
6
|
+
};
|
|
7
|
+
current: Accessor<string | undefined>;
|
|
8
|
+
keep: Accessor<readonly string[]>;
|
|
9
|
+
limit: number;
|
|
10
|
+
}): void;
|
package/dist/solid/usage.js
CHANGED
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": "2.
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -47,18 +47,24 @@
|
|
|
47
47
|
"./effect/service": {
|
|
48
48
|
"import": "./dist/effect/service.js",
|
|
49
49
|
"types": "./dist/effect/service.d.ts"
|
|
50
|
+
},
|
|
51
|
+
"./mcp": {
|
|
52
|
+
"import": "./dist/mcp.js",
|
|
53
|
+
"types": "./dist/mcp.d.ts"
|
|
50
54
|
}
|
|
51
55
|
},
|
|
52
56
|
"scripts": {
|
|
53
|
-
"build": "bun run script/build
|
|
54
|
-
"
|
|
57
|
+
"build": "bun run script/build.ts",
|
|
58
|
+
"pack": "bun run script/pack.ts",
|
|
59
|
+
"generate": "bun run script/generate.ts",
|
|
55
60
|
"check:generated": "bun run generate && git diff --exit-code -- src/promise/generated src/effect/generated src/effect/api",
|
|
56
61
|
"test": "bun test --timeout 5000",
|
|
57
|
-
"typecheck": "
|
|
62
|
+
"typecheck": "bun check --no-script",
|
|
63
|
+
"typecheck:tsc": "tsc --noEmit"
|
|
58
64
|
},
|
|
59
65
|
"dependencies": {
|
|
60
|
-
"@opencode/schema": "2.
|
|
61
|
-
"@opencode/protocol": "2.
|
|
66
|
+
"@opencode/schema": "2.2.0",
|
|
67
|
+
"@opencode/protocol": "2.2.0"
|
|
62
68
|
},
|
|
63
69
|
"peerDependencies": {
|
|
64
70
|
"effect": "4.0.1",
|
|
@@ -74,10 +80,11 @@
|
|
|
74
80
|
},
|
|
75
81
|
"devDependencies": {
|
|
76
82
|
"@effect/platform-node": "4.0.1",
|
|
77
|
-
"@
|
|
83
|
+
"@modelcontextprotocol/client": "2.3.1",
|
|
84
|
+
"@opencode/httpapi-codegen": "2.2.0",
|
|
78
85
|
"@tsconfig/bun": "1.0.9",
|
|
79
86
|
"@types/bun": "1.4.3",
|
|
80
|
-
"@typescript/native": "npm:typescript@7.0
|
|
87
|
+
"@typescript/native": "npm:typescript@7.1.0-beta",
|
|
81
88
|
"effect": "4.0.1",
|
|
82
89
|
"solid-js": "1.9.15"
|
|
83
90
|
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
make7
|
|
3
|
-
} from "./service-probe-8bbb028w.js";
|
|
4
|
-
import {
|
|
5
|
-
make6
|
|
6
|
-
} from "./service-probe-g22sa7qz.js";
|
|
7
|
-
import {
|
|
8
|
-
makeRpc2
|
|
9
|
-
} from "./service-probe-6vp15eh6.js";
|
|
10
|
-
import {
|
|
11
|
-
__export
|
|
12
|
-
} from "./service-probe-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({ 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 };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|