@feltdb/core 0.6.9 → 0.6.10
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/dist/cli/commands.js +189 -71
- package/dist/cli/index.js +1 -1
- package/dist/collection.d.ts +110 -2
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +228 -3
- package/dist/create/package-versions.js +1 -1
- package/dist/create/server-source/crates/feltdb/src/bin/feltdb_node.rs +408 -178
- package/dist/create/server-source/crates/feltdb/src/lib.rs +49 -5
- package/dist/create/server-source/crates/feltdb/src/multi_operation_transaction.rs +659 -0
- package/dist/create/server-source/crates/feltdb/src/p1_application_atomicity.rs +285 -0
- package/dist/create/server-source/crates/feltdb/src/p1_atomicity_acceptance.rs +582 -0
- package/dist/create/server-source/crates/feltdb-server/src/main.rs +141 -0
- package/dist/db.d.ts +59 -0
- package/dist/db.d.ts.map +1 -1
- package/dist/db.js +94 -2
- package/dist/embedded-transaction.d.ts +77 -0
- package/dist/embedded-transaction.d.ts.map +1 -0
- package/dist/embedded-transaction.js +102 -0
- package/dist/feltdb.d.ts +49 -1
- package/dist/feltdb.d.ts.map +1 -1
- package/dist/file-db.d.ts +33 -0
- package/dist/file-db.d.ts.map +1 -1
- package/dist/file-db.js +128 -4
- package/dist/freshness.d.ts +119 -0
- package/dist/freshness.d.ts.map +1 -0
- package/dist/freshness.js +115 -0
- package/dist/http-db.d.ts +48 -0
- package/dist/http-db.d.ts.map +1 -1
- package/dist/http-db.js +77 -1
- package/dist/index-backend.d.ts +8 -0
- package/dist/index-backend.d.ts.map +1 -1
- package/dist/index-backend.js +13 -0
- package/dist/index-core.d.ts +78 -0
- package/dist/index-core.d.ts.map +1 -0
- package/dist/index-core.js +72 -0
- package/dist/index-manager.d.ts +11 -0
- package/dist/index-manager.d.ts.map +1 -1
- package/dist/index-manager.js +30 -13
- package/dist/index-types.d.ts +17 -0
- package/dist/index-types.d.ts.map +1 -1
- package/dist/index.browser.d.ts +14 -0
- package/dist/index.browser.d.ts.map +1 -0
- package/dist/index.browser.js +13 -0
- package/dist/index.d.ts +8 -59
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -54
- package/dist/indexeddb-db.d.ts +32 -0
- package/dist/indexeddb-db.d.ts.map +1 -1
- package/dist/indexeddb-db.js +151 -1
- package/dist/memory-db.d.ts +26 -0
- package/dist/memory-db.d.ts.map +1 -1
- package/dist/memory-db.js +86 -0
- package/dist/runtime-registry.d.ts +32 -0
- package/dist/runtime-registry.d.ts.map +1 -0
- package/dist/runtime-registry.js +38 -0
- package/dist/studio-app/assets/{feltdb_wasm-B4wq4mqp.js → feltdb_wasm-CJv3wHzi.js} +1 -1
- package/dist/studio-app/assets/feltdb_wasm_bg-C8TG8r2n.wasm +0 -0
- package/dist/studio-app/assets/index-D3rT0SJi.js +28 -0
- package/dist/studio-app/index.html +1 -1
- package/dist/transaction.d.ts +98 -0
- package/dist/transaction.d.ts.map +1 -0
- package/dist/transaction.js +86 -0
- package/dist/wasm/feltdb_wasm_bg.wasm +0 -0
- package/dist/workspace/browser.d.ts +22 -0
- package/dist/workspace/browser.d.ts.map +1 -0
- package/dist/workspace/browser.js +17 -0
- package/dist/workspace/git-identity.d.ts +35 -0
- package/dist/workspace/git-identity.d.ts.map +1 -0
- package/dist/workspace/git-identity.js +81 -0
- package/dist/workspace/index.d.ts +11 -1
- package/dist/workspace/index.d.ts.map +1 -1
- package/dist/workspace/index.js +6 -0
- package/dist/workspace/investigation-analysis.d.ts +47 -0
- package/dist/workspace/investigation-analysis.d.ts.map +1 -0
- package/dist/workspace/investigation-analysis.js +181 -0
- package/dist/workspace/investigation-lifecycle-manager.d.ts +86 -0
- package/dist/workspace/investigation-lifecycle-manager.d.ts.map +1 -0
- package/dist/workspace/investigation-lifecycle-manager.js +229 -0
- package/dist/workspace/investigation-supervisor.d.ts +100 -0
- package/dist/workspace/investigation-supervisor.d.ts.map +1 -0
- package/dist/workspace/investigation-supervisor.js +236 -0
- package/dist/workspace/runtime-investigation.d.ts +1 -1
- package/dist/workspace/runtime-investigation.d.ts.map +1 -1
- package/dist/workspace/runtime-investigation.js +46 -21
- package/dist/workspace/runtime-observation.d.ts +79 -0
- package/dist/workspace/runtime-observation.d.ts.map +1 -0
- package/dist/workspace/runtime-observation.js +152 -0
- package/dist/workspace/runtime-observer.d.ts +51 -0
- package/dist/workspace/runtime-observer.d.ts.map +1 -0
- package/dist/workspace/runtime-observer.js +268 -0
- package/dist/workspace/workspace-connection.d.ts.map +1 -1
- package/dist/workspace/workspace-connection.js +14 -5
- package/dist/workspace/workspace-types.d.ts +113 -0
- package/dist/workspace/workspace-types.d.ts.map +1 -1
- package/package.json +12 -4
- package/dist/create/server-source/crates/feltdb/src/phase_1c_three_node.rs +0 -523
- package/dist/studio-app/assets/feltdb_wasm_bg-Ceyi7l21.wasm +0 -0
- package/dist/studio-app/assets/index-BF45M757.js +0 -28
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FeltDB Browser Runtime Observation
|
|
3
|
+
*
|
|
4
|
+
* The runtime that ships inside `@feltdb/core` and runs in the developer's
|
|
5
|
+
* browser. It instruments the page's HTTP and error surfaces, correlates
|
|
6
|
+
* console/runtime errors to the request that was in flight, and publishes
|
|
7
|
+
* redacted observations into the FeltDB Development Workspace, where they are
|
|
8
|
+
* persisted durably.
|
|
9
|
+
*
|
|
10
|
+
* Browser → @feltdb/core → observation → FeltDB workspace → durable persistence
|
|
11
|
+
*
|
|
12
|
+
* This module is browser-safe: it must not import Node built-ins. It uses only
|
|
13
|
+
* `fetch`, `XMLHttpRequest`, `console`, and `window` event handlers, so the
|
|
14
|
+
* same contract is produced by Chromium, Gecko, and WebKit browsers even
|
|
15
|
+
* though their internal implementations differ.
|
|
16
|
+
*/
|
|
17
|
+
import { RUNTIME_OBSERVATION_COLLECTION, createCorrelationId, createRuntimeObservation, redactMessage, } from './runtime-observation.js';
|
|
18
|
+
import { connectDevelopmentWorkspace } from './workspace-connection.js';
|
|
19
|
+
const RUNTIME_EVENT_BUFFER = 50;
|
|
20
|
+
/**
|
|
21
|
+
* Start observing the current page and reporting into the workspace.
|
|
22
|
+
*
|
|
23
|
+
* Returns once the workspace connection is established, so a caller can await
|
|
24
|
+
* it before exercising the application.
|
|
25
|
+
*/
|
|
26
|
+
export async function startRuntimeObservation(options) {
|
|
27
|
+
const scope = globalThis;
|
|
28
|
+
const correlationWindowMs = options.correlationWindowMs ?? 250;
|
|
29
|
+
const connection = await connectDevelopmentWorkspace({
|
|
30
|
+
pairingCode: options.pairingCode,
|
|
31
|
+
workspaceId: options.workspaceId,
|
|
32
|
+
endpoint: options.endpoint,
|
|
33
|
+
discoveryEndpoint: options.discoveryEndpoint,
|
|
34
|
+
clientType: 'browser',
|
|
35
|
+
});
|
|
36
|
+
// Requests FeltDB itself makes must never be observed, or reporting an
|
|
37
|
+
// observation would produce another observation.
|
|
38
|
+
const selfOrigins = [options.endpoint, options.discoveryEndpoint]
|
|
39
|
+
.filter((value) => Boolean(value))
|
|
40
|
+
.map(value => value.replace(/\/$/, ''));
|
|
41
|
+
const isSelfRequest = (url) => {
|
|
42
|
+
try {
|
|
43
|
+
const absolute = new URL(url, scope.location ? scope.location.href : 'http://localhost').toString();
|
|
44
|
+
return selfOrigins.some(origin => absolute.startsWith(origin));
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const emitted = [];
|
|
51
|
+
const pending = new Set();
|
|
52
|
+
const recentEvents = [];
|
|
53
|
+
const recordEvent = (event) => {
|
|
54
|
+
recentEvents.push(event);
|
|
55
|
+
if (recentEvents.length > RUNTIME_EVENT_BUFFER)
|
|
56
|
+
recentEvents.shift();
|
|
57
|
+
};
|
|
58
|
+
const eventsNear = (startedAt, until) => recentEvents.filter(event => event.timestamp >= startedAt && event.timestamp <= until);
|
|
59
|
+
const publish = (observation) => {
|
|
60
|
+
const record = { ...observation, workspaceId: connection.workspaceId };
|
|
61
|
+
emitted.push(record);
|
|
62
|
+
// The observation id is the entity id so the record is idempotent and
|
|
63
|
+
// directly addressable after a restart.
|
|
64
|
+
const task = connection
|
|
65
|
+
.publish(RUNTIME_OBSERVATION_COLLECTION, record)
|
|
66
|
+
.catch(() => undefined)
|
|
67
|
+
.finally(() => pending.delete(task));
|
|
68
|
+
pending.add(task);
|
|
69
|
+
};
|
|
70
|
+
const report = (input) => {
|
|
71
|
+
const completedAt = Date.now();
|
|
72
|
+
const build = (correlatedEvents) => createRuntimeObservation({
|
|
73
|
+
method: input.method,
|
|
74
|
+
url: input.url,
|
|
75
|
+
status: input.status,
|
|
76
|
+
startedAt: input.startedAt,
|
|
77
|
+
completedAt,
|
|
78
|
+
workspaceId: connection.workspaceId,
|
|
79
|
+
page: scope.location ? String(scope.location.href) : undefined,
|
|
80
|
+
userAgent: scope.navigator ? String(scope.navigator.userAgent) : undefined,
|
|
81
|
+
correlationId: input.correlationId,
|
|
82
|
+
correlatedEvents,
|
|
83
|
+
networkFailure: input.networkFailure,
|
|
84
|
+
responseCharacteristics: input.responseCharacteristics,
|
|
85
|
+
});
|
|
86
|
+
const failed = input.networkFailure || input.status >= 400;
|
|
87
|
+
if (!failed) {
|
|
88
|
+
publish(build(eventsNear(input.startedAt, completedAt)));
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
// Hold a failing request briefly so the console error it triggers lands in
|
|
92
|
+
// the same durable observation instead of a separate, uncorrelated record.
|
|
93
|
+
const held = new Promise(resolve => {
|
|
94
|
+
const finish = () => {
|
|
95
|
+
publish(build(eventsNear(input.startedAt, Date.now())));
|
|
96
|
+
resolve();
|
|
97
|
+
};
|
|
98
|
+
if (typeof scope.setTimeout === 'function')
|
|
99
|
+
scope.setTimeout(finish, correlationWindowMs);
|
|
100
|
+
else
|
|
101
|
+
finish();
|
|
102
|
+
}).finally(() => pending.delete(held));
|
|
103
|
+
pending.add(held);
|
|
104
|
+
};
|
|
105
|
+
// --- console instrumentation -------------------------------------------
|
|
106
|
+
const originalConsoleError = console.error?.bind(console);
|
|
107
|
+
const originalConsoleWarn = console.warn?.bind(console);
|
|
108
|
+
const describeArguments = (args) => args
|
|
109
|
+
.map(value => {
|
|
110
|
+
if (value instanceof Error)
|
|
111
|
+
return `${value.name}: ${value.message}`;
|
|
112
|
+
if (typeof value === 'string')
|
|
113
|
+
return value;
|
|
114
|
+
try {
|
|
115
|
+
return JSON.stringify(value);
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
return String(value);
|
|
119
|
+
}
|
|
120
|
+
})
|
|
121
|
+
.join(' ');
|
|
122
|
+
if (originalConsoleError) {
|
|
123
|
+
console.error = (...args) => {
|
|
124
|
+
recordEvent({
|
|
125
|
+
kind: 'console_error',
|
|
126
|
+
message: redactMessage(describeArguments(args)),
|
|
127
|
+
timestamp: Date.now(),
|
|
128
|
+
stack: args.find(value => value instanceof Error) instanceof Error
|
|
129
|
+
? redactMessage(String(args.find(value => value instanceof Error).stack || ''))
|
|
130
|
+
: undefined,
|
|
131
|
+
});
|
|
132
|
+
originalConsoleError(...args);
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
if (originalConsoleWarn) {
|
|
136
|
+
console.warn = (...args) => {
|
|
137
|
+
recordEvent({ kind: 'console_warn', message: redactMessage(describeArguments(args)), timestamp: Date.now() });
|
|
138
|
+
originalConsoleWarn(...args);
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
// --- uncaught error instrumentation ------------------------------------
|
|
142
|
+
const onError = (event) => {
|
|
143
|
+
recordEvent({
|
|
144
|
+
kind: 'runtime_error',
|
|
145
|
+
message: redactMessage(String(event?.message || event?.error?.message || 'Uncaught error')),
|
|
146
|
+
timestamp: Date.now(),
|
|
147
|
+
stack: event?.error?.stack ? redactMessage(String(event.error.stack)) : undefined,
|
|
148
|
+
source: event?.filename ? { file: String(event.filename), line: event.lineno, column: event.colno } : undefined,
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
const onRejection = (event) => {
|
|
152
|
+
const reason = event?.reason;
|
|
153
|
+
recordEvent({
|
|
154
|
+
kind: 'unhandled_rejection',
|
|
155
|
+
message: redactMessage(reason instanceof Error ? `${reason.name}: ${reason.message}` : String(reason)),
|
|
156
|
+
timestamp: Date.now(),
|
|
157
|
+
stack: reason instanceof Error && reason.stack ? redactMessage(String(reason.stack)) : undefined,
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
scope.addEventListener?.('error', onError);
|
|
161
|
+
scope.addEventListener?.('unhandledrejection', onRejection);
|
|
162
|
+
// --- fetch instrumentation ---------------------------------------------
|
|
163
|
+
const originalFetch = scope.fetch?.bind(scope);
|
|
164
|
+
if (originalFetch) {
|
|
165
|
+
scope.fetch = async (input, init) => {
|
|
166
|
+
const url = typeof input === 'string' ? input : input?.url ? String(input.url) : String(input);
|
|
167
|
+
const method = String(init?.method || (typeof input === 'object' && input?.method) || 'GET');
|
|
168
|
+
if (isSelfRequest(url))
|
|
169
|
+
return originalFetch(input, init);
|
|
170
|
+
const startedAt = Date.now();
|
|
171
|
+
const correlationId = createCorrelationId();
|
|
172
|
+
try {
|
|
173
|
+
const response = await originalFetch(input, init);
|
|
174
|
+
report({
|
|
175
|
+
method,
|
|
176
|
+
url,
|
|
177
|
+
status: response.status,
|
|
178
|
+
startedAt,
|
|
179
|
+
correlationId,
|
|
180
|
+
responseCharacteristics: {
|
|
181
|
+
ok: response.ok,
|
|
182
|
+
statusText: response.statusText,
|
|
183
|
+
contentType: response.headers?.get?.('content-type') || undefined,
|
|
184
|
+
},
|
|
185
|
+
});
|
|
186
|
+
return response;
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
report({
|
|
190
|
+
method,
|
|
191
|
+
url,
|
|
192
|
+
status: 0,
|
|
193
|
+
startedAt,
|
|
194
|
+
correlationId,
|
|
195
|
+
networkFailure: true,
|
|
196
|
+
responseCharacteristics: { error: redactMessage(String(error)) },
|
|
197
|
+
});
|
|
198
|
+
throw error;
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
// --- XMLHttpRequest instrumentation ------------------------------------
|
|
203
|
+
const OriginalXhr = scope.XMLHttpRequest;
|
|
204
|
+
if (OriginalXhr) {
|
|
205
|
+
const originalOpen = OriginalXhr.prototype.open;
|
|
206
|
+
const originalSend = OriginalXhr.prototype.send;
|
|
207
|
+
OriginalXhr.prototype.open = function (method, url, ...rest) {
|
|
208
|
+
this.__feltdb = { method, url };
|
|
209
|
+
return originalOpen.call(this, method, url, ...rest);
|
|
210
|
+
};
|
|
211
|
+
OriginalXhr.prototype.send = function (...args) {
|
|
212
|
+
const context = this.__feltdb;
|
|
213
|
+
if (context && !isSelfRequest(context.url)) {
|
|
214
|
+
const startedAt = Date.now();
|
|
215
|
+
const correlationId = createCorrelationId();
|
|
216
|
+
let settled = false;
|
|
217
|
+
this.addEventListener('loadend', () => {
|
|
218
|
+
if (settled)
|
|
219
|
+
return;
|
|
220
|
+
settled = true;
|
|
221
|
+
const networkFailure = this.status === 0;
|
|
222
|
+
report({
|
|
223
|
+
method: context.method,
|
|
224
|
+
url: context.url,
|
|
225
|
+
status: this.status,
|
|
226
|
+
startedAt,
|
|
227
|
+
correlationId,
|
|
228
|
+
networkFailure,
|
|
229
|
+
responseCharacteristics: { statusText: this.statusText || undefined },
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
return originalSend.apply(this, args);
|
|
234
|
+
};
|
|
235
|
+
OriginalXhr.__feltdbOriginalOpen = originalOpen;
|
|
236
|
+
OriginalXhr.__feltdbOriginalSend = originalSend;
|
|
237
|
+
}
|
|
238
|
+
const flush = async () => {
|
|
239
|
+
// Held observations register new promises as they settle, so drain until
|
|
240
|
+
// the set is genuinely empty rather than snapshotting once.
|
|
241
|
+
while (pending.size > 0)
|
|
242
|
+
await Promise.all([...pending]);
|
|
243
|
+
};
|
|
244
|
+
const handle = {
|
|
245
|
+
workspaceId: connection.workspaceId,
|
|
246
|
+
observations: () => [...emitted],
|
|
247
|
+
flush,
|
|
248
|
+
stop: async () => {
|
|
249
|
+
if (originalFetch)
|
|
250
|
+
scope.fetch = originalFetch;
|
|
251
|
+
if (originalConsoleError)
|
|
252
|
+
console.error = originalConsoleError;
|
|
253
|
+
if (originalConsoleWarn)
|
|
254
|
+
console.warn = originalConsoleWarn;
|
|
255
|
+
if (OriginalXhr) {
|
|
256
|
+
OriginalXhr.prototype.open = OriginalXhr.__feltdbOriginalOpen;
|
|
257
|
+
OriginalXhr.prototype.send = OriginalXhr.__feltdbOriginalSend;
|
|
258
|
+
}
|
|
259
|
+
scope.removeEventListener?.('error', onError);
|
|
260
|
+
scope.removeEventListener?.('unhandledrejection', onRejection);
|
|
261
|
+
await flush();
|
|
262
|
+
await connection.disconnect();
|
|
263
|
+
},
|
|
264
|
+
};
|
|
265
|
+
if (options.exposeGlobal !== false)
|
|
266
|
+
scope.__feltdbRuntime = handle;
|
|
267
|
+
return handle;
|
|
268
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-connection.d.ts","sourceRoot":"","sources":["../../src/workspace/workspace-connection.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAGlE,MAAM,WAAW,0BAA0B;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE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EAAE,0BAA0B,GAClC,OAAO,CAAC,8BAA8B,CAAC,CAwCzC;AAYD;;;;;GAKG;AACH,qBAAa,8BAA8B;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,aAAa,CAA4E;IACjG,WAAW,EAAE,MAAM,CAAK;IACxB,OAAO,CAAC,SAAS,CAAmC;IACpD,OAAO,CAAC,iBAAiB,CAA6B;gBAGpD,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,0BAA0B;IAQrC;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAiB9B;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"workspace-connection.d.ts","sourceRoot":"","sources":["../../src/workspace/workspace-connection.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAGlE,MAAM,WAAW,0BAA0B;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB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AC,GAClB,OAAO,CAAC,IAAI,CAAC;IAUhB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,gBAAgB;YAKV,eAAe;CAiB9B"}
|
|
@@ -196,12 +196,21 @@ export class DevelopmentWorkspaceConnection {
|
|
|
196
196
|
async disconnect() {
|
|
197
197
|
this.unsubscribeEvents?.();
|
|
198
198
|
this.unsubscribeEvents = null;
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
try {
|
|
200
|
+
if (this.transport) {
|
|
201
|
+
await this.transport.unregisterClient(this.workspaceId, this.clientId);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
catch {
|
|
205
|
+
// Disconnecting after the workspace authority has already stopped is
|
|
206
|
+
// normal, not an error: the client registration is gone with it. The
|
|
207
|
+
// local connection must still be torn down.
|
|
208
|
+
}
|
|
209
|
+
finally {
|
|
210
|
+
this.subscriptions.clear();
|
|
211
|
+
this.transport = null;
|
|
212
|
+
this.connectedAt = 0;
|
|
201
213
|
}
|
|
202
|
-
this.subscriptions.clear();
|
|
203
|
-
this.transport = null;
|
|
204
|
-
this.connectedAt = 0;
|
|
205
214
|
}
|
|
206
215
|
/**
|
|
207
216
|
* Get capabilities for this client type
|
|
@@ -59,17 +59,110 @@ export interface VerificationResult {
|
|
|
59
59
|
export type InvestigationState = "OBSERVED" | "INVESTIGATING" | "FINDING" | "PROPOSED";
|
|
60
60
|
export type RemediationState = "NOT_STARTED" | "SENT_TO_AGENT" | "IMPLEMENTING" | "CHANGES_DETECTED" | "IMPLEMENTATION_COMPLETE";
|
|
61
61
|
export type VerificationState = "NOT_READY" | "WAITING_FOR_RUNTIME" | "VERIFYING" | "VERIFIED" | "NOT_FIXED" | "INCONCLUSIVE";
|
|
62
|
+
/** A runtime event correlated to a request observation (console/error/rejection). */
|
|
63
|
+
export interface CorrelatedRuntimeEvent {
|
|
64
|
+
kind: "console_error" | "console_warn" | "runtime_error" | "unhandled_rejection";
|
|
65
|
+
message: string;
|
|
66
|
+
timestamp: number;
|
|
67
|
+
stack?: string;
|
|
68
|
+
source?: SourceLocation;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The single FeltDB runtime observation contract.
|
|
72
|
+
*
|
|
73
|
+
* This is the only observation shape in the system. The browser runtime in
|
|
74
|
+
* `@feltdb/core` produces it, the workspace persists it, investigations are
|
|
75
|
+
* created from it, and verification is evaluated against it.
|
|
76
|
+
*/
|
|
62
77
|
export interface RuntimeRequestObservation {
|
|
63
78
|
observationId: string;
|
|
79
|
+
workspaceId?: string;
|
|
64
80
|
investigationId?: string;
|
|
65
81
|
verificationId?: string;
|
|
66
82
|
method: string;
|
|
67
83
|
url: string;
|
|
68
84
|
status: number;
|
|
69
85
|
timestamp: number;
|
|
86
|
+
/** Wall-clock duration of the observed request, in milliseconds. */
|
|
87
|
+
durationMs?: number;
|
|
88
|
+
/** Runtime that produced this observation, e.g. "browser". */
|
|
89
|
+
runtime?: string;
|
|
90
|
+
/** Browser family derived from the user agent, e.g. "Chrome", "Firefox". */
|
|
91
|
+
browser?: string;
|
|
92
|
+
/** Browser engine, e.g. "Blink", "Gecko", "WebKit". */
|
|
93
|
+
engine?: string;
|
|
94
|
+
/** Page/location context the request originated from (redacted). */
|
|
95
|
+
page?: string;
|
|
96
|
+
/** Correlation identifier linking this request to runtime events. */
|
|
97
|
+
correlationId?: string;
|
|
98
|
+
/** Console and runtime errors correlated to this request. */
|
|
99
|
+
correlatedEvents?: CorrelatedRuntimeEvent[];
|
|
100
|
+
/** True when the request never produced an HTTP response (network failure). */
|
|
101
|
+
networkFailure?: boolean;
|
|
70
102
|
requestCharacteristics?: Record<string, unknown>;
|
|
71
103
|
responseCharacteristics?: Record<string, unknown>;
|
|
72
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* A fact observed by the runtime.
|
|
107
|
+
*
|
|
108
|
+
* Evidence is never an interpretation. Every evidence record traces back to a
|
|
109
|
+
* runtime observation and carries `source: "runtime_observation"`.
|
|
110
|
+
*/
|
|
111
|
+
export interface InvestigationEvidence {
|
|
112
|
+
id: string;
|
|
113
|
+
investigationId: string;
|
|
114
|
+
observationId: string;
|
|
115
|
+
kind: "http_response" | "network_failure" | "timing" | "browser_context" | "console_error" | "runtime_error";
|
|
116
|
+
/** Factual statement of what the runtime observed. */
|
|
117
|
+
statement: string;
|
|
118
|
+
/** Evidence is always runtime-sourced. It is never generated by analysis. */
|
|
119
|
+
source: "runtime_observation";
|
|
120
|
+
observedAt: number;
|
|
121
|
+
detail?: Record<string, unknown>;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The engineering interpretation of the evidence.
|
|
125
|
+
*
|
|
126
|
+
* A finding is explicitly NOT evidence: it carries `origin: "feltdb_analysis"`
|
|
127
|
+
* and names the evidence it was derived from.
|
|
128
|
+
*/
|
|
129
|
+
export interface InvestigationFinding {
|
|
130
|
+
id: string;
|
|
131
|
+
investigationId: string;
|
|
132
|
+
/** The interpretation, e.g. "/api/x is returning HTTP 500". */
|
|
133
|
+
statement: string;
|
|
134
|
+
/** Findings are analysis, never runtime facts. */
|
|
135
|
+
origin: "feltdb_analysis";
|
|
136
|
+
confidence: "high" | "medium" | "low";
|
|
137
|
+
/** Evidence record ids this interpretation was derived from. */
|
|
138
|
+
derivedFromEvidence: string[];
|
|
139
|
+
createdAt: number;
|
|
140
|
+
}
|
|
141
|
+
/** Observable repository state used to detect that remediation happened. */
|
|
142
|
+
export interface RepositoryIdentity {
|
|
143
|
+
/** HEAD commit SHA, or null when the directory is not a Git repository. */
|
|
144
|
+
head: string | null;
|
|
145
|
+
branch?: string;
|
|
146
|
+
/** Digest over tracked-file status and content of modified files. */
|
|
147
|
+
workingTreeDigest: string;
|
|
148
|
+
dirty: boolean;
|
|
149
|
+
capturedAt: number;
|
|
150
|
+
}
|
|
151
|
+
/** Association between an investigation and the repository change it caused. */
|
|
152
|
+
export interface RemediationTracking {
|
|
153
|
+
investigationId: string;
|
|
154
|
+
gitBefore: RepositoryIdentity;
|
|
155
|
+
gitAfter?: RepositoryIdentity;
|
|
156
|
+
/** Paths that changed between `gitBefore` and `gitAfter`. */
|
|
157
|
+
changedPaths: string[];
|
|
158
|
+
/**
|
|
159
|
+
* Stable identity of the change: the new HEAD SHA when the agent committed,
|
|
160
|
+
* otherwise the working-tree digest. Uncommitted work is legitimate.
|
|
161
|
+
*/
|
|
162
|
+
changeIdentity?: string;
|
|
163
|
+
changeKind?: "commit" | "working_tree";
|
|
164
|
+
detectedAt?: number;
|
|
165
|
+
}
|
|
73
166
|
export interface VerificationCriterion {
|
|
74
167
|
id: string;
|
|
75
168
|
kind: "primary" | "secondary";
|
|
@@ -93,6 +186,12 @@ export interface RemediationContract {
|
|
|
93
186
|
createdAt: number;
|
|
94
187
|
updatedAt: number;
|
|
95
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* The durable investigation record.
|
|
191
|
+
*
|
|
192
|
+
* This is the artifact that must survive browser refresh, process exit, and
|
|
193
|
+
* workspace restart. Every stage of the runtime loop appends to it.
|
|
194
|
+
*/
|
|
96
195
|
export interface RuntimeInvestigation {
|
|
97
196
|
id: string;
|
|
98
197
|
workspaceId: string;
|
|
@@ -103,6 +202,20 @@ export interface RuntimeInvestigation {
|
|
|
103
202
|
verificationState: VerificationState;
|
|
104
203
|
createdAt: number;
|
|
105
204
|
updatedAt: number;
|
|
205
|
+
/** The runtime observation that opened this investigation. */
|
|
206
|
+
originalObservation?: RuntimeRequestObservation;
|
|
207
|
+
/** Runtime facts. Never analysis. */
|
|
208
|
+
evidence?: InvestigationEvidence[];
|
|
209
|
+
/** Engineering interpretation. Never presented as runtime fact. */
|
|
210
|
+
finding?: InvestigationFinding;
|
|
211
|
+
/** The agent-executable contract handed to the coding agent. */
|
|
212
|
+
remediationContract?: RemediationContract;
|
|
213
|
+
/** Git-backed association between this investigation and the code change. */
|
|
214
|
+
remediation?: RemediationTracking;
|
|
215
|
+
/** The runtime observation captured after remediation. */
|
|
216
|
+
verificationObservation?: RuntimeRequestObservation;
|
|
217
|
+
/** The evaluated verification outcome. */
|
|
218
|
+
verificationAttempt?: VerificationAttempt;
|
|
106
219
|
}
|
|
107
220
|
export interface WorkspaceActivity {
|
|
108
221
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-types.d.ts","sourceRoot":"","sources":["../../src/workspace/workspace-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,KAAK,GAAG,aAAa,GAAG,OAAO,CAAC;AAEvF,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,OAAO;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;IACxC,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IAEpB,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IAEnC,MAAM,EACF,MAAM,GACN,aAAa,GACb,wBAAwB,GACxB,UAAU,GACV,QAAQ,GACR,WAAW,CAAC;IAEhB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,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,CAAC,EAAE,CAAC,CAAC;IAE5D,OAAO,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1D,MAAM,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5E,SAAS,CAAC,CAAC,EACT,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,KAAK,IAAI,GAClD,MAAM,IAAI,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feltdb/core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.10",
|
|
4
4
|
"description": "FeltDB Core - Application-facing database with Browser, Local, and Server runtimes. Durable state, reactive APIs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -12,9 +12,11 @@
|
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"browser": "./dist/index.browser.js",
|
|
15
17
|
"import": "./dist/index.js",
|
|
16
18
|
"require": "./dist/index.js",
|
|
17
|
-
"
|
|
19
|
+
"default": "./dist/index.js"
|
|
18
20
|
},
|
|
19
21
|
"./db": {
|
|
20
22
|
"import": "./dist/db.js",
|
|
@@ -46,7 +48,12 @@
|
|
|
46
48
|
"import": "./dist/workspace/index.js",
|
|
47
49
|
"types": "./dist/workspace/index.d.ts"
|
|
48
50
|
},
|
|
49
|
-
"./package.json": "./package.json"
|
|
51
|
+
"./package.json": "./package.json",
|
|
52
|
+
"./browser": {
|
|
53
|
+
"types": "./dist/index-core.d.ts",
|
|
54
|
+
"import": "./dist/index.browser.js",
|
|
55
|
+
"default": "./dist/index.browser.js"
|
|
56
|
+
}
|
|
50
57
|
},
|
|
51
58
|
"files": [
|
|
52
59
|
"dist/",
|
|
@@ -96,5 +103,6 @@
|
|
|
96
103
|
"type": "git",
|
|
97
104
|
"url": "git+https://github.com/rkendel1/feltdb.git",
|
|
98
105
|
"directory": "packages/core"
|
|
99
|
-
}
|
|
106
|
+
},
|
|
107
|
+
"browser": "./dist/index.browser.js"
|
|
100
108
|
}
|