agentic-qe 1.8.4 → 1.9.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.
- package/.claude/skills/agentic-jujutsu/SKILL.md +645 -0
- package/CHANGELOG.md +394 -0
- package/README.md +86 -18
- package/dist/App.d.ts +5 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/App.js +15 -0
- package/dist/App.js.map +1 -0
- package/dist/cli/commands/constitution.d.ts +34 -0
- package/dist/cli/commands/constitution.d.ts.map +1 -0
- package/dist/cli/commands/constitution.js +679 -0
- package/dist/cli/commands/constitution.js.map +1 -0
- package/dist/cli/commands/init.d.ts +8 -75
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +22 -2292
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/learn/index.d.ts.map +1 -1
- package/dist/cli/commands/learn/index.js +3 -4
- package/dist/cli/commands/learn/index.js.map +1 -1
- package/dist/cli/commands/telemetry.d.ts +36 -0
- package/dist/cli/commands/telemetry.d.ts.map +1 -0
- package/dist/cli/commands/telemetry.js +364 -0
- package/dist/cli/commands/telemetry.js.map +1 -0
- package/dist/cli/index.js +66 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init/agents.d.ts +22 -0
- package/dist/cli/init/agents.d.ts.map +1 -0
- package/dist/cli/init/agents.js +522 -0
- package/dist/cli/init/agents.js.map +1 -0
- package/dist/cli/init/bash-wrapper.d.ts +14 -0
- package/dist/cli/init/bash-wrapper.d.ts.map +1 -0
- package/dist/cli/init/bash-wrapper.js +47 -0
- package/dist/cli/init/bash-wrapper.js.map +1 -0
- package/dist/cli/init/claude-config.d.ts +24 -0
- package/dist/cli/init/claude-config.d.ts.map +1 -0
- package/dist/cli/init/claude-config.js +275 -0
- package/dist/cli/init/claude-config.js.map +1 -0
- package/dist/cli/init/claude-md.d.ts +19 -0
- package/dist/cli/init/claude-md.d.ts.map +1 -0
- package/dist/cli/init/claude-md.js +153 -0
- package/dist/cli/init/claude-md.js.map +1 -0
- package/dist/cli/init/commands.d.ts +6 -0
- package/dist/cli/init/commands.d.ts.map +1 -0
- package/dist/cli/init/commands.js +83 -0
- package/dist/cli/init/commands.js.map +1 -0
- package/dist/cli/init/database-init.d.ts +15 -0
- package/dist/cli/init/database-init.d.ts.map +1 -0
- package/dist/cli/init/database-init.js +203 -0
- package/dist/cli/init/database-init.js.map +1 -0
- package/dist/cli/init/directory-structure.d.ts +14 -0
- package/dist/cli/init/directory-structure.d.ts.map +1 -0
- package/dist/cli/init/directory-structure.js +91 -0
- package/dist/cli/init/directory-structure.js.map +1 -0
- package/dist/cli/init/documentation.d.ts +14 -0
- package/dist/cli/init/documentation.d.ts.map +1 -0
- package/dist/cli/init/documentation.js +195 -0
- package/dist/cli/init/documentation.js.map +1 -0
- package/dist/cli/init/fleet-config.d.ts +34 -0
- package/dist/cli/init/fleet-config.d.ts.map +1 -0
- package/dist/cli/init/fleet-config.js +269 -0
- package/dist/cli/init/fleet-config.js.map +1 -0
- package/dist/cli/init/helpers.d.ts +6 -0
- package/dist/cli/init/helpers.d.ts.map +1 -0
- package/dist/cli/init/helpers.js +94 -0
- package/dist/cli/init/helpers.js.map +1 -0
- package/dist/cli/init/index.d.ts +32 -0
- package/dist/cli/init/index.d.ts.map +1 -0
- package/dist/cli/init/index.js +294 -0
- package/dist/cli/init/index.js.map +1 -0
- package/dist/cli/init/skills.d.ts +6 -0
- package/dist/cli/init/skills.d.ts.map +1 -0
- package/dist/cli/init/skills.js +138 -0
- package/dist/cli/init/skills.js.map +1 -0
- package/dist/cli/init/utils/file-utils.d.ts +74 -0
- package/dist/cli/init/utils/file-utils.d.ts.map +1 -0
- package/dist/cli/init/utils/file-utils.js +187 -0
- package/dist/cli/init/utils/file-utils.js.map +1 -0
- package/dist/cli/init/utils/index.d.ts +18 -0
- package/dist/cli/init/utils/index.d.ts.map +1 -0
- package/dist/cli/init/utils/index.js +48 -0
- package/dist/cli/init/utils/index.js.map +1 -0
- package/dist/cli/init/utils/log-utils.d.ts +47 -0
- package/dist/cli/init/utils/log-utils.d.ts.map +1 -0
- package/dist/cli/init/utils/log-utils.js +68 -0
- package/dist/cli/init/utils/log-utils.js.map +1 -0
- package/dist/cli/init/utils/path-utils.d.ts +91 -0
- package/dist/cli/init/utils/path-utils.d.ts.map +1 -0
- package/dist/cli/init/utils/path-utils.js +208 -0
- package/dist/cli/init/utils/path-utils.js.map +1 -0
- package/dist/cli/init/utils/validation-utils.d.ts +44 -0
- package/dist/cli/init/utils/validation-utils.d.ts.map +1 -0
- package/dist/cli/init/utils/validation-utils.js +68 -0
- package/dist/cli/init/utils/validation-utils.js.map +1 -0
- package/dist/cli/init/utils.d.ts +183 -0
- package/dist/cli/init/utils.d.ts.map +1 -0
- package/dist/cli/init/utils.js +354 -0
- package/dist/cli/init/utils.js.map +1 -0
- package/dist/components/Dashboard/Dashboard.d.ts +4 -0
- package/dist/components/Dashboard/Dashboard.d.ts.map +1 -0
- package/dist/components/Dashboard/Dashboard.js +148 -0
- package/dist/components/Dashboard/Dashboard.js.map +1 -0
- package/dist/components/Dashboard/DashboardHeader.d.ts +4 -0
- package/dist/components/Dashboard/DashboardHeader.d.ts.map +1 -0
- package/dist/components/Dashboard/DashboardHeader.js +138 -0
- package/dist/components/Dashboard/DashboardHeader.js.map +1 -0
- package/dist/constitution/evaluators/ast-evaluator.d.ts +42 -0
- package/dist/constitution/evaluators/ast-evaluator.d.ts.map +1 -0
- package/dist/constitution/evaluators/ast-evaluator.js +303 -0
- package/dist/constitution/evaluators/ast-evaluator.js.map +1 -0
- package/dist/constitution/evaluators/base.d.ts +144 -0
- package/dist/constitution/evaluators/base.d.ts.map +1 -0
- package/dist/constitution/evaluators/base.js +144 -0
- package/dist/constitution/evaluators/base.js.map +1 -0
- package/dist/constitution/evaluators/index.d.ts +19 -0
- package/dist/constitution/evaluators/index.d.ts.map +1 -0
- package/dist/constitution/evaluators/index.js +56 -0
- package/dist/constitution/evaluators/index.js.map +1 -0
- package/dist/constitution/evaluators/metric-evaluator.d.ts +59 -0
- package/dist/constitution/evaluators/metric-evaluator.d.ts.map +1 -0
- package/dist/constitution/evaluators/metric-evaluator.js +195 -0
- package/dist/constitution/evaluators/metric-evaluator.js.map +1 -0
- package/dist/constitution/evaluators/pattern-evaluator.d.ts +66 -0
- package/dist/constitution/evaluators/pattern-evaluator.d.ts.map +1 -0
- package/dist/constitution/evaluators/pattern-evaluator.js +221 -0
- package/dist/constitution/evaluators/pattern-evaluator.js.map +1 -0
- package/dist/constitution/evaluators/semantic-evaluator.d.ts +68 -0
- package/dist/constitution/evaluators/semantic-evaluator.d.ts.map +1 -0
- package/dist/constitution/evaluators/semantic-evaluator.js +250 -0
- package/dist/constitution/evaluators/semantic-evaluator.js.map +1 -0
- package/dist/contexts/DashboardContext.d.ts +41 -0
- package/dist/contexts/DashboardContext.d.ts.map +1 -0
- package/dist/contexts/DashboardContext.js +187 -0
- package/dist/contexts/DashboardContext.js.map +1 -0
- package/dist/core/memory/SwarmMemoryManager.d.ts +40 -0
- package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -1
- package/dist/core/memory/SwarmMemoryManager.js +291 -120
- package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
- package/dist/hooks/useKeyboardShortcuts.d.ts +12 -0
- package/dist/hooks/useKeyboardShortcuts.d.ts.map +1 -0
- package/dist/hooks/useKeyboardShortcuts.js +69 -0
- package/dist/hooks/useKeyboardShortcuts.js.map +1 -0
- package/dist/telemetry/instrumentation/agent.d.ts +158 -0
- package/dist/telemetry/instrumentation/agent.d.ts.map +1 -0
- package/dist/telemetry/instrumentation/agent.js +372 -0
- package/dist/telemetry/instrumentation/agent.js.map +1 -0
- package/dist/telemetry/instrumentation/index.d.ts +24 -0
- package/dist/telemetry/instrumentation/index.d.ts.map +1 -0
- package/dist/telemetry/instrumentation/index.js +54 -0
- package/dist/telemetry/instrumentation/index.js.map +1 -0
- package/dist/telemetry/instrumentation/memory.d.ts +313 -0
- package/dist/telemetry/instrumentation/memory.d.ts.map +1 -0
- package/dist/telemetry/instrumentation/memory.js +552 -0
- package/dist/telemetry/instrumentation/memory.js.map +1 -0
- package/dist/telemetry/instrumentation/task.d.ts +146 -0
- package/dist/telemetry/instrumentation/task.d.ts.map +1 -0
- package/dist/telemetry/instrumentation/task.js +305 -0
- package/dist/telemetry/instrumentation/task.js.map +1 -0
- package/dist/telemetry/metrics/collectors/cost.d.ts +246 -0
- package/dist/telemetry/metrics/collectors/cost.d.ts.map +1 -0
- package/dist/telemetry/metrics/collectors/cost.js +526 -0
- package/dist/telemetry/metrics/collectors/cost.js.map +1 -0
- package/dist/telemetry/metrics/collectors/pricing-config.d.ts +87 -0
- package/dist/telemetry/metrics/collectors/pricing-config.d.ts.map +1 -0
- package/dist/telemetry/metrics/collectors/pricing-config.js +207 -0
- package/dist/telemetry/metrics/collectors/pricing-config.js.map +1 -0
- package/dist/telemetry/metrics/index.d.ts +4 -1
- package/dist/telemetry/metrics/index.d.ts.map +1 -1
- package/dist/telemetry/metrics/index.js +18 -2
- package/dist/telemetry/metrics/index.js.map +1 -1
- package/dist/telemetry/types.d.ts +1 -1
- package/dist/telemetry/types.d.ts.map +1 -1
- package/dist/visualization/api/RestEndpoints.d.ts +136 -0
- package/dist/visualization/api/RestEndpoints.d.ts.map +1 -0
- package/dist/visualization/api/RestEndpoints.js +428 -0
- package/dist/visualization/api/RestEndpoints.js.map +1 -0
- package/dist/visualization/api/WebSocketServer.d.ts +165 -0
- package/dist/visualization/api/WebSocketServer.d.ts.map +1 -0
- package/dist/visualization/api/WebSocketServer.js +518 -0
- package/dist/visualization/api/WebSocketServer.js.map +1 -0
- package/dist/visualization/core/DataTransformer.d.ts +89 -0
- package/dist/visualization/core/DataTransformer.d.ts.map +1 -0
- package/dist/visualization/core/DataTransformer.js +478 -0
- package/dist/visualization/core/DataTransformer.js.map +1 -0
- package/dist/visualization/index.d.ts +92 -0
- package/dist/visualization/index.d.ts.map +1 -0
- package/dist/visualization/index.js +121 -0
- package/dist/visualization/index.js.map +1 -0
- package/dist/visualization/types.d.ts +148 -0
- package/dist/visualization/types.d.ts.map +1 -0
- package/dist/visualization/types.js +7 -0
- package/dist/visualization/types.js.map +1 -0
- package/dist/voting/consensus.d.ts +87 -0
- package/dist/voting/consensus.d.ts.map +1 -0
- package/dist/voting/consensus.js +568 -0
- package/dist/voting/consensus.js.map +1 -0
- package/dist/voting/index.d.ts +12 -0
- package/dist/voting/index.d.ts.map +1 -0
- package/dist/voting/index.js +36 -0
- package/dist/voting/index.js.map +1 -0
- package/dist/voting/orchestrator.d.ts +65 -0
- package/dist/voting/orchestrator.d.ts.map +1 -0
- package/dist/voting/orchestrator.js +306 -0
- package/dist/voting/orchestrator.js.map +1 -0
- package/dist/voting/panel-assembly.d.ts +54 -0
- package/dist/voting/panel-assembly.d.ts.map +1 -0
- package/dist/voting/panel-assembly.js +192 -0
- package/dist/voting/panel-assembly.js.map +1 -0
- package/dist/voting/protocol.d.ts +119 -0
- package/dist/voting/protocol.d.ts.map +1 -0
- package/dist/voting/protocol.js +18 -0
- package/dist/voting/protocol.js.map +1 -0
- package/dist/voting/types.d.ts +125 -0
- package/dist/voting/types.d.ts.map +1 -0
- package/dist/voting/types.js +7 -0
- package/dist/voting/types.js.map +1 -0
- package/package.json +27 -2
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory Instrumentation - OpenTelemetry spans for memory operations
|
|
3
|
+
*
|
|
4
|
+
* Provides comprehensive tracing for memory store/retrieve/search/delete operations
|
|
5
|
+
* with semantic attributes following OpenTelemetry conventions. Automatically instruments
|
|
6
|
+
* all memory operations with context propagation and performance tracking.
|
|
7
|
+
*
|
|
8
|
+
* @module telemetry/instrumentation/memory
|
|
9
|
+
*/
|
|
10
|
+
import { Span, Context } from '@opentelemetry/api';
|
|
11
|
+
import { AgentId } from '../../types';
|
|
12
|
+
/**
|
|
13
|
+
* Memory store span configuration
|
|
14
|
+
*/
|
|
15
|
+
export interface MemoryStoreConfig {
|
|
16
|
+
/** Agent performing the memory operation */
|
|
17
|
+
agentId: AgentId;
|
|
18
|
+
/** Memory namespace */
|
|
19
|
+
namespace: string;
|
|
20
|
+
/** Memory key */
|
|
21
|
+
key: string;
|
|
22
|
+
/** Value size in bytes */
|
|
23
|
+
valueSize: number;
|
|
24
|
+
/** Time-to-live in seconds (optional) */
|
|
25
|
+
ttl?: number;
|
|
26
|
+
/** Parent span context */
|
|
27
|
+
parentContext?: Context;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Memory retrieve span configuration
|
|
31
|
+
*/
|
|
32
|
+
export interface MemoryRetrieveConfig {
|
|
33
|
+
/** Agent performing the memory operation */
|
|
34
|
+
agentId: AgentId;
|
|
35
|
+
/** Memory namespace */
|
|
36
|
+
namespace: string;
|
|
37
|
+
/** Memory key */
|
|
38
|
+
key: string;
|
|
39
|
+
/** Parent span context */
|
|
40
|
+
parentContext?: Context;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Memory search span configuration
|
|
44
|
+
*/
|
|
45
|
+
export interface MemorySearchConfig {
|
|
46
|
+
/** Agent performing the memory operation */
|
|
47
|
+
agentId: AgentId;
|
|
48
|
+
/** Memory namespace */
|
|
49
|
+
namespace: string;
|
|
50
|
+
/** Search pattern (glob or regex) */
|
|
51
|
+
pattern: string;
|
|
52
|
+
/** Maximum number of results */
|
|
53
|
+
limit?: number;
|
|
54
|
+
/** Parent span context */
|
|
55
|
+
parentContext?: Context;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Memory delete span configuration
|
|
59
|
+
*/
|
|
60
|
+
export interface MemoryDeleteConfig {
|
|
61
|
+
/** Agent performing the memory operation */
|
|
62
|
+
agentId: AgentId;
|
|
63
|
+
/** Memory namespace */
|
|
64
|
+
namespace: string;
|
|
65
|
+
/** Memory key */
|
|
66
|
+
key: string;
|
|
67
|
+
/** Parent span context */
|
|
68
|
+
parentContext?: Context;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Memory store operation result
|
|
72
|
+
*/
|
|
73
|
+
export interface MemoryStoreResult {
|
|
74
|
+
/** Whether the store operation was successful */
|
|
75
|
+
success: boolean;
|
|
76
|
+
/** Operation duration in milliseconds */
|
|
77
|
+
durationMs?: number;
|
|
78
|
+
/** Error if operation failed */
|
|
79
|
+
error?: Error;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Memory retrieve operation result
|
|
83
|
+
*/
|
|
84
|
+
export interface MemoryRetrieveResult {
|
|
85
|
+
/** Whether the key was found */
|
|
86
|
+
found: boolean;
|
|
87
|
+
/** Value size in bytes (if found) */
|
|
88
|
+
valueSize?: number;
|
|
89
|
+
/** Operation duration in milliseconds */
|
|
90
|
+
durationMs?: number;
|
|
91
|
+
/** Error if operation failed */
|
|
92
|
+
error?: Error;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Memory search operation result
|
|
96
|
+
*/
|
|
97
|
+
export interface MemorySearchResult {
|
|
98
|
+
/** Number of results found */
|
|
99
|
+
resultCount: number;
|
|
100
|
+
/** Operation duration in milliseconds */
|
|
101
|
+
durationMs?: number;
|
|
102
|
+
/** Error if operation failed */
|
|
103
|
+
error?: Error;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Memory delete operation result
|
|
107
|
+
*/
|
|
108
|
+
export interface MemoryDeleteResult {
|
|
109
|
+
/** Whether the delete operation was successful */
|
|
110
|
+
success: boolean;
|
|
111
|
+
/** Operation duration in milliseconds */
|
|
112
|
+
durationMs?: number;
|
|
113
|
+
/** Error if operation failed */
|
|
114
|
+
error?: Error;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Memory operation span manager
|
|
118
|
+
*
|
|
119
|
+
* Manages OpenTelemetry spans for memory operations with automatic
|
|
120
|
+
* context propagation and semantic attribute attachment following
|
|
121
|
+
* OTEL conventions for distributed tracing.
|
|
122
|
+
*/
|
|
123
|
+
export declare class MemorySpanManager {
|
|
124
|
+
private readonly tracer;
|
|
125
|
+
private activeSpans;
|
|
126
|
+
/**
|
|
127
|
+
* Start memory store span
|
|
128
|
+
*
|
|
129
|
+
* Records memory store operation with semantic attributes for namespace,
|
|
130
|
+
* key, value size, and optional TTL.
|
|
131
|
+
*
|
|
132
|
+
* @param config - Memory store configuration
|
|
133
|
+
* @returns Active span with context
|
|
134
|
+
*/
|
|
135
|
+
startStoreSpan(config: MemoryStoreConfig): {
|
|
136
|
+
span: Span;
|
|
137
|
+
context: Context;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Complete memory store span
|
|
141
|
+
*
|
|
142
|
+
* @param span - Active span from startStoreSpan
|
|
143
|
+
* @param result - Store operation result
|
|
144
|
+
*/
|
|
145
|
+
completeStoreSpan(span: Span, result: MemoryStoreResult): void;
|
|
146
|
+
/**
|
|
147
|
+
* Start memory retrieve span
|
|
148
|
+
*
|
|
149
|
+
* Records memory retrieve operation with semantic attributes for namespace
|
|
150
|
+
* and key lookup.
|
|
151
|
+
*
|
|
152
|
+
* @param config - Memory retrieve configuration
|
|
153
|
+
* @returns Active span with context
|
|
154
|
+
*/
|
|
155
|
+
startRetrieveSpan(config: MemoryRetrieveConfig): {
|
|
156
|
+
span: Span;
|
|
157
|
+
context: Context;
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* Complete memory retrieve span
|
|
161
|
+
*
|
|
162
|
+
* @param span - Active span from startRetrieveSpan
|
|
163
|
+
* @param result - Retrieve operation result
|
|
164
|
+
*/
|
|
165
|
+
completeRetrieveSpan(span: Span, result: MemoryRetrieveResult): void;
|
|
166
|
+
/**
|
|
167
|
+
* Start memory search span
|
|
168
|
+
*
|
|
169
|
+
* Records memory search operation with semantic attributes for namespace,
|
|
170
|
+
* search pattern, and result limits.
|
|
171
|
+
*
|
|
172
|
+
* @param config - Memory search configuration
|
|
173
|
+
* @returns Active span with context
|
|
174
|
+
*/
|
|
175
|
+
startSearchSpan(config: MemorySearchConfig): {
|
|
176
|
+
span: Span;
|
|
177
|
+
context: Context;
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Complete memory search span
|
|
181
|
+
*
|
|
182
|
+
* @param span - Active span from startSearchSpan
|
|
183
|
+
* @param result - Search operation result
|
|
184
|
+
*/
|
|
185
|
+
completeSearchSpan(span: Span, result: MemorySearchResult): void;
|
|
186
|
+
/**
|
|
187
|
+
* Start memory delete span
|
|
188
|
+
*
|
|
189
|
+
* Records memory delete operation with semantic attributes for namespace
|
|
190
|
+
* and key deletion.
|
|
191
|
+
*
|
|
192
|
+
* @param config - Memory delete configuration
|
|
193
|
+
* @returns Active span with context
|
|
194
|
+
*/
|
|
195
|
+
startDeleteSpan(config: MemoryDeleteConfig): {
|
|
196
|
+
span: Span;
|
|
197
|
+
context: Context;
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* Complete memory delete span
|
|
201
|
+
*
|
|
202
|
+
* @param span - Active span from startDeleteSpan
|
|
203
|
+
* @param result - Delete operation result
|
|
204
|
+
*/
|
|
205
|
+
completeDeleteSpan(span: Span, result: MemoryDeleteResult): void;
|
|
206
|
+
/**
|
|
207
|
+
* Record memory operation error
|
|
208
|
+
*
|
|
209
|
+
* Records an error event on the currently active span.
|
|
210
|
+
*
|
|
211
|
+
* @param operation - Operation type (store, retrieve, search, delete)
|
|
212
|
+
* @param namespace - Memory namespace
|
|
213
|
+
* @param key - Memory key (if applicable)
|
|
214
|
+
* @param error - Error that occurred
|
|
215
|
+
*/
|
|
216
|
+
recordError(operation: 'store' | 'retrieve' | 'search' | 'delete', namespace: string, key: string | undefined, error: Error): void;
|
|
217
|
+
/**
|
|
218
|
+
* Cleanup all active spans (for graceful shutdown)
|
|
219
|
+
*
|
|
220
|
+
* Ensures all memory operation spans are properly ended during
|
|
221
|
+
* application shutdown or cleanup.
|
|
222
|
+
*/
|
|
223
|
+
cleanup(): void;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Global memory span manager instance
|
|
227
|
+
*/
|
|
228
|
+
export declare const memorySpanManager: MemorySpanManager;
|
|
229
|
+
/**
|
|
230
|
+
* Execute function within memory store span context
|
|
231
|
+
*
|
|
232
|
+
* Convenience wrapper that automatically creates, tracks, and completes
|
|
233
|
+
* a memory store span around the provided function.
|
|
234
|
+
*
|
|
235
|
+
* @param config - Memory store configuration
|
|
236
|
+
* @param fn - Function to execute (receives span context)
|
|
237
|
+
* @returns Function result
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* const result = await withMemoryStore(
|
|
241
|
+
* { agentId, namespace: 'aqe', key: 'test-plan', valueSize: 1024 },
|
|
242
|
+
* async (ctx) => {
|
|
243
|
+
* return await memoryService.store('test-plan', data);
|
|
244
|
+
* }
|
|
245
|
+
* );
|
|
246
|
+
*/
|
|
247
|
+
export declare function withMemoryStore<T>(config: MemoryStoreConfig, fn: (context: Context) => Promise<T>): Promise<T>;
|
|
248
|
+
/**
|
|
249
|
+
* Execute function within memory retrieve span context
|
|
250
|
+
*
|
|
251
|
+
* Convenience wrapper that automatically creates, tracks, and completes
|
|
252
|
+
* a memory retrieve span around the provided function.
|
|
253
|
+
*
|
|
254
|
+
* @param config - Memory retrieve configuration
|
|
255
|
+
* @param fn - Function to execute (receives span context)
|
|
256
|
+
* @returns Function result with found flag
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* const { found, value } = await withMemoryRetrieve(
|
|
260
|
+
* { agentId, namespace: 'aqe', key: 'test-plan' },
|
|
261
|
+
* async (ctx) => {
|
|
262
|
+
* return await memoryService.retrieve('test-plan');
|
|
263
|
+
* }
|
|
264
|
+
* );
|
|
265
|
+
*/
|
|
266
|
+
export declare function withMemoryRetrieve<T>(config: MemoryRetrieveConfig, fn: (context: Context) => Promise<{
|
|
267
|
+
found: boolean;
|
|
268
|
+
value?: T;
|
|
269
|
+
valueSize?: number;
|
|
270
|
+
}>): Promise<{
|
|
271
|
+
found: boolean;
|
|
272
|
+
value?: T;
|
|
273
|
+
valueSize?: number;
|
|
274
|
+
}>;
|
|
275
|
+
/**
|
|
276
|
+
* Execute function within memory search span context
|
|
277
|
+
*
|
|
278
|
+
* Convenience wrapper that automatically creates, tracks, and completes
|
|
279
|
+
* a memory search span around the provided function.
|
|
280
|
+
*
|
|
281
|
+
* @param config - Memory search configuration
|
|
282
|
+
* @param fn - Function to execute (receives span context)
|
|
283
|
+
* @returns Function result with result count
|
|
284
|
+
*
|
|
285
|
+
* @example
|
|
286
|
+
* const results = await withMemorySearch(
|
|
287
|
+
* { agentId, namespace: 'aqe', pattern: 'test-*', limit: 10 },
|
|
288
|
+
* async (ctx) => {
|
|
289
|
+
* return await memoryService.search('test-*');
|
|
290
|
+
* }
|
|
291
|
+
* );
|
|
292
|
+
*/
|
|
293
|
+
export declare function withMemorySearch<T>(config: MemorySearchConfig, fn: (context: Context) => Promise<T[]>): Promise<T[]>;
|
|
294
|
+
/**
|
|
295
|
+
* Execute function within memory delete span context
|
|
296
|
+
*
|
|
297
|
+
* Convenience wrapper that automatically creates, tracks, and completes
|
|
298
|
+
* a memory delete span around the provided function.
|
|
299
|
+
*
|
|
300
|
+
* @param config - Memory delete configuration
|
|
301
|
+
* @param fn - Function to execute (receives span context)
|
|
302
|
+
* @returns Function result
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* await withMemoryDelete(
|
|
306
|
+
* { agentId, namespace: 'aqe', key: 'test-plan' },
|
|
307
|
+
* async (ctx) => {
|
|
308
|
+
* await memoryService.delete('test-plan');
|
|
309
|
+
* }
|
|
310
|
+
* );
|
|
311
|
+
*/
|
|
312
|
+
export declare function withMemoryDelete<T>(config: MemoryDeleteConfig, fn: (context: Context) => Promise<T>): Promise<T>;
|
|
313
|
+
//# sourceMappingURL=memory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../src/telemetry/instrumentation/memory.ts"],"names":[],"mappings":"A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