diff --git a/DEVELOPING.md b/DEVELOPING.md index 457e7b0..9e8ddb3 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -21,16 +21,15 @@ pnpm build node dist/index.js add ./fixtures/minimal-company \ --connection custom-url \ --api-base http://127.0.0.1:3100 \ - --target new \ - --new-company-name "Companies Local Hand Test" + --target new ``` -Then open `http://127.0.0.1:3100` in the browser and confirm that **Companies Local Hand Test** appears in the company list. +Then open `http://127.0.0.1:3100` in the browser and confirm that **Minimal Company** appears in the company list. If you want the wrapper to manage local bootstrap for you instead, run: ```bash -node dist/index.js add ./fixtures/minimal-company --target new --new-company-name "Companies Local Hand Test" +node dist/index.js add ./fixtures/minimal-company --target new ``` That path uses the bundled `paperclipai` canary, runs `paperclipai onboard --yes` when needed, and starts the local server automatically before importing. @@ -93,7 +92,7 @@ chmod +x /app/companies.sh ln -s /app/companies.sh /app/companies export PATH="/app:$PATH" DATA_DIR=$(mktemp -d "$TMPDIR/companies-docker-handtest.XXXXXX") -companies.sh add ./fixtures/minimal-company --yes --data-dir "$DATA_DIR" --target new --new-company-name "Docker Hand Test" +companies.sh add ./fixtures/minimal-company --yes --data-dir "$DATA_DIR" --target new companies.sh list --yes --data-dir "$DATA_DIR" node --input-type=module -e 'const response = await fetch("http://127.0.0.1:3210/"); console.log(response.status);' ``` diff --git a/README.md b/README.md index 311c563..74b303d 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,6 @@ npx companies.sh add ./my-company | `-p, --provider ` | Destination orchestrator. Default: `paperclip`. | | `--target ` | Import into a `new` or `existing` Paperclip company. | | `-C, --company-id ` | Optional target company id for `--target existing`; omit it to choose from the Paperclip company list. | -| `--new-company-name ` | Override the imported company name when using `--target new`. | | `--include ` | Comma-separated subset of `company,agents,projects,tasks,skills`. Default: `company,agents`. | | `--agents ` | Comma-separated agent slugs to import, or `all`. Default: `all`. | | `--collision ` | Collision strategy: `rename`, `skip`, or `replace`. Default: `rename`. | diff --git a/scripts/docker-npx-smoke.sh b/scripts/docker-npx-smoke.sh index a600cf4..02fa590 100755 --- a/scripts/docker-npx-smoke.sh +++ b/scripts/docker-npx-smoke.sh @@ -91,9 +91,9 @@ if command -v paperclipai >/dev/null 2>&1; then fi DATA_DIR="$(mktemp -d "$TMPDIR/companies-docker-npx.XXXXXX")" -COMPANY_NAME="Docker NPX Smoke Company" +COMPANY_NAME="GStack" -if ! npx companies.sh add paperclipai/companies/gstack --yes --data-dir "$DATA_DIR" --target new --new-company-name "$COMPANY_NAME"; then +if ! npx companies.sh add paperclipai/companies/gstack --yes --data-dir "$DATA_DIR" --target new; then if [[ -f /app/paperclipai-npx.log ]]; then cat /app/paperclipai-npx.log >&2 fi diff --git a/scripts/docker-smoke.sh b/scripts/docker-smoke.sh index d34bfc4..0540e87 100755 --- a/scripts/docker-smoke.sh +++ b/scripts/docker-smoke.sh @@ -94,9 +94,9 @@ ln -s /app/companies.sh /app/companies export PATH="/app:$PATH" DATA_DIR="$(mktemp -d "$TMPDIR/companies-docker-smoke.XXXXXX")" -COMPANY_NAME="Docker Smoke Company" +COMPANY_NAME="Minimal Company" -if ! companies.sh add ./fixtures/minimal-company --yes --data-dir "$DATA_DIR" --target new --new-company-name "$COMPANY_NAME"; then +if ! companies.sh add ./fixtures/minimal-company --yes --data-dir "$DATA_DIR" --target new; then if [[ -f /app/paperclipai.log ]]; then cat /app/paperclipai.log >&2 fi diff --git a/src/index.test.ts b/src/index.test.ts index f3b1149..dfa016f 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -10,7 +10,6 @@ import { isDirectCliInvocation, pickProvider, promptPaperclipConnection, - promptNewCompanyName, promptSource, promptTargetMode, resolvePaperclipRunApiBase, @@ -84,10 +83,6 @@ test("promptTargetMode defaults to new in non-interactive mode", async () => { assert.equal(await promptTargetMode(undefined, true), "new"); }); -test("promptNewCompanyName skips the prompt in non-interactive mode", async () => { - assert.equal(await promptNewCompanyName(undefined, true), undefined); -}); - test("promptSource fails fast in non-interactive mode when no source is provided", async () => { await assert.rejects(() => promptSource(undefined, true), /A source is required in non-interactive mode/); }); diff --git a/src/index.ts b/src/index.ts index eba8339..092e5da 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node -import { intro, outro, select, text, confirm, isCancel, cancel, note } from "@clack/prompts"; +import { intro, outro, select, text, isCancel, cancel, note } from "@clack/prompts"; import { Command } from "commander"; import pc from "picocolors"; import { readFileSync, realpathSync } from "node:fs"; @@ -42,7 +42,6 @@ interface BaseOptions extends CommonPaperclipOptions { interface AddOptions extends BaseOptions { include?: string; target?: TargetMode; - newCompanyName?: string; agents?: string; collision?: CollisionMode; dryRun?: boolean; @@ -252,27 +251,6 @@ async function promptExistingCompanyId(options: BaseOptions): Promise { return coerceCancel(picked).trim(); } -export async function promptNewCompanyName( - current: string | undefined, - skipPrompts: boolean, -): Promise { - if (current?.trim()) return current.trim(); - if (skipPrompts) return undefined; - - const shouldOverride = await confirm({ - message: "Override the imported company name?", - initialValue: false, - }); - - if (!coerceCancel(shouldOverride)) return undefined; - - const result = await text({ - message: "New company name", - placeholder: "Imported Company", - }); - return coerceCancel(result).trim() || undefined; -} - export function resolvePaperclipRunApiBase( mode: ConnectionMode, apiBase: string, @@ -333,7 +311,6 @@ export function buildAddPaperclipArgs(input: { agents?: string; collision?: CollisionMode; companyId?: string; - newCompanyName?: string; dryRun?: boolean; yes?: boolean; }): string[] { @@ -354,9 +331,6 @@ export function buildAddPaperclipArgs(input: { if (input.companyId) { args.push("--company-id", input.companyId); } - if (input.newCompanyName) { - args.push("--new-company-name", input.newCompanyName); - } if (input.dryRun) { args.push("--dry-run"); } @@ -386,10 +360,6 @@ export async function handleAdd(source: string | undefined, options: AddOptions) const telemetry = await prepareInstallTelemetry(normalizedSource, target); - const newCompanyName = target === "new" - ? await promptNewCompanyName(options.newCompanyName, Boolean(options.yes)) - : undefined; - const prepared = await preparePaperclipWithConnection(connection, options); const paperclipOptions: AddOptions = { ...options, @@ -407,7 +377,6 @@ export async function handleAdd(source: string | undefined, options: AddOptions) agents: options.agents, collision: options.collision, companyId, - newCompanyName, dryRun: options.dryRun, yes: options.yes, }); @@ -461,7 +430,6 @@ addCommonOptions( .option("--connection ", "Paperclip connection mode: auto | custom-url") .option("--include ", INCLUDE_OPTION_DESCRIPTION, "company,agents") .option("--target ", "Import target: new | existing") - .option("--new-company-name ", "Name override when creating a new company") .option("--agents ", "Comma-separated agent slugs to import, or all", "all") .option("--collision ", "Collision strategy: rename | skip | replace", "rename") .option("--dry-run", "Preview the import without applying it", false)