@link-assistant/agent 0.25.4 → 0.25.5
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/LICENSE +24 -0
- package/package.json +10 -12
- package/src/provider/retry-fetch.ts +9 -2
package/LICENSE
ADDED
|
@@ -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 <https://unlicense.org>
|
package/package.json
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@link-assistant/agent",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.5",
|
|
4
4
|
"description": "A minimal, public domain AI CLI agent compatible with OpenCode's JSON interface. Bun-only runtime.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
|
-
"agent": "
|
|
8
|
+
"agent": "src/index.js"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"dev": "bun run src/index.js",
|
|
12
|
-
"test": "bun test ./tests/*.js ./tests/*.ts",
|
|
12
|
+
"test": "bun test --timeout 30000 ./tests/*.js ./tests/*.ts",
|
|
13
13
|
"test:integration": "bun test ./tests/integration/basic.js",
|
|
14
|
-
"lint": "eslint .",
|
|
15
|
-
"lint:
|
|
16
|
-
"
|
|
17
|
-
"format
|
|
14
|
+
"lint": "eslint . && npm run lint:scripts",
|
|
15
|
+
"lint:scripts": "cd ../scripts && eslint . --config ./eslint.config.mjs",
|
|
16
|
+
"lint:fix": "eslint . --fix && cd ../scripts && eslint . --config ./eslint.config.mjs --fix",
|
|
17
|
+
"format": "prettier --write . ../scripts",
|
|
18
|
+
"format:check": "prettier --check . ../scripts",
|
|
18
19
|
"check:file-size": "node ../scripts/check-file-size.mjs",
|
|
19
20
|
"check": "npm run lint && npm run format:check && npm run check:file-size",
|
|
20
21
|
"prepare": "cd .. && husky || true",
|
|
@@ -28,7 +29,7 @@
|
|
|
28
29
|
},
|
|
29
30
|
"repository": {
|
|
30
31
|
"type": "git",
|
|
31
|
-
"url": "https://github.com/link-assistant/agent"
|
|
32
|
+
"url": "git+https://github.com/link-assistant/agent.git"
|
|
32
33
|
},
|
|
33
34
|
"keywords": [
|
|
34
35
|
"ai",
|
|
@@ -46,10 +47,7 @@
|
|
|
46
47
|
"src/",
|
|
47
48
|
"package.json",
|
|
48
49
|
"README.md",
|
|
49
|
-
"
|
|
50
|
-
"../TOOLS.md",
|
|
51
|
-
"../EXAMPLES.md",
|
|
52
|
-
"../LICENSE"
|
|
50
|
+
"LICENSE"
|
|
53
51
|
],
|
|
54
52
|
"dependencies": {
|
|
55
53
|
"@actions/core": "^1.11.1",
|
|
@@ -183,9 +183,16 @@ export namespace RetryFetch {
|
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
+
// The timer is deliberately NOT unref'd. Every caller awaits this
|
|
187
|
+
// promise, so an unref'd timer is the only pending work while a retry
|
|
188
|
+
// wait is in flight: the runtime is then free to stop waiting on it,
|
|
189
|
+
// which drops the retry instead of performing it. On Bun for Windows
|
|
190
|
+
// this showed up as `tests/retry-fetch.ts > retries on 429 and succeeds
|
|
191
|
+
// on second attempt` never resuming, burning the whole job timeout.
|
|
192
|
+
// See https://github.com/link-assistant/agent/issues/287.
|
|
193
|
+
// The abort path below clears the timer, so a cancelled wait still lets
|
|
194
|
+
// the process exit immediately (the concern behind #213).
|
|
186
195
|
const timeout = setTimeout(resolve, ms);
|
|
187
|
-
// Prevent sleep timer from keeping event loop alive (#213)
|
|
188
|
-
if (timeout.unref) timeout.unref();
|
|
189
196
|
|
|
190
197
|
if (signal) {
|
|
191
198
|
const abortHandler = () => {
|