@detergent-software/atk 8.2.1-dev.1 → 8.3.0-dev.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [8.3.0-dev.1](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTv8.2.1&targetVersion=GTv8.3.0-dev.1) (2026-10-06)
2
+
3
+ ### Features
4
+
5
+ * **cli:** link to the new web app ([1d4f3c6](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/1d4f3c61fc39fb81cc1ad403946b35f66fb08719))
6
+
7
+ ## [8.2.1](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTv8.2.0&targetVersion=GTv8.2.1) (2026-10-06)
8
+
9
+ ### Bug Fixes
10
+
11
+ * **cli:** print the JSON error envelope when doctor diagnostics throw (ATK-175) ([09aca7a](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/09aca7ad0be0affd1555816e4a0e2422e7cfb8a0))
12
+
1
13
  ## [8.2.1-dev.1](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTv8.2.0&targetVersion=GTv8.2.1-dev.1) (2026-10-06)
2
14
 
3
15
  ### Bug Fixes
@@ -2,14 +2,20 @@
2
2
  * Links into the ATK web app, which the CLI shows next to assets and bundles
3
3
  * (`info`, `browse`, `list`, `search`).
4
4
  *
5
- * The web app uses hash routing, so every page lives under `#/`:
6
- * - assets: `#/assets/{type}/{name}/{version}` plus `?org={org}` when org-scoped
7
- * - bundles: `#/bundles/{name}` (global) or `#/bundles/{org}/{name}` (org-scoped)
5
+ * The URL scheme is the web app's own: `webRoutes` from the shared API client,
6
+ * so every link the CLI prints is one the web can parse. Entity identity is in
7
+ * the query string:
8
+ * - assets: `asset/?type={type}&name={name}[&org={org}]&version={version}`
9
+ * - bundles: `bundle/?name={name}[&org={org}]` (the page shows the latest version)
8
10
  *
9
- * Orgs are bare in these URLs; the `@` is display syntax only.
11
+ * Orgs are bare in these URLs; the `@` is display syntax only. Old `#/assets/...`
12
+ * and `#/bundles/...` links from CLI 8.x are left to the old site's redirect (ATK-39).
13
+ *
14
+ * Building a link never throws: a ref the web could not parse (an odd org in a
15
+ * hand-edited lockfile) links to the web app's home instead.
10
16
  */
11
- /** Production ATK web app. Used when `ATK_WEB_URL` is not set. */
12
- export declare const DEFAULT_WEB_URL = "https://emergentsoftware.github.io/agentic-toolkit-web/";
17
+ /** Production ATK web app (the prod Static Web App). Used when `ATK_WEB_URL` is not set. */
18
+ export declare const DEFAULT_WEB_URL = "https://ashy-wave-0d3ec6210.3.azurestaticapps.net/";
13
19
  /** Environment variable that overrides the web app base URL (e.g. to point at dev). */
14
20
  export declare const WEB_URL_ENV_VAR = "ATK_WEB_URL";
15
21
  /**
@@ -28,7 +34,7 @@ export declare function buildBundleWebUrl(name: string, org?: string): string;
28
34
  /**
29
35
  * Resolve the web app base URL, always ending in `/`.
30
36
  *
31
- * Precedence: `ATK_WEB_URL` env var > production.
37
+ * Precedence: `ATK_WEB_URL` env var (when it is an http(s) URL) > production.
32
38
  */
33
39
  export declare function getWebUrl(): string;
34
40
  //# sourceMappingURL=web-app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"web-app.d.ts","sourceRoot":"","sources":["../../src/lib/web-app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,kEAAkE;AAClE,eAAO,MAAM,eAAe,4DAA4D,CAAC;AAEzF,uFAAuF;AACvF,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAE7C;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAG7G;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAGpE;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAGlC"}
1
+ {"version":3,"file":"web-app.d.ts","sourceRoot":"","sources":["../../src/lib/web-app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,4FAA4F;AAC5F,eAAO,MAAM,eAAe,uDAAuD,CAAC;AAEpF,uFAAuF;AACvF,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAE7C;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAE7G;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAIlC"}
@@ -2,38 +2,64 @@
2
2
  * Links into the ATK web app, which the CLI shows next to assets and bundles
3
3
  * (`info`, `browse`, `list`, `search`).
4
4
  *
5
- * The web app uses hash routing, so every page lives under `#/`:
6
- * - assets: `#/assets/{type}/{name}/{version}` plus `?org={org}` when org-scoped
7
- * - bundles: `#/bundles/{name}` (global) or `#/bundles/{org}/{name}` (org-scoped)
5
+ * The URL scheme is the web app's own: `webRoutes` from the shared API client,
6
+ * so every link the CLI prints is one the web can parse. Entity identity is in
7
+ * the query string:
8
+ * - assets: `asset/?type={type}&name={name}[&org={org}]&version={version}`
9
+ * - bundles: `bundle/?name={name}[&org={org}]` (the page shows the latest version)
8
10
  *
9
- * Orgs are bare in these URLs; the `@` is display syntax only.
11
+ * Orgs are bare in these URLs; the `@` is display syntax only. Old `#/assets/...`
12
+ * and `#/bundles/...` links from CLI 8.x are left to the old site's redirect (ATK-39).
13
+ *
14
+ * Building a link never throws: a ref the web could not parse (an odd org in a
15
+ * hand-edited lockfile) links to the web app's home instead.
10
16
  */
11
- /** Production ATK web app. Used when `ATK_WEB_URL` is not set. */
12
- export const DEFAULT_WEB_URL = 'https://emergentsoftware.github.io/agentic-toolkit-web/';
17
+ import { assetRef, bundleRef, isAtkError, webRoutes } from './atk-api/index.js';
18
+ /** Production ATK web app (the prod Static Web App). Used when `ATK_WEB_URL` is not set. */
19
+ export const DEFAULT_WEB_URL = 'https://ashy-wave-0d3ec6210.3.azurestaticapps.net/';
13
20
  /** Environment variable that overrides the web app base URL (e.g. to point at dev). */
14
21
  export const WEB_URL_ENV_VAR = 'ATK_WEB_URL';
15
22
  /**
16
23
  * Build a web app URL for an asset version's detail page.
17
24
  */
18
25
  export function buildAssetWebUrl(asset, version) {
19
- const query = asset.org ? `?org=${encodeURIComponent(asset.org)}` : '';
20
- return `${getWebUrl()}#/assets/${asset.type}/${encodeURIComponent(asset.name)}/${encodeURIComponent(version)}${query}`;
26
+ return toWebUrl(() => webRoutes.asset(assetRef(asset), { version }));
21
27
  }
22
28
  /**
23
29
  * Build a web app URL for a bundle's detail page. The page always shows the
24
30
  * bundle's latest version, so no version is taken.
25
31
  */
26
32
  export function buildBundleWebUrl(name, org) {
27
- const path = org ? `${encodeURIComponent(org)}/${encodeURIComponent(name)}` : encodeURIComponent(name);
28
- return `${getWebUrl()}#/bundles/${path}`;
33
+ return toWebUrl(() => webRoutes.bundle(bundleRef({ name, org })));
29
34
  }
30
35
  /**
31
36
  * Resolve the web app base URL, always ending in `/`.
32
37
  *
33
- * Precedence: `ATK_WEB_URL` env var > production.
38
+ * Precedence: `ATK_WEB_URL` env var (when it is an http(s) URL) > production.
34
39
  */
35
40
  export function getWebUrl() {
36
- const raw = process.env[WEB_URL_ENV_VAR]?.trim() || DEFAULT_WEB_URL;
41
+ const override = process.env[WEB_URL_ENV_VAR]?.trim();
42
+ const raw = override && isHttpUrl(override) ? override : DEFAULT_WEB_URL;
37
43
  return raw.endsWith('/') ? raw : `${raw}/`;
38
44
  }
45
+ function isHttpUrl(raw) {
46
+ const url = URL.parse(raw);
47
+ return url?.protocol === 'http:' || url?.protocol === 'https:';
48
+ }
49
+ /**
50
+ * Resolve a root-relative `webRoutes` href against the web app base URL.
51
+ * The leading `/` is dropped so a base with a path (`https://host/app/`) keeps it.
52
+ */
53
+ function toWebUrl(buildHref) {
54
+ const root = getWebUrl();
55
+ try {
56
+ return new URL(buildHref().slice(1), root).toString();
57
+ }
58
+ catch (err) {
59
+ if (isAtkError(err, 'invalid_input')) {
60
+ return root;
61
+ }
62
+ throw err;
63
+ }
64
+ }
39
65
  //# sourceMappingURL=web-app.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"web-app.js","sourceRoot":"","sources":["../../src/lib/web-app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,kEAAkE;AAClE,MAAM,CAAC,MAAM,eAAe,GAAG,yDAAyD,CAAC;AAEzF,uFAAuF;AACvF,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC;AAE7C;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAmD,EAAE,OAAe;IACnG,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACvE,OAAO,GAAG,SAAS,EAAE,YAAY,KAAK,CAAC,IAAI,IAAI,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,OAAO,CAAC,GAAG,KAAK,EAAE,CAAC;AACzH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY,EAAE,GAAY;IAC1D,MAAM,IAA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;;GAIG;AACH,MAAM,UAAU,SAAS;IACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,CAAC;IACtD,MAAM,GAAG,GAAG,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC;IACzE,OAAO,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC;AAC7C,CAAC;AAED,SAAS,SAAS,CAAC,GAAW;IAC5B,MAAM,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3B,OAAO,GAAG,EAAE,QAAQ,KAAK,OAAO,IAAI,GAAG,EAAE,QAAQ,KAAK,QAAQ,CAAC;AACjE,CAAC;AAED;;;GAGG;AACH,SAAS,QAAQ,CAAC,SAAuB;IACvC,MAAM,IAAI,GAAG,SAAS,EAAE,CAAC;IACzB,IAAI,CAAC;QACH,OAAO,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;IACxD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,UAAU,CAAC,GAAG,EAAE,eAAe,CAAC,EAAE,CAAC;YACrC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@detergent-software/atk",
3
- "version": "8.2.1-dev.1",
3
+ "version": "8.3.0-dev.1",
4
4
  "description": "Agentic Tool Kit — CLI for managing AI coding tool assets.",
5
5
  "type": "module",
6
6
  "bin": {