@detergent-software/atk 9.1.0-dev.11 → 9.1.0-dev.12
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 +6 -0
- package/build/commands/cache.d.ts +1 -1
- package/build/commands/schema.d.ts +2 -2
- package/build/lib/fetch-retry.d.ts +4 -2
- package/build/lib/fetch-retry.d.ts.map +1 -1
- package/build/lib/fetch-retry.js +10 -2
- package/build/lib/fetch-retry.js.map +1 -1
- package/build/lib/registry-change-json.d.ts +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [9.1.0-dev.12](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTv9.1.0-dev.11&targetVersion=GTv9.1.0-dev.12) (2026-10-22)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **cli:** don't retry the npm update check on a connection failure (ATK-671) ([c716b9d](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/c716b9d706751b43b51adecffee1d4a91791c36e))
|
|
6
|
+
|
|
1
7
|
## [9.1.0-dev.11](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTv9.1.0-dev.10&targetVersion=GTv9.1.0-dev.11) (2026-10-22)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
|
@@ -5,8 +5,8 @@ export declare const options: z.ZodObject<{
|
|
|
5
5
|
}, z.core.$strip>;
|
|
6
6
|
export declare const args: z.ZodTuple<[z.ZodOptional<z.ZodEnum<{
|
|
7
7
|
clear: "clear";
|
|
8
|
-
clean: "clean";
|
|
9
8
|
status: "status";
|
|
9
|
+
clean: "clean";
|
|
10
10
|
}>>], null>;
|
|
11
11
|
type Props = {
|
|
12
12
|
args: z.infer<typeof args>;
|
|
@@ -10,11 +10,11 @@ export declare const args: z.ZodTuple<[z.ZodEnum<{
|
|
|
10
10
|
hook: "hook";
|
|
11
11
|
"memory-template": "memory-template";
|
|
12
12
|
"mcp-config": "mcp-config";
|
|
13
|
-
config: "config";
|
|
14
13
|
bundle: "bundle";
|
|
14
|
+
registry: "registry";
|
|
15
|
+
config: "config";
|
|
15
16
|
adapter: "adapter";
|
|
16
17
|
lockfile: "lockfile";
|
|
17
|
-
registry: "registry";
|
|
18
18
|
}>], null>;
|
|
19
19
|
type Props = {
|
|
20
20
|
args: z.infer<typeof args>;
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Retries on network errors and retryable HTTP status codes (429, 500, 502, 503, 504)
|
|
5
5
|
* using exponential backoff with randomized jitter. Respects Retry-After headers
|
|
6
|
-
* from 429 responses when present.
|
|
6
|
+
* from 429 responses when present. A connection failure (refused, DNS, unreachable)
|
|
7
|
+
* is thrown at once, as the ATK API client does (ATK-651): offline, the backoff
|
|
8
|
+
* timers would only keep the process alive after the command's output (ATK-671).
|
|
7
9
|
*/
|
|
8
10
|
/** Configurable options for retry behavior. */
|
|
9
11
|
export interface RetryOptions {
|
|
@@ -20,7 +22,7 @@ export interface RetryOptions {
|
|
|
20
22
|
* Fetch with automatic retry for transient failures.
|
|
21
23
|
*
|
|
22
24
|
* Wraps the standard `fetch` API and retries on:
|
|
23
|
-
* - Network errors (fetch throws)
|
|
25
|
+
* - Network errors (fetch throws), except a connection failure, which is thrown at once
|
|
24
26
|
* - Retryable HTTP status codes: 429, 500, 502, 503, 504
|
|
25
27
|
*
|
|
26
28
|
* Non-retryable responses (e.g. 400, 401, 403, 404) are returned immediately
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-retry.d.ts","sourceRoot":"","sources":["../../src/lib/fetch-retry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fetch-retry.d.ts","sourceRoot":"","sources":["../../src/lib/fetch-retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,+CAA+C;AAC/C,MAAM,WAAW,YAAY;IAC3B,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAYD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,cAAc,CAClC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,GAAG,EAC7B,IAAI,CAAC,EAAE,WAAW,EAClB,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,QAAQ,CAAC,CAsDnB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEzD"}
|
package/build/lib/fetch-retry.js
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Retries on network errors and retryable HTTP status codes (429, 500, 502, 503, 504)
|
|
5
5
|
* using exponential backoff with randomized jitter. Respects Retry-After headers
|
|
6
|
-
* from 429 responses when present.
|
|
6
|
+
* from 429 responses when present. A connection failure (refused, DNS, unreachable)
|
|
7
|
+
* is thrown at once, as the ATK API client does (ATK-651): offline, the backoff
|
|
8
|
+
* timers would only keep the process alive after the command's output (ATK-671).
|
|
7
9
|
*/
|
|
8
10
|
const DEFAULT_OPTIONS = {
|
|
9
11
|
baseDelayMs: 1_000,
|
|
@@ -17,7 +19,7 @@ const RETRYABLE_STATUS_CODES = new Set([429, 500, 502, 503, 504]);
|
|
|
17
19
|
* Fetch with automatic retry for transient failures.
|
|
18
20
|
*
|
|
19
21
|
* Wraps the standard `fetch` API and retries on:
|
|
20
|
-
* - Network errors (fetch throws)
|
|
22
|
+
* - Network errors (fetch throws), except a connection failure, which is thrown at once
|
|
21
23
|
* - Retryable HTTP status codes: 429, 500, 502, 503, 504
|
|
22
24
|
*
|
|
23
25
|
* Non-retryable responses (e.g. 400, 401, 403, 404) are returned immediately
|
|
@@ -60,6 +62,12 @@ export async function fetchWithRetry(input, init, retryOptions) {
|
|
|
60
62
|
if (signal?.aborted) {
|
|
61
63
|
throw error;
|
|
62
64
|
}
|
|
65
|
+
// Imported here, not at the top: the client's barrel would add ~30 ms to every run
|
|
66
|
+
// that loads the update check, `--version` included, for a check only a failure needs.
|
|
67
|
+
const { isConnectionFailure } = await import('./atk-api/index.js');
|
|
68
|
+
if (isConnectionFailure(error)) {
|
|
69
|
+
throw error;
|
|
70
|
+
}
|
|
63
71
|
// Network error — retry if attempts remain
|
|
64
72
|
if (attempt < options.maxRetries) {
|
|
65
73
|
const delay = computeDelay(attempt, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-retry.js","sourceRoot":"","sources":["../../src/lib/fetch-retry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fetch-retry.js","sourceRoot":"","sources":["../../src/lib/fetch-retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAcH,MAAM,eAAe,GAA2B;IAC9C,WAAW,EAAE,KAAK;IAClB,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,MAAM;IAClB,UAAU,EAAE,CAAC;CACd,CAAC;AAEF,qEAAqE;AACrE,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAElE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,KAA6B,EAC7B,IAAkB,EAClB,YAA2B;IAE3B,MAAM,OAAO,GAA2B,EAAE,GAAG,eAAe,EAAE,GAAG,YAAY,EAAE,CAAC;IAChF,MAAM,MAAM,GAAG,IAAI,EAAE,MAAM,IAAI,CAAC,KAAK,YAAY,OAAO,CAAC,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M,CAAC,UAAU,CAAC,CAAC;IACnC,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QAC5C,OAAO,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,SAAS,KAAK,CAAC,EAAU,EAAE,MAA2B;IACpD,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3C,IAAI,MAAM,EAAE,OAAO,EAAE,CAAC;YACpB,MAAM,CAAC,MAAM,CAAC,MAAM,IAAI,IAAI,YAAY,CAAC,4BAA4B,EAAE,YAAY,CAAC,CAAC,CAAC;YACtF,OAAO;QACT,CAAC;QAED,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;YAC5B,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC9C,OAAO,EAAE,CAAC;QACZ,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,SAAS,OAAO;YACd,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,IAAI,YAAY,CAAC,4BAA4B,EAAE,YAAY,CAAC,CAAC,CAAC;QACzF,CAAC;QAED,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -24,9 +24,9 @@ export declare function registryChangePlanJson(plan: RegistryChangePlan): {
|
|
|
24
24
|
readonly from: string;
|
|
25
25
|
readonly to?: string;
|
|
26
26
|
}[];
|
|
27
|
-
kind: "
|
|
27
|
+
kind: "asset" | "bundle";
|
|
28
28
|
name: string;
|
|
29
29
|
assetType?: "skill" | "agent" | "rule" | "hook" | "memory-template" | "mcp-config" | undefined;
|
|
30
|
-
action: "
|
|
30
|
+
action: "unpublish" | "promote";
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=registry-change-json.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@detergent-software/atk",
|
|
3
|
-
"version": "9.1.0-dev.
|
|
3
|
+
"version": "9.1.0-dev.12",
|
|
4
4
|
"description": "Agentic Tool Kit — CLI for managing AI coding tool assets.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"tsx": "^4.21.0",
|
|
64
64
|
"typescript": "~6.0.3",
|
|
65
65
|
"vitest": "^5.0.3",
|
|
66
|
-
"@atk/
|
|
67
|
-
"@atk/
|
|
66
|
+
"@atk/eslint-config": "0.0.0",
|
|
67
|
+
"@atk/tsconfig": "0.0.0"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
|
70
70
|
"build": "pnpm manifest && tsc",
|