neoctl 0.2.5 → 0.2.7
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/README.md +16 -26
- package/dist/agents/agent-activity.d.ts +70 -0
- package/dist/agents/agent-activity.js +261 -0
- package/dist/agents/agent-activity.js.map +1 -0
- package/dist/agents/agent-definition.d.ts +7 -0
- package/dist/agents/agent-definition.js +44 -1
- package/dist/agents/agent-definition.js.map +1 -1
- package/dist/agents/agent-report-tool.d.ts +11 -0
- package/dist/agents/agent-report-tool.js +50 -0
- package/dist/agents/agent-report-tool.js.map +1 -0
- package/dist/agents/agent-tool.d.ts +3 -1
- package/dist/agents/agent-tool.js +56 -11
- package/dist/agents/agent-tool.js.map +1 -1
- package/dist/agents/local-agent-task.d.ts +3 -0
- package/dist/agents/local-agent-task.js +2 -0
- package/dist/agents/local-agent-task.js.map +1 -1
- package/dist/agents/smoke-agents.js +131 -7
- package/dist/agents/smoke-agents.js.map +1 -1
- package/dist/context/prompts.js +4 -0
- package/dist/context/prompts.js.map +1 -1
- package/dist/core/query-engine.d.ts +3 -1
- package/dist/core/query-engine.js +2 -0
- package/dist/core/query-engine.js.map +1 -1
- package/dist/core/query.d.ts +4 -0
- package/dist/core/query.js +10 -1
- package/dist/core/query.js.map +1 -1
- package/dist/core/run-agent.d.ts +2 -0
- package/dist/core/run-agent.js +156 -21
- package/dist/core/run-agent.js.map +1 -1
- package/dist/core/smoke-core-loop.js +1 -1
- package/dist/core/smoke-core-loop.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/model/anthropic-mapper.js +27 -2
- package/dist/model/anthropic-mapper.js.map +1 -1
- package/dist/model/config.d.ts +2 -8
- package/dist/model/config.js +1 -41
- package/dist/model/config.js.map +1 -1
- package/dist/model/env.js +6 -11
- package/dist/model/env.js.map +1 -1
- package/dist/model/model-metadata.json +1 -115
- package/dist/model/openai-chat-mapper.js +4 -19
- package/dist/model/openai-chat-mapper.js.map +1 -1
- package/dist/model/provider-factory.js +0 -32
- package/dist/model/provider-factory.js.map +1 -1
- package/dist/model/smoke-anthropic-mapper.js +6 -2
- package/dist/model/smoke-anthropic-mapper.js.map +1 -1
- package/dist/repl/commands.d.ts +8 -0
- package/dist/repl/commands.js +35 -1
- package/dist/repl/commands.js.map +1 -1
- package/dist/repl/index.js +731 -127
- package/dist/repl/index.js.map +1 -1
- package/dist/secrets/secret-crypto.d.ts +22 -0
- package/dist/secrets/secret-crypto.js +58 -0
- package/dist/secrets/secret-crypto.js.map +1 -0
- package/dist/secrets/secret-redaction.d.ts +8 -0
- package/dist/secrets/secret-redaction.js +40 -0
- package/dist/secrets/secret-redaction.js.map +1 -0
- package/dist/secrets/secret-store.d.ts +28 -0
- package/dist/secrets/secret-store.js +158 -0
- package/dist/secrets/secret-store.js.map +1 -0
- package/dist/secrets/secret-types.d.ts +31 -0
- package/dist/secrets/secret-types.js +17 -0
- package/dist/secrets/secret-types.js.map +1 -0
- package/dist/secrets/smoke-secrets.js +68 -0
- package/dist/secrets/smoke-secrets.js.map +1 -0
- package/dist/tools/builtins/exec-tool.d.ts +20 -1
- package/dist/tools/builtins/exec-tool.js +164 -29
- package/dist/tools/builtins/exec-tool.js.map +1 -1
- package/dist/tools/builtins/plan-tool.d.ts +1 -0
- package/dist/tools/builtins/plan-tool.js +80 -27
- package/dist/tools/builtins/plan-tool.js.map +1 -1
- package/dist/tools/builtins/secret-tools.d.ts +10 -0
- package/dist/tools/builtins/secret-tools.js +75 -0
- package/dist/tools/builtins/secret-tools.js.map +1 -0
- package/dist/tools/run-tool-use.js +4 -2
- package/dist/tools/run-tool-use.js.map +1 -1
- package/dist/tools/smoke-tool-system.js +42 -10
- package/dist/tools/smoke-tool-system.js.map +1 -1
- package/dist/tools/tool.d.ts +3 -0
- package/dist/tools/tool.js.map +1 -1
- package/dist/web/html.js +1 -1
- package/dist/web/index.js +11 -50
- package/dist/web/index.js.map +1 -1
- package/package.json +5 -3
- package/scripts/install-ripgrep.cjs +62 -18
- package/vendor/ripgrep/darwin-arm64/COPYING +3 -0
- package/vendor/ripgrep/darwin-arm64/LICENSE-MIT +21 -0
- package/vendor/ripgrep/darwin-arm64/UNLICENSE +24 -0
- package/vendor/ripgrep/darwin-arm64/manifest.json +7 -0
- package/vendor/ripgrep/darwin-arm64/rg +0 -0
- package/vendor/ripgrep/darwin-x64/COPYING +3 -0
- package/vendor/ripgrep/darwin-x64/LICENSE-MIT +21 -0
- package/vendor/ripgrep/darwin-x64/UNLICENSE +24 -0
- package/vendor/ripgrep/darwin-x64/manifest.json +7 -0
- package/vendor/ripgrep/darwin-x64/rg +0 -0
- package/vendor/ripgrep/linux-arm64/COPYING +3 -0
- package/vendor/ripgrep/linux-arm64/LICENSE-MIT +21 -0
- package/vendor/ripgrep/linux-arm64/UNLICENSE +24 -0
- package/vendor/ripgrep/linux-arm64/manifest.json +7 -0
- package/vendor/ripgrep/linux-arm64/rg +0 -0
- package/vendor/ripgrep/linux-x64/COPYING +3 -0
- package/vendor/ripgrep/linux-x64/LICENSE-MIT +21 -0
- package/vendor/ripgrep/linux-x64/UNLICENSE +24 -0
- package/vendor/ripgrep/linux-x64/manifest.json +7 -0
- package/vendor/ripgrep/linux-x64/rg +0 -0
- package/vendor/ripgrep/win32-arm64/COPYING +3 -0
- package/vendor/ripgrep/win32-arm64/LICENSE-MIT +21 -0
- package/vendor/ripgrep/win32-arm64/UNLICENSE +24 -0
- package/vendor/ripgrep/win32-arm64/manifest.json +7 -0
- package/vendor/ripgrep/win32-arm64/rg.exe +0 -0
- package/vendor/ripgrep/win32-x64/COPYING +3 -0
- package/vendor/ripgrep/win32-x64/LICENSE-MIT +21 -0
- package/vendor/ripgrep/win32-x64/UNLICENSE +24 -0
- package/vendor/ripgrep/win32-x64/manifest.json +7 -0
- package/vendor/ripgrep/win32-x64/rg.exe +0 -0
- package/dist/model/deepseek-adapter.d.ts +0 -29
- package/dist/model/deepseek-adapter.js +0 -108
- package/dist/model/deepseek-adapter.js.map +0 -1
- package/dist/model/kimi-adapter.d.ts +0 -29
- package/dist/model/kimi-adapter.js +0 -108
- package/dist/model/kimi-adapter.js.map +0 -1
- package/dist/model/smoke-deepseek-mapper.js +0 -65
- package/dist/model/smoke-deepseek-mapper.js.map +0 -1
- /package/dist/{model/smoke-deepseek-mapper.d.ts → secrets/smoke-secrets.d.ts} +0 -0
|
@@ -11,6 +11,7 @@ const PROJECT_ROOT = path.resolve(__dirname, "..");
|
|
|
11
11
|
const VENDOR_ROOT = path.join(PROJECT_ROOT, "vendor", "ripgrep");
|
|
12
12
|
const OPTIONAL = process.argv.includes("--optional");
|
|
13
13
|
const FORCE = process.argv.includes("--force");
|
|
14
|
+
const ALL = process.argv.includes("--all");
|
|
14
15
|
|
|
15
16
|
const TARGETS = {
|
|
16
17
|
"win32-x64": [/x86_64-pc-windows-msvc\.zip$/i],
|
|
@@ -32,17 +33,23 @@ main().catch((error) => {
|
|
|
32
33
|
});
|
|
33
34
|
|
|
34
35
|
async function main() {
|
|
35
|
-
const
|
|
36
|
-
const
|
|
36
|
+
const release = await getJson(LATEST_RELEASE_URL);
|
|
37
|
+
const keys = ALL ? Object.keys(TARGETS) : [platformKey()];
|
|
38
|
+
for (const key of keys) {
|
|
39
|
+
await installTarget(release, key);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async function installTarget(release, key) {
|
|
44
|
+
const executable = key.startsWith("win32-") ? "rg.exe" : "rg";
|
|
37
45
|
const targetDir = path.join(VENDOR_ROOT, key);
|
|
38
46
|
const targetPath = path.join(targetDir, executable);
|
|
39
47
|
|
|
40
48
|
if (!FORCE && fs.existsSync(targetPath)) {
|
|
41
|
-
console.
|
|
49
|
+
console.error(`[ripgrep] using existing ${path.relative(PROJECT_ROOT, targetPath)}`);
|
|
42
50
|
return;
|
|
43
51
|
}
|
|
44
52
|
|
|
45
|
-
const release = await getJson(LATEST_RELEASE_URL);
|
|
46
53
|
const asset = selectAsset(release.assets ?? [], key);
|
|
47
54
|
if (!asset) throw new Error(`no ripgrep release asset found for ${key}`);
|
|
48
55
|
|
|
@@ -52,7 +59,7 @@ async function main() {
|
|
|
52
59
|
const extractDir = path.join(tempDir, "extract");
|
|
53
60
|
await fsp.mkdir(extractDir, { recursive: true });
|
|
54
61
|
|
|
55
|
-
console.
|
|
62
|
+
console.error(`[ripgrep] downloading ${asset.name}`);
|
|
56
63
|
await download(asset.browser_download_url, archivePath);
|
|
57
64
|
extractArchive(archivePath, extractDir);
|
|
58
65
|
|
|
@@ -62,7 +69,7 @@ async function main() {
|
|
|
62
69
|
await fsp.rm(targetDir, { recursive: true, force: true });
|
|
63
70
|
await fsp.mkdir(targetDir, { recursive: true });
|
|
64
71
|
await fsp.copyFile(binaryPath, targetPath);
|
|
65
|
-
if (
|
|
72
|
+
if (!key.startsWith("win32-")) await fsp.chmod(targetPath, 0o755);
|
|
66
73
|
|
|
67
74
|
await copyLicenseFiles(extractDir, targetDir);
|
|
68
75
|
await fsp.writeFile(
|
|
@@ -76,7 +83,7 @@ async function main() {
|
|
|
76
83
|
}, null, 2)}\n`,
|
|
77
84
|
"utf8",
|
|
78
85
|
);
|
|
79
|
-
console.
|
|
86
|
+
console.error(`[ripgrep] installed ${path.relative(PROJECT_ROOT, targetPath)}`);
|
|
80
87
|
} finally {
|
|
81
88
|
await fsp.rm(tempDir, { recursive: true, force: true });
|
|
82
89
|
}
|
|
@@ -94,20 +101,57 @@ function selectAsset(assets, key) {
|
|
|
94
101
|
}
|
|
95
102
|
|
|
96
103
|
async function getJson(url) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
try {
|
|
105
|
+
const response = await fetchWithRetry(url, {
|
|
106
|
+
headers: {
|
|
107
|
+
Accept: "application/vnd.github+json",
|
|
108
|
+
"User-Agent": "agent-scaffold-ripgrep-installer",
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
if (!response.ok) throw new Error(`GET ${url} returned ${response.status}: ${(await response.text()).slice(0, 200)}`);
|
|
112
|
+
return response.json();
|
|
113
|
+
} catch (error) {
|
|
114
|
+
const body = curlGet(url);
|
|
115
|
+
return JSON.parse(body.toString("utf8"));
|
|
116
|
+
}
|
|
105
117
|
}
|
|
106
118
|
|
|
107
119
|
async function download(url, destination) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
120
|
+
try {
|
|
121
|
+
const response = await fetchWithRetry(url, { headers: { "User-Agent": "agent-scaffold-ripgrep-installer" } });
|
|
122
|
+
if (!response.ok) throw new Error(`download returned ${response.status}`);
|
|
123
|
+
await fsp.writeFile(destination, Buffer.from(await response.arrayBuffer()));
|
|
124
|
+
} catch (error) {
|
|
125
|
+
curlDownload(url, destination);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
async function fetchWithRetry(url, options, attempts = 3) {
|
|
130
|
+
let lastError;
|
|
131
|
+
for (let attempt = 1; attempt <= attempts; attempt += 1) {
|
|
132
|
+
try {
|
|
133
|
+
const response = await fetch(url, options);
|
|
134
|
+
if (response.ok || response.status < 500 || attempt === attempts) return response;
|
|
135
|
+
lastError = new Error(`HTTP ${response.status}`);
|
|
136
|
+
} catch (error) {
|
|
137
|
+
lastError = error;
|
|
138
|
+
if (attempt === attempts) break;
|
|
139
|
+
}
|
|
140
|
+
await delay(1000 * attempt);
|
|
141
|
+
}
|
|
142
|
+
throw lastError;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function delay(ms) {
|
|
146
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function curlGet(url) {
|
|
150
|
+
return execFileSync("curl", ["-fL", "--retry", "3", "--retry-delay", "1", "-H", "Accept: application/vnd.github+json", "-H", "User-Agent: agent-scaffold-ripgrep-installer", url], { maxBuffer: 1024 * 1024 * 20 });
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function curlDownload(url, destination) {
|
|
154
|
+
execFileSync("curl", ["-fL", "--retry", "3", "--retry-delay", "1", "-H", "User-Agent: agent-scaffold-ripgrep-installer", "-o", destination, url], { stdio: "ignore" });
|
|
111
155
|
}
|
|
112
156
|
|
|
113
157
|
function extractArchive(archivePath, destination) {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 Andrew Gallant
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
This is free and unencumbered software released into the public domain.
|
|
2
|
+
|
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
+
distribute this software, either in source code form or as a compiled
|
|
5
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
+
means.
|
|
7
|
+
|
|
8
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
+
of this software dedicate any and all copyright interest in the
|
|
10
|
+
software to the public domain. We make this dedication for the benefit
|
|
11
|
+
of the public at large and to the detriment of our heirs and
|
|
12
|
+
successors. We intend this dedication to be an overt act of
|
|
13
|
+
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
+
software under copyright law.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
|
|
24
|
+
For more information, please refer to <http://unlicense.org/>
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 Andrew Gallant
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
This is free and unencumbered software released into the public domain.
|
|
2
|
+
|
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
+
distribute this software, either in source code form or as a compiled
|
|
5
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
+
means.
|
|
7
|
+
|
|
8
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
+
of this software dedicate any and all copyright interest in the
|
|
10
|
+
software to the public domain. We make this dedication for the benefit
|
|
11
|
+
of the public at large and to the detriment of our heirs and
|
|
12
|
+
successors. We intend this dedication to be an overt act of
|
|
13
|
+
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
+
software under copyright law.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
|
|
24
|
+
For more information, please refer to <http://unlicense.org/>
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 Andrew Gallant
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
This is free and unencumbered software released into the public domain.
|
|
2
|
+
|
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
+
distribute this software, either in source code form or as a compiled
|
|
5
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
+
means.
|
|
7
|
+
|
|
8
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
+
of this software dedicate any and all copyright interest in the
|
|
10
|
+
software to the public domain. We make this dedication for the benefit
|
|
11
|
+
of the public at large and to the detriment of our heirs and
|
|
12
|
+
successors. We intend this dedication to be an overt act of
|
|
13
|
+
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
+
software under copyright law.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
|
|
24
|
+
For more information, please refer to <http://unlicense.org/>
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 Andrew Gallant
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
This is free and unencumbered software released into the public domain.
|
|
2
|
+
|
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
+
distribute this software, either in source code form or as a compiled
|
|
5
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
+
means.
|
|
7
|
+
|
|
8
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
+
of this software dedicate any and all copyright interest in the
|
|
10
|
+
software to the public domain. We make this dedication for the benefit
|
|
11
|
+
of the public at large and to the detriment of our heirs and
|
|
12
|
+
successors. We intend this dedication to be an overt act of
|
|
13
|
+
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
+
software under copyright law.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
|
|
24
|
+
For more information, please refer to <http://unlicense.org/>
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 Andrew Gallant
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
This is free and unencumbered software released into the public domain.
|
|
2
|
+
|
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
+
distribute this software, either in source code form or as a compiled
|
|
5
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
+
means.
|
|
7
|
+
|
|
8
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
+
of this software dedicate any and all copyright interest in the
|
|
10
|
+
software to the public domain. We make this dedication for the benefit
|
|
11
|
+
of the public at large and to the detriment of our heirs and
|
|
12
|
+
successors. We intend this dedication to be an overt act of
|
|
13
|
+
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
+
software under copyright law.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
|
|
24
|
+
For more information, please refer to <http://unlicense.org/>
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 Andrew Gallant
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
This is free and unencumbered software released into the public domain.
|
|
2
|
+
|
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
+
distribute this software, either in source code form or as a compiled
|
|
5
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
+
means.
|
|
7
|
+
|
|
8
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
+
of this software dedicate any and all copyright interest in the
|
|
10
|
+
software to the public domain. We make this dedication for the benefit
|
|
11
|
+
of the public at large and to the detriment of our heirs and
|
|
12
|
+
successors. We intend this dedication to be an overt act of
|
|
13
|
+
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
+
software under copyright law.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
|
|
24
|
+
For more information, please refer to <http://unlicense.org/>
|
|
Binary file
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { CredentialProvider } from "./credentials.js";
|
|
2
|
-
import type { ModelGateway, ModelRequest, ModelStreamEvent, ReasoningConfig } from "./model-gateway.js";
|
|
3
|
-
import type { ProviderAdapter, ProviderCapabilities } from "./provider-adapter.js";
|
|
4
|
-
export interface DeepSeekAdapterOptions {
|
|
5
|
-
apiKey?: string;
|
|
6
|
-
apiKeyEnvName?: string;
|
|
7
|
-
credentialProvider?: CredentialProvider;
|
|
8
|
-
baseUrl?: string;
|
|
9
|
-
model: string;
|
|
10
|
-
fallbackModel?: string;
|
|
11
|
-
timeoutMs?: number;
|
|
12
|
-
streamIdleTimeoutMs?: number;
|
|
13
|
-
maxRetries?: number;
|
|
14
|
-
defaultMaxOutputTokens?: number;
|
|
15
|
-
defaultReasoning?: ReasoningConfig | null;
|
|
16
|
-
}
|
|
17
|
-
export declare class DeepSeekAdapter implements ProviderAdapter, ModelGateway {
|
|
18
|
-
private readonly options;
|
|
19
|
-
readonly name = "deepseek";
|
|
20
|
-
readonly capabilities: ProviderCapabilities;
|
|
21
|
-
private readonly credentialProvider;
|
|
22
|
-
private readonly transport;
|
|
23
|
-
private readonly baseUrl;
|
|
24
|
-
constructor(options: DeepSeekAdapterOptions);
|
|
25
|
-
stream(request: ModelRequest): AsyncIterable<ModelStreamEvent>;
|
|
26
|
-
private streamChat;
|
|
27
|
-
private assertRequestCapabilities;
|
|
28
|
-
private authHeaders;
|
|
29
|
-
}
|