@detergent-software/atk 9.3.0-dev.9 → 9.3.0

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +20 -0
  3. package/build/cli.js +11 -0
  4. package/build/cli.js.map +1 -1
  5. package/build/command-manifest.json +17 -0
  6. package/build/commands/cache.d.ts +1 -1
  7. package/build/commands/checkout.d.ts.map +1 -1
  8. package/build/commands/checkout.js +14 -1
  9. package/build/commands/checkout.js.map +1 -1
  10. package/build/commands/completion.d.ts +13 -0
  11. package/build/commands/completion.d.ts.map +1 -0
  12. package/build/commands/completion.js +22 -0
  13. package/build/commands/completion.js.map +1 -0
  14. package/build/commands/freeze.d.ts.map +1 -1
  15. package/build/commands/freeze.js +17 -10
  16. package/build/commands/freeze.js.map +1 -1
  17. package/build/commands/pin.d.ts.map +1 -1
  18. package/build/commands/pin.js +16 -10
  19. package/build/commands/pin.js.map +1 -1
  20. package/build/commands/schema.d.ts +2 -2
  21. package/build/commands/thaw.d.ts.map +1 -1
  22. package/build/commands/thaw.js +19 -12
  23. package/build/commands/thaw.js.map +1 -1
  24. package/build/commands/unpin.d.ts.map +1 -1
  25. package/build/commands/unpin.js +13 -9
  26. package/build/commands/unpin.js.map +1 -1
  27. package/build/lib/atk-api/index.d.ts +2 -2
  28. package/build/lib/atk-api/index.d.ts.map +1 -1
  29. package/build/lib/atk-api/index.js +1 -1
  30. package/build/lib/atk-api/index.js.map +1 -1
  31. package/build/lib/atk-api/web-routes.d.ts +23 -0
  32. package/build/lib/atk-api/web-routes.d.ts.map +1 -1
  33. package/build/lib/atk-api/web-routes.js +31 -0
  34. package/build/lib/atk-api/web-routes.js.map +1 -1
  35. package/build/lib/completion/candidates.d.ts +18 -0
  36. package/build/lib/completion/candidates.d.ts.map +1 -0
  37. package/build/lib/completion/candidates.js +281 -0
  38. package/build/lib/completion/candidates.js.map +1 -0
  39. package/build/lib/completion/scripts.d.ts +13 -0
  40. package/build/lib/completion/scripts.d.ts.map +1 -0
  41. package/build/lib/completion/scripts.js +96 -0
  42. package/build/lib/completion/scripts.js.map +1 -0
  43. package/build/lib/config.d.ts +11 -12
  44. package/build/lib/config.d.ts.map +1 -1
  45. package/build/lib/config.js +16 -11
  46. package/build/lib/config.js.map +1 -1
  47. package/build/lib/registry-change-json.d.ts +2 -2
  48. package/build/lib/registry.d.ts +3 -0
  49. package/build/lib/registry.d.ts.map +1 -1
  50. package/build/lib/registry.js +20 -6
  51. package/build/lib/registry.js.map +1 -1
  52. package/build/lib/schemas/adapter.d.ts +2 -2
  53. package/build/lib/scope.d.ts.map +1 -1
  54. package/build/lib/scope.js +2 -9
  55. package/build/lib/scope.js.map +1 -1
  56. package/build/lib/uninstaller.d.ts +7 -6
  57. package/build/lib/uninstaller.d.ts.map +1 -1
  58. package/build/lib/uninstaller.js +11 -55
  59. package/build/lib/uninstaller.js.map +1 -1
  60. package/build/lib/user-paths.d.ts +8 -0
  61. package/build/lib/user-paths.d.ts.map +1 -0
  62. package/build/lib/user-paths.js +24 -0
  63. package/build/lib/user-paths.js.map +1 -0
  64. package/package.json +1 -1
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Where the cache and the user root are, from values already read: no config loading and no Zod, so completion's
3
+ * candidates (ATK-611) resolve them by the same rules as `getCacheDir` and `resolveUserRoot`.
4
+ */
5
+ import { homedir } from 'node:os';
6
+ import { join, resolve } from 'node:path';
7
+ /** The cache directory: the `cacheDir` config key, else `~/.atk/cache`. */
8
+ export function cacheDirFor(configured, home = homedir()) {
9
+ return configured ?? join(home, '.atk', 'cache');
10
+ }
11
+ /**
12
+ * The user root: the `ATK_USER_ROOT` env var, then the `userRoot` config key, then the home directory. A relative
13
+ * or `~/` config value is under the home directory.
14
+ */
15
+ export function userRootFor(fromEnv, configured, home = homedir()) {
16
+ if (fromEnv) {
17
+ return resolve(fromEnv);
18
+ }
19
+ if (!configured) {
20
+ return resolve(home);
21
+ }
22
+ return resolve(home, configured === '~' ? home : configured.replace(/^~[\\/]/, ''));
23
+ }
24
+ //# sourceMappingURL=user-paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-paths.js","sourceRoot":"","sources":["../../src/lib/user-paths.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,2EAA2E;AAC3E,MAAM,UAAU,WAAW,CAAC,UAA8B,EAAE,IAAI,GAAG,OAAO,EAAE;IAC1E,OAAO,UAAU,IAAI,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AACnD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,OAA2B,EAAE,UAA8B,EAAE,IAAI,GAAG,OAAO,EAAE;IACvG,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1B,CAAC;IACD,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,OAAO,CAAC,IAAI,EAAE,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC;AACtF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@detergent-software/atk",
3
- "version": "9.3.0-dev.9",
3
+ "version": "9.3.0",
4
4
  "description": "Agentic Tool Kit — CLI for managing AI coding tool assets.",
5
5
  "type": "module",
6
6
  "bin": {