@weave-os/router 0.2.36 → 0.2.37
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/bin.js +1 -1
- package/cc-statusline.sh +58 -11
- package/codex-skills/fm/SKILL.md +2 -1
- package/codex-skills/force-model/SKILL.md +2 -1
- package/codex-skills/list-models/SKILL.md +28 -0
- package/codex-skills/rf/SKILL.md +2 -1
- package/codex-skills/router-feedback/SKILL.md +2 -1
- package/codex-skills/router-models/SKILL.md +1 -1
- package/codex-skills/ufm/SKILL.md +2 -1
- package/codex-skills/unforce-model/SKILL.md +2 -1
- package/codex-status.sh +95 -3
- package/commands/list-models.md +5 -0
- package/commands/models.md +1 -1
- package/commands/router-models.md +1 -1
- package/directives.tsv +1 -0
- package/install.sh +317 -79
- package/package.json +2 -1
- package/pi-router/README.md +7 -2
- package/pi-router/src/auto-model.ts +118 -0
- package/pi-router/src/config.ts +34 -28
- package/pi-router/src/dispatch.ts +2 -2
- package/pi-router/src/index.ts +5 -1
- package/pi-router/src/pricing.generated.ts +7 -2
- package/pi-router/src/routed-model.ts +5 -4
- package/skills/build/SKILL.md +71 -0
- package/skills/build/agents/build-implementer.md +13 -0
- package/skills/build/agents/build-researcher.md +11 -0
- package/skills/build/agents/build-reviewer.md +13 -0
- package/skills/build/agents/build-verifier.md +13 -0
- package/skills/build/references/client-controls.md +34 -0
- package/skills/build/references/pr-loop.md +10 -0
- package/skills/build/references/research-and-interview.md +24 -0
- package/skills/build/references/verification-and-review.md +20 -0
- package/skills/build/references/worker-contracts.md +71 -0
- package/skills/build/scripts/pin-coordinator.sh +3 -0
- package/uninstall.sh +53 -3
- package/windows.js +3 -2
package/install.sh
CHANGED
|
@@ -248,27 +248,6 @@ print_uninstall_hint() {
|
|
|
248
248
|
"$C_BOLD" "$C_RESET" "$C_CYAN" "$(uninstall_cmd)" "$C_RESET"
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
# offer_launch asks to start the client named in $1 (command in the remaining
|
|
252
|
-
# args) so a working interactive install ends in the product. The client runs
|
|
253
|
-
# as a child, not via exec, so the EXIT trap still removes the temp files. It
|
|
254
|
-
# inherits the terminal stdin: Bun-based clients crash with EINVAL on macOS
|
|
255
|
-
# when stdin is /dev/tty, which kqueue can't watch.
|
|
256
|
-
offer_launch() {
|
|
257
|
-
local label="$1"; shift
|
|
258
|
-
[ "${WEAVE_SETUP_DEFER_LAUNCH:-}" != "1" ] && [ "$non_interactive" = "false" ] && [ "$quiet" != "true" ] \
|
|
259
|
-
&& [ -t 0 ] && [ -t 1 ] && command -v "${!#}" >/dev/null 2>&1 || return 0
|
|
260
|
-
local answer=""
|
|
261
|
-
printf "\n%sStart %s now?%s [Y/n] " "$C_BOLD" "$label" "$C_RESET" >/dev/tty
|
|
262
|
-
read -r answer </dev/tty || answer="n"
|
|
263
|
-
case "$answer" in
|
|
264
|
-
""|y|Y|yes|Yes) ;;
|
|
265
|
-
*) return 0 ;;
|
|
266
|
-
esac
|
|
267
|
-
local launch_status=0
|
|
268
|
-
"$@" || launch_status=$?
|
|
269
|
-
exit "$launch_status"
|
|
270
|
-
}
|
|
271
|
-
|
|
272
251
|
# ---------- banner ----------
|
|
273
252
|
#
|
|
274
253
|
# Print the WEAVE wordmark in brand orange. Skipped under --quiet or when
|
|
@@ -1345,9 +1324,10 @@ write_pi_models_config() {
|
|
|
1345
1324
|
| (if $name != "" then . + {"X-Weave-User-Name": $name } else . end)
|
|
1346
1325
|
')"
|
|
1347
1326
|
|
|
1348
|
-
#
|
|
1349
|
-
#
|
|
1350
|
-
# sync with
|
|
1327
|
+
# One "Weave Router" entry: the router picks the served model per request
|
|
1328
|
+
# from the organization's enabled models, so listing concrete models only
|
|
1329
|
+
# advertised choices pi never honored. Keep in sync with WEAVE_MODELS in
|
|
1330
|
+
# pi-router/src/config.ts, which replaces this list whenever the extension loads.
|
|
1351
1331
|
#
|
|
1352
1332
|
# baseUrl is the router ROOT (no /v1): pi's anthropic-messages provider uses
|
|
1353
1333
|
# @anthropic-ai/sdk, which appends /v1/messages itself. Unlike the codex block
|
|
@@ -1365,24 +1345,7 @@ write_pi_models_config() {
|
|
|
1365
1345
|
authHeader: false,
|
|
1366
1346
|
headers: $headers,
|
|
1367
1347
|
models: [
|
|
1368
|
-
{ id: "
|
|
1369
|
-
{ id: "claude-fable-5", name: "Claude Fable 5 (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 1000000, maxTokens: 128000 },
|
|
1370
|
-
{ id: "claude-opus-5-5", name: "Claude Opus 5.5 (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 1000000, maxTokens: 128000 },
|
|
1371
|
-
{ id: "claude-opus-5", name: "Claude Opus 5 (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 1000000, maxTokens: 128000 },
|
|
1372
|
-
{ id: "claude-sonnet-5-5", name: "Claude Sonnet 5.5 (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 1000000, maxTokens: 128000 },
|
|
1373
|
-
{ id: "claude-opus-4-7", name: "Claude Opus 4.7 (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 1000000, maxTokens: 64000 },
|
|
1374
|
-
{ id: "claude-sonnet-4-6", name: "Claude Sonnet 4.6 (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 1000000, maxTokens: 64000 },
|
|
1375
|
-
{ id: "claude-haiku-5-5", name: "Claude Haiku 5.5 (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 1000000, maxTokens: 128000 },
|
|
1376
|
-
{ id: "claude-haiku-4-5", name: "Claude Haiku 4.5 (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 200000, maxTokens: 32000 },
|
|
1377
|
-
{ id: "gpt-6-astra", name: "GPT-6 Astra (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 1050000, maxTokens: 128000 },
|
|
1378
|
-
{ id: "gpt-6-sol", name: "GPT-6 Sol (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 1050000, maxTokens: 128000 },
|
|
1379
|
-
{ id: "gpt-6.1-sol", name: "GPT-6.1 Sol (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 1050000, maxTokens: 128000 },
|
|
1380
|
-
{ id: "gpt-6.1-terra", name: "GPT-6.1 Terra (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 1050000, maxTokens: 128000 },
|
|
1381
|
-
{ id: "gpt-6-luna", name: "GPT-6 Luna (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 1050000, maxTokens: 128000 },
|
|
1382
|
-
{ id: "gpt-5.6-sol", name: "GPT-5.6 Sol (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 1050000, maxTokens: 128000 },
|
|
1383
|
-
{ id: "grok-4.5", name: "Grok 4.5 (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 500000, maxTokens: 131072 },
|
|
1384
|
-
{ id: "grok-4.6", name: "Grok 4.6 (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 500000, maxTokens: 131072 },
|
|
1385
|
-
{ id: "grok-4.7", name: "Grok 4.7 (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 500000, maxTokens: 131072 }
|
|
1348
|
+
{ id: "auto", name: "Weave Router", reasoning: true, input: ["text","image"], contextWindow: 1000000, maxTokens: 64000 }
|
|
1386
1349
|
]
|
|
1387
1350
|
}
|
|
1388
1351
|
')"
|
|
@@ -1400,10 +1363,11 @@ write_pi_models_config() {
|
|
|
1400
1363
|
chmod 600 "$config_file"
|
|
1401
1364
|
}
|
|
1402
1365
|
|
|
1403
|
-
# write_pi_settings_config makes
|
|
1404
|
-
#
|
|
1405
|
-
#
|
|
1406
|
-
#
|
|
1366
|
+
# write_pi_settings_config makes `weave/auto` pi's default and loads the npm
|
|
1367
|
+
# package named by $npm_package_name. defaultProvider is always set to "weave" —
|
|
1368
|
+
# the installer's job is to route via Weave; uninstall reverts it. defaultModel
|
|
1369
|
+
# is always "auto": it is the provider's only model, so any other value would
|
|
1370
|
+
# make pi fall back to a different provider. The
|
|
1407
1371
|
# npm package source is appended to `packages` idempotently — pi auto-installs
|
|
1408
1372
|
# missing packages on startup — and every known prior Weave package id
|
|
1409
1373
|
# (`@workweave/pi-router`, `@workweave/router`, `@weave-os/router`) except the
|
|
@@ -1424,12 +1388,12 @@ write_pi_settings_config() {
|
|
|
1424
1388
|
))
|
|
1425
1389
|
| (if (.packages | index($pkg)) then . else .packages += [$pkg] end)
|
|
1426
1390
|
| .defaultProvider = "weave"
|
|
1427
|
-
|
|
|
1391
|
+
| .defaultModel = "auto"
|
|
1428
1392
|
' "$settings_file")"
|
|
1429
1393
|
else
|
|
1430
1394
|
merged="$(jq -n --arg pkg "$pkg" '{
|
|
1431
1395
|
defaultProvider: "weave",
|
|
1432
|
-
defaultModel: "
|
|
1396
|
+
defaultModel: "auto",
|
|
1433
1397
|
packages: [$pkg]
|
|
1434
1398
|
}')"
|
|
1435
1399
|
fi
|
|
@@ -1602,7 +1566,7 @@ set_copilot_default_model() {
|
|
|
1602
1566
|
# are reused with the sigil and client names rewritten. Codex-only toggles and
|
|
1603
1567
|
# skills that depend on Codex session state are excluded.
|
|
1604
1568
|
copilot_skill_names() {
|
|
1605
|
-
weave_registry_skill_assets codex | grep -vxE 'disable-routing|router-session|router-models|models' || true
|
|
1569
|
+
weave_registry_skill_assets codex | grep -vxE 'disable-routing|router-session|list-models|router-models|models' || true
|
|
1606
1570
|
}
|
|
1607
1571
|
|
|
1608
1572
|
# install_copilot_skills installs each router directive as a Copilot skill.
|
|
@@ -1890,7 +1854,7 @@ if [ "$mode" = "setup" ]; then
|
|
|
1890
1854
|
chmod 600 "$setup_handoff"
|
|
1891
1855
|
fi
|
|
1892
1856
|
if [ "$setup_claude" = "true" ]; then
|
|
1893
|
-
WEAVE_SETUP_HANDOFF_FILE="$setup_handoff"
|
|
1857
|
+
WEAVE_SETUP_HANDOFF_FILE="$setup_handoff" bash "$0" "${setup_args[@]}" --claude \
|
|
1894
1858
|
|| { setup_status=$?; [ -z "$setup_handoff" ] || rm -f "$setup_handoff"; exit "$setup_status"; }
|
|
1895
1859
|
fi
|
|
1896
1860
|
if [ -n "$setup_handoff" ]; then
|
|
@@ -1902,10 +1866,9 @@ if [ "$mode" = "setup" ]; then
|
|
|
1902
1866
|
fi
|
|
1903
1867
|
if [ "$setup_codex" = "true" ]; then
|
|
1904
1868
|
WEAVE_SETUP_SHARED_KEY="$shared_key" WEAVE_SETUP_SHARED_EMAIL="$shared_email" \
|
|
1905
|
-
WEAVE_SETUP_IDENTITY_RESOLVED="$identity_resolved"
|
|
1869
|
+
WEAVE_SETUP_IDENTITY_RESOLVED="$identity_resolved" \
|
|
1906
1870
|
bash "$0" "${setup_args[@]}" --codex
|
|
1907
1871
|
fi
|
|
1908
|
-
[ -z "$shared_key" ] || [ -n "$install_dir" ] || offer_launch "Claude Code" claude
|
|
1909
1872
|
exit 0
|
|
1910
1873
|
fi
|
|
1911
1874
|
|
|
@@ -2259,6 +2222,7 @@ router-off||local-toggle|yes|yes|no|no|manual|command,skill
|
|
|
2259
2222
|
router-on||local-toggle|yes|yes|no|no|manual|command,skill
|
|
2260
2223
|
router-status||local-toggle|yes|yes|no|no|manual|command,skill
|
|
2261
2224
|
router-session||prompt|yes|yes|no|no|manual|command,skill
|
|
2225
|
+
list-models||prompt|yes|yes|no|no|manual|command,skill
|
|
2262
2226
|
router-models|models|local-toggle|yes|yes|no|no|manual|command,skill
|
|
2263
2227
|
disable-routing||local-toggle|no|yes|no|no|manual|skill
|
|
2264
2228
|
beta||prompt|yes|no|no|yes|manual|command
|
|
@@ -3093,7 +3057,7 @@ prepare_claude_context_window() {
|
|
|
3093
3057
|
model="${model:-sonnet}"
|
|
3094
3058
|
case "$model" in
|
|
3095
3059
|
*'[1m]') context_window=""; return 0 ;;
|
|
3096
|
-
sonnet|opus|fable|claude-sonnet-4-6|claude-sonnet-5|claude-sonnet-5-5|claude-haiku-5-5|claude-opus-4-6|claude-opus-4-7|claude-opus-4-8|claude-opus-5|claude-opus-5-5|claude-fable-5|claude-fable-5-1) ;;
|
|
3060
|
+
sonnet|opus|fable|claude-sonnet-4-6|claude-sonnet-5|claude-sonnet-5-5|claude-haiku-5-5|claude-opus-4-6|claude-opus-4-7|claude-opus-4-8|claude-opus-5|claude-opus-5-5|claude-fable-5|claude-fable-5-1|claude-fable-5-2) ;;
|
|
3097
3061
|
*) err "Cannot assert 1M support for '$model'. Select a supported Sonnet/Opus/Fable model first; leaving it unchanged."; return 1 ;;
|
|
3098
3062
|
esac
|
|
3099
3063
|
context_managed_model="${model}[1m]"
|
|
@@ -3566,9 +3530,11 @@ toggle_copilot() {
|
|
|
3566
3530
|
# refusal naming the dashboard.
|
|
3567
3531
|
|
|
3568
3532
|
# Public, unauthed catalog of everything the router can route to. Mounted in
|
|
3569
|
-
# both deployment modes, so it is the one listing that always works.
|
|
3570
|
-
|
|
3571
|
-
|
|
3533
|
+
# both deployment modes, so it is the one listing that always works. The scope
|
|
3534
|
+
# is explicit because the unscoped listing is a serving roster, which a managed
|
|
3535
|
+
# router cannot resolve without an admitted request.
|
|
3536
|
+
MODELS_CATALOG_PATH="/v1/router/models?scope=catalog"
|
|
3537
|
+
MODELS_DASHBOARD_URL="https://app.weaveos.com/organization/settings/weave-router/models"
|
|
3572
3538
|
|
|
3573
3539
|
# Set by models_api on every call.
|
|
3574
3540
|
models_http_status=""
|
|
@@ -4077,9 +4043,41 @@ run_login_claude() {
|
|
|
4077
4043
|
external_account_id="${account_uuid}:${organization_uuid}"
|
|
4078
4044
|
body="$(jq -nc --arg provider claude --arg account "$external_account_id" --arg token "$refresh_token" --arg label "$display_name" '{provider:$provider,external_account_id:$account,refresh_token:$token} | if $label != "" then .display_name = $label else . end')"
|
|
4079
4045
|
models_api POST "/v1/subscriptions/accounts" "$body" || models_fail "enrolling Claude subscription"
|
|
4046
|
+
forget_plan_warning claude
|
|
4080
4047
|
ok "Claude subscription enrolled."
|
|
4081
4048
|
}
|
|
4082
4049
|
|
|
4050
|
+
# A new login supersedes the statusline's cached "needs login" warning for
|
|
4051
|
+
# that provider in every install, without waiting for the next refresh. Each
|
|
4052
|
+
# edit holds the refresh's lock, so a fetch that predates the login cannot
|
|
4053
|
+
# land afterwards, and keeps the file's mtime, so the remaining providers'
|
|
4054
|
+
# warnings expire on their own schedule.
|
|
4055
|
+
forget_plan_warning() {
|
|
4056
|
+
local provider="$1" file lock plans owned tries
|
|
4057
|
+
for file in "${XDG_CACHE_HOME:-$HOME/.cache}"/weave-router/display-settings*.plans; do
|
|
4058
|
+
[ -f "$file" ] || continue
|
|
4059
|
+
lock="${file%.plans}.lock"
|
|
4060
|
+
owned=false tries=0
|
|
4061
|
+
while [ "$tries" -lt 10 ]; do
|
|
4062
|
+
if mkdir "$lock" 2>/dev/null; then owned=true; break; fi
|
|
4063
|
+
tries=$((tries + 1))
|
|
4064
|
+
sleep 1
|
|
4065
|
+
done
|
|
4066
|
+
plans="$(cat "$file" 2>/dev/null)"
|
|
4067
|
+
case " $plans " in
|
|
4068
|
+
*" $provider "*)
|
|
4069
|
+
plans="$(printf '%s' "$plans" | tr ' ' '\n' | grep -vx -- "$provider" | tr '\n' ' ' | sed 's/ *$//')" || true
|
|
4070
|
+
printf '%s' "$plans" >"$file.tmp.$$" 2>/dev/null \
|
|
4071
|
+
&& touch -r "$file" "$file.tmp.$$" 2>/dev/null \
|
|
4072
|
+
&& mv "$file.tmp.$$" "$file" 2>/dev/null
|
|
4073
|
+
rm -f "$file.tmp.$$" 2>/dev/null
|
|
4074
|
+
;;
|
|
4075
|
+
esac
|
|
4076
|
+
[ "$owned" = false ] || rmdir "$lock" 2>/dev/null
|
|
4077
|
+
done
|
|
4078
|
+
return 0
|
|
4079
|
+
}
|
|
4080
|
+
|
|
4083
4081
|
run_login_codex() {
|
|
4084
4082
|
local issuer device_response device_auth_id user_code interval authorization_response authorization_code verifier token_response refresh_token account_id display_name identity_token body attempts token_form
|
|
4085
4083
|
issuer="${WEAVE_CODEX_OAUTH_ISSUER:-https://auth.openai.com}"
|
|
@@ -4123,6 +4121,7 @@ run_login_codex() {
|
|
|
4123
4121
|
fi
|
|
4124
4122
|
body="$(jq -nc --arg provider codex --arg account "$account_id" --arg token "$refresh_token" --arg label "$display_name" '{provider:$provider,external_account_id:$account,refresh_token:$token} | if $label != "" then .display_name = $label else . end')"
|
|
4125
4123
|
models_api POST "/v1/subscriptions/accounts" "$body" || models_fail "enrolling Codex subscription"
|
|
4124
|
+
forget_plan_warning codex
|
|
4126
4125
|
ok "Codex subscription enrolled."
|
|
4127
4126
|
}
|
|
4128
4127
|
|
|
@@ -4813,7 +4812,7 @@ install_slash_commands() {
|
|
|
4813
4812
|
while IFS= read -r cmd; do
|
|
4814
4813
|
[ -f "$commands_src_dir/$cmd.md" ] || continue
|
|
4815
4814
|
case ",$cmd," in
|
|
4816
|
-
*,router-off,*|*,router-on,*|*,router-status,*|*,router-session,*|*,router-models,*|*,models,*)
|
|
4815
|
+
*,router-off,*|*,router-on,*|*,router-status,*|*,router-session,*|*,list-models,*|*,router-models,*|*,models,*)
|
|
4817
4816
|
[ "$target" = "claude" ] || continue ;;
|
|
4818
4817
|
esac
|
|
4819
4818
|
[ -n "$cmds" ] && cmds="$cmds "
|
|
@@ -5013,6 +5012,110 @@ $(weave_registry_skill_assets codex)
|
|
|
5013
5012
|
EOF
|
|
5014
5013
|
}
|
|
5015
5014
|
|
|
5015
|
+
# The build workflow skill is a resource tree (SKILL.md, references, scripts)
|
|
5016
|
+
# plus Claude Code agent definitions, so it is copied whole rather than through
|
|
5017
|
+
# the directive registry. It ships with the packaged installer and repo
|
|
5018
|
+
# checkouts; a standalone `curl | sh` install has no copy and skips it.
|
|
5019
|
+
build_skill_marker="<!-- weave-router managed build skill -->"
|
|
5020
|
+
build_skill_manifest=".weave-router-files"
|
|
5021
|
+
|
|
5022
|
+
build_skill_source_dir() {
|
|
5023
|
+
local candidate
|
|
5024
|
+
for candidate in "$script_dir/skills/build" "$script_dir/../skills/build"; do
|
|
5025
|
+
[ -f "$candidate/SKILL.md" ] || continue
|
|
5026
|
+
printf '%s' "$candidate"
|
|
5027
|
+
return 0
|
|
5028
|
+
done
|
|
5029
|
+
return 1
|
|
5030
|
+
}
|
|
5031
|
+
|
|
5032
|
+
# build_skill_entry_has_symlink reports whether any component of a manifest entry under the
|
|
5033
|
+
# skill dir is a symlink, so cleanup never follows a link out of the skill.
|
|
5034
|
+
build_skill_entry_has_symlink() {
|
|
5035
|
+
local path="$1" rel="$2"
|
|
5036
|
+
while [ -n "$rel" ]; do
|
|
5037
|
+
path="$path/${rel%%/*}"
|
|
5038
|
+
[ -L "$path" ] && return 0
|
|
5039
|
+
case "$rel" in */*) rel="${rel#*/}" ;; *) rel="" ;; esac
|
|
5040
|
+
done
|
|
5041
|
+
return 1
|
|
5042
|
+
}
|
|
5043
|
+
|
|
5044
|
+
# remove_build_skill_files deletes the files a previous install recorded in
|
|
5045
|
+
# the manifest, leaving anything the user added beside them.
|
|
5046
|
+
remove_build_skill_files() {
|
|
5047
|
+
local skill_dir="$1" rel
|
|
5048
|
+
if [ -L "$skill_dir/$build_skill_manifest" ]; then
|
|
5049
|
+
rm -f "$skill_dir/$build_skill_manifest"
|
|
5050
|
+
return 0
|
|
5051
|
+
fi
|
|
5052
|
+
[ -f "$skill_dir/$build_skill_manifest" ] || return 0
|
|
5053
|
+
while IFS= read -r rel; do
|
|
5054
|
+
case "$rel" in ""|/*|*..*) continue ;; esac
|
|
5055
|
+
if build_skill_entry_has_symlink "$skill_dir" "$rel"; then continue; fi
|
|
5056
|
+
rm -f "$skill_dir/$rel"
|
|
5057
|
+
done <"$skill_dir/$build_skill_manifest"
|
|
5058
|
+
rm -f "$skill_dir/$build_skill_manifest"
|
|
5059
|
+
rmdir "$skill_dir/references" "$skill_dir/scripts" 2>/dev/null || true
|
|
5060
|
+
}
|
|
5061
|
+
|
|
5062
|
+
install_build_skill() {
|
|
5063
|
+
local skills_dir="$1" agents_dir="${2:-}" src dst rel name agent_src agent_dst
|
|
5064
|
+
src="$(build_skill_source_dir)" || return 0
|
|
5065
|
+
dst="$skills_dir/build"
|
|
5066
|
+
if [ "$scope" = "project" ] || [ -n "$install_dir" ]; then
|
|
5067
|
+
refuse_if_symlink "$skills_dir"
|
|
5068
|
+
refuse_if_symlink "$dst"
|
|
5069
|
+
elif [ -L "$skills_dir" ] || [ -L "$dst" ]; then
|
|
5070
|
+
warn "Build skill path contains a symlink; leaving the build skill untouched."
|
|
5071
|
+
return 0
|
|
5072
|
+
fi
|
|
5073
|
+
if [ -e "$dst/SKILL.md" ] && { [ ! -f "$dst/SKILL.md" ] || ! grep -Fq "$build_skill_marker" "$dst/SKILL.md"; }; then
|
|
5074
|
+
warn "A user-owned build skill already exists at $dst; leaving it untouched."
|
|
5075
|
+
return 0
|
|
5076
|
+
fi
|
|
5077
|
+
remove_build_skill_files "$dst"
|
|
5078
|
+
mkdir -p "$dst"
|
|
5079
|
+
: >"$dst/$build_skill_manifest"
|
|
5080
|
+
while IFS= read -r rel; do
|
|
5081
|
+
if [ -L "$dst/$(dirname "$rel")" ] || [ -L "$dst/$rel" ]; then
|
|
5082
|
+
warn "Build skill file $dst/$rel is a symlink; leaving it untouched."
|
|
5083
|
+
continue
|
|
5084
|
+
fi
|
|
5085
|
+
mkdir -p "$dst/$(dirname "$rel")"
|
|
5086
|
+
cp "$src/$rel" "$dst/$rel"
|
|
5087
|
+
printf '%s\n' "$rel" >>"$dst/$build_skill_manifest"
|
|
5088
|
+
done <<EOS
|
|
5089
|
+
$(cd "$src" && find . -type f ! -path './agents/*' | sed 's#^\./##' | LC_ALL=C sort)
|
|
5090
|
+
EOS
|
|
5091
|
+
if [ ! -L "$dst/scripts" ] && [ ! -L "$dst/scripts/pin-coordinator.sh" ]; then
|
|
5092
|
+
chmod +x "$dst/scripts/pin-coordinator.sh"
|
|
5093
|
+
fi
|
|
5094
|
+
|
|
5095
|
+
if [ -n "$agents_dir" ] && [ -d "$src/agents" ]; then
|
|
5096
|
+
if [ "$scope" = "project" ] || [ -n "$install_dir" ]; then
|
|
5097
|
+
refuse_if_symlink "$agents_dir"
|
|
5098
|
+
elif [ -L "$agents_dir" ]; then
|
|
5099
|
+
warn "$agents_dir is a symlink; leaving build agents untouched."
|
|
5100
|
+
agents_dir=""
|
|
5101
|
+
fi
|
|
5102
|
+
fi
|
|
5103
|
+
if [ -n "$agents_dir" ] && [ -d "$src/agents" ]; then
|
|
5104
|
+
mkdir -p "$agents_dir"
|
|
5105
|
+
for agent_src in "$src"/agents/*.md; do
|
|
5106
|
+
[ -f "$agent_src" ] || continue
|
|
5107
|
+
name="$(basename "$agent_src" .md)"
|
|
5108
|
+
agent_dst="$agents_dir/$name.md"
|
|
5109
|
+
if [ -L "$agent_dst" ] || { [ -e "$agent_dst" ] && ! grep -Fq "<!-- weave-router managed agent: $name -->" "$agent_dst"; }; then
|
|
5110
|
+
warn "A user-owned agent already exists at $agent_dst; leaving it untouched."
|
|
5111
|
+
continue
|
|
5112
|
+
fi
|
|
5113
|
+
cp "$agent_src" "$agent_dst"
|
|
5114
|
+
done
|
|
5115
|
+
fi
|
|
5116
|
+
ok "Build skill installed at $dst"
|
|
5117
|
+
}
|
|
5118
|
+
|
|
5016
5119
|
# ---------- post-install verification (shared by every target) ----------
|
|
5017
5120
|
#
|
|
5018
5121
|
# Every client gets the same two probes — reach the router, then prove the key
|
|
@@ -5219,7 +5322,6 @@ print_next_steps() {
|
|
|
5219
5322
|
# finish_install closes a Claude Code or Codex run. Only a working first install
|
|
5220
5323
|
# gets onboarding; a failed check or an update must not invite the user in.
|
|
5221
5324
|
finish_install() {
|
|
5222
|
-
local label="$1"; shift
|
|
5223
5325
|
if [ "$mode" = "install" ] && [ "$quiet" != "true" ] && [ -z "$install_dir" ] && [ "$key_verdict" = "valid" ]; then
|
|
5224
5326
|
local pkg="npx $npm_package_name" flags="--$target" feedback="type /rf <what happened> in Claude Code"
|
|
5225
5327
|
[ "$scope" = "project" ] && flags="$flags --scope project"
|
|
@@ -5231,7 +5333,6 @@ finish_install() {
|
|
|
5231
5333
|
printf " %-14s %s\n" "Turn back on" "$pkg on $flags"
|
|
5232
5334
|
printf " %-14s %s\n" "Give feedback" "$feedback"
|
|
5233
5335
|
printf " %-14s %s\n" "Uninstall" "$(uninstall_cmd)"
|
|
5234
|
-
offer_launch "$label" "$@"
|
|
5235
5336
|
elif [ "$mode" != "update" ]; then
|
|
5236
5337
|
print_uninstall_hint
|
|
5237
5338
|
fi
|
|
@@ -5395,8 +5496,93 @@ helper_dir="$(cd "$(dirname "$0")" 2>/dev/null && pwd -P)"
|
|
|
5395
5496
|
disabled_marker="$helper_dir/.weave-router-disabled"
|
|
5396
5497
|
router_badge_sentinel=$''
|
|
5397
5498
|
|
|
5499
|
+
display_hidden_file() {
|
|
5500
|
+
printf '%s/display-hidden-%s' "$state_root" "$(printf '%s' "$helper_dir" | cksum | tr -c '0-9' '-')"
|
|
5501
|
+
}
|
|
5502
|
+
|
|
5503
|
+
write_display_headers() {
|
|
5504
|
+
printf 'header = "X-Weave-Router-Key: %s"\n' "$2" >"$1"
|
|
5505
|
+
case "$3" in
|
|
5506
|
+
''|*[!A-Za-z0-9@._+-]*) ;;
|
|
5507
|
+
*) printf 'header = "X-Weave-User-Email: %s"\n' "$3" >>"$1" ;;
|
|
5508
|
+
esac
|
|
5509
|
+
}
|
|
5510
|
+
|
|
5511
|
+
refresh_display_settings() {
|
|
5512
|
+
local base_url="$1" header_file="$2" max_time="$3" display_url display_body hidden="0" hidden_file
|
|
5513
|
+
hidden_file="$(display_hidden_file)"
|
|
5514
|
+
display_url="${WEAVE_CODEX_DISPLAY_SETTINGS_URL:-}"
|
|
5515
|
+
if [ -z "$display_url" ]; then
|
|
5516
|
+
display_url="${base_url%/}"
|
|
5517
|
+
case "$display_url" in
|
|
5518
|
+
file://*) ;;
|
|
5519
|
+
*) display_url="${display_url%/v1}/v1/display-settings" ;;
|
|
5520
|
+
esac
|
|
5521
|
+
fi
|
|
5522
|
+
display_body="$(curl -fsS --max-time "$max_time" --max-filesize 8192 -K "$header_file" "$display_url" 2>/dev/null)" || return 0
|
|
5523
|
+
[ "$(jq -r '.hide_terminal_surfaces // false' <<<"$display_body" 2>/dev/null)" = "true" ] && hidden="1"
|
|
5524
|
+
printf '%s' "$hidden" >"$hidden_file.tmp.$$" 2>/dev/null && mv "$hidden_file.tmp.$$" "$hidden_file" 2>/dev/null
|
|
5525
|
+
rm -f "$hidden_file.tmp.$$" 2>/dev/null
|
|
5526
|
+
}
|
|
5527
|
+
|
|
5528
|
+
# A cold cache fetches the setting once in the foreground, briefly, so a
|
|
5529
|
+
# subject whose surfaces are hidden never sees a branded first title.
|
|
5530
|
+
display_file_younger_than() {
|
|
5531
|
+
local mtime now
|
|
5532
|
+
[ -f "$1" ] || return 1
|
|
5533
|
+
mtime="$(stat -c %Y "$1" 2>/dev/null || stat -f %m "$1" 2>/dev/null)" || return 1
|
|
5534
|
+
now="$(date +%s 2>/dev/null)" || return 1
|
|
5535
|
+
[ $(( now - mtime )) -lt "$2" ]
|
|
5536
|
+
}
|
|
5537
|
+
|
|
5538
|
+
# A cold cache, or a hidden setting past its grace window, fetches in the
|
|
5539
|
+
# foreground; a merely stale setting refreshes in the background. Failed
|
|
5540
|
+
# fetches are rate-limited by the .refreshed stamp.
|
|
5541
|
+
prime_display_settings() {
|
|
5542
|
+
local hidden_file stamp
|
|
5543
|
+
hidden_file="$(display_hidden_file)"
|
|
5544
|
+
stamp="$hidden_file.refreshed"
|
|
5545
|
+
[ -f "$stamp" ] || [ ! -f "$hidden_file" ] || stamp="$hidden_file"
|
|
5546
|
+
display_file_younger_than "$stamp" "${WEAVE_DISPLAY_SETTINGS_TTL_SECONDS:-300}" && return 0
|
|
5547
|
+
if [ -f "$hidden_file" ] && { [ "$(cat "$hidden_file" 2>/dev/null)" != "1" ] \
|
|
5548
|
+
|| display_file_younger_than "$hidden_file" "${WEAVE_DISPLAY_SETTINGS_HIDDEN_GRACE_SECONDS:-604800}"; }; then
|
|
5549
|
+
touch "$hidden_file.refreshed" 2>/dev/null
|
|
5550
|
+
( exec </dev/null >/dev/null 2>&1; prime_display_settings_now ) &
|
|
5551
|
+
return 0
|
|
5552
|
+
fi
|
|
5553
|
+
prime_display_settings_now
|
|
5554
|
+
}
|
|
5555
|
+
|
|
5556
|
+
prime_display_settings_now() {
|
|
5557
|
+
local endpoint header_file
|
|
5558
|
+
endpoint="$(read_codex_endpoint)" || return 0
|
|
5559
|
+
[ -n "$endpoint" ] || return 0
|
|
5560
|
+
mkdir -p "$state_root" 2>/dev/null || return 0
|
|
5561
|
+
touch "$(display_hidden_file).refreshed" 2>/dev/null
|
|
5562
|
+
header_file="$(mktemp "$state_root/.headers.XXXXXX")" || return 0
|
|
5563
|
+
chmod 600 "$header_file"
|
|
5564
|
+
write_display_headers "$header_file" "$(printf '%s' "$endpoint" | sed -n 2p)" "$(printf '%s' "$endpoint" | sed -n 3p)"
|
|
5565
|
+
refresh_display_settings "$(printf '%s' "$endpoint" | sed -n 1p)" "$header_file" 2
|
|
5566
|
+
rm -f "$header_file"
|
|
5567
|
+
}
|
|
5568
|
+
|
|
5569
|
+
codex_surfaces_hidden() {
|
|
5570
|
+
local hidden_file
|
|
5571
|
+
prime_display_settings
|
|
5572
|
+
hidden_file="$(display_hidden_file)"
|
|
5573
|
+
if [ ! -f "$hidden_file" ]; then
|
|
5574
|
+
display_file_younger_than "$hidden_file.refreshed" "${WEAVE_DISPLAY_SETTINGS_TTL_SECONDS:-300}"
|
|
5575
|
+
return
|
|
5576
|
+
fi
|
|
5577
|
+
[ "$(cat "$hidden_file" 2>/dev/null)" = "1" ] || return 1
|
|
5578
|
+
display_file_younger_than "$hidden_file" "${WEAVE_DISPLAY_SETTINGS_HIDDEN_GRACE_SECONDS:-604800}"
|
|
5579
|
+
}
|
|
5580
|
+
|
|
5398
5581
|
emit_title() {
|
|
5399
5582
|
local title="$1"
|
|
5583
|
+
case "$title" in
|
|
5584
|
+
"Weave Router"*) if codex_surfaces_hidden; then title="Codex"; fi ;;
|
|
5585
|
+
esac
|
|
5400
5586
|
if [ -n "${WEAVE_CODEX_STATUS_TITLE_FILE:-}" ]; then
|
|
5401
5587
|
printf '%s\n' "$title" >"$WEAVE_CODEX_STATUS_TITLE_FILE"
|
|
5402
5588
|
elif { [ -t 2 ] || [ "${async_title_enabled:-0}" = "1" ]; } && [ -w /dev/tty ]; then
|
|
@@ -5614,7 +5800,12 @@ read_codex_endpoint() {
|
|
|
5614
5800
|
sub(/^.*=[[:space:]]*"/, "", v); sub(/"$/, "", v)
|
|
5615
5801
|
if (key == "") key = v
|
|
5616
5802
|
}
|
|
5617
|
-
|
|
5803
|
+
match($0, /"?X-Weave-User-Email"?[[:space:]]*=[[:space:]]*"[^"]*"/) {
|
|
5804
|
+
v = substr($0, RSTART, RLENGTH)
|
|
5805
|
+
sub(/^.*=[[:space:]]*"/, "", v); sub(/"$/, "", v)
|
|
5806
|
+
if (email == "") email = v
|
|
5807
|
+
}
|
|
5808
|
+
END { if (url != "" && key != "") printf "%s\n%s\n%s\n", url, key, email }
|
|
5618
5809
|
' "$config" 2>/dev/null || true
|
|
5619
5810
|
}
|
|
5620
5811
|
|
|
@@ -5627,10 +5818,11 @@ refresh_session_cost() {
|
|
|
5627
5818
|
[ "${WEAVE_CODEX_STATUS_SAVINGS:-1}" = "0" ] && [ "${WEAVE_CODEX_STATUS_CONTEXT:-1}" = "0" ] && return 0
|
|
5628
5819
|
command -v curl >/dev/null 2>&1 || return 0
|
|
5629
5820
|
|
|
5630
|
-
local endpoint base_url key active_file state_lock
|
|
5821
|
+
local endpoint base_url key email active_file state_lock
|
|
5631
5822
|
endpoint="$(read_codex_endpoint)" || return 0
|
|
5632
5823
|
base_url="$(printf '%s' "$endpoint" | sed -n 1p)"
|
|
5633
5824
|
key="$(printf '%s' "$endpoint" | sed -n 2p)"
|
|
5825
|
+
email="$(printf '%s' "$endpoint" | sed -n 3p)"
|
|
5634
5826
|
[ -n "$base_url" ] && [ -n "$key" ] || return 0
|
|
5635
5827
|
|
|
5636
5828
|
mkdir -p "$state_root" 2>/dev/null || return 0
|
|
@@ -5663,7 +5855,8 @@ refresh_session_cost() {
|
|
|
5663
5855
|
esac
|
|
5664
5856
|
header_file="$(mktemp "$state_root/.headers.XXXXXX")" || exit 0
|
|
5665
5857
|
chmod 600 "$header_file"
|
|
5666
|
-
|
|
5858
|
+
write_display_headers "$header_file" "$key" "$email"
|
|
5859
|
+
refresh_display_settings "$base_url" "$header_file" 5
|
|
5667
5860
|
if ! body="$(curl -fsS --max-time 5 --max-filesize 8192 -K "$header_file" "$url" 2>/dev/null)"; then
|
|
5668
5861
|
rm -f "$header_file"
|
|
5669
5862
|
exit 0
|
|
@@ -6291,6 +6484,7 @@ if [ "$target" = "codex" ]; then
|
|
|
6291
6484
|
ok "Codex config written to $codex_config_file"
|
|
6292
6485
|
remove_obsolete_codex_prompt_wrappers "$codex_dir/prompts"
|
|
6293
6486
|
install_codex_prompt_skills
|
|
6487
|
+
install_build_skill "$codex_dir/skills"
|
|
6294
6488
|
|
|
6295
6489
|
# Project scope: ensure the per-teammate config (which holds the router key)
|
|
6296
6490
|
# is gitignored. The base URL is the same for every teammate, so a
|
|
@@ -6320,11 +6514,7 @@ if [ "$target" = "codex" ]; then
|
|
|
6320
6514
|
# point CODEX_HOME at the directory we wrote so Codex finds our config.
|
|
6321
6515
|
info "Run Codex with CODEX_HOME=$codex_dir codex so it picks up this config."
|
|
6322
6516
|
fi
|
|
6323
|
-
|
|
6324
|
-
finish_install "Codex" env CODEX_HOME="$codex_dir" codex
|
|
6325
|
-
else
|
|
6326
|
-
finish_install "Codex" codex
|
|
6327
|
-
fi
|
|
6517
|
+
finish_install
|
|
6328
6518
|
exit 0
|
|
6329
6519
|
fi
|
|
6330
6520
|
|
|
@@ -7144,21 +7334,33 @@ weave_hidden_gate() {
|
|
|
7144
7334
|
local cache="$cache_dir/display-settings${script_slug}"
|
|
7145
7335
|
local ttl="${WEAVE_DISPLAY_SETTINGS_TTL_SECONDS:-3600}"
|
|
7146
7336
|
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
local now mtime fresh="false"
|
|
7337
|
+
local grace="${WEAVE_DISPLAY_SETTINGS_HIDDEN_GRACE_SECONDS:-604800}"
|
|
7338
|
+
local now mtime fresh="false" stale_hidden="false"
|
|
7151
7339
|
now="$(date +%s 2>/dev/null)" || now=0
|
|
7340
|
+
|
|
7341
|
+
# Linked plans that need a fresh login. Only a refresh within the TTL is
|
|
7342
|
+
# trusted: an older list may name a plan that has since recovered.
|
|
7343
|
+
weave_disconnected_plans=""
|
|
7344
|
+
if [ -f "$cache.plans" ]; then
|
|
7345
|
+
mtime="$(stat -c %Y "$cache.plans" 2>/dev/null || stat -f %m "$cache.plans" 2>/dev/null)" || mtime=0
|
|
7346
|
+
if [ "$mtime" -gt 0 ] && [ $(( now - mtime )) -lt "$ttl" ]; then
|
|
7347
|
+
weave_disconnected_plans="$(cat "$cache.plans" 2>/dev/null)"
|
|
7348
|
+
fi
|
|
7349
|
+
fi
|
|
7152
7350
|
if [ -f "$cache" ]; then
|
|
7153
7351
|
mtime="$(stat -c %Y "$cache" 2>/dev/null || stat -f %m "$cache" 2>/dev/null)" || mtime=0
|
|
7154
7352
|
if [ -n "${mtime:-}" ] && [ "$mtime" -gt 0 ] && [ $(( now - mtime )) -lt "$ttl" ]; then
|
|
7155
7353
|
fresh="true"
|
|
7354
|
+
elif [ -n "${mtime:-}" ] && [ "$mtime" -gt 0 ] && [ $(( now - mtime )) -lt "$grace" ] \
|
|
7355
|
+
&& [ "$(cat "$cache" 2>/dev/null)" = "1" ]; then
|
|
7356
|
+
stale_hidden="true"
|
|
7156
7357
|
fi
|
|
7157
7358
|
fi
|
|
7158
7359
|
|
|
7159
|
-
# Foreground decision:
|
|
7160
|
-
#
|
|
7161
|
-
#
|
|
7360
|
+
# Foreground decision: a fresh cache decides. A hidden cache past the TTL
|
|
7361
|
+
# stays hidden for the grace period while it refreshes, so an hourly expiry
|
|
7362
|
+
# never flashes routing details to someone who must not see them. Anything
|
|
7363
|
+
# else renders normally so an unreachable router cannot wedge it blank.
|
|
7162
7364
|
if [ "$fresh" = "true" ]; then
|
|
7163
7365
|
[ "$(cat "$cache" 2>/dev/null)" = "1" ]
|
|
7164
7366
|
return
|
|
@@ -7224,6 +7426,9 @@ weave_hidden_gate() {
|
|
|
7224
7426
|
if [ -z "$key" ] && [ -f "$local_settings" ]; then
|
|
7225
7427
|
key="$(jq -r '.env.ANTHROPIC_CUSTOM_HEADERS // "" | split("\n")[] | select(startswith("X-Weave-Router-Key:")) | sub("^X-Weave-Router-Key:[[:space:]]*";"")' "$local_settings" 2>/dev/null | head -n1)"
|
|
7226
7428
|
fi
|
|
7429
|
+
if [ -z "$key" ] && [ -n "${ANTHROPIC_CUSTOM_HEADERS:-}" ]; then
|
|
7430
|
+
key="$(printf '%s\n' "$ANTHROPIC_CUSTOM_HEADERS" | sed -n 's/^X-Weave-Router-Key:[[:space:]]*\([A-Za-z0-9_-]*\)[[:space:]]*$/\1/p' | head -n1)"
|
|
7431
|
+
fi
|
|
7227
7432
|
if [ -z "$base_url" ] && [ -f "$settings" ]; then
|
|
7228
7433
|
base_url="$(jq -r '.env.ANTHROPIC_BASE_URL // empty' "$settings" 2>/dev/null)"
|
|
7229
7434
|
fi
|
|
@@ -7236,6 +7441,12 @@ weave_hidden_gate() {
|
|
|
7236
7441
|
header_file="$(mktemp "$cache_dir/.headers.XXXXXX")" || exit 0
|
|
7237
7442
|
chmod 600 "$header_file"
|
|
7238
7443
|
printf 'header = "X-Weave-Router-Key: %s"\n' "$key" >"$header_file"
|
|
7444
|
+
custom_headers="${ANTHROPIC_CUSTOM_HEADERS:-}"
|
|
7445
|
+
for f in "$settings" "$local_settings"; do
|
|
7446
|
+
[ -n "$custom_headers" ] || [ ! -f "$f" ] || custom_headers="$(jq -r '.env.ANTHROPIC_CUSTOM_HEADERS // ""' "$f" 2>/dev/null)"
|
|
7447
|
+
done
|
|
7448
|
+
printf '%s\n' "$custom_headers" | grep -E '^X-Weave-User-(Email|Name):[[:space:]]*[A-Za-z0-9@._+ -]+$' \
|
|
7449
|
+
| sed 's/^\(.*\)$/header = "\1"/' >>"$header_file" 2>/dev/null || true
|
|
7239
7450
|
if ! body="$(curl -fsS --max-time 5 -K "$header_file" "$url" 2>/dev/null)"; then
|
|
7240
7451
|
rm -f "$header_file"
|
|
7241
7452
|
exit 0
|
|
@@ -7253,7 +7464,18 @@ weave_hidden_gate() {
|
|
|
7253
7464
|
rm -f "$tmp" 2>/dev/null
|
|
7254
7465
|
) >/dev/null 2>&1 &
|
|
7255
7466
|
disown 2>/dev/null || true
|
|
7256
|
-
|
|
7467
|
+
# A cold cache waits briefly for its first refresh so a subject whose
|
|
7468
|
+
# surfaces are hidden does not see one full render before the cache exists.
|
|
7469
|
+
if [ ! -f "$cache" ] && [ ! -f "$cache.cold-waited" ]; then
|
|
7470
|
+
: >"$cache.cold-waited" 2>/dev/null
|
|
7471
|
+
local tries="${WEAVE_DISPLAY_SETTINGS_COLD_WAIT_TENTHS:-20}"
|
|
7472
|
+
while [ "$tries" -gt 0 ] && [ ! -f "$cache" ]; do
|
|
7473
|
+
sleep 0.1 2>/dev/null || break
|
|
7474
|
+
tries=$(( tries - 1 ))
|
|
7475
|
+
done
|
|
7476
|
+
[ "$(cat "$cache" 2>/dev/null)" = "1" ] && return 0
|
|
7477
|
+
fi
|
|
7478
|
+
[ "$stale_hidden" = "true" ]
|
|
7257
7479
|
}
|
|
7258
7480
|
|
|
7259
7481
|
if weave_hidden_gate </dev/null; then
|
|
@@ -7299,8 +7521,10 @@ prices='{
|
|
|
7299
7521
|
"input": {
|
|
7300
7522
|
"claude-fable-5": 0.01,
|
|
7301
7523
|
"claude-fable-5-1": 0.01,
|
|
7524
|
+
"claude-fable-5-2": 0.008,
|
|
7302
7525
|
"claude-haiku-4-5": 0.001,
|
|
7303
7526
|
"claude-haiku-5-5": 0.0001,
|
|
7527
|
+
"claude-mythos-5-2": 0.008,
|
|
7304
7528
|
"claude-opus-4-0": 0.015,
|
|
7305
7529
|
"claude-opus-4-1": 0.015,
|
|
7306
7530
|
"claude-opus-4-5": 0.005,
|
|
@@ -7364,6 +7588,7 @@ prices='{
|
|
|
7364
7588
|
"grok-4.6": 0.002,
|
|
7365
7589
|
"grok-4.7": 0.002,
|
|
7366
7590
|
"inclusionai/ling-3.0-flash": 0.00006,
|
|
7591
|
+
"meta/muse-spark-open": 0.00125,
|
|
7367
7592
|
"minimax/minimax-m2.7": 0.0003,
|
|
7368
7593
|
"minimax/minimax-m3": 0.0003,
|
|
7369
7594
|
"minimax/minimax-m3.1-flash": 0.00015,
|
|
@@ -7373,7 +7598,9 @@ prices='{
|
|
|
7373
7598
|
"moonshotai/kimi-k2.7": 0.00095,
|
|
7374
7599
|
"moonshotai/kimi-k3": 0.003,
|
|
7375
7600
|
"moonshotai/kimi-k3.1": 0.002,
|
|
7601
|
+
"muse-ember-1.0": 0.0001,
|
|
7376
7602
|
"muse-spark-1.3": 0.00125,
|
|
7603
|
+
"muse-wonder-1.0": 0.004,
|
|
7377
7604
|
"qwen/qwen3-235b-a22b-2507": 0.0002266,
|
|
7378
7605
|
"qwen/qwen3-30b-a3b-instruct-2507": 0.00015,
|
|
7379
7606
|
"qwen/qwen3-coder": 0.0009,
|
|
@@ -7395,8 +7622,10 @@ prices='{
|
|
|
7395
7622
|
"output": {
|
|
7396
7623
|
"claude-fable-5": 0.05,
|
|
7397
7624
|
"claude-fable-5-1": 0.05,
|
|
7625
|
+
"claude-fable-5-2": 0.04,
|
|
7398
7626
|
"claude-haiku-4-5": 0.005,
|
|
7399
7627
|
"claude-haiku-5-5": 0.0005,
|
|
7628
|
+
"claude-mythos-5-2": 0.04,
|
|
7400
7629
|
"claude-opus-4-0": 0.075,
|
|
7401
7630
|
"claude-opus-4-1": 0.075,
|
|
7402
7631
|
"claude-opus-4-5": 0.025,
|
|
@@ -7460,6 +7689,7 @@ prices='{
|
|
|
7460
7689
|
"grok-4.6": 0.006,
|
|
7461
7690
|
"grok-4.7": 0.006,
|
|
7462
7691
|
"inclusionai/ling-3.0-flash": 0.00018,
|
|
7692
|
+
"meta/muse-spark-open": 0.00425,
|
|
7463
7693
|
"minimax/minimax-m2.7": 0.0012,
|
|
7464
7694
|
"minimax/minimax-m3": 0.0012,
|
|
7465
7695
|
"minimax/minimax-m3.1-flash": 0.0006,
|
|
@@ -7469,7 +7699,9 @@ prices='{
|
|
|
7469
7699
|
"moonshotai/kimi-k2.7": 0.004,
|
|
7470
7700
|
"moonshotai/kimi-k3": 0.015,
|
|
7471
7701
|
"moonshotai/kimi-k3.1": 0.01,
|
|
7702
|
+
"muse-ember-1.0": 0.0005,
|
|
7472
7703
|
"muse-spark-1.3": 0.00425,
|
|
7704
|
+
"muse-wonder-1.0": 0.02,
|
|
7473
7705
|
"qwen/qwen3-235b-a22b-2507": 0.0009064,
|
|
7474
7706
|
"qwen/qwen3-30b-a3b-instruct-2507": 0.0006,
|
|
7475
7707
|
"qwen/qwen3-coder": 0.0027,
|
|
@@ -7491,8 +7723,10 @@ prices='{
|
|
|
7491
7723
|
"cache_read": {
|
|
7492
7724
|
"claude-fable-5": 0.1,
|
|
7493
7725
|
"claude-fable-5-1": 0.025,
|
|
7726
|
+
"claude-fable-5-2": 0.025,
|
|
7494
7727
|
"claude-haiku-4-5": 0.1,
|
|
7495
7728
|
"claude-haiku-5-5": 0.1,
|
|
7729
|
+
"claude-mythos-5-2": 0.025,
|
|
7496
7730
|
"claude-opus-4-0": 0.1,
|
|
7497
7731
|
"claude-opus-4-1": 0.1,
|
|
7498
7732
|
"claude-opus-4-5": 0.1,
|
|
@@ -7504,7 +7738,7 @@ prices='{
|
|
|
7504
7738
|
"claude-sonnet-4-5": 0.1,
|
|
7505
7739
|
"claude-sonnet-4-6": 0.1,
|
|
7506
7740
|
"claude-sonnet-5": 0.1,
|
|
7507
|
-
"claude-sonnet-5-5": 0.
|
|
7741
|
+
"claude-sonnet-5-5": 0.05,
|
|
7508
7742
|
"deepseek/deepseek-v4-flash": 0.1,
|
|
7509
7743
|
"deepseek/deepseek-v4-pro": 0.0862,
|
|
7510
7744
|
"deepseek/deepseek-v4-pro-0813": 0.0862,
|
|
@@ -7556,6 +7790,7 @@ prices='{
|
|
|
7556
7790
|
"grok-4.6": 0.25,
|
|
7557
7791
|
"grok-4.7": 0.25,
|
|
7558
7792
|
"inclusionai/ling-3.0-flash": 0.2,
|
|
7793
|
+
"meta/muse-spark-open": 0.12,
|
|
7559
7794
|
"minimax/minimax-m2.7": 0.2,
|
|
7560
7795
|
"minimax/minimax-m3": 0.2,
|
|
7561
7796
|
"minimax/minimax-m3.1-flash": 0.1,
|
|
@@ -7565,7 +7800,9 @@ prices='{
|
|
|
7565
7800
|
"moonshotai/kimi-k2.7": 0.2,
|
|
7566
7801
|
"moonshotai/kimi-k3": 0.1,
|
|
7567
7802
|
"moonshotai/kimi-k3.1": 0.1,
|
|
7803
|
+
"muse-ember-1.0": 0.04,
|
|
7568
7804
|
"muse-spark-1.3": 0.12,
|
|
7805
|
+
"muse-wonder-1.0": 0.05,
|
|
7569
7806
|
"qwen/qwen3-235b-a22b-2507": 0.5,
|
|
7570
7807
|
"qwen/qwen3-30b-a3b-instruct-2507": 0.1684,
|
|
7571
7808
|
"qwen/qwen3-coder": 0.1684,
|
|
@@ -7907,8 +8144,8 @@ if [ -n "${weave_disconnected_plans:-}" ]; then
|
|
|
7907
8144
|
fi
|
|
7908
8145
|
for weave_plan in ${weave_disconnected_plans:-}; do
|
|
7909
8146
|
case "$weave_plan" in
|
|
7910
|
-
claude) status_text="$status_text · Claude plan
|
|
7911
|
-
codex) status_text="$status_text · Codex plan
|
|
8147
|
+
claude) status_text="$status_text · Claude plan needs login: npx @weave-os/router login claude$weave_login_scope" ;;
|
|
8148
|
+
codex) status_text="$status_text · Codex plan needs login: npx @weave-os/router login codex$weave_login_scope" ;;
|
|
7912
8149
|
esac
|
|
7913
8150
|
done
|
|
7914
8151
|
|
|
@@ -8105,6 +8342,7 @@ fi
|
|
|
8105
8342
|
|
|
8106
8343
|
# Slash command wrappers — see install_slash_commands() below for the why.
|
|
8107
8344
|
install_slash_commands "$settings_dir/commands"
|
|
8345
|
+
install_build_skill "$settings_dir/skills" "$settings_dir/agents"
|
|
8108
8346
|
|
|
8109
8347
|
# ---------- gitignore for project scope ----------
|
|
8110
8348
|
|
|
@@ -8137,4 +8375,4 @@ verify_install
|
|
|
8137
8375
|
# ---------- done ----------
|
|
8138
8376
|
|
|
8139
8377
|
announce_done "Claude Code"
|
|
8140
|
-
finish_install
|
|
8378
|
+
finish_install
|