@wrongstack/cli 1.1.4 → 1.1.5
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/dist/{acp-MZ5MQBFN.js → acp-NKUEYJDZ.js} +6 -5
- package/dist/acp-leader/acp-leader-confirm.d.ts +2 -0
- package/dist/acp-leader/acp-leader-host-binding.d.ts +1 -0
- package/dist/acp-leader/acp-leader-host.d.ts +2 -0
- package/dist/acp-leader/acp-leader-picker.d.ts +6 -3
- package/dist/acp-leader/acp-leader-stream.d.ts +1 -0
- package/dist/{auth-IHQS6AFW.js → auth-2ZG5DBHS.js} +4 -4
- package/dist/boot/launch-menu-arrow.d.ts +20 -0
- package/dist/boot/launch-menu-types.d.ts +36 -0
- package/dist/boot/launch-menu.d.ts +1 -57
- package/dist/boot/tui-session-resume-rollback.d.ts +31 -0
- package/dist/{boot-auto-thin-7D4OVEWA.js → boot-auto-thin-N2CIGTXE.js} +3 -3
- package/dist/{chunk-TZPKOS5G.js → chunk-2XQ6SRKG.js} +2 -2
- package/dist/{chunk-JKTJSLUT.js → chunk-5SGMUDP5.js} +242 -18
- package/dist/{chunk-3EXRPTAU.js → chunk-5TQ65PXQ.js} +17 -17
- package/dist/{chunk-2LTHDKZX.js → chunk-7BM4LGKQ.js} +18 -18
- package/dist/{chunk-VAQXOZKP.js → chunk-AJM4EFCM.js} +139 -136
- package/dist/{chunk-C2BBH4S4.js → chunk-E3MJFAFR.js} +2 -2
- package/dist/{chunk-AWRZWPJ3.js → chunk-JFYQGMMM.js} +99 -75
- package/dist/{chunk-BIGSVBPI.js → chunk-KNYIEQAY.js} +64 -61
- package/dist/{chunk-GKGWPFW2.js → chunk-LUEO5HLZ.js} +1 -1
- package/dist/chunk-LYWOV4OX.js +252 -0
- package/dist/{chunk-COGI7EQU.js → chunk-M7FNHCE3.js} +621 -9
- package/dist/{chunk-75OLD563.js → chunk-M7PSENGF.js} +3 -1
- package/dist/{chunk-TAE3EGBM.js → chunk-MEBXWI7U.js} +5 -5
- package/dist/{chunk-I5LJLKA3.js → chunk-MKMM5RIW.js} +12 -5
- package/dist/{chunk-ZF4HRR5F.js → chunk-P7MEEUGT.js} +275 -250
- package/dist/chunk-QLYPIJ7X.js +258 -0
- package/dist/chunk-RN5CFAVQ.js +292 -0
- package/dist/{chunk-WDXNBYGD.js → chunk-TDP7CZGE.js} +6 -1
- package/dist/{chunk-6VPWQ4TG.js → chunk-UROB7MK5.js} +2 -1
- package/dist/chunk-VEESMPTX.js +254 -0
- package/dist/{chunk-IJLIAPCW.js → chunk-VPSAKGLK.js} +47 -47
- package/dist/{cli-context-E44HQ4ZO.js → cli-context-CQYGIWOU.js} +247 -236
- package/dist/{cli-main-OT63I2FX.js → cli-main-VRUJNUBX.js} +1743 -1491
- package/dist/cli-main-boot.d.ts +1 -1
- package/dist/config-doctor-known-keys.d.ts +33 -0
- package/dist/config-doctor.d.ts +2 -47
- package/dist/config-history-support.d.ts +36 -0
- package/dist/config-history.d.ts +1 -1
- package/dist/{config-transfer-Y7XJMJRN.js → config-transfer-B4GOZTFC.js} +2 -2
- package/dist/{execution-OK34CJKJ.js → execution-IV72RUSM.js} +5883 -5792
- package/dist/execution-tui.d.ts +30 -0
- package/dist/fleet/acp-wrongstack-bridge.d.ts +11 -3
- package/dist/fleet/host-acp.d.ts +3 -0
- package/dist/fleet/wrongforge-client.d.ts +116 -0
- package/dist/fleet/wrongforge-gateway.d.ts +20 -0
- package/dist/fleet/wrongforge-info.d.ts +32 -0
- package/dist/fleet/wrongforge-quota.d.ts +10 -0
- package/dist/fleet/wrongforge-runner.d.ts +37 -0
- package/dist/fleet/wrongforge-runtime.d.ts +10 -0
- package/dist/{hq-JD5AZVMG.js → hq-54PQYR5O.js} +311 -307
- package/dist/hq-server/sweeps.d.ts +28 -0
- package/dist/{hq-server-BI23EPM7.js → hq-server-YK7FBLL6.js} +3 -3
- package/dist/index.js +5 -5
- package/dist/mcp-22CFBX4H.js +236 -0
- package/dist/mcp-serve.d.ts +0 -63
- package/dist/{modeldiag-HDIKG37X.js → modeldiag-5PBB777J.js} +4 -4
- package/dist/{per-subcommand-help-4GYSCMLU.js → per-subcommand-help-MQGERD4E.js} +2 -2
- package/dist/plugin-llm-command.d.ts +9 -0
- package/dist/{plugin-usage-TYF5HY4K.js → plugin-usage-UWKYMNQU.js} +3 -3
- package/dist/{plugins-XGAXDLPT.js → plugins-VP7JQH47.js} +4 -4
- package/dist/{sdd-runtime-6MFUXWJK.js → sdd-runtime-HIJ4Z5TF.js} +2 -2
- package/dist/services/sdd/state.d.ts +2 -0
- package/dist/session-event-wiring-types.d.ts +62 -0
- package/dist/session-event-wiring.d.ts +2 -52
- package/dist/{sessions-config-SJVQXCIE.js → sessions-config-7MK742OW.js} +2 -2
- package/dist/short-circuit-flags-AGHURHMQ.js +11 -0
- package/dist/slash-commands/command-context-fleet.d.ts +187 -0
- package/dist/slash-commands/command-context-sdd-goal.d.ts +102 -0
- package/dist/slash-commands/command-context.d.ts +3 -282
- package/dist/slash-commands/project-switch-interactive.d.ts +11 -0
- package/dist/slash-commands/setmodel-helpers.d.ts +36 -0
- package/dist/subcommands/handlers/hq-token.d.ts +3 -0
- package/dist/subcommands/handlers/hq.d.ts +0 -21
- package/dist/subcommands/handlers/per-subcommand-help-operations.d.ts +8 -0
- package/dist/subcommands/handlers/tools-cli-args.d.ts +57 -0
- package/dist/subcommands/handlers/tools-cli.d.ts +5 -0
- package/dist/subcommands/handlers/tools-serve.d.ts +4 -0
- package/dist/{subcommands-YADUV7IJ.js → subcommands-OCJNO57E.js} +2 -2
- package/dist/tool-gateway-http.d.ts +30 -0
- package/dist/tool-gateway.d.ts +185 -0
- package/dist/tools-cli-44MLIUQO.js +509 -0
- package/dist/tools-serve-TRCET2M7.js +102 -0
- package/dist/{tools-skills-55QVTMSK.js → tools-skills-WDTMCE46.js} +7 -2
- package/dist/tuneup-runtime-checks.d.ts +7 -0
- package/dist/tuneup-types.d.ts +118 -0
- package/dist/tuneup.d.ts +3 -122
- package/dist/{typesafe-YBEADNAH.js → typesafe-QLSMFU7J.js} +1 -1
- package/dist/{version-help-RBZC5GZZ.js → version-help-X6CC4CFY.js} +2 -2
- package/dist/{webui-server-CB64CFDG.js → webui-server-V2R5WQUK.js} +44 -6
- package/dist/wiring/provider-runtime-setup.d.ts +3 -1
- package/dist/wiring/session-runtime.d.ts +1 -1
- package/dist/wrongforge-gateway-UOFBK56J.js +92 -0
- package/dist/wrongforge-leader/wrongforge-leader-gateway.d.ts +9 -0
- package/dist/wrongforge-leader/wrongforge-leader-picker.d.ts +12 -0
- package/dist/wrongforge-leader/wrongforge-leader-provider.d.ts +49 -0
- package/package.json +1 -1
- package/dist/mcp-W7A5HUXV.js +0 -560
- package/dist/short-circuit-flags-QEXUS3BY.js +0 -11
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { createToolVisionAdapters } from '@wrongstack/runtime/vision';
|
|
2
|
+
import type { ExecuteDeps } from './execute-deps.js';
|
|
3
|
+
import type { StandaloneAutoUpdate } from './standalone-auto-update.js';
|
|
4
|
+
import type { UpdateInfo } from './update-check.js';
|
|
5
|
+
/** Locals `execute` computes before branching, plus the coordinator-stop setter. */
|
|
6
|
+
export interface ExecutionTuiLocals {
|
|
7
|
+
wpaths: ExecuteDeps['core']['wpaths'];
|
|
8
|
+
projectRoot: ExecuteDeps['core']['projectRoot'];
|
|
9
|
+
activeSessionStore: ExecuteDeps['session']['sessionStore'];
|
|
10
|
+
detachActiveTodosCheckpoint: (() => void | Promise<void>) | undefined;
|
|
11
|
+
profileName: string;
|
|
12
|
+
bootUpdateInfo: UpdateInfo | undefined;
|
|
13
|
+
supportsVision: () => Promise<boolean>;
|
|
14
|
+
visionAdapters: () => ReturnType<typeof createToolVisionAdapters>;
|
|
15
|
+
goalFlag: string | undefined;
|
|
16
|
+
askFlag: string | undefined;
|
|
17
|
+
autoUpdate: StandaloneAutoUpdate | undefined;
|
|
18
|
+
setCoordinatorStop: (fn: (() => void) | undefined) => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The interactive TUI branch of `execute`: wire the TUI runtime state,
|
|
22
|
+
* project-switch and coordinator plumbing, then run the TUI until it exits.
|
|
23
|
+
* `exitWith` carries a project-switch child's exit code when one replaced
|
|
24
|
+
* this session.
|
|
25
|
+
*/
|
|
26
|
+
export declare function runExecutionTui(deps: ExecuteDeps, local: ExecutionTuiLocals): Promise<{
|
|
27
|
+
code: number;
|
|
28
|
+
exitWith?: number;
|
|
29
|
+
}>;
|
|
30
|
+
//# sourceMappingURL=execution-tui.d.ts.map
|
|
@@ -9,8 +9,16 @@ export declare function wstackLaunch(args: string[], entry?: string | undefined)
|
|
|
9
9
|
command: string;
|
|
10
10
|
args: string[];
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* The worker's shell command for `wstack tools`, built from the same launcher
|
|
14
|
+
* as the MCP servers so it reaches this exact install. Stable for a given
|
|
15
|
+
* install, which keeps the system-prompt note cache-friendly across workers.
|
|
16
|
+
* Windows paths use forward slashes: the agent's shell is usually Git Bash,
|
|
17
|
+
* where an unquoted backslash is an escape.
|
|
18
|
+
*/
|
|
19
|
+
export declare function wstackToolsCommand(entry?: string | undefined, platform?: NodeJS.Platform): string;
|
|
12
20
|
/** A short task-local cue: the Claude adapter gives user-turn text more immediate weight. */
|
|
13
|
-
export declare function bridgeTaskKickoff(servers: readonly BridgeServer[]): string;
|
|
21
|
+
export declare function bridgeTaskKickoff(servers: readonly BridgeServer[], indexCli?: string): string;
|
|
14
22
|
/**
|
|
15
23
|
* The note appended to the worker's system prompt. It must not vary per task
|
|
16
24
|
* or per worker: the system prompt is the head of the agent's prompt cache, so
|
|
@@ -18,13 +26,13 @@ export declare function bridgeTaskKickoff(servers: readonly BridgeServer[]): str
|
|
|
18
26
|
* (measured: $0.21 per one-line task, against $0.008 with a stable prompt).
|
|
19
27
|
* Per-worker identity lives in the MCP servers' arguments instead.
|
|
20
28
|
*/
|
|
21
|
-
export declare function bridgeNote(servers: readonly BridgeServer[], delegated?: boolean): string;
|
|
29
|
+
export declare function bridgeNote(servers: readonly BridgeServer[], delegated?: boolean, indexCli?: string): string;
|
|
22
30
|
/**
|
|
23
31
|
* The note for an agent running as the session's LEADER: the user talks to it
|
|
24
32
|
* through WrongStack, so it answers them directly and ends a turn the way
|
|
25
33
|
* WrongStack's own leader does, with next steps the user can send back.
|
|
26
34
|
*/
|
|
27
|
-
export declare function leaderBridgeNote(servers: readonly BridgeServer[]): string;
|
|
35
|
+
export declare function leaderBridgeNote(servers: readonly BridgeServer[], indexCli?: string): string;
|
|
28
36
|
/** True when `command` resolves to a file on PATH (PATHEXT-aware on Windows). */
|
|
29
37
|
export declare function onPath(command: string, env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform): boolean;
|
|
30
38
|
/**
|
package/dist/fleet/host-acp.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ACPProgressEvent, type AcpAgentCommandOverrides, type AcpLiveCatalog, type PermissionPolicy as AcpPermissionPolicy } from '@wrongstack/acp';
|
|
2
2
|
import type { Config, SubagentRunContext, SubagentRunner, TaskSpec } from '@wrongstack/core/types';
|
|
3
|
+
import { type WrongForgeGatewaySpec } from './wrongforge-runner.js';
|
|
3
4
|
export type AcpLivePublisher = (ctx: SubagentRunContext, task: TaskSpec, event: ACPProgressEvent) => void;
|
|
4
5
|
export interface BuildAcpSubagentRunnerOptions {
|
|
5
6
|
/**
|
|
@@ -23,6 +24,8 @@ export interface BuildAcpSubagentRunnerOptions {
|
|
|
23
24
|
* user runs the agent in on their own.
|
|
24
25
|
*/
|
|
25
26
|
permissions?: ((ctx: SubagentRunContext) => AcpPermissionPolicy) | undefined;
|
|
27
|
+
/** WrongStack tools a WrongForge worker may call back (see wrongforge-gateway.ts). */
|
|
28
|
+
wrongforgeGateway?: (() => Promise<WrongForgeGatewaySpec | undefined>) | undefined;
|
|
26
29
|
}
|
|
27
30
|
/**
|
|
28
31
|
* Same command resolution as `wstack acp spawn` / `/acp` — user override,
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { ACPProgressEvent } from '@wrongstack/acp';
|
|
2
|
+
import type { WrongForgeInfo } from './wrongforge-info.js';
|
|
3
|
+
export declare const WRONGFORGE_AGENT_ID = "wrongforge";
|
|
4
|
+
/**
|
|
5
|
+
* WrongForge's own tools a task keeps when WrongStack's gateway carries the
|
|
6
|
+
* rest: reading, its todo list and progress reports. Writes and commands then
|
|
7
|
+
* go through `wstack_*`, i.e. through WrongStack's rules.
|
|
8
|
+
*/
|
|
9
|
+
export declare const WRONGFORGE_READ_SIDE_TOOLS: string[];
|
|
10
|
+
export interface WrongForgeEndpoint {
|
|
11
|
+
url: string;
|
|
12
|
+
apiKey: string;
|
|
13
|
+
}
|
|
14
|
+
/** The `gateway` field of a WrongForge task: WrongStack tools it may call back. */
|
|
15
|
+
export interface WrongForgeGatewaySpec {
|
|
16
|
+
url: string;
|
|
17
|
+
token: string;
|
|
18
|
+
list_path: string;
|
|
19
|
+
call_path: string;
|
|
20
|
+
name_prefix?: string | undefined;
|
|
21
|
+
deny?: string[] | undefined;
|
|
22
|
+
optional?: boolean | undefined;
|
|
23
|
+
}
|
|
24
|
+
export interface WfTaskRecord {
|
|
25
|
+
id: string;
|
|
26
|
+
status: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled' | 'timed_out';
|
|
27
|
+
session_id?: string;
|
|
28
|
+
result?: {
|
|
29
|
+
text: string;
|
|
30
|
+
finish_reason?: string;
|
|
31
|
+
steps: number;
|
|
32
|
+
tool_calls: number;
|
|
33
|
+
usage?: {
|
|
34
|
+
input_tokens?: number;
|
|
35
|
+
output_tokens?: number;
|
|
36
|
+
cache_read_tokens?: number;
|
|
37
|
+
cache_write_tokens?: number;
|
|
38
|
+
};
|
|
39
|
+
context_tokens?: number;
|
|
40
|
+
context_window?: number;
|
|
41
|
+
};
|
|
42
|
+
error?: {
|
|
43
|
+
code: string;
|
|
44
|
+
message: string;
|
|
45
|
+
};
|
|
46
|
+
cancel_reason?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface WfEvent {
|
|
49
|
+
seq: number;
|
|
50
|
+
type: string;
|
|
51
|
+
data: Record<string, unknown>;
|
|
52
|
+
}
|
|
53
|
+
export declare class WfHttpError extends Error {
|
|
54
|
+
readonly status: number;
|
|
55
|
+
readonly code: string;
|
|
56
|
+
constructor(status: number, code: string, message: string);
|
|
57
|
+
}
|
|
58
|
+
/** The delegating side gave up on the task (its signal fired). */
|
|
59
|
+
export declare class WfAborted extends Error {
|
|
60
|
+
constructor();
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Where a local WrongForge serves and the key it accepts: `WRONGFORGE_URL`
|
|
64
|
+
* (default 127.0.0.1:8787) and `WRONGFORGE_API_KEY`, else the key WrongForge
|
|
65
|
+
* saved on first start (`$WRONGFORGE_HOME|~/.wrongforge/api-key`).
|
|
66
|
+
*/
|
|
67
|
+
export declare function resolveWrongForgeEndpoint(env?: NodeJS.ProcessEnv): WrongForgeEndpoint | undefined;
|
|
68
|
+
/** True when this machine has a WrongForge set up (a key to reach it with). */
|
|
69
|
+
export declare function wrongForgeConfigured(env?: NodeJS.ProcessEnv): boolean;
|
|
70
|
+
export declare const safeWfId: (s: string) => string;
|
|
71
|
+
export type WfCall = <T>(method: 'GET' | 'POST', route: string, body?: unknown, signal?: AbortSignal) => Promise<T>;
|
|
72
|
+
/** One JSON call to WrongForge; failures as WfHttpError (status 0 = unreachable). */
|
|
73
|
+
export declare function wrongForgeCall(ep: WrongForgeEndpoint, doFetch?: typeof fetch): WfCall;
|
|
74
|
+
/**
|
|
75
|
+
* A task's events in order, until it ends. Long-polls; a dropped connection or
|
|
76
|
+
* a WrongForge restart is retried (the task survives it). `onPoll` sees every
|
|
77
|
+
* answered poll's status: a task waiting in the shared queue emits nothing.
|
|
78
|
+
* Throws WfAborted when `signal` fires.
|
|
79
|
+
*/
|
|
80
|
+
export declare function followTask(call: WfCall, taskId: string, signal: AbortSignal, opts?: {
|
|
81
|
+
retryDelayMs?: number | undefined;
|
|
82
|
+
onPoll?: ((status: string) => void) | undefined;
|
|
83
|
+
}): AsyncGenerator<WfEvent>;
|
|
84
|
+
/**
|
|
85
|
+
* The terminal task record, with the same dropped-connection tolerance as
|
|
86
|
+
* `followTask`: the task is already finished, so one transient failure of
|
|
87
|
+
* this fetch must not turn completed work into a failed delegation (the
|
|
88
|
+
* caller would re-run it). Throws WfAborted when `signal` fires.
|
|
89
|
+
*/
|
|
90
|
+
export declare function terminalTaskRecord(call: WfCall, taskId: string, signal: AbortSignal, opts?: {
|
|
91
|
+
retryDelayMs?: number | undefined;
|
|
92
|
+
}): Promise<WfTaskRecord>;
|
|
93
|
+
/** Ask WrongForge to stop a task; best effort. */
|
|
94
|
+
export declare function cancelTask(call: WfCall, taskId: string, reason: string): void;
|
|
95
|
+
/**
|
|
96
|
+
* The model to ask WrongForge for. Its own `/v1/info` list is the authority:
|
|
97
|
+
* a model it does not serve fails fast, naming the ones it does, instead of
|
|
98
|
+
* failing inside WrongForge. Without the list (older server, info failed) only
|
|
99
|
+
* an id that looks like a Claude model is forwarded. An external-agent spawn
|
|
100
|
+
* may carry the agent's own name as its model; that is not a choice.
|
|
101
|
+
*/
|
|
102
|
+
export declare function chooseModel(requested: string | undefined, agentName: string | undefined, info: WrongForgeInfo | undefined): {
|
|
103
|
+
id?: string;
|
|
104
|
+
error?: string;
|
|
105
|
+
};
|
|
106
|
+
/** A WrongForge task event as the progress events the fleet and leader seams consume. */
|
|
107
|
+
export declare function toProgress(ev: WfEvent): ACPProgressEvent[];
|
|
108
|
+
/** WrongForge's token split: `input_tokens` is the uncached part (measured live). */
|
|
109
|
+
export declare function wfTokens(usage: NonNullable<WfTaskRecord['result']>['usage']): {
|
|
110
|
+
input: number;
|
|
111
|
+
output: number;
|
|
112
|
+
cacheRead: number;
|
|
113
|
+
cacheWrite: number;
|
|
114
|
+
};
|
|
115
|
+
export declare function sleep(ms: number, signal: AbortSignal): Promise<void>;
|
|
116
|
+
//# sourceMappingURL=wrongforge-client.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ToolRegistry } from '@wrongstack/core/registry';
|
|
2
|
+
import type { Config } from '@wrongstack/core/types';
|
|
3
|
+
import type { WrongForgeGatewaySpec } from './wrongforge-client.js';
|
|
4
|
+
/**
|
|
5
|
+
* Never served to a worker: steering the fleet and the leader's session is the
|
|
6
|
+
* leader's job. A worker that could `delegate` would spawn workers of its own,
|
|
7
|
+
* filed under a session nobody is in (the gateway has no session). Memory,
|
|
8
|
+
* mailbox and the board stay: those are how a worker shares what it learns.
|
|
9
|
+
*/
|
|
10
|
+
export declare const WORKER_WITHHELD_TOOLS: ReadonlySet<string>;
|
|
11
|
+
interface GatewayOptions {
|
|
12
|
+
projectRoot: string;
|
|
13
|
+
registry: ToolRegistry;
|
|
14
|
+
config: Config;
|
|
15
|
+
yoloPlus?: (() => boolean) | undefined;
|
|
16
|
+
log?: ((message: string) => void) | undefined;
|
|
17
|
+
}
|
|
18
|
+
export declare function sharedWrongForgeGateway(opts: GatewayOptions): Promise<WrongForgeGatewaySpec>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=wrongforge-gateway.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where WrongForge answers. Structural, so this module stays a leaf:
|
|
3
|
+
* wrongforge-client.ts imports from here, never the other way round.
|
|
4
|
+
*/
|
|
5
|
+
interface WrongForgeEndpoint {
|
|
6
|
+
url: string;
|
|
7
|
+
apiKey: string;
|
|
8
|
+
}
|
|
9
|
+
export interface WrongForgeInfo {
|
|
10
|
+
models: string[];
|
|
11
|
+
defaultModel?: string | undefined;
|
|
12
|
+
features: string[];
|
|
13
|
+
effortLevels?: string[] | undefined;
|
|
14
|
+
modelDetails?: {
|
|
15
|
+
id: string;
|
|
16
|
+
description: string;
|
|
17
|
+
effortLevels: string[];
|
|
18
|
+
}[] | undefined;
|
|
19
|
+
}
|
|
20
|
+
export declare function wrongForgeInfoCacheFile(): string;
|
|
21
|
+
/** Normalises a `/v1/info` body; anything malformed reads as "nothing known". */
|
|
22
|
+
export declare function parseWrongForgeInfo(body: unknown): WrongForgeInfo;
|
|
23
|
+
export declare function readCachedWrongForgeInfo(file?: string): WrongForgeInfo | undefined;
|
|
24
|
+
export declare function writeWrongForgeInfoCache(info: WrongForgeInfo, file?: string): void;
|
|
25
|
+
export declare function fetchWrongForgeInfo(ep: WrongForgeEndpoint, opts?: {
|
|
26
|
+
fetchImpl?: typeof fetch | undefined;
|
|
27
|
+
signal?: AbortSignal | undefined;
|
|
28
|
+
}): Promise<WrongForgeInfo>;
|
|
29
|
+
/** Boot-time, fire-and-forget: refresh the cache for the next description. */
|
|
30
|
+
export declare function refreshWrongForgeInfoCache(ep: WrongForgeEndpoint | undefined): void;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=wrongforge-info.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type WrongForgeEndpoint } from './wrongforge-client.js';
|
|
2
|
+
/** Read the signed-in WrongForge account into the shared quota plane; never a model call. */
|
|
3
|
+
export declare function reportWrongForgeQuota(opts?: {
|
|
4
|
+
endpoint?: WrongForgeEndpoint | undefined;
|
|
5
|
+
providerId?: string | undefined;
|
|
6
|
+
fetchImpl?: typeof fetch | undefined;
|
|
7
|
+
force?: boolean | undefined;
|
|
8
|
+
timeoutMs?: number | undefined;
|
|
9
|
+
}): Promise<boolean>;
|
|
10
|
+
//# sourceMappingURL=wrongforge-quota.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ACPProgressEvent } from '@wrongstack/acp';
|
|
2
|
+
import type { SubagentRunContext, SubagentRunner, TaskSpec } from '@wrongstack/core/types';
|
|
3
|
+
import { chooseModel, resolveWrongForgeEndpoint, WRONGFORGE_AGENT_ID, WRONGFORGE_READ_SIDE_TOOLS, type WrongForgeEndpoint, type WrongForgeGatewaySpec } from './wrongforge-client.js';
|
|
4
|
+
export { wrongForgeConfigured } from './wrongforge-client.js';
|
|
5
|
+
export { chooseModel, resolveWrongForgeEndpoint, WRONGFORGE_AGENT_ID, WRONGFORGE_READ_SIDE_TOOLS, type WrongForgeEndpoint, type WrongForgeGatewaySpec, };
|
|
6
|
+
export interface WrongForgeRunnerOptions {
|
|
7
|
+
projectRoot: string;
|
|
8
|
+
endpoint?: (() => WrongForgeEndpoint | undefined) | undefined;
|
|
9
|
+
/** Started lazily on the first task; a failure runs the task without it. */
|
|
10
|
+
gateway?: (() => Promise<WrongForgeGatewaySpec | undefined>) | undefined;
|
|
11
|
+
publishLive?: ((ctx: SubagentRunContext, task: TaskSpec, event: ACPProgressEvent) => void) | undefined;
|
|
12
|
+
fetchImpl?: typeof fetch | undefined;
|
|
13
|
+
retryDelayMs?: number | undefined;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* What the `delegate` description says about WrongForge at boot: whether it is
|
|
17
|
+
* set up, and the models it last reported (cached; refreshed in the background
|
|
18
|
+
* here and on every task, so the next boot names the current list).
|
|
19
|
+
*/
|
|
20
|
+
export declare function wrongForgeDelegateEntry(env?: NodeJS.ProcessEnv): {
|
|
21
|
+
agent: string;
|
|
22
|
+
models?: {
|
|
23
|
+
models: string[];
|
|
24
|
+
default?: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
} | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* The models the machine's WrongForge serves, for a model picker: asked live
|
|
29
|
+
* (short timeout, cache refreshed), else the last list it reported, else
|
|
30
|
+
* none (no WrongForge here, or it never answered).
|
|
31
|
+
*/
|
|
32
|
+
export declare function wrongForgeModels(env?: NodeJS.ProcessEnv): Promise<{
|
|
33
|
+
models: string[];
|
|
34
|
+
default?: string | undefined;
|
|
35
|
+
} | undefined>;
|
|
36
|
+
export declare function makeWrongForgeRunner(options: WrongForgeRunnerOptions): SubagentRunner;
|
|
37
|
+
//# sourceMappingURL=wrongforge-runner.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReasoningConfig, ReasoningRequest, RequestCacheControl } from '@wrongstack/core/types';
|
|
2
|
+
import type { WrongForgeInfo } from './wrongforge-info.js';
|
|
3
|
+
/** Task API accepts these controls and owns model-specific clamping/omission. */
|
|
4
|
+
export declare const WRONGFORGE_REASONING: ReasoningConfig;
|
|
5
|
+
/** WrongForge has a smaller effort vocabulary; model-specific clamping is server-owned. */
|
|
6
|
+
export declare function wrongForgeRuntime(reasoning?: ReasoningRequest, cache?: RequestCacheControl, info?: WrongForgeInfo): {
|
|
7
|
+
effort?: 'off' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
8
|
+
cache?: '5m' | '1h';
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=wrongforge-runtime.d.ts.map
|