@hybridlabor-api/aos 4.16.0 → 4.17.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 (73) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.claude/hooks/env-file-protection.mjs +19 -1
  3. package/.claude/hooks/go-gate.mjs +787 -68
  4. package/.claude/hooks/go-grant.mjs +88 -0
  5. package/.claude/settings.json +8 -0
  6. package/.codex-plugin/plugin.json +36 -6
  7. package/.opencode/commands/bdb-aos-brainstorm.md +5 -0
  8. package/.opencode/commands/bdb-aos-doctor.md +5 -0
  9. package/.opencode/commands/bdb-aos-graph.md +5 -0
  10. package/.opencode/commands/bdb-aos-init.md +5 -0
  11. package/.opencode/commands/bdb-aos-loop.md +5 -0
  12. package/.opencode/commands/bdb-aos-mastersession.md +5 -0
  13. package/.opencode/commands/bdb-aos-memb.md +5 -0
  14. package/.opencode/commands/bdb-aos-orchestrator.md +5 -0
  15. package/.opencode/commands/bdb-aos-plan.md +5 -0
  16. package/.opencode/commands/bdb-aos-playbooks.md +5 -0
  17. package/.opencode/commands/bdb-aos-setup.md +5 -0
  18. package/.opencode/commands/bdb-aos-shipping.md +5 -0
  19. package/.opencode/commands/bdb-aos-startproject.md +5 -0
  20. package/.opencode/commands/bdb-aos-store.md +5 -0
  21. package/.opencode/plugins/bdb-aos.js +54 -10
  22. package/README.md +4 -4
  23. package/agy-commands/loop.md +5 -0
  24. package/bin/aos-doctor.mjs +5 -3
  25. package/bin/aos-uninstall.mjs +25 -1
  26. package/commands/brainstorm.md +5 -0
  27. package/commands/doctor.md +5 -0
  28. package/commands/graph.md +5 -0
  29. package/commands/init.md +5 -0
  30. package/commands/loop.md +5 -0
  31. package/commands/mastersession.md +5 -0
  32. package/commands/memb.md +5 -0
  33. package/commands/orchestrator.md +5 -0
  34. package/commands/plan.md +5 -0
  35. package/commands/playbooks.md +5 -0
  36. package/commands/setup.md +5 -0
  37. package/commands/shipping.md +5 -0
  38. package/commands/startproject.md +5 -0
  39. package/commands/store.md +5 -0
  40. package/docs/codex-agy-setup.md +16 -0
  41. package/docs/opencode-setup.md +36 -0
  42. package/docs/plugin-migration.md +61 -0
  43. package/installer.js +223 -52
  44. package/lib/plugin-migration.js +462 -0
  45. package/lib/store-ui/index.html +9 -1
  46. package/lib/store-ui/server.mjs +2 -0
  47. package/package.json +7 -2
  48. package/plugin-commands.json +144 -0
  49. package/plugin.json +302 -0
  50. package/plugins/bdb-aos-codex/.codex-plugin/plugin.json +38 -0
  51. package/plugins/bdb-aos-codex/skills/brainstorm/SKILL.md +6 -0
  52. package/plugins/bdb-aos-codex/skills/doctor/SKILL.md +6 -0
  53. package/plugins/bdb-aos-codex/skills/graph/SKILL.md +6 -0
  54. package/plugins/bdb-aos-codex/skills/init/SKILL.md +6 -0
  55. package/plugins/bdb-aos-codex/skills/loop/SKILL.md +6 -0
  56. package/plugins/bdb-aos-codex/skills/mastersession/SKILL.md +6 -0
  57. package/plugins/bdb-aos-codex/skills/memb/SKILL.md +6 -0
  58. package/plugins/bdb-aos-codex/skills/orchestrator/SKILL.md +6 -0
  59. package/plugins/bdb-aos-codex/skills/plan/SKILL.md +6 -0
  60. package/plugins/bdb-aos-codex/skills/playbooks/SKILL.md +6 -0
  61. package/plugins/bdb-aos-codex/skills/setup/SKILL.md +6 -0
  62. package/plugins/bdb-aos-codex/skills/shipping/SKILL.md +6 -0
  63. package/plugins/bdb-aos-codex/skills/startproject/SKILL.md +6 -0
  64. package/plugins/bdb-aos-codex/skills/store/SKILL.md +6 -0
  65. package/scripts/build-plugin-manifest.mjs +202 -3
  66. package/skills/bdb-aos/scripts/list-playbooks.mjs +72 -0
  67. package/skills/global_config/gogate/SKILL.md +123 -0
  68. package/skills/global_config/loop-templates/SKILL.md +27 -0
  69. package/skills/global_config/loop-templates/references/ci-until-green.md +27 -0
  70. package/skills/global_config/loop-templates/references/daily-summary.md +27 -0
  71. package/skills/global_config/loop-templates/references/pr-to-merge.md +27 -0
  72. package/skills/global_config/loop-templates/references/review-rounds.md +27 -0
  73. package/.codex-plugin/marketplace.json +0 -11
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "bdb-aos",
3
+ "interface": {
4
+ "displayName": "BDB Agent OS"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "name": "bdb-aos",
9
+ "source": {
10
+ "source": "local",
11
+ "path": "./plugins/bdb-aos-codex"
12
+ },
13
+ "policy": {
14
+ "installation": "AVAILABLE",
15
+ "authentication": "ON_INSTALL"
16
+ },
17
+ "category": "Developer Tools"
18
+ }
19
+ ]
20
+ }
@@ -20,7 +20,7 @@
20
20
 
21
21
  import { readFileSync, realpathSync } from "node:fs";
22
22
  import { fileURLToPath } from "node:url";
23
- import { basename } from "node:path";
23
+ import { basename, dirname, resolve } from "node:path";
24
24
 
25
25
  // Templates are committed on purpose and hold no live secret. Blocking them
26
26
  // would contradict this hook's own advice below ("write it to .env.example").
@@ -68,8 +68,26 @@ function reasonFor(filePath) {
68
68
  ].join("\n");
69
69
  }
70
70
 
71
+ // The go-gate store (~/.aos/gate: modes and grants, ~/.aos/go: GO tokens) is
72
+ // written only by the AOS hooks. Same honest limit as go-gate's Bash guard: a
73
+ // same-uid agent running its own code can still write there; the store is
74
+ // worthless without the matching human transcript entry the gate re-verifies.
75
+ // /i: APFS and NTFS are case-insensitive, so ~/.AOS/Gate is the same directory.
76
+ const GATE_STORE = /(?:^|[\\/])\.aos[\\/](?:gate|go)(?:[\\/]|$)/i;
77
+ function gateStoreTarget(filePath) {
78
+ const abs = resolve(filePath.replace(/^~(?=\/|$)/, process.env.HOME || "~"));
79
+ let real = abs;
80
+ try { real = `${realpathSync(dirname(abs))}/${basename(abs)}`; } catch { /* parent missing: string check only */ }
81
+ let realFile = "";
82
+ try { realFile = realpathSync(abs); } catch { /* file does not exist yet */ } // a symlinked FILE pointing into the store
83
+ return GATE_STORE.test(abs) || GATE_STORE.test(real) || GATE_STORE.test(`${abs}/`) || (!!realFile && GATE_STORE.test(realFile));
84
+ }
85
+
71
86
  export function envFileReason(filePath) {
72
87
  if (typeof filePath !== "string" || !filePath.trim()) return null;
88
+ if (gateStoreTarget(filePath)) {
89
+ return `Blocked by env-file-protection hook: ${filePath} is in the AOS go-gate store. Modes and grants are set only by the human typing a plain "gogate ..." message; agents may read the status, never write it.`;
90
+ }
73
91
  // basename(), so a path like /srv/app/.env matches but /srv/app/env-notes.md does not.
74
92
  const name = basename(filePath);
75
93
  return !ENV_FILE.test(name) || TEMPLATE_FILE.test(name) ? null : reasonFor(filePath);