@rivus/agent 0.16.6 → 0.17.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.
Files changed (39) hide show
  1. package/LICENSE +674 -21
  2. package/README.md +23 -2
  3. package/dist/cli.d.ts +1 -1
  4. package/dist/index.d.ts +3 -12
  5. package/dist/index.js +3 -5
  6. package/dist/testing/index.d.ts +21 -50
  7. package/dist/testing/index.js +58 -89
  8. package/package.json +14 -41
  9. package/dist/acp.d.ts +0 -2
  10. package/dist/acp.js +0 -2
  11. package/dist/bootstrap/pi-feishu.d.ts +0 -2
  12. package/dist/bootstrap/pi-feishu.js +0 -2
  13. package/dist/chunks/rivus-plugin-testkit.d.ts +0 -27
  14. package/dist/chunks/rivus-plugin-testkit.js +0 -63
  15. package/dist/mcp.d.ts +0 -2
  16. package/dist/mcp.js +0 -6
  17. package/dist/pi.d.ts +0 -2
  18. package/dist/pi.js +0 -2
  19. package/examples/a-share-briefing-analysis.mjs +0 -93
  20. package/examples/a-share-briefing-renderer.mjs +0 -257
  21. package/examples/a-share-index-evidence.mjs +0 -99
  22. package/examples/a-share-market-briefing.mjs +0 -83
  23. package/examples/a-share-market-date.mjs +0 -10
  24. package/examples/a-share-overseas-evidence.mjs +0 -86
  25. package/examples/a-share-policy-evidence.mjs +0 -145
  26. package/examples/a-share-provider-response.mjs +0 -21
  27. package/examples/a-share-sector-evidence.mjs +0 -70
  28. package/examples/acp-stdio-proxy.mjs +0 -58
  29. package/examples/current-weather.mjs +0 -117
  30. package/examples/html-drive-tools.mjs +0 -262
  31. package/examples/https-response-reader.mjs +0 -36
  32. package/examples/langfuse-drive-e2e.mjs +0 -175
  33. package/examples/pi-feishu-deployment.bootstrap.ts +0 -3
  34. package/examples/pi-feishu.bootstrap.ts +0 -242
  35. package/examples/rivus-agents.plugin.mjs +0 -290
  36. package/examples/rivus-langfuse-demo.config.json +0 -37
  37. package/examples/rivus-starter.plugin.mjs +0 -47
  38. package/examples/rivus.config.json +0 -114
  39. package/skills/runtime-management/SKILL.md +0 -65
package/README.md CHANGED
@@ -1,4 +1,25 @@
1
1
  # @rivus/agent
2
2
 
3
- Compatibility package for the Rivus Agent API and the `rivus` executable. It projects the canonical Platform, Runtime,
4
- and Gateway implementations through the historical root and subpath entrypoints.
3
+ Rivus product entrypoint: the plugin SDK, conformance testkit and sole `rivus` CLI. The CLI delegates to Gateway;
4
+ Runtime owns execution. Gateway owns deployment templates and Skills, with no duplicate Agent assets.
5
+
6
+ The root exports two values: `RIVUS_PLUGIN_API_VERSION` and `RivusToolInputRejected`. Its 17 type exports are:
7
+
8
+ - `RivusPluginManifest`, `RivusPlugin`, `RivusPluginRegistry`.
9
+ - `RivusAgentProfile`, `RivusAgentDeployment`.
10
+ - `RivusToolDescriptor`, `RivusToolExecutor`, `RivusToolFactoryContext`, `RivusToolExecutionContext`,
11
+ `RivusToolRisk`, `RivusToolIdempotency`, `RivusRuntimeToolId`.
12
+ - `RivusSkillDescriptor`.
13
+ - `RivusAutomationTemplate`, `RivusAutomationTickContext`, `RivusAutomationInput`, `RivusAutomationOutput`.
14
+
15
+ `@rivus/agent/testing` exports `assertRivusPluginConforms`, `createFakeRivusPlugin`,
16
+ `RivusPluginConformanceError`, `RivusPluginLifecycleProbe`, `RivusPluginConformanceInput` and
17
+ `RivusPluginConformanceReport`. Conformance validates registration, references, grant narrowing and optional
18
+ lifecycle disposal; test tool executors directly for business behavior.
19
+
20
+ Only the root, `/testing` and `/package.json` are exported. Historical runtime helpers, event constructors,
21
+ Memory DTOs and `/pi`, `/acp`, `/mcp`, `/bootstrap/pi-feishu`, `/plugin/starter` and Skill aliases are removed
22
+ intentionally. Use `@rivus/runtime/pi`, `@rivus/runtime/acp`, `@rivus/gateway/mcp` and Gateway bootstrap/resources.
23
+ Configuration no longer rewrites old Agent bootstrap or starter specifiers. See the
24
+ [SDK example](../../README.md#plugin-sdk-and-conformance) and
25
+ [deployment migration](../../docs/en/operations/local-deployment.md).
package/dist/cli.d.ts CHANGED
@@ -1 +1 @@
1
- export { };
1
+ export {}
package/dist/index.d.ts CHANGED
@@ -1,12 +1,3 @@
1
- import { a as assertRivusPluginConforms, i as RivusPluginLifecycleProbe, n as RivusPluginConformanceInput, o as createFakeRivusPlugin, r as RivusPluginConformanceReport, t as RivusPluginConformanceError } from "./chunks/rivus-plugin-testkit.js";
2
- import { AUTOMATION_PRESENTATION_SCHEMA_VERSION, AUTOMATION_SUPPRESSION_PREFIX, AgentInstanceBusy, AgentInstanceConflict, AgentInstanceRecord, AgentInstanceRegistry, AgentInstanceRegistryOptions, AgentMemoryError, AgentMemoryHandle, AgentMemoryService, AgentMemoryServiceOptions, AgentRuntimeCancellation, AgentRuntimeDisposed, AgentRuntimeInput, AgentRuntimePool, AgentRuntimePoolOptions, AgentRuntimeSteering, ApprovedHumanInteractionState, AssistantPresentationStep, AuthorizationPolicyProvider, AuthorizationPolicyState, AutomationBinding, AutomationDeliveryBinding, AutomationMandate, AutomationMandateError, AutomationMandateStore, AutomationPresentation, AutomationPresentationInput, AutomationPresentationItem, AutomationPresentationKind, AutomationPresentationSection, AutomationPresentationSource, AutomationTick, AutomationTickRecord, AutomationTickRepository, AutomationTickStatus, BACKGROUND_SESSION_DELIVERY_JSONL_VERSION, BACKGROUND_SESSION_JSONL_VERSION, BACKGROUND_SESSION_SESSION_KEY_PREFIX, BACKGROUND_SESSION_START_TOOL_ID, BACKGROUND_SESSION_TOOL_IDS, BACKGROUND_SESSION_TOOL_PLUGIN_ID, BACKGROUND_SESSION_TOOL_VERSION, BackgroundSessionAuthority, BackgroundSessionCallerDenied, BackgroundSessionCancellation, BackgroundSessionDeliveryConflict, BackgroundSessionDeliveryRecord, BackgroundSessionDeliveryStore, BackgroundSessionDetail, BackgroundSessionId, BackgroundSessionLease, BackgroundSessionLimits, BackgroundSessionOrigin, BackgroundSessionPhase, BackgroundSessionRepository, BackgroundSessionRepositoryConflict, BackgroundSessionRepositoryCorrupted, BackgroundSessionState, BackgroundSessionSummary, BackgroundSessionSupervisor, BackgroundSessionSupervisorOptions, BackgroundSessionSupervisorStatus, BackgroundSessionTerminalResult, BackgroundSessionTransitionDenied, CancelledHumanInteractionState, CardPresentation, CardPresentationChain, CardPresentationStatus, CardPresentationTransitionDenied, CompositeRivusDaemonTransportOptions, ConfiguredFeishuCardKitPublisherOptions, ConfiguredFeishuCardRolloverRuntime, ConfiguredFeishuCardRolloverRuntimeOptions, ConfiguredFeishuHumanInteractionPresenterOptions, ConfiguredFeishuOpenApiRequest, ConfiguredFeishuOpenApiResponse, ConfiguredRivusDaemonBootstrap, ConfiguredRivusDaemonBootstrapOptions, ConfiguredRivusDaemonBootstrapRequest, ConfiguredRivusDaemonBootstrapResponse, ConversationProgressDisplay, CreateBackgroundSessionHostToolsOptions, CreateConfiguredRivusDeploymentDaemonOptions, CreateRivusDeploymentAutomationInput, CreateRivusDeploymentBackgroundSessionInput, CreateRivusDeploymentDaemonOptions, CreateRivusDeploymentEndpointInput, CreateRivusDeploymentRuntimeInput, DEFAULT_BACKGROUND_SESSION_LEASE_MS, DEFAULT_BACKGROUND_SESSION_LEASE_RENEWAL_INTERVAL_MS, DEFAULT_BACKGROUND_SESSION_LIFETIME_MS, DEFAULT_BACKGROUND_SESSION_MAX_CONCURRENT_SESSIONS, DEFAULT_BACKGROUND_SESSION_MAX_CONSECUTIVE_FAILURES, DEFAULT_BACKGROUND_SESSION_RETRY_BACKOFF_MS, DEFAULT_BACKGROUND_SESSION_STEP_TIMEOUT_MS, DEFAULT_BACKGROUND_SESSION_SUPERVISOR_INTERVAL_MS, DEFAULT_CARD_STREAM_LEASE_MS, DEFAULT_CONVERSATION_PROGRESS_DISPLAY, DailyAutomationSchedule, DeadLetterRecoveryItem, DeadLetterRequeueResult, DelegationDenied, DelegationEdge, DelegationGrant, DelegationRequest, DelegationService, DeliveryJob, DeliveryJobStatus, DeliveryOutbox, DeliveryOutboxError, ExpiredHumanInteractionState, FEISHU_AGENT_CARD_ELEMENT_ID, FEISHU_AGENT_CARD_PROGRESS_ELEMENT_ID, FeishuAgentCommand, FeishuAgentDaemon, FeishuAgentDaemonCancelResult, FeishuAgentDaemonHandleMessageOptions, FeishuAgentDaemonHandleResult, FeishuAgentDaemonInteractionResult, FeishuAgentDaemonOptions, FeishuAgentDaemonRunResult, FeishuAgentDaemonSessionResetResult, FeishuAgentDaemonSkippedResult, FeishuAgentDaemonSteeredResult, FeishuAgentExecution, FeishuAgentExecutionResult, FeishuAgentMessageSideEffects, FeishuAgentPreparedControl, FeishuAgentRunCardInput, FeishuAgentRunPreparation, FeishuAgentRuntime, FeishuAgentRuntimeOptions, FeishuAutomationCardInput, FeishuAutomationCardSender, FeishuBackgroundSessionDelivery, FeishuBackgroundSessionDeliveryInput, FeishuBackgroundSessionDeliveryKind, FeishuCancelMessageIntakeSummary, FeishuCancelRunCommand, FeishuCardActionCallbackResponse, FeishuCardActionCommand, FeishuCardActionIntakeError, FeishuCardActionToast, FeishuCardActionTriggerPayload, FeishuCardDeliveryLedger, FeishuCardDeliveryLedgerStateOptions, FeishuCardDeliveryReconciler, FeishuCardDeliveryReconcilerOptions, FeishuCardDeliveryRecord, FeishuCardKitCancel, FeishuCardKitClient, FeishuCardKitFail, FeishuCardKitFinish, FeishuCardKitOpenApiClientOptions, FeishuCardKitOpenApiTargetCreatorOptions, FeishuCardKitPresentationUpdate, FeishuCardKitPublisher, FeishuCardKitPublisherOptions, FeishuCardKitTextUpdate, FeishuCardPresentationBinder, FeishuCardPresentationHandoffStart, FeishuCardPresentationNotFound, FeishuCardPresentationStore, FeishuCardPresentationStoreOptions, FeishuCardRollover, FeishuCardRolloverCounters, FeishuCardRolloverEvent, FeishuCardRolloverEventType, FeishuCardRolloverHandoffResult, FeishuCardRolloverOptions, FeishuCardRolloverStatus, FeishuCardRolloverSupervisor, FeishuCardRolloverSupervisorOptions, FeishuCardTarget, FeishuCardTargetCreateOptions, FeishuCardTargetCreator, FeishuCardTargetNotFound, FeishuCardTargetPreparationOptions, FeishuCardTargetRegistry, FeishuCardTargetRegistryOperation, FeishuCardTargetRegistryStoreError, FeishuCoalescingPublisher, FeishuCoalescingPublisherOptions, FeishuConversationReference, FeishuCotProtocolError, FeishuCotPublisher, FeishuCotPublisherOptions, FeishuCotRunPreparation, FeishuDeploymentEndpointOptions, FeishuEndpointCredentialError, FeishuEndpointCredentials, FeishuEndpointGroupPolicy, FeishuEventHandlerCardActions, FeishuEventHandlerQueue, FeishuEventHandlers, FeishuEventHandlersOptions, FeishuHumanInteractionActions, FeishuHumanInteractionPresenterOptions, FeishuInboxCompletedState, FeishuInboxDeadState, FeishuInboxDelivery, FeishuInboxDeliveryState, FeishuInboxLeasedState, FeishuInboxPendingState, FeishuInboxRepository, FeishuInboxRepositoryStateOptions, FeishuMessageAcceptResult, FeishuMessageContentInput, FeishuMessageDrainResult, FeishuMessageIntakeBaseSummary, FeishuMessageIntakeError, FeishuMessageIntakeOptions, FeishuMessageIntakeSummary, FeishuMessagePreparedControl, FeishuMessageQueue, FeishuMessageQueueOptions, FeishuMessageReactionSender, FeishuMessageWorker, FeishuMessageWorkerDrainAvailableResult, FeishuMessageWorkerOptions, FeishuMessageWorkerQueue, FeishuNewSessionCommand, FeishuNewSessionMessageIntakeSummary, FeishuOpenApiClient, FeishuOpenApiError, FeishuOpenApiRequest, FeishuOpenApiResponse, FeishuPeriodicFlush, FeishuPeriodicFlushOptions, FeishuPeriodicFlushSupervisor, FeishuPresentationPreparationOptions, FeishuPromptAgentCommand, FeishuPromptContextInput, FeishuPromptContextResolver, FeishuPromptMessageIntakeSummary, FeishuRawCardJson, FeishuReceiveAcceptedObservation, FeishuReceiveHandledObservation, FeishuReceiveMessageHandlerPayload, FeishuReceiveMessagePayload, FeishuReceiveMessageReplayOptions, FeishuReceiveMessageReplayResult, FeishuReceiveMessageSummary, FeishuReceiveRuntimeStatus, FeishuResolveInteractionCommand, FeishuSdkReceiveMessagePayload, FeishuSessionEpochRecord, FeishuSessionReference, FeishuSessionResetResult, FeishuSessionStore, FeishuSessionStoreOptions, FeishuStreamAction, FeishuStreamActionPublisher, FeishuStreamProjector, FeishuTenantAccessTokenError, FeishuTenantAccessTokenProvider, FeishuTenantAccessTokenProviderOptions, FeishuTenantAccessTokenRequest, FeishuTenantAccessTokenResponse, FeishuTextReplySender, FeishuTopicContextResolverOptions, FeishuWebSocketClient, FeishuWebSocketClientStartOptions, FeishuWebSocketDaemon, FeishuWebSocketDaemonOptions, FeishuWebSocketEventDispatcher, FeishuWebSocketRuntime, FeishuWorkerLoop, FeishuWorkerLoopOptions, FetchLike, FetchLikeResponse, HumanInteraction, HumanInteractionActor, HumanInteractionBase, HumanInteractionClock, HumanInteractionEndpointRegistry, HumanInteractionFact, HumanInteractionId, HumanInteractionRepositoryError, HumanInteractionResolutionAction, HumanInteractionTransition, HumanInteractionTransitionDenied, InvalidAutomationPresentation, InvalidFeishuCardAction, InvalidFeishuMessageContent, InvalidFeishuSessionReference, InvalidFeishuTopicContext, InvalidRivusEndpointBinding, InvalidRivusPlugin, InvalidRivusProjectSpace, JsonFetchRequestOptions, JsonFileFeishuCardTargetRegistryOptions, JsonHttpRequest, JsonHttpResponse, JsonlFeishuCardDeliveryLedgerOptions, JsonlFeishuInboxRepositoryOptions, JsonlHumanInteractionRepositoryOptions, JsonlRecoveryControlOptions, LegacyAutomationOutcome as AutomationOutcome, LegacyBackgroundSessionService as BackgroundSessionService, LegacyCommitAutomationOutcomeInput as CommitAutomationOutcomeInput, LegacyCommittedAutomationOutcome as CommittedAutomationOutcome, LegacyConsumeToolApprovalInput as ConsumeToolApprovalInput, LegacyHumanInteractionPresenter as HumanInteractionPresenter, LegacyHumanInteractionRepository as HumanInteractionRepository, LegacyHumanInteractionService as HumanInteractionService, LegacyHumanInteractionServiceOptions as HumanInteractionServiceOptions, LegacyResolveHumanInteractionInput as ResolveHumanInteractionInput, LoadRivusDeploymentManifestOptions, LoadRivusDeploymentOptions, LoadedRivusDeployment, MemorySearchQuery, ModelPresentationStep, OpenClawEnvImportError, OpenClawEnvImportOptions, OpenClawEnvImportResult, OpenJsonAutomationTickRepositoryOptions, OpenJsonFeishuSessionStoreOptions, PendingHumanInteractionState, PluginStateConflict, PluginStateRecord, PluginStateStore, PooledAgentRuntime, PresentationStep, PresentationStepStatus, PresentedValue, PresentedValueOptions, PutPluginState, RIVUS_PLUGIN_API_VERSION, RUN_PRESENTATION_SCHEMA_VERSION, RateLimitedFeishuPublisherOptions, RecoveryControl, RecoveryControlOptions, RecoverySnapshot, RegisteredRivusAgentProfile, RegisteredRivusAutomation, RegisteredRivusPlugin, RejectedHumanInteractionState, RequestToolApprovalInput, RequestUserDecisionInput, ResolvedRivusAgentDefinition, ResolvedRivusAutomationDefinition, ResolvedRivusProjectSpace, ResponsePresentationStep, RivusAgentDeployment, RivusAgentDeploymentStatus, RivusAgentHost, RivusAgentHostOptions, RivusAgentProfile, RivusAutomationDelivery, RivusAutomationDeliveryTargetType, RivusAutomationDeployment, RivusAutomationInput, RivusAutomationOutput, RivusAutomationTemplate, RivusAutomationTickContext, RivusBackgroundSessionsDeployment, RivusDaemonBootstrapContext, RivusDaemonBootstrapFactory, RivusDaemonBootstrapModule, RivusDaemonCliOptions, RivusDaemonCliWriter, RivusDaemonConfig, RivusDaemonConfigError, RivusDaemonConfigLoaderOptions, RivusDaemonEnv, RivusDaemonFeishuReplayRunner, RivusDaemonProcess, RivusDaemonProcessOptions, RivusDaemonPromptRunner, RivusDaemonRecoveryRunner, RivusDaemonShutdownController, RivusDaemonShutdownControllerOptions, RivusDaemonShutdownSignal, RivusDaemonSignalSource, RivusDaemonStatus, RivusDaemonStatusHttpServer, RivusDaemonStatusHttpServerOptions, RivusDaemonStatusReporter, RivusDaemonStatusReporterOptions, RivusDaemonTransport, RivusDaemonWorkerLoop, RivusDeploymentAutomation, RivusDeploymentAutomationLifecycle, RivusDeploymentAutomationReadinessError, RivusDeploymentAutomationStatus, RivusDeploymentBackgroundSession, RivusDeploymentBackgroundSessionLifecycle, RivusDeploymentBackgroundSessionReadinessError, RivusDeploymentBackgroundSessionStatus, RivusDeploymentBootstrapAdapters, RivusDeploymentBootstrapContext, RivusDeploymentBootstrapFactory, RivusDeploymentCliProcess, RivusDeploymentComponentLifecycle, RivusDeploymentDaemon, RivusDeploymentDaemonLifecycle, RivusDeploymentDaemonLifecycleError, RivusDeploymentDaemonStatus, RivusDeploymentEndpoint, RivusDeploymentEndpointLifecycle, RivusDeploymentEndpointStatus, RivusDeploymentManifest, RivusDeploymentManifestError, RivusDeploymentReadinessError, RivusEndpointDefinition, RivusEndpointDeployment, RivusEndpointExperimentalFeatures, RivusEndpointInput, RivusEnvFileVariables, RivusPlugin, RivusPluginCatalog, RivusPluginCatalogSnapshot, RivusPluginDeclaration, RivusPluginLoadError, RivusPluginLoadStatus, RivusPluginManifest, RivusPluginModule, RivusPluginModuleLoadRequest, RivusPluginRegistry, RivusProjectSpaceDeployment, RivusRuntimeToolGrantSet, RivusTextFileReader, RivusThinkingLevel, RunPresentation, RunPresentationPhase, RunPresentationProjector, ScheduledAutomation, ScheduledAutomationClock, ScheduledAutomationDeliveryInput, ScheduledAutomationOptions, ScheduledAutomationRunInput, ScheduledAutomationRunResult, SelectedHumanInteractionState, SessionScheduler, SessionSchedulerCapacityExceeded, SessionSchedulerDisposed, SessionSchedulerOptions, SessionSchedulerStatus, SkillPresentationStep, SpawnSubagentRequest, SubagentCoordinator, SubagentRecord, ToolApprovalBinding, ToolApprovalInteraction, ToolApprovalInteractionState, ToolApprovalRequest, ToolApprovalService, ToolBroker, ToolBrokerOptions, ToolExecutionRequest, ToolInvocationDenied, ToolOperationRecoveryItem, ToolOperationResolutionResult, ToolPresentationStep, UnsupportedFeishuCardAction, UnsupportedFeishuMessage, UserDecisionInteraction, UserDecisionInteractionState, UserDecisionOption, WorkspaceInstructionsProvider, acceptsCardPresentationProgress, activeCardPresentation, appendBackgroundSessionInput, backgroundSessionToolIds, claimBackgroundSession, commitLegacyAutomationOutcome as commitAutomationOutcome, completeBackgroundSessionStep, completeBackgroundSessionStop, composeFeishuTopicPrompt, createAgentCommandFromFeishuCardAction, createAgentCommandFromFeishuMessage, createAgentHarnessPooledRuntime, createAgentInstanceRegistry, createAgentMemoryService, createAgentRuntimePool, createAgentsMdInstructionsProvider, createAutomationMandateStore, createAutomationPresentation, createBackgroundSession, createBackgroundSessionCard, createBackgroundSessionDeliveryStore, createBackgroundSessionHostTools, createBackgroundSessionKey, createBackgroundSessionRepository, createBackgroundSessionStepSourceMessageId, createBackgroundSessionSupervisor, createBackgroundSessionToolContracts, createCoalescingFeishuPublisher, createCompositeRivusDaemonTransport, createConfiguredFeishuAutomationCardSender, createConfiguredFeishuBackgroundSessionDelivery, createConfiguredFeishuCardKitPublisher, createConfiguredFeishuCardKitTargetCreator, createConfiguredFeishuCardRolloverRuntime, createConfiguredFeishuHumanInteractionPresenter, createConfiguredFeishuMessageReactionSender, createConfiguredFeishuOpenApiClient, createConfiguredFeishuTextReplySender, createConfiguredRivusDaemonBootstrap, createConfiguredRivusDeploymentDaemon, createDailyAutomationSchedule, createDelegationService, createDeliveryOutbox, createFeishuAgentDaemon, createFeishuAgentRunCard, createFeishuAgentRuntime, createFeishuCardActionCallbackResponse, createFeishuCardActionErrorResponse, createFeishuCardDeliveryLedger, createFeishuCardDeliveryReconciler, createFeishuCardKitOpenApiClient, createFeishuCardKitOpenApiTargetCreator, createFeishuCardKitPublisher, createFeishuCardPresentationStore, createFeishuCardRollover, createFeishuCardRolloverSupervisor, createFeishuCardTargetPreparation, createFeishuConversationId, createFeishuCotPublisher, createFeishuDeploymentEndpoint, createFeishuEventHandlers, createFeishuHumanInteractionCard, createFeishuHumanInteractionPresenter, createFeishuInboxRepository, createFeishuMessageQueue, createFeishuMessageWorker, createFeishuOpenApiClient, createFeishuPeriodicFlush, createFeishuPresentationPreparation, createFeishuSessionKey, createFeishuSessionStore, createFeishuStreamProjector, createFeishuTenantAccessTokenProvider, createFeishuTopicContextResolver, createFeishuWebSocketDaemon, createFeishuWorkerLoop, createHumanInteractionEndpointRegistry, createHumanInteractionModelChangeApproval, createHumanInteractionToolApprovalGateway, createInMemoryFeishuCardTargetRegistry, createInMemoryHumanInteractionRepository, createJsonFetchRequest, createJsonFileFeishuCardTargetRegistry, createJsonlHumanInteractionRepository, createLazyFeishuWebSocketEventDispatcher, createLegacyBackgroundSessionService as createBackgroundSessionService, createLegacyHumanInteractionService as createHumanInteractionService, createPluginStateStore, createPresentedValue, createRateLimitedFeishuPublisher, createRecoveryControl, createRivusAgentHost, createRivusDaemonProcess, createRivusDaemonShutdownController, createRivusDaemonStatusHttpServer, createRivusDaemonStatusReporter, createRivusDeploymentCliProcess, createRivusDeploymentDaemon, createRivusEnvFromOpenClawConfig, createRivusPluginCatalog, createRoutedHumanInteractionToolApprovalService, createRunPresentationProjector, createScheduledAutomation, createSessionScheduler, createSubagentCoordinator, createToolBroker, describeFeishuMessageIntake, extendBackgroundSessionDefinition, failBackgroundSessionStep, formatRivusEnvFile, hasInspectableRunProgress, intersectToolIds, isBackgroundSessionDue, isBackgroundSessionLeaseExpired, isBackgroundSessionState, isBackgroundSessionTerminalPhase, isBackgroundSessionToolId, isCardPresentationHandoffDue, loadNodeRivusPluginModule, loadRivusDaemonConfig, loadRivusDeployment, loadRivusDeploymentManifest, narrowBackgroundSessionDefinition, openJsonAutomationTickRepository, openJsonFeishuSessionStore, openJsonlAgentMemoryService, openJsonlBackgroundSessionDeliveryStore, openJsonlBackgroundSessionRepository, openJsonlFeishuCardDeliveryLedger, openJsonlFeishuInboxRepository, openJsonlRecoveryControl, openJsonlToolOperationLedger, parkBackgroundSessionForReconciliation, progressDeliveryId, readAutomationPresentation, readFeishuMessageContent, releaseBackgroundSessionLease, renewBackgroundSessionLease, requestBackgroundSessionStop, requeueInterruptedBackgroundSessionStep, resolveBackgroundSessionReconciliation, resolveBackgroundSessionSupervisorIntervalMs, resolveFeishuDeliveryChatId, resolveFeishuEndpointCredentials, resolveRivusAgentDefinition, resolveRivusProjectSpace, restoreConfiguredRivusDaemonBootstrap, runRivusDaemonCli, sessionIdFromSessionKey, shouldAcceptFeishuEndpointMessage, suspendBackgroundSession, terminalDeliveryId, transitionHumanInteraction, validateRivusDeploymentManifest } from "@rivus/gateway";
3
- import { ActiveAgentRun, AgentClientAttempt, AgentClientFailure, AgentClientSuccess, AgentClock, AgentContextBudgetExceeded, AgentContextInput, AgentContextLayer, AgentContextLayerKind, AgentConversationMessagesOptions, AgentDomainEvent, AgentDomainEventCallback, AgentDomainEventHandler, AgentDomainEventListener, AgentDomainEventSink, AgentDomainEventSinkCallback, AgentEventHandlerFailed, AgentEventLog, AgentEventLogOperation, AgentEventLogStoreError, AgentEventSinkFailed, AgentHarness, AgentHarnessAvailability, AgentHarnessBusy, AgentHarnessBusyAvailability, AgentHarnessClient, AgentHarnessError, AgentHarnessIdleAvailability, AgentHistory, AgentHistoryEventLog, AgentInvocationOrigin, AgentLoopEvent, AgentLoopEventLike, AgentLoopFailed, AgentLoopModelExecutionEnd, AgentLoopModelExecutionEndOptions, AgentLoopModelExecutionStart, AgentLoopModelExecutionStartOptions, AgentLoopSkillExecutionEnd, AgentLoopSkillExecutionEndOptions, AgentLoopSkillExecutionStart, AgentLoopSkillExecutionStartOptions, AgentLoopTextDelta, AgentLoopThinkingDelta, AgentLoopToolExecutionEnd, AgentLoopToolExecutionEndOptions, AgentLoopToolExecutionStart, AgentLoopToolExecutionStartOptions, AgentLoopToolExecutionUpdate, AgentLoopToolExecutionUpdateOptions, AgentLoopTurnStart, AgentModelContentObserver, AgentModelExecutionEnded, AgentModelExecutionEvent, AgentModelExecutionStarted, AgentModelInputObservation, AgentModelOutputObservation, AgentModelUsage, AgentPromptResult, AgentRunAccepted, AgentRunCancelled, AgentRunCancelled as AgentRunCancelledEvent, AgentRunCompleted, AgentRunFailed, AgentRunId, AgentRunPhase, AgentRunSnapshot, AgentRunState, AgentRunSummary, AgentRunUpdate, AgentRunUpdateCallback, AgentRunUpdateHandler, AgentRunUpdateListener, AgentRuntime, AgentSessionAvailability, AgentSessionBusyAvailability, AgentSessionClient, AgentSessionHandle, AgentSessionOtherBusyAvailability, AgentSessionOwnedBusyAvailability, AgentSessionSnapshot, AgentSessionSummary, AgentSkillExecutionEnded, AgentSkillExecutionStarted, AgentSkillExecutionState, AgentTextDeltaCallback, AgentToolExecutionEnded, AgentToolExecutionEvent, AgentToolExecutionStarted, AgentToolExecutionUpdated, AgentTranscript, AgentTranscriptMessage, AgentTranscriptMessageRole, AgentTranscriptTurn, AgentTurnCompleted, AgentTurnStarted, AssembledAgentContext, AssistantTextDelta, AssistantThinkingDelta, AutomationAgentInvocationOrigin, DefaultAgentHarnessClientFromCallbackOptions, DefaultAgentHarnessClientFromTextCallbackOptions, DefaultAgentHarnessClientOptions, DefaultAgentHarnessFromCallbackOptions, DefaultAgentHarnessFromTextCallbackOptions, DefaultAgentHarnessOptions, DefaultAgentRuntimeFromCallbackOptions, DefaultAgentRuntimeFromTextCallbackOptions, DefaultAgentRuntimeOptions, DefaultAgentRuntimeSessionOptions, FeishuAgentInvocationOrigin, InvalidRecoveryAction, InvalidWorkspaceRoot, JsonlAgentEventLogOptions, LangfuseAgentTelemetry, LangfuseTelemetryConfig, LangfuseTelemetryConfigError, LangfuseTelemetryContentMode, LangfuseTelemetryEnv, LegacyAgentHarnessOptions as AgentHarnessOptions, LegacyAgentLoop as AgentLoop, LegacyAgentLoopCallback as AgentLoopCallback, LegacyAgentLoopCallbackOutput as AgentLoopCallbackOutput, LegacyAgentLoopCallbackResult as AgentLoopCallbackResult, LegacyAgentLoopInput as AgentLoopInput, LegacyAgentMemoryAuthority as AgentMemoryAuthority, LegacyAgentMemoryIdentity as AgentMemoryIdentity, LegacyAgentMemorySnapshot, LegacyAgentSteeringChannel as AgentSteeringChannel, LegacyAsyncIterableAgentLoopOptions as AsyncIterableAgentLoopOptions, LegacyCompactionError as CompactionError, LegacyCompactionInput as CompactionInput, LegacyCompactionService as CompactionService, LegacyCompactionSnapshot as CompactionSnapshot, LegacyCompactorPort as CompactorPort, LegacyEventAgentLoopOptions as EventAgentLoopOptions, LegacyInvalidInvocationAuthority as InvalidInvocationAuthority, LegacyInvalidStableJson as InvalidStableJson, LegacyInvalidToolInput as InvalidToolInput, LegacyInvocationAuthority as InvocationAuthority, LegacyInvocationAuthorityRef as InvocationAuthorityRef, LegacyMemoryBinding as MemoryBinding, LegacyMemoryInvocationAudience as MemoryInvocationAudience, LegacyMemoryRecord, LegacyMemoryScope as MemoryScope, LegacyMemoryState as MemoryState, LegacyProjectMemoryPromptInput as ProjectMemoryPromptInput, LegacyProjectMemoryRecallIdentity as ProjectMemoryRecallIdentity, LegacyProjectMemoryRecallOptions as ProjectMemoryRecallOptions, LegacyRivusMemoryTool as RivusMemoryTool, LegacyTextAgentLoopCallback as TextAgentLoopCallback, LegacyTextAgentLoopOptions as TextAgentLoopOptions, LegacyToolOperationBeginResult as ToolOperationBeginResult, LegacyToolOperationBinding as ToolOperationBinding, LegacyToolOperationInspectResult as ToolOperationInspectResult, LegacyToolOperationLedger as ToolOperationLedger, LegacyToolOperationReconciliation as ToolOperationReconciliation, LegacyToolOperationReconciliationOutcome as ToolOperationReconciliationOutcome, LegacyToolOperationRecord as ToolOperationRecord, LegacyToolOperationState as ToolOperationState, LocalCliAgentInvocationOrigin, MEMORY_SCOPES, MemoryTombstoneReceipt, OpenTelemetryAgentEventSinkOptions, OpenTelemetryAgentTelemetry, PromptCommand, RIVUS_MEMORY_TOOL_ID, RIVUS_MEMORY_TOOL_PLUGIN_ID, RIVUS_MEMORY_TOOL_VERSION, RIVUS_RUNTIME_TOOL_IDS, RecoveryAction, RegisteredRivusSkill, RegisteredRivusTool, RivusHostToolDescriptor, RivusResolvedToolDescriptor, RivusRuntimeToolId, RivusSkillDescriptor, RivusSkillGrantSet, RivusToolDescriptor, RivusToolExecutionContext, RivusToolExecutor, RivusToolFactoryContext, RivusToolGrantSet, RivusToolIdempotency, RivusToolInputRejected, RivusToolRisk, RunIdGenerator, SessionKey, TelemetryContentRedactor, TelemetryContentRedactorOptions, TerminalAgentDomainEvent, WorkspaceInstructionSource, WorkspaceInstructionsDiagnostic, WorkspaceInstructionsDiagnosticCode, WorkspaceInstructionsRequest, WorkspaceInstructionsSourceError, WorkspaceInstructionsView, WorkspaceRootHandle, assembleAgentContext, createAgentConversationMessages, createAgentDomainEventHandler, createAgentDomainEventSink, createAgentDomainEventSinkFromCallback, createAgentHarnessClient, createAgentLoopModelExecutionEnd, createAgentLoopModelExecutionStart, createAgentLoopSkillExecutionEnd, createAgentLoopSkillExecutionStart, createAgentLoopTextDelta, createAgentLoopThinkingDelta, createAgentLoopToolExecutionEnd, createAgentLoopToolExecutionStart, createAgentLoopToolExecutionUpdate, createAgentLoopTurnStart, createAgentRunUpdateHandler, createAgentRuntime, createAgentTranscriptMessages, createAgentTranscriptTurn, createDefaultAgentHarness, createDefaultAgentHarnessClient, createDefaultAgentHarnessClientFromCallback, createDefaultAgentHarnessClientFromTextCallback, createDefaultAgentHarnessFromCallback, createDefaultAgentHarnessFromTextCallback, createDefaultAgentRuntime, createDefaultAgentRuntimeFromCallback, createDefaultAgentRuntimeFromTextCallback, createFixedClock, createJsonlAgentEventLog, createLangfuseAgentTelemetry, createLegacyAgentHarness as createAgentHarness, createLegacyAgentLoopFromCallback as createAgentLoopFromCallback, createLegacyAgentLoopPromptTransformer as createAgentLoopPromptTransformer, createLegacyAsyncIterableAgentLoop as createAsyncIterableAgentLoop, createLegacyCompactionService as createCompactionService, createLegacyEventAgentLoop as createEventAgentLoop, createLegacyInvocationAuthority as createInvocationAuthority, createLegacyMemoryNamespace as createMemoryNamespace, createLegacyProjectMemoryPromptPreparer as createProjectMemoryPromptPreparer, createLegacyRivusMemoryTool as createRivusMemoryTool, createLegacyRivusMemoryToolDescriptor as createRivusMemoryToolDescriptor, createLegacyTextAgentLoop as createTextAgentLoop, createLegacyTextAgentLoopFromCallback as createTextAgentLoopFromCallback, createLegacyToolInputDigest as createToolInputDigest, createLegacyToolOperationLedger as createToolOperationLedger, createOpenTelemetryAgentEventSink, createOpenTelemetryAgentTelemetry, createRecoveryAction, createRivusMemoryToolContract, createSequenceRunIds, createSystemClock, createTelemetryContentRedactor, createTestClock, createUuidRunIds, createWorkspaceRootHandle, evolveAgentRun, initialAgentRunState, isAgentToolExecutionEvent, isAssistantTextDeltaEvent, isAssistantThinkingDeltaEvent, isRivusRuntimeToolId, isTerminalAgentDomainEvent, isTerminalAgentRunPhase, normalizeLegacyStableJson as normalizeStableJson, replayAgentHistory, replayAgentTranscript, requiresLegacyToolApproval as requiresToolApproval, resolveLangfuseTelemetryConfig, restoreAgentHistory, restrictLegacyMemoryScopesForAudience as restrictMemoryScopesForAudience } from "@rivus/runtime";
4
- import { InvalidProjectSkillCatalog, LegacyPiAgentLoopOptions as PiAgentLoopOptions, LegacyPiAgentSessionHandle as PiAgentSessionHandle, LegacyPiSdkAgentLoopOptions as PiSdkAgentLoopOptions, LegacyPiSessionRegistry as PiSessionRegistry, LegacyPiSessionRegistryOptions as PiSessionRegistryOptions, MergePiProviderBaseUrlOverrideOptions, PiAgentSession, PiAgentSessionEvent, PiCreateAgentSessionResult, ProjectSkillCatalogDiagnostic, ProjectSkillCatalogEntry, createLegacyPiAgentLoop as createPiAgentLoop, createLegacyPiSdkAgentLoop as createPiSdkAgentLoop, createLegacyPiSessionRegistry as createPiSessionRegistry, mergePiProviderBaseUrlOverride, validateProjectSkillCatalog, validateProjectSkillCommand } from "@rivus/runtime/pi";
5
-
6
- //#region src/index.d.ts
7
- /** Keep the legacy memory records open to consumer module augmentation. */
8
- interface MemoryRecord extends LegacyMemoryRecord {}
9
- /** Keep the legacy memory snapshots open to consumer module augmentation. */
10
- interface AgentMemorySnapshot extends LegacyAgentMemorySnapshot {}
11
- //#endregion
12
- export { AUTOMATION_PRESENTATION_SCHEMA_VERSION, AUTOMATION_SUPPRESSION_PREFIX, type ActiveAgentRun, type AgentClientAttempt, type AgentClientFailure, type AgentClientSuccess, type AgentClock, AgentContextBudgetExceeded, type AgentContextInput, type AgentContextLayer, type AgentContextLayerKind, type AgentConversationMessagesOptions, type AgentDomainEvent, type AgentDomainEventCallback, type AgentDomainEventHandler, type AgentDomainEventListener, type AgentDomainEventSink, type AgentDomainEventSinkCallback, AgentEventHandlerFailed, type AgentEventLog, type AgentEventLogOperation, AgentEventLogStoreError, AgentEventSinkFailed, type AgentHarness, type AgentHarnessAvailability, AgentHarnessBusy, type AgentHarnessBusyAvailability, type AgentHarnessClient, type AgentHarnessError, type AgentHarnessIdleAvailability, type AgentHarnessOptions, type AgentHistory, type AgentHistoryEventLog, AgentInstanceBusy, AgentInstanceConflict, type AgentInstanceRecord, type AgentInstanceRegistry, type AgentInstanceRegistryOptions, type AgentInvocationOrigin, type AgentLoop, type AgentLoopCallback, type AgentLoopCallbackOutput, type AgentLoopCallbackResult, type AgentLoopEvent, type AgentLoopEventLike, AgentLoopFailed, type AgentLoopInput, type AgentLoopModelExecutionEnd, type AgentLoopModelExecutionEndOptions, type AgentLoopModelExecutionStart, type AgentLoopModelExecutionStartOptions, type AgentLoopSkillExecutionEnd, type AgentLoopSkillExecutionEndOptions, type AgentLoopSkillExecutionStart, type AgentLoopSkillExecutionStartOptions, type AgentLoopTextDelta, type AgentLoopThinkingDelta, type AgentLoopToolExecutionEnd, type AgentLoopToolExecutionEndOptions, type AgentLoopToolExecutionStart, type AgentLoopToolExecutionStartOptions, type AgentLoopToolExecutionUpdate, type AgentLoopToolExecutionUpdateOptions, type AgentLoopTurnStart, type AgentMemoryAuthority, AgentMemoryError, type AgentMemoryHandle, type AgentMemoryIdentity, type AgentMemoryService, type AgentMemoryServiceOptions, AgentMemorySnapshot, type AgentModelContentObserver, type AgentModelExecutionEnded, type AgentModelExecutionEvent, type AgentModelExecutionStarted, type AgentModelInputObservation, type AgentModelOutputObservation, type AgentModelUsage, type AgentPromptResult, type AgentRunAccepted, AgentRunCancelled, type AgentRunCancelledEvent, type AgentRunCompleted, type AgentRunFailed, type AgentRunId, type AgentRunPhase, type AgentRunSnapshot, type AgentRunState, type AgentRunSummary, type AgentRunUpdate, type AgentRunUpdateCallback, type AgentRunUpdateHandler, type AgentRunUpdateListener, type AgentRuntime, type AgentRuntimeCancellation, AgentRuntimeDisposed, type AgentRuntimeInput, type AgentRuntimePool, type AgentRuntimePoolOptions, type AgentRuntimeSteering, type AgentSessionAvailability, type AgentSessionBusyAvailability, type AgentSessionClient, type AgentSessionHandle, type AgentSessionOtherBusyAvailability, type AgentSessionOwnedBusyAvailability, type AgentSessionSnapshot, type AgentSessionSummary, type AgentSkillExecutionEnded, type AgentSkillExecutionStarted, type AgentSkillExecutionState, type AgentSteeringChannel, type AgentTextDeltaCallback, type AgentToolExecutionEnded, type AgentToolExecutionEvent, type AgentToolExecutionStarted, type AgentToolExecutionUpdated, type AgentTranscript, type AgentTranscriptMessage, type AgentTranscriptMessageRole, type AgentTranscriptTurn, type AgentTurnCompleted, type AgentTurnStarted, type ApprovedHumanInteractionState, type AssembledAgentContext, type AssistantPresentationStep, type AssistantTextDelta, type AssistantThinkingDelta, type AsyncIterableAgentLoopOptions, type AuthorizationPolicyProvider, type AuthorizationPolicyState, type AutomationAgentInvocationOrigin, type AutomationBinding, type AutomationDeliveryBinding, type AutomationMandate, AutomationMandateError, type AutomationMandateStore, type AutomationOutcome, type AutomationPresentation, type AutomationPresentationInput, type AutomationPresentationItem, type AutomationPresentationKind, type AutomationPresentationSection, type AutomationPresentationSource, type AutomationTick, type AutomationTickRecord, type AutomationTickRepository, type AutomationTickStatus, BACKGROUND_SESSION_DELIVERY_JSONL_VERSION, BACKGROUND_SESSION_JSONL_VERSION, BACKGROUND_SESSION_SESSION_KEY_PREFIX, BACKGROUND_SESSION_START_TOOL_ID, BACKGROUND_SESSION_TOOL_IDS, BACKGROUND_SESSION_TOOL_PLUGIN_ID, BACKGROUND_SESSION_TOOL_VERSION, type BackgroundSessionAuthority, BackgroundSessionCallerDenied, type BackgroundSessionCancellation, BackgroundSessionDeliveryConflict, type BackgroundSessionDeliveryRecord, type BackgroundSessionDeliveryStore, type BackgroundSessionDetail, type BackgroundSessionId, type BackgroundSessionLease, type BackgroundSessionLimits, type BackgroundSessionOrigin, type BackgroundSessionPhase, type BackgroundSessionRepository, BackgroundSessionRepositoryConflict, BackgroundSessionRepositoryCorrupted, type BackgroundSessionService, type BackgroundSessionState, type BackgroundSessionSummary, type BackgroundSessionSupervisor, type BackgroundSessionSupervisorOptions, type BackgroundSessionSupervisorStatus, type BackgroundSessionTerminalResult, BackgroundSessionTransitionDenied, type CancelledHumanInteractionState, type CardPresentation, type CardPresentationChain, type CardPresentationStatus, CardPresentationTransitionDenied, type CommitAutomationOutcomeInput, type CommittedAutomationOutcome, CompactionError, type CompactionInput, type CompactionService, type CompactionSnapshot, type CompactorPort, type CompositeRivusDaemonTransportOptions, type ConfiguredFeishuCardKitPublisherOptions, type ConfiguredFeishuCardRolloverRuntime, type ConfiguredFeishuCardRolloverRuntimeOptions, type ConfiguredFeishuHumanInteractionPresenterOptions, type ConfiguredFeishuOpenApiRequest, type ConfiguredFeishuOpenApiResponse, type ConfiguredRivusDaemonBootstrap, type ConfiguredRivusDaemonBootstrapOptions, type ConfiguredRivusDaemonBootstrapRequest, type ConfiguredRivusDaemonBootstrapResponse, type ConsumeToolApprovalInput, type ConversationProgressDisplay, type CreateBackgroundSessionHostToolsOptions, type CreateConfiguredRivusDeploymentDaemonOptions, type CreateRivusDeploymentAutomationInput, type CreateRivusDeploymentBackgroundSessionInput, type CreateRivusDeploymentDaemonOptions, type CreateRivusDeploymentEndpointInput, type CreateRivusDeploymentRuntimeInput, DEFAULT_BACKGROUND_SESSION_LEASE_MS, DEFAULT_BACKGROUND_SESSION_LEASE_RENEWAL_INTERVAL_MS, DEFAULT_BACKGROUND_SESSION_LIFETIME_MS, DEFAULT_BACKGROUND_SESSION_MAX_CONCURRENT_SESSIONS, DEFAULT_BACKGROUND_SESSION_MAX_CONSECUTIVE_FAILURES, DEFAULT_BACKGROUND_SESSION_RETRY_BACKOFF_MS, DEFAULT_BACKGROUND_SESSION_STEP_TIMEOUT_MS, DEFAULT_BACKGROUND_SESSION_SUPERVISOR_INTERVAL_MS, DEFAULT_CARD_STREAM_LEASE_MS, DEFAULT_CONVERSATION_PROGRESS_DISPLAY, type DailyAutomationSchedule, type DeadLetterRecoveryItem, type DeadLetterRequeueResult, type DefaultAgentHarnessClientFromCallbackOptions, type DefaultAgentHarnessClientFromTextCallbackOptions, type DefaultAgentHarnessClientOptions, type DefaultAgentHarnessFromCallbackOptions, type DefaultAgentHarnessFromTextCallbackOptions, type DefaultAgentHarnessOptions, type DefaultAgentRuntimeFromCallbackOptions, type DefaultAgentRuntimeFromTextCallbackOptions, type DefaultAgentRuntimeOptions, type DefaultAgentRuntimeSessionOptions, DelegationDenied, type DelegationEdge, type DelegationGrant, type DelegationRequest, type DelegationService, type DeliveryJob, type DeliveryJobStatus, type DeliveryOutbox, DeliveryOutboxError, type EventAgentLoopOptions, type ExpiredHumanInteractionState, FEISHU_AGENT_CARD_ELEMENT_ID, FEISHU_AGENT_CARD_PROGRESS_ELEMENT_ID, type FeishuAgentCommand, type FeishuAgentDaemon, type FeishuAgentDaemonCancelResult, type FeishuAgentDaemonHandleMessageOptions, type FeishuAgentDaemonHandleResult, type FeishuAgentDaemonInteractionResult, type FeishuAgentDaemonOptions, type FeishuAgentDaemonRunResult, type FeishuAgentDaemonSessionResetResult, type FeishuAgentDaemonSkippedResult, type FeishuAgentDaemonSteeredResult, type FeishuAgentExecution, type FeishuAgentExecutionResult, type FeishuAgentInvocationOrigin, type FeishuAgentMessageSideEffects, type FeishuAgentPreparedControl, type FeishuAgentRunCardInput, type FeishuAgentRunPreparation, type FeishuAgentRuntime, type FeishuAgentRuntimeOptions, type FeishuAutomationCardInput, type FeishuAutomationCardSender, type FeishuBackgroundSessionDelivery, type FeishuBackgroundSessionDeliveryInput, type FeishuBackgroundSessionDeliveryKind, type FeishuCancelMessageIntakeSummary, type FeishuCancelRunCommand, type FeishuCardActionCallbackResponse, type FeishuCardActionCommand, type FeishuCardActionIntakeError, type FeishuCardActionToast, type FeishuCardActionTriggerPayload, type FeishuCardDeliveryLedger, type FeishuCardDeliveryLedgerStateOptions, type FeishuCardDeliveryReconciler, type FeishuCardDeliveryReconcilerOptions, type FeishuCardDeliveryRecord, type FeishuCardKitCancel, type FeishuCardKitClient, type FeishuCardKitFail, type FeishuCardKitFinish, type FeishuCardKitOpenApiClientOptions, type FeishuCardKitOpenApiTargetCreatorOptions, type FeishuCardKitPresentationUpdate, type FeishuCardKitPublisher, type FeishuCardKitPublisherOptions, type FeishuCardKitTextUpdate, type FeishuCardPresentationBinder, type FeishuCardPresentationHandoffStart, FeishuCardPresentationNotFound, type FeishuCardPresentationStore, type FeishuCardPresentationStoreOptions, type FeishuCardRollover, type FeishuCardRolloverCounters, type FeishuCardRolloverEvent, type FeishuCardRolloverEventType, type FeishuCardRolloverHandoffResult, type FeishuCardRolloverOptions, type FeishuCardRolloverStatus, type FeishuCardRolloverSupervisor, type FeishuCardRolloverSupervisorOptions, type FeishuCardTarget, type FeishuCardTargetCreateOptions, type FeishuCardTargetCreator, FeishuCardTargetNotFound, type FeishuCardTargetPreparationOptions, type FeishuCardTargetRegistry, type FeishuCardTargetRegistryOperation, FeishuCardTargetRegistryStoreError, type FeishuCoalescingPublisher, type FeishuCoalescingPublisherOptions, type FeishuConversationReference, FeishuCotProtocolError, type FeishuCotPublisher, type FeishuCotPublisherOptions, type FeishuCotRunPreparation, type FeishuDeploymentEndpointOptions, FeishuEndpointCredentialError, type FeishuEndpointCredentials, type FeishuEndpointGroupPolicy, type FeishuEventHandlerCardActions, type FeishuEventHandlerQueue, type FeishuEventHandlers, type FeishuEventHandlersOptions, type FeishuHumanInteractionActions, type FeishuHumanInteractionPresenterOptions, type FeishuInboxCompletedState, type FeishuInboxDeadState, type FeishuInboxDelivery, type FeishuInboxDeliveryState, type FeishuInboxLeasedState, type FeishuInboxPendingState, type FeishuInboxRepository, type FeishuInboxRepositoryStateOptions, type FeishuMessageAcceptResult, type FeishuMessageContentInput, type FeishuMessageDrainResult, type FeishuMessageIntakeBaseSummary, type FeishuMessageIntakeError, type FeishuMessageIntakeOptions, type FeishuMessageIntakeSummary, type FeishuMessagePreparedControl, type FeishuMessageQueue, type FeishuMessageQueueOptions, type FeishuMessageReactionSender, type FeishuMessageWorker, type FeishuMessageWorkerDrainAvailableResult, type FeishuMessageWorkerOptions, type FeishuMessageWorkerQueue, type FeishuNewSessionCommand, type FeishuNewSessionMessageIntakeSummary, type FeishuOpenApiClient, FeishuOpenApiError, type FeishuOpenApiRequest, type FeishuOpenApiResponse, type FeishuPeriodicFlush, type FeishuPeriodicFlushOptions, type FeishuPeriodicFlushSupervisor, type FeishuPresentationPreparationOptions, type FeishuPromptAgentCommand, type FeishuPromptContextInput, type FeishuPromptContextResolver, type FeishuPromptMessageIntakeSummary, type FeishuRawCardJson, type FeishuReceiveAcceptedObservation, type FeishuReceiveHandledObservation, type FeishuReceiveMessageHandlerPayload, type FeishuReceiveMessagePayload, type FeishuReceiveMessageReplayOptions, type FeishuReceiveMessageReplayResult, type FeishuReceiveMessageSummary, type FeishuReceiveRuntimeStatus, type FeishuResolveInteractionCommand, type FeishuSdkReceiveMessagePayload, type FeishuSessionEpochRecord, type FeishuSessionReference, type FeishuSessionResetResult, type FeishuSessionStore, type FeishuSessionStoreOptions, type FeishuStreamAction, type FeishuStreamActionPublisher, type FeishuStreamProjector, FeishuTenantAccessTokenError, type FeishuTenantAccessTokenProvider, type FeishuTenantAccessTokenProviderOptions, type FeishuTenantAccessTokenRequest, type FeishuTenantAccessTokenResponse, type FeishuTextReplySender, type FeishuTopicContextResolverOptions, type FeishuWebSocketClient, type FeishuWebSocketClientStartOptions, type FeishuWebSocketDaemon, type FeishuWebSocketDaemonOptions, type FeishuWebSocketEventDispatcher, type FeishuWebSocketRuntime, type FeishuWorkerLoop, type FeishuWorkerLoopOptions, type FetchLike, type FetchLikeResponse, type HumanInteraction, type HumanInteractionActor, type HumanInteractionBase, type HumanInteractionClock, type HumanInteractionEndpointRegistry, type HumanInteractionFact, type HumanInteractionId, type HumanInteractionPresenter, type HumanInteractionRepository, HumanInteractionRepositoryError, type HumanInteractionResolutionAction, type HumanInteractionService, type HumanInteractionServiceOptions, type HumanInteractionTransition, HumanInteractionTransitionDenied, InvalidAutomationPresentation, InvalidFeishuCardAction, InvalidFeishuMessageContent, InvalidFeishuSessionReference, InvalidFeishuTopicContext, InvalidInvocationAuthority, InvalidProjectSkillCatalog, InvalidRecoveryAction, InvalidRivusEndpointBinding, InvalidRivusPlugin, InvalidRivusProjectSpace, InvalidStableJson, InvalidToolInput, InvalidWorkspaceRoot, type InvocationAuthority, type InvocationAuthorityRef, type JsonFetchRequestOptions, type JsonFileFeishuCardTargetRegistryOptions, type JsonHttpRequest, type JsonHttpResponse, type JsonlAgentEventLogOptions, type JsonlFeishuCardDeliveryLedgerOptions, type JsonlFeishuInboxRepositoryOptions, type JsonlHumanInteractionRepositoryOptions, type JsonlRecoveryControlOptions, type LangfuseAgentTelemetry, type LangfuseTelemetryConfig, LangfuseTelemetryConfigError, type LangfuseTelemetryContentMode, type LangfuseTelemetryEnv, type LoadRivusDeploymentManifestOptions, type LoadRivusDeploymentOptions, type LoadedRivusDeployment, type LocalCliAgentInvocationOrigin, MEMORY_SCOPES, type MemoryBinding, type MemoryInvocationAudience, MemoryRecord, type MemoryScope, type MemorySearchQuery, type MemoryState, type MemoryTombstoneReceipt, type MergePiProviderBaseUrlOverrideOptions, type ModelPresentationStep, OpenClawEnvImportError, type OpenClawEnvImportOptions, type OpenClawEnvImportResult, type OpenJsonAutomationTickRepositoryOptions, type OpenJsonFeishuSessionStoreOptions, type OpenTelemetryAgentEventSinkOptions, type OpenTelemetryAgentTelemetry, type PendingHumanInteractionState, type PiAgentLoopOptions, type PiAgentSession, type PiAgentSessionEvent, type PiAgentSessionHandle, type PiCreateAgentSessionResult, type PiSdkAgentLoopOptions, type PiSessionRegistry, type PiSessionRegistryOptions, PluginStateConflict, type PluginStateRecord, type PluginStateStore, type PooledAgentRuntime, type PresentationStep, type PresentationStepStatus, type PresentedValue, type PresentedValueOptions, type ProjectMemoryPromptInput, type ProjectMemoryRecallIdentity, type ProjectMemoryRecallOptions, type ProjectSkillCatalogDiagnostic, type ProjectSkillCatalogEntry, type PromptCommand, type PutPluginState, RIVUS_MEMORY_TOOL_ID, RIVUS_MEMORY_TOOL_PLUGIN_ID, RIVUS_MEMORY_TOOL_VERSION, RIVUS_PLUGIN_API_VERSION, RIVUS_RUNTIME_TOOL_IDS, RUN_PRESENTATION_SCHEMA_VERSION, type RateLimitedFeishuPublisherOptions, type RecoveryAction, type RecoveryControl, type RecoveryControlOptions, type RecoverySnapshot, type RegisteredRivusAgentProfile, type RegisteredRivusAutomation, type RegisteredRivusPlugin, type RegisteredRivusSkill, type RegisteredRivusTool, type RejectedHumanInteractionState, type RequestToolApprovalInput, type RequestUserDecisionInput, type ResolveHumanInteractionInput, type ResolvedRivusAgentDefinition, type ResolvedRivusAutomationDefinition, type ResolvedRivusProjectSpace, type ResponsePresentationStep, type RivusAgentDeployment, type RivusAgentDeploymentStatus, type RivusAgentHost, type RivusAgentHostOptions, type RivusAgentProfile, type RivusAutomationDelivery, type RivusAutomationDeliveryTargetType, type RivusAutomationDeployment, type RivusAutomationInput, type RivusAutomationOutput, type RivusAutomationTemplate, type RivusAutomationTickContext, type RivusBackgroundSessionsDeployment, type RivusDaemonBootstrapContext, type RivusDaemonBootstrapFactory, type RivusDaemonBootstrapModule, type RivusDaemonCliOptions, type RivusDaemonCliWriter, type RivusDaemonConfig, RivusDaemonConfigError, type RivusDaemonConfigLoaderOptions, type RivusDaemonEnv, type RivusDaemonFeishuReplayRunner, type RivusDaemonProcess, type RivusDaemonProcessOptions, type RivusDaemonPromptRunner, type RivusDaemonRecoveryRunner, type RivusDaemonShutdownController, type RivusDaemonShutdownControllerOptions, type RivusDaemonShutdownSignal, type RivusDaemonSignalSource, type RivusDaemonStatus, type RivusDaemonStatusHttpServer, type RivusDaemonStatusHttpServerOptions, type RivusDaemonStatusReporter, type RivusDaemonStatusReporterOptions, type RivusDaemonTransport, type RivusDaemonWorkerLoop, type RivusDeploymentAutomation, type RivusDeploymentAutomationLifecycle, RivusDeploymentAutomationReadinessError, type RivusDeploymentAutomationStatus, type RivusDeploymentBackgroundSession, type RivusDeploymentBackgroundSessionLifecycle, RivusDeploymentBackgroundSessionReadinessError, type RivusDeploymentBackgroundSessionStatus, type RivusDeploymentBootstrapAdapters, type RivusDeploymentBootstrapContext, type RivusDeploymentBootstrapFactory, type RivusDeploymentCliProcess, type RivusDeploymentComponentLifecycle, type RivusDeploymentDaemon, type RivusDeploymentDaemonLifecycle, RivusDeploymentDaemonLifecycleError, type RivusDeploymentDaemonStatus, type RivusDeploymentEndpoint, type RivusDeploymentEndpointLifecycle, type RivusDeploymentEndpointStatus, type RivusDeploymentManifest, RivusDeploymentManifestError, RivusDeploymentReadinessError, type RivusEndpointDefinition, type RivusEndpointDeployment, type RivusEndpointExperimentalFeatures, type RivusEndpointInput, type RivusEnvFileVariables, type RivusHostToolDescriptor, type RivusMemoryTool, type RivusPlugin, type RivusPluginCatalog, type RivusPluginCatalogSnapshot, RivusPluginConformanceError, type RivusPluginConformanceInput, type RivusPluginConformanceReport, type RivusPluginDeclaration, type RivusPluginLifecycleProbe, RivusPluginLoadError, type RivusPluginLoadStatus, type RivusPluginManifest, type RivusPluginModule, type RivusPluginModuleLoadRequest, type RivusPluginRegistry, type RivusProjectSpaceDeployment, type RivusResolvedToolDescriptor, type RivusRuntimeToolGrantSet, type RivusRuntimeToolId, type RivusSkillDescriptor, type RivusSkillGrantSet, type RivusTextFileReader, type RivusThinkingLevel, type RivusToolDescriptor, type RivusToolExecutionContext, type RivusToolExecutor, type RivusToolFactoryContext, type RivusToolGrantSet, type RivusToolIdempotency, RivusToolInputRejected, type RivusToolRisk, type RunIdGenerator, type RunPresentation, type RunPresentationPhase, type RunPresentationProjector, type ScheduledAutomation, type ScheduledAutomationClock, type ScheduledAutomationDeliveryInput, type ScheduledAutomationOptions, type ScheduledAutomationRunInput, type ScheduledAutomationRunResult, type SelectedHumanInteractionState, type SessionKey, type SessionScheduler, SessionSchedulerCapacityExceeded, SessionSchedulerDisposed, type SessionSchedulerOptions, type SessionSchedulerStatus, type SkillPresentationStep, type SpawnSubagentRequest, type SubagentCoordinator, type SubagentRecord, type TelemetryContentRedactor, type TelemetryContentRedactorOptions, type TerminalAgentDomainEvent, type TextAgentLoopCallback, type TextAgentLoopOptions, type ToolApprovalBinding, type ToolApprovalInteraction, type ToolApprovalInteractionState, type ToolApprovalRequest, type ToolApprovalService, type ToolBroker, type ToolBrokerOptions, type ToolExecutionRequest, ToolInvocationDenied, type ToolOperationBeginResult, type ToolOperationBinding, type ToolOperationInspectResult, type ToolOperationLedger, type ToolOperationReconciliation, type ToolOperationReconciliationOutcome, type ToolOperationRecord, type ToolOperationRecoveryItem, type ToolOperationResolutionResult, type ToolOperationState, type ToolPresentationStep, UnsupportedFeishuCardAction, UnsupportedFeishuMessage, type UserDecisionInteraction, type UserDecisionInteractionState, type UserDecisionOption, type WorkspaceInstructionSource, type WorkspaceInstructionsDiagnostic, type WorkspaceInstructionsDiagnosticCode, type WorkspaceInstructionsProvider, type WorkspaceInstructionsRequest, WorkspaceInstructionsSourceError, type WorkspaceInstructionsView, type WorkspaceRootHandle, acceptsCardPresentationProgress, activeCardPresentation, appendBackgroundSessionInput, assembleAgentContext, assertRivusPluginConforms, backgroundSessionToolIds, claimBackgroundSession, commitAutomationOutcome, completeBackgroundSessionStep, completeBackgroundSessionStop, composeFeishuTopicPrompt, createAgentCommandFromFeishuCardAction, createAgentCommandFromFeishuMessage, createAgentConversationMessages, createAgentDomainEventHandler, createAgentDomainEventSink, createAgentDomainEventSinkFromCallback, createAgentHarness, createAgentHarnessClient, createAgentHarnessPooledRuntime, createAgentInstanceRegistry, createAgentLoopFromCallback, createAgentLoopModelExecutionEnd, createAgentLoopModelExecutionStart, createAgentLoopPromptTransformer, createAgentLoopSkillExecutionEnd, createAgentLoopSkillExecutionStart, createAgentLoopTextDelta, createAgentLoopThinkingDelta, createAgentLoopToolExecutionEnd, createAgentLoopToolExecutionStart, createAgentLoopToolExecutionUpdate, createAgentLoopTurnStart, createAgentMemoryService, createAgentRunUpdateHandler, createAgentRuntime, createAgentRuntimePool, createAgentTranscriptMessages, createAgentTranscriptTurn, createAgentsMdInstructionsProvider, createAsyncIterableAgentLoop, createAutomationMandateStore, createAutomationPresentation, createBackgroundSession, createBackgroundSessionCard, createBackgroundSessionDeliveryStore, createBackgroundSessionHostTools, createBackgroundSessionKey, createBackgroundSessionRepository, createBackgroundSessionService, createBackgroundSessionStepSourceMessageId, createBackgroundSessionSupervisor, createBackgroundSessionToolContracts, createCoalescingFeishuPublisher, createCompactionService, createCompositeRivusDaemonTransport, createConfiguredFeishuAutomationCardSender, createConfiguredFeishuBackgroundSessionDelivery, createConfiguredFeishuCardKitPublisher, createConfiguredFeishuCardKitTargetCreator, createConfiguredFeishuCardRolloverRuntime, createConfiguredFeishuHumanInteractionPresenter, createConfiguredFeishuMessageReactionSender, createConfiguredFeishuOpenApiClient, createConfiguredFeishuTextReplySender, createConfiguredRivusDaemonBootstrap, createConfiguredRivusDeploymentDaemon, createDailyAutomationSchedule, createDefaultAgentHarness, createDefaultAgentHarnessClient, createDefaultAgentHarnessClientFromCallback, createDefaultAgentHarnessClientFromTextCallback, createDefaultAgentHarnessFromCallback, createDefaultAgentHarnessFromTextCallback, createDefaultAgentRuntime, createDefaultAgentRuntimeFromCallback, createDefaultAgentRuntimeFromTextCallback, createDelegationService, createDeliveryOutbox, createEventAgentLoop, createFakeRivusPlugin, createFeishuAgentDaemon, createFeishuAgentRunCard, createFeishuAgentRuntime, createFeishuCardActionCallbackResponse, createFeishuCardActionErrorResponse, createFeishuCardDeliveryLedger, createFeishuCardDeliveryReconciler, createFeishuCardKitOpenApiClient, createFeishuCardKitOpenApiTargetCreator, createFeishuCardKitPublisher, createFeishuCardPresentationStore, createFeishuCardRollover, createFeishuCardRolloverSupervisor, createFeishuCardTargetPreparation, createFeishuConversationId, createFeishuCotPublisher, createFeishuDeploymentEndpoint, createFeishuEventHandlers, createFeishuHumanInteractionCard, createFeishuHumanInteractionPresenter, createFeishuInboxRepository, createFeishuMessageQueue, createFeishuMessageWorker, createFeishuOpenApiClient, createFeishuPeriodicFlush, createFeishuPresentationPreparation, createFeishuSessionKey, createFeishuSessionStore, createFeishuStreamProjector, createFeishuTenantAccessTokenProvider, createFeishuTopicContextResolver, createFeishuWebSocketDaemon, createFeishuWorkerLoop, createFixedClock, createHumanInteractionEndpointRegistry, createHumanInteractionModelChangeApproval, createHumanInteractionService, createHumanInteractionToolApprovalGateway, createInMemoryFeishuCardTargetRegistry, createInMemoryHumanInteractionRepository, createInvocationAuthority, createJsonFetchRequest, createJsonFileFeishuCardTargetRegistry, createJsonlAgentEventLog, createJsonlHumanInteractionRepository, createLangfuseAgentTelemetry, createLazyFeishuWebSocketEventDispatcher, createMemoryNamespace, createOpenTelemetryAgentEventSink, createOpenTelemetryAgentTelemetry, createPiAgentLoop, createPiSdkAgentLoop, createPiSessionRegistry, createPluginStateStore, createPresentedValue, createProjectMemoryPromptPreparer, createRateLimitedFeishuPublisher, createRecoveryAction, createRecoveryControl, createRivusAgentHost, createRivusDaemonProcess, createRivusDaemonShutdownController, createRivusDaemonStatusHttpServer, createRivusDaemonStatusReporter, createRivusDeploymentCliProcess, createRivusDeploymentDaemon, createRivusEnvFromOpenClawConfig, createRivusMemoryTool, createRivusMemoryToolContract, createRivusMemoryToolDescriptor, createRivusPluginCatalog, createRoutedHumanInteractionToolApprovalService, createRunPresentationProjector, createScheduledAutomation, createSequenceRunIds, createSessionScheduler, createSubagentCoordinator, createSystemClock, createTelemetryContentRedactor, createTestClock, createTextAgentLoop, createTextAgentLoopFromCallback, createToolBroker, createToolInputDigest, createToolOperationLedger, createUuidRunIds, createWorkspaceRootHandle, describeFeishuMessageIntake, evolveAgentRun, extendBackgroundSessionDefinition, failBackgroundSessionStep, formatRivusEnvFile, hasInspectableRunProgress, initialAgentRunState, intersectToolIds, isAgentToolExecutionEvent, isAssistantTextDeltaEvent, isAssistantThinkingDeltaEvent, isBackgroundSessionDue, isBackgroundSessionLeaseExpired, isBackgroundSessionState, isBackgroundSessionTerminalPhase, isBackgroundSessionToolId, isCardPresentationHandoffDue, isRivusRuntimeToolId, isTerminalAgentDomainEvent, isTerminalAgentRunPhase, loadNodeRivusPluginModule, loadRivusDaemonConfig, loadRivusDeployment, loadRivusDeploymentManifest, mergePiProviderBaseUrlOverride, narrowBackgroundSessionDefinition, normalizeStableJson, openJsonAutomationTickRepository, openJsonFeishuSessionStore, openJsonlAgentMemoryService, openJsonlBackgroundSessionDeliveryStore, openJsonlBackgroundSessionRepository, openJsonlFeishuCardDeliveryLedger, openJsonlFeishuInboxRepository, openJsonlRecoveryControl, openJsonlToolOperationLedger, parkBackgroundSessionForReconciliation, progressDeliveryId, readAutomationPresentation, readFeishuMessageContent, releaseBackgroundSessionLease, renewBackgroundSessionLease, replayAgentHistory, replayAgentTranscript, requestBackgroundSessionStop, requeueInterruptedBackgroundSessionStep, requiresToolApproval, resolveBackgroundSessionReconciliation, resolveBackgroundSessionSupervisorIntervalMs, resolveFeishuDeliveryChatId, resolveFeishuEndpointCredentials, resolveLangfuseTelemetryConfig, resolveRivusAgentDefinition, resolveRivusProjectSpace, restoreAgentHistory, restoreConfiguredRivusDaemonBootstrap, restrictMemoryScopesForAudience, runRivusDaemonCli, sessionIdFromSessionKey, shouldAcceptFeishuEndpointMessage, suspendBackgroundSession, terminalDeliveryId, transitionHumanInteraction, validateProjectSkillCatalog, validateProjectSkillCommand, validateRivusDeploymentManifest };
1
+ import { RIVUS_PLUGIN_API_VERSION, RivusAgentDeployment, RivusAgentProfile, RivusAutomationInput, RivusAutomationOutput, RivusAutomationTemplate, RivusAutomationTickContext, RivusPlugin, RivusPluginManifest, RivusPluginRegistry } from "@rivus/gateway";
2
+ import { RivusRuntimeToolId, RivusSkillDescriptor, RivusToolDescriptor, RivusToolExecutionContext, RivusToolExecutor, RivusToolFactoryContext, RivusToolIdempotency, RivusToolInputRejected, RivusToolRisk } from "@rivus/runtime";
3
+ export { RIVUS_PLUGIN_API_VERSION, type RivusAgentDeployment, type RivusAgentProfile, type RivusAutomationInput, type RivusAutomationOutput, type RivusAutomationTemplate, type RivusAutomationTickContext, type RivusPlugin, type RivusPluginManifest, type RivusPluginRegistry, type RivusRuntimeToolId, type RivusSkillDescriptor, type RivusToolDescriptor, type RivusToolExecutionContext, type RivusToolExecutor, type RivusToolFactoryContext, type RivusToolIdempotency, RivusToolInputRejected, type RivusToolRisk };
package/dist/index.js CHANGED
@@ -1,5 +1,3 @@
1
- import { n as assertRivusPluginConforms, r as createFakeRivusPlugin, t as RivusPluginConformanceError } from "./chunks/rivus-plugin-testkit.js";
2
- import { AUTOMATION_PRESENTATION_SCHEMA_VERSION, AUTOMATION_SUPPRESSION_PREFIX, AgentInstanceBusy, AgentInstanceConflict, AgentMemoryError, AgentRuntimeDisposed, AutomationMandateError, BACKGROUND_SESSION_DELIVERY_JSONL_VERSION, BACKGROUND_SESSION_JSONL_VERSION, BACKGROUND_SESSION_SESSION_KEY_PREFIX, BACKGROUND_SESSION_START_TOOL_ID, BACKGROUND_SESSION_TOOL_IDS, BACKGROUND_SESSION_TOOL_PLUGIN_ID, BACKGROUND_SESSION_TOOL_VERSION, BackgroundSessionCallerDenied, BackgroundSessionDeliveryConflict, BackgroundSessionRepositoryConflict, BackgroundSessionRepositoryCorrupted, BackgroundSessionTransitionDenied, CardPresentationTransitionDenied, DEFAULT_BACKGROUND_SESSION_LEASE_MS, DEFAULT_BACKGROUND_SESSION_LEASE_RENEWAL_INTERVAL_MS, DEFAULT_BACKGROUND_SESSION_LIFETIME_MS, DEFAULT_BACKGROUND_SESSION_MAX_CONCURRENT_SESSIONS, DEFAULT_BACKGROUND_SESSION_MAX_CONSECUTIVE_FAILURES, DEFAULT_BACKGROUND_SESSION_RETRY_BACKOFF_MS, DEFAULT_BACKGROUND_SESSION_STEP_TIMEOUT_MS, DEFAULT_BACKGROUND_SESSION_SUPERVISOR_INTERVAL_MS, DEFAULT_CARD_STREAM_LEASE_MS, DEFAULT_CONVERSATION_PROGRESS_DISPLAY, DelegationDenied, DeliveryOutboxError, FEISHU_AGENT_CARD_ELEMENT_ID, FEISHU_AGENT_CARD_PROGRESS_ELEMENT_ID, FeishuCardPresentationNotFound, FeishuCardTargetNotFound, FeishuCardTargetRegistryStoreError, FeishuCotProtocolError, FeishuEndpointCredentialError, FeishuOpenApiError, FeishuTenantAccessTokenError, HumanInteractionRepositoryError, HumanInteractionTransitionDenied, InvalidAutomationPresentation, InvalidFeishuCardAction, InvalidFeishuMessageContent, InvalidFeishuSessionReference, InvalidFeishuTopicContext, InvalidRivusEndpointBinding, InvalidRivusPlugin, InvalidRivusProjectSpace, OpenClawEnvImportError, PluginStateConflict, RIVUS_PLUGIN_API_VERSION, RUN_PRESENTATION_SCHEMA_VERSION, RivusDaemonConfigError, RivusDeploymentAutomationReadinessError, RivusDeploymentBackgroundSessionReadinessError, RivusDeploymentDaemonLifecycleError, RivusDeploymentManifestError, RivusDeploymentReadinessError, RivusPluginLoadError, SessionSchedulerCapacityExceeded, SessionSchedulerDisposed, ToolInvocationDenied, UnsupportedFeishuCardAction, UnsupportedFeishuMessage, acceptsCardPresentationProgress, activeCardPresentation, appendBackgroundSessionInput, backgroundSessionToolIds, claimBackgroundSession, commitLegacyAutomationOutcome as commitAutomationOutcome, completeBackgroundSessionStep, completeBackgroundSessionStop, composeFeishuTopicPrompt, createAgentCommandFromFeishuCardAction, createAgentCommandFromFeishuMessage, createAgentHarnessPooledRuntime, createAgentInstanceRegistry, createAgentMemoryService, createAgentRuntimePool, createAgentsMdInstructionsProvider, createAutomationMandateStore, createAutomationPresentation, createBackgroundSession, createBackgroundSessionCard, createBackgroundSessionDeliveryStore, createBackgroundSessionHostTools, createBackgroundSessionKey, createBackgroundSessionRepository, createBackgroundSessionStepSourceMessageId, createBackgroundSessionSupervisor, createBackgroundSessionToolContracts, createCoalescingFeishuPublisher, createCompositeRivusDaemonTransport, createConfiguredFeishuAutomationCardSender, createConfiguredFeishuBackgroundSessionDelivery, createConfiguredFeishuCardKitPublisher, createConfiguredFeishuCardKitTargetCreator, createConfiguredFeishuCardRolloverRuntime, createConfiguredFeishuHumanInteractionPresenter, createConfiguredFeishuMessageReactionSender, createConfiguredFeishuOpenApiClient, createConfiguredFeishuTextReplySender, createConfiguredRivusDaemonBootstrap, createConfiguredRivusDeploymentDaemon, createDailyAutomationSchedule, createDelegationService, createDeliveryOutbox, createFeishuAgentDaemon, createFeishuAgentRunCard, createFeishuAgentRuntime, createFeishuCardActionCallbackResponse, createFeishuCardActionErrorResponse, createFeishuCardDeliveryLedger, createFeishuCardDeliveryReconciler, createFeishuCardKitOpenApiClient, createFeishuCardKitOpenApiTargetCreator, createFeishuCardKitPublisher, createFeishuCardPresentationStore, createFeishuCardRollover, createFeishuCardRolloverSupervisor, createFeishuCardTargetPreparation, createFeishuConversationId, createFeishuCotPublisher, createFeishuDeploymentEndpoint, createFeishuEventHandlers, createFeishuHumanInteractionCard, createFeishuHumanInteractionPresenter, createFeishuInboxRepository, createFeishuMessageQueue, createFeishuMessageWorker, createFeishuOpenApiClient, createFeishuPeriodicFlush, createFeishuPresentationPreparation, createFeishuSessionKey, createFeishuSessionStore, createFeishuStreamProjector, createFeishuTenantAccessTokenProvider, createFeishuTopicContextResolver, createFeishuWebSocketDaemon, createFeishuWorkerLoop, createHumanInteractionEndpointRegistry, createHumanInteractionModelChangeApproval, createHumanInteractionToolApprovalGateway, createInMemoryFeishuCardTargetRegistry, createInMemoryHumanInteractionRepository, createJsonFetchRequest, createJsonFileFeishuCardTargetRegistry, createJsonlHumanInteractionRepository, createLazyFeishuWebSocketEventDispatcher, createLegacyBackgroundSessionService as createBackgroundSessionService, createLegacyHumanInteractionService as createHumanInteractionService, createPluginStateStore, createPresentedValue, createRateLimitedFeishuPublisher, createRecoveryControl, createRivusAgentHost, createRivusDaemonProcess, createRivusDaemonShutdownController, createRivusDaemonStatusHttpServer, createRivusDaemonStatusReporter, createRivusDeploymentCliProcess, createRivusDeploymentDaemon, createRivusEnvFromOpenClawConfig, createRivusPluginCatalog, createRoutedHumanInteractionToolApprovalService, createRunPresentationProjector, createScheduledAutomation, createSessionScheduler, createSubagentCoordinator, createToolBroker, describeFeishuMessageIntake, extendBackgroundSessionDefinition, failBackgroundSessionStep, formatRivusEnvFile, hasInspectableRunProgress, intersectToolIds, isBackgroundSessionDue, isBackgroundSessionLeaseExpired, isBackgroundSessionState, isBackgroundSessionTerminalPhase, isBackgroundSessionToolId, isCardPresentationHandoffDue, loadNodeRivusPluginModule, loadRivusDaemonConfig, loadRivusDeployment, loadRivusDeploymentManifest, narrowBackgroundSessionDefinition, openJsonAutomationTickRepository, openJsonFeishuSessionStore, openJsonlAgentMemoryService, openJsonlBackgroundSessionDeliveryStore, openJsonlBackgroundSessionRepository, openJsonlFeishuCardDeliveryLedger, openJsonlFeishuInboxRepository, openJsonlRecoveryControl, openJsonlToolOperationLedger, parkBackgroundSessionForReconciliation, progressDeliveryId, readAutomationPresentation, readFeishuMessageContent, releaseBackgroundSessionLease, renewBackgroundSessionLease, requestBackgroundSessionStop, requeueInterruptedBackgroundSessionStep, resolveBackgroundSessionReconciliation, resolveBackgroundSessionSupervisorIntervalMs, resolveFeishuDeliveryChatId, resolveFeishuEndpointCredentials, resolveRivusAgentDefinition, resolveRivusProjectSpace, restoreConfiguredRivusDaemonBootstrap, runRivusDaemonCli, sessionIdFromSessionKey, shouldAcceptFeishuEndpointMessage, suspendBackgroundSession, terminalDeliveryId, transitionHumanInteraction, validateRivusDeploymentManifest } from "@rivus/gateway";
3
- import { AgentContextBudgetExceeded, AgentEventHandlerFailed, AgentEventLogStoreError, AgentEventSinkFailed, AgentHarnessBusy, AgentLoopFailed, AgentRunCancelled, InvalidRecoveryAction, InvalidWorkspaceRoot, LangfuseTelemetryConfigError, LegacyCompactionError as CompactionError, LegacyInvalidInvocationAuthority as InvalidInvocationAuthority, LegacyInvalidStableJson as InvalidStableJson, LegacyInvalidToolInput as InvalidToolInput, MEMORY_SCOPES, RIVUS_MEMORY_TOOL_ID, RIVUS_MEMORY_TOOL_PLUGIN_ID, RIVUS_MEMORY_TOOL_VERSION, RIVUS_RUNTIME_TOOL_IDS, RivusToolInputRejected, WorkspaceInstructionsSourceError, assembleAgentContext, createAgentConversationMessages, createAgentDomainEventHandler, createAgentDomainEventSink, createAgentDomainEventSinkFromCallback, createAgentHarnessClient, createAgentLoopModelExecutionEnd, createAgentLoopModelExecutionStart, createAgentLoopSkillExecutionEnd, createAgentLoopSkillExecutionStart, createAgentLoopTextDelta, createAgentLoopThinkingDelta, createAgentLoopToolExecutionEnd, createAgentLoopToolExecutionStart, createAgentLoopToolExecutionUpdate, createAgentLoopTurnStart, createAgentRunUpdateHandler, createAgentRuntime, createAgentTranscriptMessages, createAgentTranscriptTurn, createDefaultAgentHarness, createDefaultAgentHarnessClient, createDefaultAgentHarnessClientFromCallback, createDefaultAgentHarnessClientFromTextCallback, createDefaultAgentHarnessFromCallback, createDefaultAgentHarnessFromTextCallback, createDefaultAgentRuntime, createDefaultAgentRuntimeFromCallback, createDefaultAgentRuntimeFromTextCallback, createFixedClock, createJsonlAgentEventLog, createLangfuseAgentTelemetry, createLegacyAgentHarness as createAgentHarness, createLegacyAgentLoopFromCallback as createAgentLoopFromCallback, createLegacyAgentLoopPromptTransformer as createAgentLoopPromptTransformer, createLegacyAsyncIterableAgentLoop as createAsyncIterableAgentLoop, createLegacyCompactionService as createCompactionService, createLegacyEventAgentLoop as createEventAgentLoop, createLegacyInvocationAuthority as createInvocationAuthority, createLegacyMemoryNamespace as createMemoryNamespace, createLegacyProjectMemoryPromptPreparer as createProjectMemoryPromptPreparer, createLegacyRivusMemoryTool as createRivusMemoryTool, createLegacyRivusMemoryToolDescriptor as createRivusMemoryToolDescriptor, createLegacyTextAgentLoop as createTextAgentLoop, createLegacyTextAgentLoopFromCallback as createTextAgentLoopFromCallback, createLegacyToolInputDigest as createToolInputDigest, createLegacyToolOperationLedger as createToolOperationLedger, createOpenTelemetryAgentEventSink, createOpenTelemetryAgentTelemetry, createRecoveryAction, createRivusMemoryToolContract, createSequenceRunIds, createSystemClock, createTelemetryContentRedactor, createTestClock, createUuidRunIds, createWorkspaceRootHandle, evolveAgentRun, initialAgentRunState, isAgentToolExecutionEvent, isAssistantTextDeltaEvent, isAssistantThinkingDeltaEvent, isRivusRuntimeToolId, isTerminalAgentDomainEvent, isTerminalAgentRunPhase, normalizeLegacyStableJson as normalizeStableJson, replayAgentHistory, replayAgentTranscript, requiresLegacyToolApproval as requiresToolApproval, resolveLangfuseTelemetryConfig, restoreAgentHistory, restrictLegacyMemoryScopesForAudience as restrictMemoryScopesForAudience } from "@rivus/runtime";
4
- import { InvalidProjectSkillCatalog, createLegacyPiAgentLoop as createPiAgentLoop, createLegacyPiSdkAgentLoop as createPiSdkAgentLoop, createLegacyPiSessionRegistry as createPiSessionRegistry, mergePiProviderBaseUrlOverride, validateProjectSkillCatalog, validateProjectSkillCommand } from "@rivus/runtime/pi";
5
- export { AUTOMATION_PRESENTATION_SCHEMA_VERSION, AUTOMATION_SUPPRESSION_PREFIX, AgentContextBudgetExceeded, AgentEventHandlerFailed, AgentEventLogStoreError, AgentEventSinkFailed, AgentHarnessBusy, AgentInstanceBusy, AgentInstanceConflict, AgentLoopFailed, AgentMemoryError, AgentRunCancelled, AgentRuntimeDisposed, AutomationMandateError, BACKGROUND_SESSION_DELIVERY_JSONL_VERSION, BACKGROUND_SESSION_JSONL_VERSION, BACKGROUND_SESSION_SESSION_KEY_PREFIX, BACKGROUND_SESSION_START_TOOL_ID, BACKGROUND_SESSION_TOOL_IDS, BACKGROUND_SESSION_TOOL_PLUGIN_ID, BACKGROUND_SESSION_TOOL_VERSION, BackgroundSessionCallerDenied, BackgroundSessionDeliveryConflict, BackgroundSessionRepositoryConflict, BackgroundSessionRepositoryCorrupted, BackgroundSessionTransitionDenied, CardPresentationTransitionDenied, CompactionError, DEFAULT_BACKGROUND_SESSION_LEASE_MS, DEFAULT_BACKGROUND_SESSION_LEASE_RENEWAL_INTERVAL_MS, DEFAULT_BACKGROUND_SESSION_LIFETIME_MS, DEFAULT_BACKGROUND_SESSION_MAX_CONCURRENT_SESSIONS, DEFAULT_BACKGROUND_SESSION_MAX_CONSECUTIVE_FAILURES, DEFAULT_BACKGROUND_SESSION_RETRY_BACKOFF_MS, DEFAULT_BACKGROUND_SESSION_STEP_TIMEOUT_MS, DEFAULT_BACKGROUND_SESSION_SUPERVISOR_INTERVAL_MS, DEFAULT_CARD_STREAM_LEASE_MS, DEFAULT_CONVERSATION_PROGRESS_DISPLAY, DelegationDenied, DeliveryOutboxError, FEISHU_AGENT_CARD_ELEMENT_ID, FEISHU_AGENT_CARD_PROGRESS_ELEMENT_ID, FeishuCardPresentationNotFound, FeishuCardTargetNotFound, FeishuCardTargetRegistryStoreError, FeishuCotProtocolError, FeishuEndpointCredentialError, FeishuOpenApiError, FeishuTenantAccessTokenError, HumanInteractionRepositoryError, HumanInteractionTransitionDenied, InvalidAutomationPresentation, InvalidFeishuCardAction, InvalidFeishuMessageContent, InvalidFeishuSessionReference, InvalidFeishuTopicContext, InvalidInvocationAuthority, InvalidProjectSkillCatalog, InvalidRecoveryAction, InvalidRivusEndpointBinding, InvalidRivusPlugin, InvalidRivusProjectSpace, InvalidStableJson, InvalidToolInput, InvalidWorkspaceRoot, LangfuseTelemetryConfigError, MEMORY_SCOPES, OpenClawEnvImportError, PluginStateConflict, RIVUS_MEMORY_TOOL_ID, RIVUS_MEMORY_TOOL_PLUGIN_ID, RIVUS_MEMORY_TOOL_VERSION, RIVUS_PLUGIN_API_VERSION, RIVUS_RUNTIME_TOOL_IDS, RUN_PRESENTATION_SCHEMA_VERSION, RivusDaemonConfigError, RivusDeploymentAutomationReadinessError, RivusDeploymentBackgroundSessionReadinessError, RivusDeploymentDaemonLifecycleError, RivusDeploymentManifestError, RivusDeploymentReadinessError, RivusPluginConformanceError, RivusPluginLoadError, RivusToolInputRejected, SessionSchedulerCapacityExceeded, SessionSchedulerDisposed, ToolInvocationDenied, UnsupportedFeishuCardAction, UnsupportedFeishuMessage, WorkspaceInstructionsSourceError, acceptsCardPresentationProgress, activeCardPresentation, appendBackgroundSessionInput, assembleAgentContext, assertRivusPluginConforms, backgroundSessionToolIds, claimBackgroundSession, commitAutomationOutcome, completeBackgroundSessionStep, completeBackgroundSessionStop, composeFeishuTopicPrompt, createAgentCommandFromFeishuCardAction, createAgentCommandFromFeishuMessage, createAgentConversationMessages, createAgentDomainEventHandler, createAgentDomainEventSink, createAgentDomainEventSinkFromCallback, createAgentHarness, createAgentHarnessClient, createAgentHarnessPooledRuntime, createAgentInstanceRegistry, createAgentLoopFromCallback, createAgentLoopModelExecutionEnd, createAgentLoopModelExecutionStart, createAgentLoopPromptTransformer, createAgentLoopSkillExecutionEnd, createAgentLoopSkillExecutionStart, createAgentLoopTextDelta, createAgentLoopThinkingDelta, createAgentLoopToolExecutionEnd, createAgentLoopToolExecutionStart, createAgentLoopToolExecutionUpdate, createAgentLoopTurnStart, createAgentMemoryService, createAgentRunUpdateHandler, createAgentRuntime, createAgentRuntimePool, createAgentTranscriptMessages, createAgentTranscriptTurn, createAgentsMdInstructionsProvider, createAsyncIterableAgentLoop, createAutomationMandateStore, createAutomationPresentation, createBackgroundSession, createBackgroundSessionCard, createBackgroundSessionDeliveryStore, createBackgroundSessionHostTools, createBackgroundSessionKey, createBackgroundSessionRepository, createBackgroundSessionService, createBackgroundSessionStepSourceMessageId, createBackgroundSessionSupervisor, createBackgroundSessionToolContracts, createCoalescingFeishuPublisher, createCompactionService, createCompositeRivusDaemonTransport, createConfiguredFeishuAutomationCardSender, createConfiguredFeishuBackgroundSessionDelivery, createConfiguredFeishuCardKitPublisher, createConfiguredFeishuCardKitTargetCreator, createConfiguredFeishuCardRolloverRuntime, createConfiguredFeishuHumanInteractionPresenter, createConfiguredFeishuMessageReactionSender, createConfiguredFeishuOpenApiClient, createConfiguredFeishuTextReplySender, createConfiguredRivusDaemonBootstrap, createConfiguredRivusDeploymentDaemon, createDailyAutomationSchedule, createDefaultAgentHarness, createDefaultAgentHarnessClient, createDefaultAgentHarnessClientFromCallback, createDefaultAgentHarnessClientFromTextCallback, createDefaultAgentHarnessFromCallback, createDefaultAgentHarnessFromTextCallback, createDefaultAgentRuntime, createDefaultAgentRuntimeFromCallback, createDefaultAgentRuntimeFromTextCallback, createDelegationService, createDeliveryOutbox, createEventAgentLoop, createFakeRivusPlugin, createFeishuAgentDaemon, createFeishuAgentRunCard, createFeishuAgentRuntime, createFeishuCardActionCallbackResponse, createFeishuCardActionErrorResponse, createFeishuCardDeliveryLedger, createFeishuCardDeliveryReconciler, createFeishuCardKitOpenApiClient, createFeishuCardKitOpenApiTargetCreator, createFeishuCardKitPublisher, createFeishuCardPresentationStore, createFeishuCardRollover, createFeishuCardRolloverSupervisor, createFeishuCardTargetPreparation, createFeishuConversationId, createFeishuCotPublisher, createFeishuDeploymentEndpoint, createFeishuEventHandlers, createFeishuHumanInteractionCard, createFeishuHumanInteractionPresenter, createFeishuInboxRepository, createFeishuMessageQueue, createFeishuMessageWorker, createFeishuOpenApiClient, createFeishuPeriodicFlush, createFeishuPresentationPreparation, createFeishuSessionKey, createFeishuSessionStore, createFeishuStreamProjector, createFeishuTenantAccessTokenProvider, createFeishuTopicContextResolver, createFeishuWebSocketDaemon, createFeishuWorkerLoop, createFixedClock, createHumanInteractionEndpointRegistry, createHumanInteractionModelChangeApproval, createHumanInteractionService, createHumanInteractionToolApprovalGateway, createInMemoryFeishuCardTargetRegistry, createInMemoryHumanInteractionRepository, createInvocationAuthority, createJsonFetchRequest, createJsonFileFeishuCardTargetRegistry, createJsonlAgentEventLog, createJsonlHumanInteractionRepository, createLangfuseAgentTelemetry, createLazyFeishuWebSocketEventDispatcher, createMemoryNamespace, createOpenTelemetryAgentEventSink, createOpenTelemetryAgentTelemetry, createPiAgentLoop, createPiSdkAgentLoop, createPiSessionRegistry, createPluginStateStore, createPresentedValue, createProjectMemoryPromptPreparer, createRateLimitedFeishuPublisher, createRecoveryAction, createRecoveryControl, createRivusAgentHost, createRivusDaemonProcess, createRivusDaemonShutdownController, createRivusDaemonStatusHttpServer, createRivusDaemonStatusReporter, createRivusDeploymentCliProcess, createRivusDeploymentDaemon, createRivusEnvFromOpenClawConfig, createRivusMemoryTool, createRivusMemoryToolContract, createRivusMemoryToolDescriptor, createRivusPluginCatalog, createRoutedHumanInteractionToolApprovalService, createRunPresentationProjector, createScheduledAutomation, createSequenceRunIds, createSessionScheduler, createSubagentCoordinator, createSystemClock, createTelemetryContentRedactor, createTestClock, createTextAgentLoop, createTextAgentLoopFromCallback, createToolBroker, createToolInputDigest, createToolOperationLedger, createUuidRunIds, createWorkspaceRootHandle, describeFeishuMessageIntake, evolveAgentRun, extendBackgroundSessionDefinition, failBackgroundSessionStep, formatRivusEnvFile, hasInspectableRunProgress, initialAgentRunState, intersectToolIds, isAgentToolExecutionEvent, isAssistantTextDeltaEvent, isAssistantThinkingDeltaEvent, isBackgroundSessionDue, isBackgroundSessionLeaseExpired, isBackgroundSessionState, isBackgroundSessionTerminalPhase, isBackgroundSessionToolId, isCardPresentationHandoffDue, isRivusRuntimeToolId, isTerminalAgentDomainEvent, isTerminalAgentRunPhase, loadNodeRivusPluginModule, loadRivusDaemonConfig, loadRivusDeployment, loadRivusDeploymentManifest, mergePiProviderBaseUrlOverride, narrowBackgroundSessionDefinition, normalizeStableJson, openJsonAutomationTickRepository, openJsonFeishuSessionStore, openJsonlAgentMemoryService, openJsonlBackgroundSessionDeliveryStore, openJsonlBackgroundSessionRepository, openJsonlFeishuCardDeliveryLedger, openJsonlFeishuInboxRepository, openJsonlRecoveryControl, openJsonlToolOperationLedger, parkBackgroundSessionForReconciliation, progressDeliveryId, readAutomationPresentation, readFeishuMessageContent, releaseBackgroundSessionLease, renewBackgroundSessionLease, replayAgentHistory, replayAgentTranscript, requestBackgroundSessionStop, requeueInterruptedBackgroundSessionStep, requiresToolApproval, resolveBackgroundSessionReconciliation, resolveBackgroundSessionSupervisorIntervalMs, resolveFeishuDeliveryChatId, resolveFeishuEndpointCredentials, resolveLangfuseTelemetryConfig, resolveRivusAgentDefinition, resolveRivusProjectSpace, restoreAgentHistory, restoreConfiguredRivusDaemonBootstrap, restrictMemoryScopesForAudience, runRivusDaemonCli, sessionIdFromSessionKey, shouldAcceptFeishuEndpointMessage, suspendBackgroundSession, terminalDeliveryId, transitionHumanInteraction, validateProjectSkillCatalog, validateProjectSkillCommand, validateRivusDeploymentManifest };
1
+ import { RIVUS_PLUGIN_API_VERSION } from "@rivus/gateway";
2
+ import { RivusToolInputRejected } from "@rivus/runtime";
3
+ export { RIVUS_PLUGIN_API_VERSION, RivusToolInputRejected };
@@ -1,55 +1,26 @@
1
- import { a as assertRivusPluginConforms, i as RivusPluginLifecycleProbe, n as RivusPluginConformanceInput, o as createFakeRivusPlugin, r as RivusPluginConformanceReport, t as RivusPluginConformanceError } from "../chunks/rivus-plugin-testkit.js";
2
-
3
- //#region src/testing/langfuse-drive-e2e.d.ts
4
- interface LangfuseObservation {
5
- readonly id: string;
6
- readonly name: string;
7
- readonly level?: string;
8
- readonly output?: unknown;
9
- readonly parentObservationId?: string;
10
- readonly sessionId?: string;
11
- readonly startTime: string;
12
- readonly traceId: string;
13
- readonly type: string;
1
+ import { RivusAgentDeployment, RivusPlugin } from "@rivus/gateway";
2
+ //#region src/testing/rivus-plugin-testkit.d.ts
3
+ interface RivusPluginLifecycleProbe {
4
+ activate(): Promise<{
5
+ readonly dispose: () => Promise<void> | void;
6
+ readonly activeResources: () => number;
7
+ }>;
14
8
  }
15
- interface LangfuseObservationWindow {
16
- readonly deadlineAt: string;
17
- readonly fromStartTime: string;
18
- readonly sessionKey: string;
19
- readonly toStartTime: string;
9
+ interface RivusPluginConformanceInput {
10
+ readonly plugin: RivusPlugin;
11
+ readonly deployment: RivusAgentDeployment;
12
+ readonly lifecycle?: RivusPluginLifecycleProbe;
20
13
  }
21
- interface LangfuseDriveE2EDependencies {
22
- inspectDrive(url: string): Promise<unknown>;
23
- listObservations(window: LangfuseObservationWindow): Promise<ReadonlyArray<LangfuseObservation>>;
24
- now(): Date;
25
- readDriveFile(fileToken: string): Promise<string>;
26
- runAgent(input: {
27
- readonly prompt: string;
28
- readonly sessionKey: string;
29
- }): Promise<string>;
30
- sleep(milliseconds: number): Promise<void>;
14
+ interface RivusPluginConformanceReport {
15
+ readonly pluginId: string;
16
+ readonly profileId: string;
17
+ readonly profileRevision: string;
18
+ readonly toolIds: ReadonlyArray<string>;
31
19
  }
32
- interface RunLangfuseDriveE2EOptions {
33
- readonly dependencies: LangfuseDriveE2EDependencies;
34
- readonly expectedDriveContentMarker: string;
35
- readonly expectedDriveTitle: string;
36
- readonly pollIntervalMs?: number;
37
- readonly prompt: string;
38
- readonly sessionKey: string;
39
- readonly timeoutMs?: number;
20
+ export declare class RivusPluginConformanceError extends Error {
21
+ readonly name = "RivusPluginConformanceError";
40
22
  }
41
- interface LangfuseDriveE2EResult {
42
- readonly drive: {
43
- readonly title: string;
44
- readonly type: "file";
45
- readonly url: string;
46
- };
47
- readonly modelCallCount: number;
48
- readonly observationCount: number;
49
- readonly observationNames: ReadonlyArray<string>;
50
- readonly sessionKey: string;
51
- readonly traceId: string;
52
- }
53
- declare function runLangfuseDriveE2E(options: RunLangfuseDriveE2EOptions): Promise<LangfuseDriveE2EResult>;
23
+ export declare function assertRivusPluginConforms(input: RivusPluginConformanceInput): Promise<RivusPluginConformanceReport>;
24
+ export declare function createFakeRivusPlugin(): RivusPlugin;
54
25
  //#endregion
55
- export { RivusPluginConformanceError, type RivusPluginConformanceInput, type RivusPluginConformanceReport, type RivusPluginLifecycleProbe, assertRivusPluginConforms, createFakeRivusPlugin, runLangfuseDriveE2E };
26
+ export type { RivusPluginConformanceInput, RivusPluginConformanceReport, RivusPluginLifecycleProbe };
@@ -1,94 +1,63 @@
1
- import { n as assertRivusPluginConforms, r as createFakeRivusPlugin, t as RivusPluginConformanceError } from "../chunks/rivus-plugin-testkit.js";
2
- //#region src/testing/langfuse-drive-e2e.ts
3
- async function runLangfuseDriveE2E(options) {
4
- const timeoutMs = options.timeoutMs ?? 12e4;
5
- const pollIntervalMs = options.pollIntervalMs ?? 2e3;
6
- const startedAt = options.dependencies.now();
7
- const driveUrl = extractDriveFileUrl(await options.dependencies.runAgent({
8
- prompt: options.prompt,
9
- sessionKey: options.sessionKey
10
- }));
11
- const drive = readDriveInspection(await options.dependencies.inspectDrive(driveUrl));
12
- if (drive.title !== options.expectedDriveTitle) throw new Error(`Feishu Drive title mismatch: expected ${options.expectedDriveTitle}, received ${drive.title}`);
13
- if (!(await options.dependencies.readDriveFile(drive.fileToken)).includes(options.expectedDriveContentMarker)) throw new Error("Feishu Drive file does not contain the expected E2E marker");
14
- const deadline = options.dependencies.now().getTime() + timeoutMs;
15
- while (options.dependencies.now().getTime() <= deadline) {
16
- const trace = findCompleteTrace(await options.dependencies.listObservations({
17
- deadlineAt: new Date(deadline).toISOString(),
18
- fromStartTime: startedAt.toISOString(),
19
- sessionKey: options.sessionKey,
20
- toStartTime: new Date(options.dependencies.now().getTime() + 6e4).toISOString()
21
- }), options.sessionKey, driveUrl);
22
- if (trace) return {
23
- drive: {
24
- title: drive.title,
25
- type: "file",
26
- url: driveUrl
27
- },
28
- modelCallCount: trace.observations.filter(({ type }) => type === "GENERATION").length,
29
- observationCount: trace.observations.length,
30
- observationNames: trace.observations.map(({ name }) => name),
31
- sessionKey: options.sessionKey,
32
- traceId: trace.traceId
33
- };
34
- await options.dependencies.sleep(pollIntervalMs);
1
+ import { RIVUS_PLUGIN_API_VERSION, createRivusPluginCatalog, resolveRivusAgentDefinition } from "@rivus/gateway";
2
+ import { RIVUS_MEMORY_TOOL_ID } from "@rivus/runtime";
3
+ //#region src/testing/rivus-plugin-testkit.ts
4
+ var RivusPluginConformanceError = class extends Error {
5
+ name = "RivusPluginConformanceError";
6
+ };
7
+ async function assertRivusPluginConforms(input) {
8
+ const catalog = createRivusPluginCatalog();
9
+ catalog.registerPlugin(input.plugin);
10
+ const resolved = resolveRivusAgentDefinition(catalog, input.deployment);
11
+ const requested = /* @__PURE__ */ new Set([...input.deployment.tools.allow, ...input.deployment.memory?.tool === true ? [RIVUS_MEMORY_TOOL_ID] : []]);
12
+ if (resolved.toolGrantSet.toolIds.some((id) => !requested.has(id))) throw new RivusPluginConformanceError("resolved ToolGrantSet expanded beyond deployment request");
13
+ if (input.lifecycle) {
14
+ const lifecycle = await input.lifecycle.activate();
15
+ await lifecycle.dispose();
16
+ if (lifecycle.activeResources() !== 0) throw new RivusPluginConformanceError("plugin dispose leaked active resources");
35
17
  }
36
- throw new Error(`Langfuse trace did not become complete within ${timeoutMs}ms for session ${options.sessionKey}`);
37
- }
38
- function extractDriveFileUrl(output) {
39
- const match = output.match(/https:\/\/[^\s<>"']+\/file\/[a-zA-Z0-9_-]+/u);
40
- if (!match) throw new Error("Agent output does not contain a Feishu Drive file URL");
41
- return match[0];
42
- }
43
- function readDriveInspection(value) {
44
- if (!isRecord(value) || value.type !== "file" || typeof value.title !== "string" || value.title.trim() === "" || typeof value.token !== "string" || value.token.trim() === "") throw new Error("Feishu Drive inspection did not resolve a named file");
45
- if (!value.title.toLowerCase().endsWith(".html")) throw new Error("Feishu Drive inspection did not resolve an HTML file");
18
+ return Object.freeze({
19
+ pluginId: input.plugin.manifest.id,
20
+ profileId: resolved.profileId,
21
+ profileRevision: resolved.profileRevision,
22
+ toolIds: resolved.toolGrantSet.toolIds
23
+ });
24
+ }
25
+ function createFakeRivusPlugin() {
46
26
  return {
47
- fileToken: value.token,
48
- title: value.title
27
+ manifest: {
28
+ apiVersion: RIVUS_PLUGIN_API_VERSION,
29
+ id: "fake-plugin",
30
+ version: "1.0.0"
31
+ },
32
+ register: (registry) => {
33
+ registry.registerTool({
34
+ createExecutor: () => ({ execute: async () => ({ ok: true }) }),
35
+ description: "Read fake data",
36
+ digest: "sha256:fake-read",
37
+ id: "fake-plugin/read",
38
+ idempotency: "supported",
39
+ inputSchema: { type: "object" },
40
+ risk: "observe",
41
+ version: "1.0.0"
42
+ });
43
+ registry.registerSkill({
44
+ content: "Use only fake data.",
45
+ digest: "sha256:fake-skill",
46
+ id: "fake-plugin/read-skill",
47
+ title: "Fake read",
48
+ version: "1.0.0"
49
+ });
50
+ registry.registerAgentProfile({
51
+ displayName: "Fake Profile",
52
+ id: "fake-profile",
53
+ memory: { scopes: ["agent-private"] },
54
+ model: { provider: "fake" },
55
+ skills: { allow: ["fake-plugin/read-skill"] },
56
+ systemPrompt: "Read fake data.",
57
+ tools: { allow: ["fake-plugin/read"] }
58
+ });
59
+ }
49
60
  };
50
61
  }
51
- function findCompleteTrace(observations, sessionKey, driveUrl) {
52
- const byTrace = /* @__PURE__ */ new Map();
53
- for (const observation of observations) {
54
- if (observation.sessionId !== sessionKey) continue;
55
- byTrace.set(observation.traceId, [...byTrace.get(observation.traceId) ?? [], observation]);
56
- }
57
- for (const [traceId, candidates] of byTrace) {
58
- const ordered = [...candidates].sort((left, right) => left.startTime.localeCompare(right.startTime));
59
- const root = ordered.find(({ name, parentObservationId }) => name === "Agent 执行" && !parentObservationId);
60
- const turn = root ? ordered.find(({ name, parentObservationId }) => name === "Agent 处理" && parentObservationId === root.id) : void 0;
61
- if (!turn) continue;
62
- const sequence = findExpectedSequence(ordered.filter(({ parentObservationId }) => parentObservationId === turn.id));
63
- const upload = sequence?.at(-2);
64
- if (sequence && upload && upload.level !== "ERROR" && outputContainsDriveFile(upload.output, driveUrl)) return {
65
- observations: ordered,
66
- traceId
67
- };
68
- }
69
- }
70
- function findExpectedSequence(observations) {
71
- const predicates = [
72
- ({ type }) => type === "GENERATION",
73
- ({ name, type }) => type === "SPAN" && name.startsWith("技能 · "),
74
- ({ type }) => type === "GENERATION",
75
- ({ name, type }) => type === "TOOL" && isToolObservation(name, "write-html-artifact"),
76
- ({ type }) => type === "GENERATION",
77
- ({ name, type }) => type === "TOOL" && isToolObservation(name, "lark-drive-upload-html"),
78
- ({ type }) => type === "GENERATION"
79
- ];
80
- return observations.length === predicates.length && observations.every((observation, index) => predicates[index](observation)) ? observations : void 0;
81
- }
82
- function outputContainsDriveFile(output, driveUrl) {
83
- const fileToken = driveUrl.slice(driveUrl.lastIndexOf("/") + 1);
84
- if (!fileToken) return false;
85
- return typeof output === "string" ? output.includes(fileToken) : output !== void 0 && JSON.stringify(output).includes(fileToken);
86
- }
87
- function isToolObservation(name, toolName) {
88
- return name === toolName || name === `工具调用 · ${toolName}`;
89
- }
90
- function isRecord(value) {
91
- return value !== null && typeof value === "object" && !Array.isArray(value);
92
- }
93
62
  //#endregion
94
- export { RivusPluginConformanceError, assertRivusPluginConforms, createFakeRivusPlugin, runLangfuseDriveE2E };
63
+ export { RivusPluginConformanceError, assertRivusPluginConforms, createFakeRivusPlugin };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@rivus/agent",
3
- "version": "0.16.6",
4
- "description": "A local agent daemon core built around a usable agent harness and domain events.",
3
+ "version": "0.17.0",
4
+ "description": "Rivus CLI, plugin SDK and plugin conformance testkit.",
5
5
  "type": "module",
6
- "license": "MIT",
6
+ "license": "GPL-3.0-only",
7
7
  "engines": {
8
8
  "node": "^24.11.0"
9
9
  },
@@ -35,64 +35,37 @@
35
35
  "import": "./dist/index.js",
36
36
  "default": "./dist/index.js"
37
37
  },
38
- "./pi": {
39
- "types": "./dist/pi.d.ts",
40
- "import": "./dist/pi.js",
41
- "default": "./dist/pi.js"
42
- },
43
- "./acp": {
44
- "types": "./dist/acp.d.ts",
45
- "import": "./dist/acp.js",
46
- "default": "./dist/acp.js"
47
- },
48
- "./mcp": {
49
- "types": "./dist/mcp.d.ts",
50
- "import": "./dist/mcp.js",
51
- "default": "./dist/mcp.js"
52
- },
53
38
  "./testing": {
54
39
  "types": "./dist/testing/index.d.ts",
55
40
  "import": "./dist/testing/index.js",
56
41
  "default": "./dist/testing/index.js"
57
42
  },
58
- "./bootstrap/pi-feishu": {
59
- "types": "./dist/bootstrap/pi-feishu.d.ts",
60
- "import": "./dist/bootstrap/pi-feishu.js",
61
- "default": "./dist/bootstrap/pi-feishu.js"
62
- },
63
- "./plugin/starter": "./examples/rivus-starter.plugin.mjs",
64
- "./skills/runtime-management/SKILL.md": "./skills/runtime-management/SKILL.md",
65
43
  "./package.json": "./package.json"
66
44
  },
67
45
  "files": [
68
46
  "dist",
69
- "examples/*.mjs",
70
- "examples/*.bootstrap.ts",
71
- "examples/*.json",
72
47
  "README.md",
73
- "LICENSE",
74
- "skills/runtime-management/SKILL.md"
48
+ "LICENSE"
75
49
  ],
76
50
  "dependencies": {
77
- "effect": "^3.21.4",
78
- "@rivus/platform": "0.16.6",
79
- "@rivus/runtime": "0.16.6",
80
- "@rivus/gateway": "0.16.6"
51
+ "@rivus/runtime": "0.17.0",
52
+ "@rivus/gateway": "0.17.0",
53
+ "effect": "^3.22.2"
81
54
  },
82
55
  "publishConfig": {
83
56
  "access": "public"
84
57
  },
85
58
  "devDependencies": {
86
- "vite-plus": "0.2.4",
87
- "vite": "npm:@voidzero-dev/vite-plus-core@0.2.4",
59
+ "vite-plus": "1.0.0",
60
+ "vite": "npm:@voidzero-dev/vite-plus-core@1.0.0",
88
61
  "typescript": "6.0.3",
89
- "@types/node": "24.13.3",
90
- "@vitest/coverage-v8": "4.1.10",
91
- "@larksuiteoapi/node-sdk": "1.71.1"
62
+ "@typescript/native": "npm:typescript@7.0.2",
63
+ "@types/node": "24.19.0",
64
+ "@vitest/coverage-v8": "5.0.1"
92
65
  },
93
66
  "scripts": {
94
- "build": "node ../../scripts/sync-agent-assets.mjs && vp pack",
95
- "typecheck": "tsc -p tsconfig.json --noEmit",
67
+ "build": "vp pack",
68
+ "typecheck": "node node_modules/@typescript/native/bin/tsc -p tsconfig.json --noEmit",
96
69
  "test": "vp test --run"
97
70
  }
98
71
  }
package/dist/acp.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import { AcpAgentSession, AcpPermissionBridge, AcpPermissionDecision, AcpPermissionOption, AcpPermissionPolicy, AcpPermissionRequest, AcpPermissionSelection, AcpPermissionToolCall, AcpPromptResult, AcpSessionPermissionContext, AcpSessionPermissionPolicy, AcpSessionRecord, AcpSessionResumeFailed, AcpSessionResumeUnavailable, AcpSessionStore, AcpSessionUpdate, AcpToolCallStatus, JsonAcpSessionStoreOptions, LegacyAcpAgentLoopOptions as AcpAgentLoopOptions, LegacyAcpAgentServerOptions as AcpAgentServerOptions, LegacyAcpStdioAgentLoopHandle as AcpStdioAgentLoopHandle, LegacyAcpStdioAgentLoopOptions as AcpStdioAgentLoopOptions, createAcpPermissionBridge, createJsonAcpSessionStore, createLegacyAcpAgentLoop as createAcpAgentLoop, createLegacyAcpAgentServer as createAcpAgentServer, createLegacyAcpStdioAgentLoop as createAcpStdioAgentLoop, decideAcpPermission, serveLegacyAcpAgentOnStdio as serveAcpAgentOnStdio } from "@rivus/runtime/acp";
2
- export { type AcpAgentLoopOptions, type AcpAgentServerOptions, type AcpAgentSession, type AcpPermissionBridge, type AcpPermissionDecision, type AcpPermissionOption, type AcpPermissionPolicy, type AcpPermissionRequest, type AcpPermissionSelection, type AcpPermissionToolCall, type AcpPromptResult, type AcpSessionPermissionContext, type AcpSessionPermissionPolicy, type AcpSessionRecord, AcpSessionResumeFailed, AcpSessionResumeUnavailable, type AcpSessionStore, type AcpSessionUpdate, type AcpStdioAgentLoopHandle, type AcpStdioAgentLoopOptions, type AcpToolCallStatus, type JsonAcpSessionStoreOptions, createAcpAgentLoop, createAcpAgentServer, createAcpPermissionBridge, createAcpStdioAgentLoop, createJsonAcpSessionStore, decideAcpPermission, serveAcpAgentOnStdio };
package/dist/acp.js DELETED
@@ -1,2 +0,0 @@
1
- import { AcpSessionResumeFailed, AcpSessionResumeUnavailable, createAcpPermissionBridge, createJsonAcpSessionStore, createLegacyAcpAgentLoop as createAcpAgentLoop, createLegacyAcpAgentServer as createAcpAgentServer, createLegacyAcpStdioAgentLoop as createAcpStdioAgentLoop, decideAcpPermission, serveLegacyAcpAgentOnStdio as serveAcpAgentOnStdio } from "@rivus/runtime/acp";
2
- export { AcpSessionResumeFailed, AcpSessionResumeUnavailable, createAcpAgentLoop, createAcpAgentServer, createAcpPermissionBridge, createAcpStdioAgentLoop, createJsonAcpSessionStore, decideAcpPermission, serveAcpAgentOnStdio };
@@ -1,2 +0,0 @@
1
- import { createRivusDeploymentAdapters } from "@rivus/gateway/bootstrap/pi-feishu";
2
- export { createRivusDeploymentAdapters };
@@ -1,2 +0,0 @@
1
- import { createRivusDeploymentAdapters } from "@rivus/gateway/bootstrap/pi-feishu";
2
- export { createRivusDeploymentAdapters };
@@ -1,27 +0,0 @@
1
- import { RivusAgentDeployment, RivusPlugin } from "@rivus/gateway";
2
-
3
- //#region src/testing/rivus-plugin-testkit.d.ts
4
- interface RivusPluginLifecycleProbe {
5
- activate(): Promise<{
6
- readonly dispose: () => Promise<void> | void;
7
- readonly activeResources: () => number;
8
- }>;
9
- }
10
- interface RivusPluginConformanceInput {
11
- readonly plugin: RivusPlugin;
12
- readonly deployment: RivusAgentDeployment;
13
- readonly lifecycle?: RivusPluginLifecycleProbe;
14
- }
15
- interface RivusPluginConformanceReport {
16
- readonly pluginId: string;
17
- readonly profileId: string;
18
- readonly profileRevision: string;
19
- readonly toolIds: ReadonlyArray<string>;
20
- }
21
- declare class RivusPluginConformanceError extends Error {
22
- readonly name = "RivusPluginConformanceError";
23
- }
24
- declare function assertRivusPluginConforms(input: RivusPluginConformanceInput): Promise<RivusPluginConformanceReport>;
25
- declare function createFakeRivusPlugin(): RivusPlugin;
26
- //#endregion
27
- export { assertRivusPluginConforms as a, RivusPluginLifecycleProbe as i, RivusPluginConformanceInput as n, createFakeRivusPlugin as o, RivusPluginConformanceReport as r, RivusPluginConformanceError as t };