@agentprojectcontext/apx 1.74.2 → 1.76.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 (41) hide show
  1. package/package.json +1 -1
  2. package/src/core/agent/prompt-builder.js +26 -7
  3. package/src/core/agent/render-template.js +22 -0
  4. package/src/core/profiles/block.js +290 -0
  5. package/src/core/profiles/bundled/secretary/PROFILE.es.md +44 -0
  6. package/src/core/profiles/bundled/secretary/PROFILE.md +44 -0
  7. package/src/core/profiles/bundled/secretary/channels/routine.md +43 -0
  8. package/src/core/profiles/bundled/secretary/config.schema.json +49 -0
  9. package/src/core/profiles/bundled/secretary/profile.json +20 -0
  10. package/src/core/profiles/bundled/secretary/routines/day-close.json +10 -0
  11. package/src/core/profiles/bundled/secretary/routines/day-open.json +10 -0
  12. package/src/core/profiles/index.js +16 -0
  13. package/src/core/profiles/lifecycle.js +720 -0
  14. package/src/core/profiles/manifest.js +193 -0
  15. package/src/core/profiles/paths.js +51 -0
  16. package/src/core/profiles/store.js +184 -0
  17. package/src/core/runtime-skills/apx-profile/SKILL.md +126 -0
  18. package/src/core/runtime-skills/apx-task/SKILL.md +4 -0
  19. package/src/core/stores/routines.js +9 -1
  20. package/src/core/stores/tasks.js +70 -1
  21. package/src/host/daemon/api/profiles.js +179 -0
  22. package/src/host/daemon/api/tasks.js +36 -15
  23. package/src/host/daemon/api/web.js +1 -1
  24. package/src/host/daemon/api.js +2 -0
  25. package/src/interfaces/cli/commands/profile.js +252 -0
  26. package/src/interfaces/cli/commands/task.js +44 -13
  27. package/src/interfaces/cli/index.js +69 -1
  28. package/src/interfaces/web/dist/assets/{index-CQTIGYCu.js → index-Bjlk9ttU.js} +165 -160
  29. package/src/interfaces/web/dist/assets/index-Bjlk9ttU.js.map +1 -0
  30. package/src/interfaces/web/dist/assets/index-CQ5kyFej.css +1 -0
  31. package/src/interfaces/web/dist/index.html +2 -2
  32. package/src/interfaces/web/src/components/settings/ProfilePanel.tsx +245 -0
  33. package/src/interfaces/web/src/hooks/useProfiles.ts +37 -0
  34. package/src/interfaces/web/src/i18n/en.ts +32 -0
  35. package/src/interfaces/web/src/i18n/es.ts +32 -0
  36. package/src/interfaces/web/src/lib/api/profiles.ts +86 -0
  37. package/src/interfaces/web/src/lib/api/tasks.ts +6 -2
  38. package/src/interfaces/web/src/screens/SettingsScreen.tsx +6 -2
  39. package/src/interfaces/web/src/screens/base/GlobalTasksTab.tsx +21 -3
  40. package/src/interfaces/web/dist/assets/index-COrRuBp1.css +0 -1
  41. package/src/interfaces/web/dist/assets/index-CQTIGYCu.js.map +0 -1
@@ -151,6 +151,16 @@ import {
151
151
  cmdTaskReopen,
152
152
  cmdTaskPatch,
153
153
  } from "./commands/task.js";
154
+ import {
155
+ cmdProfileList,
156
+ cmdProfileShow,
157
+ cmdProfileInstall,
158
+ cmdProfileUse,
159
+ cmdProfileOff,
160
+ cmdProfileConfig,
161
+ cmdProfileDoctor,
162
+ cmdProfileUninstall,
163
+ } from "./commands/profile.js";
154
164
  import {
155
165
  cmdOrgShow,
156
166
  cmdOrgAreaAdd,
@@ -1607,6 +1617,42 @@ const HELP_TOPICS = new Map(Object.entries({
1607
1617
  examples: ["apx plugins status telegram"],
1608
1618
  }),
1609
1619
 
1620
+ profile: topic({
1621
+ title: "apx profile",
1622
+ summary:
1623
+ "Install, activate and configure the super-agent's line of work. With no profile active, APX behaves exactly as it always has.",
1624
+ usage: ["apx profile <subcommand> [args] [--flags]"],
1625
+ commands: [
1626
+ ["list | ls", "Show every available profile and which one is active."],
1627
+ ["show | get <id>", "Details, settings and token cost of one profile."],
1628
+ ["install | add <id|path>", "Validate and install a profile. Does NOT activate it."],
1629
+ ["use | activate <id>", "Make a profile active and install its routines."],
1630
+ ["off | deactivate", "Go back to vanilla. Disables its routines, deletes nothing."],
1631
+ ["config", "Show or change the active profile's settings."],
1632
+ ["doctor [<id>]", "What is missing for this profile to do its job."],
1633
+ ["uninstall | remove <id>", "Remove a profile, keeping anything you edited."],
1634
+ ],
1635
+ options: [
1636
+ ["--preview", "show: also print the rendered prompt block."],
1637
+ ["--set <key=value>", "config: set one setting. Repeatable."],
1638
+ ["--interactive", "config: walk through every setting."],
1639
+ ["--force", "install: overwrite. use: replace the active profile."],
1640
+ ],
1641
+ examples: [
1642
+ "apx profile list",
1643
+ "apx profile install secretary",
1644
+ "apx profile use secretary",
1645
+ "apx profile config --set day_open_at=08:30 --set nudge_budget_per_day=3",
1646
+ "apx profile show secretary --preview",
1647
+ "apx profile off",
1648
+ ],
1649
+ }),
1650
+ profiles: topic({
1651
+ title: "apx profiles",
1652
+ summary: "Alias for apx profile.",
1653
+ usage: ["apx profiles <subcommand>"],
1654
+ examples: ["apx profiles list"],
1655
+ }),
1610
1656
  task: topic({
1611
1657
  title: "apx task",
1612
1658
  summary: "Per-project TODO list backed by the daemon (/projects/:pid/tasks).",
@@ -1620,10 +1666,16 @@ const HELP_TOPICS = new Map(Object.entries({
1620
1666
  ["reopen <id>", "Reopen a done or dropped task."],
1621
1667
  ["patch | edit <id>", "Edit fields on an existing task."],
1622
1668
  ],
1623
- options: [["--project <name|id|path>", "Pin command to a specific project."]],
1669
+ options: [
1670
+ ["--project <name|id|path>", "Pin command to a specific project."],
1671
+ ["--all", "list: fold every registered project into one list, each row labelled."],
1672
+ ["--status <s>", "list: workflow sub-status — pending | running | in_review | blocked."],
1673
+ ["--updated-since <ISO>", "list: only what moved since that moment."],
1674
+ ],
1624
1675
  examples: [
1625
1676
  "apx task add \"Ship release notes\" --tag release --due 2026-06-01",
1626
1677
  "apx task list --state open --tag release",
1678
+ "apx task list --all --status blocked",
1627
1679
  "apx task done t_abc123",
1628
1680
  ],
1629
1681
  }),
@@ -2753,6 +2805,22 @@ async function dispatch(cmd, rest) {
2753
2805
  break;
2754
2806
  }
2755
2807
 
2808
+ case "profile":
2809
+ case "profiles": {
2810
+ const sub = rest[0];
2811
+ const a = parseArgs(rest.slice(1));
2812
+ if (!sub || sub === "list" || sub === "ls") await cmdProfileList(a);
2813
+ else if (sub === "show" || sub === "get") await cmdProfileShow(a);
2814
+ else if (sub === "install" || sub === "add") await cmdProfileInstall(a);
2815
+ else if (sub === "use" || sub === "activate") await cmdProfileUse(a);
2816
+ else if (sub === "off" || sub === "deactivate") await cmdProfileOff(a);
2817
+ else if (sub === "config") await cmdProfileConfig(a);
2818
+ else if (sub === "doctor") await cmdProfileDoctor(a);
2819
+ else if (sub === "uninstall" || sub === "remove" || sub === "rm") await cmdProfileUninstall(a);
2820
+ else die(`unknown profile subcommand: ${sub}\nUsage: apx profile <list|show|install|use|off|config|doctor|uninstall>`);
2821
+ break;
2822
+ }
2823
+
2756
2824
  case "command":
2757
2825
  case "commands": {
2758
2826
  const sub = rest[0];