@opencode/client 0.0.0-dev-189 → 0.0.0-dev-197
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/contract-011a6bew.js +30 -0
- package/dist/chunks/{rpc-runtime-8we1dz3p.js → contract-0f3b9fnq.js} +5 -5
- package/dist/chunks/{rpc-runtime-myz4ngx9.js → contract-15p82y03.js} +5 -5
- package/dist/chunks/{rpc-runtime-wcsbjfhx.js → contract-5pmd028a.js} +446 -374
- package/dist/chunks/contract-60xe5cbf.js +4 -0
- package/dist/chunks/{rpc-runtime-2ny4vxct.js → contract-8ye1ye6f.js} +2 -2
- package/dist/chunks/{rpc-runtime-cyxwqteg.js → contract-c6dcxf2a.js} +2 -2
- package/dist/chunks/{rpc-runtime-gecjxyvt.js → contract-gecjxyvt.js} +1 -1
- package/dist/chunks/{rpc-runtime-rxd7awy0.js → contract-gmz4zyp1.js} +207 -126
- package/dist/chunks/{rpc-runtime-js54wxgp.js → contract-nwcpakzx.js} +2 -2
- package/dist/chunks/{rpc-runtime-fy1dajra.js → contract-q2db819a.js} +2 -2
- package/dist/chunks/{rpc-runtime-ryy6kscr.js → contract-ryy6kscr.js} +1 -1
- package/dist/chunks/{rpc-runtime-7f0py9js.js → contract-y2etg5bs.js} +2 -2
- package/dist/chunks/{rpc-runtime-2e5dcm8w.js → contract-ym14fdsd.js} +17 -17
- package/dist/chunks/{rpc-runtime-ab9bm97w.js → contract-z11mztjj.js} +1 -1
- package/dist/contract.d.ts +1 -1
- package/dist/contract.js +3 -1
- package/dist/effect/api/api.d.ts +589 -342
- package/dist/effect/client.d.ts +174 -121
- package/dist/effect/client.js +12 -12
- package/dist/effect/generated/client-error.js +3 -3
- package/dist/effect/generated/client.d.ts +209 -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 +198 -137
- package/dist/promise/client.js +11 -11
- package/dist/promise/generated/client-error.js +3 -3
- package/dist/promise/generated/client.d.ts +234 -138
- package/dist/promise/generated/client.js +4 -4
- package/dist/promise/generated/index.js +13 -13
- package/dist/promise/generated/types.d.ts +463 -363
- package/dist/promise/generated/types.js +5 -5
- package/dist/promise/index.js +17 -17
- 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 +4 -4
- package/dist/chunks/rpc-runtime-b80wmp2t.js +0 -30
- package/dist/chunks/rpc-runtime-vmytr4q8.js +0 -4
- /package/dist/chunks/{rpc-runtime-6mptkzbc.js → contract-6mptkzbc.js} +0 -0
- /package/dist/chunks/{rpc-runtime-6mq2wh8y.js → contract-6mq2wh8y.js} +0 -0
- /package/dist/chunks/{rpc-runtime-8s2anffy.js → contract-8s2anffy.js} +0 -0
- /package/dist/chunks/{rpc-runtime-9rqn6x4v.js → contract-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{rpc-runtime-gne7h7mq.js → contract-gne7h7mq.js} +0 -0
- /package/dist/chunks/{rpc-runtime-m2eywc8w.js → contract-m2eywc8w.js} +0 -0
- /package/dist/chunks/{rpc-runtime-qav6mfdz.js → contract-qav6mfdz.js} +0 -0
- /package/dist/chunks/{rpc-runtime-sxt88q69.js → contract-sxt88q69.js} +0 -0
- /package/dist/chunks/{rpc-runtime-ve4aws36.js → contract-ve4aws36.js} +0 -0
- /package/dist/chunks/{rpc-runtime-vyas3vgt.js → contract-vyas3vgt.js} +0 -0
- /package/dist/chunks/{rpc-runtime-xgnj2w4v.js → contract-xgnj2w4v.js} +0 -0
- /package/dist/chunks/{rpc-runtime-ydhz1zrh.js → contract-ydhz1zrh.js} +0 -0
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
make7
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./contract-gecjxyvt.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./
|
|
5
|
+
ClientError2
|
|
6
|
+
} from "./contract-y2etg5bs.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
} from "./
|
|
8
|
+
make4
|
|
9
|
+
} from "./contract-gmz4zyp1.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
11
|
+
make3,
|
|
12
12
|
aborted2
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./contract-15p82y03.js";
|
|
14
14
|
import {
|
|
15
15
|
__export
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./contract-9rqn6x4v.js";
|
|
17
17
|
|
|
18
18
|
// src/effect/client.ts
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
21
|
-
OpenCode: () =>
|
|
22
|
-
make: () =>
|
|
19
|
+
var exports_client = {};
|
|
20
|
+
__export(exports_client, {
|
|
21
|
+
OpenCode: () => exports_client,
|
|
22
|
+
make: () => make2
|
|
23
23
|
});
|
|
24
24
|
import { Cause, Context, Effect, Stream } from "effect";
|
|
25
25
|
import { HttpClient, HttpClientRequest } from "effect/http";
|
|
@@ -28,9 +28,9 @@ var CurrentHeaders = Context.Reference("@opencode/client/effect/rpc/headers", {
|
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
var
|
|
31
|
+
var make2 = Effect.fn("OpenCode.make")(function* (options) {
|
|
32
32
|
const httpClient = yield* HttpClient.HttpClient;
|
|
33
|
-
const raw = yield*
|
|
33
|
+
const raw = yield* make4(options).pipe(Effect.provideService(HttpClient.HttpClient, HttpClient.mapRequestEffect(httpClient, (request) => Effect.map(CurrentHeaders, (headers) => headers ? HttpClientRequest.setHeaders(request, new Headers(headers)) : request))));
|
|
34
34
|
const context = yield* Effect.context();
|
|
35
35
|
const native = raw.event.subscribe();
|
|
36
36
|
|
|
@@ -41,12 +41,12 @@ var make4 = Effect.fn("OpenCode.make")(function* (options) {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
const shared = make7((signal) => Stream.toAsyncIterableWith(native.pipe(Stream.interruptWhen(aborted2(signal)), Stream.catchCause((cause) => Stream.fail(new EventFailure(cause)))), context));
|
|
44
|
-
const subscribe = (input) => Stream.fromAsyncIterable(shared.subscribe({ types: input?.types }), (error) => error).pipe(Stream.catch((error) => Stream.failCause(error instanceof EventFailure ? error.cause : Cause.fail(new
|
|
44
|
+
const subscribe = (input) => Stream.fromAsyncIterable(shared.subscribe({ types: input?.types }), (error) => error).pipe(Stream.catch((error) => Stream.failCause(error instanceof EventFailure ? error.cause : Cause.fail(new ClientError2({ cause: error })))));
|
|
45
45
|
return {
|
|
46
46
|
...raw,
|
|
47
47
|
event: { ...raw.event, subscribe },
|
|
48
|
-
rpc: Object.assign(
|
|
48
|
+
rpc: Object.assign(make3((input, options) => raw.rpc.call(input).pipe(Effect.provideService(CurrentHeaders, options?.headers)), subscribe), raw.rpc)
|
|
49
49
|
};
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
-
export {
|
|
52
|
+
export { make2, exports_client };
|
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/contract-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
|