@almadar/agent 1.6.4 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/LICENSE +21 -72
  2. package/README.md +25 -0
  3. package/dist/agent/event-budget.d.ts +28 -0
  4. package/dist/agent/experimental/hitl-v2.d.ts +161 -0
  5. package/dist/agent/experimental/hitl-workflow-integration.d.ts +182 -0
  6. package/dist/agent/index.d.ts +14 -13
  7. package/dist/agent/index.js.map +1 -1
  8. package/dist/agent/interrupt-config.d.ts +51 -0
  9. package/dist/agent/session-manager.d.ts +204 -0
  10. package/dist/agent/skill-agent.d.ts +182 -0
  11. package/dist/agent/workflow-middleware.d.ts +63 -0
  12. package/dist/agent/workflow-tool-wrapper.d.ts +87 -0
  13. package/dist/{api-types-CXrq-fts.d.ts → api-types.d.ts} +85 -51
  14. package/dist/context/compaction.d.ts +191 -0
  15. package/dist/context-compaction.d.ts +55 -0
  16. package/dist/evals/online-sampling.d.ts +114 -0
  17. package/dist/evals/utils/compact-orbital.d.ts +100 -0
  18. package/dist/event-transformer/event-transformer.d.ts +120 -0
  19. package/dist/event-transformer/index.d.ts +4 -122
  20. package/dist/events.d.ts +85 -0
  21. package/dist/index.d.ts +58 -1678
  22. package/dist/index.js +39 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/memory/MemoryManager.d.ts +243 -0
  25. package/dist/memory/PreferenceLearner.d.ts +59 -0
  26. package/dist/memory/agentic-search.d.ts +116 -0
  27. package/dist/memory/index.d.ts +14 -0
  28. package/dist/memory/memory-orbital.d.ts +66 -0
  29. package/dist/memory/types.d.ts +143 -0
  30. package/dist/metrics.d.ts +77 -0
  31. package/dist/multi-user.d.ts +155 -0
  32. package/dist/observability/index.d.ts +14 -0
  33. package/dist/observability/langsmith-integration.d.ts +203 -0
  34. package/dist/observability.d.ts +196 -0
  35. package/dist/orbitals/archive/sanitize.d.ts +24 -0
  36. package/dist/orbitals/batch/batch-generator.d.ts +41 -0
  37. package/dist/orbitals/batch/concurrency.d.ts +54 -0
  38. package/dist/orbitals/batch/index.d.ts +14 -0
  39. package/dist/orbitals/batch/prompt-assembler.d.ts +92 -0
  40. package/dist/orbitals/batch/types.d.ts +103 -0
  41. package/dist/orbitals/cache/index.d.ts +11 -0
  42. package/dist/orbitals/cache/orbital-fingerprint.d.ts +37 -0
  43. package/dist/orbitals/cache/prompt-assembler.d.ts +65 -0
  44. package/dist/orbitals/cache/structural-templates.d.ts +33 -0
  45. package/dist/orbitals/combiner/index.d.ts +102 -0
  46. package/dist/orbitals/domain-language/index.d.ts +9 -0
  47. package/dist/orbitals/domain-language/prompts/index.d.ts +11 -0
  48. package/dist/orbitals/domain-language/prompts/odl-examples.d.ts +8 -0
  49. package/dist/orbitals/domain-language/prompts/odl-patterns.d.ts +8 -0
  50. package/dist/orbitals/domain-language/prompts/odl-syntax.d.ts +8 -0
  51. package/dist/orbitals/domain-language/prompts/odl-to-schema.d.ts +8 -0
  52. package/dist/orbitals/generation/index.d.ts +10 -0
  53. package/dist/orbitals/generation/orbital-generator.d.ts +120 -0
  54. package/dist/orbitals/shared/constants.d.ts +65 -0
  55. package/dist/orbitals/shared/index.d.ts +11 -0
  56. package/dist/orbitals/shared/types.d.ts +187 -0
  57. package/dist/orbitals/shared/utils.d.ts +97 -0
  58. package/dist/orchestration/complexity-classifier.d.ts +38 -0
  59. package/dist/orchestration/fixing-orchestrator.d.ts +53 -0
  60. package/dist/orchestration/index.d.ts +31 -0
  61. package/dist/orchestration/provider-router.d.ts +45 -0
  62. package/dist/{firestore-checkpointer-CkNKXoun.d.ts → persistence/firestore-checkpointer.d.ts} +13 -58
  63. package/dist/persistence/firestore-session-store.d.ts +75 -0
  64. package/dist/persistence/firestore-store.d.ts +86 -0
  65. package/dist/persistence/index.d.ts +7 -198
  66. package/dist/persistence/memory-backend.d.ts +33 -0
  67. package/dist/persistence/types.d.ts +40 -0
  68. package/dist/security/audit-log.d.ts +44 -0
  69. package/dist/state-sync.d.ts +171 -0
  70. package/dist/subagents.d.ts +38 -0
  71. package/dist/tools/combine-schemas.d.ts +154 -0
  72. package/dist/tools/composition.d.ts +119 -0
  73. package/dist/{orbital-subagent-BdFuf77p.d.ts → tools/domain-orbital.d.ts} +22 -461
  74. package/dist/tools/execute.d.ts +38 -0
  75. package/dist/tools/finish-task.d.ts +56 -0
  76. package/dist/tools/generate-schema.d.ts +53 -0
  77. package/dist/tools/github.d.ts +297 -0
  78. package/dist/tools/index.d.ts +1318 -8
  79. package/dist/tools/orbital-batch-subagent.d.ts +85 -0
  80. package/dist/tools/orbital-subagent.d.ts +454 -0
  81. package/dist/tools/orchestrated-fixing.d.ts +74 -0
  82. package/dist/tools/orchestrated-generation.d.ts +75 -0
  83. package/dist/tools/sandbox-executor.d.ts +31 -0
  84. package/dist/tools/schema-chunking.d.ts +117 -0
  85. package/dist/tools/trait-subagent.d.ts +179 -0
  86. package/dist/tools/validate-schema.d.ts +17 -0
  87. package/dist/types.d.ts +14 -17
  88. package/dist/utils/safety/capability-token.d.ts +50 -0
  89. package/dist/utils/safety/circuit-breaker.d.ts +71 -0
  90. package/dist/utils/safety/index.d.ts +19 -0
  91. package/dist/utils/safety/rate-limiter.d.ts +39 -0
  92. package/dist/utils/safety/threshold-auth.d.ts +70 -0
  93. package/dist/workspace/git-client.d.ts +51 -0
  94. package/dist/workspace/index.d.ts +29 -346
  95. package/dist/workspace/index.js +39 -0
  96. package/dist/workspace/index.js.map +1 -1
  97. package/dist/workspace/memory-files.d.ts +31 -0
  98. package/dist/workspace/sink-manager.d.ts +26 -0
  99. package/dist/workspace/sinks/firestore-sink.d.ts +41 -0
  100. package/dist/workspace/sinks/git-sink.d.ts +47 -0
  101. package/dist/workspace/sinks/index.d.ts +9 -0
  102. package/dist/workspace/templates.d.ts +32 -0
  103. package/dist/workspace/types.d.ts +86 -0
  104. package/dist/workspace/workspace-manager.d.ts +57 -0
  105. package/package.json +12 -10
  106. package/dist/index-DW3F-Ihx.d.ts +0 -2501
  107. package/dist/index-DZn69no8.d.ts +0 -1014
@@ -0,0 +1,114 @@
1
+ /**
2
+ * Online Evaluations - Phase 3.2a: Simple Sampling
3
+ *
4
+ * 10% traffic sampling with async validation and basic alerting.
5
+ * Non-blocking - runs in background without affecting user response.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ import { EventEmitter } from 'events';
10
+ export interface SamplingConfig {
11
+ /** Sampling rate (0.0 - 1.0) */
12
+ sampleRate: number;
13
+ /** Async queue size */
14
+ maxQueueSize: number;
15
+ /** Validation timeout */
16
+ validationTimeoutMs: number;
17
+ /** Alert threshold for error rate */
18
+ errorRateThreshold: number;
19
+ /** Alert window in ms */
20
+ alertWindowMs: number;
21
+ }
22
+ export interface EvalSample {
23
+ sampleId: string;
24
+ timestamp: number;
25
+ request: {
26
+ prompt: string;
27
+ provider: string;
28
+ model: string;
29
+ };
30
+ result: {
31
+ success: boolean;
32
+ schema?: unknown;
33
+ error?: string;
34
+ latencyMs: number;
35
+ };
36
+ validation?: {
37
+ automatedScore: number;
38
+ syntaxErrors: number;
39
+ structureWarnings: number;
40
+ timestamp: number;
41
+ };
42
+ }
43
+ export interface ErrorAlert {
44
+ alertId: string;
45
+ timestamp: number;
46
+ errorRate: number;
47
+ threshold: number;
48
+ windowStart: number;
49
+ sampleCount: number;
50
+ errorCount: number;
51
+ }
52
+ export interface SamplingStats {
53
+ totalSampled: number;
54
+ totalValidated: number;
55
+ averageScore: number;
56
+ currentErrorRate: number;
57
+ queueSize: number;
58
+ isHealthy: boolean;
59
+ }
60
+ export declare class OnlineEvalSampler extends EventEmitter {
61
+ private config;
62
+ private queue;
63
+ private samples;
64
+ private errorWindow;
65
+ private isProcessing;
66
+ constructor(config?: Partial<SamplingConfig>);
67
+ /**
68
+ * Check if a request should be sampled
69
+ * Uses hash-based sampling for consistency
70
+ */
71
+ shouldSample(requestId: string): boolean;
72
+ /**
73
+ * Add a sample to the queue for async validation
74
+ */
75
+ sample(requestId: string, request: {
76
+ prompt: string;
77
+ provider: string;
78
+ model: string;
79
+ }, result: {
80
+ success: boolean;
81
+ schema?: unknown;
82
+ error?: string;
83
+ latencyMs: number;
84
+ }): Promise<void>;
85
+ /**
86
+ * Pull samples for manual review
87
+ */
88
+ pullSamples(options?: {
89
+ date?: Date;
90
+ limit?: number;
91
+ minScore?: number;
92
+ }): Promise<EvalSample[]>;
93
+ /**
94
+ * Get current stats
95
+ */
96
+ getStats(): SamplingStats;
97
+ /**
98
+ * Stop the processor
99
+ */
100
+ stop(): void;
101
+ private startProcessor;
102
+ private validateSample;
103
+ private runAutomatedValidation;
104
+ private trackError;
105
+ private calculateErrorRate;
106
+ }
107
+ export interface ReviewOptions {
108
+ date?: string;
109
+ limit?: number;
110
+ minScore?: number;
111
+ format?: 'json' | 'table';
112
+ }
113
+ export declare function reviewSamples(sampler: OnlineEvalSampler, options?: ReviewOptions): Promise<void>;
114
+ export declare function createOnlineEvalSampler(config?: Partial<SamplingConfig>): OnlineEvalSampler;
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Orbital Compaction Utility
3
+ *
4
+ * Compresses a full orbital JSON into a structural summary (~90% token reduction).
5
+ * The main agent only needs to know what was generated (entity names, trait names,
6
+ * field counts) — not the full s-expression trees, guard clauses, and render-ui
7
+ * prop objects.
8
+ *
9
+ * @packageDocumentation
10
+ */
11
+ interface OrbitalField {
12
+ name: string;
13
+ type: string;
14
+ required?: boolean;
15
+ values?: string[];
16
+ relation?: {
17
+ entity: string;
18
+ };
19
+ }
20
+ interface OrbitalTrait {
21
+ name: string;
22
+ stateMachine?: {
23
+ states?: Array<{
24
+ name: string;
25
+ isInitial?: boolean;
26
+ } | string>;
27
+ events?: string[];
28
+ transitions?: unknown[];
29
+ };
30
+ }
31
+ interface OrbitalPage {
32
+ name: string;
33
+ path: string;
34
+ traits?: Array<{
35
+ ref: string;
36
+ } | string>;
37
+ }
38
+ interface OrbitalEntity {
39
+ name: string;
40
+ collection?: string;
41
+ persistence?: string;
42
+ fields?: OrbitalField[];
43
+ }
44
+ interface OrbitalUnit {
45
+ name: string;
46
+ entity?: OrbitalEntity;
47
+ traits?: OrbitalTrait[];
48
+ pages?: OrbitalPage[];
49
+ emits?: string[];
50
+ listens?: Array<{
51
+ event: string;
52
+ triggers: string;
53
+ }>;
54
+ }
55
+ interface OrbitalSchema {
56
+ name?: string;
57
+ version?: string;
58
+ orbitals?: OrbitalUnit[];
59
+ }
60
+ /**
61
+ * Compact a single orbital unit into a structural summary.
62
+ *
63
+ * Full orbital (~800 tokens) → Summary (~80 tokens, 90% reduction)
64
+ *
65
+ * Example output:
66
+ * ```
67
+ * orbital: Task Management
68
+ * entity: Task (tasks) [title:string*, status:enum(3), assignee:rel→User] 3 fields
69
+ * trait: TaskInteraction [Browsing→Creating→Viewing→Editing→Deleting] 5 states, 8 events, 8 transitions
70
+ * page: /tasks → TaskInteraction
71
+ * emits: TASK_CREATED, TASK_UPDATED
72
+ * listens: USER_SELECTED → ViewUser
73
+ * ```
74
+ */
75
+ export declare function compactOrbital(orbital: OrbitalUnit): string;
76
+ /**
77
+ * Compact a full OrbitalSchema (multiple orbitals) into a summary.
78
+ */
79
+ export declare function compactSchema(schema: OrbitalSchema): string;
80
+ /**
81
+ * Compact result from generate_orbital tool call.
82
+ * Returns the compact summary string to use instead of full JSON in tool results.
83
+ */
84
+ export declare function compactOrbitalResult(result: {
85
+ success: boolean;
86
+ orbital?: unknown;
87
+ fingerprint?: string;
88
+ usage?: {
89
+ inputTokens?: number;
90
+ outputTokens?: number;
91
+ totalTokens?: number;
92
+ };
93
+ validation?: {
94
+ valid?: boolean;
95
+ errors?: Array<{
96
+ message: string;
97
+ }>;
98
+ };
99
+ }): string;
100
+ export {};
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Event Transformer for DeepAgent
3
+ *
4
+ * Transforms raw LangGraph/deepagents events into SSE events.
5
+ * Handles special events like todo updates and file operations.
6
+ *
7
+ * Supports both:
8
+ * - LangGraph event structures (event.tools, event.model_request)
9
+ * - Legacy flat event structures (event.todos, event.tool_call)
10
+ */
11
+ import { type SSEEvent } from '../api-types.js';
12
+ /**
13
+ * Raw agent event from LangGraph/deepagents.
14
+ */
15
+ export interface RawAgentEvent {
16
+ tools?: {
17
+ todos?: Array<{
18
+ content?: string;
19
+ task?: string;
20
+ status?: string;
21
+ id?: string;
22
+ }>;
23
+ messages?: Array<Record<string, unknown>>;
24
+ };
25
+ model_request?: {
26
+ messages?: Array<Record<string, unknown>>;
27
+ };
28
+ messages?: Array<{
29
+ role?: string;
30
+ content?: string;
31
+ }>;
32
+ tool_call?: {
33
+ name?: string;
34
+ args?: Record<string, unknown>;
35
+ };
36
+ toolCall?: {
37
+ name?: string;
38
+ args?: Record<string, unknown>;
39
+ };
40
+ tool_result?: {
41
+ name?: string;
42
+ result?: unknown;
43
+ };
44
+ toolResult?: {
45
+ name?: string;
46
+ result?: unknown;
47
+ };
48
+ todos?: Array<{
49
+ id?: string;
50
+ task?: string;
51
+ status?: 'pending' | 'in_progress' | 'completed';
52
+ }>;
53
+ __interrupt__?: Array<{
54
+ value?: {
55
+ actionRequests?: Array<{
56
+ name?: string;
57
+ args?: Record<string, unknown>;
58
+ description?: string;
59
+ }>;
60
+ reviewConfigs?: Array<{
61
+ allowedDecisions?: string[];
62
+ }>;
63
+ };
64
+ action?: {
65
+ tool?: string;
66
+ toolInput?: Record<string, unknown>;
67
+ };
68
+ config?: {
69
+ allowedDecisions?: string[];
70
+ };
71
+ }>;
72
+ [key: string]: unknown;
73
+ }
74
+ /**
75
+ * Transform a raw agent event to SSE event(s).
76
+ *
77
+ * Handles both LangGraph nested structures and legacy flat structures.
78
+ * Returns an array for consistency with multi-event scenarios.
79
+ *
80
+ * @param event Raw agent event
81
+ * @param threadId Thread ID for context
82
+ * @returns Array of SSE events
83
+ */
84
+ export declare function transformAgentEvent(event: RawAgentEvent, threadId?: string): SSEEvent;
85
+ /**
86
+ * Transform a raw agent event to multiple SSE events.
87
+ * Use this when you need to handle all events from a single LangGraph event.
88
+ */
89
+ export declare function transformAgentEventMulti(event: RawAgentEvent, threadId?: string): SSEEvent[];
90
+ /**
91
+ * Check if an event contains an interrupt.
92
+ */
93
+ export declare function hasInterrupt(event: RawAgentEvent): boolean;
94
+ /**
95
+ * Extract interrupt data from an event.
96
+ */
97
+ export declare function extractInterruptData(event: RawAgentEvent, threadId: string): {
98
+ threadId: string;
99
+ actionRequests: Array<{
100
+ tool: string;
101
+ args: Record<string, unknown>;
102
+ allowedDecisions: ('approve' | 'edit' | 'reject')[];
103
+ description?: string;
104
+ }>;
105
+ };
106
+ /**
107
+ * Check if an event is a todo update.
108
+ */
109
+ export declare function isTodoUpdate(event: RawAgentEvent): boolean;
110
+ /**
111
+ * Check if an event is a file operation.
112
+ */
113
+ export declare function isFileOperation(event: RawAgentEvent): boolean;
114
+ /**
115
+ * Extract file operation details from an event.
116
+ */
117
+ export declare function extractFileOperation(event: RawAgentEvent): {
118
+ operation: string;
119
+ path: string;
120
+ } | null;
@@ -1,125 +1,7 @@
1
- import { a as SSEEvent } from '../api-types-CXrq-fts.js';
2
- import 'zod';
3
-
4
1
  /**
5
- * Event Transformer for DeepAgent
2
+ * Event Transformer
6
3
  *
7
- * Transforms raw LangGraph/deepagents events into SSE events.
8
- * Handles special events like todo updates and file operations.
9
- *
10
- * Supports both:
11
- * - LangGraph event structures (event.tools, event.model_request)
12
- * - Legacy flat event structures (event.todos, event.tool_call)
13
- */
14
-
15
- /**
16
- * Raw agent event from LangGraph/deepagents.
17
- */
18
- interface RawAgentEvent {
19
- tools?: {
20
- todos?: Array<{
21
- content?: string;
22
- task?: string;
23
- status?: string;
24
- id?: string;
25
- }>;
26
- messages?: Array<Record<string, unknown>>;
27
- };
28
- model_request?: {
29
- messages?: Array<Record<string, unknown>>;
30
- };
31
- messages?: Array<{
32
- role?: string;
33
- content?: string;
34
- }>;
35
- tool_call?: {
36
- name?: string;
37
- args?: Record<string, unknown>;
38
- };
39
- toolCall?: {
40
- name?: string;
41
- args?: Record<string, unknown>;
42
- };
43
- tool_result?: {
44
- name?: string;
45
- result?: unknown;
46
- };
47
- toolResult?: {
48
- name?: string;
49
- result?: unknown;
50
- };
51
- todos?: Array<{
52
- id?: string;
53
- task?: string;
54
- status?: 'pending' | 'in_progress' | 'completed';
55
- }>;
56
- __interrupt__?: Array<{
57
- value?: {
58
- actionRequests?: Array<{
59
- name?: string;
60
- args?: Record<string, unknown>;
61
- description?: string;
62
- }>;
63
- reviewConfigs?: Array<{
64
- allowedDecisions?: string[];
65
- }>;
66
- };
67
- action?: {
68
- tool?: string;
69
- toolInput?: Record<string, unknown>;
70
- };
71
- config?: {
72
- allowedDecisions?: string[];
73
- };
74
- }>;
75
- [key: string]: unknown;
76
- }
77
- /**
78
- * Transform a raw agent event to SSE event(s).
79
- *
80
- * Handles both LangGraph nested structures and legacy flat structures.
81
- * Returns an array for consistency with multi-event scenarios.
82
- *
83
- * @param event Raw agent event
84
- * @param threadId Thread ID for context
85
- * @returns Array of SSE events
86
- */
87
- declare function transformAgentEvent(event: RawAgentEvent, threadId?: string): SSEEvent;
88
- /**
89
- * Transform a raw agent event to multiple SSE events.
90
- * Use this when you need to handle all events from a single LangGraph event.
91
- */
92
- declare function transformAgentEventMulti(event: RawAgentEvent, threadId?: string): SSEEvent[];
93
- /**
94
- * Check if an event contains an interrupt.
95
- */
96
- declare function hasInterrupt(event: RawAgentEvent): boolean;
97
- /**
98
- * Extract interrupt data from an event.
99
- */
100
- declare function extractInterruptData(event: RawAgentEvent, threadId: string): {
101
- threadId: string;
102
- actionRequests: Array<{
103
- tool: string;
104
- args: Record<string, unknown>;
105
- allowedDecisions: ('approve' | 'edit' | 'reject')[];
106
- description?: string;
107
- }>;
108
- };
109
- /**
110
- * Check if an event is a todo update.
111
- */
112
- declare function isTodoUpdate(event: RawAgentEvent): boolean;
113
- /**
114
- * Check if an event is a file operation.
115
- */
116
- declare function isFileOperation(event: RawAgentEvent): boolean;
117
- /**
118
- * Extract file operation details from an event.
4
+ * Transforms raw LangGraph/deepagents events into typed SSE events.
119
5
  */
120
- declare function extractFileOperation(event: RawAgentEvent): {
121
- operation: string;
122
- path: string;
123
- } | null;
124
-
125
- export { type RawAgentEvent, extractFileOperation, extractInterruptData, hasInterrupt, isFileOperation, isTodoUpdate, transformAgentEvent, transformAgentEventMulti };
6
+ export { transformAgentEvent, transformAgentEventMulti, hasInterrupt, extractInterruptData, isTodoUpdate, isFileOperation, extractFileOperation, } from './event-transformer.js';
7
+ export type { RawAgentEvent, } from './event-transformer.js';
@@ -0,0 +1,85 @@
1
+ /**
2
+ * DeepAgent SSE Event Types
3
+ *
4
+ * Type definitions for Server-Sent Events from the DeepAgent streaming endpoint.
5
+ * Use these types for client-side consumption of /deepagent/generate-stream.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ /**
10
+ * Initial event sent when streaming begins.
11
+ */
12
+ export interface DeepAgentStartEvent {
13
+ type: 'start';
14
+ sessionId: string;
15
+ }
16
+ /**
17
+ * Agent execution event (tool calls, messages, etc.).
18
+ */
19
+ export interface DeepAgentExecutionEvent {
20
+ type: 'event';
21
+ node?: string;
22
+ toolCall?: {
23
+ name: string;
24
+ args: Record<string, unknown>;
25
+ };
26
+ toolResult?: {
27
+ name: string;
28
+ result: unknown;
29
+ };
30
+ message?: {
31
+ role: 'assistant' | 'user' | 'system';
32
+ content: string;
33
+ };
34
+ [key: string]: unknown;
35
+ }
36
+ /**
37
+ * Schema generated event.
38
+ */
39
+ export interface DeepAgentSchemaEvent {
40
+ type: 'schema';
41
+ schema: Record<string, unknown>;
42
+ }
43
+ /**
44
+ * Completion event sent when generation finishes successfully.
45
+ */
46
+ export interface DeepAgentCompleteEvent {
47
+ type: 'complete';
48
+ sessionId: string;
49
+ appCompiled: boolean;
50
+ }
51
+ /**
52
+ * Error event sent when generation fails.
53
+ */
54
+ export interface DeepAgentErrorEvent {
55
+ type: 'error';
56
+ error: string;
57
+ }
58
+ /**
59
+ * Union of all possible DeepAgent SSE events.
60
+ */
61
+ export type DeepAgentEvent = DeepAgentStartEvent | DeepAgentExecutionEvent | DeepAgentSchemaEvent | DeepAgentCompleteEvent | DeepAgentErrorEvent;
62
+ /**
63
+ * Parse an SSE data line into a DeepAgentEvent.
64
+ */
65
+ export declare function parseDeepAgentEvent(data: string): DeepAgentEvent;
66
+ /**
67
+ * Type guard for start events.
68
+ */
69
+ export declare function isStartEvent(event: DeepAgentEvent): event is DeepAgentStartEvent;
70
+ /**
71
+ * Type guard for execution events.
72
+ */
73
+ export declare function isExecutionEvent(event: DeepAgentEvent): event is DeepAgentExecutionEvent;
74
+ /**
75
+ * Type guard for schema events.
76
+ */
77
+ export declare function isSchemaEvent(event: DeepAgentEvent): event is DeepAgentSchemaEvent;
78
+ /**
79
+ * Type guard for complete events.
80
+ */
81
+ export declare function isCompleteEvent(event: DeepAgentEvent): event is DeepAgentCompleteEvent;
82
+ /**
83
+ * Type guard for error events.
84
+ */
85
+ export declare function isErrorEvent(event: DeepAgentEvent): event is DeepAgentErrorEvent;