subconscious-cli 4.0.2 → 4.0.3

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/README.md CHANGED
@@ -27,7 +27,7 @@ and Pi integrations are installed per agent:
27
27
  ```bash
28
28
  subc cursor install
29
29
  subc copilot install
30
- subc pi install
30
+ subc pi
31
31
  subc <agent> uninstall
32
32
  ```
33
33
 
@@ -70,12 +70,12 @@ The packaged integrations live in `cli/bin/runbook`.
70
70
  | `subc opencode` | Launch OpenCode with the runbook provider, client header, and context/output limits |
71
71
  | `subc cursor install` | Install/update Cursor conversation and compaction hooks |
72
72
  | `subc copilot install` | Install/update the VS Code custom endpoint and Copilot hooks |
73
- | `subc pi install` then `subc pi` | Merge the Pi provider, then launch |
73
+ | `subc pi` | Refresh the Pi provider from the live catalog, then launch |
74
74
 
75
75
  If Claude Code, Codex, or OpenCode is missing, an interactive terminal offers
76
- to install it before launching. Pi requires `subc pi install` first; if its
77
- executable or Subconscious provider is missing, the CLI exits with instructions
78
- instead of installing the binary.
76
+ to install it before launching. Pi refreshes its Subconscious provider on every
77
+ `subc pi` launch while preserving all other providers in `models.json`; its
78
+ executable must already be installed.
79
79
 
80
80
  `subc codex` disables Codex apps and plugin tools for that launch by default so
81
81
  requests remain below the gateway's 128-tool limit. Core coding tools remain
package/bin/agents.js CHANGED
@@ -222,10 +222,10 @@ const AGENT_HELP = {
222
222
  pi: {
223
223
  usage: 'subc [-p NAME] pi [help|install|status|uninstall] [Pi arguments...]',
224
224
  behavior:
225
- 'Launches Pi read-only against the provider previously configured by subc pi install.',
225
+ 'Refreshes the persistent Subconscious provider from the live catalog, then launches Pi.',
226
226
  options: [
227
227
  ['help', 'Show this help'],
228
- ['install', 'Merge the Subconscious provider into ~/.pi/agent/models.json'],
228
+ ['install', 'Refresh the Subconscious provider without launching Pi'],
229
229
  ['status', 'Inspect the persistent Pi provider'],
230
230
  ['uninstall', 'Remove only the Subconscious Pi provider and extension'],
231
231
  ['--model MODEL', 'Override the profile model for this launch'],
@@ -269,7 +269,7 @@
269
269
  "command": "pi",
270
270
  "name": "Pi",
271
271
  "aliases": [],
272
- "description": "Launch Pi with the Subconscious provider and active profile model configured by subc pi install.",
272
+ "description": "Refresh Pi with the live Subconscious model catalog and launch the active profile model.",
273
273
  "framework": "Pi",
274
274
  "language": "shell",
275
275
  "category": "coding-agent",
@@ -149,7 +149,7 @@ for model_id in "${SUPPORTED_MODELS[@]}"; do
149
149
  fi
150
150
  done
151
151
 
152
- PI_DIR="${HOME}/.pi/agent"
152
+ PI_DIR="${PI_CODING_AGENT_DIR:-${HOME}/.pi/agent}"
153
153
  MODELS_JSON="${PI_DIR}/models.json"
154
154
  EXTENSIONS_DIR="${PI_DIR}/extensions"
155
155
  EXTENSION_DST="${EXTENSIONS_DIR}/subconscious-compaction.ts"
@@ -1,25 +1,25 @@
1
1
  #!/usr/bin/env bash
2
- # Launch Pi with the Subconscious provider configured by `subc pi install`.
3
- # This script is deliberately read-only: it never installs Pi, writes config,
4
- # or updates the persistent integration.
2
+ # Refresh the Subconscious provider from the live catalog, then launch Pi.
3
+ # Other providers in models.json are preserved.
5
4
 
6
5
  set -euo pipefail
7
6
 
7
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8
+ GATEWAY_URL="${GATEWAY_URL:-}"
9
+ API_KEY="${PI_API_KEY:-${API_KEY:-}}"
8
10
  MODEL="${MODEL:-subconscious/glm-5.2}"
9
11
  PI_DIR="${PI_CODING_AGENT_DIR:-${HOME}/.pi/agent}"
10
12
  MODELS_JSON="${PI_DIR}/models.json"
11
13
 
12
- if [[ ! -f "$MODELS_JSON" ]] || ! grep -q 'x-subconscious-client' "$MODELS_JSON" 2>/dev/null; then
13
- echo "Pi is not configured for Subconscious. Run 'subc pi install' first." >&2
14
+ if [[ -z "$GATEWAY_URL" || -z "$API_KEY" ]]; then
15
+ echo "error: GATEWAY_URL and API_KEY are required to configure Pi" >&2
14
16
  exit 1
15
17
  fi
16
18
 
17
- if command -v jq >/dev/null 2>&1 && ! jq -e \
18
- --arg model "$MODEL" \
19
- '.providers.subconscious.models[]? | select(.id == $model)' \
20
- "$MODELS_JSON" >/dev/null 2>&1; then
21
- echo "Model '$MODEL' is not present in the Pi catalog. Run 'subc pi install' to refresh it." >&2
22
- exit 1
23
- fi
19
+ "${SCRIPT_DIR}/install.sh" install \
20
+ --gateway-url "$GATEWAY_URL" \
21
+ --api-key "$API_KEY" \
22
+ --model "$MODEL" \
23
+ >/dev/null
24
24
 
25
25
  exec pi --provider subconscious --model "$MODEL" "$@"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "subconscious-cli",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "description": "CLI for Subconscious — run Claude Code, Codex, OpenCode, Cursor, Copilot, and Pi",
5
5
  "bin": {
6
6
  "subc": "bin/cli.js"