@skaile/workspaces 6.10.0 → 6.12.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 +16 -0
- package/dist/app-sdk/index.js +1 -1
- package/dist/{asset-feeds-UG3PG423.js → asset-feeds-PO2WC75V.js} +13 -13
- package/dist/{asset-feeds-UG3PG423.js.map → asset-feeds-PO2WC75V.js.map} +1 -1
- package/dist/asset-manager/index.js +6 -6
- package/dist/asset-manager/installer.js +3 -3
- package/dist/asset-manager/renderers.js +2 -2
- package/dist/bridge/harnesses/claude-sdk.js +7 -7
- package/dist/bridge/harnesses/codex.js +5 -5
- package/dist/bridge/harnesses/continue.js +4 -4
- package/dist/bridge/harnesses/echo.js +4 -4
- package/dist/bridge/harnesses/gemini.js +7 -7
- package/dist/bridge/harnesses/goose.js +4 -4
- package/dist/bridge/harnesses/omp.js +41 -10
- package/dist/bridge/harnesses/omp.js.map +1 -1
- package/dist/bridge/harnesses/opencode.js +4 -4
- package/dist/bridge/harnesses/qwen.js +7 -7
- package/dist/bridge/index.js +11 -11
- package/dist/bridge/src/harnesses/omp.d.ts +13 -1
- package/dist/bridge/src/harnesses/omp.d.ts.map +1 -1
- package/dist/bridge/src/types.d.ts +7 -0
- package/dist/bridge/src/types.d.ts.map +1 -1
- package/dist/channels/adapters/msteams/activity.d.ts +2 -2
- package/dist/channels/adapters/msteams/activity.d.ts.map +1 -1
- package/dist/channels/adapters/msteams.js +21 -6
- package/dist/channels/adapters/msteams.js.map +1 -1
- package/dist/channels/index.js +175 -26
- package/dist/channels/index.js.map +1 -1
- package/dist/channels/src/context-batch.d.ts +63 -0
- package/dist/channels/src/context-batch.d.ts.map +1 -0
- package/dist/channels/src/egress/output-mirror.d.ts +7 -0
- package/dist/channels/src/egress/output-mirror.d.ts.map +1 -1
- package/dist/channels/src/engine.d.ts +21 -2
- package/dist/channels/src/engine.d.ts.map +1 -1
- package/dist/channels/src/index.d.ts +1 -0
- package/dist/channels/src/index.d.ts.map +1 -1
- package/dist/channels/src/ports.d.ts +9 -0
- package/dist/channels/src/ports.d.ts.map +1 -1
- package/dist/channels/src/types.d.ts +6 -0
- package/dist/channels/src/types.d.ts.map +1 -1
- package/dist/{chunk-7NN3P6VF.js → chunk-342UX2MG.js} +10 -5
- package/dist/chunk-342UX2MG.js.map +1 -0
- package/dist/{chunk-NTFP2XF4.js → chunk-45XL75RO.js} +9 -9
- package/dist/{chunk-NTFP2XF4.js.map → chunk-45XL75RO.js.map} +1 -1
- package/dist/{chunk-JDZUQFN7.js → chunk-4NJVF3DV.js} +4 -4
- package/dist/{chunk-JDZUQFN7.js.map → chunk-4NJVF3DV.js.map} +1 -1
- package/dist/{chunk-GA4GUDTL.js → chunk-5M3S6DLV.js} +3 -3
- package/dist/{chunk-GA4GUDTL.js.map → chunk-5M3S6DLV.js.map} +1 -1
- package/dist/{chunk-HE3TZYNG.js → chunk-5XYZNMMC.js} +4 -4
- package/dist/{chunk-HE3TZYNG.js.map → chunk-5XYZNMMC.js.map} +1 -1
- package/dist/{chunk-2U67XYZM.js → chunk-6NNXBXYI.js} +3 -3
- package/dist/{chunk-2U67XYZM.js.map → chunk-6NNXBXYI.js.map} +1 -1
- package/dist/{chunk-FXBKBOI5.js → chunk-7FXOOUOC.js} +4 -4
- package/dist/{chunk-FXBKBOI5.js.map → chunk-7FXOOUOC.js.map} +1 -1
- package/dist/{chunk-KRL53RZB.js → chunk-7LJUK5JK.js} +4 -4
- package/dist/{chunk-KRL53RZB.js.map → chunk-7LJUK5JK.js.map} +1 -1
- package/dist/{chunk-NCJSYU6A.js → chunk-7O6SCI7B.js} +5 -5
- package/dist/{chunk-NCJSYU6A.js.map → chunk-7O6SCI7B.js.map} +1 -1
- package/dist/{chunk-R3ZNAPBV.js → chunk-7VBD5XUM.js} +3 -3
- package/dist/{chunk-R3ZNAPBV.js.map → chunk-7VBD5XUM.js.map} +1 -1
- package/dist/{chunk-YEOG7CWQ.js → chunk-7ZL23M3X.js} +3 -3
- package/dist/{chunk-YEOG7CWQ.js.map → chunk-7ZL23M3X.js.map} +1 -1
- package/dist/{chunk-375HN3FD.js → chunk-CH6UVEM5.js} +9 -9
- package/dist/{chunk-375HN3FD.js.map → chunk-CH6UVEM5.js.map} +1 -1
- package/dist/{chunk-HQUF6O4B.js → chunk-CI4I34F4.js} +7 -7
- package/dist/{chunk-HQUF6O4B.js.map → chunk-CI4I34F4.js.map} +1 -1
- package/dist/{chunk-RTFH2QR2.js → chunk-CLMIZ4N6.js} +3 -3
- package/dist/{chunk-RTFH2QR2.js.map → chunk-CLMIZ4N6.js.map} +1 -1
- package/dist/{chunk-QBJQ426X.js → chunk-DKRD6CZL.js} +3 -3
- package/dist/{chunk-QBJQ426X.js.map → chunk-DKRD6CZL.js.map} +1 -1
- package/dist/{chunk-RZ5R6GDJ.js → chunk-DRUAQ7IY.js} +3 -3
- package/dist/{chunk-RZ5R6GDJ.js.map → chunk-DRUAQ7IY.js.map} +1 -1
- package/dist/{chunk-3AIEJSQR.js → chunk-ESUF2ZYT.js} +3 -3
- package/dist/{chunk-3AIEJSQR.js.map → chunk-ESUF2ZYT.js.map} +1 -1
- package/dist/{chunk-C5UKYTTD.js → chunk-FECB7RI7.js} +9 -9
- package/dist/{chunk-C5UKYTTD.js.map → chunk-FECB7RI7.js.map} +1 -1
- package/dist/{chunk-4Z4RULWQ.js → chunk-FO2GU5L7.js} +196 -35
- package/dist/chunk-FO2GU5L7.js.map +1 -0
- package/dist/{chunk-2D6HZAO5.js → chunk-FVOQPTK2.js} +3 -3
- package/dist/{chunk-2D6HZAO5.js.map → chunk-FVOQPTK2.js.map} +1 -1
- package/dist/{chunk-5JBMYZNA.js → chunk-GODUKPGD.js} +3 -3
- package/dist/{chunk-5JBMYZNA.js.map → chunk-GODUKPGD.js.map} +1 -1
- package/dist/{chunk-7DUOKE73.js → chunk-GQQIMKEP.js} +11 -11
- package/dist/{chunk-7DUOKE73.js.map → chunk-GQQIMKEP.js.map} +1 -1
- package/dist/{chunk-BRPEW3UL.js → chunk-GYRIO6RA.js} +3 -3
- package/dist/{chunk-BRPEW3UL.js.map → chunk-GYRIO6RA.js.map} +1 -1
- package/dist/{chunk-DOMRBOJZ.js → chunk-HPQ2WDYC.js} +4 -4
- package/dist/{chunk-DOMRBOJZ.js.map → chunk-HPQ2WDYC.js.map} +1 -1
- package/dist/{chunk-4I4SBOCS.js → chunk-IIELRGIZ.js} +7 -7
- package/dist/{chunk-4I4SBOCS.js.map → chunk-IIELRGIZ.js.map} +1 -1
- package/dist/{chunk-6PVRP3LW.js → chunk-IPCRQWNC.js} +17 -6
- package/dist/chunk-IPCRQWNC.js.map +1 -0
- package/dist/{chunk-5KQFR4D7.js → chunk-L74W5TVC.js} +4 -4
- package/dist/{chunk-5KQFR4D7.js.map → chunk-L74W5TVC.js.map} +1 -1
- package/dist/{chunk-WS3BOCAT.js → chunk-LCXQ4LVP.js} +16 -3
- package/dist/chunk-LCXQ4LVP.js.map +1 -0
- package/dist/{chunk-2MUUPRIG.js → chunk-LXD37LHF.js} +4 -4
- package/dist/{chunk-2MUUPRIG.js.map → chunk-LXD37LHF.js.map} +1 -1
- package/dist/{chunk-PSPFWTJI.js → chunk-MRTOKIEJ.js} +3 -3
- package/dist/{chunk-PSPFWTJI.js.map → chunk-MRTOKIEJ.js.map} +1 -1
- package/dist/{chunk-NFFBYG2W.js → chunk-PZS55HOX.js} +3 -3
- package/dist/{chunk-NFFBYG2W.js.map → chunk-PZS55HOX.js.map} +1 -1
- package/dist/{chunk-XDVR7QIT.js → chunk-QC4Q7PMQ.js} +6 -3
- package/dist/chunk-QC4Q7PMQ.js.map +1 -0
- package/dist/{chunk-5P7LTPBR.js → chunk-RRKJHADP.js} +3 -3
- package/dist/{chunk-5P7LTPBR.js.map → chunk-RRKJHADP.js.map} +1 -1
- package/dist/{chunk-6O7VDKX3.js → chunk-RZQCBFIU.js} +2 -2
- package/dist/{chunk-6O7VDKX3.js.map → chunk-RZQCBFIU.js.map} +1 -1
- package/dist/{chunk-KE5HDORU.js → chunk-S6NS3I3P.js} +2 -2
- package/dist/{chunk-KE5HDORU.js.map → chunk-S6NS3I3P.js.map} +1 -1
- package/dist/{chunk-XWCV2A2F.js → chunk-SZ3XCZHC.js} +3 -3
- package/dist/{chunk-XWCV2A2F.js.map → chunk-SZ3XCZHC.js.map} +1 -1
- package/dist/{chunk-SKG6G4HO.js → chunk-UHTCOYFJ.js} +7 -7
- package/dist/{chunk-SKG6G4HO.js.map → chunk-UHTCOYFJ.js.map} +1 -1
- package/dist/{chunk-F2IBDVBP.js → chunk-VHRGCLCR.js} +2 -2
- package/dist/{chunk-F2IBDVBP.js.map → chunk-VHRGCLCR.js.map} +1 -1
- package/dist/{chunk-HLFLET7S.js → chunk-WCHGUS7X.js} +5 -5
- package/dist/{chunk-HLFLET7S.js.map → chunk-WCHGUS7X.js.map} +1 -1
- package/dist/{chunk-IMO4EHND.js → chunk-WPTNYDDS.js} +4 -4
- package/dist/{chunk-IMO4EHND.js.map → chunk-WPTNYDDS.js.map} +1 -1
- package/dist/{chunk-BCID52M5.js → chunk-YPX7LQSW.js} +7 -7
- package/dist/{chunk-BCID52M5.js.map → chunk-YPX7LQSW.js.map} +1 -1
- package/dist/{chunk-PTXQMTCG.js → chunk-ZRKU7BRI.js} +3 -3
- package/dist/{chunk-PTXQMTCG.js.map → chunk-ZRKU7BRI.js.map} +1 -1
- package/dist/{claude-code-CMFGCDMX.js → claude-code-TDMSETH6.js} +4 -4
- package/dist/{claude-code-CMFGCDMX.js.map → claude-code-TDMSETH6.js.map} +1 -1
- package/dist/cli/index.js +63 -63
- package/dist/client/index.js +1 -1
- package/dist/client/src/client.d.ts +3 -0
- package/dist/client/src/client.d.ts.map +1 -1
- package/dist/connectors/index.js +13 -13
- package/dist/{connectors-P5M2D4MH.js → connectors-IUJRBTCW.js} +16 -16
- package/dist/{connectors-P5M2D4MH.js.map → connectors-IUJRBTCW.js.map} +1 -1
- package/dist/connectors-shared/index.js +2 -2
- package/dist/discovery/index.js +2 -2
- package/dist/{ensure-sources-MOGLBEUF.js → ensure-sources-Q2TTZVLX.js} +19 -19
- package/dist/{ensure-sources-MOGLBEUF.js.map → ensure-sources-Q2TTZVLX.js.map} +1 -1
- package/dist/factory-assets/connectors/box.js +13 -13
- package/dist/factory-assets/connectors/deploy.js +13 -13
- package/dist/factory-assets/connectors/devserver.js +13 -13
- package/dist/factory-assets/connectors/flow/adapter.js +13 -13
- package/dist/factory-assets/connectors/flow/run-flow.js +14 -14
- package/dist/factory-assets/connectors/flow.js +13 -13
- package/dist/factory-assets/connectors/git.js +13 -13
- package/dist/factory-assets/connectors/gmail.js +13 -13
- package/dist/factory-assets/connectors/googledrive.js +13 -13
- package/dist/factory-assets/connectors/local.js +13 -13
- package/dist/factory-assets/connectors/mattermost.js +13 -13
- package/dist/factory-assets/connectors/memory.js +13 -13
- package/dist/factory-assets/connectors/minio.js +13 -13
- package/dist/factory-assets/connectors/postgres.js +13 -13
- package/dist/factory-assets/connectors/s3.js +13 -13
- package/dist/factory-assets/connectors/sharepoint.js +13 -13
- package/dist/factory-assets/connectors/sqlite.js +13 -13
- package/dist/factory-assets/connectors/static-server.js +13 -13
- package/dist/factory-assets/connectors/tunnel.js +13 -13
- package/dist/factory-assets/connectors/webdav.js +13 -13
- package/dist/factory-assets/connectors/xstate-store.js +13 -13
- package/dist/factory-assets/connectors/xstate.js +13 -13
- package/dist/{helpers-JL5AEGDT.js → helpers-S6AQGXRH.js} +19 -19
- package/dist/{helpers-JL5AEGDT.js.map → helpers-S6AQGXRH.js.map} +1 -1
- package/dist/library/index.js +3 -3
- package/dist/{library-publish-DZNNZNMB.js → library-publish-7U4TJNQX.js} +33 -33
- package/dist/{library-publish-DZNNZNMB.js.map → library-publish-7U4TJNQX.js.map} +1 -1
- package/dist/model-endpoint/index.js +3 -3
- package/dist/{open-library-OJREQ22B.js → open-library-K6O6OVW5.js} +21 -21
- package/dist/{open-library-OJREQ22B.js.map → open-library-K6O6OVW5.js.map} +1 -1
- package/dist/{open-registry-OEU6QUK2.js → open-registry-4HNCWOCN.js} +6 -6
- package/dist/{open-registry-OEU6QUK2.js.map → open-registry-4HNCWOCN.js.map} +1 -1
- package/dist/{project-52UABBD5.js → project-ZWIZZIUT.js} +29 -29
- package/dist/{project-52UABBD5.js.map → project-ZWIZZIUT.js.map} +1 -1
- package/dist/runner/index.js +21 -21
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/runner/src/turn-ids.d.ts +70 -0
- package/dist/runner/src/turn-ids.d.ts.map +1 -0
- package/dist/runner/src/turn-scheduler.d.ts +7 -0
- package/dist/runner/src/turn-scheduler.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +6 -6
- package/dist/sdk/bridge.js +11 -11
- package/dist/sdk/client.js +1 -1
- package/dist/sdk/index.js +22 -22
- package/dist/sdk/runner.js +21 -21
- package/dist/sdk/session.js +2 -2
- package/dist/sdk/types.js +1 -1
- package/dist/{serve-preflight-HOQ7CGYR.js → serve-preflight-E3IEZTTF.js} +21 -21
- package/dist/{serve-preflight-HOQ7CGYR.js.map → serve-preflight-E3IEZTTF.js.map} +1 -1
- package/dist/session/index.js +2 -2
- package/dist/session/src/dispatcher.d.ts +4 -1
- package/dist/session/src/dispatcher.d.ts.map +1 -1
- package/dist/{setup-JIDZ372C.js → setup-V4EXOMVQ.js} +20 -20
- package/dist/{setup-JIDZ372C.js.map → setup-V4EXOMVQ.js.map} +1 -1
- package/dist/{source-P6ZFSSZZ.js → source-O7XXDX55.js} +31 -31
- package/dist/{source-P6ZFSSZZ.js.map → source-O7XXDX55.js.map} +1 -1
- package/dist/{source-manifest-publish-Y36FHVDS.js → source-manifest-publish-GUU4LX2S.js} +33 -33
- package/dist/{source-manifest-publish-Y36FHVDS.js.map → source-manifest-publish-GUU4LX2S.js.map} +1 -1
- package/dist/tui/index.js +21 -21
- package/dist/types/index.js +1 -1
- package/dist/types/manifests.js +1 -1
- package/dist/types/src/capabilities.d.ts +2 -1
- package/dist/types/src/capabilities.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +2 -1
- 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/agent.d.ts +2 -0
- package/dist/types/src/manifests/agent.d.ts.map +1 -1
- package/dist/types/src/protocol.d.ts +2 -0
- package/dist/types/src/protocol.d.ts.map +1 -1
- package/dist/types/src/turn-ids.d.ts +62 -0
- package/dist/types/src/turn-ids.d.ts.map +1 -0
- package/dist/types/src/version.d.ts +12 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +15 -15
- package/dist/workspace-plugin/adapters/omp.js +7 -7
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4Z4RULWQ.js.map +0 -1
- package/dist/chunk-6PVRP3LW.js.map +0 -1
- package/dist/chunk-7NN3P6VF.js.map +0 -1
- package/dist/chunk-WS3BOCAT.js.map +0 -1
- package/dist/chunk-XDVR7QIT.js.map +0 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { WorkspacePlugin } from './chunk-
|
|
2
|
-
import { buildWorkspaceToolDefs } from './chunk-
|
|
1
|
+
import { WorkspacePlugin } from './chunk-RZQCBFIU.js';
|
|
2
|
+
import { buildWorkspaceToolDefs } from './chunk-L74W5TVC.js';
|
|
3
3
|
import { findAiAssetsRoot } from './chunk-V2VDTQ7A.js';
|
|
4
|
-
import { startModelEndpoint, ModelEndpointError } from './chunk-
|
|
4
|
+
import { startModelEndpoint, ModelEndpointError } from './chunk-WPTNYDDS.js';
|
|
5
5
|
import { WebSocketServerTransport } from './chunk-7K73MCI6.js';
|
|
6
6
|
import { assembleSystemPrompt, buildCapabilitiesPromptSection } from './chunk-W3UDISS2.js';
|
|
7
|
-
import { resolveFlowPath } from './chunk-
|
|
7
|
+
import { resolveFlowPath } from './chunk-FVOQPTK2.js';
|
|
8
8
|
import { findAiAssetsRoot as findAiAssetsRoot$1, deployCatalogEntry, undeployCatalogEntry } from './chunk-LQWOU7S2.js';
|
|
9
|
-
import { ConnectFailureCarryOver, registerBuiltinConnectors, listConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, buildSdkConnectorTools, fleetMountConnectingMessage, buildLazySdkFlowTools, describeFlowOperations, buildConnectorToolDefs, TRUSTED_GIT_CA_ENV, writeUserGitconfigInclude, buildFlowToolDefs, SessionNodeExecutor, SessionSubpromptRunner, ClassifierSubpromptRunner, SessionInlineSubFlowRunner, driveOrchestratorTurn, buildSdkFlowTools } from './chunk-
|
|
9
|
+
import { ConnectFailureCarryOver, registerBuiltinConnectors, listConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, buildSdkConnectorTools, fleetMountConnectingMessage, buildLazySdkFlowTools, describeFlowOperations, buildConnectorToolDefs, TRUSTED_GIT_CA_ENV, writeUserGitconfigInclude, buildFlowToolDefs, SessionNodeExecutor, SessionSubpromptRunner, ClassifierSubpromptRunner, SessionInlineSubFlowRunner, driveOrchestratorTurn, buildSdkFlowTools } from './chunk-UHTCOYFJ.js';
|
|
10
10
|
import { loadYamlConnectorDeclarations, withMaterializedConnectorDeclarations, SecretProviderChain, ConnectorStartupError, isKnownSecretRef, EnvSecretProvider, PreMintedSecretProvider, InMemorySecretProvider, resolvedConfigToDeclarations, deriveSingleMaterializedConnectorDeclaration } from './chunk-SBAUZ7XH.js';
|
|
11
|
-
import { EventNormalizer } from './chunk-
|
|
12
|
-
import { sessionSurfaceNotice, approvalCardOf, APPROVE_ONCE, DENY, probeResumeTranscript, transcriptStoreForRuntime } from './chunk-
|
|
13
|
-
import { codexLoginFallbackNotice, prepareNativePolicy, codexInstanceEnvironment, parseCodexCredential, parseCodexRefreshInput, parseCodexRefreshResult } from './chunk-
|
|
11
|
+
import { EventNormalizer } from './chunk-45XL75RO.js';
|
|
12
|
+
import { sessionSurfaceNotice, approvalCardOf, APPROVE_ONCE, DENY, probeResumeTranscript, transcriptStoreForRuntime } from './chunk-MRTOKIEJ.js';
|
|
13
|
+
import { codexLoginFallbackNotice, prepareNativePolicy, codexInstanceEnvironment, parseCodexCredential, parseCodexRefreshInput, parseCodexRefreshResult } from './chunk-WCHGUS7X.js';
|
|
14
14
|
import { CodexNativeStateUnavailable } from './chunk-5KSGZP3E.js';
|
|
15
|
-
import { dispatchCapability } from './chunk-
|
|
15
|
+
import { dispatchCapability } from './chunk-7ZL23M3X.js';
|
|
16
16
|
import { classifyClaudeSdkError } from './chunk-5DE3DGVR.js';
|
|
17
17
|
import { agentExecRequested } from './chunk-7DN6JKP2.js';
|
|
18
|
-
import { toAgentEffort, toMergedRegistry } from './chunk-
|
|
19
|
-
import { unresolvedProviderCredentials, harnessCapabilities, createHarness, providerCredentialEnvName, registryCredentialEnv, supportsLiveToolUpdates } from './chunk-
|
|
18
|
+
import { toAgentEffort, toMergedRegistry } from './chunk-PZS55HOX.js';
|
|
19
|
+
import { unresolvedProviderCredentials, harnessCapabilities, createHarness, providerCredentialEnvName, registryCredentialEnv, supportsLiveToolUpdates } from './chunk-S6NS3I3P.js';
|
|
20
20
|
import { catalogLayer, AI_PROVIDER_PRESETS } from './chunk-6UP2EDFN.js';
|
|
21
21
|
import { loadFlow } from './chunk-WDG5IVEA.js';
|
|
22
22
|
import { renderStimulusPrompt } from './chunk-WD3L5QSU.js';
|
|
23
|
-
import { TURN_VISIBILITY_EVENT_TYPES, withActivityLabelJsonSchema, TOOL_ACTIVITY_PROMPT_SECTION, TERMINAL_AGENT_RUN_STATUSES, SESSION_ROOT_CONNECTOR_ID, PLATFORM_BLOCKS_RUNTIME_FEATURE, TURN_VISIBILITY_RUNTIME_FEATURE, PROTOCOL_VERSION, deliveryClassOf } from './chunk-
|
|
24
|
-
import { knowledgeKindProvider, scanLibraryRoot, LocalIndex } from './chunk-
|
|
25
|
-
import { createDefaultKindRegistry } from './chunk-
|
|
23
|
+
import { TURN_VISIBILITY_EVENT_TYPES, withActivityLabelJsonSchema, TOOL_ACTIVITY_PROMPT_SECTION, TERMINAL_AGENT_RUN_STATUSES, SESSION_ROOT_CONNECTOR_ID, PLATFORM_BLOCKS_RUNTIME_FEATURE, TURN_VISIBILITY_RUNTIME_FEATURE, TURN_IDS_RUNTIME_FEATURE, PROTOCOL_VERSION, TURN_IDS_MAX_COUNT, TURN_ID_MAX_LENGTH, deliveryClassOf } from './chunk-342UX2MG.js';
|
|
24
|
+
import { knowledgeKindProvider, scanLibraryRoot, LocalIndex } from './chunk-7FXOOUOC.js';
|
|
25
|
+
import { createDefaultKindRegistry } from './chunk-DRUAQ7IY.js';
|
|
26
26
|
import { parseFlowDefinition } from './chunk-JRN5QF4C.js';
|
|
27
|
-
import { BindingSchema, effectiveComposes, AgentManifestSchema, AgentTriggerSchema, ANTHROPIC_MODEL_ALIASES } from './chunk-
|
|
27
|
+
import { BindingSchema, effectiveComposes, AgentManifestSchema, AgentTriggerSchema, ANTHROPIC_MODEL_ALIASES } from './chunk-LCXQ4LVP.js';
|
|
28
28
|
import { readLock, buildAgentPromptSections, resolveSettings, loadProviderRegistry, resolveLibraryDir } from './chunk-MEU2HHGV.js';
|
|
29
29
|
import { resolveRuntimeAssets } from './chunk-CJO3XKO7.js';
|
|
30
30
|
import { DEFAULT_HARNESS_ID, resolveHarnessPaths } from './chunk-C5HFK34M.js';
|
|
@@ -9119,6 +9119,142 @@ var TurnEndContract = class {
|
|
|
9119
9119
|
}
|
|
9120
9120
|
};
|
|
9121
9121
|
|
|
9122
|
+
// runner/src/turn-ids.ts
|
|
9123
|
+
var UNKNOWN = /* @__PURE__ */ Symbol("unknown-turn");
|
|
9124
|
+
var MAX_TRACKED_TASKS = 4096;
|
|
9125
|
+
var MAX_RUNNING_TASKS = 256;
|
|
9126
|
+
function turnIdOf(cmd) {
|
|
9127
|
+
const id = cmd.turnId;
|
|
9128
|
+
return typeof id === "string" && id.length > 0 && id.length <= TURN_ID_MAX_LENGTH ? id : null;
|
|
9129
|
+
}
|
|
9130
|
+
function union(a, b) {
|
|
9131
|
+
if (a === UNKNOWN || b === UNKNOWN) return UNKNOWN;
|
|
9132
|
+
if (a.length === 0) return b;
|
|
9133
|
+
if (b.length === 0) return a;
|
|
9134
|
+
return [.../* @__PURE__ */ new Set([...a, ...b])];
|
|
9135
|
+
}
|
|
9136
|
+
var TurnIdStamp = class {
|
|
9137
|
+
/** Every turn holding the harness, by the handle {@link enter} gave it. */
|
|
9138
|
+
holders = /* @__PURE__ */ new Map();
|
|
9139
|
+
nextHolder = 0;
|
|
9140
|
+
/** The self-started turn running now, if any, and the turns whose work it reads. */
|
|
9141
|
+
selfTurn = void 0;
|
|
9142
|
+
/** Launching turns of every task seen to start, oldest first. */
|
|
9143
|
+
tasks = /* @__PURE__ */ new Map();
|
|
9144
|
+
/** Background tasks started and not yet settled, with their launching turns. */
|
|
9145
|
+
running = /* @__PURE__ */ new Map();
|
|
9146
|
+
runningOverflow = false;
|
|
9147
|
+
/**
|
|
9148
|
+
* A host turn now holds the harness; `null` when it was sent without an id.
|
|
9149
|
+
* Returns the call that ends its hold, which ends no other turn's.
|
|
9150
|
+
*/
|
|
9151
|
+
enter(turnId) {
|
|
9152
|
+
return this.hold(turnId === null ? UNKNOWN : [turnId]);
|
|
9153
|
+
}
|
|
9154
|
+
/** A turn the host did not send holds the harness: a flow turn, a compaction. */
|
|
9155
|
+
enterForeign() {
|
|
9156
|
+
return this.hold(UNKNOWN);
|
|
9157
|
+
}
|
|
9158
|
+
/**
|
|
9159
|
+
* A reply was taken by the turn paused on its question: the rest of that turn
|
|
9160
|
+
* answers to the reply's sender as well. Which holder paused is not known, so
|
|
9161
|
+
* every one does. With none, the paused turn is a self-started one, or one
|
|
9162
|
+
* this stamp lost track of.
|
|
9163
|
+
*/
|
|
9164
|
+
join(turnId) {
|
|
9165
|
+
const ids = turnId === null ? UNKNOWN : [turnId];
|
|
9166
|
+
if (this.holders.size > 0) {
|
|
9167
|
+
for (const [handle, held] of this.holders) this.holders.set(handle, union(held, ids));
|
|
9168
|
+
} else {
|
|
9169
|
+
this.selfTurn = this.selfTurn === void 0 ? UNKNOWN : union(this.selfTurn, ids);
|
|
9170
|
+
}
|
|
9171
|
+
}
|
|
9172
|
+
/** Feed every raw harness event before it is normalized: task ids are gone after. */
|
|
9173
|
+
observeHarnessEvent(raw) {
|
|
9174
|
+
if (typeof raw !== "object" || raw === null) return;
|
|
9175
|
+
const event = raw;
|
|
9176
|
+
switch (event.type) {
|
|
9177
|
+
case "self_turn_started": {
|
|
9178
|
+
const ids = Array.isArray(event.taskIds) ? event.taskIds : [];
|
|
9179
|
+
let owner = ids.length === 0 ? UNKNOWN : [];
|
|
9180
|
+
for (const id of ids)
|
|
9181
|
+
owner = union(owner, typeof id === "string" ? this.tasks.get(id) ?? UNKNOWN : UNKNOWN);
|
|
9182
|
+
this.selfTurn = owner;
|
|
9183
|
+
return;
|
|
9184
|
+
}
|
|
9185
|
+
case "background_task_started": {
|
|
9186
|
+
if (typeof event.taskId !== "string") return;
|
|
9187
|
+
const main = this.mainIds();
|
|
9188
|
+
const owner = main !== UNKNOWN && main.length === 0 ? UNKNOWN : main;
|
|
9189
|
+
this.tasks.delete(event.taskId);
|
|
9190
|
+
this.tasks.set(event.taskId, owner);
|
|
9191
|
+
if (this.tasks.size > MAX_TRACKED_TASKS) {
|
|
9192
|
+
const oldest = this.tasks.keys().next().value;
|
|
9193
|
+
if (oldest !== void 0) this.tasks.delete(oldest);
|
|
9194
|
+
}
|
|
9195
|
+
if (this.running.size >= MAX_RUNNING_TASKS && !this.running.has(event.taskId))
|
|
9196
|
+
this.runningOverflow = true;
|
|
9197
|
+
else this.running.set(event.taskId, owner);
|
|
9198
|
+
return;
|
|
9199
|
+
}
|
|
9200
|
+
case "background_task_settled":
|
|
9201
|
+
if (typeof event.taskId === "string") this.running.delete(event.taskId);
|
|
9202
|
+
return;
|
|
9203
|
+
case "background_tasks_reset":
|
|
9204
|
+
this.running.clear();
|
|
9205
|
+
this.runningOverflow = false;
|
|
9206
|
+
this.selfTurn = void 0;
|
|
9207
|
+
return;
|
|
9208
|
+
}
|
|
9209
|
+
}
|
|
9210
|
+
/**
|
|
9211
|
+
* The event as it goes on the wire, with the turn ids it carries. Call after
|
|
9212
|
+
* any other stamp: only `capability_invoked` and `finished` are touched, and
|
|
9213
|
+
* a top-level terminal ends the self-started turn's attribution.
|
|
9214
|
+
*/
|
|
9215
|
+
stamp(event) {
|
|
9216
|
+
if (event.type === "capability_invoked") {
|
|
9217
|
+
return withIds(event, union(this.mainIds(), this.runningIds()));
|
|
9218
|
+
}
|
|
9219
|
+
const parent = event.parentToolUseId;
|
|
9220
|
+
const terminal = event.type === "finished" || event.type === "error" && event.fatal === true && event.retrying !== true;
|
|
9221
|
+
if (!terminal || typeof parent === "string") return event;
|
|
9222
|
+
this.selfTurn = void 0;
|
|
9223
|
+
if (event.type !== "finished" || event.selfStarted === true)
|
|
9224
|
+
return event;
|
|
9225
|
+
const { turnId: _stale, ...rest } = event;
|
|
9226
|
+
const [only] = this.holders.size === 1 ? this.holders.values() : [];
|
|
9227
|
+
if (only === void 0 || only === UNKNOWN || only.length === 0) return rest;
|
|
9228
|
+
return { ...rest, turnId: only[0] };
|
|
9229
|
+
}
|
|
9230
|
+
hold(ids) {
|
|
9231
|
+
const handle = this.nextHolder++;
|
|
9232
|
+
this.holders.set(handle, ids);
|
|
9233
|
+
return () => {
|
|
9234
|
+
this.holders.delete(handle);
|
|
9235
|
+
};
|
|
9236
|
+
}
|
|
9237
|
+
/** The main thread: every turn holding the harness and any self-started turn running too. */
|
|
9238
|
+
mainIds() {
|
|
9239
|
+
let ids = [];
|
|
9240
|
+
for (const held of this.holders.values()) ids = union(ids, held);
|
|
9241
|
+
return this.selfTurn === void 0 ? ids : union(ids, this.selfTurn);
|
|
9242
|
+
}
|
|
9243
|
+
/** The launching turns of every background task still running. */
|
|
9244
|
+
runningIds() {
|
|
9245
|
+
if (this.runningOverflow) return UNKNOWN;
|
|
9246
|
+
let ids = [];
|
|
9247
|
+
for (const owner of this.running.values()) ids = union(ids, owner);
|
|
9248
|
+
return ids;
|
|
9249
|
+
}
|
|
9250
|
+
};
|
|
9251
|
+
function withIds(event, ids) {
|
|
9252
|
+
const { turnIds: _stale, ...rest } = event;
|
|
9253
|
+
if (ids === UNKNOWN || ids.length === 0 || ids.length > TURN_IDS_MAX_COUNT)
|
|
9254
|
+
return rest;
|
|
9255
|
+
return { ...rest, turnIds: [...ids] };
|
|
9256
|
+
}
|
|
9257
|
+
|
|
9122
9258
|
// runner/src/compaction-gate.ts
|
|
9123
9259
|
var CompactionGate = class {
|
|
9124
9260
|
/**
|
|
@@ -9553,6 +9689,7 @@ var TurnScheduler = class {
|
|
|
9553
9689
|
const paused = this.deps.getHarness();
|
|
9554
9690
|
if (paused.hasPendingQuestion()) {
|
|
9555
9691
|
if (paused.answerQuestion(turn.answer, turn.question, turn.requestId)) {
|
|
9692
|
+
this.deps.turnIds?.join(turn.turnId ?? null);
|
|
9556
9693
|
turn.onAnswered?.();
|
|
9557
9694
|
return;
|
|
9558
9695
|
}
|
|
@@ -9578,14 +9715,16 @@ var TurnScheduler = class {
|
|
|
9578
9715
|
return;
|
|
9579
9716
|
}
|
|
9580
9717
|
if (!endTurn) return;
|
|
9581
|
-
this.deps.
|
|
9718
|
+
const leaveTurnIds = this.deps.turnIds?.enter(turn.turnId ?? null);
|
|
9582
9719
|
try {
|
|
9720
|
+
this.deps.turnEnd?.begin();
|
|
9583
9721
|
await this.deps.getHarness().prompt(freshTurnReplyPrompt(turn.answer, turn.question));
|
|
9584
9722
|
} catch (err) {
|
|
9585
9723
|
this.deps.sendEvent(replyFailed(err));
|
|
9586
9724
|
} finally {
|
|
9587
9725
|
this.deps.turnEnd?.end();
|
|
9588
9726
|
this.deps.turnEnd?.settle();
|
|
9727
|
+
leaveTurnIds?.();
|
|
9589
9728
|
endTurn();
|
|
9590
9729
|
}
|
|
9591
9730
|
});
|
|
@@ -9606,6 +9745,7 @@ var TurnScheduler = class {
|
|
|
9606
9745
|
if (!await this.awaitCompactionIdle("flow turn"))
|
|
9607
9746
|
throw new Error(FLOW_TURN_COMPACTION_TIMEOUT);
|
|
9608
9747
|
const endTurn = await this.swaps.beginQueuedTurn();
|
|
9748
|
+
let leaveTurnIds;
|
|
9609
9749
|
if (this.swaps.isSwapping() || !this.compactions.isIdle()) {
|
|
9610
9750
|
endTurn();
|
|
9611
9751
|
continue;
|
|
@@ -9613,9 +9753,12 @@ var TurnScheduler = class {
|
|
|
9613
9753
|
try {
|
|
9614
9754
|
await this.deps.ensureHarnessStarted();
|
|
9615
9755
|
this.deps.turnEnd?.foreignTurn();
|
|
9756
|
+
leaveTurnIds = this.deps.turnIds?.enterForeign();
|
|
9616
9757
|
await awaitAgentEnd(this.deps.getHarness(), prompt, timeoutMs);
|
|
9617
9758
|
return;
|
|
9618
9759
|
} finally {
|
|
9760
|
+
leaveTurnIds?.();
|
|
9761
|
+
leaveTurnIds = void 0;
|
|
9619
9762
|
endTurn();
|
|
9620
9763
|
}
|
|
9621
9764
|
}
|
|
@@ -9669,6 +9812,7 @@ var TurnScheduler = class {
|
|
|
9669
9812
|
const generation = ++this.hooksGeneration;
|
|
9670
9813
|
const superseded = () => generation !== this.hooksGeneration;
|
|
9671
9814
|
let hold = null;
|
|
9815
|
+
let leaveTurnIds;
|
|
9672
9816
|
return {
|
|
9673
9817
|
// A user turn that already holds a slot keeps the harness; the compaction
|
|
9674
9818
|
// waits for it rather than prompting the harness under it. A platform call
|
|
@@ -9689,6 +9833,8 @@ var TurnScheduler = class {
|
|
|
9689
9833
|
},
|
|
9690
9834
|
onCompactionStart: (trigger) => {
|
|
9691
9835
|
this.deps.turnEnd?.foreignTurn();
|
|
9836
|
+
leaveTurnIds?.();
|
|
9837
|
+
leaveTurnIds = this.deps.turnIds?.enterForeign();
|
|
9692
9838
|
hold = this.compactions.begin();
|
|
9693
9839
|
this.suppressedBy = hold;
|
|
9694
9840
|
this.deps.sendEvent({ type: "status", phase: "compacting" });
|
|
@@ -9704,6 +9850,8 @@ var TurnScheduler = class {
|
|
|
9704
9850
|
onCompactionSettled: () => {
|
|
9705
9851
|
if (hold !== null && this.suppressedBy === hold) this.suppressedBy = null;
|
|
9706
9852
|
if (hold !== null) this.snapshotTurns.delete(hold);
|
|
9853
|
+
leaveTurnIds?.();
|
|
9854
|
+
leaveTurnIds = void 0;
|
|
9707
9855
|
this.compactions.settle(hold);
|
|
9708
9856
|
hold = null;
|
|
9709
9857
|
}
|
|
@@ -9760,9 +9908,10 @@ var TurnScheduler = class {
|
|
|
9760
9908
|
return { kind: "dropped" };
|
|
9761
9909
|
}
|
|
9762
9910
|
this.deps.turnVisibility?.enter(turn.visibility ?? null);
|
|
9763
|
-
this.deps.
|
|
9911
|
+
const leaveTurnIds = this.deps.turnIds?.enter(turn.turnId ?? null);
|
|
9764
9912
|
const endsBefore = this.turnEndReports;
|
|
9765
9913
|
try {
|
|
9914
|
+
this.deps.turnEnd?.begin();
|
|
9766
9915
|
turn.onStart?.();
|
|
9767
9916
|
await turn.dispatch();
|
|
9768
9917
|
} catch (err) {
|
|
@@ -9775,6 +9924,7 @@ var TurnScheduler = class {
|
|
|
9775
9924
|
this.deps.turnEnd?.end();
|
|
9776
9925
|
this.deps.turnEnd?.settle();
|
|
9777
9926
|
this.deps.turnVisibility?.exit();
|
|
9927
|
+
leaveTurnIds?.();
|
|
9778
9928
|
endTurn();
|
|
9779
9929
|
}
|
|
9780
9930
|
return { kind: "ran" };
|
|
@@ -9872,7 +10022,7 @@ function turnVisibilityOf(cmd) {
|
|
|
9872
10022
|
if (readers.length === 0) return "no-readers";
|
|
9873
10023
|
return { visibilityMode: "Private", privateRecipientIds: readers };
|
|
9874
10024
|
}
|
|
9875
|
-
var
|
|
10025
|
+
var UNKNOWN2 = /* @__PURE__ */ Symbol("unknown-owner");
|
|
9876
10026
|
var MAX_TRACKED = 4096;
|
|
9877
10027
|
var MAX_OUTSTANDING = 256;
|
|
9878
10028
|
var PARENTLESS_CHILD_TYPES = /* @__PURE__ */ new Set([
|
|
@@ -9882,11 +10032,11 @@ var PARENTLESS_CHILD_TYPES = /* @__PURE__ */ new Set([
|
|
|
9882
10032
|
]);
|
|
9883
10033
|
var QUESTION_TOOL = "AskUserQuestion";
|
|
9884
10034
|
function intersect(a, b) {
|
|
9885
|
-
if (a ===
|
|
10035
|
+
if (a === UNKNOWN2 || b === UNKNOWN2) return UNKNOWN2;
|
|
9886
10036
|
if (a === null) return b;
|
|
9887
10037
|
if (b === null) return a;
|
|
9888
10038
|
const readers = a.privateRecipientIds.filter((id) => b.privateRecipientIds.includes(id));
|
|
9889
|
-
return readers.length > 0 ? { visibilityMode: "Private", privateRecipientIds: readers } :
|
|
10039
|
+
return readers.length > 0 ? { visibilityMode: "Private", privateRecipientIds: readers } : UNKNOWN2;
|
|
9890
10040
|
}
|
|
9891
10041
|
var BoundedMap = class {
|
|
9892
10042
|
entries = /* @__PURE__ */ new Map();
|
|
@@ -9899,7 +10049,7 @@ var BoundedMap = class {
|
|
|
9899
10049
|
}
|
|
9900
10050
|
}
|
|
9901
10051
|
resolve(key) {
|
|
9902
|
-
return this.entries.has(key) ? this.entries.get(key) :
|
|
10052
|
+
return this.entries.has(key) ? this.entries.get(key) : UNKNOWN2;
|
|
9903
10053
|
}
|
|
9904
10054
|
};
|
|
9905
10055
|
var WITHHELD_KEPT_FIELDS = [
|
|
@@ -9954,9 +10104,9 @@ var TurnVisibilityStamp = class {
|
|
|
9954
10104
|
switch (event.type) {
|
|
9955
10105
|
case "self_turn_started": {
|
|
9956
10106
|
const ids = Array.isArray(event.taskIds) ? event.taskIds : [];
|
|
9957
|
-
let owner = ids.length === 0 ?
|
|
10107
|
+
let owner = ids.length === 0 ? UNKNOWN2 : null;
|
|
9958
10108
|
for (const id of ids)
|
|
9959
|
-
owner = intersect(owner, typeof id === "string" ? this.tasks.resolve(id) :
|
|
10109
|
+
owner = intersect(owner, typeof id === "string" ? this.tasks.resolve(id) : UNKNOWN2);
|
|
9960
10110
|
this.selfTurn = owner;
|
|
9961
10111
|
return;
|
|
9962
10112
|
}
|
|
@@ -10009,13 +10159,13 @@ var TurnVisibilityStamp = class {
|
|
|
10009
10159
|
stamp(event, opts = {}) {
|
|
10010
10160
|
const parent = event.parentToolUseId;
|
|
10011
10161
|
const selfStarted = event.selfStarted === true;
|
|
10012
|
-
let owner = event.type === "question" && this.questionOwner !== void 0 ? this.questionOwner : selfStarted && typeof parent !== "string" && this.selfTurn === void 0 ?
|
|
10162
|
+
let owner = event.type === "question" && this.questionOwner !== void 0 ? this.questionOwner : selfStarted && typeof parent !== "string" && this.selfTurn === void 0 ? UNKNOWN2 : this.ownerUnder(parent);
|
|
10013
10163
|
if (typeof parent !== "string" && (opts.fromCapability === true || PARENTLESS_CHILD_TYPES.has(event.type)))
|
|
10014
10164
|
owner = intersect(owner, this.runningOwner());
|
|
10015
10165
|
const terminal = event.type === "finished" || event.type === "error" && event.fatal === true && event.retrying !== true;
|
|
10016
10166
|
if (terminal && typeof parent !== "string") this.selfTurn = void 0;
|
|
10017
10167
|
if (!STAMPED_TYPES.has(event.type)) return event;
|
|
10018
|
-
if (owner ===
|
|
10168
|
+
if (owner === UNKNOWN2) return this.privateSeen ? this.withhold(event) : event;
|
|
10019
10169
|
if (owner === null) return event;
|
|
10020
10170
|
const stamped = {
|
|
10021
10171
|
visibilityMode: owner.visibilityMode,
|
|
@@ -10029,7 +10179,7 @@ var TurnVisibilityStamp = class {
|
|
|
10029
10179
|
}
|
|
10030
10180
|
/** Readers every running background task's launching turn shares; `null` when none runs. */
|
|
10031
10181
|
runningOwner() {
|
|
10032
|
-
if (this.runningOverflow) return
|
|
10182
|
+
if (this.runningOverflow) return UNKNOWN2;
|
|
10033
10183
|
let owner = null;
|
|
10034
10184
|
for (const taskOwner of this.running.values()) owner = intersect(owner, taskOwner);
|
|
10035
10185
|
return owner;
|
|
@@ -10040,7 +10190,7 @@ var TurnVisibilityStamp = class {
|
|
|
10040
10190
|
}
|
|
10041
10191
|
/** An owner that is unknown is not remembered, so the id stays unknown. */
|
|
10042
10192
|
remember(map, id, owner) {
|
|
10043
|
-
if (owner !==
|
|
10193
|
+
if (owner !== UNKNOWN2) map.set(id, owner);
|
|
10044
10194
|
}
|
|
10045
10195
|
withhold(event) {
|
|
10046
10196
|
this.withheldCount += 1;
|
|
@@ -13855,7 +14005,8 @@ async function startAgentServer(opts) {
|
|
|
13855
14005
|
const supportedRuntimeFeatures = [
|
|
13856
14006
|
...managedHost ? ["codex-app-server-v1"] : [],
|
|
13857
14007
|
PLATFORM_BLOCKS_RUNTIME_FEATURE,
|
|
13858
|
-
TURN_VISIBILITY_RUNTIME_FEATURE
|
|
14008
|
+
TURN_VISIBILITY_RUNTIME_FEATURE,
|
|
14009
|
+
TURN_IDS_RUNTIME_FEATURE
|
|
13859
14010
|
];
|
|
13860
14011
|
let managedBootstrapClosed = false;
|
|
13861
14012
|
const port = opts.port ?? 8080;
|
|
@@ -13953,6 +14104,7 @@ async function startAgentServer(opts) {
|
|
|
13953
14104
|
const turnTaps = /* @__PURE__ */ new Set();
|
|
13954
14105
|
const eventGapBuffer = new EventGapBuffer();
|
|
13955
14106
|
const turnVisibility = new TurnVisibilityStamp();
|
|
14107
|
+
const turnIds = new TurnIdStamp();
|
|
13956
14108
|
const initLessRunner = !managedHost && (wsConfig.secrets?.provider ?? "env") === "env";
|
|
13957
14109
|
let clientEverConnected = false;
|
|
13958
14110
|
transport.onConnect(() => {
|
|
@@ -13960,8 +14112,11 @@ async function startAgentServer(opts) {
|
|
|
13960
14112
|
});
|
|
13961
14113
|
function sendEvent(event, opts2) {
|
|
13962
14114
|
const stamped = turnVisibility.stamp(event, opts2);
|
|
13963
|
-
if (stamped) deliverEvent(stamped);
|
|
13964
|
-
else
|
|
14115
|
+
if (stamped) deliverEvent(turnIds.stamp(stamped));
|
|
14116
|
+
else {
|
|
14117
|
+
turnIds.stamp(event);
|
|
14118
|
+
log(`[serve] withheld a ${event.type} event: its readers are unknown`);
|
|
14119
|
+
}
|
|
13965
14120
|
return stamped !== null;
|
|
13966
14121
|
}
|
|
13967
14122
|
function deliverEvent(event) {
|
|
@@ -14055,7 +14210,7 @@ async function startAgentServer(opts) {
|
|
|
14055
14210
|
input,
|
|
14056
14211
|
invokedBy: "agent"
|
|
14057
14212
|
});
|
|
14058
|
-
if (invoked) transport.send(invoked);
|
|
14213
|
+
if (invoked) transport.send(turnIds.stamp(invoked));
|
|
14059
14214
|
else finish(new Error(`Capability ${name} refused: its readers are unknown`));
|
|
14060
14215
|
} catch (error) {
|
|
14061
14216
|
finish(error);
|
|
@@ -14740,7 +14895,8 @@ async function startAgentServer(opts) {
|
|
|
14740
14895
|
log,
|
|
14741
14896
|
logPhase,
|
|
14742
14897
|
turnEnd: turnEndContract,
|
|
14743
|
-
turnVisibility
|
|
14898
|
+
turnVisibility,
|
|
14899
|
+
turnIds
|
|
14744
14900
|
});
|
|
14745
14901
|
agentLoop = createAgentLoop({
|
|
14746
14902
|
notReady: () => {
|
|
@@ -14775,6 +14931,7 @@ async function startAgentServer(opts) {
|
|
|
14775
14931
|
harness.removeAllListeners("reconfigure-rollback");
|
|
14776
14932
|
harness.kill();
|
|
14777
14933
|
turnVisibility.observeHarnessEvent({ type: "background_tasks_reset" });
|
|
14934
|
+
turnIds.observeHarnessEvent({ type: "background_tasks_reset" });
|
|
14778
14935
|
} catch (err) {
|
|
14779
14936
|
log(
|
|
14780
14937
|
`[serve] failed to retire previous harness: ${err instanceof Error ? err.message : String(err)}`
|
|
@@ -14903,6 +15060,7 @@ async function startAgentServer(opts) {
|
|
|
14903
15060
|
event
|
|
14904
15061
|
);
|
|
14905
15062
|
turnVisibility.observeHarnessEvent(event);
|
|
15063
|
+
turnIds.observeHarnessEvent(event);
|
|
14906
15064
|
const normalized = normalizer.normalize(event);
|
|
14907
15065
|
const turnEnded = event.type === "agent_end";
|
|
14908
15066
|
for (const e of normalized) {
|
|
@@ -16120,7 +16278,8 @@ async function startAgentServer(opts) {
|
|
|
16120
16278
|
toolAllowlist: cmd.toolAllowlist,
|
|
16121
16279
|
platformBlocks: cmd.platformBlocks,
|
|
16122
16280
|
owner: { senderId: cmd.senderId, messageId: cmd.messageId },
|
|
16123
|
-
visibility
|
|
16281
|
+
visibility,
|
|
16282
|
+
turnId: turnIdOf(cmd)
|
|
16124
16283
|
});
|
|
16125
16284
|
}
|
|
16126
16285
|
async function runChatPrompt(input) {
|
|
@@ -16132,6 +16291,7 @@ async function startAgentServer(opts) {
|
|
|
16132
16291
|
const outcome = await turnScheduler.prompt({
|
|
16133
16292
|
owner: input.owner,
|
|
16134
16293
|
visibility: input.visibility ?? null,
|
|
16294
|
+
turnId: input.turnId ?? null,
|
|
16135
16295
|
...input.onStart ? { onStart: input.onStart } : {},
|
|
16136
16296
|
...input.isAborted ? { cancelled: input.isAborted } : {},
|
|
16137
16297
|
// The turn ahead may be paused on a question it can only leave through
|
|
@@ -16271,6 +16431,7 @@ async function startAgentServer(opts) {
|
|
|
16271
16431
|
answer: escapeReservedPlatformTags(cmd.answer),
|
|
16272
16432
|
question: cmd.question,
|
|
16273
16433
|
requestId: cmd.requestId,
|
|
16434
|
+
turnId: turnIdOf(cmd),
|
|
16274
16435
|
// Tells every other attached client the question is answered, so none
|
|
16275
16436
|
// keeps a stale question card or a shut status gate.
|
|
16276
16437
|
onAnswered: () => sendEvent({
|
|
@@ -16952,5 +17113,5 @@ function touchSession(state) {
|
|
|
16952
17113
|
}
|
|
16953
17114
|
|
|
16954
17115
|
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, modelForHarness, 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 };
|
|
16955
|
-
//# sourceMappingURL=chunk-
|
|
16956
|
-
//# sourceMappingURL=chunk-
|
|
17116
|
+
//# sourceMappingURL=chunk-FO2GU5L7.js.map
|
|
17117
|
+
//# sourceMappingURL=chunk-FO2GU5L7.js.map
|