@rivus/gateway 0.19.0 → 0.21.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.
@@ -1,5 +1,5 @@
1
- import { AgentHarness, AgentInvocationOrigin, AgentRunId, AgentRunUpdate, AttachmentAccess, PromptCommand, RegisteredRivusSkill, RegisteredRivusTool, RivusMemoryScope, RivusResolvedToolDescriptor, RivusRuntimeToolGrantSet, RivusRuntimeToolId, RivusSkillDescriptor, RivusSkillGrantSet, RivusToolDescriptor, RivusToolGrantSet, SessionKey, UserInput } from "@rivus/runtime";
2
- import { Effect } from "effect";
1
+ import { Effect, Schema } from "effect";
2
+ import { AgentInvocationOrigin, AgentRunId, AgentRunUpdate, AttachmentAccess, RegisteredRivusSkill, RegisteredRivusTool, RivusMemoryScope, RivusResolvedToolDescriptor, RivusRuntimeToolGrantSet, RivusRuntimeToolId, RivusSkillDescriptor, RivusSkillGrantSet, RivusToolDescriptor, RivusToolGrantSet, SessionKey, UserInput } from "@rivus/runtime";
3
3
  //#region src/core/application/recovery/contracts/recovery-control.d.ts
4
4
  type RecoveryToolOperationOutcome = {
5
5
  readonly result: unknown;
@@ -28,7 +28,28 @@ interface DeadLetterRequeueResult {
28
28
  readonly revision: number;
29
29
  readonly status: "pending";
30
30
  }
31
+ interface AutomationOccurrenceRecoveryItem {
32
+ readonly attempts: number;
33
+ readonly automationId: string;
34
+ readonly failureCode?: string;
35
+ readonly limit: number;
36
+ readonly occurrence: string;
37
+ readonly phase: "generation" | "delivery";
38
+ readonly revision: number;
39
+ readonly stopReason: "attempt-limit" | "terminal-failure";
40
+ }
41
+ interface AutomationAttemptGrantResult {
42
+ readonly attemptLimit: number;
43
+ readonly attempts: number;
44
+ readonly automationId: string;
45
+ readonly grantedAt: string;
46
+ readonly grantedBy: string;
47
+ readonly occurrence: string;
48
+ readonly revision: number;
49
+ readonly status: "failed" | "generated";
50
+ }
31
51
  interface RecoverySnapshot {
52
+ readonly automationOccurrences: ReadonlyArray<AutomationOccurrenceRecoveryItem>;
32
53
  readonly deadLetters: ReadonlyArray<DeadLetterRecoveryItem>;
33
54
  readonly toolOperations: ReadonlyArray<ToolOperationRecoveryItem>;
34
55
  }
@@ -57,6 +78,13 @@ interface ToolOperationResolutionResult {
57
78
  readonly toolVersion: string;
58
79
  }
59
80
  interface RecoveryControl {
81
+ grantAutomationAttempt(input: {
82
+ readonly actorId: string;
83
+ readonly automationId: string;
84
+ readonly expectedRevision: number;
85
+ readonly note: string;
86
+ readonly occurrence: string;
87
+ }): Effect.Effect<AutomationAttemptGrantResult, unknown>;
60
88
  inspect(): Effect.Effect<RecoverySnapshot, unknown>;
61
89
  requeueDeadLetter(input: {
62
90
  readonly actorId: string;
@@ -76,8 +104,20 @@ interface RecoveryControl {
76
104
  }
77
105
  //#endregion
78
106
  //#region src/core/domain/automation-occurrence/aggregate/snapshot.d.ts
79
- type AutomationOccurrenceStatus = "running" | "failed" | "generated" | "suppressed" | "delivered";
107
+ type AutomationOccurrenceStatus = "running" | "failed" | "generated" | "suppressed" | "delivered" | "stopped";
108
+ interface AutomationOccurrenceStop {
109
+ readonly reason: "attempt-limit" | "terminal-failure";
110
+ readonly code?: string;
111
+ }
112
+ interface AutomationOccurrenceRecovery {
113
+ readonly actorId: string;
114
+ readonly at: string;
115
+ readonly note: string;
116
+ readonly attemptLimit: number;
117
+ }
80
118
  interface AutomationOccurrenceSnapshot {
119
+ readonly attempts: number;
120
+ readonly attemptLimit: number | null;
81
121
  readonly automationId: string;
82
122
  readonly body?: string;
83
123
  readonly error?: string;
@@ -85,15 +125,18 @@ interface AutomationOccurrenceSnapshot {
85
125
  readonly occurrence: string;
86
126
  readonly presentation?: unknown;
87
127
  readonly providerMessageId?: string;
128
+ readonly recoveries: ReadonlyArray<AutomationOccurrenceRecovery>;
88
129
  readonly revision: number;
89
130
  readonly runId?: string;
90
131
  readonly status: AutomationOccurrenceStatus;
132
+ readonly stop?: AutomationOccurrenceStop;
91
133
  readonly suppressionReason?: string;
92
134
  readonly tickId: string;
93
135
  }
94
136
  //#endregion
95
137
  //#region src/core/domain/automation-occurrence/aggregate/automation-occurrence.d.ts
96
138
  interface CreateAutomationOccurrenceInput {
139
+ readonly attemptLimit?: number | null;
97
140
  readonly automationId: string;
98
141
  readonly mandateId: string;
99
142
  readonly occurrence: string;
@@ -108,25 +151,42 @@ interface SuppressAutomationOccurrenceInput {
108
151
  readonly reason: string;
109
152
  readonly runId: string;
110
153
  }
154
+ interface StopAutomationOccurrenceInput extends AutomationOccurrenceStop {
155
+ readonly error: string;
156
+ }
157
+ interface GrantAutomationOccurrenceAttemptInput {
158
+ readonly actorId: string;
159
+ readonly at: string;
160
+ readonly note: string;
161
+ }
111
162
  declare class AutomationOccurrence {
112
163
  #private;
113
164
  private constructor();
114
165
  static create(input: CreateAutomationOccurrenceInput): AutomationOccurrence;
115
166
  static restore(value: unknown): AutomationOccurrence;
167
+ get attempts(): number;
168
+ get attemptLimit(): number | null;
116
169
  get automationId(): string;
117
170
  get mandateId(): string;
118
171
  get occurrence(): string;
172
+ get recoveries(): ReadonlyArray<AutomationOccurrenceRecovery>;
119
173
  get revision(): number;
120
174
  get status(): AutomationOccurrenceStatus;
121
175
  get tickId(): string;
122
176
  restart(): AutomationOccurrence;
177
+ reserveDelivery(): AutomationOccurrence;
123
178
  fail(error: string): AutomationOccurrence;
179
+ stop(input: StopAutomationOccurrenceInput): AutomationOccurrence;
180
+ grantAttempt(input: GrantAutomationOccurrenceAttemptInput): AutomationOccurrence;
124
181
  generate(input: GenerateAutomationOccurrenceInput): AutomationOccurrence;
125
182
  suppress(input: SuppressAutomationOccurrenceInput): AutomationOccurrence;
126
183
  deliver(providerMessageId: string): AutomationOccurrence;
127
184
  validateTransitionTo(next: AutomationOccurrence): boolean;
128
185
  toSnapshot(): AutomationOccurrenceSnapshot;
129
186
  private requireRunning;
187
+ private requireGenerated;
188
+ private requireAttemptAvailable;
189
+ private generatedFields;
130
190
  private next;
131
191
  }
132
192
  //#endregion
@@ -143,31 +203,90 @@ interface AutomationLineChart {
143
203
  }
144
204
  //#endregion
145
205
  //#region src/core/application/automation/presentation/automation-presentation.d.ts
146
- declare const AUTOMATION_PRESENTATION_SCHEMA_VERSION: 1;
206
+ declare const AUTOMATION_PRESENTATION_SCHEMA_VERSION: 2;
147
207
  type AutomationPresentationKind = "daily-ai" | "generic" | "industry" | "news" | "subscriptions";
208
+ type AutomationPresentationTrend = "up" | "down" | "flat";
148
209
  interface AutomationPresentationSource {
149
210
  readonly label: string;
150
211
  readonly url: string;
151
212
  }
213
+ interface AutomationPresentationTableCell {
214
+ readonly text: string;
215
+ readonly trend?: AutomationPresentationTrend;
216
+ }
217
+ interface AutomationPresentationTableColumn {
218
+ readonly label: string;
219
+ readonly align?: "left" | "center" | "right";
220
+ readonly width?: number;
221
+ }
222
+ interface AutomationPresentationTable {
223
+ readonly columns: ReadonlyArray<AutomationPresentationTableColumn>;
224
+ readonly rows: ReadonlyArray<ReadonlyArray<AutomationPresentationTableCell>>;
225
+ }
152
226
  interface AutomationPresentationItem {
227
+ readonly emphasis?: "accent";
153
228
  readonly headline: string;
154
229
  readonly note?: string;
155
230
  readonly sources: ReadonlyArray<AutomationPresentationSource>;
156
231
  }
157
232
  interface AutomationPresentationSection {
233
+ readonly collapsed?: boolean;
158
234
  readonly id: string;
159
235
  readonly items: ReadonlyArray<AutomationPresentationItem>;
236
+ readonly lineChart?: AutomationLineChart;
237
+ readonly listStyle?: "bullet" | "numbered" | "plain";
238
+ readonly style?: "plain" | "highlight";
239
+ readonly table?: AutomationPresentationTable;
160
240
  readonly title: string;
161
241
  }
162
242
  interface AutomationPresentation {
243
+ readonly footer?: string;
163
244
  readonly lineChart?: AutomationLineChart;
164
245
  readonly footnote?: string;
165
246
  readonly kind?: AutomationPresentationKind;
166
247
  readonly meta: ReadonlyArray<string>;
167
248
  readonly schemaVersion: typeof AUTOMATION_PRESENTATION_SCHEMA_VERSION;
249
+ readonly sectionDividers?: boolean;
168
250
  readonly sections: ReadonlyArray<AutomationPresentationSection>;
251
+ readonly subtitle?: string;
169
252
  readonly summary?: string;
253
+ readonly summaryStyle?: "plain" | "highlight";
170
254
  readonly title: string;
255
+ readonly trendColors?: "red-up" | "green-up";
256
+ }
257
+ declare function readAutomationPresentation(value: unknown): AutomationPresentation;
258
+ //#endregion
259
+ //#region src/core/application/agent-catalog/contracts/rivus-automation-template.d.ts
260
+ interface RivusAutomationRetryPolicy {
261
+ readonly maxAttempts: number;
262
+ readonly terminalFailureCodes?: ReadonlyArray<string>;
263
+ }
264
+ declare class RivusAutomationFailure extends Error {
265
+ readonly name = "RivusAutomationFailure";
266
+ readonly code: string;
267
+ constructor(code: string, message?: string, options?: ErrorOptions);
268
+ }
269
+ interface RivusAutomationTemplate {
270
+ readonly id: string;
271
+ readonly profileId: string;
272
+ readonly requestedSkillIds: ReadonlyArray<string>;
273
+ readonly requestedToolIds: ReadonlyArray<string>;
274
+ readonly retry?: RivusAutomationRetryPolicy;
275
+ readonly createInput: (tick: RivusAutomationTickContext) => RivusAutomationInput;
276
+ readonly createPresentation?: (output: RivusAutomationOutput) => AutomationPresentation;
277
+ }
278
+ interface RivusAutomationTickContext {
279
+ readonly occurrence: string;
280
+ }
281
+ interface RivusAutomationInput {
282
+ readonly text: string;
283
+ }
284
+ interface RivusAutomationOutput {
285
+ readonly occurrence: string;
286
+ readonly text: string;
287
+ }
288
+ interface RegisteredRivusAutomation extends RivusAutomationTemplate {
289
+ readonly pluginId: string;
171
290
  }
172
291
  //#endregion
173
292
  //#region src/core/application/automation/scheduling/automation-scheduler.d.ts
@@ -216,6 +335,16 @@ interface RivusAgentDeployment {
216
335
  readonly scopes: ReadonlyArray<RivusMemoryScope>;
217
336
  readonly tool: boolean;
218
337
  };
338
+ readonly runtime?: {
339
+ readonly type: "acp";
340
+ readonly command: string;
341
+ readonly args?: ReadonlyArray<string>;
342
+ readonly env?: Readonly<Record<string, string>>;
343
+ readonly permissions?: "ask" | "deny";
344
+ readonly steering?: "disabled" | "cancel-and-reprompt";
345
+ readonly unattended?: boolean;
346
+ readonly initializationTimeoutMs?: number;
347
+ };
219
348
  readonly runtimeTools?: {
220
349
  readonly allow: ReadonlyArray<RivusRuntimeToolId>;
221
350
  };
@@ -240,6 +369,7 @@ interface ResolvedRivusAgentDefinition {
240
369
  readonly scopes: ReadonlyArray<RivusMemoryScope>;
241
370
  readonly tool: boolean;
242
371
  };
372
+ readonly runtime?: Required<NonNullable<RivusAgentDeployment["runtime"]>>;
243
373
  readonly runtimeToolGrantSet: RivusRuntimeToolGrantSet;
244
374
  readonly skillGrantSet: RivusSkillGrantSet;
245
375
  readonly skills: ReadonlyArray<RegisteredRivusSkill>;
@@ -247,29 +377,6 @@ interface ResolvedRivusAgentDefinition {
247
377
  readonly toolGrantSet: RivusToolGrantSet;
248
378
  }
249
379
  //#endregion
250
- //#region src/core/application/agent-catalog/contracts/rivus-automation-template.d.ts
251
- interface RivusAutomationTemplate {
252
- readonly id: string;
253
- readonly profileId: string;
254
- readonly requestedSkillIds: ReadonlyArray<string>;
255
- readonly requestedToolIds: ReadonlyArray<string>;
256
- readonly createInput: (tick: RivusAutomationTickContext) => RivusAutomationInput;
257
- readonly createPresentation?: (output: RivusAutomationOutput) => AutomationPresentation;
258
- }
259
- interface RivusAutomationTickContext {
260
- readonly occurrence: string;
261
- }
262
- interface RivusAutomationInput {
263
- readonly text: string;
264
- }
265
- interface RivusAutomationOutput {
266
- readonly occurrence: string;
267
- readonly text: string;
268
- }
269
- interface RegisteredRivusAutomation extends RivusAutomationTemplate {
270
- readonly pluginId: string;
271
- }
272
- //#endregion
273
380
  //#region src/core/application/agent-catalog/contracts/rivus-plugin.d.ts
274
381
  declare const RIVUS_PLUGIN_API_VERSION = "1";
275
382
  interface RivusPluginManifest {
@@ -401,6 +508,7 @@ interface RivusAutomationDeployment {
401
508
  readonly timeZone: string;
402
509
  }
403
510
  interface RivusEndpointDeployment {
511
+ readonly allowedActors?: ReadonlyArray<string>;
404
512
  readonly agentId: string;
405
513
  readonly baseUrl: string;
406
514
  readonly cardStreamLeaseMs: number;
@@ -654,155 +762,6 @@ interface FeishuCancelMessageIntakeSummary extends FeishuMessageIntakeBaseSummar
654
762
  readonly runId?: AgentRunId;
655
763
  }
656
764
  //#endregion
657
- //#region src/adapters/feishu/intake/feishu-card-action-intake.d.ts
658
- interface FeishuCardActionTriggerPayload {
659
- readonly action?: {
660
- readonly tag?: string;
661
- readonly value?: unknown;
662
- };
663
- readonly context?: {
664
- readonly chat_id?: string;
665
- readonly open_chat_id?: string;
666
- readonly open_message_id?: string;
667
- };
668
- readonly event?: FeishuCardActionTriggerPayload;
669
- readonly event_type?: string;
670
- readonly operator?: {
671
- readonly open_id?: string;
672
- readonly tenant_key?: string;
673
- readonly union_id?: string;
674
- readonly user_id?: string;
675
- };
676
- readonly token?: string;
677
- }
678
- //#endregion
679
- //#region src/core/application/run-presentation/projection/presented-value.d.ts
680
- type PresentedValue = {
681
- readonly kind: "boolean";
682
- readonly value: boolean;
683
- } | {
684
- readonly entries: ReadonlyArray<{
685
- readonly key: string;
686
- readonly value: PresentedValue;
687
- }>;
688
- readonly kind: "record";
689
- readonly omittedEntries: number;
690
- } | {
691
- readonly items: ReadonlyArray<PresentedValue>;
692
- readonly kind: "list";
693
- readonly omittedItems: number;
694
- } | {
695
- readonly kind: "null";
696
- } | {
697
- readonly kind: "number";
698
- readonly value: number;
699
- } | {
700
- readonly kind: "redacted";
701
- readonly reason: "sensitive-key" | "sensitive-value";
702
- } | {
703
- readonly kind: "text";
704
- readonly omittedCharacters: number;
705
- readonly value: string;
706
- } | {
707
- readonly kind: "unsupported";
708
- readonly valueType: string;
709
- };
710
- //#endregion
711
- //#region src/core/application/run-presentation/projection/run-presentation.d.ts
712
- declare const RUN_PRESENTATION_SCHEMA_VERSION: 2;
713
- type AgentRunId$1 = string;
714
- type RunPresentationPhase = "cancelled" | "completed" | "failed" | "running";
715
- type PresentationStepStatus = "completed" | "failed" | "running";
716
- interface PresentationStepBase {
717
- readonly durationMs?: number;
718
- readonly endedAt?: string;
719
- readonly id: string;
720
- readonly label: string;
721
- readonly startedAt: string;
722
- readonly status: PresentationStepStatus;
723
- }
724
- interface AssistantPresentationStep extends PresentationStepBase {
725
- readonly kind: "assistant";
726
- readonly text: string;
727
- }
728
- interface ModelPresentationStep extends PresentationStepBase {
729
- readonly kind: "model";
730
- readonly model: string;
731
- readonly provider: string;
732
- }
733
- interface SkillPresentationStep extends PresentationStepBase {
734
- readonly kind: "skill";
735
- readonly skillId: string;
736
- }
737
- interface ToolPresentationStep extends PresentationStepBase {
738
- readonly error?: PresentedValue;
739
- readonly input: PresentedValue;
740
- readonly kind: "tool";
741
- readonly output?: PresentedValue;
742
- readonly skillId?: string;
743
- readonly toolName: string;
744
- }
745
- interface ResponsePresentationStep extends PresentationStepBase {
746
- readonly kind: "response";
747
- }
748
- type PresentationStep = AssistantPresentationStep | ModelPresentationStep | ResponsePresentationStep | SkillPresentationStep | ToolPresentationStep;
749
- interface RunPresentation {
750
- readonly answer: {
751
- readonly format: "markdown";
752
- readonly text: string;
753
- };
754
- readonly omittedStepCount: number;
755
- readonly phase: RunPresentationPhase;
756
- readonly revision: number;
757
- readonly runId: AgentRunId$1;
758
- readonly schemaVersion: typeof RUN_PRESENTATION_SCHEMA_VERSION;
759
- readonly steps: ReadonlyArray<PresentationStep>;
760
- readonly totalStepCount: number;
761
- readonly totalToolCallCount: number;
762
- }
763
- //#endregion
764
- //#region src/adapters/feishu/card-presentation/streaming/feishu-stream-projector.d.ts
765
- type FeishuStreamAction = {
766
- readonly type: "update_text";
767
- readonly runId: AgentRunId;
768
- readonly text: string;
769
- } | {
770
- readonly presentation: RunPresentation;
771
- readonly runId: AgentRunId;
772
- readonly type: "update_progress";
773
- } | {
774
- readonly presentation?: RunPresentation;
775
- readonly runId: AgentRunId;
776
- readonly sessionKey: string;
777
- readonly text?: string;
778
- readonly type: "update_presentation";
779
- } | {
780
- readonly presentation?: RunPresentation;
781
- readonly type: "finish";
782
- readonly runId: AgentRunId;
783
- readonly text: string;
784
- } | {
785
- readonly presentation?: RunPresentation;
786
- readonly type: "fail";
787
- readonly runId: AgentRunId;
788
- readonly errorMessage: string;
789
- } | {
790
- readonly presentation?: RunPresentation;
791
- readonly type: "cancel";
792
- readonly runId: AgentRunId;
793
- readonly reason?: string;
794
- readonly text?: string;
795
- };
796
- //#endregion
797
- //#region src/adapters/feishu/protocol/feishu-agent-run-preparation.d.ts
798
- interface FeishuAgentRunPreparation {
799
- readonly messageId: string;
800
- readonly prompt: string;
801
- readonly receiveId: string;
802
- readonly runId: AgentRunId;
803
- readonly sessionKey: SessionKey;
804
- }
805
- //#endregion
806
765
  //#region src/adapters/feishu/intake/feishu-agent-daemon.d.ts
807
766
  interface FeishuAgentDaemonRunResult {
808
767
  readonly messageId: string;
@@ -843,96 +802,7 @@ interface FeishuAgentDaemonHandleMessageOptions {
843
802
  readonly sideEffects?: FeishuAgentMessageSideEffects;
844
803
  }
845
804
  //#endregion
846
- //#region src/platform/durable-queue/records/inbound-delivery-record.d.ts
847
- interface InboundDeliveryPendingState {
848
- readonly availableAt: string;
849
- readonly status: "pending";
850
- }
851
- interface InboundDeliveryLeasedState {
852
- readonly leaseExpiresAt: string;
853
- readonly leaseId: string;
854
- readonly leasedAt: string;
855
- readonly status: "leased";
856
- }
857
- interface InboundDeliveryCompletedState {
858
- readonly completedAt: string;
859
- readonly status: "completed";
860
- }
861
- interface InboundDeliveryDeadState {
862
- readonly failedAt: string;
863
- readonly reason: string;
864
- readonly status: "dead";
865
- }
866
- type InboundDeliveryState = InboundDeliveryPendingState | InboundDeliveryLeasedState | InboundDeliveryCompletedState | InboundDeliveryDeadState;
867
- interface InboundDeliveryRecoveryAudit {
868
- readonly actorId: string;
869
- readonly at: string;
870
- readonly note: string;
871
- }
872
- type InboundDelivery<Payload = unknown, Metadata = unknown> = Readonly<{
873
- readonly acceptedAt: string;
874
- readonly attempts: number;
875
- readonly id: string;
876
- readonly laneKey: string;
877
- readonly metadata?: Metadata;
878
- readonly payload: Payload;
879
- readonly recovery?: InboundDeliveryRecoveryAudit;
880
- readonly revision: number;
881
- readonly state: InboundDeliveryState;
882
- }>;
883
- //#endregion
884
- //#region src/platform/durable-queue/processing/durable-queue.d.ts
885
- interface DurableQueueAcceptInput<Payload, Metadata> {
886
- readonly id: string;
887
- readonly laneKey: string;
888
- readonly metadata?: Metadata;
889
- readonly payload: Payload;
890
- }
891
- type DurableQueueAcceptResult = {
892
- readonly accepted: true;
893
- readonly deliveryId: string;
894
- readonly pending: number;
895
- } | {
896
- readonly accepted: false;
897
- readonly deliveryId: string;
898
- readonly pending: number;
899
- readonly reason: "capacity" | "duplicate";
900
- };
901
- interface DurableQueueReplayResult {
902
- readonly deliveryId: string;
903
- readonly reason: "duplicate";
904
- readonly skipped: true;
905
- }
906
- type DurableQueueDrainResult<Result> = {
907
- readonly deliveryId: string;
908
- readonly handled: true;
909
- readonly result: Result | DurableQueueReplayResult;
910
- } | {
911
- readonly handled: false;
912
- readonly reason: "empty";
913
- };
914
- interface DurableQueue<Payload, Metadata, Result> {
915
- accept(input: DurableQueueAcceptInput<Payload, Metadata>): Effect.Effect<DurableQueueAcceptResult, unknown>;
916
- deadLetters(): ReadonlyArray<InboundDelivery<Payload, Metadata>>;
917
- drainOne(): Effect.Effect<DurableQueueDrainResult<Result>, unknown>;
918
- pending(): number;
919
- }
920
- //#endregion
921
- //#region src/platform/durable-queue/processing/worker.d.ts
922
- interface DurableQueueWorkerDrainResult<Result> {
923
- readonly drained: number;
924
- readonly results: ReadonlyArray<Extract<DurableQueueDrainResult<Result>, {
925
- readonly handled: true;
926
- }>>;
927
- }
928
- interface DurableQueueWorker<Result> {
929
- drainAvailable(): Effect.Effect<DurableQueueWorkerDrainResult<Result>, unknown>;
930
- }
931
- //#endregion
932
805
  //#region src/adapters/feishu/inbound-delivery/feishu-inbound-delivery.d.ts
933
- interface FeishuInboundDeliveryMetadata {
934
- readonly sideEffects?: "disabled" | "enabled";
935
- }
936
806
  type FeishuMessageAcceptResult = {
937
807
  readonly accepted: true;
938
808
  readonly messageId: string;
@@ -954,64 +824,14 @@ interface FeishuMessageDrainAvailableResult {
954
824
  //#endregion
955
825
  //#region src/adapters/feishu/runtime/feishu-receive-status.d.ts
956
826
  type FeishuReceiveMessageReplayOptions = FeishuAgentDaemonHandleMessageOptions;
957
- interface FeishuReceiveMessageSummary {
958
- readonly chatId: string;
959
- readonly messageId: string;
960
- readonly tenantKey?: string;
961
- readonly threadId?: string;
962
- }
963
- interface FeishuReceiveAcceptedObservation {
964
- readonly accepted: FeishuMessageAcceptResult;
965
- readonly message: FeishuReceiveMessageSummary;
966
- readonly observedAt: Date;
967
- }
968
- interface FeishuReceiveHandledObservation {
969
- readonly intake: FeishuMessageIntakeSummary;
970
- readonly messageId: string;
971
- readonly observedAt: Date;
972
- readonly result: FeishuAgentDaemonHandleResult;
973
- }
974
- interface FeishuReceiveRuntimeStatus {
975
- readonly lastAccepted?: FeishuReceiveAcceptedObservation;
976
- readonly lastHandled?: FeishuReceiveHandledObservation;
977
- }
978
827
  interface FeishuReceiveMessageReplayResult {
979
828
  readonly accepted: FeishuMessageAcceptResult;
980
829
  readonly drained: FeishuMessageDrainAvailableResult;
981
830
  readonly intake: FeishuMessageIntakeSummary;
982
831
  }
983
832
  //#endregion
984
- //#region src/platform/daemon/process/rivus-daemon-process.d.ts
985
- interface RivusDaemonTransport {
986
- running(): boolean;
987
- start(): Promise<void> | void;
988
- stop(): Promise<void> | void;
989
- }
990
- interface RivusDaemonProcess {
991
- running(): boolean;
992
- start(): Effect.Effect<void, unknown>;
993
- stop(): Effect.Effect<void, unknown>;
994
- }
995
- //#endregion
996
833
  //#region src/platform/home/config/runtime/rivus-daemon-config.d.ts
997
834
  type RivusDaemonEnv = Readonly<Record<string, string | undefined>>;
998
- type RivusThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
999
- interface RivusDaemonConfig {
1000
- readonly agentId: string;
1001
- readonly feishu: {
1002
- readonly appId: string;
1003
- readonly appSecret: string;
1004
- readonly baseUrl: string;
1005
- readonly cardStreamLeaseMs: number;
1006
- readonly streamMinIntervalMs: number;
1007
- };
1008
- readonly pi: {
1009
- readonly apiKey?: string;
1010
- readonly baseUrl?: string;
1011
- readonly model?: string;
1012
- readonly thinkingLevel?: RivusThinkingLevel;
1013
- };
1014
- }
1015
835
  //#endregion
1016
836
  //#region src/platform/home/rivus-home.d.ts
1017
837
  type RivusHomeEnvironment = Readonly<Record<string, string | undefined>>;
@@ -1072,44 +892,5 @@ interface RivusDeploymentBootstrapContext {
1072
892
  }
1073
893
  type RivusDeploymentBootstrapFactory = (context: RivusDeploymentBootstrapContext) => Promise<RivusDeploymentBootstrapAdapters> | RivusDeploymentBootstrapAdapters;
1074
894
  //#endregion
1075
- //#region src/platform/daemon/process/rivus-daemon-shutdown-controller.d.ts
1076
- type RivusDaemonShutdownSignal = "SIGINT" | "SIGTERM";
1077
- interface RivusDaemonSignalSource {
1078
- on(signal: RivusDaemonShutdownSignal, listener: () => void): void;
1079
- }
1080
- //#endregion
1081
- //#region src/bootstrap/daemon/rivus-daemon-cli.d.ts
1082
- interface RivusDaemonBootstrapContext {
1083
- readonly argv: ReadonlyArray<string>;
1084
- readonly config: RivusDaemonConfig;
1085
- readonly env: RivusDaemonEnv;
1086
- }
1087
- type RivusDaemonBootstrapFactory = (context: RivusDaemonBootstrapContext) => Promise<RivusDaemonProcess> | RivusDaemonProcess;
1088
- interface RivusDaemonBootstrapModule {
1089
- readonly createRivusDaemonProcess?: RivusDaemonBootstrapFactory;
1090
- readonly createRivusDeploymentAdapters?: RivusDeploymentBootstrapFactory;
1091
- readonly default?: RivusDaemonBootstrapFactory;
1092
- }
1093
- interface RivusDaemonCliWriter {
1094
- write(text: string): unknown;
1095
- }
1096
- interface RivusDaemonPromptRunner {
1097
- readonly defaultSessionKey?: string;
1098
- promptText(command: PromptCommand): Effect.Effect<string, unknown>;
1099
- }
1100
- interface RivusDaemonFeishuReplayRunner {
1101
- replayReceiveMessage(payload: FeishuReceiveMessagePayload, options?: FeishuReceiveMessageReplayOptions): Effect.Effect<FeishuReceiveMessageReplayResult, unknown>;
1102
- }
1103
- interface RivusDaemonCliOptions {
1104
- readonly argv: ReadonlyArray<string>;
1105
- readonly env: RivusDaemonEnv;
1106
- readonly exitAfterSignal?: (exitCode: number) => void;
1107
- readonly loadBootstrap?: (specifier: string) => Promise<RivusDaemonBootstrapModule>;
1108
- readonly signalSource: RivusDaemonSignalSource;
1109
- readonly stderr: RivusDaemonCliWriter;
1110
- readonly stdout: RivusDaemonCliWriter;
1111
- readonly pluginPackageManifestPath?: string;
1112
- }
1113
- //#endregion
1114
- export { RivusDeploymentRuntimePort as A, ResolvedRivusAgentDefinition as B, FeishuReceiveMessagePayload as C, CreateRivusDeploymentRuntimePortInput as D, CreateRivusDeploymentEndpointPortInput as E, RivusPluginManifest as F, RivusAgentProfile as H, RivusAutomationInput as I, RivusAutomationOutput as L, RivusPluginCatalog as M, RivusPluginRegistry as N, RivusDeploymentBackgroundSessionPort as O, RIVUS_PLUGIN_API_VERSION as P, RivusAutomationTemplate as R, FeishuCardActionTriggerPayload as S, CreateRivusDeploymentBackgroundSessionPortInput as T, AutomationScheduler as U, RivusAgentDeployment as V, RecoveryControl as W, DurableQueue as _, RivusDeploymentBootstrapContext as a, FeishuAgentRunPreparation as b, RivusDaemonProcess as c, FeishuReceiveMessageReplayResult as d, FeishuReceiveRuntimeStatus as f, DurableQueueWorkerDrainResult as g, DurableQueueWorker as h, RivusDaemonPromptRunner as i, RivusPlugin as j, RivusDeploymentEndpointPort as k, RivusDaemonTransport as l, FeishuMessageAcceptResult as m, RivusDaemonCliOptions as n, RivusHomeApi as o, FeishuInboundDeliveryMetadata as p, RivusDaemonFeishuReplayRunner as r, RivusDaemonEnv as s, RivusDaemonBootstrapContext as t, FeishuReceiveMessageReplayOptions as u, DurableQueueDrainResult as v, CreateRivusDeploymentAutomationPortInput as w, FeishuStreamAction as x, FeishuAgentDaemonHandleResult as y, RivusAutomationTickContext as z };
895
+ export { AutomationPresentationKind as A, RivusAutomationInput as C, RivusAutomationTickContext as D, RivusAutomationTemplate as E, AutomationPresentationTableColumn as F, AutomationPresentationTrend as I, readAutomationPresentation as L, AutomationPresentationSource as M, AutomationPresentationTable as N, AutomationPresentation as O, AutomationPresentationTableCell as P, AutomationLineChart as R, RivusAutomationFailure as S, RivusAutomationRetryPolicy as T, RivusPluginManifest as _, RivusDaemonEnv as a, RivusAgentProfile as b, CreateRivusDeploymentEndpointPortInput as c, RivusDeploymentEndpointPort as d, RivusDeploymentRuntimePort as f, RIVUS_PLUGIN_API_VERSION as g, RivusPluginRegistry as h, RivusHomeApi as i, AutomationPresentationSection as j, AutomationPresentationItem as k, CreateRivusDeploymentRuntimePortInput as l, RivusPluginCatalog as m, RivusDeploymentBootstrapFactory as n, CreateRivusDeploymentAutomationPortInput as o, RivusPlugin as p, RivusHome as r, CreateRivusDeploymentBackgroundSessionPortInput as s, RivusDeploymentBootstrapContext as t, RivusDeploymentBackgroundSessionPort as u, ResolvedRivusAgentDefinition as v, RivusAutomationOutput as w, AutomationScheduler as x, RivusAgentDeployment as y, RecoveryControl as z };
1115
896
  export {};