@loucompanion/forge-bridge 0.1.1-dev.af36c7fa102b → 0.1.1-dev.caea7216568f

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.
@@ -4,6 +4,7 @@ import os from "node:os";
4
4
  import path from "node:path";
5
5
  import { createInterface } from "node:readline/promises";
6
6
  import { promisify } from "node:util";
7
+ import { resolveCursorAgentDirectLaunch } from "../shared/cursor-agent/cursor-agent.launch.js";
7
8
  import { redactSecrets, redactText } from "../shared/redaction/redaction.js";
8
9
  import { defaultBridgeServiceConfig, ForgeBridgeService } from "../bridge/bridge.service.js";
9
10
  import { addRepoMapping, applyLocalConfigDefaults, providerStatusesFor, readLocalConfigSync, removeRepoMapping, resolveLocalConfigPath, writeLocalConfig } from "./local-config.js";
@@ -633,6 +634,12 @@ function cliProbeCommandsFor(provider) {
633
634
  ];
634
635
  }
635
636
  async function execVersionCommand(probe, timeout = 2000) {
637
+ const directLaunch = process.platform === "win32"
638
+ ? await resolveCursorAgentDirectLaunch(probe.command, probe.args)
639
+ : null;
640
+ if (directLaunch) {
641
+ return await execFileAsync(directLaunch.command, [...directLaunch.args], { timeout });
642
+ }
636
643
  try {
637
644
  return await execFileAsync(probe.command, probe.args, { timeout });
638
645
  }
@@ -1,6 +1,6 @@
1
1
  import type { RunOnceDispatchPacket, RunnerDispatchArtifact } from "./session.types.js";
2
2
  import type { WorktreeHandle } from "../worktree/worktree.types.js";
3
- export type CompletionPhase = "implementation" | "self_review" | "validation";
3
+ export type CompletionPhase = "implementation" | "self_review" | "validation" | "qa";
4
4
  export interface CompletionToolRuntime {
5
5
  readonly serverName: string;
6
6
  readonly command: string;
@@ -19,6 +19,24 @@ export interface CompletionToolServerConfig {
19
19
  readonly workItemId: string;
20
20
  readonly phase: CompletionPhase;
21
21
  readonly producedBy?: string;
22
+ readonly redactionSecrets?: readonly string[];
23
+ readonly developCycle?: boolean;
24
+ }
25
+ export interface CompletionToolCallResult {
26
+ readonly content: readonly {
27
+ readonly type: "text";
28
+ readonly text: string;
29
+ }[];
30
+ readonly structuredContent: CompletionArtifactReference & {
31
+ readonly gate: {
32
+ readonly phase: CompletionPhase;
33
+ readonly status: string;
34
+ readonly allowed: boolean;
35
+ readonly reason: string;
36
+ };
37
+ readonly nextPhase: CompletionPhase | "dev_test_ready" | "sign_off_ready";
38
+ readonly nextInstruction: string;
39
+ };
22
40
  }
23
41
  export interface CompletionArtifactReference {
24
42
  readonly phase: CompletionPhase;
@@ -32,6 +50,7 @@ export interface CompletionArtifactReference {
32
50
  }
33
51
  export declare function completionPhaseFromDispatch(dispatch: RunOnceDispatchPacket): CompletionPhase;
34
52
  export declare function normalizeCompletionPhase(value: string | null | undefined): CompletionPhase;
53
+ export declare function usesDevelopCycleCompletion(dispatch: RunOnceDispatchPacket): boolean;
35
54
  export declare function completionToolNamesForPhase(phase: CompletionPhase): readonly string[];
36
55
  export declare function expectedCompletionToolName(phase: CompletionPhase): string;
37
56
  export declare function artifactRootFor(worktreePath: string, workItemId: string): string;
@@ -42,6 +61,18 @@ export declare function buildCompletionToolServerArgs(config: CompletionToolServ
42
61
  export declare function codexMcpConfigArgs(runtime: CompletionToolRuntime): readonly string[];
43
62
  export declare function cursorMcpServerConfig(runtime: CompletionToolRuntime): unknown;
44
63
  export declare function completionPromptForPhase(phase: CompletionPhase): string;
64
+ export declare function completionPromptForDevelopCycle(phase: CompletionPhase): string;
65
+ export declare function completionToolNamesForServer(config: CompletionToolServerConfig): readonly string[];
66
+ export declare class CompletionToolServerSession {
67
+ private readonly config;
68
+ private currentPhase;
69
+ private completed;
70
+ constructor(config: CompletionToolServerConfig);
71
+ get instructions(): string;
72
+ toolDefinitions(): readonly unknown[];
73
+ callTool(toolName: string, input: unknown): Promise<CompletionToolCallResult>;
74
+ private advanceAfterPass;
75
+ }
45
76
  export declare function writeCompletionArtifact(config: CompletionToolServerConfig, toolName: string, input: unknown): Promise<CompletionArtifactReference>;
46
77
  export declare function readCompletionArtifact(worktreePath: string, workItemId: string, phase: CompletionPhase): Promise<RunnerDispatchArtifact | null>;
47
78
  export declare function runCompletionMcpServer(config: CompletionToolServerConfig): Promise<void>;
@@ -52,3 +83,4 @@ export declare function parseCompletionMcpArgs(argv: readonly string[]): {
52
83
  readonly ok: false;
53
84
  readonly error: string;
54
85
  };
86
+ export declare function completionRedactionEnv(secrets: readonly string[]): Readonly<Record<string, string>>;