@xenosystem/agent-interface-host 0.1.24 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account/AccountIntegrationOperations.d.ts +11 -0
- package/dist/account/AccountIntegrationOperations.d.ts.map +1 -0
- package/dist/account/AccountIntegrationOperations.js +78 -0
- package/dist/account/AccountIntegrationOperations.js.map +1 -0
- package/dist/account/AccountOperations.d.ts +15 -0
- package/dist/account/AccountOperations.d.ts.map +1 -0
- package/dist/account/AccountOperations.js +129 -0
- package/dist/account/AccountOperations.js.map +1 -0
- package/dist/account/AccountWorkforceService.d.ts +44 -0
- package/dist/account/AccountWorkforceService.d.ts.map +1 -0
- package/dist/account/AccountWorkforceService.js +175 -0
- package/dist/account/AccountWorkforceService.js.map +1 -0
- package/dist/account/AccountWorkspaceService.d.ts +56 -0
- package/dist/account/AccountWorkspaceService.d.ts.map +1 -0
- package/dist/account/AccountWorkspaceService.js +424 -0
- package/dist/account/AccountWorkspaceService.js.map +1 -0
- package/dist/account/ConversationCollaborationClient.d.ts +71 -0
- package/dist/account/ConversationCollaborationClient.d.ts.map +1 -0
- package/dist/account/ConversationCollaborationClient.js +271 -0
- package/dist/account/ConversationCollaborationClient.js.map +1 -0
- package/dist/account/WorkforceResourceOperations.d.ts +42 -0
- package/dist/account/WorkforceResourceOperations.d.ts.map +1 -0
- package/dist/account/WorkforceResourceOperations.js +225 -0
- package/dist/account/WorkforceResourceOperations.js.map +1 -0
- package/dist/account/WorkspaceKeyOperations.d.ts +54 -0
- package/dist/account/WorkspaceKeyOperations.d.ts.map +1 -0
- package/dist/account/WorkspaceKeyOperations.js +284 -0
- package/dist/account/WorkspaceKeyOperations.js.map +1 -0
- package/dist/account/WorkspaceMembershipOperations.d.ts +28 -0
- package/dist/account/WorkspaceMembershipOperations.d.ts.map +1 -0
- package/dist/account/WorkspaceMembershipOperations.js +188 -0
- package/dist/account/WorkspaceMembershipOperations.js.map +1 -0
- package/dist/account/accountIntegrationState.d.ts +22 -0
- package/dist/account/accountIntegrationState.d.ts.map +1 -0
- package/dist/account/accountIntegrationState.js +26 -0
- package/dist/account/accountIntegrationState.js.map +1 -0
- package/dist/account/accountKeyOperationState.d.ts +31 -0
- package/dist/account/accountKeyOperationState.d.ts.map +1 -0
- package/dist/account/accountKeyOperationState.js +33 -0
- package/dist/account/accountKeyOperationState.js.map +1 -0
- package/dist/account/accountMembershipOperationState.d.ts +32 -0
- package/dist/account/accountMembershipOperationState.d.ts.map +1 -0
- package/dist/account/accountMembershipOperationState.js +67 -0
- package/dist/account/accountMembershipOperationState.js.map +1 -0
- package/dist/account/accountOperationState.d.ts +22 -0
- package/dist/account/accountOperationState.d.ts.map +1 -0
- package/dist/account/accountOperationState.js +25 -0
- package/dist/account/accountOperationState.js.map +1 -0
- package/dist/account/accountWorkerClient.d.ts +15 -0
- package/dist/account/accountWorkerClient.d.ts.map +1 -0
- package/dist/account/accountWorkerClient.js +251 -0
- package/dist/account/accountWorkerClient.js.map +1 -0
- package/dist/account/accountWorkerEntry.d.ts +2 -0
- package/dist/account/accountWorkerEntry.d.ts.map +1 -0
- package/dist/account/accountWorkerEntry.js +50 -0
- package/dist/account/accountWorkerEntry.js.map +1 -0
- package/dist/account/accountWorkerProtocol.d.ts +76 -0
- package/dist/account/accountWorkerProtocol.d.ts.map +1 -0
- package/dist/account/accountWorkerProtocol.js +44 -0
- package/dist/account/accountWorkerProtocol.js.map +1 -0
- package/dist/account/accountWorkerRuntime.d.ts +81 -0
- package/dist/account/accountWorkerRuntime.d.ts.map +1 -0
- package/dist/account/accountWorkerRuntime.js +172 -0
- package/dist/account/accountWorkerRuntime.js.map +1 -0
- package/dist/account/accountWorkforceOperationState.d.ts +141 -0
- package/dist/account/accountWorkforceOperationState.d.ts.map +1 -0
- package/dist/account/accountWorkforceOperationState.js +149 -0
- package/dist/account/accountWorkforceOperationState.js.map +1 -0
- package/dist/account/canonicalAccountPort.d.ts +473 -0
- package/dist/account/canonicalAccountPort.d.ts.map +1 -0
- package/dist/account/canonicalAccountPort.js +44 -0
- package/dist/account/canonicalAccountPort.js.map +1 -0
- package/dist/acp/AcpAgentRegistryService.d.ts.map +1 -1
- package/dist/acp/AcpAgentRegistryService.js +11 -1
- package/dist/acp/AcpAgentRegistryService.js.map +1 -1
- package/dist/acp/AcpAgentTurnExecutionAdapter.d.ts +27 -0
- package/dist/acp/AcpAgentTurnExecutionAdapter.d.ts.map +1 -1
- package/dist/acp/AcpAgentTurnExecutionAdapter.js +18 -0
- package/dist/acp/AcpAgentTurnExecutionAdapter.js.map +1 -1
- package/dist/acp/AcpProcessSupervisor.d.ts +10 -0
- package/dist/acp/AcpProcessSupervisor.d.ts.map +1 -1
- package/dist/acp/AcpProcessSupervisor.js +156 -1
- package/dist/acp/AcpProcessSupervisor.js.map +1 -1
- package/dist/acp/AcpProviderModelService.d.ts.map +1 -1
- package/dist/acp/AcpProviderModelService.js +2 -0
- package/dist/acp/AcpProviderModelService.js.map +1 -1
- package/dist/acp/AcpRuntimeEventMapper.d.ts +1 -1
- package/dist/acp/AcpRuntimeEventMapper.d.ts.map +1 -1
- package/dist/acp/AcpRuntimeEventMapper.js +64 -2
- package/dist/acp/AcpRuntimeEventMapper.js.map +1 -1
- package/dist/acp/AcpSessionService.d.ts +24 -0
- package/dist/acp/AcpSessionService.d.ts.map +1 -1
- package/dist/acp/AcpSessionService.js +150 -14
- package/dist/acp/AcpSessionService.js.map +1 -1
- package/dist/acp/acpMeasuredUsage.d.ts +15 -0
- package/dist/acp/acpMeasuredUsage.d.ts.map +1 -0
- package/dist/acp/acpMeasuredUsage.js +41 -0
- package/dist/acp/acpMeasuredUsage.js.map +1 -0
- package/dist/acp/acpTypes.d.ts +28 -2
- package/dist/acp/acpTypes.d.ts.map +1 -1
- package/dist/acp/acpTypes.js.map +1 -1
- package/dist/agent/permissionProfiles.d.ts +3 -0
- package/dist/agent/permissionProfiles.d.ts.map +1 -1
- package/dist/agent/permissionProfiles.js.map +1 -1
- package/dist/browser/BrowserAdmissionLedger.d.ts +37 -0
- package/dist/browser/BrowserAdmissionLedger.d.ts.map +1 -0
- package/dist/browser/BrowserAdmissionLedger.js +51 -0
- package/dist/browser/BrowserAdmissionLedger.js.map +1 -0
- package/dist/browser/BrowserAutomationHttpTransport.d.ts +81 -0
- package/dist/browser/BrowserAutomationHttpTransport.d.ts.map +1 -0
- package/dist/browser/BrowserAutomationHttpTransport.js +160 -0
- package/dist/browser/BrowserAutomationHttpTransport.js.map +1 -0
- package/dist/browser/BrowserScopeResolver.d.ts +31 -0
- package/dist/browser/BrowserScopeResolver.d.ts.map +1 -0
- package/dist/browser/BrowserScopeResolver.js +31 -0
- package/dist/browser/BrowserScopeResolver.js.map +1 -0
- package/dist/browser/OwnedBrowserCommandService.d.ts +43 -0
- package/dist/browser/OwnedBrowserCommandService.d.ts.map +1 -0
- package/dist/browser/OwnedBrowserCommandService.js +99 -0
- package/dist/browser/OwnedBrowserCommandService.js.map +1 -0
- package/dist/browser/OwnedBrowserSessionRegistry.d.ts +83 -0
- package/dist/browser/OwnedBrowserSessionRegistry.d.ts.map +1 -0
- package/dist/browser/OwnedBrowserSessionRegistry.js +268 -0
- package/dist/browser/OwnedBrowserSessionRegistry.js.map +1 -0
- package/dist/browser/OwnedBrowserSessionService.d.ts +10 -0
- package/dist/browser/OwnedBrowserSessionService.d.ts.map +1 -0
- package/dist/browser/OwnedBrowserSessionService.js +37 -0
- package/dist/browser/OwnedBrowserSessionService.js.map +1 -0
- package/dist/browser/browserFrame.d.ts +12 -0
- package/dist/browser/browserFrame.d.ts.map +1 -0
- package/dist/browser/browserFrame.js +21 -0
- package/dist/browser/browserFrame.js.map +1 -0
- package/dist/cli/CliControlPlaneService.d.ts +12 -1
- package/dist/cli/CliControlPlaneService.d.ts.map +1 -1
- package/dist/cli/CliControlPlaneService.js +164 -15
- package/dist/cli/CliControlPlaneService.js.map +1 -1
- package/dist/cli/CliRemoteAdmissionStore.d.ts +43 -0
- package/dist/cli/CliRemoteAdmissionStore.d.ts.map +1 -0
- package/dist/cli/CliRemoteAdmissionStore.js +56 -0
- package/dist/cli/CliRemoteAdmissionStore.js.map +1 -0
- package/dist/cli/CliSchedulingService.d.ts +19 -0
- package/dist/cli/CliSchedulingService.d.ts.map +1 -0
- package/dist/cli/CliSchedulingService.js +182 -0
- package/dist/cli/CliSchedulingService.js.map +1 -0
- package/dist/cloud/XenoCloudAgentTurnExecutionAdapter.d.ts +3 -0
- package/dist/cloud/XenoCloudAgentTurnExecutionAdapter.d.ts.map +1 -1
- package/dist/cloud/XenoCloudAgentTurnExecutionAdapter.js +9 -3
- package/dist/cloud/XenoCloudAgentTurnExecutionAdapter.js.map +1 -1
- package/dist/codebase/CodebaseIntelligenceService.d.ts.map +1 -1
- package/dist/codebase/CodebaseIntelligenceService.js +9 -173
- package/dist/codebase/CodebaseIntelligenceService.js.map +1 -1
- package/dist/codebase/LanguageServerProcessManager.d.ts +2 -0
- package/dist/codebase/LanguageServerProcessManager.d.ts.map +1 -1
- package/dist/codebase/LanguageServerProcessManager.js +4 -0
- package/dist/codebase/LanguageServerProcessManager.js.map +1 -1
- package/dist/codebase/workspaceEdits.d.ts +7 -0
- package/dist/codebase/workspaceEdits.d.ts.map +1 -0
- package/dist/codebase/workspaceEdits.js +205 -0
- package/dist/codebase/workspaceEdits.js.map +1 -0
- package/dist/coordination/messages.d.ts +1 -1
- package/dist/coordination/messages.d.ts.map +1 -1
- package/dist/coordination/messages.js +3 -0
- package/dist/coordination/messages.js.map +1 -1
- package/dist/engineering/EngineeringWorkbenchService.d.ts +2 -2
- package/dist/engineering/EngineeringWorkbenchService.d.ts.map +1 -1
- package/dist/engineering/EngineeringWorkbenchService.js +40 -14
- package/dist/engineering/EngineeringWorkbenchService.js.map +1 -1
- package/dist/engineering/GitLandingArtifactSource.d.ts +55 -0
- package/dist/engineering/GitLandingArtifactSource.d.ts.map +1 -0
- package/dist/engineering/GitLandingArtifactSource.js +261 -0
- package/dist/engineering/GitLandingArtifactSource.js.map +1 -0
- package/dist/engineering/GitLandingAuthority.d.ts +148 -0
- package/dist/engineering/GitLandingAuthority.d.ts.map +1 -0
- package/dist/engineering/GitLandingAuthority.js +516 -0
- package/dist/engineering/GitLandingAuthority.js.map +1 -0
- package/dist/engineering/LandingService.d.ts +27 -75
- package/dist/engineering/LandingService.d.ts.map +1 -1
- package/dist/engineering/LandingService.js +169 -225
- package/dist/engineering/LandingService.js.map +1 -1
- package/dist/engineering/LandingServicePersistence.d.ts +20 -0
- package/dist/engineering/LandingServicePersistence.d.ts.map +1 -0
- package/dist/engineering/LandingServicePersistence.js +148 -0
- package/dist/engineering/LandingServicePersistence.js.map +1 -0
- package/dist/index.d.ts +198 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +677 -35
- package/dist/index.js.map +1 -1
- package/dist/inference/AuxiliaryInferenceService.d.ts +23 -0
- package/dist/inference/AuxiliaryInferenceService.d.ts.map +1 -0
- package/dist/inference/AuxiliaryInferenceService.js +103 -0
- package/dist/inference/AuxiliaryInferenceService.js.map +1 -0
- package/dist/isolation/CommandExecution.d.ts +26 -3
- package/dist/isolation/CommandExecution.d.ts.map +1 -1
- package/dist/isolation/CommandExecution.js.map +1 -1
- package/dist/isolation/LocalCommandExecutor.d.ts +8 -1
- package/dist/isolation/LocalCommandExecutor.d.ts.map +1 -1
- package/dist/isolation/LocalCommandExecutor.js +92 -6
- package/dist/isolation/LocalCommandExecutor.js.map +1 -1
- package/dist/isolation/SandboxCommandExecutor.d.ts.map +1 -1
- package/dist/isolation/SandboxCommandExecutor.js +2 -0
- package/dist/isolation/SandboxCommandExecutor.js.map +1 -1
- package/dist/knowledge/WorkspaceKnowledgeService.d.ts +7 -2
- package/dist/knowledge/WorkspaceKnowledgeService.d.ts.map +1 -1
- package/dist/knowledge/WorkspaceKnowledgeService.js +91 -40
- package/dist/knowledge/WorkspaceKnowledgeService.js.map +1 -1
- package/dist/lease/ProcessLivenessProber.d.ts +10 -8
- package/dist/lease/ProcessLivenessProber.d.ts.map +1 -1
- package/dist/lease/ProcessLivenessProber.js +36 -51
- package/dist/lease/ProcessLivenessProber.js.map +1 -1
- package/dist/lease/ProviderWriterLeaseService.d.ts +1 -1
- package/dist/lease/ProviderWriterLeaseService.d.ts.map +1 -1
- package/dist/lease/ProviderWriterLeaseService.js +2 -2
- package/dist/lease/ProviderWriterLeaseService.js.map +1 -1
- package/dist/lease/localLeaseMutex.d.ts +5 -0
- package/dist/lease/localLeaseMutex.d.ts.map +1 -0
- package/dist/lease/localLeaseMutex.js +64 -0
- package/dist/lease/localLeaseMutex.js.map +1 -0
- package/dist/localHostLease.d.ts +5 -19
- package/dist/localHostLease.d.ts.map +1 -1
- package/dist/localHostLease.js +126 -125
- package/dist/localHostLease.js.map +1 -1
- package/dist/localRpcTransport.d.ts +1 -0
- package/dist/localRpcTransport.d.ts.map +1 -1
- package/dist/localRpcTransport.js +52 -11
- package/dist/localRpcTransport.js.map +1 -1
- package/dist/node.d.ts +28 -0
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +26 -0
- package/dist/node.js.map +1 -1
- package/dist/notifications/WorkspaceNotificationService.d.ts +74 -0
- package/dist/notifications/WorkspaceNotificationService.d.ts.map +1 -0
- package/dist/notifications/WorkspaceNotificationService.js +480 -0
- package/dist/notifications/WorkspaceNotificationService.js.map +1 -0
- package/dist/notifications/notificationDestinationOperationState.d.ts +19 -0
- package/dist/notifications/notificationDestinationOperationState.d.ts.map +1 -0
- package/dist/notifications/notificationDestinationOperationState.js +58 -0
- package/dist/notifications/notificationDestinationOperationState.js.map +1 -0
- package/dist/provider/ProviderLaneService.d.ts +2 -0
- package/dist/provider/ProviderLaneService.d.ts.map +1 -1
- package/dist/provider/ProviderLaneService.js +92 -28
- package/dist/provider/ProviderLaneService.js.map +1 -1
- package/dist/sdk/SdkExecutionSettlementRegistry.d.ts +43 -0
- package/dist/sdk/SdkExecutionSettlementRegistry.d.ts.map +1 -0
- package/dist/sdk/SdkExecutionSettlementRegistry.js +88 -0
- package/dist/sdk/SdkExecutionSettlementRegistry.js.map +1 -0
- package/dist/sdk/SdkNativeAgentTurnExecutionAdapter.d.ts +21 -1
- package/dist/sdk/SdkNativeAgentTurnExecutionAdapter.d.ts.map +1 -1
- package/dist/sdk/SdkNativeAgentTurnExecutionAdapter.js +18 -4
- package/dist/sdk/SdkNativeAgentTurnExecutionAdapter.js.map +1 -1
- package/dist/state/JsonAgentStateRepository.d.ts.map +1 -1
- package/dist/state/JsonAgentStateRepository.js +24 -1
- package/dist/state/JsonAgentStateRepository.js.map +1 -1
- package/dist/state/ScopedAuditService.d.ts +9 -0
- package/dist/state/ScopedAuditService.d.ts.map +1 -0
- package/dist/state/ScopedAuditService.js +137 -0
- package/dist/state/ScopedAuditService.js.map +1 -0
- package/dist/state/ScopedBackupService.d.ts +26 -0
- package/dist/state/ScopedBackupService.d.ts.map +1 -0
- package/dist/state/ScopedBackupService.js +203 -0
- package/dist/state/ScopedBackupService.js.map +1 -0
- package/dist/state/ScopedUsageService.d.ts +9 -0
- package/dist/state/ScopedUsageService.d.ts.map +1 -0
- package/dist/state/ScopedUsageService.js +171 -0
- package/dist/state/ScopedUsageService.js.map +1 -0
- package/dist/state/SqliteAgentStateRepository.d.ts +132 -0
- package/dist/state/SqliteAgentStateRepository.d.ts.map +1 -1
- package/dist/state/SqliteAgentStateRepository.js +976 -19
- package/dist/state/SqliteAgentStateRepository.js.map +1 -1
- package/dist/state/SqliteWorkspaceKnowledgeStore.d.ts +19 -0
- package/dist/state/SqliteWorkspaceKnowledgeStore.d.ts.map +1 -0
- package/dist/state/SqliteWorkspaceKnowledgeStore.js +29 -0
- package/dist/state/SqliteWorkspaceKnowledgeStore.js.map +1 -0
- package/dist/state/WorkspaceEnvironmentService.d.ts +24 -0
- package/dist/state/WorkspaceEnvironmentService.d.ts.map +1 -0
- package/dist/state/WorkspaceEnvironmentService.js +150 -0
- package/dist/state/WorkspaceEnvironmentService.js.map +1 -0
- package/dist/state/WorkspaceLifecycleService.d.ts +10 -0
- package/dist/state/WorkspaceLifecycleService.d.ts.map +1 -0
- package/dist/state/WorkspaceLifecycleService.js +28 -0
- package/dist/state/WorkspaceLifecycleService.js.map +1 -0
- package/dist/state/WorkspaceRulesService.d.ts +36 -0
- package/dist/state/WorkspaceRulesService.d.ts.map +1 -0
- package/dist/state/WorkspaceRulesService.js +135 -0
- package/dist/state/WorkspaceRulesService.js.map +1 -0
- package/dist/state/scopedBackupProjection.d.ts +21 -0
- package/dist/state/scopedBackupProjection.d.ts.map +1 -0
- package/dist/state/scopedBackupProjection.js +102 -0
- package/dist/state/scopedBackupProjection.js.map +1 -0
- package/dist/state/sdkProtectedStateCipher.d.ts +1 -0
- package/dist/state/sdkProtectedStateCipher.d.ts.map +1 -1
- package/dist/state/sdkProtectedStateCipher.js +9 -3
- package/dist/state/sdkProtectedStateCipher.js.map +1 -1
- package/dist/state/sqliteContention.d.ts +5 -0
- package/dist/state/sqliteContention.d.ts.map +1 -0
- package/dist/state/sqliteContention.js +21 -0
- package/dist/state/sqliteContention.js.map +1 -0
- package/dist/state/stateSanitizers.d.ts.map +1 -1
- package/dist/state/stateSanitizers.js +22 -20
- package/dist/state/stateSanitizers.js.map +1 -1
- package/dist/state/workspaceAdmission.d.ts +31 -0
- package/dist/state/workspaceAdmission.d.ts.map +1 -0
- package/dist/state/workspaceAdmission.js +27 -0
- package/dist/state/workspaceAdmission.js.map +1 -0
- package/dist/state/workspaceCoordinationFence.d.ts +26 -0
- package/dist/state/workspaceCoordinationFence.d.ts.map +1 -0
- package/dist/state/workspaceCoordinationFence.js +56 -0
- package/dist/state/workspaceCoordinationFence.js.map +1 -0
- package/dist/state/workspaceEnvironmentProjection.d.ts +3 -0
- package/dist/state/workspaceEnvironmentProjection.d.ts.map +1 -0
- package/dist/state/workspaceEnvironmentProjection.js +27 -0
- package/dist/state/workspaceEnvironmentProjection.js.map +1 -0
- package/dist/state/workspaceLifecycle.d.ts +29 -0
- package/dist/state/workspaceLifecycle.d.ts.map +1 -0
- package/dist/state/workspaceLifecycle.js +129 -0
- package/dist/state/workspaceLifecycle.js.map +1 -0
- package/dist/subagents/CliSubagentExecutionAdapter.d.ts +1 -0
- package/dist/subagents/CliSubagentExecutionAdapter.d.ts.map +1 -1
- package/dist/subagents/CliSubagentExecutionAdapter.js +74 -19
- package/dist/subagents/CliSubagentExecutionAdapter.js.map +1 -1
- package/dist/subagents/CliSubagentRecoveryAdapter.d.ts +9 -0
- package/dist/subagents/CliSubagentRecoveryAdapter.d.ts.map +1 -0
- package/dist/subagents/CliSubagentRecoveryAdapter.js +31 -0
- package/dist/subagents/CliSubagentRecoveryAdapter.js.map +1 -0
- package/dist/subagents/HostTurnSubagentExecutionAdapter.d.ts +8 -0
- package/dist/subagents/HostTurnSubagentExecutionAdapter.d.ts.map +1 -1
- package/dist/subagents/HostTurnSubagentExecutionAdapter.js +67 -1
- package/dist/subagents/HostTurnSubagentExecutionAdapter.js.map +1 -1
- package/dist/subagents/SubagentRunService.d.ts +23 -0
- package/dist/subagents/SubagentRunService.d.ts.map +1 -1
- package/dist/subagents/SubagentRunService.js +102 -8
- package/dist/subagents/SubagentRunService.js.map +1 -1
- package/dist/subagents/SubagentScheduler.d.ts +28 -0
- package/dist/subagents/SubagentScheduler.d.ts.map +1 -1
- package/dist/subagents/SubagentScheduler.js +106 -2
- package/dist/subagents/SubagentScheduler.js.map +1 -1
- package/dist/subagents/subagentExecutionOwnership.d.ts +21 -0
- package/dist/subagents/subagentExecutionOwnership.d.ts.map +1 -0
- package/dist/subagents/subagentExecutionOwnership.js +26 -0
- package/dist/subagents/subagentExecutionOwnership.js.map +1 -0
- package/dist/subagents/subagentRunPort.d.ts +17 -0
- package/dist/subagents/subagentRunPort.d.ts.map +1 -1
- package/dist/subagents/subagentRunPort.js +4 -2
- package/dist/subagents/subagentRunPort.js.map +1 -1
- package/dist/subagents/subagentTypes.d.ts +7 -0
- package/dist/subagents/subagentTypes.d.ts.map +1 -1
- package/dist/turns/DurableInterruptedTurnStore.d.ts.map +1 -1
- package/dist/turns/DurableInterruptedTurnStore.js +48 -35
- package/dist/turns/DurableInterruptedTurnStore.js.map +1 -1
- package/dist/turns/persistedToolPolicy.d.ts +7 -0
- package/dist/turns/persistedToolPolicy.d.ts.map +1 -0
- package/dist/turns/persistedToolPolicy.js +25 -0
- package/dist/turns/persistedToolPolicy.js.map +1 -0
- package/dist/turns/reasoningSelection.d.ts +4 -0
- package/dist/turns/reasoningSelection.d.ts.map +1 -0
- package/dist/turns/reasoningSelection.js +20 -0
- package/dist/turns/reasoningSelection.js.map +1 -0
- package/dist/turns/toolCategoryAdmission.d.ts +5 -0
- package/dist/turns/toolCategoryAdmission.d.ts.map +1 -0
- package/dist/turns/toolCategoryAdmission.js +24 -0
- package/dist/turns/toolCategoryAdmission.js.map +1 -0
- package/dist/turns/workspaceExecutionScope.d.ts +10 -0
- package/dist/turns/workspaceExecutionScope.d.ts.map +1 -0
- package/dist/turns/workspaceExecutionScope.js +47 -0
- package/dist/turns/workspaceExecutionScope.js.map +1 -0
- package/dist/workspace/WorkspaceHostService.d.ts +12 -2
- package/dist/workspace/WorkspaceHostService.d.ts.map +1 -1
- package/dist/workspace/WorkspaceHostService.js +108 -19
- package/dist/workspace/WorkspaceHostService.js.map +1 -1
- package/dist/workspace/readWorkspaceText.d.ts +8 -0
- package/dist/workspace/readWorkspaceText.d.ts.map +1 -0
- package/dist/workspace/readWorkspaceText.js +46 -0
- package/dist/workspace/readWorkspaceText.js.map +1 -0
- package/dist/workspace/windowsWorkspaceText.d.ts +18 -0
- package/dist/workspace/windowsWorkspaceText.d.ts.map +1 -0
- package/dist/workspace/windowsWorkspaceText.js +188 -0
- package/dist/workspace/windowsWorkspaceText.js.map +1 -0
- package/dist/workspace/writeWorkspaceText.d.ts +20 -0
- package/dist/workspace/writeWorkspaceText.d.ts.map +1 -0
- package/dist/workspace/writeWorkspaceText.js +185 -0
- package/dist/workspace/writeWorkspaceText.js.map +1 -0
- package/package.json +16 -7
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { generateKeyPairSync } from 'node:crypto';
|
|
2
|
+
import { isAbsolute, join } from 'node:path';
|
|
3
|
+
import { createCanonicalAccountPort } from './canonicalAccountPort.js';
|
|
4
|
+
import { AccountWorkerError, ACCOUNT_WORKER_METHODS, validateAccountWorkerConfiguration } from './accountWorkerProtocol.js';
|
|
5
|
+
const NAMESPACE = 'ai.xenostudio.xeno-agent-interface.account';
|
|
6
|
+
const DPOP_KEY = 'xeno.account/xeno-agent-interface/dpop-v1';
|
|
7
|
+
const TOKEN_KEYS = new Set(['xeno.account/xeno-agent-interface/refresh', 'xeno.account/xeno-agent-interface/refresh-uncertain']);
|
|
8
|
+
async function loadModules() {
|
|
9
|
+
const accountName = '@xeno-corporation/account';
|
|
10
|
+
const nodeName = '@xeno-corporation/account/node';
|
|
11
|
+
const stateName = '@xenosystem/agent-sdk';
|
|
12
|
+
const [account, node, protectedState] = await Promise.all([import(accountName), import(nodeName), import(stateName)]);
|
|
13
|
+
return { account, node, protectedState };
|
|
14
|
+
}
|
|
15
|
+
/** Called only inside the dedicated process worker. Keys and synchronous OS
|
|
16
|
+
* operations deliberately never become collaborators in the desktop process. */
|
|
17
|
+
export async function createAccountWorkerRuntime(configuration, load = loadModules) {
|
|
18
|
+
validateAccountWorkerConfiguration(configuration);
|
|
19
|
+
if (!isAbsolute(configuration.protectedStateRoot))
|
|
20
|
+
throw new AccountWorkerError('UNAVAILABLE');
|
|
21
|
+
const modules = await load();
|
|
22
|
+
const contract = modules.account.ACCOUNT_SDK_CONTRACT;
|
|
23
|
+
if (contract?.version !== 1 || contract.workspaceAuthority !== 1 || contract.requestBoundAuthorization !== 1 || contract.serializedRefresh !== 1
|
|
24
|
+
|| typeof modules.account.memoryStore !== 'function' || typeof modules.account.keychainStore !== 'function' || typeof modules.node.createNodeDpopSigner !== 'function' || typeof modules.node.startNativeSignIn !== 'function'
|
|
25
|
+
|| typeof modules.protectedState.createOsProtectedStateStore !== 'function')
|
|
26
|
+
throw new AccountWorkerError('UNAVAILABLE');
|
|
27
|
+
const protectedStore = modules.protectedState.createOsProtectedStateStore({ serviceName: NAMESPACE, storageDir: join(configuration.protectedStateRoot, 'secure', 'standalone-account') });
|
|
28
|
+
let store;
|
|
29
|
+
let jwk;
|
|
30
|
+
let persistence;
|
|
31
|
+
const createJwk = () => JSON.stringify(generateKeyPairSync('ec', { namedCurve: 'prime256v1' }).privateKey.export({ format: 'jwk' }));
|
|
32
|
+
if (!protectedStore.available) {
|
|
33
|
+
if (configuration.persistencePolicy !== 'allow-session-only')
|
|
34
|
+
throw new AccountWorkerError('UNAVAILABLE');
|
|
35
|
+
store = modules.account.memoryStore();
|
|
36
|
+
jwk = createJwk();
|
|
37
|
+
persistence = 'session-only';
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
// An older or insufficient store is not "unavailable secure hardware" and
|
|
41
|
+
// must not silently downgrade a previously protected identity to memory.
|
|
42
|
+
if (protectedStore.writeContract !== 'windows-replace-file-flush-v1' || !protectedStore.setBytesIfAbsent)
|
|
43
|
+
throw new AccountWorkerError('UNAVAILABLE');
|
|
44
|
+
let bytes = protectedStore.getBytes(DPOP_KEY);
|
|
45
|
+
if (bytes === null) {
|
|
46
|
+
const generated = Buffer.from(createJwk(), 'utf8');
|
|
47
|
+
try {
|
|
48
|
+
protectedStore.setBytesIfAbsent(DPOP_KEY, generated);
|
|
49
|
+
}
|
|
50
|
+
finally {
|
|
51
|
+
generated.fill(0);
|
|
52
|
+
}
|
|
53
|
+
bytes = protectedStore.getBytes(DPOP_KEY);
|
|
54
|
+
}
|
|
55
|
+
if (!bytes || bytes.byteLength > 4096)
|
|
56
|
+
throw new AccountWorkerError('UNAVAILABLE');
|
|
57
|
+
try {
|
|
58
|
+
jwk = new TextDecoder('utf-8', { fatal: true }).decode(bytes);
|
|
59
|
+
}
|
|
60
|
+
finally {
|
|
61
|
+
bytes.fill(0);
|
|
62
|
+
}
|
|
63
|
+
const assertKey = (key) => { if (!TOKEN_KEYS.has(key))
|
|
64
|
+
throw new AccountWorkerError('REFUSED'); };
|
|
65
|
+
store = modules.account.keychainStore({
|
|
66
|
+
get(key) { assertKey(key); return protectedStore.get(key); },
|
|
67
|
+
set(key, value) { assertKey(key); if (typeof value !== 'string' || value.length > 65_536)
|
|
68
|
+
throw new AccountWorkerError('REFUSED'); protectedStore.set(key, value); },
|
|
69
|
+
delete(key) { assertKey(key); protectedStore.delete(key); },
|
|
70
|
+
});
|
|
71
|
+
persistence = 'protected';
|
|
72
|
+
}
|
|
73
|
+
const signer = modules.node.createNodeDpopSigner(jwk);
|
|
74
|
+
jwk = '';
|
|
75
|
+
const port = await createCanonicalAccountPort({ clientId: configuration.clientId, issuer: configuration.issuer, apiBase: configuration.apiBase, scopes: configuration.scopes, persistence, dpopSigner: signer, store }, async () => modules.account);
|
|
76
|
+
if (!port)
|
|
77
|
+
throw new AccountWorkerError('UNAVAILABLE');
|
|
78
|
+
let closed = false;
|
|
79
|
+
let flow;
|
|
80
|
+
let flowFailed = false;
|
|
81
|
+
return {
|
|
82
|
+
capabilities: { persistence, ...(port.workforceOwnedCatalog === 1 ? { workforceOwnedCatalog: 1 } : {}), workforceResourceOperations: port.workforceResourceOperations === 1, ...(port.workforceActorBinding === 2 ? { workforceActorBinding: 2 } : {}), workspaceKeyAuthority: port.workspaceKeyAuthority === true, workspaceKeyOperations: port.workspaceKeyOperations === 1, workspaceMembershipOperations: port.workspaceMembershipOperations === 1, workspaceOperationAbandonment: port.workspaceOperationAbandonment === 1, accountOperations: port.accountOperations === 1, accountIntegrations: port.accountIntegrations === 1, notificationAuthority: port.notificationAuthority === 1, notificationDestinationOperations: port.notificationDestinationOperations === 1, collaborationAuthority: port.collaborationAuthority === 1 },
|
|
83
|
+
async invoke(method, args) {
|
|
84
|
+
if (closed)
|
|
85
|
+
throw new AccountWorkerError('CLOSED');
|
|
86
|
+
if (!ACCOUNT_WORKER_METHODS.includes(method) || !Array.isArray(args) || args.length > 4 || JSON.stringify(args).length > 262_144)
|
|
87
|
+
throw new AccountWorkerError('REFUSED');
|
|
88
|
+
if (method === 'workforce.listOwnedResources' && (port.workforceOwnedCatalog !== 1 || args.length !== 1 || !configuration.scopes.includes('workforce:read')
|
|
89
|
+
|| !args[0] || typeof args[0] !== 'object' || !Object.hasOwn(args[0], 'expectedActorAccountId')))
|
|
90
|
+
throw new AccountWorkerError('REFUSED');
|
|
91
|
+
if (method.startsWith('workforce.') && method !== 'workforce.listOwnedResources' && (port.workforceResourceOperations !== 1 || args.length !== 1
|
|
92
|
+
|| !configuration.scopes.includes(method === 'workforce.createResource' ? 'workforce:manage' : 'workforce:read')))
|
|
93
|
+
throw new AccountWorkerError('REFUSED');
|
|
94
|
+
if (method.startsWith('workforce.') && method !== 'workforce.listOwnedResources' && args[0] && typeof args[0] === 'object'
|
|
95
|
+
&& Object.hasOwn(args[0], 'expectedActorAccountId') && port.workforceActorBinding !== 2)
|
|
96
|
+
throw new AccountWorkerError('REFUSED');
|
|
97
|
+
if ((method === 'workspaces.mutateKey' || method === 'workspaces.keyOperation') && port.workspaceKeyOperations !== 1)
|
|
98
|
+
throw new AccountWorkerError('REFUSED');
|
|
99
|
+
if ((method === 'workspaces.mutateMembership' || method === 'workspaces.membershipOperation') && port.workspaceMembershipOperations !== 1)
|
|
100
|
+
throw new AccountWorkerError('REFUSED');
|
|
101
|
+
if ((method === 'workspaces.abandonKeyOperation' || method === 'workspaces.abandonMembershipOperation') && port.workspaceOperationAbandonment !== 1)
|
|
102
|
+
throw new AccountWorkerError('REFUSED');
|
|
103
|
+
if ((method === 'workspaces.mutateAccount' || method === 'workspaces.accountOperation' || method === 'workspaces.pendingInvites') && port.accountOperations !== 1)
|
|
104
|
+
throw new AccountWorkerError('REFUSED');
|
|
105
|
+
if (method.startsWith('integrations.') && port.accountIntegrations !== 1)
|
|
106
|
+
throw new AccountWorkerError('REFUSED');
|
|
107
|
+
if (method.includes('DestinationOperation') && port.notificationDestinationOperations !== 1)
|
|
108
|
+
throw new AccountWorkerError('REFUSED');
|
|
109
|
+
if (method.startsWith('collaboration.') && port.collaborationAuthority !== 1)
|
|
110
|
+
throw new AccountWorkerError('REFUSED');
|
|
111
|
+
if (method === 'signIn.begin') {
|
|
112
|
+
if (!flow || flow.state() === 'settled') {
|
|
113
|
+
const next = await modules.node.startNativeSignIn(port.client, { scopes: [...configuration.scopes] });
|
|
114
|
+
const url = new URL(next.authorizationUrl);
|
|
115
|
+
if (url.origin !== configuration.issuer || url.username || url.password || !Number.isFinite(next.expiresAt.getTime())) {
|
|
116
|
+
next.cancel();
|
|
117
|
+
throw new AccountWorkerError('REFUSED');
|
|
118
|
+
}
|
|
119
|
+
flow = next;
|
|
120
|
+
flowFailed = false;
|
|
121
|
+
void next.completion.catch(() => { if (flow === next)
|
|
122
|
+
flowFailed = true; });
|
|
123
|
+
}
|
|
124
|
+
return { authorizationUrl: flow.authorizationUrl, expiresAt: flow.expiresAt.toISOString(), phase: flow.state() };
|
|
125
|
+
}
|
|
126
|
+
if (method === 'signIn.status')
|
|
127
|
+
return { phase: flow?.state() ?? 'none', failed: flowFailed };
|
|
128
|
+
if (method === 'signIn.cancel') {
|
|
129
|
+
if (!flow)
|
|
130
|
+
return true;
|
|
131
|
+
if (!flow.cancel())
|
|
132
|
+
return false;
|
|
133
|
+
await flow.completion.catch(() => { });
|
|
134
|
+
flow = undefined;
|
|
135
|
+
flowFailed = false;
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
if (method === 'signOut' || method === 'signOutLocal')
|
|
139
|
+
flow?.cancel();
|
|
140
|
+
if (method === 'identity') {
|
|
141
|
+
const auth = await port.client.authorization('GET', `${configuration.issuer}/api/v2/me`, { scopes: ['openid'], silent: true });
|
|
142
|
+
if (!auth)
|
|
143
|
+
return null;
|
|
144
|
+
const value = await port.client.account.me(auth);
|
|
145
|
+
return { id: value.id, email: value.email, displayName: value.displayName ?? null };
|
|
146
|
+
}
|
|
147
|
+
const [group, name] = method.split('.');
|
|
148
|
+
const receiver = name ? group === 'workforce' ? port.client.workforce : group === 'workspaces' ? port.client.workspaces : group === 'integrations' ? port.client.integrations : group === 'notifications' ? port.client.notifications : group === 'collaboration' ? port.collaboration : undefined : port.client;
|
|
149
|
+
const callable = receiver?.[name ?? group];
|
|
150
|
+
if (typeof callable !== 'function')
|
|
151
|
+
throw new AccountWorkerError('REFUSED');
|
|
152
|
+
if (group === 'workforce') {
|
|
153
|
+
try {
|
|
154
|
+
return await callable.apply(receiver, args);
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
// Keep recovery semantics without forwarding provider messages, tokens
|
|
158
|
+
// or arbitrary SDK error properties. Host retains the original request
|
|
159
|
+
// identity and must explicitly read that operation before retrying.
|
|
160
|
+
const failure = error;
|
|
161
|
+
if (failure?.name === 'WorkforceResourceMutationError' && failure.outcome === 'uncertain'
|
|
162
|
+
&& failure.source === 'client-observation')
|
|
163
|
+
throw new AccountWorkerError('UNCERTAIN');
|
|
164
|
+
throw error;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return callable.apply(receiver, args);
|
|
168
|
+
},
|
|
169
|
+
close() { closed = true; flow?.cancel(); },
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=accountWorkerRuntime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountWorkerRuntime.js","sourceRoot":"","sources":["../../src/account/accountWorkerRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,0BAA0B,EAA6B,MAAM,2BAA2B,CAAA;AACjG,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,kCAAkC,EAAuE,MAAM,4BAA4B,CAAA;AAEhM,MAAM,SAAS,GAAG,4CAA4C,CAAA;AAC9D,MAAM,QAAQ,GAAG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AgC,IAAI,OAAO,CAAC,OAAO,KAAK,WAAW;2BACpF,OAAO,CAAC,MAAM,KAAK,oBAAoB;wBAAE,MAAM,IAAI,kBAAkB,CAAC,WAAW,CAAC,CAAA;oBACvF,MAAM,KAAK,CAAA;gBACb,CAAC;YACH,CAAC;YACD,OAAQ,QAAuD,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;QACvF,CAAC;QACD,KAAK,KAAK,MAAM,GAAG,IAAI,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,CAAA,CAAC,CAAC;KAC1C,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { CanonicalWorkforceCreateResourceInput } from './canonicalAccountPort.js';
|
|
3
|
+
declare const receiptSchema: z.ZodObject<{
|
|
4
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
5
|
+
operationId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
6
|
+
action: z.ZodLiteral<"agent.resource.create">;
|
|
7
|
+
state: z.ZodLiteral<"committed">;
|
|
8
|
+
owner: z.ZodObject<{
|
|
9
|
+
type: z.ZodEnum<{
|
|
10
|
+
workspace: "workspace";
|
|
11
|
+
user: "user";
|
|
12
|
+
}>;
|
|
13
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
resourceId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
16
|
+
resourceRevision: z.ZodString;
|
|
17
|
+
agentVersion: z.ZodNullable<z.ZodNumber>;
|
|
18
|
+
committedAt: z.ZodString;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
declare const recordSchema: z.ZodObject<{
|
|
21
|
+
version: z.ZodLiteral<1>;
|
|
22
|
+
operationId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
23
|
+
expectedAccountId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
24
|
+
expectedClientId: z.ZodString;
|
|
25
|
+
requestHash: z.ZodString;
|
|
26
|
+
request: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
27
|
+
kind: z.ZodLiteral<"team">;
|
|
28
|
+
operationId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
29
|
+
owner: z.ZodObject<{
|
|
30
|
+
type: z.ZodEnum<{
|
|
31
|
+
workspace: "workspace";
|
|
32
|
+
user: "user";
|
|
33
|
+
}>;
|
|
34
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
expectedActorAccountId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
37
|
+
name: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
38
|
+
description: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
40
|
+
kind: z.ZodLiteral<"agent">;
|
|
41
|
+
definition: z.ZodObject<{
|
|
42
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
43
|
+
instructions: z.ZodString;
|
|
44
|
+
skills: z.ZodArray<z.ZodObject<{
|
|
45
|
+
id: z.ZodString;
|
|
46
|
+
version: z.ZodString;
|
|
47
|
+
hash: z.ZodString;
|
|
48
|
+
}, z.core.$strict>>;
|
|
49
|
+
requestedCapabilities: z.ZodArray<z.ZodString>;
|
|
50
|
+
secretReferences: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
51
|
+
name: z.ZodString;
|
|
52
|
+
ref: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
53
|
+
}, z.core.$strict>>>;
|
|
54
|
+
provenance: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
source: z.ZodEnum<{
|
|
56
|
+
authored: "authored";
|
|
57
|
+
imported: "imported";
|
|
58
|
+
}>;
|
|
59
|
+
sourceVersion: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, z.core.$strict>>;
|
|
61
|
+
license: z.ZodOptional<z.ZodObject<{
|
|
62
|
+
identifier: z.ZodString;
|
|
63
|
+
}, z.core.$strict>>;
|
|
64
|
+
}, z.core.$strict>;
|
|
65
|
+
operationId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
66
|
+
owner: z.ZodObject<{
|
|
67
|
+
type: z.ZodEnum<{
|
|
68
|
+
workspace: "workspace";
|
|
69
|
+
user: "user";
|
|
70
|
+
}>;
|
|
71
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
72
|
+
}, z.core.$strict>;
|
|
73
|
+
expectedActorAccountId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
74
|
+
name: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
75
|
+
description: z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, z.core.$strict>], "kind">;
|
|
77
|
+
state: z.ZodEnum<{
|
|
78
|
+
rejected: "rejected";
|
|
79
|
+
cancelled: "cancelled";
|
|
80
|
+
dispatched: "dispatched";
|
|
81
|
+
committed: "committed";
|
|
82
|
+
uncertain: "uncertain";
|
|
83
|
+
prepared: "prepared";
|
|
84
|
+
}>;
|
|
85
|
+
dispatchCount: z.ZodNumber;
|
|
86
|
+
createdAt: z.ZodString;
|
|
87
|
+
updatedAt: z.ZodString;
|
|
88
|
+
receipt: z.ZodOptional<z.ZodObject<{
|
|
89
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
90
|
+
operationId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
91
|
+
action: z.ZodLiteral<"agent.resource.create">;
|
|
92
|
+
state: z.ZodLiteral<"committed">;
|
|
93
|
+
owner: z.ZodObject<{
|
|
94
|
+
type: z.ZodEnum<{
|
|
95
|
+
workspace: "workspace";
|
|
96
|
+
user: "user";
|
|
97
|
+
}>;
|
|
98
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
99
|
+
}, z.core.$strict>;
|
|
100
|
+
resourceId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
101
|
+
resourceRevision: z.ZodString;
|
|
102
|
+
agentVersion: z.ZodNullable<z.ZodNumber>;
|
|
103
|
+
committedAt: z.ZodString;
|
|
104
|
+
}, z.core.$strict>>;
|
|
105
|
+
}, z.core.$strict>;
|
|
106
|
+
export interface WorkforceAccountSnapshot {
|
|
107
|
+
accountId: string;
|
|
108
|
+
clientId: string;
|
|
109
|
+
generation: string;
|
|
110
|
+
}
|
|
111
|
+
export type WorkforceResourceOperationRecord = z.infer<typeof recordSchema>;
|
|
112
|
+
export type WorkforceResourceReceipt = z.infer<typeof receiptSchema>;
|
|
113
|
+
export interface WorkforceResourceOperationRepository {
|
|
114
|
+
readWorkforceResourceOperation(operationId: string): string | null;
|
|
115
|
+
writeWorkforceResourceOperation(input: {
|
|
116
|
+
operationId: string;
|
|
117
|
+
expectedValue: string | null;
|
|
118
|
+
value: string;
|
|
119
|
+
}): Promise<boolean>;
|
|
120
|
+
}
|
|
121
|
+
export interface WorkforceResourcePrepareInput {
|
|
122
|
+
expectedAccountId: string;
|
|
123
|
+
expectedClientId: string;
|
|
124
|
+
request: CanonicalWorkforceCreateResourceInput;
|
|
125
|
+
}
|
|
126
|
+
export declare const workforceRequestHash: (value: CanonicalWorkforceCreateResourceInput) => string;
|
|
127
|
+
export declare const parseWorkforcePrepareInput: (value: unknown) => WorkforceResourcePrepareInput;
|
|
128
|
+
export declare const parseWorkforceOperationId: (value: unknown) => string;
|
|
129
|
+
export declare function parseWorkforceReceipt(value: unknown, record: WorkforceResourceOperationRecord): WorkforceResourceReceipt;
|
|
130
|
+
export declare function parseWorkforceResourceOperationRecord(raw: string): WorkforceResourceOperationRecord;
|
|
131
|
+
export declare function isWorkforceResourceOperationRecord(value: unknown): value is WorkforceResourceOperationRecord;
|
|
132
|
+
/** Only the bounded committed receipt leaves this projection; definitions and
|
|
133
|
+
* server payloads never become local operation output or persisted receipts. */
|
|
134
|
+
export declare function projectWorkforceRemoteResult(value: unknown, record: WorkforceResourceOperationRecord): {
|
|
135
|
+
state: 'committed';
|
|
136
|
+
receipt: WorkforceResourceReceipt;
|
|
137
|
+
} | {
|
|
138
|
+
state: 'not-observed';
|
|
139
|
+
};
|
|
140
|
+
export {};
|
|
141
|
+
//# sourceMappingURL=accountWorkforceOperationState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountWorkforceOperationState.d.ts","sourceRoot":"","sources":["../../src/account/accountWorkforceOperationState.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,2BAA2B,CAAA;AAyBtF,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;kBAIR,CAAA;AACX,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAMP,CAAA;AAEX,MAAM,WAAW,wBAAwB;IAAG,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE;AACrG,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAC3E,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AACpE,MAAM,WAAW,oCAAoC;IACnD,8BAA8B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAClE,+BAA+B,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CAC/H;AACD,MAAM,WAAW,6BAA6B;IAC5C,iBAAiB,EAAE,MAAM,CAAA;IACzB,gBAAgB,EAAE,MAAM,CAAA;IACxB,OAAO,EAAE,qCAAqC,CAAA;CAC/C;AAgCD,eAAO,MAAM,oBAAoB,GAAI,OAAO,qCAAqC,KAAG,MAAqF,CAAA;AACzK,eAAO,MAAM,0BAA0B,GAAI,OAAO,OAAO,KAAG,6BAI3D,CAAA;AACD,eAAO,MAAM,yBAAyB,GAAI,OAAO,OAAO,KAAG,MAA4B,CAAA;AACvF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,gCAAgC,GAAG,wBAAwB,CAKxH;AACD,wBAAgB,qCAAqC,CAAC,GAAG,EAAE,MAAM,GAAG,gCAAgC,CAUnG;AACD,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gCAAgC,CAE5G;AAED;gFACgF;AAChF,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,gCAAgC,GAAG;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,wBAAwB,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,cAAc,CAAA;CAAE,CAqB5L"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
const uuid = z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i).transform(value => value.toLowerCase());
|
|
4
|
+
const clientId = z.string().regex(/^[a-zA-Z0-9._-]{1,128}$/);
|
|
5
|
+
const timestamp = z.string().datetime({ offset: true });
|
|
6
|
+
const hash = z.string().regex(/^[a-f0-9]{64}$/);
|
|
7
|
+
const identifier = z.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9._:/@+-]{0,127}$/);
|
|
8
|
+
const text = (max, empty = false) => z.string().max(max).refine(value => !value.includes('\0') && (empty || Boolean(value.trim())) && Buffer.byteLength(value, 'utf8') <= max);
|
|
9
|
+
const ownerSchema = z.object({ type: z.enum(['user', 'workspace']), id: uuid }).strict();
|
|
10
|
+
const unique = (items, key) => new Set(items.map(key)).size === items.length;
|
|
11
|
+
const definitionSchema = z.object({
|
|
12
|
+
schemaVersion: z.literal(1), instructions: text(32768, true),
|
|
13
|
+
skills: z.array(z.object({ id: identifier, version: identifier, hash }).strict()).max(64).refine(items => unique(items, item => item.id)),
|
|
14
|
+
requestedCapabilities: z.array(identifier).max(64).refine(items => unique(items, item => item)),
|
|
15
|
+
secretReferences: z.array(z.object({ name: z.string().regex(/^[A-Z][A-Z0-9_]{0,63}$/), ref: uuid }).strict()).max(32).refine(items => unique(items, item => item.name)).optional(),
|
|
16
|
+
provenance: z.object({ source: z.enum(['authored', 'imported']), sourceVersion: identifier.optional() }).strict().optional(),
|
|
17
|
+
license: z.object({ identifier }).strict().optional(),
|
|
18
|
+
}).strict();
|
|
19
|
+
const base = { operationId: uuid, owner: ownerSchema, expectedActorAccountId: uuid.optional(), name: text(200).transform(value => value.trim()), description: text(4096, true).optional() };
|
|
20
|
+
const requestSchema = z.discriminatedUnion('kind', [
|
|
21
|
+
z.object({ ...base, kind: z.literal('team') }).strict(),
|
|
22
|
+
z.object({ ...base, kind: z.literal('agent'), definition: definitionSchema }).strict(),
|
|
23
|
+
]);
|
|
24
|
+
const prepareSchema = z.object({ expectedAccountId: uuid, expectedClientId: clientId, request: requestSchema }).strict();
|
|
25
|
+
const revision = z.string().max(19).regex(/^[1-9][0-9]*$/).refine(value => BigInt(value) <= 9223372036854775807n);
|
|
26
|
+
const receiptSchema = z.object({
|
|
27
|
+
schemaVersion: z.literal(1), operationId: uuid, action: z.literal('agent.resource.create'), state: z.literal('committed'),
|
|
28
|
+
owner: ownerSchema, resourceId: uuid, resourceRevision: revision,
|
|
29
|
+
agentVersion: z.number().int().positive().max(2147483647).nullable(), committedAt: timestamp,
|
|
30
|
+
}).strict();
|
|
31
|
+
const recordSchema = z.object({
|
|
32
|
+
version: z.literal(1), operationId: uuid, expectedAccountId: uuid, expectedClientId: clientId,
|
|
33
|
+
requestHash: hash, request: requestSchema,
|
|
34
|
+
state: z.enum(['prepared', 'dispatched', 'uncertain', 'committed', 'rejected', 'cancelled']),
|
|
35
|
+
dispatchCount: z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
|
|
36
|
+
createdAt: timestamp, updatedAt: timestamp, receipt: receiptSchema.optional(),
|
|
37
|
+
}).strict();
|
|
38
|
+
/** Validate data descriptors before schemas read values: no accessors, sparse
|
|
39
|
+
* arrays, inherited fields or token-bearing extras get snapshotted. This is a
|
|
40
|
+
* host-private structural contract, not a replacement account transport. */
|
|
41
|
+
function assertData(value, depth = 0, budget = { left: 4096 }) {
|
|
42
|
+
if (--budget.left < 0 || depth > 12)
|
|
43
|
+
throw new Error('Invalid workforce journal data');
|
|
44
|
+
if (value === null || ['string', 'boolean', 'number'].includes(typeof value))
|
|
45
|
+
return;
|
|
46
|
+
if (!value || typeof value !== 'object')
|
|
47
|
+
throw new Error('Invalid workforce journal data');
|
|
48
|
+
const array = Array.isArray(value);
|
|
49
|
+
if (array ? Object.getPrototypeOf(value) !== Array.prototype : ![Object.prototype, null].includes(Object.getPrototypeOf(value)))
|
|
50
|
+
throw new Error('Invalid workforce journal data');
|
|
51
|
+
const keys = Reflect.ownKeys(value);
|
|
52
|
+
if (keys.length > 4096 || (array && keys.length !== value.length + 1))
|
|
53
|
+
throw new Error('Invalid workforce journal data');
|
|
54
|
+
for (const key of keys) {
|
|
55
|
+
if (array && key === 'length')
|
|
56
|
+
continue;
|
|
57
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
58
|
+
if (typeof key !== 'string' || (array && !/^(0|[1-9][0-9]*)$/.test(key)) || !descriptor?.enumerable || !Object.hasOwn(descriptor, 'value'))
|
|
59
|
+
throw new Error('Invalid workforce journal data');
|
|
60
|
+
assertData(descriptor.value, depth + 1, budget);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function parse(schema, value) {
|
|
64
|
+
assertData(value);
|
|
65
|
+
const result = schema.safeParse(value);
|
|
66
|
+
if (!result.success || Buffer.byteLength(JSON.stringify(result.data), 'utf8') > 256 * 1024)
|
|
67
|
+
throw new Error('Invalid workforce journal data');
|
|
68
|
+
return result.data;
|
|
69
|
+
}
|
|
70
|
+
function canonical(value) {
|
|
71
|
+
if (value === null || typeof value !== 'object')
|
|
72
|
+
return value;
|
|
73
|
+
if (Array.isArray(value))
|
|
74
|
+
return value.map(canonical);
|
|
75
|
+
const record = value;
|
|
76
|
+
return Object.fromEntries(Object.keys(record).sort().map(key => [key, canonical(record[key])]));
|
|
77
|
+
}
|
|
78
|
+
export const workforceRequestHash = (value) => createHash('sha256').update(JSON.stringify(canonical(value))).digest('hex');
|
|
79
|
+
export const parseWorkforcePrepareInput = (value) => {
|
|
80
|
+
const input = parse(prepareSchema, value);
|
|
81
|
+
if (input.request.expectedActorAccountId !== undefined && input.request.expectedActorAccountId !== input.expectedAccountId)
|
|
82
|
+
throw new Error('Contradictory workforce actor');
|
|
83
|
+
return { ...input, request: { ...input.request, expectedActorAccountId: input.expectedAccountId } };
|
|
84
|
+
};
|
|
85
|
+
export const parseWorkforceOperationId = (value) => parse(uuid, value);
|
|
86
|
+
export function parseWorkforceReceipt(value, record) {
|
|
87
|
+
const receipt = parse(receiptSchema, value);
|
|
88
|
+
if (receipt.operationId !== record.operationId || receipt.owner.type !== record.request.owner.type || receipt.owner.id !== record.request.owner.id
|
|
89
|
+
|| (record.request.kind === 'team' ? receipt.agentVersion !== null : receipt.agentVersion !== 1))
|
|
90
|
+
throw new Error('Foreign workforce receipt');
|
|
91
|
+
return receipt;
|
|
92
|
+
}
|
|
93
|
+
export function parseWorkforceResourceOperationRecord(raw) {
|
|
94
|
+
if (Buffer.byteLength(raw, 'utf8') > 256 * 1024)
|
|
95
|
+
throw new Error('Invalid workforce journal data');
|
|
96
|
+
const record = parse(recordSchema, JSON.parse(raw));
|
|
97
|
+
if (record.operationId !== record.request.operationId || record.request.expectedActorAccountId !== record.expectedAccountId
|
|
98
|
+
|| record.requestHash !== workforceRequestHash(record.request)
|
|
99
|
+
|| (record.state === 'committed' ? !record.receipt : Boolean(record.receipt))
|
|
100
|
+
|| (['prepared', 'cancelled', 'rejected'].includes(record.state) ? record.dispatchCount !== 0 : record.dispatchCount < 1)
|
|
101
|
+
|| Date.parse(record.updatedAt) < Date.parse(record.createdAt))
|
|
102
|
+
throw new Error('Invalid workforce journal integrity');
|
|
103
|
+
if (record.receipt)
|
|
104
|
+
parseWorkforceReceipt(record.receipt, record);
|
|
105
|
+
return record;
|
|
106
|
+
}
|
|
107
|
+
export function isWorkforceResourceOperationRecord(value) {
|
|
108
|
+
try {
|
|
109
|
+
assertData(value);
|
|
110
|
+
parseWorkforceResourceOperationRecord(JSON.stringify(value));
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/** Only the bounded committed receipt leaves this projection; definitions and
|
|
118
|
+
* server payloads never become local operation output or persisted receipts. */
|
|
119
|
+
export function projectWorkforceRemoteResult(value, record) {
|
|
120
|
+
const noResult = z.object({ success: z.literal(true), state: z.literal('not-observed'), operation: z.null(), resource: z.null(), version: z.null(), replayed: z.literal(false) }).strict();
|
|
121
|
+
const committed = z.object({ success: z.literal(true), state: z.literal('committed'), operation: receiptSchema,
|
|
122
|
+
resource: z.unknown(), version: z.unknown(), replayed: z.boolean(),
|
|
123
|
+
resourceAccess: z.discriminatedUnion('allowed', [z.object({ allowed: z.literal(true) }).strict(), z.object({ allowed: z.literal(false), reason: z.literal('no_access') }).strict()]),
|
|
124
|
+
}).strict();
|
|
125
|
+
const result = parse(z.union([noResult, committed]), value);
|
|
126
|
+
if (result.state === 'not-observed')
|
|
127
|
+
return { state: 'not-observed' };
|
|
128
|
+
const receipt = parseWorkforceReceipt(result.operation, record);
|
|
129
|
+
if (!result.resourceAccess.allowed) {
|
|
130
|
+
if (result.resource !== null || result.version !== null)
|
|
131
|
+
throw new Error('Inconsistent workforce disclosure');
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
const resource = parse(z.object({ id: uuid, kind: z.enum(['agent', 'team']), owner: ownerSchema }).passthrough(), result.resource);
|
|
135
|
+
if (resource.id !== receipt.resourceId || resource.kind !== record.request.kind || resource.owner.type !== receipt.owner.type || resource.owner.id !== receipt.owner.id)
|
|
136
|
+
throw new Error('Foreign workforce resource');
|
|
137
|
+
if (record.request.kind === 'team') {
|
|
138
|
+
if (result.version !== null)
|
|
139
|
+
throw new Error('Invalid team version');
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
const version = parse(z.object({ resourceId: uuid, version: z.literal(1) }).passthrough(), result.version);
|
|
143
|
+
if (version.resourceId !== resource.id)
|
|
144
|
+
throw new Error('Foreign workforce version');
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return { state: 'committed', receipt };
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=accountWorkforceOperationState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountWorkforceOperationState.js","sourceRoot":"","sources":["../../src/account/accountWorkforceOperationState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,4EAA4E,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAA;AACnJ,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,yBAAyB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