@skaile/workspaces 4.16.3 → 4.18.0
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/CHANGELOG.md +26 -0
- package/dist/{asset-feeds-XBSARE5D.js → asset-feeds-KWWDOLAS.js} +4 -4
- package/dist/{asset-feeds-XBSARE5D.js.map → asset-feeds-KWWDOLAS.js.map} +1 -1
- package/dist/asset-manager/index.js +1 -1
- package/dist/bridge/drivers/claude-sdk.js +7 -150
- package/dist/bridge/drivers/claude-sdk.js.map +1 -1
- package/dist/bridge/drivers/codex.js +3 -2
- package/dist/bridge/drivers/codex.js.map +1 -1
- package/dist/bridge/drivers/continue.js +3 -3
- package/dist/bridge/drivers/echo.js +1 -1
- package/dist/bridge/drivers/gemini.js +5 -5
- package/dist/bridge/drivers/goose.js +3 -3
- package/dist/bridge/drivers/omp.js +811 -39
- package/dist/bridge/drivers/omp.js.map +1 -1
- package/dist/bridge/drivers/opencode.js +3 -3
- package/dist/bridge/drivers/qwen.js +5 -5
- package/dist/bridge/index.js +4 -4
- package/dist/bridge/src/agent-exec.d.ts +34 -0
- package/dist/bridge/src/agent-exec.d.ts.map +1 -0
- package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
- package/dist/bridge/src/drivers/codex.d.ts.map +1 -1
- package/dist/bridge/src/drivers/omp.d.ts +287 -7
- package/dist/bridge/src/drivers/omp.d.ts.map +1 -1
- package/dist/bridge/src/index.d.ts +1 -0
- package/dist/bridge/src/index.d.ts.map +1 -1
- package/dist/bridge/src/normalizer.d.ts +5 -0
- package/dist/bridge/src/normalizer.d.ts.map +1 -1
- package/dist/{chunk-4SIMGJIU.js → chunk-3W7AOGPY.js} +19 -4
- package/dist/chunk-3W7AOGPY.js.map +1 -0
- package/dist/{chunk-3MRCJJSH.js → chunk-4BOSWZIB.js} +3 -3
- package/dist/{chunk-3MRCJJSH.js.map → chunk-4BOSWZIB.js.map} +1 -1
- package/dist/{chunk-SNW3UR3K.js → chunk-4ZWAXIHA.js} +6 -6
- package/dist/{chunk-SNW3UR3K.js.map → chunk-4ZWAXIHA.js.map} +1 -1
- package/dist/{chunk-5OAMRXJZ.js → chunk-BDCABUDR.js} +3 -3
- package/dist/{chunk-5OAMRXJZ.js.map → chunk-BDCABUDR.js.map} +1 -1
- package/dist/{chunk-ZCKQQJ7K.js → chunk-C5SMPTNV.js} +2 -2
- package/dist/{chunk-ZCKQQJ7K.js.map → chunk-C5SMPTNV.js.map} +1 -1
- package/dist/{chunk-OWMHVP6Q.js → chunk-CFBKN3BP.js} +8 -8
- package/dist/{chunk-OWMHVP6Q.js.map → chunk-CFBKN3BP.js.map} +1 -1
- package/dist/{chunk-GGRHNBUP.js → chunk-F5UGKSCI.js} +3 -3
- package/dist/{chunk-GGRHNBUP.js.map → chunk-F5UGKSCI.js.map} +1 -1
- package/dist/{chunk-N5YUCSMA.js → chunk-FQ45HI34.js} +3 -3
- package/dist/{chunk-N5YUCSMA.js.map → chunk-FQ45HI34.js.map} +1 -1
- package/dist/{chunk-LPPRZAO5.js → chunk-HRHV52XT.js} +16 -3
- package/dist/chunk-HRHV52XT.js.map +1 -0
- package/dist/{chunk-W4AEVRUC.js → chunk-MYGLPCMR.js} +6 -6
- package/dist/{chunk-W4AEVRUC.js.map → chunk-MYGLPCMR.js.map} +1 -1
- package/dist/{chunk-7GCOHM2S.js → chunk-O4NAFJLZ.js} +2 -2
- package/dist/{chunk-7GCOHM2S.js.map → chunk-O4NAFJLZ.js.map} +1 -1
- package/dist/{chunk-BWWNJLXJ.js → chunk-QTC7I2KF.js} +6 -6
- package/dist/{chunk-BWWNJLXJ.js.map → chunk-QTC7I2KF.js.map} +1 -1
- package/dist/{chunk-B6IDJRRZ.js → chunk-R6DXYDPU.js} +3 -3
- package/dist/{chunk-B6IDJRRZ.js.map → chunk-R6DXYDPU.js.map} +1 -1
- package/dist/{chunk-UBDQFZZH.js → chunk-S3ZR5G45.js} +5 -5
- package/dist/{chunk-UBDQFZZH.js.map → chunk-S3ZR5G45.js.map} +1 -1
- package/dist/{chunk-VIX4AEVZ.js → chunk-UI4ICUTH.js} +4 -4
- package/dist/{chunk-VIX4AEVZ.js.map → chunk-UI4ICUTH.js.map} +1 -1
- package/dist/chunk-X5O56UO4.js +151 -0
- package/dist/chunk-X5O56UO4.js.map +1 -0
- package/dist/{chunk-WTUHM2NJ.js → chunk-XFYURHVP.js} +2 -2
- package/dist/{chunk-WTUHM2NJ.js.map → chunk-XFYURHVP.js.map} +1 -1
- package/dist/{chunk-I66MW6OR.js → chunk-XV6SM6LT.js} +3 -3
- package/dist/{chunk-I66MW6OR.js.map → chunk-XV6SM6LT.js.map} +1 -1
- package/dist/{chunk-76IGAJ47.js → chunk-ZHHIIIZU.js} +3 -3
- package/dist/{chunk-76IGAJ47.js.map → chunk-ZHHIIIZU.js.map} +1 -1
- package/dist/cli/index.js +32 -32
- package/dist/connectors/index.js +5 -5
- package/dist/{ensure-sources-PTZJZE56.js → ensure-sources-ZURLP3YP.js} +4 -4
- package/dist/{ensure-sources-PTZJZE56.js.map → ensure-sources-ZURLP3YP.js.map} +1 -1
- package/dist/factory-assets/connectors/box.js +5 -5
- package/dist/factory-assets/connectors/deploy.js +5 -5
- package/dist/factory-assets/connectors/devserver.js +5 -5
- package/dist/factory-assets/connectors/flow/adapter.js +5 -5
- package/dist/factory-assets/connectors/flow/run-flow.js +6 -6
- package/dist/factory-assets/connectors/flow.js +5 -5
- package/dist/factory-assets/connectors/git.js +5 -5
- package/dist/factory-assets/connectors/gmail.js +5 -5
- package/dist/factory-assets/connectors/googledrive.js +5 -5
- package/dist/factory-assets/connectors/local.js +5 -5
- package/dist/factory-assets/connectors/mattermost.js +5 -5
- package/dist/factory-assets/connectors/memory.js +5 -5
- package/dist/factory-assets/connectors/minio.js +5 -5
- package/dist/factory-assets/connectors/postgres.js +5 -5
- package/dist/factory-assets/connectors/s3.js +5 -5
- package/dist/factory-assets/connectors/sharepoint.js +5 -5
- package/dist/factory-assets/connectors/sqlite.js +5 -5
- package/dist/factory-assets/connectors/static-server.js +5 -5
- package/dist/factory-assets/connectors/tunnel.js +5 -5
- package/dist/factory-assets/connectors/webdav.js +5 -5
- package/dist/factory-assets/connectors/xstate-store.js +5 -5
- package/dist/factory-assets/connectors/xstate.js +5 -5
- package/dist/{helpers-TPVJ6XTD.js → helpers-5KGGPDGO.js} +4 -4
- package/dist/{helpers-TPVJ6XTD.js.map → helpers-5KGGPDGO.js.map} +1 -1
- package/dist/{library-publish-4XE5BQTE.js → library-publish-ZQXODG4U.js} +6 -6
- package/dist/{library-publish-4XE5BQTE.js.map → library-publish-ZQXODG4U.js.map} +1 -1
- package/dist/{open-library-WFTFVJ67.js → open-library-FWUMCU7A.js} +5 -5
- package/dist/{open-library-WFTFVJ67.js.map → open-library-FWUMCU7A.js.map} +1 -1
- package/dist/{project-FI5A4E7X.js → project-UCWVE4YV.js} +5 -5
- package/dist/{project-FI5A4E7X.js.map → project-UCWVE4YV.js.map} +1 -1
- package/dist/runner/index.js +8 -8
- package/dist/sdk/asset-manager.js +1 -1
- package/dist/sdk/bridge.js +4 -4
- package/dist/sdk/index.js +8 -8
- package/dist/sdk/runner.js +8 -8
- package/dist/{setup-EDSTI5LM.js → setup-ACVYCGYQ.js} +9 -9
- package/dist/{setup-EDSTI5LM.js.map → setup-ACVYCGYQ.js.map} +1 -1
- package/dist/{source-7VNEUEGO.js → source-55ORZZU7.js} +6 -6
- package/dist/{source-7VNEUEGO.js.map → source-55ORZZU7.js.map} +1 -1
- package/dist/{source-manifest-publish-SQ2SXJEA.js → source-manifest-publish-2GMXNX6M.js} +7 -7
- package/dist/{source-manifest-publish-SQ2SXJEA.js.map → source-manifest-publish-2GMXNX6M.js.map} +1 -1
- package/dist/tui/index.js +8 -8
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4SIMGJIU.js.map +0 -1
- package/dist/chunk-LPPRZAO5.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { driverSessionConfigHome, removeSessionConfigFile, writeSessionConfigFile } from '../../chunk-6GSZLKA5.js';
|
|
2
|
-
import { SubprocessCliDriver, extractText } from '../../chunk-
|
|
3
|
-
import { resolveEnvDriverSession, resolveRegistryBinding, backendModelSelector, credentialsForEveryProvider, registryModelEntries, selectableEntries, isStockCatalogEndpoint, entrySurface, entryBaseUrl, entryModelIds, versionedAnthropicBaseUrl } from '../../chunk-
|
|
2
|
+
import { SubprocessCliDriver, extractText } from '../../chunk-FQ45HI34.js';
|
|
3
|
+
import { resolveEnvDriverSession, resolveRegistryBinding, backendModelSelector, credentialsForEveryProvider, registryModelEntries, selectableEntries, isStockCatalogEndpoint, entrySurface, entryBaseUrl, entryModelIds, versionedAnthropicBaseUrl } from '../../chunk-4BOSWZIB.js';
|
|
4
4
|
import '../../chunk-BGY4KTU6.js';
|
|
5
|
-
import { BUILTIN_DRIVER_CATALOG, getBridgeLogger, registryDriverConfig, providerCredentialEnvName } from '../../chunk-
|
|
5
|
+
import { BUILTIN_DRIVER_CATALOG, getBridgeLogger, registryDriverConfig, providerCredentialEnvName } from '../../chunk-C5SMPTNV.js';
|
|
6
6
|
import '../../chunk-6E6PKKAD.js';
|
|
7
7
|
import '../../chunk-UWU572Q6.js';
|
|
8
8
|
import '../../chunk-4GY63JU6.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { GeminiFamilyDriver } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import { resolveRegistryBinding } from '../../chunk-
|
|
4
|
-
import { fetchProviderModels } from '../../chunk-
|
|
1
|
+
import { GeminiFamilyDriver } from '../../chunk-4ZWAXIHA.js';
|
|
2
|
+
import '../../chunk-FQ45HI34.js';
|
|
3
|
+
import { resolveRegistryBinding } from '../../chunk-4BOSWZIB.js';
|
|
4
|
+
import { fetchProviderModels } from '../../chunk-R6DXYDPU.js';
|
|
5
5
|
import '../../chunk-BGY4KTU6.js';
|
|
6
|
-
import { BUILTIN_DRIVER_CATALOG, getBridgeLogger, entryCredentialValue, registryDriverConfig } from '../../chunk-
|
|
6
|
+
import { BUILTIN_DRIVER_CATALOG, getBridgeLogger, entryCredentialValue, registryDriverConfig } from '../../chunk-C5SMPTNV.js';
|
|
7
7
|
import '../../chunk-6E6PKKAD.js';
|
|
8
8
|
import '../../chunk-JMKB7IB4.js';
|
|
9
9
|
import '../../chunk-DPLIN2RA.js';
|
package/dist/bridge/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { BridgeRuntime, EventNormalizer, createRuntime, detectFileChange, detectFileChanges, labelToolCall, summarizeToolCall, summarizeToolResult, validateApiKey } from '../chunk-
|
|
2
|
-
export { ANTHROPIC_DEFAULT_BASE_URL, buildClaudeEndpointEnv, claudeEndpointMode, probeResumeTranscript, resolveClaudeConfigDir } from '../chunk-
|
|
1
|
+
export { BridgeRuntime, EventNormalizer, createRuntime, detectFileChange, detectFileChanges, labelToolCall, summarizeToolCall, summarizeToolResult, validateApiKey } from '../chunk-HRHV52XT.js';
|
|
2
|
+
export { AGENT_EXEC_ENV, ANTHROPIC_DEFAULT_BASE_URL, buildClaudeEndpointEnv, claudeEndpointMode, probeResumeTranscript, resolveAgentExec, resolveClaudeConfigDir, wrapAgentCommand } from '../chunk-3W7AOGPY.js';
|
|
3
3
|
export { CODEX_NATIVE_STATE_FORMAT, CodexNativeStateUnavailable } from '../chunk-LOO5CB5M.js';
|
|
4
4
|
export { dispatchCapability, filterRenderCapabilities, renderFallback } from '../chunk-TOXPRXAK.js';
|
|
5
|
-
export { ModelTierResolutionError, PROVIDER_MODEL_TIERS, STATIC_MODELS, fetchProviderModels, getModels, getStaticModels, modelIdTargetForEntry, resolveManifestModel, resolveModelCapabilities, resolveModelTier } from '../chunk-
|
|
5
|
+
export { ModelTierResolutionError, PROVIDER_MODEL_TIERS, STATIC_MODELS, fetchProviderModels, getModels, getStaticModels, modelIdTargetForEntry, resolveManifestModel, resolveModelCapabilities, resolveModelTier } from '../chunk-R6DXYDPU.js';
|
|
6
6
|
export { AccountUnavailableError, AuthError, RUNNER_PRIVATE_ENV_KEYS, classifyClaudeSdkError, reclassifyAuthAsAccountUnavailable, stripRunnerPrivateEnv } from '../chunk-BGY4KTU6.js';
|
|
7
|
-
export { AI_PROVIDER_PRESETS, AgentDriver, BUILTIN_DRIVER_CATALOG, DRIVER_CATALOG, PROVIDER_CREDENTIAL_ENV_PREFIX, PROVIDER_CREDENTIAL_ENV_SUFFIX, buildCredentialHeaders, catalogLayer, conventionalCredentialEnvName, createDriver, entryCredentialEnv, entryCredentialValue, expandPreset, getBridgeLogger, getProviderPreset, listDrivers, listModelsForDriver, listProviderPresets, presetBaseUrl, probeProviderEntry, providerCredentialEnvName, registerBuiltinDrivers, registryCredentialEnv, registryDriverConfig, resolveEntryCredential, resolvePresetBaseUrl, resolveProbeUrl, toMergedRegistry } from '../chunk-
|
|
7
|
+
export { AI_PROVIDER_PRESETS, AgentDriver, BUILTIN_DRIVER_CATALOG, DRIVER_CATALOG, PROVIDER_CREDENTIAL_ENV_PREFIX, PROVIDER_CREDENTIAL_ENV_SUFFIX, buildCredentialHeaders, catalogLayer, conventionalCredentialEnvName, createDriver, entryCredentialEnv, entryCredentialValue, expandPreset, getBridgeLogger, getProviderPreset, listDrivers, listModelsForDriver, listProviderPresets, presetBaseUrl, probeProviderEntry, providerCredentialEnvName, registerBuiltinDrivers, registryCredentialEnv, registryDriverConfig, resolveEntryCredential, resolvePresetBaseUrl, resolveProbeUrl, toMergedRegistry } from '../chunk-C5SMPTNV.js';
|
|
8
8
|
import '../chunk-6E6PKKAD.js';
|
|
9
9
|
import '../chunk-QQ3G5N7X.js';
|
|
10
10
|
import '../chunk-UWU572Q6.js';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Names the shim that starts agent processes as a separate uid.
|
|
3
|
+
*
|
|
4
|
+
* In the Skaile agent image the runner cannot switch uid itself (it runs with
|
|
5
|
+
* no-new-privs and no `CAP_SETUID`). When the container entrypoint has started
|
|
6
|
+
* the root launcher (`skaile-agent-launchd`), it exports this variable with the
|
|
7
|
+
* absolute path of the runner-side shim (`skaile-agent-exec`). A driver then
|
|
8
|
+
* spawns `<shim> -- <command> <args...>` instead of `<command>`: the shim
|
|
9
|
+
* passes its stdio, cwd, argv and env to the launcher, which runs the command
|
|
10
|
+
* as the agent uid, forwards signals and reports the exit status, so the
|
|
11
|
+
* returned child behaves like a direct one.
|
|
12
|
+
*
|
|
13
|
+
* Unset (every other environment, and the image until the entrypoint wires
|
|
14
|
+
* it): drivers spawn directly, unchanged.
|
|
15
|
+
*/
|
|
16
|
+
export declare const AGENT_EXEC_ENV = "SKAILE_AGENT_EXEC";
|
|
17
|
+
/**
|
|
18
|
+
* The shim path from `env`, or `null` when the uid split is off.
|
|
19
|
+
*
|
|
20
|
+
* Throws on a relative path rather than spawning the agent unsplit: only the
|
|
21
|
+
* entrypoint sets this, so a bad value is a broken image, and silently running
|
|
22
|
+
* the agent as the runner's uid would hide exactly what the variable promises.
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolveAgentExec(env?: Record<string, string | undefined>): string | null;
|
|
25
|
+
/**
|
|
26
|
+
* The command line to spawn: `command args` itself, or routed through the
|
|
27
|
+
* shim when one is configured. The `--` stops the shim reading the agent's
|
|
28
|
+
* own arguments as options.
|
|
29
|
+
*/
|
|
30
|
+
export declare function wrapAgentCommand(command: string, args: readonly string[], shim: string | null): {
|
|
31
|
+
command: string;
|
|
32
|
+
args: string[];
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=agent-exec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-exec.d.ts","sourceRoot":"","sources":["../../../bridge/src/agent-exec.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,sBAAsB,CAAC;AAElD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,MAAM,GAAG,IAAI,CASf;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,IAAI,EAAE,MAAM,GAAG,IAAI,GAClB;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAGrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-sdk.d.ts","sourceRoot":"","sources":["../../../../bridge/src/drivers/claude-sdk.ts"],"names":[],"mappings":"AAaA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,UAAU,EAEhB,MAAM,0BAA0B,CAAC;AAkBlC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"claude-sdk.d.ts","sourceRoot":"","sources":["../../../../bridge/src/drivers/claude-sdk.ts"],"names":[],"mappings":"AAaA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,UAAU,EAEhB,MAAM,0BAA0B,CAAC;AAkBlC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAkBvE,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAIpE,OAAO,EACL,KAAK,WAAW,EAChB,WAAW,EAKX,KAAK,UAAU,EAIf,KAAK,gBAAgB,EAEtB,MAAM,aAAa,CAAC;AAwXrB,6FAA6F;AAC7F,KAAK,aAAa,GAAG;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAYF;;;;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,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC,CAAC,GAAG,IAAI;IAIrF,QAAQ,IAAI,MAAM,GAAG,SAAS;IAIvC;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAyB7B,OAAO,CAAC,iBAAiB;IAoEzB,OAAO,CAAC,gBAAgB;IAuCxB,OAAO,CAAC,kBAAkB;IAuC1B,OAAO,CAAC,sBAAsB;IAmC9B,OAAO,CAAC,iBAAiB;IAmCzB,OAAO,CAAC,gBAAgB;IA6BxB,OAAO,CAAC,eAAe;IA4BvB,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,qBAAqB;IAO7B,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,oBAAoB;CAoC7B;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,WAAW,CAavD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DriverTarget } from "@skaile/workspaces/plugin-registry";
|
|
2
|
+
import { type TokenUsage } from "@skaile/workspaces/types";
|
|
2
3
|
import type { ModelEntry } from "../models.js";
|
|
3
|
-
import { type AgentConfig, AgentDriver, type DriverInfo } from "../types.js";
|
|
4
|
+
import { type AgentConfig, AgentDriver, type AgentPromptInput, type BridgeCapabilityTool, type DriverInfo, type SlashCommandInfo } from "../types.js";
|
|
4
5
|
/**
|
|
5
6
|
* Build the explicit env allowlist forwarded to the omp child process.
|
|
6
7
|
*
|
|
@@ -50,10 +51,79 @@ export declare const OMP_DEFAULT_TOOLS: readonly string[];
|
|
|
50
51
|
* @since 1.5.0
|
|
51
52
|
*/
|
|
52
53
|
export declare function buildOmpToolArgs(tools: AgentConfig["tools"]): string[];
|
|
54
|
+
/** One `set_host_tools` entry (`omp://rpc.md`, "set_host_tools payload"). */
|
|
55
|
+
export interface OmpHostToolDefinition {
|
|
56
|
+
name: string;
|
|
57
|
+
label: string;
|
|
58
|
+
description: string;
|
|
59
|
+
parameters: Record<string, unknown>;
|
|
60
|
+
loadMode: "essential";
|
|
61
|
+
}
|
|
62
|
+
/** Result of {@link buildOmpHostTools}. */
|
|
63
|
+
export interface OmpHostToolSet {
|
|
64
|
+
/** Definitions to send in `set_host_tools`. */
|
|
65
|
+
definitions: OmpHostToolDefinition[];
|
|
66
|
+
/** omp host tool name → capability name, for routing `host_tool_call`. */
|
|
67
|
+
capabilityNames: Map<string, string>;
|
|
68
|
+
/** Capabilities left out because the provider would reject their schema. */
|
|
69
|
+
dropped: Array<{
|
|
70
|
+
tool: string;
|
|
71
|
+
reason: string;
|
|
72
|
+
}>;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Turn the runner's capability tool list into omp host tool definitions.
|
|
76
|
+
*
|
|
77
|
+
* omp accepts any name in `set_host_tools` but forwards it to the provider
|
|
78
|
+
* as-is, and providers reject anything outside `^[a-zA-Z0-9_-]{1,64}$` with a
|
|
79
|
+
* 400 that fails the whole turn (verified against omp 18.6.0 + Anthropic:
|
|
80
|
+
* `app.editor.open` → `tools.3.custom.name: String should match pattern`).
|
|
81
|
+
* Names are therefore sanitised (`app.editor.open` → `app_editor_open`) and
|
|
82
|
+
* the original kept in `capabilityNames`. Collisions — with another
|
|
83
|
+
* capability or with an omp built-in, which omp refuses — get a numeric
|
|
84
|
+
* suffix.
|
|
85
|
+
*
|
|
86
|
+
* omp also forwards the JSON Schema untouched, so each advertised schema is
|
|
87
|
+
* checked with the same rules the claude-sdk driver applies to raw MCP
|
|
88
|
+
* schemas ({@link checkToolInputSchema}); a failing tool is dropped rather
|
|
89
|
+
* than turning every request into a 400. `loadMode: "essential"` keeps every
|
|
90
|
+
* capability in the prompt instead of behind omp's tool discovery, matching
|
|
91
|
+
* claude-sdk where every capability is in the tool list.
|
|
92
|
+
*
|
|
93
|
+
* Pure — exported for direct testing.
|
|
94
|
+
*/
|
|
95
|
+
export declare function buildOmpHostTools(tools: readonly BridgeCapabilityTool[]): OmpHostToolSet;
|
|
96
|
+
/** Thinking levels omp accepts for `--thinking` / `set_thinking_level`. omp drops anything else silently. */
|
|
97
|
+
export declare const OMP_THINKING_LEVELS: readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max", "auto"];
|
|
98
|
+
export type OmpThinkingLevel = (typeof OMP_THINKING_LEVELS)[number];
|
|
99
|
+
/**
|
|
100
|
+
* Map `AgentConfig.thinking` / `effort` to an omp thinking level.
|
|
101
|
+
*
|
|
102
|
+
* `disabled` wins over `effort` → `off`. Otherwise an explicit `effort`
|
|
103
|
+
* (low/medium/high/max) maps to the same-named level (omp clamps `max` to
|
|
104
|
+
* `xhigh` on models without it). Without effort, `enabled` → `medium` and
|
|
105
|
+
* `adaptive` → `auto`. Returns `undefined` when neither is set (omp keeps its
|
|
106
|
+
* own default) or when the value is outside omp's set — `set_thinking_level`
|
|
107
|
+
* accepts garbage without an error, so validation has to happen here.
|
|
108
|
+
*/
|
|
109
|
+
export declare function ompThinkingLevel(cfg: Pick<AgentConfig, "thinking" | "effort">): OmpThinkingLevel | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* Split a model selector into the `provider` / `modelId` pair `set_model`
|
|
112
|
+
* takes. The registry renders selectors as `<providerId>/<providerModelId>`
|
|
113
|
+
* (the spawn-time `--model` value); provider ids never contain `/` but model
|
|
114
|
+
* ids can, so the split is on the FIRST `/`:
|
|
115
|
+
* `openrouter/anthropic/claude-sonnet-4` → `{ provider: "openrouter", modelId: "anthropic/claude-sonnet-4" }`.
|
|
116
|
+
* A bare name (no `provider/` prefix) cannot be expressed: omp's `--model`
|
|
117
|
+
* fuzzy matching has no RPC equivalent, so the result is `undefined`.
|
|
118
|
+
*/
|
|
119
|
+
export declare function splitOmpModel(model: string): {
|
|
120
|
+
provider: string;
|
|
121
|
+
modelId: string;
|
|
122
|
+
} | undefined;
|
|
53
123
|
/**
|
|
54
124
|
* Agent driver for the oh-my-pi (omp) coding agent.
|
|
55
125
|
*
|
|
56
|
-
* Spawns `omp --mode rpc` as a child process and communicates via newline-delimited
|
|
126
|
+
* Spawns `omp --mode rpc-ui --no-ui` as a child process and communicates via newline-delimited
|
|
57
127
|
* JSON-RPC over stdin/stdout. Model-agnostic: supports any LLM provider.
|
|
58
128
|
*
|
|
59
129
|
* @see https://github.com/can1357/oh-my-pi
|
|
@@ -75,6 +145,18 @@ export declare function buildOmpToolArgs(tools: AgentConfig["tools"]): string[];
|
|
|
75
145
|
* **agentDir** — maps to the `PI_CODING_AGENT_DIR` environment variable. omp reads the
|
|
76
146
|
* GitAgent directory at this path natively (agent.yaml, SOUL.md, RULES.md, knowledge/).
|
|
77
147
|
*
|
|
148
|
+
* **Capabilities** — `AgentConfig.capabilities` (Protocol v2) is registered with omp
|
|
149
|
+
* as host tools (`set_host_tools`) once the process is ready, and again whenever the
|
|
150
|
+
* registry reports a change. omp calls them back with `host_tool_call`, answered via
|
|
151
|
+
* `dispatchCapability` exactly as claude-sdk's `skaile-capabilities` MCP server does.
|
|
152
|
+
* Names are sanitised for the provider; see {@link buildOmpHostTools}.
|
|
153
|
+
*
|
|
154
|
+
* **Questions** — omp's `ask` tool is enabled as one `extension_ui_request` dialog
|
|
155
|
+
* (`set_ask_dialog`), published as the same `question` events as claude-sdk's
|
|
156
|
+
* `AskUserQuestion` and answered through {@link OmpDriver.answerQuestion}. The turn stays
|
|
157
|
+
* parked in omp until then; abort, kill and process exit release it. Dialogs the host
|
|
158
|
+
* cannot answer (`confirm`, `input`, `editor`) are cancelled immediately.
|
|
159
|
+
*
|
|
78
160
|
* @docLink packages/bridge/drivers#omp-driver
|
|
79
161
|
*/
|
|
80
162
|
export declare class OmpDriver extends AgentDriver {
|
|
@@ -90,15 +172,96 @@ export declare class OmpDriver extends AgentDriver {
|
|
|
90
172
|
private prevText;
|
|
91
173
|
/** OMP session ID captured via `get_state` after each turn. */
|
|
92
174
|
private _ompSessionId?;
|
|
175
|
+
/**
|
|
176
|
+
* Usage of the most recent turn, summed over every model call in it (a tool
|
|
177
|
+
* loop is one prompt but many assistant messages). Cleared when a turn
|
|
178
|
+
* starts, like claude-sdk, so it never mixes two turns.
|
|
179
|
+
*/
|
|
180
|
+
private _lastTokens;
|
|
181
|
+
/**
|
|
182
|
+
* Prompt size of the most recent model call: the real context fill, which
|
|
183
|
+
* `_lastTokens` (turn-cumulative) overstates on a tool loop. omp's own
|
|
184
|
+
* `get_state.contextUsage.tokens` replaces it once that reply lands.
|
|
185
|
+
*/
|
|
186
|
+
private _lastContextTokens;
|
|
187
|
+
/** Context window of the active model, from `get_state.contextUsage`. */
|
|
188
|
+
private _contextWindow;
|
|
189
|
+
getTokenUsage(): TokenUsage | null;
|
|
190
|
+
getContextTokens(): number | null;
|
|
191
|
+
getContextWindow(): number | null;
|
|
93
192
|
/** Per-turn settlement handlers; non-null only while a prompt is in flight. */
|
|
94
193
|
private turnResolve;
|
|
95
194
|
private turnReject;
|
|
195
|
+
/** omp host tool name → capability name for the last `set_host_tools` sent. */
|
|
196
|
+
private hostToolCapabilities;
|
|
197
|
+
/** In-flight `host_tool_call`s by omp request id; aborted by `host_tool_cancel`. */
|
|
198
|
+
private readonly hostToolCalls;
|
|
199
|
+
/** Requests awaiting a `response`, by request id; failed when the process goes away. */
|
|
200
|
+
private readonly pendingRequests;
|
|
201
|
+
/** Unsubscribes the capability registry listener; set while a process runs. */
|
|
202
|
+
private unsubscribeToolsChanged;
|
|
203
|
+
/** Request ids whose failed `response` is logged by the caller, not surfaced as an error event. */
|
|
204
|
+
private readonly quietRequestIds;
|
|
205
|
+
/** Capability tools already warned about, so a re-send logs each once. */
|
|
206
|
+
private readonly warnedDroppedHostTools;
|
|
207
|
+
/** The `ask` (or `select` fallback) omp is parked on, until answered, cancelled or the process ends. */
|
|
208
|
+
private pendingQuestion;
|
|
209
|
+
/**
|
|
210
|
+
* Tail of the FIFO of prompts: each `prompt()`/`promptInput()` runs only after
|
|
211
|
+
* the previous one settled, so one turn at a time is ever in flight (omp runs
|
|
212
|
+
* a single agent loop). Never rejects.
|
|
213
|
+
*/
|
|
214
|
+
private promptTail;
|
|
96
215
|
get runtimeSessionId(): string | undefined;
|
|
216
|
+
/** Slash commands from omp's last `available_commands_update`. */
|
|
217
|
+
private cachedCommands;
|
|
218
|
+
getSlashCommands(): SlashCommandInfo[];
|
|
97
219
|
getModel(): string | undefined;
|
|
220
|
+
/**
|
|
221
|
+
* What the running omp process was last told, by config snapshot: `model`,
|
|
222
|
+
* `thinking` and `effort` are the config values those settings came from (also
|
|
223
|
+
* the rollback targets when omp rejects a change), `level` the omp thinking
|
|
224
|
+
* level sent. Set at spawn, updated on each successful `set_*`.
|
|
225
|
+
*/
|
|
226
|
+
private ompApplied;
|
|
227
|
+
/** Serialises live reconfigure RPCs so concurrent patches never interleave. */
|
|
228
|
+
private reconfigureChain;
|
|
229
|
+
/**
|
|
230
|
+
* Apply `model` / `thinking` / `effort` to this driver and, when the process
|
|
231
|
+
* is up and idle, to the running omp session (`set_model` /
|
|
232
|
+
* `set_thinking_level`). The base contract is synchronous and void, so the
|
|
233
|
+
* RPCs are fire-and-forget: a rejected change is surfaced as an `error`
|
|
234
|
+
* agent event and the config rolls back, keeping {@link getModel} honest.
|
|
235
|
+
*
|
|
236
|
+
* A patch that arrives mid-turn or before `ready` is not lost: config is the
|
|
237
|
+
* source of truth, flushed before the next `prompt()` and read by the next
|
|
238
|
+
* spawn. A model `set_model` cannot express live (no `provider/` prefix) is
|
|
239
|
+
* rejected the same way as one omp refuses: an `error` event and a rollback,
|
|
240
|
+
* since the running process cannot switch to it. In registry mode the patch
|
|
241
|
+
* also replaces `modelRef`, so a respawn (crash, `resetSession()`) starts the
|
|
242
|
+
* reconfigured model; models.yml already lists every enabled provider.
|
|
243
|
+
*/
|
|
244
|
+
reconfigure(patch: Partial<Pick<AgentConfig, "model" | "thinking" | "effort">>): void;
|
|
245
|
+
private syncReconfigure;
|
|
246
|
+
/** Push config drift to the running process. Never rejects. */
|
|
247
|
+
private applyReconfigure;
|
|
248
|
+
/**
|
|
249
|
+
* Restore the model the running process holds after a failed live switch —
|
|
250
|
+
* unless a newer patch already replaced `model` (it will be applied next).
|
|
251
|
+
*/
|
|
252
|
+
private rollbackModel;
|
|
253
|
+
/** Push thinking/effort drift to the running process. Never rejects. */
|
|
254
|
+
private applyThinking;
|
|
255
|
+
/**
|
|
256
|
+
* Send one live-reconfigure request. A failed `response` is already emitted
|
|
257
|
+
* as an `error` event by {@link handleEvent}; a transport failure (timeout,
|
|
258
|
+
* process gone) is emitted here. Returns whether omp accepted it.
|
|
259
|
+
*/
|
|
260
|
+
private sendReconfigure;
|
|
98
261
|
/**
|
|
99
262
|
* @param config - Driver configuration. omp-relevant fields:
|
|
100
263
|
* - `cwd` — working directory; omp session files are stored under `<cwd>/.omp/sessions/`.
|
|
101
|
-
* - `model`
|
|
264
|
+
* - `model` — forwarded as `--model <selector>`. In registry mode `modelRef` takes precedence at spawn; `reconfigure({ model })` keeps both in step.
|
|
102
265
|
* - `systemPrompt` — written to `<cwd>/.omp/system.md` and appended via `--append-system-prompt`.
|
|
103
266
|
* - `agentDir` — sets `PI_CODING_AGENT_DIR`; omp reads agent identity from this directory.
|
|
104
267
|
* - `sshKeyPath` — injected as `GIT_SSH_COMMAND` for authenticated git operations.
|
|
@@ -107,7 +270,79 @@ export declare class OmpDriver extends AgentDriver {
|
|
|
107
270
|
constructor(config: AgentConfig);
|
|
108
271
|
start(): Promise<void>;
|
|
109
272
|
private _start;
|
|
273
|
+
/**
|
|
274
|
+
* Register the runner's capabilities with omp as host tools.
|
|
275
|
+
*
|
|
276
|
+
* Sends the full set every time: `set_host_tools` replaces omp's previous
|
|
277
|
+
* host-owned set, so a registry change that removes a capability takes
|
|
278
|
+
* effect too. Best-effort — a failure is logged and the session runs
|
|
279
|
+
* without host tools rather than failing to start.
|
|
280
|
+
*/
|
|
281
|
+
private syncHostTools;
|
|
282
|
+
/**
|
|
283
|
+
* Execute a capability omp asked the host to run (`host_tool_call`) and
|
|
284
|
+
* answer with `host_tool_result`. Goes through {@link dispatchCapability}
|
|
285
|
+
* so validation, fire-and-forget and render semantics match claude-sdk.
|
|
286
|
+
*
|
|
287
|
+
* Emits `tool_call` / `tool_execution_end` around the dispatch: the
|
|
288
|
+
* normalizer does not read omp's own tool frames, so without these the
|
|
289
|
+
* call — and its `activity_label` — would never reach the chat.
|
|
290
|
+
*/
|
|
291
|
+
private handleHostToolCall;
|
|
292
|
+
/**
|
|
293
|
+
* `host_tool_cancel`: omp aborted the call, so abort the capability handler
|
|
294
|
+
* and close the call's chat activity (the handler's later settlement is
|
|
295
|
+
* ignored, so this is the only `tool_execution_end` the call gets).
|
|
296
|
+
*/
|
|
297
|
+
private handleHostToolCancel;
|
|
298
|
+
/** Abort one in-flight host tool call and end its activity; no-op if already settled. */
|
|
299
|
+
private abortHostToolCall;
|
|
300
|
+
/**
|
|
301
|
+
* `extension_ui_request`: omp asks the host something. Only `ask` (and the
|
|
302
|
+
* `select` omp falls back to when `set_ask_dialog` is unavailable) can carry
|
|
303
|
+
* a user question; both park until {@link answerQuestion}. Presentation
|
|
304
|
+
* frames expect no reply. Every other kind is a dialog nobody here can
|
|
305
|
+
* answer, so it is cancelled at once — an unanswered dialog would leave the
|
|
306
|
+
* tool call, and the turn, waiting forever.
|
|
307
|
+
*/
|
|
308
|
+
private handleExtensionUiRequest;
|
|
309
|
+
private parseAskRequest;
|
|
310
|
+
private parseSelectRequest;
|
|
311
|
+
/**
|
|
312
|
+
* Publish the parked question the way claude-sdk does for `AskUserQuestion`:
|
|
313
|
+
* an assistant `tool_use` block the normalizer turns into one `question`
|
|
314
|
+
* event per question, plus the matching `tool_call`. Option descriptions and
|
|
315
|
+
* `header`s survive in the tool input for consumers that render them.
|
|
316
|
+
*/
|
|
317
|
+
private announceQuestion;
|
|
318
|
+
hasPendingQuestion(): boolean;
|
|
319
|
+
/**
|
|
320
|
+
* While omp is parked on a question a reply that is not an answer must not
|
|
321
|
+
* become a prompt: the turn is still running, and a second prompt would
|
|
322
|
+
* collide with it.
|
|
323
|
+
*/
|
|
324
|
+
get acceptsReplyAsPrompt(): boolean;
|
|
325
|
+
answerQuestion(answer: string, question?: string, requestId?: string): boolean;
|
|
326
|
+
/** Shape the collected answers as the `extension_ui_response` payload for the request's method. */
|
|
327
|
+
private buildQuestionResponse;
|
|
328
|
+
/** Write an `extension_ui_response`; undeliverable (process gone) is logged, not thrown. */
|
|
329
|
+
private sendUiResponse;
|
|
330
|
+
/** Drop the pending question and tell omp it was cancelled, so its tool call unwinds. */
|
|
331
|
+
private cancelPendingQuestion;
|
|
332
|
+
/**
|
|
333
|
+
* Opt in to omp's single `ask` dialog request (off by default per process).
|
|
334
|
+
* Best-effort: a build without the command answers with a failed response and
|
|
335
|
+
* its `ask` keeps degrading to one `select` per question, which
|
|
336
|
+
* {@link handleExtensionUiRequest} still surfaces as a question.
|
|
337
|
+
*/
|
|
338
|
+
private enableAskDialog;
|
|
110
339
|
private extractMessageText;
|
|
340
|
+
/**
|
|
341
|
+
* `available_commands_update`: replace the cached slash-command list and
|
|
342
|
+
* publish it. Names carry no leading slash (omp's already don't), matching
|
|
343
|
+
* claude-sdk's `commands_available`. Entries without a name are skipped.
|
|
344
|
+
*/
|
|
345
|
+
private handleCommandsUpdate;
|
|
111
346
|
private handleEvent;
|
|
112
347
|
/**
|
|
113
348
|
* Resolve the in-flight prompt turn (on `agent_end`). Idempotent — a turn
|
|
@@ -120,12 +355,35 @@ export declare class OmpDriver extends AgentDriver {
|
|
|
120
355
|
*/
|
|
121
356
|
private rejectTurn;
|
|
122
357
|
/**
|
|
123
|
-
* Query OMP
|
|
124
|
-
*
|
|
125
|
-
*
|
|
358
|
+
* Query OMP's current state via the `get_state` RPC.
|
|
359
|
+
*
|
|
360
|
+
* Always refreshes the context fill from `contextUsage`. With
|
|
361
|
+
* `announceSession` (the default, used after each turn) it also records the
|
|
362
|
+
* native session ID and emits a `session_info` event so the forge layer can
|
|
363
|
+
* persist it. Failures are silently swallowed — both are best-effort.
|
|
364
|
+
*/
|
|
365
|
+
private captureState;
|
|
366
|
+
/** `get_state.contextUsage` → context fill + window; absent or malformed values are ignored. */
|
|
367
|
+
private captureContextUsage;
|
|
368
|
+
/** Forget the previous turn's usage; called as a new turn begins. */
|
|
369
|
+
private beginUsageTurn;
|
|
370
|
+
/**
|
|
371
|
+
* Fold one finished assistant message into the turn's usage. Only the
|
|
372
|
+
* `message_end` value is final (`message_start` and partials carry running
|
|
373
|
+
* zeros). A message without usage, or an errored one reporting all zeros,
|
|
374
|
+
* bills nothing and must neither create a reading nor wipe a good one.
|
|
126
375
|
*/
|
|
127
|
-
private
|
|
376
|
+
private recordMessageUsage;
|
|
128
377
|
private nextId;
|
|
378
|
+
/**
|
|
379
|
+
* Send a command and await its `response` frame.
|
|
380
|
+
*
|
|
381
|
+
* @param options.quiet - Leave a failed response to the caller instead of
|
|
382
|
+
* surfacing it as an `error` agent event.
|
|
383
|
+
* @throws When the process is not running or no response arrives within
|
|
384
|
+
* `options.timeoutMs` (default 5 s).
|
|
385
|
+
*/
|
|
386
|
+
private request;
|
|
129
387
|
private send;
|
|
130
388
|
/**
|
|
131
389
|
* Sends a prompt to the omp process via JSON-RPC and resolves when the turn
|
|
@@ -141,6 +399,28 @@ export declare class OmpDriver extends AgentDriver {
|
|
|
141
399
|
* the child crashes/exits before the turn completes.
|
|
142
400
|
*/
|
|
143
401
|
prompt(message: string): Promise<void>;
|
|
402
|
+
/**
|
|
403
|
+
* Run one prompt after every earlier one settled. A question omp is parked on
|
|
404
|
+
* is cancelled first, synchronously and ahead of the queue: the parked turn
|
|
405
|
+
* can only finish once its `ask` is released, so the new prompt (the user
|
|
406
|
+
* typing instead of answering) must not wait behind it. The runner does not
|
|
407
|
+
* serialise `prompt` commands, so the driver does, as claude-sdk does.
|
|
408
|
+
*/
|
|
409
|
+
private enqueuePrompt;
|
|
410
|
+
/**
|
|
411
|
+
* Structured prompt: text plus image/file/skill attachments. Images travel as
|
|
412
|
+
* omp `ImageContent` (`prompt.images`, base64 + mimeType); file and skill
|
|
413
|
+
* attachments are named in a text preamble, because omp reads files itself.
|
|
414
|
+
* Turn settlement is shared with {@link prompt}.
|
|
415
|
+
*/
|
|
416
|
+
promptInput(input: AgentPromptInput): Promise<void>;
|
|
417
|
+
/** Resolve attachments into the `message` + `images` fields of an omp `prompt` frame. */
|
|
418
|
+
private buildPromptPayload;
|
|
419
|
+
/**
|
|
420
|
+
* Send one `prompt` frame and resolve when the turn completes (`agent_end`).
|
|
421
|
+
* Rejects if the child dies first.
|
|
422
|
+
*/
|
|
423
|
+
private runPrompt;
|
|
144
424
|
/**
|
|
145
425
|
* Sends an in-band abort RPC to the omp process, requesting it to stop the
|
|
146
426
|
* current turn without terminating the child process.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"omp.d.ts","sourceRoot":"","sources":["../../../../bridge/src/drivers/omp.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"omp.d.ts","sourceRoot":"","sources":["../../../../bridge/src/drivers/omp.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAEL,KAAK,UAAU,EAEhB,MAAM,0BAA0B,CAAC;AAMlC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/C,OAAO,EACL,KAAK,WAAW,EAChB,WAAW,EAEX,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AAQrB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAalF;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,qJAgBpB,CAAC;AAEX,wEAAwE;AACxE,eAAO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AAE,YAAY,CAAC,WAAW,CAarD,CAAC"}
|
|
@@ -3,6 +3,7 @@ export * from "./cloud.js";
|
|
|
3
3
|
export { AccountUnavailableError, AuthError, type ClaudeSdkResultErrorInput, classifyClaudeSdkError, reclassifyAuthAsAccountUnavailable, } from "./error-classifier.js";
|
|
4
4
|
export * from "./logger.js";
|
|
5
5
|
export * from "./models.js";
|
|
6
|
+
export * from "./agent-exec.js";
|
|
6
7
|
export * from "./runner-private-env.js";
|
|
7
8
|
export * from "./normalizer.js";
|
|
8
9
|
export * from "./provider-catalog.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../bridge/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,KAAK,yBAAyB,EAC9B,sBAAsB,EACtB,kCAAkC,GACnC,MAAM,uBAAuB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AAItC,cAAc,0CAA0C,CAAC;AACzD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,OAAO,EACL,qBAAqB,EACrB,KAAK,kBAAkB,EACvB,sBAAsB,GACvB,MAAM,2BAA2B,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../bridge/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,KAAK,yBAAyB,EAC9B,sBAAsB,EACtB,kCAAkC,GACnC,MAAM,uBAAuB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AAItC,cAAc,0CAA0C,CAAC;AACzD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,OAAO,EACL,qBAAqB,EACrB,KAAK,kBAAkB,EACvB,sBAAsB,GACvB,MAAM,2BAA2B,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -22,6 +22,11 @@ export declare class EventNormalizer {
|
|
|
22
22
|
private devServerReadyEmitted;
|
|
23
23
|
/** True when message_update deltas have been emitted for the current message. */
|
|
24
24
|
private hasStreamedText;
|
|
25
|
+
/**
|
|
26
|
+
* True once a `_thinkingDelta` run has been reported as `status: thinking`;
|
|
27
|
+
* cleared by the next text delta or assistant message, so a run reports once.
|
|
28
|
+
*/
|
|
29
|
+
private thinkingAnnounced;
|
|
25
30
|
/**
|
|
26
31
|
* tool_use blocks `message_start` already reported, awaiting the driver's
|
|
27
32
|
* matching bridge `tool_call` — which must then not report the call again.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizer.d.ts","sourceRoot":"","sources":["../../../bridge/src/normalizer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,KAAK,UAAU,IAAI,eAAe,EAKnC,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAgB,UAAU,IAAI,WAAW,EAAgB,MAAM,YAAY,CAAC;AAgDxF;;;;;;;;GAQG;AACH,qBAAa,eAAe;IAC1B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AAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,YAAY;IAuCpB,OAAO,CAAC,uBAAuB;IAa/B,OAAO,CAAC,oBAAoB;IA2B5B,OAAO,CAAC,gBAAgB;CAOzB;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CA2BtF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAS9F;AAiED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,CA6BzE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,eAAe,EAAE,CAiCtF;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,eAAe,GAAG,IAAI,CAE1F"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { fsDeadlineMs, withFsDeadline, tryWithFsDeadline } from './chunk-2FBPAR2V.js';
|
|
2
2
|
import { entryTransport, normalizeAnthropicBaseUrl, resolveEntryBaseUrl } from './chunk-GZZPKAV5.js';
|
|
3
|
+
import { isAbsolute, join } from 'path';
|
|
3
4
|
import { createReadStream, createWriteStream } from 'fs';
|
|
4
5
|
import { readdir, stat, rename, unlink } from 'fs/promises';
|
|
5
|
-
import { join } from 'path';
|
|
6
6
|
import { pipeline } from 'stream/promises';
|
|
7
7
|
import { homedir } from 'os';
|
|
8
8
|
|
|
@@ -77,6 +77,21 @@ function buildClaudeEndpointEnv(args) {
|
|
|
77
77
|
}
|
|
78
78
|
return env;
|
|
79
79
|
}
|
|
80
|
+
var AGENT_EXEC_ENV = "SKAILE_AGENT_EXEC";
|
|
81
|
+
function resolveAgentExec(env = process.env) {
|
|
82
|
+
const value = env[AGENT_EXEC_ENV]?.trim();
|
|
83
|
+
if (!value) return null;
|
|
84
|
+
if (!isAbsolute(value)) {
|
|
85
|
+
throw new Error(
|
|
86
|
+
`${AGENT_EXEC_ENV} must be an absolute path to the agent launch shim, got "${value}"`
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
function wrapAgentCommand(command, args, shim) {
|
|
92
|
+
if (!shim) return { command, args: [...args] };
|
|
93
|
+
return { command: shim, args: ["--", command, ...args] };
|
|
94
|
+
}
|
|
80
95
|
var STUB_TEXT = "[image removed: unprocessable image data]";
|
|
81
96
|
var STUB_TEXT_OVERSIZED = "[image removed: image too large]";
|
|
82
97
|
var MAX_IMAGE_BYTES = 5 * 1024 * 1024;
|
|
@@ -293,6 +308,6 @@ async function probeResumeTranscript(sessionId, opts) {
|
|
|
293
308
|
}
|
|
294
309
|
}
|
|
295
310
|
|
|
296
|
-
export { ANTHROPIC_DEFAULT_BASE_URL, buildClaudeEndpointEnv, claudeEndpointMode, probeResumeTranscript, resolveClaudeConfigDir, scrubPoisonedTranscript };
|
|
297
|
-
//# sourceMappingURL=chunk-
|
|
298
|
-
//# sourceMappingURL=chunk-
|
|
311
|
+
export { AGENT_EXEC_ENV, ANTHROPIC_DEFAULT_BASE_URL, buildClaudeEndpointEnv, claudeEndpointMode, probeResumeTranscript, resolveAgentExec, resolveClaudeConfigDir, scrubPoisonedTranscript, wrapAgentCommand };
|
|
312
|
+
//# sourceMappingURL=chunk-3W7AOGPY.js.map
|
|
313
|
+
//# sourceMappingURL=chunk-3W7AOGPY.js.map
|