prjct-cli 2.23.12 → 2.23.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -1810
- package/README.md +1 -39
- package/dist/bin/prjct-core.mjs +272 -272
- package/dist/daemon/entry.mjs +175 -175
- package/dist/mcp/server.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -137,45 +137,7 @@ detail, worktrees, monorepos: **[docs/storage-and-paths.md](./docs/storage-and-p
|
|
|
137
137
|
|
|
138
138
|
## Execution environments (zero-config)
|
|
139
139
|
|
|
140
|
-
The same binary runs in a plain shell, inside Claude Code, in an OpenAI Codex
|
|
141
|
-
sandbox, or in CI — and **detects which, with no configuration**, then adapts
|
|
142
|
-
output accordingly. Here is the actual *how*.
|
|
143
|
-
|
|
144
|
-
**Mechanism 1 — agent detection** (`core/infrastructure/agent-detector.ts`,
|
|
145
|
-
`isClaudeEnvironment()`). prjct concludes it's inside **Claude** if *any* of
|
|
146
|
-
these is true, evaluated **in this order** (first match wins, result cached for
|
|
147
|
-
the process):
|
|
148
|
-
|
|
149
|
-
1. env var `CLAUDE_AGENT` or `ANTHROPIC_CLAUDE` is set (Claude's runtime sets it);
|
|
150
|
-
2. `global.mcp` is present **or** `MCP_AVAILABLE` is set (MCP is available);
|
|
151
|
-
3. a `CLAUDE.md` file exists in the current working directory;
|
|
152
|
-
4. a `~/.claude/` directory exists;
|
|
153
|
-
5. the cwd path contains `/.claude/` or `/claude-workspace/`.
|
|
154
|
-
|
|
155
|
-
If **none** match, prjct falls back to the **Terminal/CLI** profile — that *is*
|
|
156
|
-
the plain-terminal detection: it's the default when no Claude signal is present.
|
|
157
|
-
**OpenAI Codex** is detected separately (`ai-provider.ts`, `detectCodex()`) by
|
|
158
|
-
the **`codex` CLI binary being on `PATH`** (a stray `~/.codex/` alone is not
|
|
159
|
-
enough); Codex's context file is `AGENTS.md`, skills under `~/.codex/skills/`.
|
|
160
|
-
|
|
161
|
-
**Mechanism 2 — output adaptation** (no flag needed; three independent signals):
|
|
162
|
-
|
|
163
|
-
- **TTY** (`core/utils/output.ts`, `spin()`): `process.stdout.isTTY` decides the
|
|
164
|
-
spinner — `true` (human terminal) → animated branded spinner redrawn with `\r`;
|
|
165
|
-
`false` (Claude Code, Codex, CI, a pipe) → a **single static** `⚡ prjct …`
|
|
166
|
-
line, no animation.
|
|
167
|
-
- **LLM-context gate** (`core/index.ts`):
|
|
168
|
-
`isLlmContext = !process.stdin.isTTY || options.md === true || options.json === true`.
|
|
169
|
-
Commands declared `requiresLlm` refuse to run in a *raw human terminal* unless
|
|
170
|
-
`--md`/`--json` is passed — inside an agent `stdin.isTTY` is already false, so
|
|
171
|
-
they run transparently with no flag.
|
|
172
|
-
- **`--md` / `--json`** (any env): an explicit override — strips the branding
|
|
173
|
-
header/footer, emits machine-structured markdown/JSON.
|
|
174
|
-
|
|
175
|
-
Every signal (env var, `PATH`, TTY, piped stdio) is something the **host sets on
|
|
176
|
-
its own** — prjct reads those ambient facts instead of asking you to declare
|
|
177
|
-
anything. Full per-environment output table:
|
|
178
|
-
**[docs/environments.md](./docs/environments.md)**.
|
|
140
|
+
The same binary runs in a plain shell, inside Claude Code, in an OpenAI Codex sandbox, or in CI, and **adapts output automatically with no configuration**. Detection signals (env vars, MCP, `CLAUDE.md`, `~/.claude/`, the `codex` binary on PATH, `process.stdout.isTTY`) are read silently; `--md` / `--json` are the only overrides. Full per-environment table, source-file references, and the detection order: **[docs/environments.md](./docs/environments.md)**.
|
|
179
141
|
|
|
180
142
|
### What it looks like
|
|
181
143
|
|