refactor: rename packages to @paperclipai and CLI binary to paperclipai

Rename all workspace packages from @paperclip/* to @paperclipai/* and
the CLI binary from `paperclip` to `paperclipai` in preparation for
npm publishing. Bump CLI version to 0.1.0 and add package metadata
(description, keywords, license, repository, files). Update all
imports, documentation, user-facing messages, and tests accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dotta
2026-03-03 08:45:26 -06:00
parent 5a5549fc54
commit f60c1001ec
196 changed files with 501 additions and 490 deletions

View File

@@ -203,7 +203,7 @@ On approval, the approver sets:
| **P1** | Invite link + onboarding endpoint | `POST /api/companies/:id/invites`, `GET /api/invite/:token`, `POST /api/invite/:token/register`. |
| **P1** | Approval flow | UI + API for reviewing and approving pending agent registrations. |
| **P2** | OpenClaw integration | First real external agent onboarding via invite link. |
| **P3** | CLI auth flow | `paperclip auth login` for developer-managed remote agents. |
| **P3** | CLI auth flow | `paperclipai auth login` for developer-managed remote agents. |
## P0 Implementation Plan

View File

@@ -76,7 +76,7 @@ This is one authenticated mode with two safety policies, not two different auth
Default command remains:
```sh
pnpm paperclip onboard
pnpm paperclipai onboard
```
Interactive server step:
@@ -97,7 +97,7 @@ Flags are optional power-user overrides, not required for normal setup.
Default command remains interactive:
```sh
pnpm paperclip configure --section server
pnpm paperclipai configure --section server
```
Same mode/exposure questions and defaults as onboarding.
@@ -107,7 +107,7 @@ Same mode/exposure questions and defaults as onboarding.
Default command remains flagless:
```sh
pnpm paperclip doctor
pnpm paperclipai doctor
```
Doctor reads configured mode/exposure and applies relevant checks.
@@ -209,9 +209,9 @@ This change is a clean cut:
## Acceptance Criteria
1. `pnpm paperclip onboard` is interactive-first and defaults to `local_trusted`.
1. `pnpm paperclipai onboard` is interactive-first and defaults to `local_trusted`.
2. authenticated mode is one runtime mode with `private/public` exposure guidance.
3. `pnpm paperclip doctor` works flagless with mode-aware checks.
3. `pnpm paperclipai doctor` works flagless with mode-aware checks.
4. no extra compatibility aliases for dropped naming variants.
5. Board identity is represented by real DB user/role/membership integration points, enabling consistent task assignment and permission behavior.

View File

@@ -104,7 +104,7 @@ Modules live in a top-level `modules/` directory. Each module is a pnpm workspac
Key fields:
- **`id`**: Unique identifier, used as the npm package name suffix (`@paperclip/mod-observability`)
- **`id`**: Unique identifier, used as the npm package name suffix (`@paperclipai/mod-observability`)
- **`slot`**: Optional exclusive category. If set, only one module with this slot can be active. Omit for modules that can coexist freely.
- **`hooks`**: Which core events this module subscribes to. Declared upfront so the core knows what to emit.
- **`routes.prefix`**: Mounted under `/api/modules/<prefix>`. The module owns this namespace.
@@ -118,7 +118,7 @@ Key fields:
The module's `src/index.ts` exports a `register` function that receives the module API:
```typescript
import type { ModuleAPI } from "@paperclip/core";
import type { ModuleAPI } from "@paperclipai/core";
import { createRouter } from "./routes.js";
import { onHeartbeat, onBudgetThreshold } from "./hooks.js";
@@ -236,7 +236,7 @@ This keeps the core fast and resilient. If you need pre-commit validation (e.g.,
```typescript
// modules/observability/src/hooks.ts
import type { Db } from "@paperclip/db";
import type { Db } from "@paperclipai/db";
import { tokenMetrics } from "./schema.js";
export function createHeartbeatHandler(db: Db) {
@@ -382,7 +382,7 @@ export const modulePages = [
{
path: "/observability",
label: "Observability",
component: lazy(() => import("@paperclip/mod-observability/ui")),
component: lazy(() => import("@paperclipai/mod-observability/ui")),
},
];
@@ -391,7 +391,7 @@ export const dashboardWidgets = [
id: "token-burn-rate",
label: "Token Burn Rate",
placement: "dashboard",
component: lazy(() => import("@paperclip/mod-observability/ui").then(m => ({ default: m.TokenBurnRateWidget }))),
component: lazy(() => import("@paperclipai/mod-observability/ui").then(m => ({ default: m.TokenBurnRateWidget }))),
},
];
```
@@ -587,10 +587,10 @@ The Company Store is a registry for discovering and installing modules and templ
### CLI Commands
```bash
pnpm paperclip store list # browse available modules and templates
pnpm paperclip store install <module-id> # install a module
pnpm paperclip store import <template-id> # import a company template
pnpm paperclip store export # export current company as template
pnpm paperclipai store list # browse available modules and templates
pnpm paperclipai store install <module-id> # install a module
pnpm paperclipai store import <template-id> # import a company template
pnpm paperclipai store export # export current company as template
```
---
@@ -627,7 +627,7 @@ pnpm paperclip store export # export current company as templat
### Phase 1: Core infrastructure
Add to `@paperclip/server`:
Add to `@paperclipai/server`:
1. **HookBus** — Event emitter with `register()` and `emit()`, using `Promise.allSettled`
2. **Module loader** — Scans `modules/`, validates manifests, calls `register(api)`
@@ -636,7 +636,7 @@ Add to `@paperclip/server`:
5. **Module migration runner** — Extends `db:migrate` to discover and run module migrations
6. **Emit hooks from core services** — Add `hookBus.emit()` calls to existing CRUD operations
Add to `@paperclip/ui`:
Add to `@paperclipai/ui`:
7. **Module page loader** — Reads module manifests, generates lazy routes
8. **Dashboard widget slots** — Render module-contributed widgets on the Dashboard page
@@ -644,7 +644,7 @@ Add to `@paperclip/ui`:
Add new package:
10. **`@paperclip/module-sdk`** — TypeScript types for `ModuleAPI`, `HookEvent`, `HookHandler`, manifest schema
10. **`@paperclipai/module-sdk`** — TypeScript types for `ModuleAPI`, `HookEvent`, `HookHandler`, manifest schema
### Phase 2: First module (observability)

View File

@@ -56,8 +56,8 @@ Add a single storage subsystem for Paperclip that supports:
### Acceptance Criteria
- `paperclip onboard` writes a valid `storage` config block by default.
- `paperclip configure --section storage` can switch between local and s3 modes.
- `paperclipai onboard` writes a valid `storage` config block by default.
- `paperclipai configure --section storage` can switch between local and s3 modes.
- Server startup reads storage config without env-only hacks.
## Phase 2: Server Storage Subsystem + Providers
@@ -161,7 +161,7 @@ Add a single storage subsystem for Paperclip that supports:
### Acceptance Criteria
- `paperclip doctor` reports actionable storage status.
- `paperclipai doctor` reports actionable storage status.
- Local single-user install works without extra cloud credentials.
- Cloud config supports S3-compatible endpoint without code changes.