@workweave/router 0.2.0 → 0.2.2
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/cc-statusline.sh +2 -0
- package/commands/fm.md +6 -0
- package/commands/rf.md +6 -0
- package/commands/router-feedback.md +6 -0
- package/commands/ufm.md +5 -0
- package/install.sh +15 -10
- package/package.json +16 -6
- package/uninstall.sh +2 -2
package/cc-statusline.sh
CHANGED
|
@@ -129,6 +129,7 @@ normalize_model() {
|
|
|
129
129
|
# BEGIN_GENERATED_PRICES
|
|
130
130
|
prices='{
|
|
131
131
|
"input": {
|
|
132
|
+
"claude-fable-5": 0.01,
|
|
132
133
|
"claude-haiku-4-5": 0.0008,
|
|
133
134
|
"claude-opus-4-6": 0.005,
|
|
134
135
|
"claude-opus-4-7": 0.005,
|
|
@@ -180,6 +181,7 @@ prices='{
|
|
|
180
181
|
"z-ai/glm-5.1": 0.00105
|
|
181
182
|
},
|
|
182
183
|
"output": {
|
|
184
|
+
"claude-fable-5": 0.05,
|
|
183
185
|
"claude-haiku-4-5": 0.004,
|
|
184
186
|
"claude-opus-4-6": 0.025,
|
|
185
187
|
"claude-opus-4-7": 0.025,
|
package/commands/fm.md
ADDED
package/commands/rf.md
ADDED
package/commands/ufm.md
ADDED
package/install.sh
CHANGED
|
@@ -592,6 +592,7 @@ write_opencode_config() {
|
|
|
592
592
|
name: "Weave Router",
|
|
593
593
|
options: { apiKey: $key, baseURL: $url, headers: $headers },
|
|
594
594
|
models: {
|
|
595
|
+
"claude-fable-5": { name: "Claude Fable 5 (via Weave Router)" },
|
|
595
596
|
"claude-opus-4-8": { name: "Claude Opus 4.8 (via Weave Router)" },
|
|
596
597
|
"claude-opus-4-7": { name: "Claude Opus 4.7 (via Weave Router)" },
|
|
597
598
|
"claude-sonnet-4-6": { name: "Claude Sonnet 4.6 (via Weave Router)" },
|
|
@@ -684,6 +685,7 @@ write_pi_models_config() {
|
|
|
684
685
|
authHeader: false,
|
|
685
686
|
headers: $headers,
|
|
686
687
|
models: [
|
|
688
|
+
{ id: "claude-fable-5", name: "Claude Fable 5 (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 1000000, maxTokens: 128000 },
|
|
687
689
|
{ id: "claude-opus-4-8", name: "Claude Opus 4.8 (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 200000, maxTokens: 64000 },
|
|
688
690
|
{ id: "claude-opus-4-7", name: "Claude Opus 4.7 (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 200000, maxTokens: 64000 },
|
|
689
691
|
{ id: "claude-sonnet-4-6", name: "Claude Sonnet 4.6 (via Weave Router)", reasoning: true, input: ["text","image"], contextWindow: 200000, maxTokens: 64000 },
|
|
@@ -706,13 +708,14 @@ write_pi_models_config() {
|
|
|
706
708
|
}
|
|
707
709
|
|
|
708
710
|
# write_pi_settings_config makes the `weave` provider pi's default and loads the
|
|
709
|
-
# @workweave/router extension. defaultProvider
|
|
710
|
-
#
|
|
711
|
-
#
|
|
712
|
-
#
|
|
713
|
-
#
|
|
714
|
-
#
|
|
715
|
-
# here, so no
|
|
711
|
+
# @workweave/router extension. defaultProvider is always set to "weave" — the
|
|
712
|
+
# installer's job is to route via Weave; uninstall reverts it. defaultModel is set
|
|
713
|
+
# only when unset (don't clobber a user's model pick). The npm package source is
|
|
714
|
+
# appended to `packages` idempotently — pi auto-installs missing packages on
|
|
715
|
+
# startup — and the legacy `npm:@workweave/pi-router` id (from before the
|
|
716
|
+
# extension was folded into @workweave/router) is dropped so a config from the
|
|
717
|
+
# old layout can't keep a dangling/duplicate entry. No secret lives here, so no
|
|
718
|
+
# chmod 600.
|
|
716
719
|
#
|
|
717
720
|
# Usage: write_pi_settings_config <settings_file>
|
|
718
721
|
write_pi_settings_config() {
|
|
@@ -724,7 +727,7 @@ write_pi_settings_config() {
|
|
|
724
727
|
(.packages //= [])
|
|
725
728
|
| (.packages -= ["npm:@workweave/pi-router"])
|
|
726
729
|
| (if (.packages | index($pkg)) then . else .packages += [$pkg] end)
|
|
727
|
-
|
|
|
730
|
+
| .defaultProvider = "weave"
|
|
728
731
|
| (if (.defaultModel // "") == "" then .defaultModel = "claude-sonnet-4-6" else . end)
|
|
729
732
|
' "$settings_file")"
|
|
730
733
|
else
|
|
@@ -1615,8 +1618,8 @@ install_slash_commands() {
|
|
|
1615
1618
|
# installer to flip the *local* config, so they're Claude Code-only and need
|
|
1616
1619
|
# the install scope baked into the command (the .md can't discover it at
|
|
1617
1620
|
# invocation time). {{SCOPE}} is substituted accordingly.
|
|
1618
|
-
installed="force-model, unforce-model"
|
|
1619
|
-
cmds="force-model unforce-model"
|
|
1621
|
+
installed="force-model, unforce-model, router-feedback, fm, ufm, rf"
|
|
1622
|
+
cmds="force-model unforce-model router-feedback fm ufm rf"
|
|
1620
1623
|
if [ "$target" = "claude" ]; then
|
|
1621
1624
|
cmds="$cmds router-off router-on router-status"
|
|
1622
1625
|
installed="$installed, router-off, router-on, router-status"
|
|
@@ -1958,6 +1961,7 @@ normalize_model() {
|
|
|
1958
1961
|
# BEGIN_GENERATED_PRICES
|
|
1959
1962
|
prices='{
|
|
1960
1963
|
"input": {
|
|
1964
|
+
"claude-fable-5": 0.01,
|
|
1961
1965
|
"claude-haiku-4-5": 0.0008,
|
|
1962
1966
|
"claude-opus-4-6": 0.005,
|
|
1963
1967
|
"claude-opus-4-7": 0.005,
|
|
@@ -2009,6 +2013,7 @@ prices='{
|
|
|
2009
2013
|
"z-ai/glm-5.1": 0.00105
|
|
2010
2014
|
},
|
|
2011
2015
|
"output": {
|
|
2016
|
+
"claude-fable-5": 0.05,
|
|
2012
2017
|
"claude-haiku-4-5": 0.004,
|
|
2013
2018
|
"claude-opus-4-6": 0.025,
|
|
2014
2019
|
"claude-opus-4-7": 0.025,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workweave/router",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "One-command installer that points Claude Code, Codex, opencode, or pi at the Weave Router. For pi it also ships the routing extension, loaded via pi.extensions.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"weave-router": "bin.js"
|
|
@@ -34,11 +34,21 @@
|
|
|
34
34
|
"typebox": "*"
|
|
35
35
|
},
|
|
36
36
|
"peerDependenciesMeta": {
|
|
37
|
-
"@mariozechner/pi-agent-core": {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"@mariozechner/pi-
|
|
41
|
-
|
|
37
|
+
"@mariozechner/pi-agent-core": {
|
|
38
|
+
"optional": true
|
|
39
|
+
},
|
|
40
|
+
"@mariozechner/pi-ai": {
|
|
41
|
+
"optional": true
|
|
42
|
+
},
|
|
43
|
+
"@mariozechner/pi-coding-agent": {
|
|
44
|
+
"optional": true
|
|
45
|
+
},
|
|
46
|
+
"@mariozechner/pi-tui": {
|
|
47
|
+
"optional": true
|
|
48
|
+
},
|
|
49
|
+
"typebox": {
|
|
50
|
+
"optional": true
|
|
51
|
+
}
|
|
42
52
|
},
|
|
43
53
|
"repository": {
|
|
44
54
|
"type": "git",
|
package/uninstall.sh
CHANGED
|
@@ -364,7 +364,7 @@ if [ "$target" = "codex" ]; then
|
|
|
364
364
|
codex_prompts_dir="$codex_dir/prompts"
|
|
365
365
|
if [ -d "$codex_prompts_dir" ]; then
|
|
366
366
|
refuse_if_symlink "$codex_prompts_dir"
|
|
367
|
-
for cmd in force-model unforce-model; do
|
|
367
|
+
for cmd in force-model unforce-model router-feedback fm ufm rf; do
|
|
368
368
|
cmd_file="$codex_prompts_dir/$cmd.md"
|
|
369
369
|
if [ -f "$cmd_file" ]; then
|
|
370
370
|
refuse_if_symlink "$cmd_file"
|
|
@@ -505,7 +505,7 @@ done
|
|
|
505
505
|
commands_dir="$(dirname "$settings_file")/commands"
|
|
506
506
|
if [ -d "$commands_dir" ]; then
|
|
507
507
|
refuse_if_symlink "$commands_dir"
|
|
508
|
-
for cmd in force-model unforce-model router-off router-on router-status; do
|
|
508
|
+
for cmd in force-model unforce-model router-feedback fm ufm rf router-off router-on router-status; do
|
|
509
509
|
cmd_file="$commands_dir/$cmd.md"
|
|
510
510
|
if [ -f "$cmd_file" ]; then
|
|
511
511
|
refuse_if_symlink "$cmd_file"
|