@rivus/agent 0.16.6 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -21
- package/README.md +23 -2
- package/dist/cli.d.ts +1 -1
- package/dist/index.d.ts +3 -12
- package/dist/index.js +3 -5
- package/dist/testing/index.d.ts +21 -50
- package/dist/testing/index.js +58 -89
- package/package.json +14 -41
- package/dist/acp.d.ts +0 -2
- package/dist/acp.js +0 -2
- package/dist/bootstrap/pi-feishu.d.ts +0 -2
- package/dist/bootstrap/pi-feishu.js +0 -2
- package/dist/chunks/rivus-plugin-testkit.d.ts +0 -27
- package/dist/chunks/rivus-plugin-testkit.js +0 -63
- package/dist/mcp.d.ts +0 -2
- package/dist/mcp.js +0 -6
- package/dist/pi.d.ts +0 -2
- package/dist/pi.js +0 -2
- package/examples/a-share-briefing-analysis.mjs +0 -93
- package/examples/a-share-briefing-renderer.mjs +0 -257
- package/examples/a-share-index-evidence.mjs +0 -99
- package/examples/a-share-market-briefing.mjs +0 -83
- package/examples/a-share-market-date.mjs +0 -10
- package/examples/a-share-overseas-evidence.mjs +0 -86
- package/examples/a-share-policy-evidence.mjs +0 -145
- package/examples/a-share-provider-response.mjs +0 -21
- package/examples/a-share-sector-evidence.mjs +0 -70
- package/examples/acp-stdio-proxy.mjs +0 -58
- package/examples/current-weather.mjs +0 -117
- package/examples/html-drive-tools.mjs +0 -262
- package/examples/https-response-reader.mjs +0 -36
- package/examples/langfuse-drive-e2e.mjs +0 -175
- package/examples/pi-feishu-deployment.bootstrap.ts +0 -3
- package/examples/pi-feishu.bootstrap.ts +0 -242
- package/examples/rivus-agents.plugin.mjs +0 -290
- package/examples/rivus-langfuse-demo.config.json +0 -37
- package/examples/rivus-starter.plugin.mjs +0 -47
- package/examples/rivus.config.json +0 -114
- package/skills/runtime-management/SKILL.md +0 -65
package/README.md
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
# @rivus/agent
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
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 {
|
|
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
|
-
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
|
|
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 };
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,55 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
-
readonly toStartTime: string;
|
|
9
|
+
interface RivusPluginConformanceInput {
|
|
10
|
+
readonly plugin: RivusPlugin;
|
|
11
|
+
readonly deployment: RivusAgentDeployment;
|
|
12
|
+
readonly lifecycle?: RivusPluginLifecycleProbe;
|
|
20
13
|
}
|
|
21
|
-
interface
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
33
|
-
readonly
|
|
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
|
-
|
|
42
|
-
|
|
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 {
|
|
26
|
+
export type { RivusPluginConformanceInput, RivusPluginConformanceReport, RivusPluginLifecycleProbe };
|
package/dist/testing/index.js
CHANGED
|
@@ -1,94 +1,63 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
13
|
-
if (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
function
|
|
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
|
-
|
|
48
|
-
|
|
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
|
|
63
|
+
export { RivusPluginConformanceError, assertRivusPluginConforms, createFakeRivusPlugin };
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivus/agent",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.18.0",
|
|
4
|
+
"description": "Rivus CLI, plugin SDK and plugin conformance testkit.",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"license": "
|
|
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
|
-
"
|
|
78
|
-
"@rivus/
|
|
79
|
-
"
|
|
80
|
-
"@rivus/gateway": "0.16.6"
|
|
51
|
+
"@rivus/runtime": "0.18.0",
|
|
52
|
+
"@rivus/gateway": "0.18.0",
|
|
53
|
+
"effect": "^4.0.0"
|
|
81
54
|
},
|
|
82
55
|
"publishConfig": {
|
|
83
56
|
"access": "public"
|
|
84
57
|
},
|
|
85
58
|
"devDependencies": {
|
|
86
|
-
"vite-plus": "0.
|
|
87
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@0.
|
|
59
|
+
"vite-plus": "1.0.0",
|
|
60
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@1.0.0",
|
|
88
61
|
"typescript": "6.0.3",
|
|
89
|
-
"@
|
|
90
|
-
"@
|
|
91
|
-
"@
|
|
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": "
|
|
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,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 };
|