@seaveyon/harness-switch 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -7
- package/package.json +1 -1
- package/public/assets/main.f63d80e0.js +1 -0
- package/public/index.html +1 -1
- package/public/assets/main.0229c9a5.js +0 -1
package/README.md
CHANGED
|
@@ -33,6 +33,10 @@ ssh -N -L 8787:127.0.0.1:8787 user@your-server
|
|
|
33
33
|
|
|
34
34
|
Then open <http://127.0.0.1:8787> in your local browser.
|
|
35
35
|
|
|
36
|
+
### Interface language
|
|
37
|
+
|
|
38
|
+
The web UI supports English and Simplified Chinese. Use the language button in the login page or dashboard header to switch languages. Chinese remains the default for existing behavior; your selection is stored in the browser and is reused on later visits. The setting affects only the web interface—it does not change profile data or generated configuration files.
|
|
39
|
+
|
|
36
40
|
## Configuration
|
|
37
41
|
|
|
38
42
|
Create one or more profiles per harness in the web UI. A profile holds a display name, API Base URL, API key, model, notes, and whatever extra fields that harness needs. Select **Activate** to make a profile current.
|
|
@@ -70,7 +74,7 @@ Two known limitations:
|
|
|
70
74
|
|
|
71
75
|
### Advanced: taking over the raw file
|
|
72
76
|
|
|
73
|
-
Any field the form does not expose can be set by editing the raw file content in the profile's
|
|
77
|
+
Any field the form does not expose can be set by editing the raw file content in the profile's **Advanced: raw configuration** section. Once edited, that file is generated from your text instead of the form fields until you select **Restore automatic generation**. Content that cannot be parsed back is rejected before it reaches disk.
|
|
74
78
|
|
|
75
79
|
### Backups and rollback
|
|
76
80
|
|
|
@@ -82,7 +86,7 @@ Switching away from a profile first reads the live file back into that profile's
|
|
|
82
86
|
|
|
83
87
|
### Moving every profile to another machine
|
|
84
88
|
|
|
85
|
-
Use
|
|
89
|
+
Use **Import / Export** in the top bar to create one `.hsw-backup` file containing every Harness profile, API key, raw-file override, and current activation choice. The bundle is encrypted with a migration password you choose, so it does not depend on the source machine's `aes-256-gcm.key`.
|
|
86
90
|
|
|
87
91
|
On the destination machine, select the bundle and enter the migration password. The UI shows profile counts and same-name conflicts before it writes anything. Import keeps destination profiles by default; overwriting is an explicit choice. Restoring the exported activation state is optional.
|
|
88
92
|
|
|
@@ -92,7 +96,7 @@ Keep the migration password separately from the bundle. It cannot be recovered f
|
|
|
92
96
|
|
|
93
97
|
### Provider Vault: shared credentials
|
|
94
98
|
|
|
95
|
-
The
|
|
99
|
+
The **Provider Vault** stores an API key once under a named entry with one or more named endpoints (each a base URL), encrypted with the same AES-256-GCM key that protects `profiles.json`. A profile can reference a vault entry instead of carrying its own key:
|
|
96
100
|
|
|
97
101
|
- The vault owns the credential; the profile keeps a materialized cache so existing readers (transfer export, `active.json`, `env.sh`) keep working unchanged.
|
|
98
102
|
- Rotating the vault key or an endpoint re-applies every **active** profile that references the entry, so the live files follow immediately. Failures are reported as warnings.
|
|
@@ -101,7 +105,7 @@ The **凭据库 (Provider Vault)** stores an API key once under a named entry wi
|
|
|
101
105
|
|
|
102
106
|
### Configuration drift
|
|
103
107
|
|
|
104
|
-
The dashboard's
|
|
108
|
+
The dashboard's **Configuration drift** panel compares what the active profile would render against the actual files on disk, using parsed-value comparison for JSON/TOML/YAML so a re-render that only reorders keys does not count as drift. Each file is reported as:
|
|
105
109
|
|
|
106
110
|
- `in-sync` — disk matches what the profile would write,
|
|
107
111
|
- `drifted` — disk differs from what the profile would write,
|
|
@@ -111,12 +115,12 @@ The dashboard's **配置漂移** panel compares what the active profile would re
|
|
|
111
115
|
|
|
112
116
|
Two repair actions are offered per harness:
|
|
113
117
|
|
|
114
|
-
-
|
|
115
|
-
-
|
|
118
|
+
- **Re-apply** rewrites the live files from the active profile, with the usual backup-before-write and all-or-nothing rollback.
|
|
119
|
+
- **Adopt live configuration** reads the live files back into the profile record (same path as the pre-switch backfill). It refuses with `409` when the profile has manual raw overrides, and never adopts content the tool itself could not parse.
|
|
116
120
|
|
|
117
121
|
### Diagnostics (Doctor)
|
|
118
122
|
|
|
119
|
-
The
|
|
123
|
+
The **Diagnostics (Doctor)** panel runs read-only checks per harness: whether the tool's CLI is on `PATH` (`install`), whether each target's config directory exists (`configDir`), whether each target file exists and is readable/writable (`files`, with a warning when a config file holding credentials is group/other-readable), whether the files parse (`parse`), and whether live state drifts from the active profile (`drift`). A global update check reports whether a newer release exists (`updatedAvailable`).
|
|
120
124
|
|
|
121
125
|
The connectivity probe is **disabled by default in the MVP**: passing `--probe` only records a `unknown`-status check that reports the active base URL and explains that no network request is made.
|
|
122
126
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seaveyon/harness-switch",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "A secure web control plane that switches API providers for Claude Code, Codex, Kimi Code, Pi and DeepSeek Harness by writing their native config files on SSH servers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|