@deepailab/dal-remote-daemon 0.1.0 → 0.1.1

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.
Files changed (59) hide show
  1. package/NOTICE +21 -1
  2. package/THIRD-PARTY-NOTICES.md +192 -0
  3. package/node_modules/@deepailab/dal-remote-server/NOTICE +21 -1
  4. package/node_modules/@deepailab/dal-remote-server/dist/server/server/agent/providers/acp-agent.js +9 -5
  5. package/node_modules/@deepailab/dal-remote-server/dist/server/server/agent/providers/claude/query.js +3 -2
  6. package/node_modules/@deepailab/dal-remote-server/dist/server/server/agent/providers/claude/rewind.js +2 -2
  7. package/node_modules/@deepailab/dal-remote-server/dist/server/server/agent/providers/cursor-acp-agent.js +13 -9
  8. package/node_modules/@deepailab/dal-remote-server/dist/server/server/agent/providers/opencode/event-consumer.js +2 -2
  9. package/node_modules/@deepailab/dal-remote-server/dist/server/server/agent/providers/opencode/v2/runtime.js +2 -1
  10. package/node_modules/@deepailab/dal-remote-server/dist/server/server/agent/providers/opencode-agent.js +2 -2
  11. package/node_modules/@deepailab/dal-remote-server/dist/server/server/agent/providers/provider-sdk.js +46 -0
  12. package/node_modules/@deepailab/dal-remote-server/package.json +2 -5
  13. package/node_modules/@getpaseo/client/NOTICE +21 -1
  14. package/node_modules/@getpaseo/client/package.json +2 -1
  15. package/node_modules/@getpaseo/highlight/NOTICE +21 -1
  16. package/node_modules/@getpaseo/highlight/package.json +2 -1
  17. package/node_modules/@getpaseo/plugin/NOTICE +21 -1
  18. package/node_modules/@getpaseo/plugin/package.json +2 -1
  19. package/node_modules/@getpaseo/protocol/NOTICE +21 -1
  20. package/node_modules/@getpaseo/protocol/package.json +2 -1
  21. package/node_modules/@getpaseo/relay/NOTICE +21 -1
  22. package/node_modules/@getpaseo/relay/package.json +2 -1
  23. package/package.json +3 -8
  24. package/node_modules/@agentclientprotocol/sdk/LICENSE +0 -191
  25. package/node_modules/@agentclientprotocol/sdk/dist/acp.js +0 -1001
  26. package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js +0 -32
  27. package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js +0 -2054
  28. package/node_modules/@agentclientprotocol/sdk/dist/stream.js +0 -64
  29. package/node_modules/@agentclientprotocol/sdk/package.json +0 -33
  30. package/node_modules/@anthropic-ai/claude-agent-sdk/LICENSE.md +0 -1
  31. package/node_modules/@anthropic-ai/claude-agent-sdk/package.json +0 -74
  32. package/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +0 -165
  33. package/node_modules/@deepailab/dal-remote-server/node_modules/@opencode-ai/sdk/dist/error-interceptor.js +0 -43
  34. package/node_modules/@deepailab/dal-remote-server/node_modules/@opencode-ai/sdk/dist/v2/client.js +0 -78
  35. package/node_modules/@deepailab/dal-remote-server/node_modules/@opencode-ai/sdk/dist/v2/gen/client/client.gen.js +0 -232
  36. package/node_modules/@deepailab/dal-remote-server/node_modules/@opencode-ai/sdk/dist/v2/gen/client/index.js +0 -6
  37. package/node_modules/@deepailab/dal-remote-server/node_modules/@opencode-ai/sdk/dist/v2/gen/client/utils.gen.js +0 -226
  38. package/node_modules/@deepailab/dal-remote-server/node_modules/@opencode-ai/sdk/dist/v2/gen/client.gen.js +0 -3
  39. package/node_modules/@deepailab/dal-remote-server/node_modules/@opencode-ai/sdk/dist/v2/gen/core/auth.gen.js +0 -14
  40. package/node_modules/@deepailab/dal-remote-server/node_modules/@opencode-ai/sdk/dist/v2/gen/core/bodySerializer.gen.js +0 -57
  41. package/node_modules/@deepailab/dal-remote-server/node_modules/@opencode-ai/sdk/dist/v2/gen/core/params.gen.js +0 -102
  42. package/node_modules/@deepailab/dal-remote-server/node_modules/@opencode-ai/sdk/dist/v2/gen/core/pathSerializer.gen.js +0 -106
  43. package/node_modules/@deepailab/dal-remote-server/node_modules/@opencode-ai/sdk/dist/v2/gen/core/queryKeySerializer.gen.js +0 -93
  44. package/node_modules/@deepailab/dal-remote-server/node_modules/@opencode-ai/sdk/dist/v2/gen/core/serverSentEvents.gen.js +0 -139
  45. package/node_modules/@deepailab/dal-remote-server/node_modules/@opencode-ai/sdk/dist/v2/gen/core/utils.gen.js +0 -87
  46. package/node_modules/@deepailab/dal-remote-server/node_modules/@opencode-ai/sdk/dist/v2/gen/sdk.gen.js +0 -3176
  47. package/node_modules/@deepailab/dal-remote-server/node_modules/@opencode-ai/sdk/dist/v2/gen/types.gen.js +0 -2
  48. package/node_modules/@deepailab/dal-remote-server/node_modules/@opencode-ai/sdk/package.json +0 -43
  49. package/node_modules/@opencode/client/dist/chunks/service-contender-1tbj6z39.js +0 -81
  50. package/node_modules/@opencode/client/dist/chunks/service-contender-4tveyqeh.js +0 -34
  51. package/node_modules/@opencode/client/dist/chunks/service-contender-7p1wryha.js +0 -30
  52. package/node_modules/@opencode/client/dist/chunks/service-contender-9rqn6x4v.js +0 -16
  53. package/node_modules/@opencode/client/dist/chunks/service-contender-frbwqjmf.js +0 -145
  54. package/node_modules/@opencode/client/dist/chunks/service-contender-m2eywc8w.js +0 -0
  55. package/node_modules/@opencode/client/dist/chunks/service-contender-n3c99vt5.js +0 -11
  56. package/node_modules/@opencode/client/dist/chunks/service-contender-radw39tv.js +0 -1402
  57. package/node_modules/@opencode/client/dist/chunks/service-contender-vyas3vgt.js +0 -0
  58. package/node_modules/@opencode/client/dist/promise/index.js +0 -79
  59. package/node_modules/@opencode/client/package.json +0 -54
@@ -1,102 +0,0 @@
1
- // This file is auto-generated by @hey-api/openapi-ts
2
- const extraPrefixesMap = {
3
- $body_: "body",
4
- $headers_: "headers",
5
- $path_: "path",
6
- $query_: "query",
7
- };
8
- const extraPrefixes = Object.entries(extraPrefixesMap);
9
- const buildKeyMap = (fields, map) => {
10
- if (!map) {
11
- map = new Map();
12
- }
13
- for (const config of fields) {
14
- if ("in" in config) {
15
- if (config.key) {
16
- map.set(config.key, {
17
- in: config.in,
18
- map: config.map,
19
- });
20
- }
21
- }
22
- else if ("key" in config) {
23
- map.set(config.key, {
24
- map: config.map,
25
- });
26
- }
27
- else if (config.args) {
28
- buildKeyMap(config.args, map);
29
- }
30
- }
31
- return map;
32
- };
33
- const stripEmptySlots = (params) => {
34
- for (const [slot, value] of Object.entries(params)) {
35
- if (value && typeof value === "object" && !Object.keys(value).length) {
36
- delete params[slot];
37
- }
38
- }
39
- };
40
- export const buildClientParams = (args, fields) => {
41
- const params = {
42
- body: {},
43
- headers: {},
44
- path: {},
45
- query: {},
46
- };
47
- const map = buildKeyMap(fields);
48
- let config;
49
- for (const [index, arg] of args.entries()) {
50
- if (fields[index]) {
51
- config = fields[index];
52
- }
53
- if (!config) {
54
- continue;
55
- }
56
- if ("in" in config) {
57
- if (config.key) {
58
- const field = map.get(config.key);
59
- const name = field.map || config.key;
60
- if (field.in) {
61
- ;
62
- params[field.in][name] = arg;
63
- }
64
- }
65
- else {
66
- params.body = arg;
67
- }
68
- }
69
- else {
70
- for (const [key, value] of Object.entries(arg ?? {})) {
71
- const field = map.get(key);
72
- if (field) {
73
- if (field.in) {
74
- const name = field.map || key;
75
- params[field.in][name] = value;
76
- }
77
- else {
78
- params[field.map] = value;
79
- }
80
- }
81
- else {
82
- const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix));
83
- if (extra) {
84
- const [prefix, slot] = extra;
85
- params[slot][key.slice(prefix.length)] = value;
86
- }
87
- else if ("allowExtra" in config && config.allowExtra) {
88
- for (const [slot, allowed] of Object.entries(config.allowExtra)) {
89
- if (allowed) {
90
- ;
91
- params[slot][key] = value;
92
- break;
93
- }
94
- }
95
- }
96
- }
97
- }
98
- }
99
- }
100
- stripEmptySlots(params);
101
- return params;
102
- };
@@ -1,106 +0,0 @@
1
- // This file is auto-generated by @hey-api/openapi-ts
2
- export const separatorArrayExplode = (style) => {
3
- switch (style) {
4
- case "label":
5
- return ".";
6
- case "matrix":
7
- return ";";
8
- case "simple":
9
- return ",";
10
- default:
11
- return "&";
12
- }
13
- };
14
- export const separatorArrayNoExplode = (style) => {
15
- switch (style) {
16
- case "form":
17
- return ",";
18
- case "pipeDelimited":
19
- return "|";
20
- case "spaceDelimited":
21
- return "%20";
22
- default:
23
- return ",";
24
- }
25
- };
26
- export const separatorObjectExplode = (style) => {
27
- switch (style) {
28
- case "label":
29
- return ".";
30
- case "matrix":
31
- return ";";
32
- case "simple":
33
- return ",";
34
- default:
35
- return "&";
36
- }
37
- };
38
- export const serializeArrayParam = ({ allowReserved, explode, name, style, value, }) => {
39
- if (!explode) {
40
- const joinedValues = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
41
- switch (style) {
42
- case "label":
43
- return `.${joinedValues}`;
44
- case "matrix":
45
- return `;${name}=${joinedValues}`;
46
- case "simple":
47
- return joinedValues;
48
- default:
49
- return `${name}=${joinedValues}`;
50
- }
51
- }
52
- const separator = separatorArrayExplode(style);
53
- const joinedValues = value
54
- .map((v) => {
55
- if (style === "label" || style === "simple") {
56
- return allowReserved ? v : encodeURIComponent(v);
57
- }
58
- return serializePrimitiveParam({
59
- allowReserved,
60
- name,
61
- value: v,
62
- });
63
- })
64
- .join(separator);
65
- return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
66
- };
67
- export const serializePrimitiveParam = ({ allowReserved, name, value }) => {
68
- if (value === undefined || value === null) {
69
- return "";
70
- }
71
- if (typeof value === "object") {
72
- throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");
73
- }
74
- return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
75
- };
76
- export const serializeObjectParam = ({ allowReserved, explode, name, style, value, valueOnly, }) => {
77
- if (value instanceof Date) {
78
- return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
79
- }
80
- if (style !== "deepObject" && !explode) {
81
- let values = [];
82
- Object.entries(value).forEach(([key, v]) => {
83
- values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
84
- });
85
- const joinedValues = values.join(",");
86
- switch (style) {
87
- case "form":
88
- return `${name}=${joinedValues}`;
89
- case "label":
90
- return `.${joinedValues}`;
91
- case "matrix":
92
- return `;${name}=${joinedValues}`;
93
- default:
94
- return joinedValues;
95
- }
96
- }
97
- const separator = separatorObjectExplode(style);
98
- const joinedValues = Object.entries(value)
99
- .map(([key, v]) => serializePrimitiveParam({
100
- allowReserved,
101
- name: style === "deepObject" ? `${name}[${key}]` : key,
102
- value: v,
103
- }))
104
- .join(separator);
105
- return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
106
- };
@@ -1,93 +0,0 @@
1
- // This file is auto-generated by @hey-api/openapi-ts
2
- /**
3
- * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.
4
- */
5
- export const queryKeyJsonReplacer = (_key, value) => {
6
- if (value === undefined || typeof value === "function" || typeof value === "symbol") {
7
- return undefined;
8
- }
9
- if (typeof value === "bigint") {
10
- return value.toString();
11
- }
12
- if (value instanceof Date) {
13
- return value.toISOString();
14
- }
15
- return value;
16
- };
17
- /**
18
- * Safely stringifies a value and parses it back into a JsonValue.
19
- */
20
- export const stringifyToJsonValue = (input) => {
21
- try {
22
- const json = JSON.stringify(input, queryKeyJsonReplacer);
23
- if (json === undefined) {
24
- return undefined;
25
- }
26
- return JSON.parse(json);
27
- }
28
- catch {
29
- return undefined;
30
- }
31
- };
32
- /**
33
- * Detects plain objects (including objects with a null prototype).
34
- */
35
- const isPlainObject = (value) => {
36
- if (value === null || typeof value !== "object") {
37
- return false;
38
- }
39
- const prototype = Object.getPrototypeOf(value);
40
- return prototype === Object.prototype || prototype === null;
41
- };
42
- /**
43
- * Turns URLSearchParams into a sorted JSON object for deterministic keys.
44
- */
45
- const serializeSearchParams = (params) => {
46
- const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));
47
- const result = {};
48
- for (const [key, value] of entries) {
49
- const existing = result[key];
50
- if (existing === undefined) {
51
- result[key] = value;
52
- continue;
53
- }
54
- if (Array.isArray(existing)) {
55
- ;
56
- existing.push(value);
57
- }
58
- else {
59
- result[key] = [existing, value];
60
- }
61
- }
62
- return result;
63
- };
64
- /**
65
- * Normalizes any accepted value into a JSON-friendly shape for query keys.
66
- */
67
- export const serializeQueryKeyValue = (value) => {
68
- if (value === null) {
69
- return null;
70
- }
71
- if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
72
- return value;
73
- }
74
- if (value === undefined || typeof value === "function" || typeof value === "symbol") {
75
- return undefined;
76
- }
77
- if (typeof value === "bigint") {
78
- return value.toString();
79
- }
80
- if (value instanceof Date) {
81
- return value.toISOString();
82
- }
83
- if (Array.isArray(value)) {
84
- return stringifyToJsonValue(value);
85
- }
86
- if (typeof URLSearchParams !== "undefined" && value instanceof URLSearchParams) {
87
- return serializeSearchParams(value);
88
- }
89
- if (isPlainObject(value)) {
90
- return stringifyToJsonValue(value);
91
- }
92
- return undefined;
93
- };
@@ -1,139 +0,0 @@
1
- // This file is auto-generated by @hey-api/openapi-ts
2
- export const createSseClient = ({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) => {
3
- let lastEventId;
4
- const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
5
- const createStream = async function* () {
6
- let retryDelay = sseDefaultRetryDelay ?? 3000;
7
- let attempt = 0;
8
- const signal = options.signal ?? new AbortController().signal;
9
- while (true) {
10
- if (signal.aborted)
11
- break;
12
- attempt++;
13
- const headers = options.headers instanceof Headers
14
- ? options.headers
15
- : new Headers(options.headers);
16
- if (lastEventId !== undefined) {
17
- headers.set("Last-Event-ID", lastEventId);
18
- }
19
- try {
20
- const requestInit = {
21
- redirect: "follow",
22
- ...options,
23
- body: options.serializedBody,
24
- headers,
25
- signal,
26
- };
27
- let request = new Request(url, requestInit);
28
- if (onRequest) {
29
- request = await onRequest(url, requestInit);
30
- }
31
- // fetch must be assigned here, otherwise it would throw the error:
32
- // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation
33
- const _fetch = options.fetch ?? globalThis.fetch;
34
- const response = await _fetch(request);
35
- if (!response.ok)
36
- throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
37
- if (!response.body)
38
- throw new Error("No body in SSE response");
39
- const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
40
- let buffer = "";
41
- const abortHandler = () => {
42
- try {
43
- // reader.cancel() returns a promise that can reject (e.g. it races
44
- // with fetch's own abort teardown of the same stream). Swallow that
45
- // rejection explicitly — otherwise it surfaces as an unhandled
46
- // promise rejection in the host process.
47
- void reader.cancel().catch(() => {
48
- // noop
49
- });
50
- }
51
- catch {
52
- // noop
53
- }
54
- };
55
- signal.addEventListener("abort", abortHandler);
56
- try {
57
- while (true) {
58
- const { done, value } = await reader.read();
59
- if (done)
60
- break;
61
- buffer += value;
62
- // Normalize line endings: CRLF -> LF, then CR -> LF
63
- buffer = buffer.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
64
- const chunks = buffer.split("\n\n");
65
- buffer = chunks.pop() ?? "";
66
- for (const chunk of chunks) {
67
- const lines = chunk.split("\n");
68
- const dataLines = [];
69
- let eventName;
70
- for (const line of lines) {
71
- if (line.startsWith("data:")) {
72
- dataLines.push(line.replace(/^data:\s*/, ""));
73
- }
74
- else if (line.startsWith("event:")) {
75
- eventName = line.replace(/^event:\s*/, "");
76
- }
77
- else if (line.startsWith("id:")) {
78
- lastEventId = line.replace(/^id:\s*/, "");
79
- }
80
- else if (line.startsWith("retry:")) {
81
- const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
82
- if (!Number.isNaN(parsed)) {
83
- retryDelay = parsed;
84
- }
85
- }
86
- }
87
- let data;
88
- let parsedJson = false;
89
- if (dataLines.length) {
90
- const rawData = dataLines.join("\n");
91
- try {
92
- data = JSON.parse(rawData);
93
- parsedJson = true;
94
- }
95
- catch {
96
- data = rawData;
97
- }
98
- }
99
- if (parsedJson) {
100
- if (responseValidator) {
101
- await responseValidator(data);
102
- }
103
- if (responseTransformer) {
104
- data = await responseTransformer(data);
105
- }
106
- }
107
- onSseEvent?.({
108
- data,
109
- event: eventName,
110
- id: lastEventId,
111
- retry: retryDelay,
112
- });
113
- if (dataLines.length) {
114
- yield data;
115
- }
116
- }
117
- }
118
- }
119
- finally {
120
- signal.removeEventListener("abort", abortHandler);
121
- reader.releaseLock();
122
- }
123
- break; // exit loop on normal completion
124
- }
125
- catch (error) {
126
- // connection failed or aborted; retry after delay
127
- onSseError?.(error);
128
- if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {
129
- break; // stop after firing error
130
- }
131
- // exponential backoff: double retry each attempt, cap at 30s
132
- const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000);
133
- await sleep(backoff);
134
- }
135
- }
136
- };
137
- const stream = createStream();
138
- return { stream };
139
- };
@@ -1,87 +0,0 @@
1
- // This file is auto-generated by @hey-api/openapi-ts
2
- import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from "./pathSerializer.gen.js";
3
- export const PATH_PARAM_RE = /\{[^{}]+\}/g;
4
- export const defaultPathSerializer = ({ path, url: _url }) => {
5
- let url = _url;
6
- const matches = _url.match(PATH_PARAM_RE);
7
- if (matches) {
8
- for (const match of matches) {
9
- let explode = false;
10
- let name = match.substring(1, match.length - 1);
11
- let style = "simple";
12
- if (name.endsWith("*")) {
13
- explode = true;
14
- name = name.substring(0, name.length - 1);
15
- }
16
- if (name.startsWith(".")) {
17
- name = name.substring(1);
18
- style = "label";
19
- }
20
- else if (name.startsWith(";")) {
21
- name = name.substring(1);
22
- style = "matrix";
23
- }
24
- const value = path[name];
25
- if (value === undefined || value === null) {
26
- continue;
27
- }
28
- if (Array.isArray(value)) {
29
- url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
30
- continue;
31
- }
32
- if (typeof value === "object") {
33
- url = url.replace(match, serializeObjectParam({
34
- explode,
35
- name,
36
- style,
37
- value: value,
38
- valueOnly: true,
39
- }));
40
- continue;
41
- }
42
- if (style === "matrix") {
43
- url = url.replace(match, `;${serializePrimitiveParam({
44
- name,
45
- value: value,
46
- })}`);
47
- continue;
48
- }
49
- const replaceValue = encodeURIComponent(style === "label" ? `.${value}` : value);
50
- url = url.replace(match, replaceValue);
51
- }
52
- }
53
- return url;
54
- };
55
- export const getUrl = ({ baseUrl, path, query, querySerializer, url: _url, }) => {
56
- const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
57
- let url = (baseUrl ?? "") + pathUrl;
58
- if (path) {
59
- url = defaultPathSerializer({ path, url });
60
- }
61
- let search = query ? querySerializer(query) : "";
62
- if (search.startsWith("?")) {
63
- search = search.substring(1);
64
- }
65
- if (search) {
66
- url += `?${search}`;
67
- }
68
- return url;
69
- };
70
- export function getValidRequestBody(options) {
71
- const hasBody = options.body !== undefined;
72
- const isSerializedBody = hasBody && options.bodySerializer;
73
- if (isSerializedBody) {
74
- if ("serializedBody" in options) {
75
- const hasSerializedBody = options.serializedBody !== undefined && options.serializedBody !== "";
76
- return hasSerializedBody ? options.serializedBody : null;
77
- }
78
- // not all clients implement a serializedBody property (i.e. client-axios)
79
- return options.body !== "" ? options.body : null;
80
- }
81
- // plain/text body
82
- if (hasBody) {
83
- return options.body;
84
- }
85
- // no body was provided
86
- return undefined;
87
- }