@rallycry/conveyor-agent 10.13.52 → 10.13.54
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.
|
@@ -6694,11 +6694,26 @@ var PtyHarness = class _PtyHarness {
|
|
|
6694
6694
|
bridge;
|
|
6695
6695
|
adapter;
|
|
6696
6696
|
static log = createServiceLogger("pty-harness");
|
|
6697
|
-
/** Delegated to the adapter: Claude tails a transcript + hook socket,
|
|
6698
|
-
* raw-relay TUI
|
|
6697
|
+
/** Delegated to the adapter: Claude tails a transcript + hook socket, opencode
|
|
6698
|
+
* tails its plugin sink, and a raw-relay TUI has no trusted event source. */
|
|
6699
6699
|
get emitsStructuredEvents() {
|
|
6700
6700
|
return this.adapter.capabilities.structuredEvents;
|
|
6701
6701
|
}
|
|
6702
|
+
/**
|
|
6703
|
+
* Does this adapter own the shared `~/.claude` config home (credentials,
|
|
6704
|
+
* transcripts, onboarding flags)? Claude alone does — opencode keeps its
|
|
6705
|
+
* state under `~/.local/share/opencode` and its event sink in the session
|
|
6706
|
+
* tempDir.
|
|
6707
|
+
*
|
|
6708
|
+
* Gate every `~/.claude` probe on this, NOT on
|
|
6709
|
+
* `capabilities.structuredEvents`. That flag meant "is this Claude" only by
|
|
6710
|
+
* accident — Claude was the sole adapter that had it. Once the opencode
|
|
6711
|
+
* adapter gained structured events via the plugin sink, the proxy silently
|
|
6712
|
+
* inverted and opencode cards began running Claude-only probes.
|
|
6713
|
+
*/
|
|
6714
|
+
get ownsClaudeConfigHome() {
|
|
6715
|
+
return this.adapter.id === "claude-code";
|
|
6716
|
+
}
|
|
6702
6717
|
/** Fingerprint of the spawn-time options a reused process cannot change. */
|
|
6703
6718
|
fingerprintOf(options) {
|
|
6704
6719
|
return this.adapter.spawnFingerprint({
|
|
@@ -6790,7 +6805,7 @@ var PtyHarness = class _PtyHarness {
|
|
|
6790
6805
|
* so here it just declines to force a respawn.
|
|
6791
6806
|
*/
|
|
6792
6807
|
async parkedHomeDied(options) {
|
|
6793
|
-
if (!this.
|
|
6808
|
+
if (!this.ownsClaudeConfigHome) return false;
|
|
6794
6809
|
try {
|
|
6795
6810
|
const { fellBack } = await ensureUsableClaudeConfigHome(options.cwd, _PtyHarness.log);
|
|
6796
6811
|
if (!fellBack) return false;
|
|
@@ -6812,11 +6827,11 @@ var PtyHarness = class _PtyHarness {
|
|
|
6812
6827
|
*/
|
|
6813
6828
|
async spawnSession(prompt, options, want) {
|
|
6814
6829
|
const session = new PtySession(prompt, options, want, this.bridge, this.adapter);
|
|
6815
|
-
if (this.
|
|
6830
|
+
if (this.ownsClaudeConfigHome) {
|
|
6816
6831
|
await ensureUsableClaudeConfigHome(options.cwd, _PtyHarness.log);
|
|
6817
6832
|
}
|
|
6818
6833
|
await this.adapter.prepareEnvironment({ cwd: options.cwd });
|
|
6819
|
-
if (this.
|
|
6834
|
+
if (this.ownsClaudeConfigHome) {
|
|
6820
6835
|
await this.warnIfAuthNotReady();
|
|
6821
6836
|
}
|
|
6822
6837
|
session.onExit(() => this.handleSessionExit(session));
|
|
@@ -7136,7 +7151,8 @@ async function seedOpenCodeOauth(env) {
|
|
|
7136
7151
|
// src/harness/opencode/credentials.ts
|
|
7137
7152
|
var PROVIDER_KEY_ENV = {
|
|
7138
7153
|
openai: "OPENAI_API_KEY",
|
|
7139
|
-
anthropic: "ANTHROPIC_API_KEY"
|
|
7154
|
+
anthropic: "ANTHROPIC_API_KEY",
|
|
7155
|
+
zen: "OPENCODE_API_KEY"
|
|
7140
7156
|
};
|
|
7141
7157
|
var DEFAULT_OPENCODE_PROVIDER = "openai";
|
|
7142
7158
|
function buildOpenCodeCredentialEnv(source) {
|
|
@@ -7165,9 +7181,10 @@ function buildOpenCodeChildEnv(source, configContent) {
|
|
|
7165
7181
|
function resolveOpenCodeModel(source, optionsModel) {
|
|
7166
7182
|
const model = source.CONVEYOR_AGENT_MODEL ?? optionsModel;
|
|
7167
7183
|
if (!model) return void 0;
|
|
7184
|
+
if (model.startsWith("zen/")) return `opencode/${model.slice("zen/".length)}`;
|
|
7168
7185
|
if (model.includes("/")) return model;
|
|
7169
7186
|
const provider = source.CONVEYOR_AGENT_PROVIDER ?? DEFAULT_OPENCODE_PROVIDER;
|
|
7170
|
-
return `${provider}/${model}`;
|
|
7187
|
+
return `${provider === "zen" ? "opencode" : provider}/${model}`;
|
|
7171
7188
|
}
|
|
7172
7189
|
|
|
7173
7190
|
// src/harness/opencode/spawn.ts
|
|
@@ -16189,4 +16206,4 @@ export {
|
|
|
16189
16206
|
loadConveyorConfig,
|
|
16190
16207
|
unshallowRepo
|
|
16191
16208
|
};
|
|
16192
|
-
//# sourceMappingURL=chunk-
|
|
16209
|
+
//# sourceMappingURL=chunk-FCNMY7NL.js.map
|