From 194b3faa64b8be0232d814d8f3bf15e52149e58d Mon Sep 17 00:00:00 2001 From: Nayan Date: Sat, 15 Aug 2026 12:03:42 +0530 Subject: [PATCH] refactor: rename the PIKA leftovers to AIRSHIP The injected config global, the deprecated system-prompt export and the agent-stderr debug switch all still carried an older product name that nothing in the repo explains. Writer and reader of the config global ship in the same response, so both flip together with no compat window: - window.__PIKA__ -> window.__AIRSHIP__ (proxy + shell writers, overlay readers, one prose comment) - PIKA_SYSTEM_PROMPT -> AIRSHIP_SYSTEM_PROMPT (still deprecated) - PIKA_DEBUG -> AIRSHIP_AGENT_DEBUG, now documented in the README; kept separate from AIRSHIP_DEBUG, which would otherwise start streaming raw agent stderr under --debug Breaking: anyone exporting PIKA_DEBUG loses agent stderr until they rename it; PIKA_SYSTEM_PROMPT importers must switch spellings. --- README.md | 6 ++++-- apps/cli/README.md | 6 ++++-- packages/core/src/index.ts | 2 +- packages/core/src/prompt.ts | 2 +- packages/core/src/providers/claude.ts | 2 +- packages/overlay/src/app.ts | 4 ++-- packages/overlay/src/index.ts | 4 ++-- packages/overlay/src/inspector/panel.ts | 2 +- packages/server/src/proxy.ts | 2 +- packages/server/src/shell.ts | 2 +- 10 files changed, 18 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index c8cd562..c1f1f4c 100644 --- a/README.md +++ b/README.md @@ -406,8 +406,10 @@ AIRSHIP_DEBUG AIRSHIP_QUIET AIRSHIP_CLAUDE_MODEL CLI unable to run anything. Booleans take `1`/`true`/`yes`/`on` or `0`/`false`/`no`/`off`; anything else is an error rather than a guess. -Three more are honoured: `AIRSHIP_EDITOR` (`vscode`, `cursor`, `windsurf` or `zed` — which -editor "open in editor" prefers, otherwise probed in that order), and `NO_COLOR` / `FORCE_COLOR`. +Four more are honoured: `AIRSHIP_EDITOR` (`vscode`, `cursor`, `windsurf` or `zed` — which +editor "open in editor" prefers, otherwise probed in that order), `AIRSHIP_AGENT_DEBUG` (stream +the Claude backend's raw stderr to the terminal — separate from `--debug`, which logs airship +itself), and `NO_COLOR` / `FORCE_COLOR`. ### `--cwd` diff --git a/apps/cli/README.md b/apps/cli/README.md index fc8a7d8..9c81316 100644 --- a/apps/cli/README.md +++ b/apps/cli/README.md @@ -408,8 +408,10 @@ AIRSHIP_DEBUG AIRSHIP_QUIET AIRSHIP_CLAUDE_MODEL CLI unable to run anything. Booleans take `1`/`true`/`yes`/`on` or `0`/`false`/`no`/`off`; anything else is an error rather than a guess. -Three more are honoured: `AIRSHIP_EDITOR` (`vscode`, `cursor`, `windsurf` or `zed` — which -editor "open in editor" prefers, otherwise probed in that order), and `NO_COLOR` / `FORCE_COLOR`. +Four more are honoured: `AIRSHIP_EDITOR` (`vscode`, `cursor`, `windsurf` or `zed` — which +editor "open in editor" prefers, otherwise probed in that order), `AIRSHIP_AGENT_DEBUG` (stream +the Claude backend's raw stderr to the terminal — separate from `--debug`, which logs airship +itself), and `NO_COLOR` / `FORCE_COLOR`. ### `--cwd` diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index cbdfab0..1a4dbd5 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -11,7 +11,7 @@ export type { ModelProbeOptions } from "./models"; export { listAllModels, listModels } from "./models"; export { isPathInside, pathKey, toPosixPath } from "./paths"; export type { EditPromptInput } from "./prompt"; -export { buildEditPrompt, PIKA_SYSTEM_PROMPT, systemPrompt } from "./prompt"; +export { AIRSHIP_SYSTEM_PROMPT, buildEditPrompt, systemPrompt } from "./prompt"; export type { CodexConfigValue, CodexSettings } from "./providers/codex"; /** Whether opencode can run a model id, so a caller can refuse one it cannot. */ export { namesProvider } from "./providers/opencode-events"; diff --git a/packages/core/src/prompt.ts b/packages/core/src/prompt.ts index 91c6085..31351a1 100644 --- a/packages/core/src/prompt.ts +++ b/packages/core/src/prompt.ts @@ -106,7 +106,7 @@ export function systemPrompt(agent: AgentKind): string { } /** @deprecated Prefer {@link systemPrompt}; retained as the Claude spelling. */ -export const PIKA_SYSTEM_PROMPT = systemPrompt("claude"); +export const AIRSHIP_SYSTEM_PROMPT = systemPrompt("claude"); export interface EditPromptInput { /** Direct-manipulation HTML attribute edits, when present. */ diff --git a/packages/core/src/providers/claude.ts b/packages/core/src/providers/claude.ts index 019b78d..a079e82 100644 --- a/packages/core/src/providers/claude.ts +++ b/packages/core/src/providers/claude.ts @@ -243,7 +243,7 @@ async function run(ctx: AgentRunContext): Promise { persistSession: true, settingSources: ["project"], stderr: (data) => { - if (process.env.PIKA_DEBUG) { + if (process.env.AIRSHIP_AGENT_DEBUG) { process.stderr.write(data); } }, diff --git a/packages/overlay/src/app.ts b/packages/overlay/src/app.ts index db8a8a2..42f865f 100644 --- a/packages/overlay/src/app.ts +++ b/packages/overlay/src/app.ts @@ -446,8 +446,8 @@ export function boot(): void { return; } injectStyles(); - const config = (window as unknown as { __PIKA__?: AirshipWindowConfig }) - .__PIKA__; + const config = (window as unknown as { __AIRSHIP__?: AirshipWindowConfig }) + .__AIRSHIP__; // The whole config, not just `wsPath`: the surface switcher needs to know // which surface it is on and the clean app path to navigate back to, and an // injection old enough to carry neither still boots — it just falls back to diff --git a/packages/overlay/src/index.ts b/packages/overlay/src/index.ts index 53b919c..ef38046 100644 --- a/packages/overlay/src/index.ts +++ b/packages/overlay/src/index.ts @@ -17,8 +17,8 @@ import { bootShell } from "./shell-app"; * send that header. */ function start(): void { - const config = (window as unknown as { __PIKA__?: AirshipWindowConfig }) - .__PIKA__; + const config = (window as unknown as { __AIRSHIP__?: AirshipWindowConfig }) + .__AIRSHIP__; if (config?.mode === "frame" || isFrameName(window.name)) { bootFrameAgent(); diff --git a/packages/overlay/src/inspector/panel.ts b/packages/overlay/src/inspector/panel.ts index af76cac..39f5f1f 100644 --- a/packages/overlay/src/inspector/panel.ts +++ b/packages/overlay/src/inspector/panel.ts @@ -2186,7 +2186,7 @@ export class DesignPanel { } // Non-rendered elements are not layers. A '; const json = escapeForScript(JSON.stringify(config)); const snippet = - `` + + `` + ``; const withHook = injectHead(body, hookTag); diff --git a/packages/server/src/shell.ts b/packages/server/src/shell.ts index e89e0d3..dcc4484 100644 --- a/packages/server/src/shell.ts +++ b/packages/server/src/shell.ts @@ -84,7 +84,7 @@ export function shellHtml(config: AirshipWindowConfig): string { /* Painted before the bundle runs so the canvas never flashes white. */ html,body{margin:0;padding:0;height:100%;overflow:hidden;background:#141414;} - +