zcode-agent 1.3.0 → 1.3.1
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 +4 -4
- package/lib/isolation.js +11 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<picture>
|
|
3
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/0xgeorgemathew/zcode-agent/
|
|
4
|
-
<img src="https://raw.githubusercontent.com/0xgeorgemathew/zcode-agent/
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/0xgeorgemathew/zcode-agent/403b95529a796bc4050577ae2ea6d9fe3016e2ce/docs/assets/hero-dark.svg">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/0xgeorgemathew/zcode-agent/403b95529a796bc4050577ae2ea6d9fe3016e2ce/docs/assets/hero-light.svg" width="960" alt="Your agent (Claude Code, Codex or any agent with a shell) writes the decisions and a task contract. zcode-agent runs parallel GLM-5.3 sessions that build, run their own checks and repair failures, and has a fresh GLM-5.3-Flash session judge screenshots. One handback line returns to your agent.">
|
|
5
5
|
</picture>
|
|
6
6
|
</p>
|
|
7
7
|
|
|
@@ -276,8 +276,8 @@ The counts come from each session's own engine database and include the executor
|
|
|
276
276
|
|
|
277
277
|
<p align="center">
|
|
278
278
|
<picture>
|
|
279
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/0xgeorgemathew/zcode-agent/
|
|
280
|
-
<img src="https://raw.githubusercontent.com/0xgeorgemathew/zcode-agent/
|
|
279
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/0xgeorgemathew/zcode-agent/403b95529a796bc4050577ae2ea6d9fe3016e2ce/docs/assets/acp-dark.svg">
|
|
280
|
+
<img src="https://raw.githubusercontent.com/0xgeorgemathew/zcode-agent/403b95529a796bc4050577ae2ea6d9fe3016e2ce/docs/assets/acp-light.svg" width="960" alt="An ACP client such as T3 Code or Zed sends prompts and answers to zcode-agent over stdio. zcode-agent streams text, diffs and the plan back and asks before edits and commands. Mode, model and effort are pickers; the defaults are GLM-5.3, effort high and Ask mode.">
|
|
281
281
|
</picture>
|
|
282
282
|
</p>
|
|
283
283
|
|
package/lib/isolation.js
CHANGED
|
@@ -75,25 +75,25 @@ function listDir(dir) {
|
|
|
75
75
|
// --- provider/key rewriting -----------------------------------------------------
|
|
76
76
|
|
|
77
77
|
// Prune to exactly the zai-api rule and swap in the package key (§6.2 item 2).
|
|
78
|
+
// Returns false, leaving the file for the caller to replace, when the copy
|
|
79
|
+
// has no zai-api rule or can't be read: the ZCode app keeps an empty
|
|
80
|
+
// provider_config.json (providerRules: []) when signed in with a coding
|
|
81
|
+
// plan, and recreates it if deleted (1.3.1, issue #2).
|
|
78
82
|
function rewriteProviderConfig(target, key) {
|
|
79
|
-
const parsed =
|
|
83
|
+
const parsed = readJson(target);
|
|
80
84
|
const rules =
|
|
85
|
+
parsed &&
|
|
81
86
|
parsed.config &&
|
|
82
87
|
parsed.config.providerConfigRules &&
|
|
83
88
|
parsed.config.providerConfigRules.providerRules;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
const zaiRules = rules.filter((r) => r && r.providerId === 'zai-api');
|
|
88
|
-
if (zaiRules.length === 0) {
|
|
89
|
-
throw new Error(`no zai-api rule found in provider_config.json at ${target}`);
|
|
90
|
-
}
|
|
91
|
-
const rule = zaiRules[0];
|
|
89
|
+
const rule = Array.isArray(rules) && rules.find((r) => r && r.providerId === 'zai-api');
|
|
90
|
+
if (!rule) return false;
|
|
92
91
|
rule.config = rule.config || {};
|
|
93
92
|
rule.config.group = rule.config.group || 'standard-personal';
|
|
94
93
|
rule.config.access = { type: 'api-key', apiKey: key };
|
|
95
94
|
parsed.config.providerConfigRules.providerRules = [rule];
|
|
96
95
|
writeJson600(target, parsed);
|
|
96
|
+
return true;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
// Standalone (no app config to copy). modelConfigRules must be present,
|
|
@@ -510,11 +510,9 @@ function buildEngineHome({
|
|
|
510
510
|
fs.copyFileSync(path.join(liveV2, entry.name), path.join(v2, entry.name));
|
|
511
511
|
}
|
|
512
512
|
const providerConfig = path.join(v2, 'provider_config.json');
|
|
513
|
-
const
|
|
514
|
-
|
|
515
|
-
: 'synthesized';
|
|
513
|
+
const copied = v2Files.some((e) => e.name === 'provider_config.json');
|
|
514
|
+
const mode = copied && rewriteProviderConfig(providerConfig, key) ? 'copied-v2-top-level' : 'synthesized';
|
|
516
515
|
if (mode === 'synthesized') writeJson600(providerConfig, synthesizedProviderConfig(key));
|
|
517
|
-
else rewriteProviderConfig(providerConfig, key);
|
|
518
516
|
|
|
519
517
|
// cli/config.json: live copy (builtin:zai key swapped) + this run's MCP set.
|
|
520
518
|
const cfg = readJson(path.join(live, 'cli', 'config.json')) || {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zcode-agent",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Cheap, verified execution for Claude Code and Codex: your orchestrator decides, GLM-5.3 builds and tests, and a GLM-5.3-Flash verifier checks the screenshots in headless ZCode sessions (parallel sessions, subagents, dependency plans) and hands back a compact result. Also an ACP agent for T3 Code, Zed and any Agent Client Protocol client. Uses your ZCode app's key, MCP servers and skills, or runs standalone.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|