youmd 0.8.7 → 0.8.13
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/dist/commands/add.js +1 -1
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/agent.d.ts +4 -0
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/agent.js +4 -0
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/build.js +2 -2
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/chat.js +1 -1
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +11 -10
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/init.js +5 -5
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/keys.js +8 -1
- package/dist/commands/keys.js.map +1 -1
- package/dist/commands/login.js +2 -2
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/machine.d.ts.map +1 -1
- package/dist/commands/machine.js +331 -8
- package/dist/commands/machine.js.map +1 -1
- package/dist/commands/mcp.js +4 -4
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/private.js +2 -2
- package/dist/commands/private.js.map +1 -1
- package/dist/commands/project.d.ts.map +1 -1
- package/dist/commands/project.js +31 -0
- package/dist/commands/project.js.map +1 -1
- package/dist/commands/publish.js +1 -1
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/pull.js +1 -1
- package/dist/commands/pull.js.map +1 -1
- package/dist/commands/push.js +1 -1
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/skill.d.ts +1 -1
- package/dist/commands/skill.d.ts.map +1 -1
- package/dist/commands/skill.js +736 -39
- package/dist/commands/skill.js.map +1 -1
- package/dist/commands/stack.d.ts.map +1 -1
- package/dist/commands/stack.js +127 -26
- package/dist/commands/stack.js.map +1 -1
- package/dist/commands/status.js +1 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +84 -3
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/whoami.js +3 -3
- package/dist/commands/whoami.js.map +1 -1
- package/dist/create.js +0 -0
- package/dist/index.js +40 -30
- package/dist/index.js.map +1 -1
- package/dist/lib/api.d.ts +190 -0
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/api.js +44 -6
- package/dist/lib/api.js.map +1 -1
- package/dist/lib/config.d.ts +20 -12
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +113 -42
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/daemon.d.ts +2 -0
- package/dist/lib/daemon.d.ts.map +1 -1
- package/dist/lib/daemon.js +28 -19
- package/dist/lib/daemon.js.map +1 -1
- package/dist/lib/machine-bootstrap-prompt.d.ts.map +1 -1
- package/dist/lib/machine-bootstrap-prompt.js +147 -118
- package/dist/lib/machine-bootstrap-prompt.js.map +1 -1
- package/dist/lib/machine-verify.d.ts +51 -0
- package/dist/lib/machine-verify.d.ts.map +1 -1
- package/dist/lib/machine-verify.js +123 -1
- package/dist/lib/machine-verify.js.map +1 -1
- package/dist/lib/onboarding.d.ts.map +1 -1
- package/dist/lib/onboarding.js +3 -8
- package/dist/lib/onboarding.js.map +1 -1
- package/dist/lib/portfolio-audit.d.ts.map +1 -1
- package/dist/lib/portfolio-audit.js +2 -1
- package/dist/lib/portfolio-audit.js.map +1 -1
- package/dist/lib/project.d.ts +3 -3
- package/dist/lib/project.d.ts.map +1 -1
- package/dist/lib/project.js +18 -11
- package/dist/lib/project.js.map +1 -1
- package/dist/lib/projectContext.d.ts +10 -9
- package/dist/lib/projectContext.d.ts.map +1 -1
- package/dist/lib/projectContext.js +29 -23
- package/dist/lib/projectContext.js.map +1 -1
- package/dist/lib/realtime-sync.d.ts +26 -0
- package/dist/lib/realtime-sync.d.ts.map +1 -1
- package/dist/lib/realtime-sync.js +51 -7
- package/dist/lib/realtime-sync.js.map +1 -1
- package/dist/lib/render.js +1 -1
- package/dist/lib/render.js.map +1 -1
- package/dist/lib/skill-catalog.d.ts +26 -0
- package/dist/lib/skill-catalog.d.ts.map +1 -1
- package/dist/lib/skill-catalog.js +100 -0
- package/dist/lib/skill-catalog.js.map +1 -1
- package/dist/lib/vault.d.ts +3 -3
- package/dist/lib/vault.d.ts.map +1 -1
- package/dist/lib/vault.js +10 -8
- package/dist/lib/vault.js.map +1 -1
- package/dist/lib/youstack.js +12 -12
- package/dist/lib/youstack.js.map +1 -1
- package/dist/mcp/registry.d.ts +2 -1
- package/dist/mcp/registry.d.ts.map +1 -1
- package/dist/mcp/registry.js +135 -12
- package/dist/mcp/registry.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +135 -7
- package/dist/mcp/server.js.map +1 -1
- package/dist/postinstall.js +3 -2
- package/dist/postinstall.js.map +1 -1
- package/dist/you.js +0 -0
- package/package.json +1 -1
- package/scripts/local-agent-stack-inventory.mjs +1188 -0
- package/scripts/skillstack-sync/README.md +33 -25
- package/scripts/skillstack-sync/bootstrap-new-mac.sh +1 -1
- package/scripts/skillstack-sync/capture-agent-config.sh +8 -1
- package/scripts/skillstack-sync/{com.youmd.context-sync.plist → com.you.context-sync.plist} +3 -3
- package/scripts/skillstack-sync/{com.youmd.identity-sync.plist → com.you.identity-sync.plist} +3 -3
- package/scripts/skillstack-sync/{com.youmd.realtime-sync.plist → com.you.realtime-sync.plist} +3 -3
- package/scripts/skillstack-sync/{com.youmd.skillstack-sync.plist → com.you.skillstack-sync.plist} +3 -3
- package/scripts/skillstack-sync/context-sync.sh +1 -1
- package/scripts/skillstack-sync/install-daemons.sh +20 -6
- package/scripts/skillstack-sync/restore-agent-config.sh +1 -1
- package/scripts/skillstack-sync/sync.sh +1 -1
- package/skills/machine-bootstrap.md +57 -55
|
@@ -83,13 +83,13 @@ function portableHomePath(value) {
|
|
|
83
83
|
}
|
|
84
84
|
function buildFreshMachineBootstrapScript() {
|
|
85
85
|
return `set -euo pipefail
|
|
86
|
-
export PATH="$HOME/.youmd/bin:$HOME/.youmd/npm-global/bin:/opt/homebrew/opt/node@22/bin:/usr/local/opt/node@22/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
|
|
87
|
-
ROOT="\${YOUMD_CODE_ROOT:-$HOME/Desktop/CODE_YOU}"
|
|
88
|
-
DAYS="\${YOUMD_ACTIVE_DAYS:-30}"
|
|
89
|
-
EXPAND_DAYS="\${YOUMD_EXPAND_ACTIVE_DAYS:-90}"
|
|
90
|
-
LIMIT="\${YOUMD_PROJECT_LIMIT:-80}"
|
|
91
|
-
HYDRATE_TIMEOUT="\${YOUMD_PORTFOLIO_HYDRATE_TIMEOUT_SECONDS:-180}"
|
|
92
|
-
MIN_YOUMD_VERSION="\${YOUMD_MIN_VERSION:-0.8.
|
|
86
|
+
export PATH="$HOME/.you/bin:$HOME/.you/npm-global/bin:$HOME/.youmd/bin:$HOME/.youmd/npm-global/bin:/opt/homebrew/opt/node@22/bin:/usr/local/opt/node@22/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
|
|
87
|
+
ROOT="\${YOU_CODE_ROOT:-\${YOUMD_CODE_ROOT:-$HOME/Desktop/CODE_YOU}}"
|
|
88
|
+
DAYS="\${YOU_ACTIVE_DAYS:-\${YOUMD_ACTIVE_DAYS:-30}}"
|
|
89
|
+
EXPAND_DAYS="\${YOU_EXPAND_ACTIVE_DAYS:-\${YOUMD_EXPAND_ACTIVE_DAYS:-90}}"
|
|
90
|
+
LIMIT="\${YOU_PROJECT_LIMIT:-\${YOUMD_PROJECT_LIMIT:-80}}"
|
|
91
|
+
HYDRATE_TIMEOUT="\${YOU_PORTFOLIO_HYDRATE_TIMEOUT_SECONDS:-\${YOUMD_PORTFOLIO_HYDRATE_TIMEOUT_SECONDS:-180}}"
|
|
92
|
+
MIN_YOUMD_VERSION="\${YOU_MIN_VERSION:-\${YOUMD_MIN_VERSION:-0.8.12}}"
|
|
93
93
|
mkdir -p "$ROOT"
|
|
94
94
|
|
|
95
95
|
command_exists() { command -v "$1" >/dev/null 2>&1; }
|
|
@@ -115,18 +115,18 @@ version_at_least() {
|
|
|
115
115
|
}
|
|
116
116
|
ensure_youmd_min_version() {
|
|
117
117
|
local installed
|
|
118
|
-
installed="$(
|
|
118
|
+
installed="$(you --version 2>/dev/null | tr -d '[:space:]' || true)"
|
|
119
119
|
echo "[you.md] installed version: \${installed:-unknown}"
|
|
120
120
|
if [ -n "$installed" ] && version_at_least "$installed" "$MIN_YOUMD_VERSION"; then
|
|
121
121
|
return 0
|
|
122
122
|
fi
|
|
123
|
-
echo "[you.md] installed
|
|
124
|
-
curl -fsSL https://you.md/install.sh |
|
|
125
|
-
export PATH="$HOME/.youmd/bin:$HOME/.youmd/npm-global/bin:/opt/homebrew/opt/node@22/bin:/usr/local/opt/node@22/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
|
|
126
|
-
installed="$(
|
|
123
|
+
echo "[you.md] installed you is older than required \${MIN_YOUMD_VERSION}; forcing GitHub source install"
|
|
124
|
+
curl -fsSL https://you.md/install.sh | YOU_INSTALL_CHANNEL=source YOU_SOURCE_REF=main bash
|
|
125
|
+
export PATH="$HOME/.you/bin:$HOME/.you/npm-global/bin:$HOME/.youmd/bin:$HOME/.youmd/npm-global/bin:/opt/homebrew/opt/node@22/bin:/usr/local/opt/node@22/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
|
|
126
|
+
installed="$(you --version 2>/dev/null | tr -d '[:space:]' || true)"
|
|
127
127
|
echo "[you.md] installed version after forced source install: \${installed:-unknown}"
|
|
128
128
|
if [ -z "$installed" ] || ! version_at_least "$installed" "$MIN_YOUMD_VERSION"; then
|
|
129
|
-
echo "[you.md]
|
|
129
|
+
echo "[you.md] you \${MIN_YOUMD_VERSION}+ is required for Secret Vault, agent bus, agent stack inventory, and fresh-machine restore. npm latest may still be behind; rerun after this commit is deployed or install from GitHub main." >&2
|
|
130
130
|
exit 1
|
|
131
131
|
fi
|
|
132
132
|
}
|
|
@@ -149,6 +149,17 @@ run_with_timeout() {
|
|
|
149
149
|
return "$status"
|
|
150
150
|
fi
|
|
151
151
|
}
|
|
152
|
+
run_agent_stack_inventory() {
|
|
153
|
+
INVENTORY_DIR="\${YOU_AGENT_STACK_INVENTORY_DIR:-\${YOUMD_AGENT_STACK_INVENTORY_DIR:-$HOME/.you/agent-stack-inventory}}"
|
|
154
|
+
mkdir -p "$INVENTORY_DIR"
|
|
155
|
+
echo "[you.md] running local/global agent stack inventory into $INVENTORY_DIR"
|
|
156
|
+
if you skill inventory --out-dir "$INVENTORY_DIR" --register-catalog --sync; then
|
|
157
|
+
you agent send --channel machine-sync --kind status "fresh machine \$(hostname) generated agent stack inventory at $INVENTORY_DIR" || true
|
|
158
|
+
else
|
|
159
|
+
echo "[you.md] agent stack inventory did not complete; continuing setup so sync can self-heal, then rerun: you skill inventory --out-dir $INVENTORY_DIR --register-catalog --sync"
|
|
160
|
+
you agent send --channel machine-sync --kind status "fresh machine \$(hostname) could not complete agent stack inventory yet; rerun after shared skill sync" || true
|
|
161
|
+
fi
|
|
162
|
+
}
|
|
152
163
|
|
|
153
164
|
bootstrap_prereqs() {
|
|
154
165
|
echo "[you.md] checking local prerequisites: Homebrew, Node 22/npm, git, gh, bun, pnpm"
|
|
@@ -158,7 +169,7 @@ bootstrap_prereqs() {
|
|
|
158
169
|
fi
|
|
159
170
|
if [ -x /opt/homebrew/bin/brew ]; then eval "$(/opt/homebrew/bin/brew shellenv)" || true; fi
|
|
160
171
|
if [ -x /usr/local/bin/brew ]; then eval "$(/usr/local/bin/brew shellenv)" || true; fi
|
|
161
|
-
export PATH="$HOME/.youmd/bin:$HOME/.youmd/npm-global/bin:/opt/homebrew/opt/node@22/bin:/usr/local/opt/node@22/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
|
|
172
|
+
export PATH="$HOME/.you/bin:$HOME/.you/npm-global/bin:$HOME/.youmd/bin:$HOME/.youmd/npm-global/bin:/opt/homebrew/opt/node@22/bin:/usr/local/opt/node@22/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
|
|
162
173
|
|
|
163
174
|
if command_exists brew; then
|
|
164
175
|
MAJOR="$(node_major)"
|
|
@@ -172,7 +183,7 @@ bootstrap_prereqs() {
|
|
|
172
183
|
command_exists bun || brew install bun || brew install oven-sh/bun/bun || true
|
|
173
184
|
fi
|
|
174
185
|
|
|
175
|
-
export PATH="$HOME/.youmd/bin:$HOME/.youmd/npm-global/bin:/opt/homebrew/opt/node@22/bin:/usr/local/opt/node@22/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
|
|
186
|
+
export PATH="$HOME/.you/bin:$HOME/.you/npm-global/bin:$HOME/.youmd/bin:$HOME/.youmd/npm-global/bin:/opt/homebrew/opt/node@22/bin:/usr/local/opt/node@22/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
|
|
176
187
|
command_exists corepack && corepack enable || true
|
|
177
188
|
if command_exists corepack && ! command_exists pnpm; then
|
|
178
189
|
corepack prepare pnpm@latest --activate || true
|
|
@@ -213,130 +224,137 @@ ensure_github_auth() {
|
|
|
213
224
|
bootstrap_prereqs
|
|
214
225
|
|
|
215
226
|
echo "[you.md] installing runtime from GitHub main"
|
|
216
|
-
curl -fsSL https://you.md/install.sh |
|
|
217
|
-
export PATH="$HOME/.youmd/bin:$HOME/.youmd/npm-global/bin:/opt/homebrew/opt/node@22/bin:/usr/local/opt/node@22/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
|
|
218
|
-
if ! command_exists
|
|
219
|
-
echo "[you.md]
|
|
227
|
+
curl -fsSL https://you.md/install.sh | YOU_INSTALL_CHANNEL=source YOU_SOURCE_REF=main bash
|
|
228
|
+
export PATH="$HOME/.you/bin:$HOME/.you/npm-global/bin:$HOME/.youmd/bin:$HOME/.youmd/npm-global/bin:/opt/homebrew/opt/node@22/bin:/usr/local/opt/node@22/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
|
|
229
|
+
if ! command_exists you; then
|
|
230
|
+
echo "[you.md] you was installed but is not on PATH. Try a new Terminal, then rerun this command." >&2
|
|
220
231
|
exit 1
|
|
221
232
|
fi
|
|
222
233
|
ensure_youmd_min_version
|
|
234
|
+
echo "[you.md] proving canonical ~/.you home migration"
|
|
235
|
+
you machine migrate-home --yes || true
|
|
223
236
|
|
|
224
|
-
|
|
237
|
+
YOU_BOOTSTRAP_API_KEY="\${YOU_API_KEY:-\${YOUMD_API_KEY:-}}"
|
|
238
|
+
if [ -n "$YOU_BOOTSTRAP_API_KEY" ]; then
|
|
225
239
|
echo "[you.md] logging in with bootstrap key"
|
|
226
|
-
|
|
240
|
+
you login --key "$YOU_BOOTSTRAP_API_KEY"
|
|
227
241
|
else
|
|
228
|
-
echo "[you.md] no
|
|
229
|
-
|
|
242
|
+
echo "[you.md] no YOU_API_KEY set; starting interactive login"
|
|
243
|
+
you login
|
|
230
244
|
fi
|
|
231
245
|
|
|
232
246
|
echo "[you.md] pulling identity bundle and syncing local brain"
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
247
|
+
you pull
|
|
248
|
+
you sync
|
|
249
|
+
you agent send --channel machine-sync --kind status "fresh machine \$(hostname) authenticated, pulled identity, and started setup" || true
|
|
236
250
|
|
|
237
251
|
echo "[you.md] installing resident realtime/identity/skillstack/project-context daemons early"
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
252
|
+
you stack daemon install || true
|
|
253
|
+
you stack daemon status || true
|
|
254
|
+
you agent send --channel machine-sync --kind status "fresh machine \$(hostname) installed resident realtime/skillstack daemons" || true
|
|
241
255
|
|
|
242
256
|
GITHUB_READY=0
|
|
243
257
|
if ensure_github_auth; then
|
|
244
258
|
GITHUB_READY=1
|
|
245
|
-
elif [ "\${YOUMD_REQUIRE_GITHUB_AUTH:-1}" = "1" ]; then
|
|
259
|
+
elif [ "\${YOU_REQUIRE_GITHUB_AUTH:-\${YOUMD_REQUIRE_GITHUB_AUTH:-1}}" = "1" ]; then
|
|
246
260
|
echo "[you.md] stopping after You.md identity/daemon setup because GitHub auth is required for private repos." >&2
|
|
247
261
|
exit 2
|
|
248
262
|
fi
|
|
249
263
|
|
|
250
264
|
echo "[you.md] restoring shared skills, stacks, and agent host config"
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
265
|
+
you machine setup || echo "[you.md] machine setup reported a warning; continuing to skills/MCP so the next run can self-heal"
|
|
266
|
+
you skill install all || true
|
|
267
|
+
you skill sync || true
|
|
268
|
+
you mcp --install claude --auto || true
|
|
269
|
+
you mcp --install codex --auto || true
|
|
270
|
+
you skill link claude || true
|
|
271
|
+
you skill link codex || true
|
|
272
|
+
run_agent_stack_inventory
|
|
273
|
+
you agent send --channel machine-sync --kind status "fresh machine \$(hostname) restored shared skills/stacks and MCP config" || true
|
|
259
274
|
|
|
260
275
|
if [ "$GITHUB_READY" != "1" ]; then
|
|
261
276
|
echo "[you.md] GitHub auth is still missing; project clone pass skipped. Rerun after gh auth login."
|
|
262
|
-
|
|
277
|
+
you agent send --channel machine-sync --kind status "fresh machine \$(hostname) stopped: GitHub auth required before private project clone" || true
|
|
263
278
|
exit 2
|
|
264
279
|
fi
|
|
265
280
|
|
|
266
281
|
RECENT_ONLY_ARGS=()
|
|
267
|
-
if
|
|
282
|
+
if you machine --help 2>/dev/null | grep -q -- "--recent-only"; then
|
|
268
283
|
RECENT_ONLY_ARGS=(--recent-only)
|
|
269
284
|
else
|
|
270
285
|
echo "[you.md] installed CLI does not expose --recent-only yet; using noninteractive no-to-older-projects fallback"
|
|
271
286
|
fi
|
|
272
287
|
run_machine_projects_recent_only() {
|
|
273
288
|
if [ "\${#RECENT_ONLY_ARGS[@]}" -gt 0 ]; then
|
|
274
|
-
|
|
289
|
+
you machine projects "$@"
|
|
275
290
|
else
|
|
276
|
-
|
|
291
|
+
you machine projects "$@" </dev/null
|
|
277
292
|
fi
|
|
278
293
|
}
|
|
279
294
|
|
|
280
295
|
echo "[you.md] hydrating portfolio graph from You.md/GitHub before the 30-day local clone pass"
|
|
281
|
-
run_with_timeout "$HYDRATE_TIMEOUT"
|
|
296
|
+
run_with_timeout "$HYDRATE_TIMEOUT" you project portfolio-hydrate --root "$ROOT" --days "$DAYS" --limit "$LIMIT" || true
|
|
282
297
|
PROJECT_ARGS=(--root "$ROOT" --days "$DAYS" "\${RECENT_ONLY_ARGS[@]}")
|
|
283
|
-
|
|
284
|
-
|
|
298
|
+
MAX_CLONE_PROJECTS="\${YOU_MAX_CLONE_PROJECTS:-\${YOUMD_MAX_CLONE_PROJECTS:-}}"
|
|
299
|
+
if [ -n "$MAX_CLONE_PROJECTS" ]; then
|
|
300
|
+
PROJECT_ARGS+=(--max-clone-projects "$MAX_CLONE_PROJECTS")
|
|
285
301
|
fi
|
|
286
302
|
echo "[you.md] previewing graph-backed 30-day project setup plan (ACTIVE + Top Priority/Focusing only)"
|
|
287
303
|
run_machine_projects_recent_only "\${PROJECT_ARGS[@]}" --dry-run || true
|
|
288
304
|
echo "[you.md] creating code workspace and cloning ACTIVE + Top Priority/Focusing 30-day project repos"
|
|
289
305
|
run_machine_projects_recent_only "\${PROJECT_ARGS[@]}"
|
|
290
|
-
|
|
306
|
+
you agent send --channel machine-sync --kind status "fresh machine \$(hostname) finished 30-day active/focused project clone pass into $ROOT" || true
|
|
291
307
|
|
|
292
308
|
echo "[you.md] checking encrypted env-vault tooling without printing secrets"
|
|
293
|
-
|
|
309
|
+
you env backup --root "$ROOT" --preflight || true
|
|
294
310
|
SECRET_VAULT_RESTORED=0
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
311
|
+
ENV_VAULT_PATH="\${YOU_ENV_VAULT:-\${YOUMD_ENV_VAULT:-}}"
|
|
312
|
+
ALLOW_LOCAL_ENV_VAULT_FALLBACK="\${YOU_ALLOW_LOCAL_ENV_VAULT_FALLBACK:-\${YOUMD_ALLOW_LOCAL_ENV_VAULT_FALLBACK:-0}}"
|
|
313
|
+
if [ -z "$ENV_VAULT_PATH" ] && [ "\${YOU_SECRET_VAULT_PULL:-\${YOUMD_SECRET_VAULT_PULL:-1}}" = "1" ]; then
|
|
314
|
+
SECRET_VAULT_DIR="\${YOU_SECRET_VAULT_DIR:-\${YOUMD_SECRET_VAULT_DIR:-$HOME/.you/secret-vault}}"
|
|
298
315
|
echo "[you.md] registering this Mac as a trusted Secret Vault device"
|
|
299
|
-
|
|
316
|
+
you env vault device-register || true
|
|
300
317
|
echo "[you.md] checking You.md Secret Vault for the latest encrypted env vault and trusted-device envelope"
|
|
301
|
-
if
|
|
318
|
+
if you env vault pull --out "$SECRET_VAULT_DIR" --restore --root "$ROOT" --map-existing --existing-only --skip-agent-auth; then
|
|
302
319
|
SECRET_VAULT_RESTORED=1
|
|
303
320
|
echo "[you.md] restored env vault through trusted-device Secret Vault"
|
|
304
|
-
|
|
321
|
+
you agent send --channel machine-sync --kind status "fresh machine \$(hostname) restored encrypted env vault through trusted-device Secret Vault" || true
|
|
305
322
|
else
|
|
306
323
|
echo "[you.md] account-backed Secret Vault restore is waiting for a trusted-device share"
|
|
307
|
-
echo "[you.md] source Mac action:
|
|
308
|
-
echo "[you.md] new Mac retry:
|
|
309
|
-
|
|
324
|
+
echo "[you.md] source Mac action: you env vault share"
|
|
325
|
+
echo "[you.md] new Mac retry: you env vault pull --restore --root \\"$ROOT\\" --map-existing --existing-only --skip-agent-auth"
|
|
326
|
+
you agent send --channel machine-sync --kind status "fresh machine \$(hostname) registered Secret Vault device and is waiting for source Mac trusted-device share" || true
|
|
310
327
|
fi
|
|
311
328
|
fi
|
|
312
|
-
if [ "$SECRET_VAULT_RESTORED" != "1" ] && [ -z "
|
|
329
|
+
if [ "$SECRET_VAULT_RESTORED" != "1" ] && [ -z "$ENV_VAULT_PATH" ]; then
|
|
313
330
|
if [ "$ALLOW_LOCAL_ENV_VAULT_FALLBACK" = "1" ]; then
|
|
314
331
|
echo "[you.md] opt-in local/iCloud passphrase vault fallback enabled"
|
|
315
332
|
for DEFAULT_ENV_VAULT_DIR in "$HOME/Desktop/youmd-env-vault" "$HOME/Library/Mobile Documents/com~apple~CloudDocs/Desktop/youmd-env-vault" "$HOME/Library/Mobile Documents/com~apple~CloudDocs/youmd-env-vault"; do
|
|
316
333
|
if [ -d "$DEFAULT_ENV_VAULT_DIR" ]; then
|
|
317
334
|
DETECTED_ENV_VAULT="$(find "$DEFAULT_ENV_VAULT_DIR" -maxdepth 1 -type f \\( -name "env-vault-*.tar.enc" -o -name "env-vault-*.tar.age" -o -name "env-vault-*.tar.gpg" \\) -print 2>/dev/null | sort | tail -n 1 || true)"
|
|
318
335
|
if [ -n "$DETECTED_ENV_VAULT" ]; then
|
|
319
|
-
|
|
320
|
-
|
|
336
|
+
ENV_VAULT_PATH="$DETECTED_ENV_VAULT"
|
|
337
|
+
export YOU_ENV_VAULT="$ENV_VAULT_PATH"
|
|
338
|
+
echo "[you.md] using detected env vault: $ENV_VAULT_PATH"
|
|
321
339
|
break
|
|
322
340
|
fi
|
|
323
341
|
fi
|
|
324
342
|
done
|
|
325
343
|
else
|
|
326
344
|
echo "[you.md] local/iCloud passphrase vault fallback disabled by default"
|
|
327
|
-
echo "[you.md] set
|
|
345
|
+
echo "[you.md] set YOU_ALLOW_LOCAL_ENV_VAULT_FALLBACK=1 or YOU_ENV_VAULT=/path/to/env-vault only if you intentionally want the older passphrase flow"
|
|
328
346
|
fi
|
|
329
347
|
fi
|
|
330
348
|
if [ "$SECRET_VAULT_RESTORED" = "1" ]; then
|
|
331
349
|
:
|
|
332
|
-
elif [ -n "
|
|
350
|
+
elif [ -n "$ENV_VAULT_PATH" ]; then
|
|
333
351
|
echo "[you.md] using explicit/opt-in local encrypted vault fallback"
|
|
334
|
-
if [ ! -f "$
|
|
335
|
-
echo "[you.md] env vault path does not exist: $
|
|
352
|
+
if [ ! -f "$ENV_VAULT_PATH" ]; then
|
|
353
|
+
echo "[you.md] env vault path does not exist: $ENV_VAULT_PATH" >&2
|
|
336
354
|
exit 1
|
|
337
355
|
fi
|
|
338
356
|
if [ -z "\${ENV_VAULT_PASS:-}" ] && command_exists security; then
|
|
339
|
-
KEYCHAIN_SERVICE="\${YOUMD_ENV_VAULT_KEYCHAIN_SERVICE:-
|
|
357
|
+
KEYCHAIN_SERVICE="\${YOU_ENV_VAULT_KEYCHAIN_SERVICE:-\${YOUMD_ENV_VAULT_KEYCHAIN_SERVICE:-you-env-vault}}"
|
|
340
358
|
if ENV_VAULT_PASS_FROM_KEYCHAIN="$(security find-generic-password -a "\${USER:-\${LOGNAME:-houston}}" -s "$KEYCHAIN_SERVICE" -w 2>/dev/null)"; then
|
|
341
359
|
export ENV_VAULT_PASS="$ENV_VAULT_PASS_FROM_KEYCHAIN"
|
|
342
360
|
unset ENV_VAULT_PASS_FROM_KEYCHAIN
|
|
@@ -346,105 +364,112 @@ elif [ -n "\${YOUMD_ENV_VAULT:-}" ]; then
|
|
|
346
364
|
fi
|
|
347
365
|
fi
|
|
348
366
|
echo "[you.md] listing encrypted .env.local vault before restore"
|
|
349
|
-
|
|
367
|
+
you env restore "$ENV_VAULT_PATH" --root "$ROOT" --list --map-existing --existing-only --skip-agent-auth
|
|
350
368
|
echo "[you.md] restoring encrypted .env.local vault into existing cloned project dirs"
|
|
351
|
-
|
|
352
|
-
|
|
369
|
+
you env restore "$ENV_VAULT_PATH" --root "$ROOT" --map-existing --existing-only --skip-agent-auth
|
|
370
|
+
you agent send --channel machine-sync --kind status "fresh machine \$(hostname) restored encrypted env vault into existing project dirs" || true
|
|
353
371
|
else
|
|
354
372
|
echo "[you.md] env vault not restored yet"
|
|
355
373
|
echo "[you.md] On the old/source Mac, create the encrypted vault first:"
|
|
356
|
-
echo "
|
|
374
|
+
echo "you env vault push --root ~/Desktop/CODE_2025 --out ~/Desktop/youmd-env-vault"
|
|
357
375
|
echo "[you.md] Then share local decrypt access to registered trusted Macs:"
|
|
358
|
-
echo "
|
|
376
|
+
echo "you env vault share"
|
|
359
377
|
echo "[you.md] Then retry on this Mac:"
|
|
360
|
-
echo "
|
|
378
|
+
echo "you env vault pull --restore --root \\"$ROOT\\" --map-existing --existing-only --skip-agent-auth"
|
|
361
379
|
echo "[you.md] This strict fresh-machine flow intentionally does not ask for a local vault passphrase on the new Mac by default."
|
|
362
380
|
echo "[you.md] Optional fallback: create a transferable local copy without account sync:"
|
|
363
|
-
echo "
|
|
381
|
+
echo "you env backup --root ~/Desktop/CODE_2025 --out ~/Desktop/youmd-env-vault"
|
|
364
382
|
echo "[you.md] Local/iCloud auto-detect is opt-in only. Rerun with:"
|
|
365
|
-
echo "
|
|
383
|
+
echo "YOU_ALLOW_LOCAL_ENV_VAULT_FALLBACK=1 YOU_REQUIRE_ENV_VAULT=1 <same command>"
|
|
366
384
|
echo "[you.md] Move the generated env-vault-*.tar.enc file to this Mac, then rerun this command with:"
|
|
367
|
-
echo "
|
|
385
|
+
echo "YOU_ENV_VAULT=/path/to/env-vault-YYYYMMDDTHHMMZ.tar.enc YOU_REQUIRE_ENV_VAULT=1 <same command>"
|
|
368
386
|
echo "[you.md] Or restore manually after clone:"
|
|
369
|
-
echo "
|
|
370
|
-
if [ "\${YOUMD_REQUIRE_ENV_VAULT:-}" = "1" ]; then
|
|
387
|
+
echo "you env restore <vault> --root \\"$ROOT\\" --map-existing --existing-only --skip-agent-auth"
|
|
388
|
+
if [ "\${YOU_REQUIRE_ENV_VAULT:-\${YOUMD_REQUIRE_ENV_VAULT:-}}" = "1" ]; then
|
|
371
389
|
echo "[you.md] strict proof is waiting for trusted-device Secret Vault share or an explicitly provided local vault; stopping before readiness is marked complete" >&2
|
|
372
|
-
|
|
390
|
+
you agent send --channel machine-sync --kind status "fresh machine \$(hostname) stopped: waiting for trusted-device Secret Vault share or explicit local vault fallback" || true
|
|
373
391
|
exit 1
|
|
374
392
|
fi
|
|
375
393
|
fi
|
|
394
|
+
echo "[you.md] reconciling identity/skills after env-vault and source-Mac updates"
|
|
395
|
+
you pull || true
|
|
396
|
+
you sync || true
|
|
397
|
+
you agent send --channel machine-sync --kind status "fresh machine \$(hostname) reconciled You.md bundle after env-vault handling" || true
|
|
376
398
|
echo "[you.md] rehydrating portfolio graph with local README/project-context/env-key evidence"
|
|
377
|
-
run_with_timeout "$HYDRATE_TIMEOUT"
|
|
399
|
+
run_with_timeout "$HYDRATE_TIMEOUT" you project portfolio-hydrate --root "$ROOT" --days "$DAYS" --limit "$LIMIT" || true
|
|
378
400
|
echo "[you.md] auditing cloned project readiness"
|
|
379
|
-
|
|
380
|
-
|
|
401
|
+
you machine verify --root "$ROOT" --max-projects "$LIMIT" --write-report --sync-report || true
|
|
402
|
+
you agent send --channel machine-sync --kind status "fresh machine \$(hostname) synced machine readiness proof for $ROOT" || true
|
|
381
403
|
FULL_PROJECT_SET_COMPLETE=0
|
|
382
|
-
EXPAND_TO_90="\${YOUMD_EXPAND_TO_90_DAYS:-}"
|
|
383
|
-
if [ -z "$EXPAND_TO_90" ] && [ "\${YOUMD_SKIP_90_DAY_EXPANSION_PROMPT:-}" != "1" ] && [ -t 0 ]; then
|
|
404
|
+
EXPAND_TO_90="\${YOU_EXPAND_TO_90_DAYS:-\${YOUMD_EXPAND_TO_90_DAYS:-}}"
|
|
405
|
+
if [ -z "$EXPAND_TO_90" ] && [ "\${YOU_SKIP_90_DAY_EXPANSION_PROMPT:-\${YOUMD_SKIP_90_DAY_EXPANSION_PROMPT:-}}" != "1" ] && [ -t 0 ]; then
|
|
384
406
|
printf "\\n[you.md] expand to all active projects from the last \${EXPAND_DAYS} days before calling setup complete? [y/N] "
|
|
385
407
|
read -r EXPAND_TO_90
|
|
386
408
|
fi
|
|
387
409
|
case "$EXPAND_TO_90" in
|
|
388
410
|
y|Y|yes|YES|1|true|TRUE)
|
|
389
411
|
echo "[you.md] expanding workspace to active \${EXPAND_DAYS}-day project set"
|
|
390
|
-
run_with_timeout "$HYDRATE_TIMEOUT"
|
|
412
|
+
run_with_timeout "$HYDRATE_TIMEOUT" you project portfolio-hydrate --root "$ROOT" --days "$EXPAND_DAYS" --limit "$LIMIT" || true
|
|
391
413
|
EXPAND_PROJECT_ARGS=(--root "$ROOT" --days "$EXPAND_DAYS" "\${RECENT_ONLY_ARGS[@]}")
|
|
392
|
-
if [ -n "
|
|
393
|
-
EXPAND_PROJECT_ARGS+=(--max-clone-projects "$
|
|
414
|
+
if [ -n "$MAX_CLONE_PROJECTS" ]; then
|
|
415
|
+
EXPAND_PROJECT_ARGS+=(--max-clone-projects "$MAX_CLONE_PROJECTS")
|
|
394
416
|
fi
|
|
395
417
|
run_machine_projects_recent_only "\${EXPAND_PROJECT_ARGS[@]}" --dry-run || true
|
|
396
418
|
run_machine_projects_recent_only "\${EXPAND_PROJECT_ARGS[@]}"
|
|
397
|
-
run_with_timeout "$HYDRATE_TIMEOUT"
|
|
398
|
-
|
|
399
|
-
|
|
419
|
+
run_with_timeout "$HYDRATE_TIMEOUT" you project portfolio-hydrate --root "$ROOT" --days "$EXPAND_DAYS" --limit "$LIMIT" || true
|
|
420
|
+
you machine verify --root "$ROOT" --max-projects "$LIMIT" --write-report --sync-report || true
|
|
421
|
+
you agent send --channel machine-sync --kind status "fresh machine \$(hostname) expanded to active/focused \${EXPAND_DAYS}-day project set and synced proof" || true
|
|
400
422
|
FULL_PROJECT_SET_COMPLETE=1
|
|
401
423
|
;;
|
|
402
424
|
*)
|
|
403
425
|
echo "[you.md] stopped after the \${DAYS}-day active project setup; \${EXPAND_DAYS}-day expansion remains intentionally open."
|
|
404
426
|
;;
|
|
405
427
|
esac
|
|
406
|
-
if [ "\${YOUMD_RUN_CHECKS:-}" = "1" ]; then
|
|
428
|
+
if [ "\${YOU_RUN_CHECKS:-\${YOUMD_RUN_CHECKS:-}}" = "1" ]; then
|
|
407
429
|
echo "[you.md] running bounded package checks"
|
|
408
|
-
|
|
430
|
+
you machine verify --root "$ROOT" --max-projects "$LIMIT" --run-checks --max-check-projects "\${YOU_MAX_CHECK_PROJECTS:-\${YOUMD_MAX_CHECK_PROJECTS:-8}}" --check-timeout-ms "\${YOU_CHECK_TIMEOUT_MS:-\${YOUMD_CHECK_TIMEOUT_MS:-120000}}" --write-report --sync-report || true
|
|
409
431
|
else
|
|
410
|
-
echo "[you.md] bounded package checks skipped; set
|
|
432
|
+
echo "[you.md] bounded package checks skipped; set YOU_RUN_CHECKS=1 to run lint/typecheck/test/build caps"
|
|
411
433
|
fi
|
|
412
|
-
if [ "\${YOUMD_INSTALL_DEPS:-}" = "1" ] || [ "\${YOUMD_PROBE_SERVERS:-}" = "1" ]; then
|
|
434
|
+
if [ "\${YOU_INSTALL_DEPS:-\${YOUMD_INSTALL_DEPS:-}}" = "1" ] || [ "\${YOU_PROBE_SERVERS:-\${YOUMD_PROBE_SERVERS:-}}" = "1" ]; then
|
|
413
435
|
echo "[you.md] running bounded clean-host install/server proof"
|
|
414
436
|
VERIFY_ARGS=(--root "$ROOT" --max-projects "$LIMIT")
|
|
415
|
-
if [ "\${YOUMD_INSTALL_DEPS:-}" = "1" ]; then
|
|
416
|
-
VERIFY_ARGS+=(--install-deps --max-install-projects "\${YOUMD_MAX_INSTALL_PROJECTS:-4}" --install-timeout-ms "\${YOUMD_INSTALL_TIMEOUT_MS:-180000}")
|
|
437
|
+
if [ "\${YOU_INSTALL_DEPS:-\${YOUMD_INSTALL_DEPS:-}}" = "1" ]; then
|
|
438
|
+
VERIFY_ARGS+=(--install-deps --max-install-projects "\${YOU_MAX_INSTALL_PROJECTS:-\${YOUMD_MAX_INSTALL_PROJECTS:-4}}" --install-timeout-ms "\${YOU_INSTALL_TIMEOUT_MS:-\${YOUMD_INSTALL_TIMEOUT_MS:-180000}}")
|
|
417
439
|
fi
|
|
418
|
-
if [ "\${YOUMD_PROBE_SERVERS:-}" = "1" ]; then
|
|
419
|
-
VERIFY_ARGS+=(--probe-servers --max-server-projects "\${YOUMD_MAX_SERVER_PROJECTS:-3}" --server-timeout-ms "\${YOUMD_SERVER_TIMEOUT_MS:-45000}" --server-start-port "\${YOUMD_SERVER_START_PORT:-4310}")
|
|
440
|
+
if [ "\${YOU_PROBE_SERVERS:-\${YOUMD_PROBE_SERVERS:-}}" = "1" ]; then
|
|
441
|
+
VERIFY_ARGS+=(--probe-servers --max-server-projects "\${YOU_MAX_SERVER_PROJECTS:-\${YOUMD_MAX_SERVER_PROJECTS:-3}}" --server-timeout-ms "\${YOU_SERVER_TIMEOUT_MS:-\${YOUMD_SERVER_TIMEOUT_MS:-45000}}" --server-start-port "\${YOU_SERVER_START_PORT:-\${YOUMD_SERVER_START_PORT:-4310}}")
|
|
420
442
|
fi
|
|
421
|
-
|
|
443
|
+
you machine verify "\${VERIFY_ARGS[@]}" --write-report --sync-report || true
|
|
422
444
|
else
|
|
423
|
-
echo "[you.md] clean-host install/server proof skipped; set
|
|
445
|
+
echo "[you.md] clean-host install/server proof skipped; set YOU_INSTALL_DEPS=1 and YOU_PROBE_SERVERS=1 to install deps and smoke-probe local dev servers"
|
|
424
446
|
fi
|
|
425
447
|
echo "[you.md] confirming resident realtime/identity/skillstack/project-context daemons"
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
448
|
+
you stack daemon install || true
|
|
449
|
+
you stack daemon status || true
|
|
450
|
+
run_agent_stack_inventory
|
|
451
|
+
echo "[you.md] running final one-command machine sync/proof consolidation"
|
|
452
|
+
you machine sync-now --root "$ROOT" --max-projects "$LIMIT" || true
|
|
453
|
+
you status
|
|
429
454
|
if [ "$FULL_PROJECT_SET_COMPLETE" = "1" ]; then
|
|
430
455
|
echo "[you.md] fresh-machine full \${EXPAND_DAYS}-day project setup complete: $ROOT"
|
|
431
|
-
|
|
456
|
+
you agent send --channel machine-sync --kind status "fresh machine \$(hostname) complete: full \${EXPAND_DAYS}-day active/focused setup at $ROOT" || true
|
|
432
457
|
else
|
|
433
458
|
echo "[you.md] fresh-machine \${DAYS}-day setup pass complete; \${EXPAND_DAYS}-day expansion is still open: $ROOT"
|
|
434
|
-
|
|
459
|
+
you agent send --channel machine-sync --kind status "fresh machine \$(hostname) complete for \${DAYS}-day active/focused pass at $ROOT; \${EXPAND_DAYS}-day expansion still open" || true
|
|
435
460
|
fi`;
|
|
436
461
|
}
|
|
437
462
|
function buildFreshMachineBootstrapCommand(options = {}) {
|
|
438
463
|
const assignments = [
|
|
439
|
-
envAssignment("
|
|
440
|
-
envAssignment("
|
|
441
|
-
envAssignment("
|
|
442
|
-
envAssignment("
|
|
443
|
-
envAssignment("
|
|
444
|
-
envAssignment("
|
|
445
|
-
envAssignment("
|
|
464
|
+
envAssignment("YOU_API_KEY", options.apiKey),
|
|
465
|
+
envAssignment("YOU_CODE_ROOT", portableHomePath(options.root), { expandHome: true }),
|
|
466
|
+
envAssignment("YOU_ACTIVE_DAYS", options.days ?? exports.DEFAULT_FRESH_MACHINE_DAYS),
|
|
467
|
+
envAssignment("YOU_PROJECT_LIMIT", options.limit ?? exports.DEFAULT_FRESH_MACHINE_LIMIT),
|
|
468
|
+
envAssignment("YOU_MAX_CLONE_PROJECTS", options.maxCloneProjects),
|
|
469
|
+
envAssignment("YOU_ENV_VAULT", portableHomePath(options.envVaultPath), { expandHome: true }),
|
|
470
|
+
envAssignment("YOU_REQUIRE_ENV_VAULT", options.requireEnvVault ? "1" : undefined),
|
|
446
471
|
].filter((value) => Boolean(value));
|
|
447
|
-
const pathPrefix = `PATH="$HOME/.youmd/bin:$HOME/.youmd/npm-global/bin:/opt/homebrew/opt/node@22/bin:/usr/local/opt/node@22/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"`;
|
|
472
|
+
const pathPrefix = `PATH="$HOME/.you/bin:$HOME/.you/npm-global/bin:$HOME/.youmd/bin:$HOME/.youmd/npm-global/bin:/opt/homebrew/opt/node@22/bin:/usr/local/opt/node@22/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"`;
|
|
448
473
|
return `${[pathPrefix, ...assignments].join(" ")} bash -lc ${shellQuote(buildFreshMachineBootstrapScript())}`;
|
|
449
474
|
}
|
|
450
475
|
function buildFreshMachineBootstrapPrompt(options = {}) {
|
|
@@ -459,13 +484,13 @@ function buildFreshMachineBootstrapPrompt(options = {}) {
|
|
|
459
484
|
return [
|
|
460
485
|
"You are Claude Code or Codex running on my brand-new Mac.",
|
|
461
486
|
"",
|
|
462
|
-
"Goal: set up this blank computer so it has my You.md identity context, shared skills/stacks, MCP wiring, agent preferences/prompts, active project repos, encrypted `.env.local` files, machine proof sync, and resident sync behavior from my source Mac.",
|
|
487
|
+
"Goal: set up this blank computer so it has my You.md identity context, shared skills/stacks, MCP wiring, agent preferences/prompts, active project repos, encrypted `.env.local` files, local/global agent stack inventory, machine proof sync, and resident sync behavior from my source Mac.",
|
|
463
488
|
"",
|
|
464
489
|
"Do not just explain this. Execute the setup, stream progress, and verify the result. Run the exact command below in the terminal first.",
|
|
465
490
|
"",
|
|
466
491
|
authLine,
|
|
467
492
|
"",
|
|
468
|
-
"Behind-the-scenes operating rule: use the You.md CLI and You Agent yourself before asking Houston to do anything. Run deterministic commands like `
|
|
493
|
+
"Behind-the-scenes operating rule: use the You.md CLI and You Agent yourself before asking Houston to do anything. Run deterministic commands like `you status`, `you whoami`, `you pull`, `you sync`, `you skill install all`, `you skill sync`, `you skill inventory`, `you env vault list`, `you env vault device-register`, `you env vault pull --restore`, `you machine prompt`, `you machine verify`, `you project portfolio-hydrate`, and `you agent status` as needed. Use `you agent send --channel machine-sync --kind status \"...\"` to report setup milestones back to Houston's other trusted Macs over the realtime agent bus. Use `you` / `you chat` only when you need the You Agent to synthesize or route context, then turn its output into concrete shell actions. Interrupt Houston only for true human-gated steps: GitHub browser auth, source-Mac Secret Vault share if the trusted-device envelope has not been created yet, local vault passphrase/Keychain only when `YOU_ALLOW_LOCAL_ENV_VAULT_FALLBACK=1` or `YOU_ENV_VAULT` is explicitly provided, npm OTP, OS permissions, or an explicit choice such as the 90-day expansion.",
|
|
469
494
|
"",
|
|
470
495
|
"Exact setup command:",
|
|
471
496
|
"",
|
|
@@ -476,32 +501,36 @@ function buildFreshMachineBootstrapPrompt(options = {}) {
|
|
|
476
501
|
"What it will do:",
|
|
477
502
|
"- check/install the local prerequisites first: Homebrew, Node 22/npm, git, GitHub CLI, bun, and pnpm/corepack",
|
|
478
503
|
"- install You.md from the curl runtime and force the You.md/Homebrew/Node 22 paths into this setup shell",
|
|
504
|
+
"- prove the canonical `~/.you` home migration while preserving legacy `~/.youmd` fallback",
|
|
479
505
|
"- authenticate and pull/sync your identity bundle",
|
|
480
506
|
"- install resident realtime sync daemons early so identity/skill/project-context sync is not deferred until the end",
|
|
481
507
|
"- require GitHub CLI auth before private shared-skill/project repos clone; if browser auth fails inside Claude/Codex, it prints the exact Terminal command to run and stops cleanly",
|
|
482
508
|
"- install/configure MCP for Claude Code and Codex",
|
|
483
509
|
"- restore shared agent skills, stack config, Claude/Codex links, and agent host config",
|
|
510
|
+
"- generate a secret-safe local/global agent stack inventory under `~/.you/agent-stack-inventory` after shared skills are restored and again near final proof",
|
|
484
511
|
"- use the installed You.md CLI behind the scenes for status, skill sync, Secret Vault pull, portfolio graph hydration, machine verification, and You Agent context routing instead of making Houston manually drive those steps",
|
|
485
|
-
"- publish setup milestones through `
|
|
512
|
+
"- publish setup milestones through `you agent send` so Houston's source Mac and realtime daemon can see the Mac mini come online without clipboard babysitting",
|
|
486
513
|
"- hydrate the portfolio graph from You.md + authenticated GitHub before cloning",
|
|
487
514
|
`- preview the graph-backed plan, create ${root}, and clone only projects marked ACTIVE plus Top Priority/Focusing from the last ${days} days first`,
|
|
488
515
|
`- ask whether to expand to all ACTIVE plus Top Priority/Focusing projects from the last ${expandDays} days before calling the full project clone set complete`,
|
|
489
|
-
"- check env-vault tooling, register this Mac as a trusted Secret Vault device, pull the latest account-backed You.md Secret Vault encrypted snapshot when available, unwrap the vault passphrase locally through a trusted-device key envelope, restore env files into existing cloned project dirs with `--map-existing --existing-only --skip-agent-auth`, or stop with the exact source-Mac `
|
|
516
|
+
"- check env-vault tooling, register this Mac as a trusted Secret Vault device, pull the latest account-backed You.md Secret Vault encrypted snapshot when available, unwrap the vault passphrase locally through a trusted-device key envelope, restore env files into existing cloned project dirs with `--map-existing --existing-only --skip-agent-auth`, or stop with the exact source-Mac `you env vault share` action instead of asking for a passphrase on the new Mac. Local/iCloud passphrase fallback runs only when `YOU_ALLOW_LOCAL_ENV_VAULT_FALLBACK=1` or `YOU_ENV_VAULT` is explicitly provided. After env handling, rehydrate local project/env evidence.",
|
|
517
|
+
"- reconcile `you pull && you sync` after env-vault handling so source-Mac bundle updates, new trusted-device envelopes, shared skills, and machine proof state do not leave this Mac showing `remote ahead`",
|
|
490
518
|
"- write and sync a secret-safe machine proof report, with optional bounded install/check/server proof flags",
|
|
491
|
-
"- bound portfolio hydration with `
|
|
519
|
+
"- bound portfolio hydration with `YOU_PORTFOLIO_HYDRATE_TIMEOUT_SECONDS` so large restored roots do not wedge setup",
|
|
492
520
|
"",
|
|
493
521
|
`Project source: You.md portfolio graph + authenticated GitHub recent repos, capped at ${limit} tracked projects before local audit evidence is merged. When the graph exists, new-computer setup clones only projects with status ACTIVE and focus Top Priority/Focusing; inactive, unsorted, on-ice, abandoned, killed, and unreviewed GitHub-only repos are skipped unless --include-inactive is explicitly used. First pass is ${days} days with out-of-window projects skipped; the ${expandDays}-day pass is explicit.`,
|
|
494
|
-
"Secret rule: .env.local values are never embedded here. Best path: on the old/source Mac, run `
|
|
522
|
+
"Secret rule: .env.local values are never embedded here. Best path: on the old/source Mac, run `you env vault push --root ~/Desktop/CODE_2025 --out ~/Desktop/youmd-env-vault` once, then after the new Mac registers itself run `you env vault share` on the source Mac. That uploads only encrypted archive bytes plus safe manifest metadata, and stores only per-device encrypted passphrase envelopes. A trusted new Mac pulls the encrypted snapshot after login and decrypts locally with its private device key; raw env values never hit the browser, chat, or You.md servers. If the envelope is missing, the command stops and sends a machine-sync status telling the source Mac to run `you env vault share`. Local fallback is opt-in only: run `you env backup --root ~/Desktop/CODE_2025 --out ~/Desktop/youmd-env-vault`, move the generated `env-vault-*.tar.enc` file to the new machine, then rerun with `YOU_ALLOW_LOCAL_ENV_VAULT_FALLBACK=1` or explicit `YOU_ENV_VAULT=/path/to/env-vault-*.tar.enc`. The restore path lists variable names/counts and target paths only, never values, maps old folder names onto cloned dirs, and skips agent auth config so it does not clobber the new machine's active Claude/Codex login.",
|
|
495
523
|
"",
|
|
496
524
|
"After the command finishes, report:",
|
|
497
|
-
"- the `
|
|
525
|
+
"- the `you status` sync state",
|
|
498
526
|
`- the \`${root}\` project count`,
|
|
499
527
|
"- whether the encrypted env vault restored",
|
|
500
528
|
"- whether Claude/Codex MCP config was installed",
|
|
529
|
+
"- where the agent stack inventory JSON/HTML was written",
|
|
501
530
|
"- the synced machine proof status",
|
|
502
531
|
"- whether I should expand to the 90-day active project set if I have not answered yet",
|
|
503
532
|
"",
|
|
504
|
-
"Done-ness rule: for real fresh-computer proof, set
|
|
533
|
+
"Done-ness rule: for real fresh-computer proof, set YOU_REQUIRE_ENV_VAULT=1 or pass --require-env-vault so the command fails instead of pretending setup is complete when the encrypted env vault is missing.",
|
|
505
534
|
].join("\n");
|
|
506
535
|
}
|
|
507
536
|
//# sourceMappingURL=machine-bootstrap-prompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine-bootstrap-prompt.js","sourceRoot":"","sources":["../../src/lib/machine-bootstrap-prompt.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,
|
|
1
|
+
{"version":3,"file":"machine-bootstrap-prompt.js","sourceRoot":"","sources":["../../src/lib/machine-bootstrap-prompt.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,4EAyXC;AAED,8EAaC;AAED,4EA6DC;AA9fD,uCAAyB;AAEZ,QAAA,0BAA0B,GAAG,oBAAoB,CAAC;AAClD,QAAA,0BAA0B,GAAG,EAAE,CAAC;AAChC,QAAA,iCAAiC,GAAG,EAAE,CAAC;AACvC,QAAA,2BAA2B,GAAG,EAAE,CAAC;AAY9C,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI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,CAAC,sFAAsF,CAAC;IAE3F,OAAO;QACL,2DAA2D;QAC3D,EAAE;QACF,gSAAgS;QAChS,EAAE;QACF,yIAAyI;QACzI,EAAE;QACF,QAAQ;QACR,EAAE;QACF,gmCAAgmC;QAChmC,EAAE;QACF,sBAAsB;QACtB,EAAE;QACF,SAAS;QACT,OAAO;QACP,KAAK;QACL,EAAE;QACF,kBAAkB;QAClB,+GAA+G;QAC/G,0GAA0G;QAC1G,2FAA2F;QAC3F,mDAAmD;QACnD,qHAAqH;QACrH,qLAAqL;QACrL,mDAAmD;QACnD,wFAAwF;QACxF,8JAA8J;QAC9J,iOAAiO;QACjO,gKAAgK;QAChK,iFAAiF;QACjF,2CAA2C,IAAI,oFAAoF,IAAI,aAAa;QACpJ,2FAA2F,UAAU,0DAA0D;QAC/J,4oBAA4oB;QAC5oB,6MAA6M;QAC7M,6GAA6G;QAC7G,qHAAqH;QACrH,EAAE;QACF,yFAAyF,KAAK,uUAAuU,IAAI,kDAAkD,UAAU,wBAAwB;QAC7f,wrCAAwrC;QACxrC,EAAE;QACF,qCAAqC;QACrC,+BAA+B;QAC/B,WAAW,IAAI,kBAAkB;QACjC,4CAA4C;QAC5C,iDAAiD;QACjD,yDAAyD;QACzD,mCAAmC;QACnC,uFAAuF;QACvF,EAAE;QACF,8MAA8M;KAC/M,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -102,6 +102,48 @@ export interface MachineServerProbeReport {
|
|
|
102
102
|
skipped: number;
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
+
export interface MachineAgentStackInventoryProof {
|
|
106
|
+
status: "present";
|
|
107
|
+
jsonPath: string;
|
|
108
|
+
htmlPath?: string;
|
|
109
|
+
generatedAt?: string;
|
|
110
|
+
hostName?: string;
|
|
111
|
+
rootDir?: string;
|
|
112
|
+
inventorySchemaVersion?: string;
|
|
113
|
+
counts: {
|
|
114
|
+
uniqueSkillNames: number;
|
|
115
|
+
uniqueRealSkillFiles: number;
|
|
116
|
+
directExposureSkillRecords: number;
|
|
117
|
+
canonicalSkillFiles: number;
|
|
118
|
+
youmdCatalogSkills: number;
|
|
119
|
+
missingFromYoumdCatalog: number;
|
|
120
|
+
duplicateNameDifferentRealpaths: number;
|
|
121
|
+
sameRealpathMirrors: number;
|
|
122
|
+
projectSignals: number;
|
|
123
|
+
};
|
|
124
|
+
security: {
|
|
125
|
+
secretValuesExposed: false;
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
export interface MachineDaemonProof {
|
|
129
|
+
status: "ready" | "warn";
|
|
130
|
+
loaded: number;
|
|
131
|
+
total: number;
|
|
132
|
+
legacyLoaded: number;
|
|
133
|
+
warnings: string[];
|
|
134
|
+
labels: Array<{
|
|
135
|
+
label: string;
|
|
136
|
+
legacyLabel?: string;
|
|
137
|
+
name: string;
|
|
138
|
+
loaded: boolean;
|
|
139
|
+
legacyLoaded: boolean;
|
|
140
|
+
lastActivityAt?: string;
|
|
141
|
+
warning?: string;
|
|
142
|
+
}>;
|
|
143
|
+
security: {
|
|
144
|
+
secretValuesExposed: false;
|
|
145
|
+
};
|
|
146
|
+
}
|
|
105
147
|
export interface MachineVerificationProof {
|
|
106
148
|
schemaVersion: 1;
|
|
107
149
|
generatedAt: string;
|
|
@@ -113,6 +155,8 @@ export interface MachineVerificationProof {
|
|
|
113
155
|
installs?: MachineInstallReport;
|
|
114
156
|
checks?: MachineRunChecksReport;
|
|
115
157
|
servers?: MachineServerProbeReport;
|
|
158
|
+
agentStackInventory?: MachineAgentStackInventoryProof;
|
|
159
|
+
daemons: MachineDaemonProof;
|
|
116
160
|
summary: {
|
|
117
161
|
status: "ready" | "warn" | "failed";
|
|
118
162
|
scanned: number;
|
|
@@ -122,6 +166,9 @@ export interface MachineVerificationProof {
|
|
|
122
166
|
installPassed: number;
|
|
123
167
|
checksPassed: number;
|
|
124
168
|
serversPassed: number;
|
|
169
|
+
daemonsLoaded: number;
|
|
170
|
+
daemonsTotal: number;
|
|
171
|
+
legacyDaemonsLoaded: number;
|
|
125
172
|
failures: number;
|
|
126
173
|
warnings: string[];
|
|
127
174
|
};
|
|
@@ -130,6 +177,9 @@ export interface MachineVerificationProofWriteResult {
|
|
|
130
177
|
latestPath: string;
|
|
131
178
|
archivedPath: string;
|
|
132
179
|
}
|
|
180
|
+
export declare function buildMachineDaemonProof(): MachineDaemonProof;
|
|
181
|
+
export declare function defaultAgentStackInventoryDir(): string;
|
|
182
|
+
export declare function loadLatestAgentStackInventoryProof(outDir?: string): MachineAgentStackInventoryProof | null;
|
|
133
183
|
export declare function inspectMachineProject(projectDir: string): MachineProjectReadiness;
|
|
134
184
|
export declare function buildMachineReadinessReport(rootDir: string, maxProjects?: number): MachineReadinessReport;
|
|
135
185
|
export declare function runMachineProjectChecks(projects: MachineProjectReadiness[], options?: {
|
|
@@ -168,6 +218,7 @@ export declare function buildMachineVerificationProof(options: {
|
|
|
168
218
|
installs?: MachineInstallReport;
|
|
169
219
|
checks?: MachineRunChecksReport;
|
|
170
220
|
servers?: MachineServerProbeReport;
|
|
221
|
+
agentStackInventory?: MachineAgentStackInventoryProof | null;
|
|
171
222
|
generatedAt?: string;
|
|
172
223
|
}): MachineVerificationProof;
|
|
173
224
|
export declare function defaultMachineReportPath(): string;
|