@pellux/goodvibes-sdk 0.33.37 → 0.33.38
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/client-auth/control-plane-auth-snapshot.d.ts +23 -0
- package/dist/client-auth/control-plane-auth-snapshot.d.ts.map +1 -1
- package/dist/client-auth/oauth-types.d.ts +18 -0
- package/dist/client-auth/oauth-types.d.ts.map +1 -1
- package/dist/client-auth/types.d.ts +26 -0
- package/dist/client-auth/types.d.ts.map +1 -1
- package/dist/client.d.ts +22 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/contracts/artifacts/operator-contract.json +84 -10
- package/dist/events/knowledge.d.ts +31 -0
- package/dist/events/knowledge.d.ts.map +1 -1
- package/dist/events/tasks.d.ts +58 -0
- package/dist/events/tasks.d.ts.map +1 -1
- package/dist/events/transport.d.ts +60 -0
- package/dist/events/transport.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-config.d.ts +6 -0
- package/dist/platform/agents/wrfc-config.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-config.js +6 -0
- package/dist/platform/agents/wrfc-controller.d.ts +74 -0
- package/dist/platform/agents/wrfc-controller.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-controller.js +368 -9
- package/dist/platform/agents/wrfc-reporting.d.ts +60 -0
- package/dist/platform/agents/wrfc-reporting.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-reporting.js +131 -7
- package/dist/platform/agents/wrfc-types.d.ts +12 -0
- package/dist/platform/agents/wrfc-types.d.ts.map +1 -1
- package/dist/platform/config/manager.d.ts +11 -0
- package/dist/platform/config/manager.d.ts.map +1 -1
- package/dist/platform/config/manager.js +17 -1
- package/dist/platform/config/schema-domain-core.d.ts +2 -0
- package/dist/platform/config/schema-domain-core.d.ts.map +1 -1
- package/dist/platform/config/schema-domain-core.js +17 -0
- package/dist/platform/config/schema-shared.d.ts +6 -0
- package/dist/platform/config/schema-shared.d.ts.map +1 -1
- package/dist/platform/config/schema-types.d.ts +9 -2
- package/dist/platform/config/schema-types.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-control-automation.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-control-automation.js +10 -4
- package/dist/platform/control-plane/method-catalog-knowledge.js +4 -4
- package/dist/platform/control-plane/method-catalog-runtime.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-runtime.js +13 -0
- package/dist/platform/control-plane/routes/automation.js +2 -2
- package/dist/platform/control-plane/routes/operator.d.ts.map +1 -1
- package/dist/platform/control-plane/routes/operator.js +2 -0
- package/dist/platform/control-plane/routes/sessions.js +1 -1
- package/dist/platform/daemon/http/router.d.ts.map +1 -1
- package/dist/platform/daemon/http/router.js +12 -2
- package/dist/platform/daemon/http-listener.d.ts +17 -0
- package/dist/platform/daemon/http-listener.d.ts.map +1 -1
- package/dist/platform/daemon/http-listener.js +186 -7
- package/dist/platform/knowledge/knowledge-api.d.ts +1 -1
- package/dist/platform/knowledge/knowledge-api.d.ts.map +1 -1
- package/dist/platform/knowledge/knowledge-api.js +1 -1
- package/dist/platform/runtime/store/helpers/reducers/lifecycle.d.ts.map +1 -1
- package/dist/platform/runtime/store/helpers/reducers/lifecycle.js +4 -0
- package/dist/platform/runtime/store/helpers/reducers/sync.d.ts.map +1 -1
- package/dist/platform/runtime/store/helpers/reducers/sync.js +4 -0
- package/dist/platform/security/http-auth.d.ts.map +1 -1
- package/dist/platform/security/http-auth.js +11 -4
- package/dist/platform/security/user-auth.d.ts +98 -2
- package/dist/platform/security/user-auth.d.ts.map +1 -1
- package/dist/platform/security/user-auth.js +195 -18
- package/dist/platform/sessions/manager.d.ts +19 -2
- package/dist/platform/sessions/manager.d.ts.map +1 -1
- package/dist/platform/sessions/manager.js +43 -6
- package/dist/platform/state/memory-registry.d.ts +1 -1
- package/dist/platform/state/memory-registry.d.ts.map +1 -1
- package/dist/platform/state/memory-registry.js +2 -2
- package/dist/platform/state/memory-store.d.ts +1 -1
- package/dist/platform/state/memory-store.d.ts.map +1 -1
- package/dist/platform/state/memory-store.js +2 -2
- package/dist/platform/version.js +1 -1
- package/package.json +9 -9
|
@@ -11,6 +11,13 @@ import { resolveScopedDirectory } from '../runtime/surface-root.js';
|
|
|
11
11
|
* Line 0: { type: 'meta', ...SessionMeta }
|
|
12
12
|
* Line N: { type: 'message', ...message fields }
|
|
13
13
|
*/
|
|
14
|
+
/**
|
|
15
|
+
* Current schema version written to session files.
|
|
16
|
+
* Increment when the file format changes in a backward-incompatible way.
|
|
17
|
+
* Readers accept: version undefined (legacy, treated as 0), version <= CURRENT, and
|
|
18
|
+
* version > CURRENT (future — logged as a warning, accepted with best-effort parsing).
|
|
19
|
+
*/
|
|
20
|
+
export const CURRENT_SESSION_SCHEMA_VERSION = 1;
|
|
14
21
|
export class SessionManager {
|
|
15
22
|
sessionsDir;
|
|
16
23
|
constructor(baseDir, options) {
|
|
@@ -51,21 +58,37 @@ export class SessionManager {
|
|
|
51
58
|
}
|
|
52
59
|
}
|
|
53
60
|
/**
|
|
54
|
-
* Atomically write content to filePath via a temp file + fsync + rename.
|
|
55
|
-
* Protects against partial writes on
|
|
61
|
+
* Atomically write content to filePath via a temp file + fsync(file) + rename + fsync(dir).
|
|
62
|
+
* Protects against partial writes and directory-entry reversion on power loss:
|
|
63
|
+
* 1. Write content to a tmp file in the same directory.
|
|
64
|
+
* 2. fsync the tmp file to flush its data to storage.
|
|
65
|
+
* 3. rename the tmp file into place (atomic on POSIX).
|
|
66
|
+
* 4. fsync the parent directory to flush the directory entry — without
|
|
67
|
+
* this step, on power loss after rename the directory entry can
|
|
68
|
+
* revert and the renamed file disappears.
|
|
69
|
+
* Mirrors the reference implementation in platform/security/user-auth.ts
|
|
70
|
+
* (atomicWriteSecretFile), which performs both fsyncs.
|
|
56
71
|
*/
|
|
57
72
|
_atomicWrite(filePath, content) {
|
|
58
73
|
const tmpPath = join(this.sessionsDir, `.tmp-${process.pid}-${Date.now()}`);
|
|
59
74
|
writeFileSync(tmpPath, content, 'utf-8');
|
|
60
|
-
// fsync to flush
|
|
61
|
-
const
|
|
75
|
+
// fsync the file to flush data buffers before rename
|
|
76
|
+
const fileFd = openSync(tmpPath, 'r+');
|
|
62
77
|
try {
|
|
63
|
-
fsyncSync(
|
|
78
|
+
fsyncSync(fileFd);
|
|
64
79
|
}
|
|
65
80
|
finally {
|
|
66
|
-
closeSync(
|
|
81
|
+
closeSync(fileFd);
|
|
67
82
|
}
|
|
68
83
|
renameSync(tmpPath, filePath);
|
|
84
|
+
// fsync the directory to flush the directory entry (makes rename durable)
|
|
85
|
+
const dirFd = openSync(this.sessionsDir, 'r');
|
|
86
|
+
try {
|
|
87
|
+
fsyncSync(dirFd);
|
|
88
|
+
}
|
|
89
|
+
finally {
|
|
90
|
+
closeSync(dirFd);
|
|
91
|
+
}
|
|
69
92
|
}
|
|
70
93
|
/**
|
|
71
94
|
* Save conversation messages to a JSONL session file.
|
|
@@ -82,6 +105,7 @@ export class SessionManager {
|
|
|
82
105
|
// First line: meta record
|
|
83
106
|
const metaRecord = {
|
|
84
107
|
type: 'meta',
|
|
108
|
+
schemaVersion: CURRENT_SESSION_SCHEMA_VERSION,
|
|
85
109
|
timestamp: meta.timestamp,
|
|
86
110
|
title: meta.title,
|
|
87
111
|
model: meta.model,
|
|
@@ -135,6 +159,14 @@ export class SessionManager {
|
|
|
135
159
|
continue;
|
|
136
160
|
}
|
|
137
161
|
if (record.type === 'meta') {
|
|
162
|
+
const fileVersion = typeof record.schemaVersion === 'number' ? record.schemaVersion : 0;
|
|
163
|
+
if (fileVersion > CURRENT_SESSION_SCHEMA_VERSION) {
|
|
164
|
+
logger.warn('SessionManager: session file has a newer schemaVersion — loading with best-effort parsing', {
|
|
165
|
+
name,
|
|
166
|
+
fileVersion,
|
|
167
|
+
currentVersion: CURRENT_SESSION_SCHEMA_VERSION,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
138
170
|
meta = {
|
|
139
171
|
title: String(record.title ?? ''),
|
|
140
172
|
model: String(record.model ?? ''),
|
|
@@ -144,6 +176,7 @@ export class SessionManager {
|
|
|
144
176
|
returnContext: (record.returnContext && typeof record.returnContext === 'object')
|
|
145
177
|
? record.returnContext
|
|
146
178
|
: undefined,
|
|
179
|
+
schemaVersion: fileVersion,
|
|
147
180
|
};
|
|
148
181
|
}
|
|
149
182
|
else if (record.type === 'message') {
|
|
@@ -196,6 +229,7 @@ export class SessionManager {
|
|
|
196
229
|
try {
|
|
197
230
|
const first = JSON.parse(lines[0]);
|
|
198
231
|
if (first.type === 'meta') {
|
|
232
|
+
const fileVersion = typeof first.schemaVersion === 'number' ? first.schemaVersion : 0;
|
|
199
233
|
meta = {
|
|
200
234
|
title: String(first.title ?? ''),
|
|
201
235
|
model: String(first.model ?? ''),
|
|
@@ -205,6 +239,7 @@ export class SessionManager {
|
|
|
205
239
|
returnContext: (first.returnContext && typeof first.returnContext === 'object')
|
|
206
240
|
? first.returnContext
|
|
207
241
|
: undefined,
|
|
242
|
+
schemaVersion: fileVersion,
|
|
208
243
|
};
|
|
209
244
|
}
|
|
210
245
|
}
|
|
@@ -273,6 +308,7 @@ export class SessionManager {
|
|
|
273
308
|
const record = JSON.parse(firstLine);
|
|
274
309
|
if (record.type !== 'meta')
|
|
275
310
|
return null;
|
|
311
|
+
const fileVersion = typeof record.schemaVersion === 'number' ? record.schemaVersion : 0;
|
|
276
312
|
return {
|
|
277
313
|
title: String(record.title ?? ''),
|
|
278
314
|
model: String(record.model ?? ''),
|
|
@@ -282,6 +318,7 @@ export class SessionManager {
|
|
|
282
318
|
returnContext: (record.returnContext && typeof record.returnContext === 'object')
|
|
283
319
|
? record.returnContext
|
|
284
320
|
: undefined,
|
|
321
|
+
schemaVersion: fileVersion,
|
|
285
322
|
};
|
|
286
323
|
}
|
|
287
324
|
catch (err) {
|
|
@@ -19,7 +19,7 @@ export declare class MemoryRegistry {
|
|
|
19
19
|
rebuildVectorsAsync(): Promise<MemoryVectorStats>;
|
|
20
20
|
vectorStats(): MemoryVectorStats;
|
|
21
21
|
doctor(): Promise<MemoryDoctorReport>;
|
|
22
|
-
reviewQueue(limit?: number): MemoryRecord[];
|
|
22
|
+
reviewQueue(limit?: number, scope?: MemoryScope): MemoryRecord[];
|
|
23
23
|
exportBundle(filter?: MemorySearchFilter): MemoryBundle;
|
|
24
24
|
importBundle(bundle: MemoryBundle): Promise<MemoryImportResult>;
|
|
25
25
|
get(id: string): MemoryRecord | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-registry.d.ts","sourceRoot":"","sources":["../../../src/platform/state/memory-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACnN,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D;;;GAGG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,SAAS,CAAyB;gBAE9B,KAAK,EAAE,WAAW;IAI9B,QAAQ,IAAI,WAAW;IAIvB,SAAS,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAOrC,OAAO,CAAC,MAAM;IAIR,GAAG,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAMxD,MAAM,CAAC,MAAM,GAAE,kBAAuB,GAAG,YAAY,EAAE;IAIvD,cAAc,CAAC,MAAM,GAAE,kBAAuB,GAAG,0BAA0B,EAAE;IAI7E,cAAc,IAAI,iBAAiB;IAI7B,mBAAmB,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAIvD,WAAW,IAAI,iBAAiB;IAI1B,MAAM,IAAI,OAAO,CAAC,kB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,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI;IAI9B,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAMtF,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,EAAE;IAIlC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;QAAE,KAAK,CAAC,EAAE,WAAW,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,YAAY,GAAG,IAAI;IAM3H,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,GAAG,YAAY,GAAG,IAAI;IAMjE,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAM3B,MAAM,IAAI,YAAY,EAAE;CAGzB"}
|
|
@@ -44,8 +44,8 @@ export class MemoryRegistry {
|
|
|
44
44
|
async doctor() {
|
|
45
45
|
return this.store.doctor();
|
|
46
46
|
}
|
|
47
|
-
reviewQueue(limit = 10) {
|
|
48
|
-
return this.store.reviewQueue(limit);
|
|
47
|
+
reviewQueue(limit = 10, scope) {
|
|
48
|
+
return this.store.reviewQueue(limit, scope);
|
|
49
49
|
}
|
|
50
50
|
exportBundle(filter = {}) {
|
|
51
51
|
return this.store.exportBundle(filter);
|
|
@@ -148,7 +148,7 @@ export declare class MemoryStore {
|
|
|
148
148
|
/** Search records with an optional filter. */
|
|
149
149
|
search(filter?: MemorySearchFilter): MemoryRecord[];
|
|
150
150
|
searchSemantic(filter?: MemorySearchFilter): MemorySemanticSearchResult[];
|
|
151
|
-
reviewQueue(limit?: number): MemoryRecord[];
|
|
151
|
+
reviewQueue(limit?: number, scope?: MemoryScope): MemoryRecord[];
|
|
152
152
|
exportBundle(filter?: MemorySearchFilter): MemoryBundle;
|
|
153
153
|
importBundle(bundle: MemoryBundle): Promise<MemoryImportResult>;
|
|
154
154
|
/** Create a directed link between two records. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-store.d.ts","sourceRoot":"","sources":["../../../src/platform/state/memory-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAEL,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,+BAA+B,EAC/B,KAAK,2BAA2B,EACjC,MAAM,wBAAwB,CAAC;AAkBhC,MAAM,MAAM,WAAW,GACnB,UAAU,GACV,YAAY,GACZ,UAAU,GACV,SAAS,GACT,MAAM,GACN,MAAM,GACN,SAAS,GACT,cAAc,GACd,WAAW,CAAC;AAEhB,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAEzD,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,CAAC;AAEhF,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhF,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,kBAAkB,CAAC;IACzB,4FAA4F;IAC5F,GAAG,EAAE,MAAM,CAAC;IACZ,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;IAC3B,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,+DAA+D;IAC/D,KAAK,EAAE,WAAW,CAAC;IACnB,sEAAsE;IACtE,GAAG,EAAE,WAAW,CAAC;IACjB,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,gCAAgC;IAChC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,oCAAoC;IACpC,IAAI,EAAE,MAAM,EAAE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|
208
208
|
.slice(0, requestedLimit);
|
|
209
209
|
}
|
|
210
|
-
reviewQueue(limit = 10) {
|
|
211
|
-
const records = this.search({ limit: Math.max(limit * 4, 25) });
|
|
210
|
+
reviewQueue(limit = 10, scope) {
|
|
211
|
+
const records = this.search({ limit: Math.max(limit * 4, 25), ...(scope ? { scope } : {}) });
|
|
212
212
|
const candidates = records.filter((record) => isReviewCandidate(record));
|
|
213
213
|
return candidates
|
|
214
214
|
.sort((a, b) => reviewQueueScore(b) - reviewQueueScore(a) || b.updatedAt - a.updatedAt || b.createdAt - a.createdAt)
|
package/dist/platform/version.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
let version = '0.33.
|
|
3
|
+
let version = '0.33.38';
|
|
4
4
|
try {
|
|
5
5
|
const pkg = JSON.parse(readFileSync(join(import.meta.dir, '..', '..', 'package.json'), 'utf-8'));
|
|
6
6
|
version = pkg.version ?? version;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pellux/goodvibes-sdk",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.38",
|
|
4
4
|
"description": "TypeScript SDK for building GoodVibes operator, peer, web, mobile, and daemon-connected apps with typed contracts, auth, realtime events, and transport layers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"goodvibes",
|
|
@@ -453,14 +453,14 @@
|
|
|
453
453
|
"sideEffects": false,
|
|
454
454
|
"type": "module",
|
|
455
455
|
"dependencies": {
|
|
456
|
-
"@pellux/goodvibes-contracts": "0.33.
|
|
457
|
-
"@pellux/goodvibes-daemon-sdk": "0.33.
|
|
458
|
-
"@pellux/goodvibes-errors": "0.33.
|
|
459
|
-
"@pellux/goodvibes-operator-sdk": "0.33.
|
|
460
|
-
"@pellux/goodvibes-peer-sdk": "0.33.
|
|
461
|
-
"@pellux/goodvibes-transport-core": "0.33.
|
|
462
|
-
"@pellux/goodvibes-transport-http": "0.33.
|
|
463
|
-
"@pellux/goodvibes-transport-realtime": "0.33.
|
|
456
|
+
"@pellux/goodvibes-contracts": "0.33.38",
|
|
457
|
+
"@pellux/goodvibes-daemon-sdk": "0.33.38",
|
|
458
|
+
"@pellux/goodvibes-errors": "0.33.38",
|
|
459
|
+
"@pellux/goodvibes-operator-sdk": "0.33.38",
|
|
460
|
+
"@pellux/goodvibes-peer-sdk": "0.33.38",
|
|
461
|
+
"@pellux/goodvibes-transport-core": "0.33.38",
|
|
462
|
+
"@pellux/goodvibes-transport-http": "0.33.38",
|
|
463
|
+
"@pellux/goodvibes-transport-realtime": "0.33.38"
|
|
464
464
|
},
|
|
465
465
|
"optionalDependencies": {
|
|
466
466
|
"@agentclientprotocol/sdk": "^0.21.0",
|