Skip to content

Commit 03e4a4f

Browse files
SafetyMPSage Hart
andauthored
feat(console): cool slate ops chrome and company-day demo (#40)
* feat(console): cool slate ops chrome and company-day demo timeline Ship restrained teal slate console, ordered agent activity timeline with stage-reveal, Contracts panel, and multi-frame demo.gif under ADR-05. * chore(supply-chain): enforce allowScripts and harden verify installs (#41) Bump to npm 11.17 so strict-allow-scripts is real, pin hono node-server, stop default node_modules wipes that raced npm ci, and gate pending install scripts in verify. Co-authored-by: Sage Hart <sagehart@MacBookAir.attlocal.net> * fix(ci): use corepack npm and portable grep in verify setup-node leaves npm 10 on PATH so bare npm -v failed the >=11 gate. Invoke the packageManager pin via corepack npm, and replace rg with grep for GitHub-hosted runners. --------- Co-authored-by: Sage Hart <sagehart@MacBookAir.attlocal.net>
1 parent f337bb1 commit 03e4a4f

27 files changed

Lines changed: 634 additions & 75 deletions

.corp-harness/site.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"schema": "corporate-site-site/v1",
33
"site_id": "corpos",
44
"corporate_program": "corpos-autonomous-company",
5-
"corporate_handoff_sha256": "c0bb90e70fdfe705192e435869c30ab401339ec6b47c0576be34d7f48bae1975",
5+
"corporate_handoff_sha256": "0953f106918b8ffe1a61e30f3a69afbd0498bd44df695ff6b3c15c4b6915af68",
66
"verify_argv": ["./scripts/harness/verify.sh"],
77
"adversarial_argv": ["./scripts/harness/adversarial.sh"]
88
}

.cursor/hooks/verify-on-stop.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
1111
from _common import read_input, emit, log_event, resolve_workspace_root # noqa: E402
1212

13-
TIMEOUT = 120
13+
# Full clean+ci verify can exceed 2m; default verify reuses node_modules.
14+
TIMEOUT = 300
1415
VERIFY_SCRIPT = "scripts/verify.sh"
1516

1617

.github/workflows/ci.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ jobs:
2626
- name: Activate packageManager npm
2727
run: |
2828
corepack enable
29-
corepack prepare npm@10.9.2 --activate
29+
corepack prepare npm@11.17.0 --activate
30+
# setup-node's npm 10 stays on PATH; assert the pin via corepack npm.
31+
test "$(corepack npm -v | cut -d. -f1)" -ge 11
3032
- name: Site verify (build, typecheck, test, lint, format)
31-
run: ./scripts/harness/verify.sh
33+
run: CORPOS_VERIFY_CLEAN=1 ./scripts/harness/verify.sh
3234

3335
adversarial:
3436
runs-on: ubuntu-latest
@@ -43,8 +45,9 @@ jobs:
4345
- name: Activate packageManager npm
4446
run: |
4547
corepack enable
46-
corepack prepare npm@10.9.2 --activate
47-
- run: npm ci
48-
- run: npm run build
48+
corepack prepare npm@11.17.0 --activate
49+
test "$(corepack npm -v | cut -d. -f1)" -ge 11
50+
- run: corepack npm ci --include=dev
51+
- run: corepack npm run build
4952
- name: Site adversarial
5053
run: ./scripts/harness/adversarial.sh

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Fail install if a dependency has install scripts not covered by package.json allowScripts.
2+
# Approvals are pinned in package.json "allowScripts" (esbuild + fsevents only).
3+
strict-allow-scripts=true

CONTRIBUTING.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ Please also follow the [Code of Conduct](CODE_OF_CONDUCT.md).
2121
## Prerequisites
2222

2323
- **Node.js ≥ 22** (see [`.nvmrc`](.nvmrc); CI covers 22 and 24).
24-
- npm **10.9.2** via Corepack (`packageManager` in [`package.json`](package.json)).
24+
- npm **11.17.0** via Corepack (`packageManager` in [`package.json`](package.json)).
25+
Required for enforceable `allowScripts` / `strict-allow-scripts`.
2526

2627
## Setup
2728

2829
```bash
29-
npm install
30+
npm ci --include=dev
3031
npm run build
31-
./scripts/harness/verify.sh # typecheck · test · lint · format:check · stack guards
32+
./scripts/harness/verify.sh # build · typecheck · test · lint · format · stack guards
33+
# Force a clean reinstall (CI does this): CORPOS_VERIFY_CLEAN=1 ./scripts/harness/verify.sh
3234
```
3335

3436
A contribution is not finished until `./scripts/harness/verify.sh` is green

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ COPY packages ./packages
55
COPY apps ./apps
66
COPY scripts ./scripts
77
COPY tsconfig*.json vitest.config.ts eslint.config.mjs ./
8-
RUN corepack enable && corepack prepare npm@10.9.2 --activate \
9-
&& npm ci && npm run build
8+
RUN corepack enable && corepack prepare npm@11.17.0 --activate \
9+
&& npm ci --include=dev && npm run build
1010
ENV PORT=3000
1111
EXPOSE 3000
1212
CMD ["npm", "run", "start"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Read the thesis: [`docs/future-of-the-firm.md`](docs/future-of-the-firm.md).
2121
## Demo
2222

2323
<p align="center">
24-
<img src="docs/assets/demo.gif" alt="CorpOS ops console — capital and trust, company day result, and Governor audit controls (synthetic demo data)" width="900" />
24+
<img src="docs/assets/demo.gif" alt="CorpOS ops console — agents hand off a company day (support → finance → ops), trust unlock, and Governor (synthetic demo data)" width="900" />
2525
</p>
2626

2727
### Screenshots
@@ -33,7 +33,7 @@ Read the thesis: [`docs/future-of-the-firm.md`](docs/future-of-the-firm.md).
3333
- **Local demo:** `npm install && npm run build && npm run dev`[http://localhost:3000](http://localhost:3000)
3434
- **Regenerate GIF/PNGs:** start the console, then `npm run screenshots` — see [`docs/assets/README.md`](docs/assets/README.md)
3535

36-
Click **Run company day** for the multi-handoff demo (support → finance → ops), including an autonomous settle, an exception approval path, compensation, and trust unlock.
36+
Click **Run company day** to watch the agent activity timeline: support → finance → ops handoffs, an autonomous settle, an exception approval path, compensation, and trust unlock.
3737

3838
---
3939

SECURITY.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,22 @@ Treat it as a design artifact you can run locally.
2222

2323
When `CORPOS_MODE=shared`, `DASHBOARD_API_TOKEN` is required for approval and kill mutations.
2424

25+
## Dependency / supply-chain hygiene
26+
27+
- Install from the committed `package-lock.json` via `npm ci --include=dev`.
28+
- `packageManager` is **npm@11.17.0** (Corepack). npm 10 cannot enforce `allowScripts`.
29+
- Registry must remain `https://registry.npmjs.org/` — no project `.npmrc` registry override.
30+
- Install scripts are **opt-in and enforced**: `package.json` `allowScripts` pins only
31+
`esbuild` / `fsevents` versions in the lockfile; `.npmrc` sets `strict-allow-scripts=true`.
32+
`./scripts/harness/verify.sh` fails if `npm approve-scripts --allow-scripts-pending` reports gaps.
33+
- Verify does **not** wipe `node_modules` by default (avoids concurrent `ENOTEMPTY` races).
34+
CI sets `CORPOS_VERIFY_CLEAN=1` for a full reinstall. Never fetch npm via `npx` inside verify.
35+
- `@hono/node-server` is pinned to `2.0.11` via root dependency + `overrides` (covers API
36+
`serveStatic` and `@modelcontextprotocol/sdk`).
37+
- Review Dependabot PRs before merge; re-run `npm approve-scripts --allow-scripts-pending`
38+
after lockfile changes that introduce new install scripts.
39+
- Do **not** set `dangerously-allow-all-scripts=true` in CI.
40+
2541
## Reporting
2642

2743
Use GitHub Security Advisories on the CorpOS repository.

apps/api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"dependencies": {
1414
"@corpos/core": "0.2.0",
15-
"@hono/node-server": "^1.14.4",
15+
"@hono/node-server": "^2.0.11",
1616
"drizzle-orm": "^0.45.2",
1717
"hono": "^4.12.32"
1818
},

apps/console/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>CorpOS Ops Console</title>
7+
<link rel="preconnect" href="https://fonts.googleapis.com" />
8+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
9+
<link
10+
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;600&family=IBM+Plex+Serif:wght@500&display=swap"
11+
rel="stylesheet"
12+
/>
713
</head>
814
<body>
915
<div id="app"></div>

0 commit comments

Comments
 (0)