Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 27 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ concurrency:
cancel-in-progress: ${{ github.event_name != 'push' }}

jobs:
lint:
# Prettier and eslint run un-cached in CI: restored result caches can mark
# files clean against a stale tool version or config, masking real failures.
# The --cache flags in the package.json lint script remain for local speed.
prettier:
runs-on: ubuntu-latest
# TODO(CL-6802 stage 2): flip blocking after the mechanical fix batch
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -33,18 +34,31 @@ jobs:
- name: Install dependencies
run: bun install --frozen-lockfile

- name: Cache lint
- name: Prettier
run: bunx prettier --check .

eslint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.14"

- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
.eslintcache
node_modules/.cache/prettier
key: lint-${{ github.sha }}
restore-keys: |
lint-

- name: Lint
run: bun run lint
path: node_modules
key: bun-${{ hashFiles('bun.lock') }}

- name: Install dependencies
run: bun install --frozen-lockfile

- name: ESLint
run: bunx eslint .

typecheck:
runs-on: ubuntu-latest
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
path-to-document: 'https://github.com/corbitsdev/corbits-code/blob/main/CLA.md'
path-to-signatures: 'signatures/version1/cla.json'
branch: 'cla-signatures'
path-to-document: "https://github.com/corbitsdev/corbits-code/blob/main/CLA.md"
path-to-signatures: "signatures/version1/cla.json"
branch: "cla-signatures"
# People who never need to sign (maintainers, bots).
allowlist: TheGreatAxios,brianjfox,*[bot]
custom-notsigned-prcomment: >-
Thank you for your contribution to Corbits Code. Before it can be merged,
please read our [Contributor License Agreement](https://github.com/corbitsdev/corbits-code/blob/main/CLA.md)
and sign it by posting a new comment on this pull request containing
exactly the line below (nothing else):
custom-pr-sign-comment: 'I have read the CLA Document and I hereby sign the CLA'
custom-allsigned-prcomment: 'All contributors have signed the CLA.'
custom-pr-sign-comment: "I have read the CLA Document and I hereby sign the CLA"
custom-allsigned-prcomment: "All contributors have signed the CLA."
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ vendor/
scratch/
node_modules/
CHANGELOG.md
tests/fixtures/broken-toolchain/
20 changes: 10 additions & 10 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ git config core.hooksPath .githooks
- **Paradigm:** Functional. No classes, no OOP.
- **Types:** Full type safety. Avoid `any`; prefer `unknown`. Validate all external input at the boundary with arktype — do not hand-roll `typeof` guards for structured data.
- **Files:** Small functions, small files, clear names. Acronyms keep their case (`URL`, `JSON`, `API`).
- **Comments:** Comment *why*, never *what*. If a comment describes what the code does, fix the names instead.
- **Comments:** Comment _why_, never _what_. If a comment describes what the code does, fix the names instead.
- **No emojis** in code or docs.

## Scope Discipline
Expand Down Expand Up @@ -73,15 +73,15 @@ It authenticates over HTTPS via `gh`'s credential helper and rewrites the SSH re

Interchange is the standard library for this repo, consumed as published `@intx/*` npm packages pinned at 0.2.2, except `@intx/inference`, `@intx/types`, and `@intx/storage-isogit`, which resolve to vendored source under `vendor/intx-*` at upstream head (coupled by the reactor's approval-suspend primitive; `@intx/inference` also carries a local patch set). See `docs/VENDORING.md` for what's vendored, from which upstream commit, and the re-sync procedure. We never modify or push to the upstream interchange repository. Before writing any new infrastructure — plugins, middleware, utilities, state management, logging, authz, inference, tools — check these packages.

| Package | Covers |
|---|---|
| `@intx/authz` | Grant matching (`matchPattern`, `evaluateGrants`) for permission approvals; Corbits owns the gate, store, and TUI ask |
| `@intx/inference` | Reactor loop, `createAuthzExtension`, `DefaultDirector` |
| `@intx/agent` | Agent lifecycle, send queue, stream |
| `@intx/tools-posix` | Shell, file read/write/edit, grep, search |
| `@intx/storage-isogit` | Git-backed state persistence |
| `@intx/log` | Structured logging via LogTape |
| `@intx/types` | All shared runtime types |
| Package | Covers |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `@intx/authz` | Grant matching (`matchPattern`, `evaluateGrants`) for permission approvals; Corbits owns the gate, store, and TUI ask |
| `@intx/inference` | Reactor loop, `createAuthzExtension`, `DefaultDirector` |
| `@intx/agent` | Agent lifecycle, send queue, stream |
| `@intx/tools-posix` | Shell, file read/write/edit, grep, search |
| `@intx/storage-isogit` | Git-backed state persistence |
| `@intx/log` | Structured logging via LogTape |
| `@intx/types` | All shared runtime types |

## Reference

Expand Down
7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ or release notes from commit types. This project does not:
- Reviewers and `git log` readers need a sentence that stands alone years later,
not a taxonomy debate (`chore` vs `refactor` vs `fix`).
- An imperative subject already encodes the action: `Fix race in the approval
queue` is clearer than `fix: race in the approval queue`.
queue` is clearer than `fix: race in the approval queue`.
- Prefixes train agents and humans to smuggle scope, ticket IDs, and file names
into the subject — noise we already reject elsewhere.

Expand All @@ -93,8 +93,8 @@ Angular-style prefixes is not a reason to adopt them here.

Most commits need **no** body. A clear subject plus a coherent diff is enough.

Add a body only when a future reader of `git log` could not answer *why this
change* from the subject and the diff alone. When present:
Add a body only when a future reader of `git log` could not answer _why this
change_ from the subject and the diff alone. When present:

- Blank line between subject and body
- Wrap body lines at 72 characters
Expand Down Expand Up @@ -187,6 +187,7 @@ Link trackers at the **PR boundary**, not inside every commit.

Full Linear URLs also work. Prefer the body over stuffing the ID into the
PR title so the title stays a plain-English sentence.

3. Do **not** put `CL-…` in commit subjects or bodies.

**Closing magic words** (issue moves to Done on merge when automation is
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ CLI (src/index.ts)
```

The chat director adds context management on top of the reactor:

- **Threshold compaction:** As the context window fills, the conversation is compacted at the next safe point.
- **Idle compaction:** A pending compaction also runs when a turn ends without more work, so a text-only conversation still compacts.
- **Overflow recovery:** A context-overflow error triggers a bounded compact-and-retry instead of failing the turn.
Expand All @@ -94,7 +95,6 @@ Corbits Code defaults to **auto mode** (`auto = true`). Workspace file writes/ed
- Opaque shell wrappers the policy cannot statically inspect (variable expansion or command substitution in a wrapper payload)
- Paths outside the workspace, writes under the session state root, mutating MCP tools, and unknown built-ins


### What auto hard-denies (use the file tools instead)

- File creation or edits via shell: redirects (`>` / `>>`), `tee`, `sed -i` / `perl -i` / similar, interpreter inline programs or heredocs (`python -c`, `node -e`, …)
Expand Down
Loading
Loading