@loucompanion/forge-bridge 0.1.4-dev.1ff37038366e → 0.1.4-dev.9445952e33ba
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.
|
@@ -3,6 +3,12 @@ import type { ProviderCliRunContext } from "./provider-cli.types.js";
|
|
|
3
3
|
import type { ProviderOutputState } from "./provider-output-state.js";
|
|
4
4
|
import { type ProviderUsage } from "./provider-usage.js";
|
|
5
5
|
export declare function providerProcessEnv(dispatch: RunOnceDispatchPacket, runtimeEnvironment?: Readonly<Record<string, string>>): Readonly<Record<string, string>>;
|
|
6
|
+
/**
|
|
7
|
+
* Pre-publication validation runs the attempt's own checks, whose E2E fixtures log in to the
|
|
8
|
+
* brokered attempt database. Unlike the provider's shell, it receives that capability; the
|
|
9
|
+
* validator redacts it from every command's output.
|
|
10
|
+
*/
|
|
11
|
+
export declare function prePublicationValidationEnv(dispatch: RunOnceDispatchPacket, runtimeEnvironment?: Readonly<Record<string, string>>): Readonly<Record<string, string>>;
|
|
6
12
|
export declare function providerRuntimeEnvironment(runtimeEnvironment?: Readonly<Record<string, string>>): Readonly<Record<string, string>>;
|
|
7
13
|
export declare function providerCredentialEnv(dispatch: RunOnceDispatchPacket): Readonly<Record<string, string>>;
|
|
8
14
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { attemptDatabaseCapabilityEnvironment } from "../../runtime/attempt-database-broker.js";
|
|
1
2
|
import { completionRedactionEnv } from "../phase-completion.js";
|
|
2
3
|
import { addUsage, buildProviderUsageEvent, emptyUsage, hasUsage } from "./provider-usage.js";
|
|
3
4
|
export function providerProcessEnv(dispatch, runtimeEnvironment) {
|
|
@@ -12,6 +13,16 @@ export function providerProcessEnv(dispatch, runtimeEnvironment) {
|
|
|
12
13
|
// Bridge environment, including credentials outside the provider contract.
|
|
13
14
|
return env;
|
|
14
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Pre-publication validation runs the attempt's own checks, whose E2E fixtures log in to the
|
|
18
|
+
* brokered attempt database. Unlike the provider's shell, it receives that capability; the
|
|
19
|
+
* validator redacts it from every command's output.
|
|
20
|
+
*/
|
|
21
|
+
export function prePublicationValidationEnv(dispatch, runtimeEnvironment) {
|
|
22
|
+
const env = providerProcessEnv(dispatch, runtimeEnvironment);
|
|
23
|
+
const capability = runtimeEnvironment?.[attemptDatabaseCapabilityEnvironment]?.trim();
|
|
24
|
+
return capability ? { ...env, [attemptDatabaseCapabilityEnvironment]: capability } : env;
|
|
25
|
+
}
|
|
15
26
|
export function providerRuntimeEnvironment(runtimeEnvironment) {
|
|
16
27
|
if (!runtimeEnvironment)
|
|
17
28
|
return {};
|
|
@@ -10,7 +10,7 @@ import { cleanupCompletionTools, commitWorktreeChanges, completionPhaseFromArtif
|
|
|
10
10
|
import { DeterministicProviderCliService } from "./provider-cli.deterministic.js";
|
|
11
11
|
import { buildArchitectPrompt, buildConflictResolvePrompt, buildDebugCyclePrompt, buildDevelopCyclePrompt, buildDraftPrompt, buildDraftSpec, buildImplementationPrompt, buildProviderCliPrompt, buildProviderCliCommand, durableDraftInput, buildPullRequestCheckRepairPrompt, buildPullRequestCommentsPrompt, buildQaPrompt, formatProviderCliCommandForCheckpoint, isDecomposeDraftDispatch, isPullRequestCheckRepairDispatch, isPullRequestCommentsDispatch } from "./provider-cli.prompts.js";
|
|
12
12
|
import { isTransientCodexProviderNotFoundFailure, recoveringProviderProcessRunner, StreamingProviderProcessRunner } from "./provider-cli.process.js";
|
|
13
|
-
import { emitProviderUsageEvent, providerProcessEnv } from "./provider-cli.runtime.js";
|
|
13
|
+
import { emitProviderUsageEvent, prePublicationValidationEnv, providerProcessEnv } from "./provider-cli.runtime.js";
|
|
14
14
|
import { clip, createProviderOutputState, parseJsonLine } from "./provider-output-state.js";
|
|
15
15
|
import { writeCiRepairReadinessManifest } from "./ci-repair-readiness.js";
|
|
16
16
|
import { assertRepairHeadEpoch } from "./provider-cli.repair-epoch.js";
|
|
@@ -1489,9 +1489,10 @@ export class ProcessBackedProviderCliService {
|
|
|
1489
1489
|
const { dispatch, worktree } = context;
|
|
1490
1490
|
const processRunner = recoveringProviderProcessRunner(context.processRunner ?? this.processRunner);
|
|
1491
1491
|
const environment = providerProcessEnv(dispatch, repairEnvironment);
|
|
1492
|
+
const validationEnvironment = prePublicationValidationEnv(dispatch, repairEnvironment);
|
|
1492
1493
|
for (let repairTurn = 0;; repairTurn += 1) {
|
|
1493
1494
|
try {
|
|
1494
|
-
await this.prePublicationValidator.validate(worktree.worktreePath, validationProfile, publicationCapabilities(context, repairEnvironment), context.emit, context.signal, prePublicationExecution(context,
|
|
1495
|
+
await this.prePublicationValidator.validate(worktree.worktreePath, validationProfile, publicationCapabilities(context, repairEnvironment), context.emit, context.signal, prePublicationExecution(context, validationEnvironment, this.processRunner, preparedHeadSha));
|
|
1495
1496
|
if (repairTurn > 0) {
|
|
1496
1497
|
await context.emit({
|
|
1497
1498
|
role: "runner",
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const forgeBridgeVersion = "0.1.4-dev.
|
|
1
|
+
export declare const forgeBridgeVersion = "0.1.4-dev.9445952e33ba";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const forgeBridgeVersion = "0.1.4-dev.
|
|
1
|
+
export const forgeBridgeVersion = "0.1.4-dev.9445952e33ba";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loucompanion/forge-bridge",
|
|
3
|
-
"version": "0.1.4-dev.
|
|
3
|
+
"version": "0.1.4-dev.9445952e33ba",
|
|
4
4
|
"description": "Forge runner bridge CLI for connecting local developer machines to Forge dispatch.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|