@opencode/client 2.0.7 → 2.0.9
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/pty-handoff-1tbj6z39.js +81 -0
- package/dist/chunks/pty-handoff-4tveyqeh.js +34 -0
- package/dist/chunks/pty-handoff-65kht65h.js +62 -0
- package/dist/chunks/pty-handoff-6mptkzbc.js +0 -0
- package/dist/chunks/pty-handoff-9rqn6x4v.js +16 -0
- package/dist/chunks/pty-handoff-atpwm825.js +1638 -0
- package/dist/chunks/pty-handoff-bssvn03b.js +594 -0
- package/dist/chunks/pty-handoff-frbwqjmf.js +145 -0
- package/dist/chunks/pty-handoff-m2eywc8w.js +0 -0
- package/dist/chunks/pty-handoff-n3c99vt5.js +11 -0
- package/dist/chunks/pty-handoff-nqd0dnpk.js +112 -0
- package/dist/chunks/pty-handoff-qav6mfdz.js +0 -0
- package/dist/chunks/pty-handoff-radw39tv.js +1402 -0
- package/dist/chunks/pty-handoff-sxt88q69.js +12 -0
- package/dist/chunks/pty-handoff-t1xa31vm.js +39 -0
- package/dist/chunks/pty-handoff-txckps9j.js +57 -0
- package/dist/chunks/pty-handoff-vgxtr9hm.js +30 -0
- package/dist/chunks/pty-handoff-vmytr4q8.js +4 -0
- package/dist/chunks/pty-handoff-vyas3vgt.js +0 -0
- package/dist/chunks/pty-handoff-xgnj2w4v.js +20 -0
- package/dist/chunks/pty-handoff-y2etg5bs.js +9 -0
- package/dist/chunks/pty-handoff-ydhz1zrh.js +238 -0
- package/dist/chunks/pty-handoff-yepdgb80.js +44 -0
- package/dist/chunks/pty-handoff-zadn5mwr.js +52 -0
- package/dist/contract.js +12 -1
- package/dist/effect/client.d.ts +4 -4
- package/dist/effect/client.js +15 -29
- package/dist/effect/generated/client-error.js +6 -5
- package/dist/effect/generated/client.d.ts +4 -4
- package/dist/effect/generated/client.js +8 -582
- package/dist/effect/generated/index.js +12 -2
- package/dist/effect/index.js +75 -30
- package/dist/effect/rpc.js +11 -49
- package/dist/effect/service.js +238 -245
- package/dist/promise/client.js +14 -13
- package/dist/promise/generated/client-error.js +6 -8
- package/dist/promise/generated/client.js +7 -1396
- package/dist/promise/generated/index.js +75 -3
- package/dist/promise/generated/types.d.ts +91 -89
- package/dist/promise/generated/types.js +66 -34
- package/dist/promise/index.js +79 -2
- package/dist/promise/rpc.js +7 -86
- package/dist/promise/service.js +230 -227
- package/dist/pty-handoff.js +14 -121
- package/dist/rpc-runtime.js +14 -32
- package/dist/service-contender.js +10 -56
- package/dist/service-timing.d.ts +0 -1
- package/dist/service-timing.js +9 -18
- package/dist/service-version.js +6 -9
- package/dist/service.js +1 -0
- package/dist/shared-events.js +8 -137
- package/dist/solid/connection.js +10 -246
- package/dist/solid/data.js +18 -1769
- package/dist/solid/index.js +32 -3
- package/dist/solid/pty.js +8 -41
- package/package.json +4 -4
package/dist/effect/index.js
CHANGED
|
@@ -1,30 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
import {
|
|
2
|
+
ClientError2
|
|
3
|
+
} from "../chunks/pty-handoff-y2etg5bs.js";
|
|
4
|
+
import"../chunks/pty-handoff-vmytr4q8.js";
|
|
5
|
+
import"../chunks/pty-handoff-bssvn03b.js";
|
|
6
|
+
import"../chunks/pty-handoff-6mptkzbc.js";
|
|
7
|
+
import"../chunks/pty-handoff-frbwqjmf.js";
|
|
8
|
+
import"../chunks/pty-handoff-t1xa31vm.js";
|
|
9
|
+
import"../chunks/pty-handoff-65kht65h.js";
|
|
10
|
+
import {
|
|
11
|
+
exports_client
|
|
12
|
+
} from "../chunks/pty-handoff-zadn5mwr.js";
|
|
13
|
+
|
|
14
|
+
// src/effect/index.ts
|
|
15
|
+
import { Agent } from "@opencode/schema/agent";
|
|
16
|
+
import { Command } from "@opencode/schema/command";
|
|
17
|
+
import { Config } from "@opencode/schema/config";
|
|
18
|
+
import { Credential } from "@opencode/schema/credential";
|
|
19
|
+
import { Event } from "@opencode/schema/event";
|
|
20
|
+
import { EventLog } from "@opencode/schema/event-log";
|
|
21
|
+
import { FileSystem } from "@opencode/schema/filesystem";
|
|
22
|
+
import { Form } from "@opencode/schema/form";
|
|
23
|
+
import { Integration } from "@opencode/schema/integration";
|
|
24
|
+
import { Location } from "@opencode/schema/location";
|
|
25
|
+
import { Model } from "@opencode/schema/model";
|
|
26
|
+
import { Permission } from "@opencode/schema/permission";
|
|
27
|
+
import { PermissionSaved } from "@opencode/schema/permission-saved";
|
|
28
|
+
import { Project } from "@opencode/schema/project";
|
|
29
|
+
import { Worktree } from "@opencode/schema/worktree";
|
|
30
|
+
import { Vcs } from "@opencode/schema/vcs";
|
|
31
|
+
import { Provider } from "@opencode/schema/provider";
|
|
32
|
+
import { Pty } from "@opencode/schema/pty";
|
|
33
|
+
import { Question } from "@opencode/schema/question";
|
|
34
|
+
import { Reference } from "@opencode/schema/reference";
|
|
35
|
+
import { WebSearch } from "@opencode/schema/websearch";
|
|
36
|
+
import { AbsolutePath, RelativePath } from "@opencode/schema/schema";
|
|
37
|
+
import { Session } from "@opencode/schema/session";
|
|
38
|
+
import { SessionInbox } from "@opencode/schema/session-inbox";
|
|
39
|
+
import { SessionMessage } from "@opencode/schema/session-message";
|
|
40
|
+
import { Skill } from "@opencode/schema/skill";
|
|
41
|
+
import { Prompt } from "@opencode/schema/prompt";
|
|
42
|
+
import { PromptInput } from "@opencode/schema/prompt-input";
|
|
43
|
+
export {
|
|
44
|
+
AbsolutePath,
|
|
45
|
+
Agent,
|
|
46
|
+
ClientError2 as ClientError,
|
|
47
|
+
Command,
|
|
48
|
+
Config,
|
|
49
|
+
Credential,
|
|
50
|
+
Event,
|
|
51
|
+
EventLog,
|
|
52
|
+
FileSystem,
|
|
53
|
+
Form,
|
|
54
|
+
Integration,
|
|
55
|
+
Location,
|
|
56
|
+
Model,
|
|
57
|
+
exports_client as OpenCode,
|
|
58
|
+
Permission,
|
|
59
|
+
PermissionSaved,
|
|
60
|
+
Project,
|
|
61
|
+
Prompt,
|
|
62
|
+
PromptInput,
|
|
63
|
+
Provider,
|
|
64
|
+
Pty,
|
|
65
|
+
Question,
|
|
66
|
+
Reference,
|
|
67
|
+
RelativePath,
|
|
68
|
+
Session,
|
|
69
|
+
SessionInbox,
|
|
70
|
+
SessionMessage,
|
|
71
|
+
Skill,
|
|
72
|
+
Vcs,
|
|
73
|
+
WebSearch,
|
|
74
|
+
Worktree
|
|
75
|
+
};
|
package/dist/effect/rpc.js
CHANGED
|
@@ -1,49 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
method: name,
|
|
13
|
-
input,
|
|
14
|
-
location: options?.location,
|
|
15
|
-
}, options);
|
|
16
|
-
return yield* RpcRuntime.read(method.output, response.output);
|
|
17
|
-
}).pipe(Effect.catch((error) => RpcRuntime.readError(method, error)));
|
|
18
|
-
const signal = options?.signal;
|
|
19
|
-
if (!signal)
|
|
20
|
-
return result;
|
|
21
|
-
return Effect.suspend(() => signal.aborted
|
|
22
|
-
? Effect.interrupt
|
|
23
|
-
: Effect.raceFirst(result, Effect.andThen(aborted(signal), Effect.interrupt)));
|
|
24
|
-
},
|
|
25
|
-
]));
|
|
26
|
-
// SAFETY: Every runtime key comes from this definition, and each value is decoded through its corresponding schema.
|
|
27
|
-
// oxlint-disable-next-line typescript-eslint/no-unsafe-type-assertion
|
|
28
|
-
return Object.assign(methods, {
|
|
29
|
-
events: {
|
|
30
|
-
subscribe: (name) => {
|
|
31
|
-
const type = RpcRuntime.eventType(definition, name);
|
|
32
|
-
if (!Object.hasOwn(definition.events, name))
|
|
33
|
-
return Stream.fail(new Error(`Unknown RPC event: ${type}`));
|
|
34
|
-
const schema = definition.events[name];
|
|
35
|
-
return subscribe().pipe(Stream.filter((event) => event.type === type), Stream.mapEffect((event) => RpcRuntime.event(definition, name, schema, event)));
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export function aborted(signal) {
|
|
42
|
-
return Effect.callback((resume) => {
|
|
43
|
-
if (signal.aborted)
|
|
44
|
-
return resume(Effect.void);
|
|
45
|
-
const abort = () => resume(Effect.void);
|
|
46
|
-
signal.addEventListener("abort", abort, { once: true });
|
|
47
|
-
return Effect.sync(() => signal.removeEventListener("abort", abort));
|
|
48
|
-
});
|
|
49
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
make3,
|
|
3
|
+
aborted2,
|
|
4
|
+
exports_rpc
|
|
5
|
+
} from "../chunks/pty-handoff-65kht65h.js";
|
|
6
|
+
import"../chunks/pty-handoff-t1xa31vm.js";
|
|
7
|
+
export {
|
|
8
|
+
exports_rpc as RpcClientRuntime,
|
|
9
|
+
aborted2 as aborted,
|
|
10
|
+
make3 as make
|
|
11
|
+
};
|