@opencode-ai/sdk 0.1.0-alpha.14 → 0.1.0-alpha.3
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/CHANGELOG.md +0 -105
- package/LICENSE +4 -198
- package/README.md +0 -18
- package/client.d.mts +48 -17
- package/client.d.mts.map +1 -1
- package/client.d.ts +48 -17
- package/client.d.ts.map +1 -1
- package/client.js +48 -15
- package/client.js.map +1 -1
- package/client.mjs +48 -15
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +0 -10
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +0 -10
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts +0 -2
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +0 -2
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/tslib.js +6 -6
- package/internal/uploads.js +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/log.js +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.d.mts.map +1 -1
- package/internal/utils/path.d.ts.map +1 -1
- package/internal/utils/path.js +5 -26
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +5 -26
- package/internal/utils/path.mjs.map +1 -1
- package/package.json +3 -13
- package/resources/app-info.d.mts +31 -0
- package/resources/app-info.d.mts.map +1 -0
- package/resources/app-info.d.ts +31 -0
- package/resources/app-info.d.ts.map +1 -0
- package/resources/app-info.js +15 -0
- package/resources/app-info.js.map +1 -0
- package/resources/app-info.mjs +11 -0
- package/resources/app-info.mjs.map +1 -0
- package/resources/app-initialize.d.mts +14 -0
- package/resources/app-initialize.d.mts.map +1 -0
- package/resources/app-initialize.d.ts +14 -0
- package/resources/app-initialize.d.ts.map +1 -0
- package/resources/app-initialize.js +15 -0
- package/resources/app-initialize.js.map +1 -0
- package/resources/app-initialize.mjs +11 -0
- package/resources/app-initialize.mjs.map +1 -0
- package/resources/config-get.d.mts +236 -0
- package/resources/config-get.d.mts.map +1 -0
- package/resources/config-get.d.ts +236 -0
- package/resources/config-get.d.ts.map +1 -0
- package/resources/config-get.js +15 -0
- package/resources/config-get.js.map +1 -0
- package/resources/config-get.mjs +11 -0
- package/resources/config-get.mjs.map +1 -0
- package/resources/event.d.mts +27 -81
- package/resources/event.d.mts.map +1 -1
- package/resources/event.d.ts +27 -81
- package/resources/event.d.ts.map +1 -1
- package/resources/event.js +1 -1
- package/resources/event.js.map +1 -1
- package/resources/event.mjs +1 -1
- package/resources/event.mjs.map +1 -1
- package/resources/file-search.d.mts +17 -0
- package/resources/file-search.d.mts.map +1 -0
- package/resources/file-search.d.ts +17 -0
- package/resources/file-search.d.ts.map +1 -0
- package/resources/file-search.js +15 -0
- package/resources/file-search.js.map +1 -0
- package/resources/file-search.mjs +11 -0
- package/resources/file-search.mjs.map +1 -0
- package/resources/index.d.mts +16 -6
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +16 -6
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +33 -13
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +16 -6
- package/resources/index.mjs.map +1 -1
- package/resources/installation-info.d.mts +17 -0
- package/resources/installation-info.d.mts.map +1 -0
- package/resources/installation-info.d.ts +17 -0
- package/resources/installation-info.d.ts.map +1 -0
- package/resources/installation-info.js +15 -0
- package/resources/installation-info.js.map +1 -0
- package/resources/installation-info.mjs +11 -0
- package/resources/installation-info.mjs.map +1 -0
- package/resources/path-get.d.mts +19 -0
- package/resources/path-get.d.mts.map +1 -0
- package/resources/path-get.d.ts +19 -0
- package/resources/path-get.d.ts.map +1 -0
- package/resources/path-get.js +15 -0
- package/resources/path-get.js.map +1 -0
- package/resources/path-get.mjs +11 -0
- package/resources/path-get.mjs.map +1 -0
- package/resources/provider-list.d.mts +58 -0
- package/resources/provider-list.d.mts.map +1 -0
- package/resources/provider-list.d.ts +58 -0
- package/resources/provider-list.d.ts.map +1 -0
- package/resources/provider-list.js +15 -0
- package/resources/provider-list.js.map +1 -0
- package/resources/provider-list.mjs +11 -0
- package/resources/provider-list.mjs.map +1 -0
- package/resources/session-abort.d.mts +17 -0
- package/resources/session-abort.d.mts.map +1 -0
- package/resources/session-abort.d.ts +17 -0
- package/resources/session-abort.d.ts.map +1 -0
- package/resources/session-abort.js +15 -0
- package/resources/session-abort.js.map +1 -0
- package/resources/session-abort.mjs +11 -0
- package/resources/session-abort.mjs.map +1 -0
- package/resources/session-chat.d.mts +160 -0
- package/resources/session-chat.d.mts.map +1 -0
- package/resources/session-chat.d.ts +160 -0
- package/resources/session-chat.d.ts.map +1 -0
- package/resources/session-chat.js +15 -0
- package/resources/session-chat.js.map +1 -0
- package/resources/session-chat.mjs +11 -0
- package/resources/session-chat.mjs.map +1 -0
- package/resources/session-create.d.mts +30 -0
- package/resources/session-create.d.mts.map +1 -0
- package/resources/session-create.d.ts +30 -0
- package/resources/session-create.d.ts.map +1 -0
- package/resources/session-create.js +15 -0
- package/resources/session-create.js.map +1 -0
- package/resources/session-create.mjs +11 -0
- package/resources/session-create.mjs.map +1 -0
- package/resources/session-initialize.d.mts +19 -0
- package/resources/session-initialize.d.mts.map +1 -0
- package/resources/session-initialize.d.ts +19 -0
- package/resources/session-initialize.d.ts.map +1 -0
- package/resources/session-initialize.js +15 -0
- package/resources/session-initialize.js.map +1 -0
- package/resources/session-initialize.mjs +11 -0
- package/resources/session-initialize.mjs.map +1 -0
- package/resources/session-list.d.mts +15 -0
- package/resources/session-list.d.mts.map +1 -0
- package/resources/session-list.d.ts +15 -0
- package/resources/session-list.d.ts.map +1 -0
- package/resources/session-list.js +15 -0
- package/resources/session-list.js.map +1 -0
- package/resources/session-list.mjs +11 -0
- package/resources/session-list.mjs.map +1 -0
- package/resources/session-messages.d.mts +18 -0
- package/resources/session-messages.d.mts.map +1 -0
- package/resources/session-messages.d.ts +18 -0
- package/resources/session-messages.d.ts.map +1 -0
- package/resources/session-messages.js +15 -0
- package/resources/session-messages.js.map +1 -0
- package/resources/session-messages.mjs +11 -0
- package/resources/session-messages.mjs.map +1 -0
- package/resources/session-share.d.mts +17 -0
- package/resources/session-share.d.mts.map +1 -0
- package/resources/session-share.d.ts +17 -0
- package/resources/session-share.d.ts.map +1 -0
- package/resources/session-share.js +15 -0
- package/resources/session-share.js.map +1 -0
- package/resources/session-share.mjs +11 -0
- package/resources/session-share.mjs.map +1 -0
- package/resources/session-summarize.d.mts +19 -0
- package/resources/session-summarize.d.mts.map +1 -0
- package/resources/session-summarize.d.ts +19 -0
- package/resources/session-summarize.d.ts.map +1 -0
- package/resources/session-summarize.js +15 -0
- package/resources/session-summarize.js.map +1 -0
- package/resources/session-summarize.mjs +11 -0
- package/resources/session-summarize.mjs.map +1 -0
- package/resources/session-unshare.d.mts +17 -0
- package/resources/session-unshare.d.mts.map +1 -0
- package/resources/session-unshare.d.ts +17 -0
- package/resources/session-unshare.d.ts.map +1 -0
- package/resources/session-unshare.js +15 -0
- package/resources/session-unshare.js.map +1 -0
- package/resources/session-unshare.mjs +11 -0
- package/resources/session-unshare.mjs.map +1 -0
- package/src/client.ts +118 -96
- package/src/internal/parse.ts +0 -14
- package/src/internal/request-options.ts +0 -2
- package/src/internal/uploads.ts +1 -1
- package/src/internal/utils/log.ts +1 -1
- package/src/internal/utils/path.ts +7 -32
- package/src/resources/app-info.ts +46 -0
- package/src/resources/app-initialize.ts +20 -0
- package/src/resources/config-get.ts +294 -0
- package/src/resources/event.ts +37 -115
- package/src/resources/file-search.ts +27 -0
- package/src/resources/index.ts +33 -44
- package/src/resources/installation-info.ts +24 -0
- package/src/resources/path-get.ts +28 -0
- package/src/resources/provider-list.ts +80 -0
- package/src/resources/session-abort.ts +27 -0
- package/src/resources/session-chat.ts +250 -0
- package/src/resources/session-create.ts +44 -0
- package/src/resources/session-initialize.ts +34 -0
- package/src/resources/session-list.ts +21 -0
- package/src/resources/session-messages.ts +31 -0
- package/src/resources/session-share.ts +23 -0
- package/src/resources/session-summarize.ts +34 -0
- package/src/resources/session-unshare.ts +26 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/core/streaming.d.mts +0 -31
- package/core/streaming.d.mts.map +0 -1
- package/core/streaming.d.ts +0 -31
- package/core/streaming.d.ts.map +0 -1
- package/core/streaming.js +0 -257
- package/core/streaming.js.map +0 -1
- package/core/streaming.mjs +0 -252
- package/core/streaming.mjs.map +0 -1
- package/internal/decoders/line.d.mts +0 -17
- package/internal/decoders/line.d.mts.map +0 -1
- package/internal/decoders/line.d.ts +0 -17
- package/internal/decoders/line.d.ts.map +0 -1
- package/internal/decoders/line.js +0 -113
- package/internal/decoders/line.js.map +0 -1
- package/internal/decoders/line.mjs +0 -108
- package/internal/decoders/line.mjs.map +0 -1
- package/resources/app.d.mts +0 -37
- package/resources/app.d.mts.map +0 -1
- package/resources/app.d.ts +0 -37
- package/resources/app.d.ts.map +0 -1
- package/resources/app.js +0 -21
- package/resources/app.js.map +0 -1
- package/resources/app.mjs +0 -17
- package/resources/app.mjs.map +0 -1
- package/resources/config.d.mts +0 -318
- package/resources/config.d.mts.map +0 -1
- package/resources/config.d.ts +0 -318
- package/resources/config.d.ts.map +0 -1
- package/resources/config.js +0 -21
- package/resources/config.js.map +0 -1
- package/resources/config.mjs +0 -17
- package/resources/config.mjs.map +0 -1
- package/resources/file.d.mts +0 -33
- package/resources/file.d.mts.map +0 -1
- package/resources/file.d.ts +0 -33
- package/resources/file.d.ts.map +0 -1
- package/resources/file.js +0 -21
- package/resources/file.js.map +0 -1
- package/resources/file.mjs +0 -17
- package/resources/file.mjs.map +0 -1
- package/resources/find.d.mts +0 -60
- package/resources/find.d.mts.map +0 -1
- package/resources/find.d.ts +0 -60
- package/resources/find.d.ts.map +0 -1
- package/resources/find.js +0 -27
- package/resources/find.js.map +0 -1
- package/resources/find.mjs +0 -23
- package/resources/find.mjs.map +0 -1
- package/resources/session.d.mts +0 -215
- package/resources/session.d.mts.map +0 -1
- package/resources/session.d.ts +0 -215
- package/resources/session.d.ts.map +0 -1
- package/resources/session.js +0 -70
- package/resources/session.js.map +0 -1
- package/resources/session.mjs +0 -66
- package/resources/session.mjs.map +0 -1
- package/resources/shared.d.mts +0 -20
- package/resources/shared.d.mts.map +0 -1
- package/resources/shared.d.ts +0 -20
- package/resources/shared.d.ts.map +0 -1
- package/resources/shared.js +0 -4
- package/resources/shared.js.map +0 -1
- package/resources/shared.mjs +0 -3
- package/resources/shared.mjs.map +0 -1
- package/src/core/streaming.ts +0 -301
- package/src/internal/decoders/line.ts +0 -135
- package/src/resources/app.ts +0 -57
- package/src/resources/config.ts +0 -409
- package/src/resources/file.ts +0 -53
- package/src/resources/find.ts +0 -95
- package/src/resources/session.ts +0 -369
- package/src/resources/shared.ts +0 -27
- package/src/streaming.ts +0 -2
- package/streaming.d.mts +0 -2
- package/streaming.d.mts.map +0 -1
- package/streaming.d.ts +0 -2
- package/streaming.d.ts.map +0 -1
- package/streaming.js +0 -6
- package/streaming.js.map +0 -1
- package/streaming.mjs +0 -2
- package/streaming.mjs.map +0 -1
package/internal/utils/log.mjs
CHANGED
|
@@ -33,7 +33,7 @@ const noopLogger = {
|
|
|
33
33
|
info: noop,
|
|
34
34
|
debug: noop,
|
|
35
35
|
};
|
|
36
|
-
let cachedLoggers =
|
|
36
|
+
let cachedLoggers = /** @__PURE__ */ new WeakMap();
|
|
37
37
|
export function loggerFor(client) {
|
|
38
38
|
const logger = client.logger;
|
|
39
39
|
const logLevel = client.logLevel ?? 'off';
|
|
@@ -1 +1 @@
|
|
|
1
|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AAO,CAAC,OAAO,GAAG,MAAM,CAAC,WAAW,CAClC,CAAC,OAAO,CAAC,OAAO,YAAY,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAC/F,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;YACjB,IAAI;YACJ,CACE,IAAI,CAAC,WAAW,EAAE,KAAK,eAAe;gBACtC,IAAI,CAAC,WAAW,EAAE,KAAK,QAAQ;gBAC/B,IAAI,CAAC,WAAW,EAAE,KAAK,YAAY,CACpC,CAAC,CAAC;gBACD,KAAK;gBACP,CAAC,CAAC,KAAK;SACR,CACF,CACF,CAAC;IACJ,CAAC;IACD,IAAI,qBAAqB,IAAI,OAAO,EAAE,CAAC;QACrC,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;YAChC,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC;QAChD,CAAC;QACD,OAAO,OAAO,CAAC,mBAAmB,CAAC;IACrC,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.d.mts","sourceRoot":"","sources":["../../src/internal/utils/path.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,UAExC;
|
|
1
|
+
{"version":3,"file":"path.d.mts","sourceRoot":"","sources":["../../src/internal/utils/path.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,UAExC;AAED,eAAO,MAAM,qBAAqB,GAAI,kCAA2B,MACjD,SAAS,SAAS,MAAM,EAAE,EAAE,GAAG,QAAQ,SAAS,OAAO,EAAE,KAAG,MA0CzE,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,IAAI,YA/CQ,SAAS,MAAM,EAAE,aAAa,SAAS,OAAO,EAAE,KAAG,MA+CJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/internal/utils/path.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,UAExC;
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/internal/utils/path.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,UAExC;AAED,eAAO,MAAM,qBAAqB,GAAI,kCAA2B,MACjD,SAAS,SAAS,MAAM,EAAE,EAAE,GAAG,QAAQ,SAAS,OAAO,EAAE,KAAG,MA0CzE,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,IAAI,YA/CQ,SAAS,MAAM,EAAE,aAAa,SAAS,OAAO,EAAE,KAAG,MA+CJ,CAAC"}
|
package/internal/utils/path.js
CHANGED
|
@@ -14,38 +14,21 @@ const error_1 = require("../../core/error.js");
|
|
|
14
14
|
function encodeURIPath(str) {
|
|
15
15
|
return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
|
|
16
16
|
}
|
|
17
|
-
const EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
|
|
18
17
|
const createPathTagFunction = (pathEncoder = encodeURIPath) => function path(statics, ...params) {
|
|
19
18
|
// If there are no params, no processing is needed.
|
|
20
19
|
if (statics.length === 1)
|
|
21
20
|
return statics[0];
|
|
22
21
|
let postPath = false;
|
|
23
|
-
const invalidSegments = [];
|
|
24
22
|
const path = statics.reduce((previousValue, currentValue, index) => {
|
|
25
23
|
if (/[?#]/.test(currentValue)) {
|
|
26
24
|
postPath = true;
|
|
27
25
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
(value == null ||
|
|
32
|
-
(typeof value === 'object' &&
|
|
33
|
-
// handle values from other realms
|
|
34
|
-
value.toString ===
|
|
35
|
-
Object.getPrototypeOf(Object.getPrototypeOf(value.hasOwnProperty ?? EMPTY) ?? EMPTY)
|
|
36
|
-
?.toString))) {
|
|
37
|
-
encoded = value + '';
|
|
38
|
-
invalidSegments.push({
|
|
39
|
-
start: previousValue.length + currentValue.length,
|
|
40
|
-
length: encoded.length,
|
|
41
|
-
error: `Value of type ${Object.prototype.toString
|
|
42
|
-
.call(value)
|
|
43
|
-
.slice(8, -1)} is not a valid path parameter`,
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
return previousValue + currentValue + (index === params.length ? '' : encoded);
|
|
26
|
+
return (previousValue +
|
|
27
|
+
currentValue +
|
|
28
|
+
(index === params.length ? '' : (postPath ? encodeURIComponent : pathEncoder)(String(params[index]))));
|
|
47
29
|
}, '');
|
|
48
30
|
const pathOnly = path.split(/[?#]/, 1)[0];
|
|
31
|
+
const invalidSegments = [];
|
|
49
32
|
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
50
33
|
let match;
|
|
51
34
|
// Find all invalid segments
|
|
@@ -53,10 +36,8 @@ const createPathTagFunction = (pathEncoder = encodeURIPath) => function path(sta
|
|
|
53
36
|
invalidSegments.push({
|
|
54
37
|
start: match.index,
|
|
55
38
|
length: match[0].length,
|
|
56
|
-
error: `Value "${match[0]}" can\'t be safely passed as a path parameter`,
|
|
57
39
|
});
|
|
58
40
|
}
|
|
59
|
-
invalidSegments.sort((a, b) => a.start - b.start);
|
|
60
41
|
if (invalidSegments.length > 0) {
|
|
61
42
|
let lastEnd = 0;
|
|
62
43
|
const underline = invalidSegments.reduce((acc, segment) => {
|
|
@@ -65,9 +46,7 @@ const createPathTagFunction = (pathEncoder = encodeURIPath) => function path(sta
|
|
|
65
46
|
lastEnd = segment.start + segment.length;
|
|
66
47
|
return acc + spaces + arrows;
|
|
67
48
|
}, '');
|
|
68
|
-
throw new error_1.OpencodeError(`Path parameters result in path with invalid segments:\n${
|
|
69
|
-
.map((e) => e.error)
|
|
70
|
-
.join('\n')}\n${path}\n${underline}`);
|
|
49
|
+
throw new error_1.OpencodeError(`Path parameters result in path with invalid segments:\n${path}\n${underline}`);
|
|
71
50
|
}
|
|
72
51
|
return path;
|
|
73
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/internal/utils/path.ts"],"names":[],"mappings":";;;AAUA,sCAEC;AAZD,+CAAiD;AAEjD;;;;;;;GAOG;AACH,SAAgB,aAAa,CAAC,GAAW;IACvC,OAAO,GAAG,CAAC,OAAO,CAAC,kCAAkC,EAAE,kBAAkB,CAAC,CAAC;AAC7E,CAAC;
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/internal/utils/path.ts"],"names":[],"mappings":";;;AAUA,sCAEC;AAZD,+CAAiD;AAEjD;;;;;;;GAOG;AACH,SAAgB,aAAa,CAAC,GAAW;IACvC,OAAO,GAAG,CAAC,OAAO,CAAC,kCAAkC,EAAE,kBAAkB,CAAC,CAAC;AAC7E,CAAC;AAEM,MAAM,qBAAqB,GAAG,CAAC,WAAW,GAAG,aAAa,EAAE,EAAE,CACnE,SAAS,IAAI,CAAC,OAA0B,EAAE,GAAG,MAA0B;IACrE,mDAAmD;IACnD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC,CAAC,CAAE,CAAC;IAE7C,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE;QACjE,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;YAC9B,QAAQ,GAAG,IAAI,CAAC;QAClB,CAAC;QACD,OAAO,CACL,aAAa;YACb,YA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P,MAAM,IAAI,qBAAa,CAAC,0DAA0D,IAAI,KAAK,SAAS,EAAE,CAAC,CAAC;IAC1G,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AA3CS,QAAA,qBAAqB,yBA2C9B;AAEJ;;GAEG;AACU,QAAA,IAAI,GAAmB,IAAA,6BAAqB,EAAC,aAAa,CAAC,CAAC"}
|
package/internal/utils/path.mjs
CHANGED
|
@@ -10,38 +10,21 @@ import { OpencodeError } from "../../core/error.mjs";
|
|
|
10
10
|
export function encodeURIPath(str) {
|
|
11
11
|
return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
|
|
12
12
|
}
|
|
13
|
-
const EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
|
|
14
13
|
export const createPathTagFunction = (pathEncoder = encodeURIPath) => function path(statics, ...params) {
|
|
15
14
|
// If there are no params, no processing is needed.
|
|
16
15
|
if (statics.length === 1)
|
|
17
16
|
return statics[0];
|
|
18
17
|
let postPath = false;
|
|
19
|
-
const invalidSegments = [];
|
|
20
18
|
const path = statics.reduce((previousValue, currentValue, index) => {
|
|
21
19
|
if (/[?#]/.test(currentValue)) {
|
|
22
20
|
postPath = true;
|
|
23
21
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
(value == null ||
|
|
28
|
-
(typeof value === 'object' &&
|
|
29
|
-
// handle values from other realms
|
|
30
|
-
value.toString ===
|
|
31
|
-
Object.getPrototypeOf(Object.getPrototypeOf(value.hasOwnProperty ?? EMPTY) ?? EMPTY)
|
|
32
|
-
?.toString))) {
|
|
33
|
-
encoded = value + '';
|
|
34
|
-
invalidSegments.push({
|
|
35
|
-
start: previousValue.length + currentValue.length,
|
|
36
|
-
length: encoded.length,
|
|
37
|
-
error: `Value of type ${Object.prototype.toString
|
|
38
|
-
.call(value)
|
|
39
|
-
.slice(8, -1)} is not a valid path parameter`,
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
return previousValue + currentValue + (index === params.length ? '' : encoded);
|
|
22
|
+
return (previousValue +
|
|
23
|
+
currentValue +
|
|
24
|
+
(index === params.length ? '' : (postPath ? encodeURIComponent : pathEncoder)(String(params[index]))));
|
|
43
25
|
}, '');
|
|
44
26
|
const pathOnly = path.split(/[?#]/, 1)[0];
|
|
27
|
+
const invalidSegments = [];
|
|
45
28
|
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
46
29
|
let match;
|
|
47
30
|
// Find all invalid segments
|
|
@@ -49,10 +32,8 @@ export const createPathTagFunction = (pathEncoder = encodeURIPath) => function p
|
|
|
49
32
|
invalidSegments.push({
|
|
50
33
|
start: match.index,
|
|
51
34
|
length: match[0].length,
|
|
52
|
-
error: `Value "${match[0]}" can\'t be safely passed as a path parameter`,
|
|
53
35
|
});
|
|
54
36
|
}
|
|
55
|
-
invalidSegments.sort((a, b) => a.start - b.start);
|
|
56
37
|
if (invalidSegments.length > 0) {
|
|
57
38
|
let lastEnd = 0;
|
|
58
39
|
const underline = invalidSegments.reduce((acc, segment) => {
|
|
@@ -61,9 +42,7 @@ export const createPathTagFunction = (pathEncoder = encodeURIPath) => function p
|
|
|
61
42
|
lastEnd = segment.start + segment.length;
|
|
62
43
|
return acc + spaces + arrows;
|
|
63
44
|
}, '');
|
|
64
|
-
throw new OpencodeError(`Path parameters result in path with invalid segments:\n${
|
|
65
|
-
.map((e) => e.error)
|
|
66
|
-
.join('\n')}\n${path}\n${underline}`);
|
|
45
|
+
throw new OpencodeError(`Path parameters result in path with invalid segments:\n${path}\n${underline}`);
|
|
67
46
|
}
|
|
68
47
|
return path;
|
|
69
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.mjs","sourceRoot":"","sources":["../../src/internal/utils/path.ts"],"names":[],"mappings":"OAAO,EAAE,aAAa,EAAE;AAExB;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,GA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;IAC3B,MAAM,qBAAqB,GAAG,oCAAoC,CAAC;IACnE,IAAI,KAAK,CAAC;IAEV,4BAA4B;IAC5B,OAAO,CAAC,KAAK,GAAG,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC/D,eAAe,CAAC,IAAI,CAAC;YACnB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM;SACxB,CAAC,CAAC;IACL,CAAC;IAED,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,IAAI,OAAO,GAAG,CAAC,CAAC;QAChB,MAAM,SAAS,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;YACxD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC;YACnD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAC1C,OAAO,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;YACzC,OAAO,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;QAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,MAAM,IAAI,aAAa,CAAC,0DAA0D,IAAI,KAAK,SAAS,EAAE,CAAC,CAAC;IAC1G,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEJ;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,eAAe,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencode-ai/sdk",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.3",
|
|
4
4
|
"description": "The official TypeScript library for the Opencode API",
|
|
5
|
-
"author": "Opencode <
|
|
5
|
+
"author": "Opencode <hello@sst.dev>",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
7
|
"main": "./index.js",
|
|
8
8
|
"type": "commonjs",
|
|
9
9
|
"repository": "github:sst/opencode-sdk-js",
|
|
10
|
-
"license": "
|
|
10
|
+
"license": "MIT",
|
|
11
11
|
"packageManager": "yarn@1.22.22",
|
|
12
12
|
"files": [
|
|
13
13
|
"**/*"
|
|
@@ -115,16 +115,6 @@
|
|
|
115
115
|
"./resources.mjs": {
|
|
116
116
|
"default": "./resources.mjs"
|
|
117
117
|
},
|
|
118
|
-
"./streaming": {
|
|
119
|
-
"import": "./streaming.mjs",
|
|
120
|
-
"require": "./streaming.js"
|
|
121
|
-
},
|
|
122
|
-
"./streaming.js": {
|
|
123
|
-
"default": "./streaming.js"
|
|
124
|
-
},
|
|
125
|
-
"./streaming.mjs": {
|
|
126
|
-
"default": "./streaming.mjs"
|
|
127
|
-
},
|
|
128
118
|
"./uploads": {
|
|
129
119
|
"import": "./uploads.mjs",
|
|
130
120
|
"require": "./uploads.js"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class AppInfo extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get app info
|
|
7
|
+
*/
|
|
8
|
+
create(options?: RequestOptions): APIPromise<AppInfoCreateResponse>;
|
|
9
|
+
}
|
|
10
|
+
export interface AppInfoCreateResponse {
|
|
11
|
+
git: boolean;
|
|
12
|
+
path: AppInfoCreateResponse.Path;
|
|
13
|
+
time: AppInfoCreateResponse.Time;
|
|
14
|
+
user: string;
|
|
15
|
+
}
|
|
16
|
+
export declare namespace AppInfoCreateResponse {
|
|
17
|
+
interface Path {
|
|
18
|
+
config: string;
|
|
19
|
+
cwd: string;
|
|
20
|
+
data: string;
|
|
21
|
+
root: string;
|
|
22
|
+
state: string;
|
|
23
|
+
}
|
|
24
|
+
interface Time {
|
|
25
|
+
initialized?: number;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export declare namespace AppInfo {
|
|
29
|
+
export { type AppInfoCreateResponse as AppInfoCreateResponse };
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=app-info.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-info.d.mts","sourceRoot":"","sources":["../src/resources/app-info.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAGpE;AAED,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,OAAO,CAAC;IAEb,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC;IAEjC,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC;IAEjC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,yBAAiB,qBAAqB,CAAC;IACrC,UAAiB,IAAI;QACnB,MAAM,EAAE,MAAM,CAAC;QAEf,GAAG,EAAE,MAAM,CAAC;QAEZ,IAAI,EAAE,MAAM,CAAC;QAEb,IAAI,EAAE,MAAM,CAAC;QAEb,KAAK,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,IAAI;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CAChE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
export declare class AppInfo extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get app info
|
|
7
|
+
*/
|
|
8
|
+
create(options?: RequestOptions): APIPromise<AppInfoCreateResponse>;
|
|
9
|
+
}
|
|
10
|
+
export interface AppInfoCreateResponse {
|
|
11
|
+
git: boolean;
|
|
12
|
+
path: AppInfoCreateResponse.Path;
|
|
13
|
+
time: AppInfoCreateResponse.Time;
|
|
14
|
+
user: string;
|
|
15
|
+
}
|
|
16
|
+
export declare namespace AppInfoCreateResponse {
|
|
17
|
+
interface Path {
|
|
18
|
+
config: string;
|
|
19
|
+
cwd: string;
|
|
20
|
+
data: string;
|
|
21
|
+
root: string;
|
|
22
|
+
state: string;
|
|
23
|
+
}
|
|
24
|
+
interface Time {
|
|
25
|
+
initialized?: number;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export declare namespace AppInfo {
|
|
29
|
+
export { type AppInfoCreateResponse as AppInfoCreateResponse };
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=app-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-info.d.ts","sourceRoot":"","sources":["../src/resources/app-info.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAGpE;AAED,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,OAAO,CAAC;IAEb,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC;IAEjC,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC;IAEjC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,yBAAiB,qBAAqB,CAAC;IACrC,UAAiB,IAAI;QACnB,MAAM,EAAE,MAAM,CAAC;QAEf,GAAG,EAAE,MAAM,CAAC;QAEZ,IAAI,EAAE,MAAM,CAAC;QAEb,IAAI,EAAE,MAAM,CAAC;QAEb,KAAK,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,IAAI;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CAChE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AppInfo = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
class AppInfo extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Get app info
|
|
9
|
+
*/
|
|
10
|
+
create(options) {
|
|
11
|
+
return this._client.post('/app_info', options);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.AppInfo = AppInfo;
|
|
15
|
+
//# sourceMappingURL=app-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-info.js","sourceRoot":"","sources":["../src/resources/app-info.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,MAAM,CAAC,OAAwB;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;CACF;AAPD,0BAOC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
export class AppInfo extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Get app info
|
|
6
|
+
*/
|
|
7
|
+
create(options) {
|
|
8
|
+
return this._client.post('/app_info', options);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=app-info.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-info.mjs","sourceRoot":"","sources":["../src/resources/app-info.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,OAAwB;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class AppInitialize extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Initialize the app
|
|
7
|
+
*/
|
|
8
|
+
initialize(options?: RequestOptions): APIPromise<AppInitializeInitializeResponse>;
|
|
9
|
+
}
|
|
10
|
+
export type AppInitializeInitializeResponse = boolean;
|
|
11
|
+
export declare namespace AppInitialize {
|
|
12
|
+
export { type AppInitializeInitializeResponse as AppInitializeInitializeResponse };
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=app-initialize.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-initialize.d.mts","sourceRoot":"","sources":["../src/resources/app-initialize.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;OAEG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,+BAA+B,CAAC;CAGlF;AAED,MAAM,MAAM,+BAA+B,GAAG,OAAO,CAAC;AAEtD,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EAAE,KAAK,+BAA+B,IAAI,+BAA+B,EAAE,CAAC;CACpF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
export declare class AppInitialize extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Initialize the app
|
|
7
|
+
*/
|
|
8
|
+
initialize(options?: RequestOptions): APIPromise<AppInitializeInitializeResponse>;
|
|
9
|
+
}
|
|
10
|
+
export type AppInitializeInitializeResponse = boolean;
|
|
11
|
+
export declare namespace AppInitialize {
|
|
12
|
+
export { type AppInitializeInitializeResponse as AppInitializeInitializeResponse };
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=app-initialize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-initialize.d.ts","sourceRoot":"","sources":["../src/resources/app-initialize.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;OAEG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,+BAA+B,CAAC;CAGlF;AAED,MAAM,MAAM,+BAA+B,GAAG,OAAO,CAAC;AAEtD,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EAAE,KAAK,+BAA+B,IAAI,+BAA+B,EAAE,CAAC;CACpF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AppInitialize = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
class AppInitialize extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Initialize the app
|
|
9
|
+
*/
|
|
10
|
+
initialize(options) {
|
|
11
|
+
return this._client.post('/app_initialize', options);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.AppInitialize = AppInitialize;
|
|
15
|
+
//# sourceMappingURL=app-initialize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-initialize.js","sourceRoot":"","sources":["../src/resources/app-initialize.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;OAEG;IACH,UAAU,CAAC,OAAwB;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;CACF;AAPD,sCAOC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
export class AppInitialize extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Initialize the app
|
|
6
|
+
*/
|
|
7
|
+
initialize(options) {
|
|
8
|
+
return this._client.post('/app_initialize', options);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=app-initialize.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-initialize.mjs","sourceRoot":"","sources":["../src/resources/app-initialize.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;OAEG;IACH,UAAU,CAAC,OAAwB;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;CACF"}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class ConfigGet extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get config info
|
|
7
|
+
*/
|
|
8
|
+
retrieve(options?: RequestOptions): APIPromise<ConfigGetRetrieveResponse>;
|
|
9
|
+
}
|
|
10
|
+
export interface ConfigGetRetrieveResponse {
|
|
11
|
+
/**
|
|
12
|
+
* JSON schema reference for configuration validation
|
|
13
|
+
*/
|
|
14
|
+
$schema?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Share newly created sessions automatically
|
|
17
|
+
*/
|
|
18
|
+
autoshare?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Automatically update to the latest version
|
|
21
|
+
*/
|
|
22
|
+
autoupdate?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Disable providers that are loaded automatically
|
|
25
|
+
*/
|
|
26
|
+
disabled_providers?: Array<string>;
|
|
27
|
+
/**
|
|
28
|
+
* Custom keybind configurations
|
|
29
|
+
*/
|
|
30
|
+
keybinds?: ConfigGetRetrieveResponse.Keybinds;
|
|
31
|
+
/**
|
|
32
|
+
* MCP (Model Context Protocol) server configurations
|
|
33
|
+
*/
|
|
34
|
+
mcp?: {
|
|
35
|
+
[key: string]: ConfigGetRetrieveResponse.ConfigMcpLocal | ConfigGetRetrieveResponse.ConfigMcpRemote;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Model to use in the format of provider/model, eg anthropic/claude-2
|
|
39
|
+
*/
|
|
40
|
+
model?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Custom provider configurations and model overrides
|
|
43
|
+
*/
|
|
44
|
+
provider?: {
|
|
45
|
+
[key: string]: ConfigGetRetrieveResponse.Provider;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Theme name to use for the interface
|
|
49
|
+
*/
|
|
50
|
+
theme?: string;
|
|
51
|
+
}
|
|
52
|
+
export declare namespace ConfigGetRetrieveResponse {
|
|
53
|
+
/**
|
|
54
|
+
* Custom keybind configurations
|
|
55
|
+
*/
|
|
56
|
+
interface Keybinds {
|
|
57
|
+
/**
|
|
58
|
+
* Exit the application
|
|
59
|
+
*/
|
|
60
|
+
app_exit?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Open external editor
|
|
63
|
+
*/
|
|
64
|
+
editor_open?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Show help dialog
|
|
67
|
+
*/
|
|
68
|
+
help?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Navigate to next history item
|
|
71
|
+
*/
|
|
72
|
+
history_next?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Navigate to previous history item
|
|
75
|
+
*/
|
|
76
|
+
history_previous?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Clear input field
|
|
79
|
+
*/
|
|
80
|
+
input_clear?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Insert newline in input
|
|
83
|
+
*/
|
|
84
|
+
input_newline?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Paste from clipboard
|
|
87
|
+
*/
|
|
88
|
+
input_paste?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Submit input
|
|
91
|
+
*/
|
|
92
|
+
input_submit?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Leader key for keybind combinations
|
|
95
|
+
*/
|
|
96
|
+
leader?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Navigate to first message
|
|
99
|
+
*/
|
|
100
|
+
messages_first?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Scroll messages down by half page
|
|
103
|
+
*/
|
|
104
|
+
messages_half_page_down?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Scroll messages up by half page
|
|
107
|
+
*/
|
|
108
|
+
messages_half_page_up?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Navigate to last message
|
|
111
|
+
*/
|
|
112
|
+
messages_last?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Navigate to next message
|
|
115
|
+
*/
|
|
116
|
+
messages_next?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Scroll messages down by one page
|
|
119
|
+
*/
|
|
120
|
+
messages_page_down?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Scroll messages up by one page
|
|
123
|
+
*/
|
|
124
|
+
messages_page_up?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Navigate to previous message
|
|
127
|
+
*/
|
|
128
|
+
messages_previous?: string;
|
|
129
|
+
/**
|
|
130
|
+
* List available models
|
|
131
|
+
*/
|
|
132
|
+
model_list?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Initialize project configuration
|
|
135
|
+
*/
|
|
136
|
+
project_init?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Toggle compact mode for session
|
|
139
|
+
*/
|
|
140
|
+
session_compact?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Interrupt current session
|
|
143
|
+
*/
|
|
144
|
+
session_interrupt?: string;
|
|
145
|
+
/**
|
|
146
|
+
* List all sessions
|
|
147
|
+
*/
|
|
148
|
+
session_list?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Create a new session
|
|
151
|
+
*/
|
|
152
|
+
session_new?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Share current session
|
|
155
|
+
*/
|
|
156
|
+
session_share?: string;
|
|
157
|
+
/**
|
|
158
|
+
* List available themes
|
|
159
|
+
*/
|
|
160
|
+
theme_list?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Show tool details
|
|
163
|
+
*/
|
|
164
|
+
tool_details?: string;
|
|
165
|
+
}
|
|
166
|
+
interface ConfigMcpLocal {
|
|
167
|
+
/**
|
|
168
|
+
* Command and arguments to run the MCP server
|
|
169
|
+
*/
|
|
170
|
+
command: Array<string>;
|
|
171
|
+
/**
|
|
172
|
+
* Type of MCP server connection
|
|
173
|
+
*/
|
|
174
|
+
type: 'local';
|
|
175
|
+
/**
|
|
176
|
+
* Environment variables to set when running the MCP server
|
|
177
|
+
*/
|
|
178
|
+
environment?: {
|
|
179
|
+
[key: string]: string;
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
interface ConfigMcpRemote {
|
|
183
|
+
/**
|
|
184
|
+
* Type of MCP server connection
|
|
185
|
+
*/
|
|
186
|
+
type: 'remote';
|
|
187
|
+
/**
|
|
188
|
+
* URL of the remote MCP server
|
|
189
|
+
*/
|
|
190
|
+
url: string;
|
|
191
|
+
}
|
|
192
|
+
interface Provider {
|
|
193
|
+
models: {
|
|
194
|
+
[key: string]: Provider.Models;
|
|
195
|
+
};
|
|
196
|
+
id?: string;
|
|
197
|
+
api?: string;
|
|
198
|
+
env?: Array<string>;
|
|
199
|
+
name?: string;
|
|
200
|
+
npm?: string;
|
|
201
|
+
options?: {
|
|
202
|
+
[key: string]: unknown;
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
namespace Provider {
|
|
206
|
+
interface Models {
|
|
207
|
+
id?: string;
|
|
208
|
+
attachment?: boolean;
|
|
209
|
+
cost?: Models.Cost;
|
|
210
|
+
limit?: Models.Limit;
|
|
211
|
+
name?: string;
|
|
212
|
+
options?: {
|
|
213
|
+
[key: string]: unknown;
|
|
214
|
+
};
|
|
215
|
+
reasoning?: boolean;
|
|
216
|
+
temperature?: boolean;
|
|
217
|
+
tool_call?: boolean;
|
|
218
|
+
}
|
|
219
|
+
namespace Models {
|
|
220
|
+
interface Cost {
|
|
221
|
+
input: number;
|
|
222
|
+
output: number;
|
|
223
|
+
cache_read?: number;
|
|
224
|
+
cache_write?: number;
|
|
225
|
+
}
|
|
226
|
+
interface Limit {
|
|
227
|
+
context: number;
|
|
228
|
+
output: number;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
export declare namespace ConfigGet {
|
|
234
|
+
export { type ConfigGetRetrieveResponse as ConfigGetRetrieveResponse };
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=config-get.d.mts.map
|