@cabane/companion 0.6.101 → 0.6.102
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 +23 -3
- package/dist/cli.js +739 -452
- package/dist/pairing-config.js +4 -1
- package/dist/runtime.js +597 -418
- package/package.json +1 -1
package/dist/pairing-config.js
CHANGED
|
@@ -168,6 +168,7 @@ var companionConfigSchema = z2.object({
|
|
|
168
168
|
dashboardPort: z2.number().int().min(1).max(65535).optional(),
|
|
169
169
|
autoOpen: z2.boolean().optional(),
|
|
170
170
|
logLevel: z2.enum(["warn", "info", "debug"]).optional(),
|
|
171
|
+
logFormat: z2.enum(["human", "json"]).optional(),
|
|
171
172
|
// CT270: the opencode runtime, when the operator runs one on this machine. The
|
|
172
173
|
// operator installs opencode, starts `opencode serve` (auth via opencode's own
|
|
173
174
|
// `/connect` — Cabane never sees provider keys), and points the companion at it
|
|
@@ -272,7 +273,7 @@ function loadConfigTolerant() {
|
|
|
272
273
|
}
|
|
273
274
|
const strict = companionConfigSchema.safeParse(parsed);
|
|
274
275
|
if (strict.success) {
|
|
275
|
-
const { agents: agents2, prepareHook: prepareHook2, dashboardPort, autoOpen, logLevel, claudeCode: claudeCode2 } = strict.data;
|
|
276
|
+
const { agents: agents2, prepareHook: prepareHook2, dashboardPort, autoOpen, logLevel, logFormat, claudeCode: claudeCode2 } = strict.data;
|
|
276
277
|
return {
|
|
277
278
|
local: {
|
|
278
279
|
...agents2 !== void 0 ? { agents: agents2 } : {},
|
|
@@ -280,6 +281,7 @@ function loadConfigTolerant() {
|
|
|
280
281
|
...dashboardPort !== void 0 ? { dashboardPort } : {},
|
|
281
282
|
...autoOpen !== void 0 ? { autoOpen } : {},
|
|
282
283
|
...logLevel !== void 0 ? { logLevel } : {},
|
|
284
|
+
...logFormat !== void 0 ? { logFormat } : {},
|
|
283
285
|
...claudeCode2 !== void 0 ? { claudeCode: claudeCode2 } : {}
|
|
284
286
|
},
|
|
285
287
|
note: null,
|
|
@@ -294,6 +296,7 @@ function loadConfigTolerant() {
|
|
|
294
296
|
if (prepareHook.success) local.prepareHook = prepareHook.data;
|
|
295
297
|
if (typeof obj.dashboardPort === "number") local.dashboardPort = obj.dashboardPort;
|
|
296
298
|
if (typeof obj.autoOpen === "boolean") local.autoOpen = obj.autoOpen;
|
|
299
|
+
if (obj.logFormat === "human" || obj.logFormat === "json") local.logFormat = obj.logFormat;
|
|
297
300
|
if (obj.logLevel === "warn" || obj.logLevel === "info" || obj.logLevel === "debug") {
|
|
298
301
|
local.logLevel = obj.logLevel;
|
|
299
302
|
}
|