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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/skills/nemoclaw-maintainer-day/RISKY-AREAS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PRs touching these areas need tests before approval.
| Area | Key paths |
|------|-----------|
| Installer / bootstrap shell | `install.sh`, `setup.sh`, `brev-setup.sh`, `scripts/*.sh` |
| Onboarding / host glue | `bin/lib/onboard.js`, `bin/*.js` |
| Onboarding / host glue | `src/lib/onboard.ts`, `bin/nemoclaw.js`, `scripts/*.sh` |
| Sandbox / policy / SSRF | `nemoclaw/src/blueprint/`, `nemoclaw-blueprint/`, policy presets |
| Workflow / enforcement | `.github/workflows/`, prek hooks, DCO, signing, version/tag flows |
| Credentials / inference / network | credential helpers, inference provider routing, approval flows |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/legacy-path-guard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
guard-migrated-paths:
name: block edits to migrated legacy paths
name: block edits to migrated legacy paths and removed shims
if: ${{ github.base_ref == 'main' && !startsWith(github.head_ref, 'ts-migration/') }}
runs-on: ubuntu-latest

Expand Down
14 changes: 7 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ This repo ships agent skills under `.agents/skills/`, organized into three audie

| Path | Language | Purpose |
|------|----------|---------|
| `bin/` | JavaScript (CJS) | CLI entry point (`nemoclaw.js`) and library modules |
| `bin/lib/` | JavaScript (CJS) | Core CLI logic: onboard, credentials, inference, policies, preflight, runner |
| `bin/` | JavaScript (CJS) | CLI launcher (`nemoclaw.js`) and small compatibility helpers |
| `src/lib/` | TypeScript | Core CLI logic: onboard, credentials, inference, policies, preflight, runner |
| `nemoclaw/` | TypeScript | Plugin project (Commander CLI extension for OpenClaw) |
| `nemoclaw/src/blueprint/` | TypeScript | Runner, snapshot, SSRF validation, state management |
| `nemoclaw/src/commands/` | TypeScript | Slash commands, migration state |
Expand Down Expand Up @@ -47,12 +47,12 @@ This repo ships agent skills under `.agents/skills/`, organized into three audie

### Dual-Language Stack

- **CLI and plugin**: JavaScript (CJS in `bin/`, ESM in `test/`) and TypeScript (`nemoclaw/src/`)
- **CLI and plugin**: TypeScript (`src/`, `nemoclaw/src/`) with a small CommonJS launcher in `bin/`; ESM in `test/`
- **Blueprint**: YAML configuration (`nemoclaw-blueprint/`)
- **Docs**: Sphinx/MyST Markdown
- **Tooling scripts**: Bash and Python

The `bin/` directory uses CommonJS intentionally — it's the CLI entry point that must work without a build step. The `nemoclaw/` plugin uses TypeScript and requires compilation.
The `bin/` directory uses CommonJS intentionally for the launcher and a few compatibility helpers so the CLI still has a stable executable entry point. The main CLI implementation lives in `src/` and compiles to `dist/`. The `nemoclaw/` plugin uses TypeScript and requires compilation.

### Testing Strategy

Expand Down Expand Up @@ -105,7 +105,7 @@ For shell scripts use `#` comments. For Markdown use HTML comments.

### JavaScript

- `bin/` and `scripts/`: **CommonJS** (`require`/`module.exports`), Node.js 22.16+
- `bin/` launcher and remaining `scripts/*.js`: **CommonJS** (`require`/`module.exports`), Node.js 22.16+
- `test/`: **ESM** (`import`/`export`)
- ESLint config in `eslint.config.mjs`
- Cyclomatic complexity limit: 20 (ratcheting down to 15)
Expand Down Expand Up @@ -149,8 +149,8 @@ All hooks managed by [prek](https://prek.j178.dev/) (installed via `npm install`

**Adding a CLI command:**

- Entry point: `bin/nemoclaw.js` (routes to `bin/lib/` modules)
- Keep `bin/lib/` modules as CommonJS
- Entry point: `bin/nemoclaw.js` (launches the compiled CLI in `dist/`)
- Main CLI implementation lives in `src/lib/` and compiles to `dist/lib/`
- Add tests in `test/`

**Adding a plugin feature:**
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ The repository is organized as follows.

All new source files must be TypeScript. Do not add new `.js` files to the project. When modifying an existing JavaScript file, prefer migrating it to TypeScript in the same PR.

Existing JavaScript in `bin/` and `scripts/` is being incrementally migrated (see `src/lib/` for completed migrations). Tests in `test/` may remain ESM JavaScript for now but new test files should use TypeScript where practical.
Only a small CommonJS launcher/compatibility layer remains in `bin/`, while the main CLI implementation now lives in `src/lib/` and compiles to `dist/`. Tests in `test/` may remain ESM JavaScript for now but new test files should use TypeScript where practical.

Shell scripts (`scripts/*.sh`) must pass ShellCheck and use `shfmt` formatting.

Expand Down
7 changes: 0 additions & 7 deletions bin/lib/chat-filter.js

This file was deleted.

7 changes: 0 additions & 7 deletions bin/lib/config-io.js

This file was deleted.

4 changes: 0 additions & 4 deletions bin/lib/debug.js

This file was deleted.

7 changes: 0 additions & 7 deletions bin/lib/inference-config.js

This file was deleted.

7 changes: 0 additions & 7 deletions bin/lib/local-inference.js

This file was deleted.

7 changes: 0 additions & 7 deletions bin/lib/nim.js

This file was deleted.

7 changes: 0 additions & 7 deletions bin/lib/onboard-session.js

This file was deleted.

65 changes: 0 additions & 65 deletions bin/lib/onboard.js

This file was deleted.

4 changes: 0 additions & 4 deletions bin/lib/platform.js

This file was deleted.

18 changes: 0 additions & 18 deletions bin/lib/policies.js

This file was deleted.

7 changes: 0 additions & 7 deletions bin/lib/preflight.js

This file was deleted.

7 changes: 0 additions & 7 deletions bin/lib/registry.js

This file was deleted.

7 changes: 0 additions & 7 deletions bin/lib/resolve-openshell.js

This file was deleted.

16 changes: 0 additions & 16 deletions bin/lib/runner.js

This file was deleted.

7 changes: 0 additions & 7 deletions bin/lib/runtime-recovery.js

This file was deleted.

4 changes: 0 additions & 4 deletions bin/lib/sandbox-build-context.js

This file was deleted.

5 changes: 0 additions & 5 deletions bin/lib/services.js

This file was deleted.

7 changes: 0 additions & 7 deletions bin/lib/version.js

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
],
"files": [
"bin/",
"dist/",
"nemoclaw/dist/",
"nemoclaw/openclaw.plugin.json",
"nemoclaw/package.json",
Expand Down
2 changes: 1 addition & 1 deletion scripts/benchmark-sandbox-image-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const {
collectBuildContextStats,
stageLegacySandboxBuildContext,
stageOptimizedSandboxBuildContext,
} = require("../bin/lib/sandbox-build-context");
} = require("../dist/lib/sandbox-build-context");

function parseArgs(argv) {
const args = {
Expand Down
Loading
Loading