@zergai/ztc 0.2.3-dev.35760740177 → 0.2.4-dev.35964790590
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.
|
@@ -337,6 +337,9 @@ export class CodexAuthBackend {
|
|
|
337
337
|
stream: true,
|
|
338
338
|
store: false,
|
|
339
339
|
};
|
|
340
|
+
if (request.outputFormat !== undefined) {
|
|
341
|
+
body.text = { format: request.outputFormat };
|
|
342
|
+
}
|
|
340
343
|
if (tools.length > 0) {
|
|
341
344
|
body.tools = tools;
|
|
342
345
|
body.tool_choice = 'auto';
|
|
@@ -89,6 +89,15 @@ export interface BackendRequest {
|
|
|
89
89
|
system: string;
|
|
90
90
|
messages: LlmMessage[];
|
|
91
91
|
tools: ToolDefinition[];
|
|
92
|
+
/** Explicit Responses text format for Codex subscription inference callers. */
|
|
93
|
+
outputFormat?: {
|
|
94
|
+
type: 'text' | 'json_object';
|
|
95
|
+
} | {
|
|
96
|
+
type: 'json_schema';
|
|
97
|
+
name: string;
|
|
98
|
+
schema: Record<string, unknown>;
|
|
99
|
+
strict?: boolean;
|
|
100
|
+
};
|
|
92
101
|
/** Router-owned retry plan. Only ZRouter transports put this on the wire. */
|
|
93
102
|
routePlan?: {
|
|
94
103
|
fallbacks: string[];
|
|
@@ -9,14 +9,16 @@ import { attachMiniZdePane } from '../../zerg/mini_zde_render.js';
|
|
|
9
9
|
import { summarizeLoadedManifestYaml, summarizeManifestYaml } from '../../zerg/mini_zde_state.js';
|
|
10
10
|
/**
|
|
11
11
|
* Walk upward from `startDir` looking for the repo's bundled headlines
|
|
12
|
-
* manifest.
|
|
12
|
+
* manifest. Matches `<repo>/zerg/zaai/...` and the installed `/app/zaai/...` layout.
|
|
13
13
|
*/
|
|
14
14
|
function findHeadlinesManifestPath(startDir = process.cwd()) {
|
|
15
15
|
let current = resolve(startDir);
|
|
16
16
|
while (true) {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
for (const suite of [join(current, 'zerg', 'zaai'), join(current, 'zaai')]) {
|
|
18
|
+
const candidate = join(suite, 'domains', 'core', 'headlines', 'headlines.yaml');
|
|
19
|
+
if (existsSync(candidate)) {
|
|
20
|
+
return candidate;
|
|
21
|
+
}
|
|
20
22
|
}
|
|
21
23
|
const parent = dirname(current);
|
|
22
24
|
if (parent === current) {
|
|
@@ -171,12 +171,12 @@ export const adaptationRunTool = {
|
|
|
171
171
|
...(args.api_auth_headers ? { api_auth_headers: JSON.parse(args.api_auth_headers) } : {}),
|
|
172
172
|
};
|
|
173
173
|
// Derive output_dir (mirrors cli.py) for adaptation.log.
|
|
174
|
-
// cli.py sits at zerg/zaai/domains/connector_generation/cli.py;
|
|
175
|
-
// parent reaches
|
|
174
|
+
// cli.py sits at zerg/zaai/domains/connector_generation/cli.py; 4 ups from its
|
|
175
|
+
// parent reaches the monorepo root, which has dcaig/ as a direct child
|
|
176
176
|
// (matches cli.py's Python-side workspace derivation at cli.py:90-91).
|
|
177
177
|
const workspace = process.env.ZERG_WORKSPACE_ROOT
|
|
178
178
|
|| (() => {
|
|
179
|
-
const derived = resolve(dirname(runnerPath), '..', '..', '..');
|
|
179
|
+
const derived = resolve(dirname(runnerPath), '..', '..', '..', '..');
|
|
180
180
|
if (!existsSync(resolve(derived, 'dcaig'))) {
|
|
181
181
|
throw new Error(`Derived workspace ${derived} has no dcaig/ child. Set ZERG_WORKSPACE_ROOT explicitly.`);
|
|
182
182
|
}
|
|
@@ -1829,14 +1829,18 @@ export class MirrorStreamServer {
|
|
|
1829
1829
|
const override = process.env.ZERG_CV_STATE_PATH;
|
|
1830
1830
|
if (override)
|
|
1831
1831
|
return override;
|
|
1832
|
+
const zaaiRoot = process.env.ZAAI_ROOT;
|
|
1833
|
+
if (zaaiRoot) {
|
|
1834
|
+
return resolve(zaaiRoot, 'domains', 'zcloud', 'modules', 'cv', 'cv_runner', 'state.json');
|
|
1835
|
+
}
|
|
1832
1836
|
const repoRoot = process.env.ZERG_REPO_ROOT;
|
|
1833
1837
|
if (repoRoot) {
|
|
1834
|
-
return resolve(repoRoot, 'zaai', 'domains', 'zcloud', 'modules', 'cv', 'cv_runner', 'state.json');
|
|
1838
|
+
return resolve(repoRoot, 'zerg', 'zaai', 'domains', 'zcloud', 'modules', 'cv', 'cv_runner', 'state.json');
|
|
1835
1839
|
}
|
|
1836
1840
|
// Walk up from this file: ztc/src/web/mirror_stream.ts -> repo root.
|
|
1837
1841
|
const here = fileURLToPath(import.meta.url);
|
|
1838
1842
|
const fallbackRoot = resolve(here, '..', '..', '..', '..');
|
|
1839
|
-
return resolve(fallbackRoot, 'zaai', 'domains', 'zcloud', 'modules', 'cv', 'cv_runner', 'state.json');
|
|
1843
|
+
return resolve(fallbackRoot, 'zerg', 'zaai', 'domains', 'zcloud', 'modules', 'cv', 'cv_runner', 'state.json');
|
|
1840
1844
|
}
|
|
1841
1845
|
/**
|
|
1842
1846
|
* GET /cv/snapshot — replaces the old Django /api/cv/snapshot endpoint.
|
|
@@ -1855,7 +1859,7 @@ export class MirrorStreamServer {
|
|
|
1855
1859
|
catch (error) {
|
|
1856
1860
|
// Missing file with no override env vars set → return empty snapshot.
|
|
1857
1861
|
// This mirrors the Django endpoint's "soft 200" path for fresh repos.
|
|
1858
|
-
const overridden = !!(process.env.ZERG_CV_STATE_PATH || process.env.ZERG_REPO_ROOT);
|
|
1862
|
+
const overridden = !!(process.env.ZERG_CV_STATE_PATH || process.env.ZERG_REPO_ROOT || process.env.ZAAI_ROOT);
|
|
1859
1863
|
if (!overridden && error.code === 'ENOENT') {
|
|
1860
1864
|
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
1861
1865
|
res.end(JSON.stringify({ schema_version: SCHEMA_VERSION, scenarios: [] }));
|
package/dist/zlm-embed.mjs
CHANGED
|
@@ -2408,6 +2408,9 @@ var init_codex_auth = __esm({
|
|
|
2408
2408
|
stream: true,
|
|
2409
2409
|
store: false
|
|
2410
2410
|
};
|
|
2411
|
+
if (request.outputFormat !== void 0) {
|
|
2412
|
+
body.text = { format: request.outputFormat };
|
|
2413
|
+
}
|
|
2411
2414
|
if (tools.length > 0) {
|
|
2412
2415
|
body.tools = tools;
|
|
2413
2416
|
body.tool_choice = "auto";
|
|
@@ -12130,7 +12133,7 @@ var invokeSkillTool = makeInvokeSkillTool(resolveAmbientSkills);
|
|
|
12130
12133
|
// src/zlm.ts
|
|
12131
12134
|
var ZLM_EMBED_API_VERSION = "zerglang.ztc-embed/1";
|
|
12132
12135
|
var ZLM_STDIO_PROTOCOL = "zerglang.ztc-host/1";
|
|
12133
|
-
var ZLM_ZTC_VERSION = true ? "0.2.
|
|
12136
|
+
var ZLM_ZTC_VERSION = true ? "0.2.4-dev.35964790590" : "development";
|
|
12134
12137
|
var ZLM_MAX_HOST_TOOLS = 64;
|
|
12135
12138
|
var ZLM_MAX_SYSTEM_PROMPT_BYTES = 128 * 1024;
|
|
12136
12139
|
var ZLM_HOST_APPROVAL_CAPABILITIES = Object.freeze([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zergai/ztc",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4-dev.35964790590",
|
|
4
4
|
"description": "Zerg Terminal Client - CLI agent for continual AI systems",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"repository": {
|
|
@@ -238,7 +238,7 @@
|
|
|
238
238
|
"zergRelease": {
|
|
239
239
|
"branch": "development",
|
|
240
240
|
"channel": "dev",
|
|
241
|
-
"sourceCommit": "
|
|
241
|
+
"sourceCommit": "ce17b0452956cbb4efedd020d0e153e5e5ab2302",
|
|
242
242
|
"sourceVersion": "0.2.0-canary.1"
|
|
243
243
|
},
|
|
244
244
|
"publishConfig": {
|