@iseoane/agent-depot 0.6.9 → 0.6.11

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 (44) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/README.md +25 -3
  3. package/dist/src/app-flow.js +3 -3
  4. package/dist/src/app-recipe-removal.js +3 -1
  5. package/dist/src/atomic-file.js +24 -1
  6. package/dist/src/cli.js +49 -15
  7. package/dist/src/package-cli.js +1 -18
  8. package/dist/src/package-flow.js +8 -8
  9. package/dist/src/package-model.js +51 -0
  10. package/dist/src/path-safety.js +4 -1
  11. package/dist/src/profile-export.js +4 -4
  12. package/dist/src/profile-import.js +94 -18
  13. package/dist/src/project-installation.js +2 -1
  14. package/dist/src/project-manifest.js +7 -0
  15. package/dist/src/project-target.js +58 -0
  16. package/dist/src/skill-discovery.js +86 -6
  17. package/dist/src/skill-install.js +20 -8
  18. package/dist/src/tui/app-actions.js +18 -7
  19. package/dist/src/tui/app.js +20 -5
  20. package/dist/src/tui/batch.js +2 -1
  21. package/dist/src/tui/bulk-actions.js +21 -8
  22. package/dist/src/tui/catalog-installs.js +3 -2
  23. package/dist/src/tui/catalog-panel.js +3 -2
  24. package/dist/src/tui/catalog-state.js +47 -21
  25. package/dist/src/tui/catalog-tree.js +47 -10
  26. package/dist/src/tui/catalog-view.js +11 -5
  27. package/dist/src/tui/installations-view.js +19 -6
  28. package/dist/src/tui/installations.js +1 -1
  29. package/dist/src/tui/manage-panel.js +1 -1
  30. package/dist/src/tui/package-actions.js +2 -2
  31. package/dist/src/tui/package-rows.js +4 -4
  32. package/dist/src/tui/profile-view.js +68 -31
  33. package/dist/src/tui/sources-recipes.js +44 -8
  34. package/dist/src/tui/sources-view.js +12 -5
  35. package/dist/src/tui/updates-keys.js +30 -11
  36. package/dist/src/tui/updates-model.js +15 -3
  37. package/dist/src/tui/updates-panel.js +7 -1
  38. package/dist/src/tui/updates-tree.js +51 -0
  39. package/dist/src/tui/updates-view.js +8 -4
  40. package/dist/src/tui/updates.js +4 -3
  41. package/dist/src/tui/view-retention.js +17 -0
  42. package/dist/src/update-flow.js +3 -1
  43. package/dist/src/update-groups.js +29 -0
  44. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { checkAppUpdates, createAppOperations } from "../app-flow.js";
2
- import { describeCoordinates, selectionKey } from "../package-model.js";
2
+ import { displayPackageSelection, selectionKey } from "../package-model.js";
3
3
  import { formatVersionPolicy } from "../skill-install.js";
4
4
  import { applyConfirmedUpdates, describeUpdatePreview, loadUpdates, previewUpdateCandidates, readScopeInstallations, } from "../update-flow.js";
5
5
  import { packageOperationsOf } from "./environment.js";
@@ -139,7 +139,7 @@ export async function loadUpdateRows(operations, environment, options) {
139
139
  key: `package:${selectionKey(check.installed.selection)}`,
140
140
  scope: "user-global",
141
141
  check,
142
- path: `Package: ${describeCoordinates(check.installed.selection)}`,
142
+ path: `Package: ${displayPackageSelection(check.installed.selection)}`,
143
143
  policy: formatVersionPolicy(check.installed.selection.version),
144
144
  installed: check.observed === undefined
145
145
  ? `${recordedVersionLabel(check.installed)} (recorded)`
@@ -184,6 +184,7 @@ export async function prepareUpdates(data, selected) {
184
184
  continue;
185
185
  const { context } = loaded;
186
186
  const outcome = await previewUpdateCandidates(items, context);
187
+ lines.push(...loaded.projectTarget.map(previewText));
187
188
  lines.push(...outcome.plans.flatMap((plan) => describeUpdatePreview(plan, scope, context.projectRoot, "prompt").map(previewText)));
188
189
  failures.push(...outcome.failures);
189
190
  groups.push({
@@ -276,7 +277,7 @@ export async function runUpdates(prepared, confirmedPaths, confirmManual) {
276
277
  }
277
278
  }
278
279
  for (const { plan, approval } of prepared.packagePlans ?? []) {
279
- const name = `Package: ${plan.descriptor.name} (${plan.selection.host})`;
280
+ const name = `Package: ${plan.descriptor.name} (${plan.selection.host}) from ${displayPackageSelection(plan.selection)}`;
280
281
  try {
281
282
  const packages = prepared.packages;
282
283
  if (!packages)
@@ -0,0 +1,17 @@
1
+ export function createViewRetention() {
2
+ return { generation: 0 };
3
+ }
4
+ /**
5
+ * Drops everything kept. Call after any change to Sources, recipes, approvals or installed
6
+ * state, so a loaded-before-the-change result that finishes later is not kept either.
7
+ */
8
+ export function invalidateRetention(retention) {
9
+ if (!retention)
10
+ return;
11
+ retention.generation += 1;
12
+ retention.installations = undefined;
13
+ retention.catalogKey = undefined;
14
+ retention.catalogSkills = undefined;
15
+ retention.catalogApps = undefined;
16
+ retention.installed = undefined;
17
+ }
@@ -1,6 +1,7 @@
1
1
  import { homedir } from "node:os";
2
2
  import path from "node:path";
3
3
  import { defaultProjectManifestPath, ProjectManifestStore, } from "./project-manifest.js";
4
+ import { describeProjectTarget } from "./project-target.js";
4
5
  import { defaultProjectSkillTreeAccess } from "./skill-install.js";
5
6
  import { applyUpdateBatch, previewSkillUpdate, relativeProjectPath, } from "./skill-update.js";
6
7
  import { resolveProjectSource } from "./sources.js";
@@ -39,7 +40,8 @@ export async function loadUpdates(input) {
39
40
  ...(manifestStore === undefined ? {} : { projectManifestStore: manifestStore }),
40
41
  ...(input.installationFileSystem === undefined ? {} : { installationFileSystem: input.installationFileSystem }),
41
42
  };
42
- return { assessment, installed, context };
43
+ const projectTarget = manifestStore === undefined ? [] : await describeProjectTarget(projectRoot, manifestStore.path);
44
+ return { assessment, installed, context, projectTarget };
43
45
  }
44
46
  async function requireUserGlobalInstallations(operations) {
45
47
  if (!operations.listUserGlobalInstallations) {
@@ -0,0 +1,29 @@
1
+ // Code-unit order, so Linux and Windows agree whatever the locale.
2
+ const compare = (left, right) => (left < right ? -1 : left > right ? 1 : 0);
3
+ /** Groups updates by Source, then by Packages and Skills, with Apps apart. */
4
+ export function groupUpdates(items) {
5
+ const bySource = new Map();
6
+ const apps = [];
7
+ for (const item of items) {
8
+ if (item.kind === "app") {
9
+ apps.push(item);
10
+ continue;
11
+ }
12
+ let group = bySource.get(item.source.id);
13
+ if (group === undefined) {
14
+ group = { source: item.source, packages: [], skills: [] };
15
+ bySource.set(item.source.id, group);
16
+ }
17
+ (item.kind === "package" ? group.packages : group.skills).push(item);
18
+ }
19
+ const sources = [...bySource.values()]
20
+ .sort((left, right) => compare(left.source.label, right.source.label) || compare(left.source.id, right.source.id))
21
+ .map(({ source, packages, skills }) => ({
22
+ source,
23
+ subgroups: [
24
+ ...(packages.length > 0 ? [{ kind: "packages", items: packages }] : []),
25
+ ...(skills.length > 0 ? [{ kind: "skills", items: skills }] : []),
26
+ ],
27
+ }));
28
+ return { sources, apps };
29
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iseoane/agent-depot",
3
- "version": "0.6.9",
3
+ "version": "0.6.11",
4
4
  "description": "A cross-platform catalog for reusable coding-agent skills.",
5
5
  "license": "MIT",
6
6
  "author": "iseoane",