@skaile/workspaces 6.7.0 → 6.8.1
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 +12 -0
- package/dist/app-sdk/index.js +1 -1
- package/dist/{asset-feeds-4A7PJ4OB.js → asset-feeds-R75MH2WW.js} +6 -6
- package/dist/{asset-feeds-4A7PJ4OB.js.map → asset-feeds-R75MH2WW.js.map} +1 -1
- package/dist/asset-manager/index.js +1 -1
- package/dist/bridge/harnesses/claude-sdk.js +18 -10
- package/dist/bridge/harnesses/claude-sdk.js.map +1 -1
- package/dist/bridge/harnesses/codex.js +3 -3
- package/dist/bridge/harnesses/continue.js +4 -4
- package/dist/bridge/harnesses/echo.js +4 -4
- package/dist/bridge/harnesses/gemini.js +5 -5
- package/dist/bridge/harnesses/goose.js +4 -4
- package/dist/bridge/harnesses/omp.js +6 -6
- package/dist/bridge/harnesses/opencode.js +4 -4
- package/dist/bridge/harnesses/qwen.js +5 -5
- package/dist/bridge/index.js +9 -9
- package/dist/bridge/src/harnesses/claude-sdk.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/claude-self-turns.d.ts.map +1 -1
- package/dist/bridge/src/types.d.ts +11 -0
- package/dist/bridge/src/types.d.ts.map +1 -1
- package/dist/{chunk-ZDTDS62B.js → chunk-56PIAGD6.js} +2 -2
- package/dist/{chunk-ZDTDS62B.js.map → chunk-56PIAGD6.js.map} +1 -1
- package/dist/{chunk-TXX3OUYI.js → chunk-62NNP7LU.js} +3 -3
- package/dist/{chunk-TXX3OUYI.js.map → chunk-62NNP7LU.js.map} +1 -1
- package/dist/{chunk-KORDNXKA.js → chunk-6PVRP3LW.js} +36 -5
- package/dist/chunk-6PVRP3LW.js.map +1 -0
- package/dist/{chunk-HPXONAI2.js → chunk-6ZM5X2XW.js} +3 -3
- package/dist/{chunk-HPXONAI2.js.map → chunk-6ZM5X2XW.js.map} +1 -1
- package/dist/{chunk-ASBZOTEO.js → chunk-7NN3P6VF.js} +22 -5
- package/dist/chunk-7NN3P6VF.js.map +1 -0
- package/dist/{chunk-Q2NYTMT6.js → chunk-7O2CR5SZ.js} +5 -5
- package/dist/{chunk-Q2NYTMT6.js.map → chunk-7O2CR5SZ.js.map} +1 -1
- package/dist/{chunk-37X4A6VZ.js → chunk-7RBFYW24.js} +4 -4
- package/dist/{chunk-37X4A6VZ.js.map → chunk-7RBFYW24.js.map} +1 -1
- package/dist/{chunk-72TLO2AG.js → chunk-BGATDUYX.js} +3 -3
- package/dist/{chunk-72TLO2AG.js.map → chunk-BGATDUYX.js.map} +1 -1
- package/dist/{chunk-NURTGAWM.js → chunk-BRPEW3UL.js} +3 -3
- package/dist/{chunk-NURTGAWM.js.map → chunk-BRPEW3UL.js.map} +1 -1
- package/dist/{chunk-L3JQJ6D5.js → chunk-DXBHGNSI.js} +4 -4
- package/dist/{chunk-L3JQJ6D5.js.map → chunk-DXBHGNSI.js.map} +1 -1
- package/dist/{chunk-CTRTFMCX.js → chunk-E5AZA2FL.js} +3 -3
- package/dist/{chunk-CTRTFMCX.js.map → chunk-E5AZA2FL.js.map} +1 -1
- package/dist/{chunk-IRK3LNG3.js → chunk-EDKTS44C.js} +3 -3
- package/dist/{chunk-IRK3LNG3.js.map → chunk-EDKTS44C.js.map} +1 -1
- package/dist/{chunk-ZM4SDVUV.js → chunk-I4DI5DAX.js} +8 -8
- package/dist/{chunk-ZM4SDVUV.js.map → chunk-I4DI5DAX.js.map} +1 -1
- package/dist/{chunk-4C2E5QUP.js → chunk-I6XH46Q6.js} +3 -3
- package/dist/{chunk-4C2E5QUP.js.map → chunk-I6XH46Q6.js.map} +1 -1
- package/dist/{chunk-BKLDBUQA.js → chunk-JAGBPHXB.js} +3 -3
- package/dist/{chunk-BKLDBUQA.js.map → chunk-JAGBPHXB.js.map} +1 -1
- package/dist/{chunk-GAIMSCZ7.js → chunk-LL5GMUQG.js} +6 -6
- package/dist/{chunk-GAIMSCZ7.js.map → chunk-LL5GMUQG.js.map} +1 -1
- package/dist/{chunk-OGTQUEAO.js → chunk-LZ3E6TML.js} +5 -5
- package/dist/{chunk-OGTQUEAO.js.map → chunk-LZ3E6TML.js.map} +1 -1
- package/dist/{chunk-L7QOZG5V.js → chunk-N2W7OJC6.js} +6 -3
- package/dist/chunk-N2W7OJC6.js.map +1 -0
- package/dist/{chunk-WKENHNDM.js → chunk-N65H7YYI.js} +3 -3
- package/dist/{chunk-WKENHNDM.js.map → chunk-N65H7YYI.js.map} +1 -1
- package/dist/{chunk-LX4TTTRR.js → chunk-NAEXYRHR.js} +313 -48
- package/dist/chunk-NAEXYRHR.js.map +1 -0
- package/dist/{chunk-UCB7FK25.js → chunk-NW7Y5SNK.js} +4 -4
- package/dist/{chunk-UCB7FK25.js.map → chunk-NW7Y5SNK.js.map} +1 -1
- package/dist/{chunk-6RPS7JEH.js → chunk-OLZE4IHX.js} +284 -29
- package/dist/chunk-OLZE4IHX.js.map +1 -0
- package/dist/{chunk-PLLZSKOO.js → chunk-ORXV3UB6.js} +3 -3
- package/dist/{chunk-PLLZSKOO.js.map → chunk-ORXV3UB6.js.map} +1 -1
- package/dist/{chunk-RAHAZ7LP.js → chunk-PKC2AHOB.js} +2 -2
- package/dist/{chunk-RAHAZ7LP.js.map → chunk-PKC2AHOB.js.map} +1 -1
- package/dist/{chunk-AO57IFME.js → chunk-QGA2OBUJ.js} +3 -3
- package/dist/{chunk-AO57IFME.js.map → chunk-QGA2OBUJ.js.map} +1 -1
- package/dist/{chunk-U52FYGK5.js → chunk-REAF7ZFA.js} +4 -4
- package/dist/{chunk-U52FYGK5.js.map → chunk-REAF7ZFA.js.map} +1 -1
- package/dist/{chunk-ZBA4P5TD.js → chunk-SAL72A7T.js} +2 -2
- package/dist/{chunk-ZBA4P5TD.js.map → chunk-SAL72A7T.js.map} +1 -1
- package/dist/{chunk-XON6ODIC.js → chunk-SILFO5RY.js} +2 -2
- package/dist/{chunk-XON6ODIC.js.map → chunk-SILFO5RY.js.map} +1 -1
- package/dist/{chunk-WIYVR24B.js → chunk-SVMIUCTT.js} +3 -3
- package/dist/{chunk-WIYVR24B.js.map → chunk-SVMIUCTT.js.map} +1 -1
- package/dist/{chunk-3W6XZQ2Y.js → chunk-VQFA5DR7.js} +3 -3
- package/dist/{chunk-3W6XZQ2Y.js.map → chunk-VQFA5DR7.js.map} +1 -1
- package/dist/{chunk-HMVAGPYR.js → chunk-XIIIGLSL.js} +9 -9
- package/dist/{chunk-HMVAGPYR.js.map → chunk-XIIIGLSL.js.map} +1 -1
- package/dist/{chunk-N6ZGB5ES.js → chunk-Y6LC5PEZ.js} +3 -3
- package/dist/{chunk-N6ZGB5ES.js.map → chunk-Y6LC5PEZ.js.map} +1 -1
- package/dist/{chunk-LZPJOF7Y.js → chunk-YEOG7CWQ.js} +3 -3
- package/dist/{chunk-LZPJOF7Y.js.map → chunk-YEOG7CWQ.js.map} +1 -1
- package/dist/{chunk-37AYPPOO.js → chunk-YMO4ZDLC.js} +8 -8
- package/dist/{chunk-37AYPPOO.js.map → chunk-YMO4ZDLC.js.map} +1 -1
- package/dist/{chunk-J7VEQORJ.js → chunk-Z5EPCIB6.js} +5 -5
- package/dist/{chunk-J7VEQORJ.js.map → chunk-Z5EPCIB6.js.map} +1 -1
- package/dist/{claude-code-BLFRZU2X.js → claude-code-DS26HI3K.js} +4 -4
- package/dist/{claude-code-BLFRZU2X.js.map → claude-code-DS26HI3K.js.map} +1 -1
- package/dist/cli/index.js +56 -56
- package/dist/connectors/config.js +1 -1
- package/dist/connectors/index.js +12 -12
- package/dist/connectors/src/connector-manager.d.ts +66 -2
- package/dist/connectors/src/connector-manager.d.ts.map +1 -1
- package/dist/connectors/src/connector-prompt.d.ts.map +1 -1
- package/dist/connectors/src/connector-types.d.ts +6 -0
- package/dist/connectors/src/connector-types.d.ts.map +1 -1
- package/dist/connectors/src/fleet-utils.d.ts +33 -0
- package/dist/connectors/src/fleet-utils.d.ts.map +1 -1
- package/dist/connectors/src/index.d.ts +2 -2
- package/dist/connectors/src/index.d.ts.map +1 -1
- package/dist/{connectors-OJJU4LSN.js → connectors-3ST6PGWP.js} +15 -15
- package/dist/{connectors-OJJU4LSN.js.map → connectors-3ST6PGWP.js.map} +1 -1
- package/dist/connectors-shared/index.js +2 -2
- package/dist/{ensure-sources-F6VQDCWY.js → ensure-sources-VELKRM6X.js} +13 -13
- package/dist/{ensure-sources-F6VQDCWY.js.map → ensure-sources-VELKRM6X.js.map} +1 -1
- package/dist/factory-assets/connectors/box.js +12 -12
- package/dist/factory-assets/connectors/deploy.js +12 -12
- package/dist/factory-assets/connectors/devserver.js +12 -12
- package/dist/factory-assets/connectors/flow/adapter.js +12 -12
- package/dist/factory-assets/connectors/flow/contract/schema.d.ts +3 -3
- package/dist/factory-assets/connectors/flow/run-flow.js +13 -13
- package/dist/factory-assets/connectors/flow.js +12 -12
- package/dist/factory-assets/connectors/git.js +12 -12
- package/dist/factory-assets/connectors/gmail.js +12 -12
- package/dist/factory-assets/connectors/googledrive.js +12 -12
- package/dist/factory-assets/connectors/local.js +12 -12
- package/dist/factory-assets/connectors/mattermost.js +12 -12
- package/dist/factory-assets/connectors/memory.js +12 -12
- package/dist/factory-assets/connectors/minio.js +12 -12
- package/dist/factory-assets/connectors/postgres.js +12 -12
- package/dist/factory-assets/connectors/s3.js +12 -12
- package/dist/factory-assets/connectors/sharepoint.js +12 -12
- package/dist/factory-assets/connectors/sqlite.js +12 -12
- package/dist/factory-assets/connectors/static-server.js +12 -12
- package/dist/factory-assets/connectors/tunnel.js +12 -12
- package/dist/factory-assets/connectors/webdav.js +12 -12
- package/dist/factory-assets/connectors/xstate-store.js +12 -12
- package/dist/factory-assets/connectors/xstate.js +12 -12
- package/dist/{helpers-PJNUTZXZ.js → helpers-LWNKX56Y.js} +13 -13
- package/dist/{helpers-PJNUTZXZ.js.map → helpers-LWNKX56Y.js.map} +1 -1
- package/dist/{library-publish-FNNDWVBO.js → library-publish-WJVCT2IK.js} +28 -28
- package/dist/{library-publish-FNNDWVBO.js.map → library-publish-WJVCT2IK.js.map} +1 -1
- package/dist/model-endpoint/index.js +3 -3
- package/dist/{open-library-R5EZROFN.js → open-library-Q7QZJY5D.js} +14 -14
- package/dist/{open-library-R5EZROFN.js.map → open-library-Q7QZJY5D.js.map} +1 -1
- package/dist/{project-S2FT3LLR.js → project-WVPRL7CP.js} +24 -24
- package/dist/{project-S2FT3LLR.js.map → project-WVPRL7CP.js.map} +1 -1
- package/dist/runner/index.js +18 -18
- package/dist/runner/src/capability-roundtrip.d.ts +2 -1
- package/dist/runner/src/capability-roundtrip.d.ts.map +1 -1
- package/dist/runner/src/resource-handler.d.ts +1 -1
- package/dist/runner/src/resource-handler.d.ts.map +1 -1
- package/dist/runner/src/resources.d.ts +1 -0
- package/dist/runner/src/resources.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/runner/src/session-resource-handlers.d.ts.map +1 -1
- package/dist/runner/src/turn-scheduler.d.ts +8 -0
- package/dist/runner/src/turn-scheduler.d.ts.map +1 -1
- package/dist/runner/src/turn-visibility.d.ts +97 -0
- package/dist/runner/src/turn-visibility.d.ts.map +1 -0
- package/dist/sdk/asset-manager.js +1 -1
- package/dist/sdk/bridge.js +9 -9
- package/dist/sdk/index.js +18 -18
- package/dist/sdk/runner.js +18 -18
- package/dist/sdk/session.js +2 -2
- package/dist/sdk/types.js +1 -1
- package/dist/{serve-preflight-AADSOUO2.js → serve-preflight-24YWWYUG.js} +15 -15
- package/dist/{serve-preflight-AADSOUO2.js.map → serve-preflight-24YWWYUG.js.map} +1 -1
- package/dist/session/index.js +2 -2
- package/dist/session/src/dispatcher.d.ts.map +1 -1
- package/dist/{setup-HOAJHUFQ.js → setup-F5JX64UP.js} +14 -14
- package/dist/{setup-HOAJHUFQ.js.map → setup-F5JX64UP.js.map} +1 -1
- package/dist/{source-FOELFCY6.js → source-DG5IAAGZ.js} +25 -25
- package/dist/{source-FOELFCY6.js.map → source-DG5IAAGZ.js.map} +1 -1
- package/dist/{source-manifest-publish-Q7P5AEVU.js → source-manifest-publish-76S2JD3O.js} +27 -27
- package/dist/{source-manifest-publish-Q7P5AEVU.js.map → source-manifest-publish-76S2JD3O.js.map} +1 -1
- package/dist/tui/index.js +18 -18
- package/dist/types/index.js +1 -1
- package/dist/types/src/capabilities.d.ts +3 -2
- package/dist/types/src/capabilities.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +11 -10
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/manifests/preset.d.ts +5 -5
- package/dist/types/src/protocol.d.ts +3 -0
- package/dist/types/src/protocol.d.ts.map +1 -1
- package/dist/types/src/turn-visibility.d.ts +50 -0
- package/dist/types/src/turn-visibility.d.ts.map +1 -0
- package/dist/types/src/version.d.ts +14 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +14 -14
- package/dist/workspace-plugin/adapters/omp.js +7 -7
- package/dist/workspace-plugin/index.js +1 -1
- package/dist/workspace-plugin/src/tools/connectors.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-6RPS7JEH.js.map +0 -1
- package/dist/chunk-ASBZOTEO.js.map +0 -1
- package/dist/chunk-KORDNXKA.js.map +0 -1
- package/dist/chunk-L7QOZG5V.js.map +0 -1
- package/dist/chunk-LX4TTTRR.js.map +0 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { WorkspacePlugin } from './chunk-
|
|
2
|
-
import { buildWorkspaceToolDefs } from './chunk-
|
|
1
|
+
import { WorkspacePlugin } from './chunk-PKC2AHOB.js';
|
|
2
|
+
import { buildWorkspaceToolDefs } from './chunk-7RBFYW24.js';
|
|
3
3
|
import { findAiAssetsRoot } from './chunk-HQAPUPBE.js';
|
|
4
|
-
import { startModelEndpoint } from './chunk-
|
|
4
|
+
import { startModelEndpoint } from './chunk-REAF7ZFA.js';
|
|
5
5
|
import { WebSocketServerTransport } from './chunk-HLAEYFUN.js';
|
|
6
6
|
import { assembleSystemPrompt, buildCapabilitiesPromptSection } from './chunk-W3UDISS2.js';
|
|
7
7
|
import { prepareNativePolicy, codexInstanceEnvironment, parseCodexCredential, parseCodexRefreshInput, parseCodexRefreshResult } from './chunk-CMXDFTA2.js';
|
|
8
|
-
import { resolveFlowPath } from './chunk-
|
|
8
|
+
import { resolveFlowPath } from './chunk-EDKTS44C.js';
|
|
9
9
|
import { findAiAssetsRoot as findAiAssetsRoot$1, deployCatalogEntry, undeployCatalogEntry } from './chunk-USSP43U3.js';
|
|
10
|
-
import { ConnectFailureCarryOver, registerBuiltinConnectors, listConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, buildSdkConnectorTools, buildLazySdkFlowTools, describeFlowOperations, buildConnectorToolDefs, writeUserGitconfigInclude, buildFlowToolDefs, SessionNodeExecutor, SessionSubpromptRunner, ClassifierSubpromptRunner, SessionInlineSubFlowRunner, driveOrchestratorTurn, buildSdkFlowTools } from './chunk-
|
|
11
|
-
import { loadYamlConnectorDeclarations, withMaterializedConnectorDeclarations, SecretProviderChain, ConnectorStartupError, isKnownSecretRef, EnvSecretProvider, PreMintedSecretProvider, InMemorySecretProvider, resolvedConfigToDeclarations, deriveSingleMaterializedConnectorDeclaration } from './chunk-
|
|
12
|
-
import { EventNormalizer } from './chunk-
|
|
13
|
-
import { sessionSurfaceNotice, approvalCardOf, APPROVE_ONCE, DENY, probeResumeTranscript, transcriptStoreForRuntime } from './chunk-
|
|
14
|
-
import { codexLoginFallbackNotice } from './chunk-
|
|
10
|
+
import { ConnectFailureCarryOver, registerBuiltinConnectors, listConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, buildSdkConnectorTools, fleetMountConnectingMessage, buildLazySdkFlowTools, describeFlowOperations, buildConnectorToolDefs, writeUserGitconfigInclude, buildFlowToolDefs, SessionNodeExecutor, SessionSubpromptRunner, ClassifierSubpromptRunner, SessionInlineSubFlowRunner, driveOrchestratorTurn, buildSdkFlowTools } from './chunk-NAEXYRHR.js';
|
|
11
|
+
import { loadYamlConnectorDeclarations, withMaterializedConnectorDeclarations, SecretProviderChain, ConnectorStartupError, isKnownSecretRef, EnvSecretProvider, PreMintedSecretProvider, InMemorySecretProvider, resolvedConfigToDeclarations, deriveSingleMaterializedConnectorDeclaration } from './chunk-SAL72A7T.js';
|
|
12
|
+
import { EventNormalizer } from './chunk-XIIIGLSL.js';
|
|
13
|
+
import { sessionSurfaceNotice, approvalCardOf, APPROVE_ONCE, DENY, probeResumeTranscript, transcriptStoreForRuntime } from './chunk-6ZM5X2XW.js';
|
|
14
|
+
import { codexLoginFallbackNotice } from './chunk-Y6LC5PEZ.js';
|
|
15
15
|
import { CodexNativeStateUnavailable } from './chunk-LOO5CB5M.js';
|
|
16
|
-
import { dispatchCapability } from './chunk-
|
|
16
|
+
import { dispatchCapability } from './chunk-YEOG7CWQ.js';
|
|
17
17
|
import { classifyClaudeSdkError } from './chunk-5DE3DGVR.js';
|
|
18
18
|
import { agentExecRequested } from './chunk-7DN6JKP2.js';
|
|
19
|
-
import { toAgentEffort, toMergedRegistry } from './chunk-
|
|
20
|
-
import { unresolvedProviderCredentials, harnessCapabilities, createHarness, providerCredentialEnvName, registryCredentialEnv, supportsLiveToolUpdates } from './chunk-
|
|
19
|
+
import { toAgentEffort, toMergedRegistry } from './chunk-ORXV3UB6.js';
|
|
20
|
+
import { unresolvedProviderCredentials, harnessCapabilities, createHarness, providerCredentialEnvName, registryCredentialEnv, supportsLiveToolUpdates } from './chunk-SILFO5RY.js';
|
|
21
21
|
import { catalogLayer, AI_PROVIDER_PRESETS } from './chunk-6UP2EDFN.js';
|
|
22
22
|
import { loadFlow } from './chunk-WFK4MUBL.js';
|
|
23
23
|
import { renderStimulusPrompt } from './chunk-WD3L5QSU.js';
|
|
24
|
-
import { TERMINAL_AGENT_RUN_STATUSES, withActivityLabelJsonSchema, TOOL_ACTIVITY_PROMPT_SECTION, SESSION_ROOT_CONNECTOR_ID, PLATFORM_BLOCKS_RUNTIME_FEATURE, PROTOCOL_VERSION, deliveryClassOf } from './chunk-
|
|
24
|
+
import { TURN_VISIBILITY_EVENT_TYPES, TERMINAL_AGENT_RUN_STATUSES, withActivityLabelJsonSchema, TOOL_ACTIVITY_PROMPT_SECTION, SESSION_ROOT_CONNECTOR_ID, PLATFORM_BLOCKS_RUNTIME_FEATURE, TURN_VISIBILITY_RUNTIME_FEATURE, PROTOCOL_VERSION, deliveryClassOf } from './chunk-7NN3P6VF.js';
|
|
25
25
|
import { knowledgeKindProvider, scanLibraryRoot, LocalIndex } from './chunk-G44FFUMA.js';
|
|
26
26
|
import { createDefaultKindRegistry } from './chunk-O5Y7VMVQ.js';
|
|
27
27
|
import { parseFlowDefinition } from './chunk-JRN5QF4C.js';
|
|
@@ -6223,6 +6223,8 @@ function logConnectorReport(results, resLog) {
|
|
|
6223
6223
|
for (const r of results) {
|
|
6224
6224
|
if (r.connected) {
|
|
6225
6225
|
resLog.info("connector ok", { id: r.id, mountPath: r.mountPath });
|
|
6226
|
+
} else if (r.connecting) {
|
|
6227
|
+
resLog.warn("connector still connecting", { id: r.id, mountPath: r.mountPath });
|
|
6226
6228
|
} else {
|
|
6227
6229
|
resLog.error("connector failed", void 0, {
|
|
6228
6230
|
id: r.id,
|
|
@@ -7145,14 +7147,16 @@ function buildClientCapabilityHandler(args) {
|
|
|
7145
7147
|
const gen = args.generateCallId ?? (() => `cap-${Date.now()}-${Math.floor(Math.random() * 1e9)}`);
|
|
7146
7148
|
return async (input, ctx) => {
|
|
7147
7149
|
const callId = ctx?.callId ?? gen();
|
|
7150
|
+
const refused2 = () => new Error(`Capability ${args.wire.name} refused: its readers are unknown`);
|
|
7148
7151
|
if (args.wire.fireAndForget) {
|
|
7149
|
-
args.emit({
|
|
7152
|
+
const sent = args.emit({
|
|
7150
7153
|
type: "capability_invoked",
|
|
7151
7154
|
callId,
|
|
7152
7155
|
name: args.wire.name,
|
|
7153
7156
|
input,
|
|
7154
7157
|
invokedBy: "agent"
|
|
7155
7158
|
});
|
|
7159
|
+
if (sent === false) throw refused2();
|
|
7156
7160
|
return {};
|
|
7157
7161
|
}
|
|
7158
7162
|
if (args.pending.has(callId)) {
|
|
@@ -7170,13 +7174,18 @@ function buildClientCapabilityHandler(args) {
|
|
|
7170
7174
|
);
|
|
7171
7175
|
}, timeoutMs);
|
|
7172
7176
|
args.pending.set(callId, { resolve: resolve5, reject, timer });
|
|
7173
|
-
args.emit({
|
|
7177
|
+
const sent = args.emit({
|
|
7174
7178
|
type: "capability_invoked",
|
|
7175
7179
|
callId,
|
|
7176
7180
|
name: args.wire.name,
|
|
7177
7181
|
input,
|
|
7178
7182
|
invokedBy: "agent"
|
|
7179
7183
|
});
|
|
7184
|
+
if (sent === false) {
|
|
7185
|
+
clearTimeout(timer);
|
|
7186
|
+
args.pending.delete(callId);
|
|
7187
|
+
reject(refused2());
|
|
7188
|
+
}
|
|
7180
7189
|
});
|
|
7181
7190
|
};
|
|
7182
7191
|
}
|
|
@@ -7724,6 +7733,9 @@ async function handleMountResourceRequest(command, manager, emit) {
|
|
|
7724
7733
|
const { requestId, connectorId: mountId, operation, path: reqPath, options, content } = command;
|
|
7725
7734
|
try {
|
|
7726
7735
|
const entry = manager.get(mountId);
|
|
7736
|
+
if (entry.handle.status === "connecting") {
|
|
7737
|
+
throw new Error(fleetMountConnectingMessage(mountId));
|
|
7738
|
+
}
|
|
7727
7739
|
const mountPath = entry.handle.mountPath;
|
|
7728
7740
|
if (!mountPath) {
|
|
7729
7741
|
throw new ResourceOperationError(
|
|
@@ -9721,6 +9733,7 @@ var TurnScheduler = class {
|
|
|
9721
9733
|
this.deps.logPhase("harness_start", startedAt, { ok, attempts });
|
|
9722
9734
|
}
|
|
9723
9735
|
if (!endTurn) return;
|
|
9736
|
+
this.deps.turnVisibility?.enter(turn.visibility ?? null);
|
|
9724
9737
|
this.deps.turnEnd?.begin();
|
|
9725
9738
|
const endsBefore = this.turnEndReports;
|
|
9726
9739
|
try {
|
|
@@ -9734,6 +9747,7 @@ var TurnScheduler = class {
|
|
|
9734
9747
|
} finally {
|
|
9735
9748
|
this.deps.turnEnd?.end();
|
|
9736
9749
|
this.deps.turnEnd?.settle();
|
|
9750
|
+
this.deps.turnVisibility?.exit();
|
|
9737
9751
|
endTurn();
|
|
9738
9752
|
}
|
|
9739
9753
|
}
|
|
@@ -9814,6 +9828,211 @@ function awaitAgentEnd(harness, prompt, timeoutMs) {
|
|
|
9814
9828
|
});
|
|
9815
9829
|
}
|
|
9816
9830
|
|
|
9831
|
+
// runner/src/turn-visibility.ts
|
|
9832
|
+
var AGENT_RECIPIENT = "__agent__";
|
|
9833
|
+
var STAMPED_TYPES = new Set(TURN_VISIBILITY_EVENT_TYPES);
|
|
9834
|
+
function turnVisibilityOf(cmd) {
|
|
9835
|
+
if (cmd.visibilityMode !== "Private") return null;
|
|
9836
|
+
const ids = Array.isArray(cmd.privateRecipientIds) ? cmd.privateRecipientIds : [];
|
|
9837
|
+
const readers = [
|
|
9838
|
+
...new Set(
|
|
9839
|
+
ids.filter(
|
|
9840
|
+
(id) => typeof id === "string" && id.length > 0 && id !== AGENT_RECIPIENT
|
|
9841
|
+
)
|
|
9842
|
+
)
|
|
9843
|
+
];
|
|
9844
|
+
if (readers.length === 0) return "no-readers";
|
|
9845
|
+
return { visibilityMode: "Private", privateRecipientIds: readers };
|
|
9846
|
+
}
|
|
9847
|
+
var UNKNOWN = /* @__PURE__ */ Symbol("unknown-owner");
|
|
9848
|
+
var MAX_TRACKED = 4096;
|
|
9849
|
+
var MAX_OUTSTANDING = 256;
|
|
9850
|
+
var PARENTLESS_CHILD_TYPES = /* @__PURE__ */ new Set([
|
|
9851
|
+
"capability_invoked",
|
|
9852
|
+
"render_invoked",
|
|
9853
|
+
"custom_message"
|
|
9854
|
+
]);
|
|
9855
|
+
var QUESTION_TOOL = "AskUserQuestion";
|
|
9856
|
+
function intersect(a, b) {
|
|
9857
|
+
if (a === UNKNOWN || b === UNKNOWN) return UNKNOWN;
|
|
9858
|
+
if (a === null) return b;
|
|
9859
|
+
if (b === null) return a;
|
|
9860
|
+
const readers = a.privateRecipientIds.filter((id) => b.privateRecipientIds.includes(id));
|
|
9861
|
+
return readers.length > 0 ? { visibilityMode: "Private", privateRecipientIds: readers } : UNKNOWN;
|
|
9862
|
+
}
|
|
9863
|
+
var BoundedMap = class {
|
|
9864
|
+
entries = /* @__PURE__ */ new Map();
|
|
9865
|
+
set(key, value) {
|
|
9866
|
+
this.entries.delete(key);
|
|
9867
|
+
this.entries.set(key, value);
|
|
9868
|
+
if (this.entries.size > MAX_TRACKED) {
|
|
9869
|
+
const oldest = this.entries.keys().next().value;
|
|
9870
|
+
if (oldest !== void 0) this.entries.delete(oldest);
|
|
9871
|
+
}
|
|
9872
|
+
}
|
|
9873
|
+
resolve(key) {
|
|
9874
|
+
return this.entries.has(key) ? this.entries.get(key) : UNKNOWN;
|
|
9875
|
+
}
|
|
9876
|
+
};
|
|
9877
|
+
var WITHHELD_KEPT_FIELDS = [
|
|
9878
|
+
"selfStarted",
|
|
9879
|
+
"cancelled",
|
|
9880
|
+
"retrying",
|
|
9881
|
+
"retryReason",
|
|
9882
|
+
"category",
|
|
9883
|
+
"costUsd",
|
|
9884
|
+
"tokens",
|
|
9885
|
+
"modelUsage",
|
|
9886
|
+
"contextTokens",
|
|
9887
|
+
"contextWindow"
|
|
9888
|
+
];
|
|
9889
|
+
var WITHHELD_ERROR_MESSAGE = "Output withheld: the people allowed to read it could not be established.";
|
|
9890
|
+
var TurnVisibilityStamp = class {
|
|
9891
|
+
current = null;
|
|
9892
|
+
/** The self-started turn running now, if any, and whose work it reads. */
|
|
9893
|
+
selfTurn = void 0;
|
|
9894
|
+
toolUses = new BoundedMap();
|
|
9895
|
+
tasks = new BoundedMap();
|
|
9896
|
+
/** Background tasks started and not yet settled, with their launching turn's readers. */
|
|
9897
|
+
running = /* @__PURE__ */ new Map();
|
|
9898
|
+
/** More tasks ran than {@link MAX_OUTSTANDING}: which are still running is no longer known. */
|
|
9899
|
+
runningOverflow = false;
|
|
9900
|
+
/**
|
|
9901
|
+
* Owner of the `AskUserQuestion` block in the raw event observed last. serve
|
|
9902
|
+
* normalizes and sends that event's `question` synchronously, before it
|
|
9903
|
+
* observes the next one.
|
|
9904
|
+
*/
|
|
9905
|
+
questionOwner = void 0;
|
|
9906
|
+
privateSeen = false;
|
|
9907
|
+
/** Content events withheld so far, for the log. */
|
|
9908
|
+
withheldCount = 0;
|
|
9909
|
+
/** Stamp the prompt turn's own events until {@link exit}; `null` stamps nothing. */
|
|
9910
|
+
enter(visibility) {
|
|
9911
|
+
this.current = visibility;
|
|
9912
|
+
if (visibility) this.privateSeen = true;
|
|
9913
|
+
}
|
|
9914
|
+
exit() {
|
|
9915
|
+
this.current = null;
|
|
9916
|
+
}
|
|
9917
|
+
/**
|
|
9918
|
+
* Feed every raw harness event before it is normalized: it carries the ids of
|
|
9919
|
+
* the tool uses a turn starts and of the background tasks it launches, which
|
|
9920
|
+
* normalized events no longer have.
|
|
9921
|
+
*/
|
|
9922
|
+
observeHarnessEvent(raw) {
|
|
9923
|
+
this.questionOwner = void 0;
|
|
9924
|
+
if (typeof raw !== "object" || raw === null) return;
|
|
9925
|
+
const event = raw;
|
|
9926
|
+
switch (event.type) {
|
|
9927
|
+
case "self_turn_started": {
|
|
9928
|
+
const ids = Array.isArray(event.taskIds) ? event.taskIds : [];
|
|
9929
|
+
let owner = ids.length === 0 ? UNKNOWN : null;
|
|
9930
|
+
for (const id of ids)
|
|
9931
|
+
owner = intersect(owner, typeof id === "string" ? this.tasks.resolve(id) : UNKNOWN);
|
|
9932
|
+
this.selfTurn = owner;
|
|
9933
|
+
return;
|
|
9934
|
+
}
|
|
9935
|
+
case "background_task_started":
|
|
9936
|
+
if (typeof event.taskId === "string") {
|
|
9937
|
+
const owner = this.mainOwner();
|
|
9938
|
+
this.remember(this.tasks, event.taskId, owner);
|
|
9939
|
+
if (this.running.size >= MAX_OUTSTANDING && !this.running.has(event.taskId))
|
|
9940
|
+
this.runningOverflow = true;
|
|
9941
|
+
else this.running.set(event.taskId, owner);
|
|
9942
|
+
}
|
|
9943
|
+
return;
|
|
9944
|
+
case "background_task_settled":
|
|
9945
|
+
if (typeof event.taskId === "string") this.running.delete(event.taskId);
|
|
9946
|
+
return;
|
|
9947
|
+
case "background_tasks_reset":
|
|
9948
|
+
this.running.clear();
|
|
9949
|
+
this.runningOverflow = false;
|
|
9950
|
+
return;
|
|
9951
|
+
case "tool_call":
|
|
9952
|
+
if (typeof event.toolCallId === "string")
|
|
9953
|
+
this.remember(this.toolUses, event.toolCallId, this.ownerUnder(event.parentToolUseId));
|
|
9954
|
+
return;
|
|
9955
|
+
case "message_start":
|
|
9956
|
+
case "message_end": {
|
|
9957
|
+
const message = event.message;
|
|
9958
|
+
if (!message) return;
|
|
9959
|
+
const owner = this.ownerUnder(message.parentToolUseId);
|
|
9960
|
+
if (Array.isArray(message.content)) {
|
|
9961
|
+
for (const block of message.content) {
|
|
9962
|
+
if (block?.type !== "tool_use") continue;
|
|
9963
|
+
if (typeof block.id === "string") this.remember(this.toolUses, block.id, owner);
|
|
9964
|
+
if (block.name === QUESTION_TOOL) this.questionOwner = owner;
|
|
9965
|
+
}
|
|
9966
|
+
}
|
|
9967
|
+
if (Array.isArray(message.toolCalls)) {
|
|
9968
|
+
for (const call of message.toolCalls) {
|
|
9969
|
+
if (typeof call?.id === "string") this.remember(this.toolUses, call.id, owner);
|
|
9970
|
+
}
|
|
9971
|
+
}
|
|
9972
|
+
return;
|
|
9973
|
+
}
|
|
9974
|
+
}
|
|
9975
|
+
}
|
|
9976
|
+
/**
|
|
9977
|
+
* The event as it goes on the wire: stamped with its owner's readers, or
|
|
9978
|
+
* `null` when it is withheld (see the class doc). `fromCapability` marks an
|
|
9979
|
+
* event a capability emitted whose type does not say so (a render's fallback text).
|
|
9980
|
+
*/
|
|
9981
|
+
stamp(event, opts = {}) {
|
|
9982
|
+
const parent = event.parentToolUseId;
|
|
9983
|
+
const selfStarted = event.selfStarted === true;
|
|
9984
|
+
let owner = event.type === "question" && this.questionOwner !== void 0 ? this.questionOwner : selfStarted && typeof parent !== "string" && this.selfTurn === void 0 ? UNKNOWN : this.ownerUnder(parent);
|
|
9985
|
+
if (typeof parent !== "string" && (opts.fromCapability === true || PARENTLESS_CHILD_TYPES.has(event.type)))
|
|
9986
|
+
owner = intersect(owner, this.runningOwner());
|
|
9987
|
+
const terminal = event.type === "finished" || event.type === "error" && event.fatal === true && event.retrying !== true;
|
|
9988
|
+
if (terminal && typeof parent !== "string") this.selfTurn = void 0;
|
|
9989
|
+
if (!STAMPED_TYPES.has(event.type)) return event;
|
|
9990
|
+
if (owner === UNKNOWN) return this.privateSeen ? this.withhold(event) : event;
|
|
9991
|
+
if (owner === null) return event;
|
|
9992
|
+
const stamped = {
|
|
9993
|
+
visibilityMode: owner.visibilityMode,
|
|
9994
|
+
privateRecipientIds: [...owner.privateRecipientIds]
|
|
9995
|
+
};
|
|
9996
|
+
return { ...event, ...stamped };
|
|
9997
|
+
}
|
|
9998
|
+
/** Readers of the main thread: the prompt turn, narrowed by a self-started turn running too. */
|
|
9999
|
+
mainOwner() {
|
|
10000
|
+
return this.selfTurn === void 0 ? this.current : intersect(this.current, this.selfTurn);
|
|
10001
|
+
}
|
|
10002
|
+
/** Readers every running background task's launching turn shares; `null` when none runs. */
|
|
10003
|
+
runningOwner() {
|
|
10004
|
+
if (this.runningOverflow) return UNKNOWN;
|
|
10005
|
+
let owner = null;
|
|
10006
|
+
for (const taskOwner of this.running.values()) owner = intersect(owner, taskOwner);
|
|
10007
|
+
return owner;
|
|
10008
|
+
}
|
|
10009
|
+
/** Readers of work started under `parent` (a tool use id), or of the main thread without one. */
|
|
10010
|
+
ownerUnder(parent) {
|
|
10011
|
+
return typeof parent === "string" ? this.toolUses.resolve(parent) : this.mainOwner();
|
|
10012
|
+
}
|
|
10013
|
+
/** An owner that is unknown is not remembered, so the id stays unknown. */
|
|
10014
|
+
remember(map, id, owner) {
|
|
10015
|
+
if (owner !== UNKNOWN) map.set(id, owner);
|
|
10016
|
+
}
|
|
10017
|
+
withhold(event) {
|
|
10018
|
+
this.withheldCount += 1;
|
|
10019
|
+
if (event.type !== "finished" && event.type !== "error") return null;
|
|
10020
|
+
const kept = {};
|
|
10021
|
+
for (const key of WITHHELD_KEPT_FIELDS) {
|
|
10022
|
+
const value = event[key];
|
|
10023
|
+
if (value !== void 0) kept[key] = value;
|
|
10024
|
+
}
|
|
10025
|
+
if (event.type === "finished")
|
|
10026
|
+
return { costUsd: 0, ...kept, type: "finished", summary: "" };
|
|
10027
|
+
return {
|
|
10028
|
+
...kept,
|
|
10029
|
+
type: "error",
|
|
10030
|
+
message: WITHHELD_ERROR_MESSAGE,
|
|
10031
|
+
fatal: event.fatal
|
|
10032
|
+
};
|
|
10033
|
+
}
|
|
10034
|
+
};
|
|
10035
|
+
|
|
9817
10036
|
// runner/src/event-gap-buffer.ts
|
|
9818
10037
|
var EVENT_GAP_BUFFER_MAX_EVENTS = 1e4;
|
|
9819
10038
|
var EVENT_GAP_BUFFER_MAX_BYTES = 16 * 1024 * 1024;
|
|
@@ -11578,8 +11797,9 @@ function buildSessionResourceHandlers(deps) {
|
|
|
11578
11797
|
);
|
|
11579
11798
|
}
|
|
11580
11799
|
const wasLive = isLive(rm4, decl.id);
|
|
11800
|
+
let handle;
|
|
11581
11801
|
try {
|
|
11582
|
-
await rm4.connect(decl);
|
|
11802
|
+
handle = await rm4.connect(decl);
|
|
11583
11803
|
} catch (err) {
|
|
11584
11804
|
if (input.preMintedToken) {
|
|
11585
11805
|
getPreMintedSecrets()?.unset(kind, decl.id);
|
|
@@ -11590,7 +11810,9 @@ function buildSessionResourceHandlers(deps) {
|
|
|
11590
11810
|
return { ok: false, code: "connect_failed", message };
|
|
11591
11811
|
}
|
|
11592
11812
|
emitResourcesAvailable();
|
|
11593
|
-
log(
|
|
11813
|
+
log(
|
|
11814
|
+
`[session-resource] runner.add_${kind} ${handle?.status === "connecting" ? "registered (still connecting)" : "connected"} ${decl.id}`
|
|
11815
|
+
);
|
|
11594
11816
|
return { ok: true, id: decl.id };
|
|
11595
11817
|
}
|
|
11596
11818
|
async function attachConnectorInstance(name, preMintedToken) {
|
|
@@ -13466,7 +13688,8 @@ async function startAgentServer(opts) {
|
|
|
13466
13688
|
throw new Error("CODEX_MANAGED_BOOTSTRAP_INVALID");
|
|
13467
13689
|
const supportedRuntimeFeatures = [
|
|
13468
13690
|
...managedHost ? ["codex-app-server-v1"] : [],
|
|
13469
|
-
PLATFORM_BLOCKS_RUNTIME_FEATURE
|
|
13691
|
+
PLATFORM_BLOCKS_RUNTIME_FEATURE,
|
|
13692
|
+
TURN_VISIBILITY_RUNTIME_FEATURE
|
|
13470
13693
|
];
|
|
13471
13694
|
let managedBootstrapClosed = false;
|
|
13472
13695
|
const port = opts.port ?? 8080;
|
|
@@ -13562,12 +13785,19 @@ async function startAgentServer(opts) {
|
|
|
13562
13785
|
);
|
|
13563
13786
|
const turnStatus = new TurnStatusTracker();
|
|
13564
13787
|
const eventGapBuffer = new EventGapBuffer();
|
|
13788
|
+
const turnVisibility = new TurnVisibilityStamp();
|
|
13565
13789
|
const initLessRunner = !managedHost && (wsConfig.secrets?.provider ?? "env") === "env";
|
|
13566
13790
|
let clientEverConnected = false;
|
|
13567
13791
|
transport.onConnect(() => {
|
|
13568
13792
|
clientEverConnected = true;
|
|
13569
13793
|
});
|
|
13570
|
-
function sendEvent(event) {
|
|
13794
|
+
function sendEvent(event, opts2) {
|
|
13795
|
+
const stamped = turnVisibility.stamp(event, opts2);
|
|
13796
|
+
if (stamped) deliverEvent(stamped);
|
|
13797
|
+
else log(`[serve] withheld a ${event.type} event: its readers are unknown`);
|
|
13798
|
+
return stamped !== null;
|
|
13799
|
+
}
|
|
13800
|
+
function deliverEvent(event) {
|
|
13571
13801
|
turnStatus.observe(event);
|
|
13572
13802
|
if (transport.connected) {
|
|
13573
13803
|
transport.send(event);
|
|
@@ -13644,7 +13874,15 @@ async function startAgentServer(opts) {
|
|
|
13644
13874
|
});
|
|
13645
13875
|
signal?.addEventListener("abort", abort, { once: true });
|
|
13646
13876
|
try {
|
|
13647
|
-
|
|
13877
|
+
const invoked = turnVisibility.stamp({
|
|
13878
|
+
type: "capability_invoked",
|
|
13879
|
+
callId,
|
|
13880
|
+
name,
|
|
13881
|
+
input,
|
|
13882
|
+
invokedBy: "agent"
|
|
13883
|
+
});
|
|
13884
|
+
if (invoked) transport.send(invoked);
|
|
13885
|
+
else finish(new Error(`Capability ${name} refused: its readers are unknown`));
|
|
13648
13886
|
} catch (error) {
|
|
13649
13887
|
finish(error);
|
|
13650
13888
|
}
|
|
@@ -13831,10 +14069,9 @@ async function startAgentServer(opts) {
|
|
|
13831
14069
|
invoke: (name, input, signal, callId) => capabilityRegistry.invoke(name, input, { sessionId, signal, callId }),
|
|
13832
14070
|
onToolsChanged: (listener) => capabilityRegistry.onToolsChanged(listener),
|
|
13833
14071
|
emitRender: (event) => sendEvent(event),
|
|
13834
|
-
emitText: (text2) =>
|
|
13835
|
-
type: "text",
|
|
13836
|
-
|
|
13837
|
-
})
|
|
14072
|
+
emitText: (text2) => {
|
|
14073
|
+
sendEvent({ type: "text", content: text2 }, { fromCapability: true });
|
|
14074
|
+
}
|
|
13838
14075
|
};
|
|
13839
14076
|
}
|
|
13840
14077
|
const sessionInstanceId = opts.instanceId ?? DEFAULT_AGENT_INSTANCE_ID;
|
|
@@ -14325,7 +14562,8 @@ async function startAgentServer(opts) {
|
|
|
14325
14562
|
},
|
|
14326
14563
|
log,
|
|
14327
14564
|
logPhase,
|
|
14328
|
-
turnEnd: turnEndContract
|
|
14565
|
+
turnEnd: turnEndContract,
|
|
14566
|
+
turnVisibility
|
|
14329
14567
|
});
|
|
14330
14568
|
let harnessRestartChain = Promise.resolve();
|
|
14331
14569
|
let toolRestartScheduler;
|
|
@@ -14340,6 +14578,7 @@ async function startAgentServer(opts) {
|
|
|
14340
14578
|
harness.removeAllListeners("error");
|
|
14341
14579
|
harness.removeAllListeners("reconfigure-rollback");
|
|
14342
14580
|
harness.kill();
|
|
14581
|
+
turnVisibility.observeHarnessEvent({ type: "background_tasks_reset" });
|
|
14343
14582
|
} catch (err) {
|
|
14344
14583
|
log(
|
|
14345
14584
|
`[serve] failed to retire previous harness: ${err instanceof Error ? err.message : String(err)}`
|
|
@@ -14467,6 +14706,7 @@ async function startAgentServer(opts) {
|
|
|
14467
14706
|
liveHarnessActiveAfterTurn,
|
|
14468
14707
|
event
|
|
14469
14708
|
);
|
|
14709
|
+
turnVisibility.observeHarnessEvent(event);
|
|
14470
14710
|
const normalized = normalizer.normalize(event);
|
|
14471
14711
|
const turnEnded = event.type === "agent_end";
|
|
14472
14712
|
for (const e of normalized) {
|
|
@@ -15672,8 +15912,17 @@ async function startAgentServer(opts) {
|
|
|
15672
15912
|
}
|
|
15673
15913
|
async function handlePrompt(cmd) {
|
|
15674
15914
|
if (cmd.messageId) sendEvent({ type: "prompt_ack", messageId: cmd.messageId });
|
|
15915
|
+
const visibility = turnVisibilityOf(cmd);
|
|
15916
|
+
if (visibility === "no-readers") {
|
|
15917
|
+
refusePrompt(
|
|
15918
|
+
"Prompt refused: a private prompt must name at least one person who may read the answer.",
|
|
15919
|
+
{ onReceipt: true }
|
|
15920
|
+
);
|
|
15921
|
+
return;
|
|
15922
|
+
}
|
|
15675
15923
|
await turnScheduler.prompt({
|
|
15676
15924
|
owner: { senderId: cmd.senderId, messageId: cmd.messageId },
|
|
15925
|
+
visibility,
|
|
15677
15926
|
// The turn ahead may be paused on a question it can only leave through
|
|
15678
15927
|
// this harness's rule for a new prompt; apply it now, not after that turn.
|
|
15679
15928
|
onQueued: () => harness?.supersedePendingQuestion?.(),
|
|
@@ -15718,6 +15967,10 @@ async function startAgentServer(opts) {
|
|
|
15718
15967
|
refusePrompt("Prompt refused: a tool allowlist cannot apply while a flow runs.");
|
|
15719
15968
|
return false;
|
|
15720
15969
|
}
|
|
15970
|
+
if (visibility) {
|
|
15971
|
+
refusePrompt("Prompt refused: a private message cannot stay private while a flow runs.");
|
|
15972
|
+
return false;
|
|
15973
|
+
}
|
|
15721
15974
|
if (Array.isArray(cmd.platformBlocks))
|
|
15722
15975
|
pendingFlowPlatformBlocks.push(...cmd.platformBlocks);
|
|
15723
15976
|
return async () => {
|
|
@@ -15778,9 +16031,11 @@ async function startAgentServer(opts) {
|
|
|
15778
16031
|
}
|
|
15779
16032
|
});
|
|
15780
16033
|
}
|
|
15781
|
-
function refusePrompt(message) {
|
|
16034
|
+
function refusePrompt(message, opts2 = {}) {
|
|
15782
16035
|
log(`[serve] ${message}`);
|
|
15783
|
-
|
|
16036
|
+
const event = { type: "error", message, fatal: false, category: "validation" };
|
|
16037
|
+
if (opts2.onReceipt) deliverEvent(event);
|
|
16038
|
+
else sendEvent(event);
|
|
15784
16039
|
}
|
|
15785
16040
|
async function handleReply(cmd) {
|
|
15786
16041
|
await turnScheduler.reply({
|
|
@@ -16470,5 +16725,5 @@ function touchSession(state) {
|
|
|
16470
16725
|
}
|
|
16471
16726
|
|
|
16472
16727
|
export { AgentRunError, CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CONNECTOR_MUTATE_NOT_READY, CapabilityRegistry, CompileManifestEntrySchema, CompositionError, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, DEFAULT_FLOW_MUTATE_CONNECTOR_WAIT_MS, DEFAULT_MAX_FINISHED_TREES, DEFAULT_RUN_LIMITS, MOUNT_LIST_MAX_DEPTH, MOUNT_LIST_MAX_ENTRIES, MOUNT_READ_DEADLINE_FACTOR, MOUNT_READ_MAX_CHUNK_BYTES, MOUNT_STAT_BUDGET_MS, MOUNT_STAT_MAX_ENTRIES, MOUNT_TREE_OP_DEADLINE_FACTOR, MOUNT_WRITE_MAX_CHUNK_BYTES, MarkdownStreamer, PreInitRingSink, ResourceOperationError, SESSION_ROOT_WRITABLE_DIRS, SESSION_ROOT_WRITABLE_FILES, UnknownCompositionKindError, WRITE_RANGE_PARTIAL_TTL_MS, WS_AUTH_TOKEN_ENV, WS_AUTH_TOKEN_FILE_ENV, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildCompositionRunSnapshot, buildConnectorTokenMediator, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, buildRunnerAgentSections, buildStoreSnapshotReplay, builtinCapabilities, canonicalJson, capabilityLogInstance, capabilitySignatureInputs, clearPreInitRingSink, clearSession, compileComposition, compositionRunSnapshotPath, computeCapabilitySignature, computeDirectoryTotals, computeRevisionHash, connectorRefreshKind, createAgentSession, createCompositionContentSource, createFinalTextFallback, createFlowConnectorReadiness, createInMemoryRunStore, createManagedCodexSubpromptHarness, createRunController, createSessionStimulusBus, defineCapability, deleteSession, describeComposition, dispatchResourceRequest, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureClaudeSettingsDisablesConnectors, ensureGitConfigInclude, executeConnectorMutate, extractClaudeAiOauthExpiresAt, flowStartNeedsHarnessRestart, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, handleSessionRootResourceRequest, harnessActiveAfterTurnEnd, hasNonTerminalFlow, hashAgentFiles, hashContent, hostOpResumeStimulus, installPreInitRingSink, instanceForSession, instanceSessionOverrides, isCompilePinCurrent, isCompositionError, isEmptyKnowledgeIndex, isSessionRootPathAllowed, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadCompositionRunSnapshot, loadKnowledgeDir, loadManagedCodexHostConfig, loadSession, loadSessionById, logConnectorReport, manifestModelForHarness, mcpAuthSecretKey, newSession, nulTailPaddingLength, pickChatFlowTarget, pickFlowToolTarget, pickRepointedManager, planFlowMutate, prepareCodexTools, reconcilePendingDecisions, reconnectedRunNeedsAgentTurn, recreateKeepingLiveFlows, registerActiveFlow, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, rejectPendingCapabilityCallsOnDisconnect, resetRunnerLogStore, resolveAgentInstance, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveFlowMutateConnectorWaitMs, resolveInstanceAgentDir, resolveMixin, resolveSessionId, restoredRunHasWorkToResume, runAgentChat, saveCompositionRunSnapshot, saveSession, setCurrentSession, setUpFlowConnector, startAgentServer, stimulusFromMetas, stripFrontmatter, takeRunnerWsAuthToken, toActiveFlowTarget, touchSession, unresolvedCredentialNotices, validateInputResponse, verifyConventionItems, writeClaudeCodeCredentialsFile, writeRangeChunk, writeRangePartialPath };
|
|
16473
|
-
//# sourceMappingURL=chunk-
|
|
16474
|
-
//# sourceMappingURL=chunk-
|
|
16728
|
+
//# sourceMappingURL=chunk-OLZE4IHX.js.map
|
|
16729
|
+
//# sourceMappingURL=chunk-OLZE4IHX.js.map
|