Commit Graph
46 Commits
Author SHA1 Message Date
ZacharyZhang-NYandClaude Fable 5 8a47bce6bd CI: build installers on release publish and attach them to the Gitea release
- .gitea/workflows/release-build.yml: on release published (plus a manual
  back-fill trigger), build the Windows NSIS installer and macOS dmg/zip
  (x64 + arm64) on the self-hosted runners and upload them to the release.
- scripts/ci/upload-release-assets.mjs: attaches release/ artifacts via the
  Gitea API; uploads first, then removes stale same-named assets.
- electron-builder.unsigned.yml: ad-hoc fallback config used while the mac
  runner has no Developer ID identity / notarization credentials.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 00:00:19 -04:00
ZacharyZhang-NY 07d0b4587d Promote AgentCompany-New to the repository root and retire the old app
The legacy application - its src, tests, landing site, promo assets, docs,
release tooling, CI workflows, and root configs - leaves the tree; it stays
reachable in history. Everything under AgentCompany-New moves up unchanged:
same package name, so the production userData/database path is untouched,
and e2e/build scripts already resolved paths relative to the project. The
developer cred.txt stays gitignored at its new location. Full verify:ci
passes from the new root.
2026-07-07 00:04:13 -04:00
ZacharyZhang-NY 83faa9629b fix(security): gate landing dependency audit 2026-05-15 02:12:47 -04:00
ZacharyZhang-NY eb7eb7f27b Skip wrangler R2 calls when S3 credentials are present
Win release host's wrangler OAuth is logged into a different Cloudflare
account than the R2-enabled one, so `wrangler r2 bucket info` returns
"Please enable R2 through the Cloudflare Dashboard" and release-local-winlinux
fails before any upload. The S3 API credentials (R2_ACCESS_KEY_ID /
R2_SECRET_ACCESS_KEY) carry their own account scope and are the path
we already use for every upload and purge, so when they are set we can
short-circuit the wrangler bucket-info/create and dev-url dance entirely.

Also requires R2_PUBLIC_BASE_URL in .env.release.local when S3 mode is
on, since the wrangler-based dev-url fallback is unreachable in that
mode.
2026-04-23 16:03:21 -04:00
ZacharyZhang-NY 17e416d609 update 2026-04-23 15:26:30 -04:00
ZacharyZhang-NY cbef47f1ad Clear repository lint warnings 2026-04-22 20:47:01 -04:00
ZacharyZhang-NY d971ca7929 chore(reference): remove pi mono snapshot 2026-04-22 15:32:43 -04:00
ZacharyZhang-NY f8ed2aa666 fix(landing): derive platform support from release assets 2026-04-22 15:15:10 -04:00
ZacharyZhang-NY eec26a09a3 fix(release): execute d1 migrations without shell 2026-04-22 14:52:54 -04:00
ZacharyZhang-NY dffeccf3e2 update 2026-04-22 13:19:43 -04:00
ZacharyZhang-NY 740d0812ee fix(build): restore package.json if electron-builder leaves it mutated
electron-builder's `extraMetadata` feature mutates the source
package.json in place during packaging and restores it on clean
exit. When the builder is killed mid-flight (parent task timeout,
Ctrl-C, OOM) the restore never fires and the source tree is left
with a stripped scripts block — every subsequent pnpm command
then fails with "Missing script" until someone notices the drift
and runs `git checkout`. Observed once in this session when a
`build:dir` task was cancelled mid-packaging.

Wrap the builder invocation in a bytes-level snapshot + idempotent
restore, driven by both normal-exit and SIGINT/SIGTERM/SIGHUP
handlers. On a clean run the builder's own restore wrote the
original bytes back, our final compare is byte-equal, and the
restore is a no-op. On an abnormal termination the snapshot
overwrites whatever electron-builder left behind so the working
tree is guaranteed clean regardless of exit path.

The snapshot approach is intentional over a "reject if tree dirty
before build" guard: this is a recovery mechanism, not a
precondition, and the repo's own `package.json` is the truth —
anything else in there at the moment the builder took its snapshot
is the desired state.
2026-04-21 01:29:50 -04:00
ZacharyZhang-NY f60ba5fa29 refactor(release): drop dead boss snapshot members
`scripts/release-boss.mjs` listed five files under
`bossSnapshotIncludes`. Only `build-boss-edition.mjs` is live —
invoked by both `release-boss.mjs:178` (local mac) and
`.github/workflows/remote-boss-platforms.yml:44` (remote Win).

The other four were leftovers from a previous packaging iteration:

  - `build-boss-mac.mjs` — old mac patcher keyed on `CompanyOnboarding`
    capital-case paths that no longer exist after the company-onboarding
    rename.
  - `build-boss.mjs` — earlier "full edition" builder referencing
    ProvidersStepShared.tsx / AgentCreator.tsx, both deleted by the
    pi-mono catalog rewrite.
  - `build-boss.sh` — thin wrapper that only called
    `build-boss-mac.mjs`.
  - `build-boss-desktop.mjs` — shipped to every snapshot branch but
    never invoked anywhere.

Carrying dead code in the snapshot manifest makes each Boss release
rsync ~1 k LOC of patches that can never run and, more subtly,
tempts a future reader to keep them in sync with the live source.
Removing them here and deleting the files themselves (they live in
gitignored `boss-build/`, not in tree) leaves exactly one live
builder and one snapshot member per real purpose.

No functional change to the live release path. Local verified: both
`pnpm build:dir` (normal AgentCompany.app) and
`node boss-build/build-boss-edition.mjs --platform=mac --version=0.4.167`
(Boss arm64 + x64 DMG + zip + blockmap) produce complete artifacts
with a clean source tree afterwards.
2026-04-21 01:07:46 -04:00
ZacharyZhang-NY 28cdf7c56f Rewrite resolveWorkspace to per-task lockMode inference; drop company_fallback silent share (B4-adjacent)
Old resolver: task → agent → project → any company workspace, all
marked exclusive. That fourth step folded every runnable agent in a
multi-agent company onto a single workspace row and serialised the
C-suite (four agents, one exclusive lock, three starved).

New resolver: lockMode='exclusive' is now an opt-in decision inferred
per task. Three rules:

  1. task.workspaceId set → exclusive on that workspace (explicit).
  2. filesystem signal (task.requiresFilesystem OR agent in a
     coding role/engineering department) → exclusive on
     agent.workspaceId / project primary; throws if neither exists.
  3. otherwise → none / null. Pure cognitive work runs with no
     workspace lock and fully in parallel.

Removed:
  - company_fallback silent-share path. Filesystem-touching runs
    with no legitimate binding now throw WorkspaceConfigurationError
    at resolve time so the caller decides recovery rather than the
    resolver picking a random shared workspace.
  - workspacesMod.getAnyCompanyWorkspace (now dead code).

Invariants now enforced by types:
  - lockMode='exclusive' ⇒ workspace is a live WorkspaceRecord.
  - lockMode='none'      ⇒ workspace is null.

Tests updated to cover the new decision table and the four-non-
coding-agents parallel case that was the original bug.
2026-04-20 15:32:01 -04:00
ZacharyZhang-NY ded707d960 Document C1 codemod recipe + C6 wave boundaries + N-scan TODO deadlines (T2 iteration)
Address T2 review asks from Karpathy (request_changes) + Jobs
(approve with minor asks) without touching published commits:

- scripts/codemod/README.md (new): records remove-appdatabase-passthrough.mjs
  usage, the completeness proof for METHOD_TO_MODULE (typecheck-clean +
  524 tests green at 118e3d8 = no orphaned call sites), and the sequential
  revert recipe for C1 (3 -> 2 -> 1, not independent because 118e3d8
  bundled vault simplification).

- CONTRIBUTING.md (new): pass-through ban + codemod usage + sequential
  revert recipe + file-size ceiling + C6 wave cap. Whitelisted in
  .gitignore alongside the existing doc exceptions.

- docs/proposals/C6.2-error-taxonomy-phase2.md: wave 2 scope boundary
  names renderer-adjacent / api-server / browser / automation / skills
  explicitly and excludes src/main/database/** + src/main/worker/runtime/**
  (B2 / M10 high-churn zones). Wave 2 and wave 3 each capped at 30
  catch sites so C6 cannot expand without bound.

- src/main/agent-runtime/artifact-projector.ts, runtime-bridge.ts:
  N-scan TODOs now carry a death date ("TODO(M-followup by 2026-05-20)").
  If the date passes without decomposition, a follow-up session MUST
  revisit or justify the exception.

Karpathy T2 asks #1 and #2 (split part 3 / "independent revert" language)
are addressed in CONTRIBUTING + codemod README as documentation, not
history rewrites, because 118e3d8 is already published.

Typecheck clean. No structural code changes; pure docs + comment edits.
2026-04-20 13:48:25 -04:00
ZacharyZhang-NY 118e3d8795 Remove final AppDatabase pass-through methods with ESLint guard (C1 part 3/3)
Migrate all remaining pass-through call sites (social, skills, budget,
entityCrud, documents, knowledge, automation, wakeup, backup, threads,
settings, snapshot, connectors, workspaces, activity) to their owning
domain modules. `AppDatabase` now carries only three methods:

  - createHireRequest (multi-module composite: agents + approvalsMod)
  - rollbackConfigRevision (multi-module composite: documents + entityCrud)
  - queryAll (raw-SQL escape hatch, @internal)

The vault/env-binding infrastructure previously passed argument-by-
argument into `entityCrud.saveSecret`/`resolveSecretEnv` now binds at
module construction, letting callers invoke `db.entityCrud.saveSecret({...})`
without carrying vault plumbing.

Structural types that narrowed AppDatabase to a bag of flat methods
(`ConnectorModelPolicyDeps` callers, `CapabilityMatchDb`, test mocks in
budget-enforcement / budget-incidents / task-quality-gates /
failure-escalation / task-quality-gates-sweep) are reshaped to the new
namespace. `connectorPolicyDepsFromDb` replaces the old pattern of
handing the whole AppDatabase to `validateConnectorModelSelection`.

A new ESLint rule in eslint.config.mjs blocks new top-level methods on
AppDatabase so the pass-through layer cannot silently grow back.
`AppDatabase.ts` dropped from 193 lines to 58; `AppDatabaseBase` lost
the 270-line trailing pass-through block.
2026-04-20 13:31:39 -04:00
ZacharyZhang-NY 5e9b7acbc6 Codemod db pass-through calls to domain modules: tasks + agents (C1 part 1/3)
Rewrite ~525 call sites from `db.<method>()` to `db.<module>.<method>()`
for tasks and agents domains (including `getAgent`/`findAgent`/`getTask`
which live on the `entityCrud` field). Delete the corresponding
pass-through methods on AppDatabaseBase. Structural types that narrowed
`db` to a bag of flat methods (CapabilityMatchDb, EscalationDeps,
SweepStaleReviewsDeps) are reshaped to match the new namespace. Internal
callback references inside database.ts/database-base.ts now invoke the
owning module directly (e.g. `this.agents.saveAgent`) rather than the
deleted pass-through.

The codemod lives at scripts/codemod/remove-appdatabase-passthrough.mjs
and filters by owning module + optional explicit method list. It is
idempotent and does not re-rewrite already-namespaced calls.
2026-04-20 13:17:01 -04:00
ZacharyZhang-NY 0db6e4261f Migrate top-20 high-frequency catch sites to AppError taxonomy (C6.1 part 2/2)
Each of these catches already logged via an accessible `logger` or `log`.
The migration wraps the thrown value through `classifyUnknownError(raw,
fallback)` and emits the log line with the structured `[code]` prefix.
Observable behaviour — return values, fail strings, DB writes — is
unchanged; the only addition is a machine-readable `code` on every log
line so future telemetry can bucket by category.

Sites migrated (11 files, 20 catch sites):

  src/main/browser-action-service.ts             (2) approval lookup, payload JSON
  src/main/ipc-credentials-handlers.ts           (4) save, remove, test lookup, test resolve
  src/main/hire-hook.ts                          (3) getAgent, connector def, outer exception
  src/main/checkpoint-engine.ts                  (2) onTaskStarted, onDocumentDrafted
  src/main/document-lifecycle.ts                 (1) getRun while deriving taskId
  src/main/skills/runtime.ts                     (2) builtin statSync, builtin readdir
  src/main/worker/handlers/run-status-handler.ts (1) run not found during status
  src/main/worker/handlers/run-log-handler.ts    (1) lease renewal lookup
  src/main/notification-service.ts               (1) notification.close during destroy
  src/main/updater-service.ts                    (1) autoUpdater.checkForUpdates
  src/main/ipc-support.ts                        (2) ipc handler throw, emitEvent send

Why only 20 tonight: 248 catches exist in src/main/. Rewriting them all
in one commit is high-diff-risk (collides with Linus's in-flight
database/backup/migration work on database/*, connector-definitions-*,
message-* and scripts/*) and low-value (pure-library catches with no
accessible logger produce dead `void classified` constructs). The
taxonomy module is committed separately so the remaining 228 sites can
land incrementally via the C6.2 proposal.

All 11 files selected sit outside Linus's working set. Verified:
  - pnpm typecheck   clean
  - pnpm test:unit   498 passed
2026-04-20 12:22:52 -04:00
ZacharyZhang-NY 5547c29491 update 2026-04-17 14:03:56 -04:00
ZacharyZhang-NY 527a730bec refactor(build-desktop): split 397-line script into env/config/runner modules (P1-15) 2026-04-16 23:00:54 -04:00
ZacharyZhang-NY a0be5beeb5 fix(execution-policy): runtime-assert execution mode from DB instead of cast 2026-04-16 23:00:43 -04:00
ZacharyZhang-NY 32687033fc build(mac-sign): remove codesign retry loop, let it crash (P3-29) 2026-04-16 22:55:35 -04:00
ZacharyZhang-NY c93b28925b build(postinstall): fail loud when electron name patch errors (P3-28) 2026-04-16 22:55:32 -04:00
ZacharyZhang-NY 08968e8331 build(generate-icons): exit with clear error on non-darwin (P3-27) 2026-04-16 22:55:30 -04:00
ZacharyZhang-NY a2ceba5c33 build(scripts): inline vitest invocation and remove run-vitest wrapper (P3-25) 2026-04-16 22:55:16 -04:00
ZacharyZhang-NY 1f660e79b8 build(release-local): derive docker volume name from rootDir hash (P2-22) 2026-04-16 22:55:00 -04:00
ZacharyZhang-NY d154b45741 build(build-desktop): remove EBUSY cleanup retry loop, let it crash (P2-21) 2026-04-16 22:54:57 -04:00
ZacharyZhang-NY ed2f467e4e build(scripts): rename build:all to build:current to match semantics (P2-20) 2026-04-16 22:54:54 -04:00
ZacharyZhang-NY 40a1e5af07 chore(scripts): remove dead seed-research-team.ts (P1-14) 2026-04-16 22:51:59 -04:00
ZacharyZhang-NY 796665ceec refactor(release-local): rename hasDocker to hasDockerInstalled (P1-12) 2026-04-16 22:51:56 -04:00
ZacharyZhang-NY 555d8e59eb chore(release): remove release-cloudflare.mjs wrapper, replace with package.json chain 2026-04-16 22:29:09 -04:00
ZacharyZhang-NY f723d3cc80 refactor(release): use shared lib in release-local + landing-release-links 2026-04-16 22:28:43 -04:00
ZacharyZhang-NY e54aea5942 refactor(release): use shared lib in release-boss + load env at startup
Boss script previously did not source .env.release / .env.release.local,
which silently dropped any release-only environment variables that the
remote workflow dispatch and asset download paths may rely on. Match
release-public-cloudflare's behavior by calling loadEnvFile for both
files before any gh / wrangler invocation.
2026-04-16 22:28:15 -04:00
ZacharyZhang-NY 12027562e3 refactor(release): use shared lib in release-public-cloudflare 2026-04-16 22:27:24 -04:00
ZacharyZhang-NY d2078446b4 refactor(release): extract dotenv/snapshot/workflow shared lib 2026-04-16 22:26:11 -04:00
ZacharyZhang-NY 49df7e528e fix(release): exit after printing --help in release-cloudflare wrapper 2026-04-16 21:36:46 -04:00
ZacharyZhang-NY 72157f0703 update 2026-04-05 23:47:56 -04:00
ZacharyZhang-NY b8dda3c8d0 update 2026-04-04 17:01:26 -04:00
ZacharyZhang-NY 67c757f481 update 2026-04-04 12:03:50 -04:00
ZacharyZhang-NYandClaude Opus 4.6 eda0e26adb feat: rebrand to website design, Apple HIG icons, ASCII onboarding animation
Build & Release / Lint & Typecheck (push) Successful in 38s
Build & Release / Unit Tests (push) Successful in 31s
Build & Release / Windows (arm64) (push) Failing after 11s
Build & Release / Windows (x64) (push) Failing after 27s
Build & Release / Linux (arm64) (push) Canceled after 0s
Build & Release / Linux (x64) (push) Canceled after 0s
Build & Release / Publish Release (push) Canceled after 0s
Build & Release / macOS (arm64) (push) Canceled after 0s
Build & Release / macOS (x64) (push) Canceled after 0s
- Align Electron CSS with website design schema (Inter font, #FBFAF5/#191919
  palette, #213448/#94B4C1 accent)
- Generate proper app icons from logo.svg via cairosvg (no more Pillow ladder)
- Square bg icons for Electron/tray (Apple HIG — OS applies squircle mask)
- Circle bg icons for website favicon only
- Add scrolling ASCII agent-activity animation to onboarding hero left panel
- Remove dock.setIcon() — let macOS use bundle .icns with system mask
- Fix goal title overflow with min-w-0 for flex truncation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:39:28 -04:00
ZacharyZhang-NYandClaude Opus 4.6 273244817a feat: rebrand icons — #191919 circle bg, #FBFAF5 logo
Build & Release / Lint & Typecheck (push) Successful in 36s
Build & Release / Unit Tests (push) Successful in 34s
Build & Release / Windows (x64) (push) Failing after 34s
Build & Release / Windows (arm64) (push) Failing after 34s
Build & Release / macOS (x64) (push) Canceled after 0s
Build & Release / macOS (arm64) (push) Canceled after 0s
Build & Release / Linux (arm64) (push) Canceled after 50s
Build & Release / Linux (x64) (push) Canceled after 0s
Build & Release / Publish Release (push) Canceled after 0s
Replace all orange/red icon assets with new brand colors:
- Circle background #191919, logo mark #FBFAF5
- Regenerated: icon.png, icon.ico, icon.icns, all tray icons
- Updated generate-icons.py with new palette and circle shape
- Added source logo.svg
- Bump version to 0.4.92

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 14:24:20 -04:00
ZacharyZhang-NY 0f9042673f feat(04-03): add cross-platform build script and build:all npm script
- Create scripts/build-all-platforms.mjs that detects current platform, invokes electron-builder via build-desktop.mjs, verifies artifacts in build/release/, and reports remaining platforms
- Add "build:all" script entry to package.json for D-07 cross-platform build validation
2026-03-22 16:49:28 -04:00
ZacharyZhang-NY f482f25856 update 2026-03-19 16:29:22 -04:00
ZacharyZhang-NY 0cd65521b8 update 2026-03-18 14:42:14 -04:00
ZacharyZhang-NY 1ba3147ed2 update 2026-03-18 01:15:58 -04:00
ZacharyZhang-NY 7a3db27ffa update 2026-03-17 12:31:06 -04:00
ZacharyZhang-NY 2af82b6bb3 Initialize project and ignore local references 2026-03-15 22:17:07 -04:00