5 Commits
Author SHA1 Message Date
c4ch3c4d3 c3954d1533 Break enterprise policy out into openchamber-policy.json
- New --enterprise <policy.json> flag installs a policy file from the
  cloned repo (openchamber-policy.json) instead of the built-in defaults
- --relay-url overrides the source file's relayUrl key; matching relay
  installs the file content verbatim
- Invalid or missing policy source fails closed with a clear error
- Arg parsing extracted into a testable parse_args function
2026-10-06 10:49:54 -06:00
c4ch3c4d3 778341b7a5 Fix review findings: fail-closed merge, die ordering, sudo-path idempotency
- merge_policies: interpreter failure now aborts with the temp file
  removed instead of moving an empty tmp into place (errexit is
  suppressed when the function is called in a || context, so the
  status is checked explicitly); config stays untouched on failure
- move info/ok/warn/die above arg parsing so --allow-provider without
  a value prints the intended error, not 'die: command not found'
- install_enterprise_policy: compare content before writing on the
  sudo path (skip when already enforced, warn on drift), repair the
  no-root-with-existing-file case instead of pinning env vars, chmod
  644 the policy file in both paths
- tests: in-place merge, fail-closed on bad JSON, clean arg error
2026-10-06 10:45:56 -06:00
c4ch3c4d3 c926361ccc Add enterprise mode + provider policy enforcement to bootstrap script
- Install /etc/openchamber/policy.json (enterpriseMode, organization,
  pinned relayUrl); sudo with OPENCHAMBER_ENTERPRISE_MODE=1 env fallback;
  --no-enterprise opt-out
- Inject OpenCode provider policies into the synced config: deny all
  providers, allow those derived from the config's own providers block,
  BASELINE_ALLOWED_PROVIDERS (openai via codex-auth plugin), and
  repeatable --allow-provider extras (e.g. constellation)
- Extend verification: policy file state, pinned relay, effective
  provider allow-list
- Restructure into sourceable functions with a main guard so the policy
  and merge logic is testable
2026-10-06 10:43:46 -06:00
c4ch3c4d3 e74c20c709 openchamber bootstrap: always update @openchamber/web to latest 2026-10-02 10:08:44 -06:00
bzuccaro a334f955ec Add openchamber-boostrap.sh 2026-09-15 15:53:42 -06:00