@pellux/goodvibes-sdk 0.18.16 → 0.18.18
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/_internal/platform/agents/orchestrator-runner.d.ts +5 -4
- package/dist/_internal/platform/agents/orchestrator-runner.d.ts.map +1 -1
- package/dist/_internal/platform/agents/orchestrator-runner.js +9 -8
- package/dist/_internal/platform/agents/orchestrator.d.ts.map +1 -1
- package/dist/_internal/platform/agents/orchestrator.js +1 -0
- package/dist/_internal/platform/agents/wrfc-controller.d.ts +2 -1
- package/dist/_internal/platform/agents/wrfc-controller.d.ts.map +1 -1
- package/dist/_internal/platform/agents/wrfc-controller.js +6 -6
- package/dist/_internal/platform/agents/wrfc-workmap.d.ts +4 -1
- package/dist/_internal/platform/agents/wrfc-workmap.d.ts.map +1 -1
- package/dist/_internal/platform/agents/wrfc-workmap.js +4 -2
- package/dist/_internal/platform/automation/schedules.js +1 -1
- package/dist/_internal/platform/bookmarks/manager.d.ts +1 -1
- package/dist/_internal/platform/bookmarks/manager.js +1 -1
- package/dist/_internal/platform/config/manager.d.ts +3 -2
- package/dist/_internal/platform/config/manager.d.ts.map +1 -1
- package/dist/_internal/platform/config/manager.js +12 -7
- package/dist/_internal/platform/config/schema-domain-core.js +1 -1
- package/dist/_internal/platform/config/schema-domain-runtime.js +1 -1
- package/dist/_internal/platform/config/secrets.d.ts +6 -4
- package/dist/_internal/platform/config/secrets.d.ts.map +1 -1
- package/dist/_internal/platform/config/secrets.js +19 -16
- package/dist/_internal/platform/config/service-registry.d.ts +1 -1
- package/dist/_internal/platform/config/service-registry.js +1 -1
- package/dist/_internal/platform/config/subscription-providers.js +1 -1
- package/dist/_internal/platform/daemon/cli.js +1 -1
- package/dist/_internal/platform/daemon/facade-composition.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/facade-composition.js +4 -0
- package/dist/_internal/platform/daemon/service-manager.d.ts +8 -0
- package/dist/_internal/platform/daemon/service-manager.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/service-manager.js +41 -27
- package/dist/_internal/platform/discovery/mcp-scanner.d.ts +3 -1
- package/dist/_internal/platform/discovery/mcp-scanner.d.ts.map +1 -1
- package/dist/_internal/platform/discovery/mcp-scanner.js +6 -5
- package/dist/_internal/platform/discovery/scanner.d.ts +3 -1
- package/dist/_internal/platform/discovery/scanner.d.ts.map +1 -1
- package/dist/_internal/platform/discovery/scanner.js +3 -2
- package/dist/_internal/platform/input/keybindings.d.ts +3 -1
- package/dist/_internal/platform/input/keybindings.d.ts.map +1 -1
- package/dist/_internal/platform/input/keybindings.js +7 -3
- package/dist/_internal/platform/intelligence/config.d.ts +1 -1
- package/dist/_internal/platform/intelligence/config.d.ts.map +1 -1
- package/dist/_internal/platform/intelligence/config.js +8 -4
- package/dist/_internal/platform/intelligence/facade.d.ts +1 -1
- package/dist/_internal/platform/intelligence/facade.js +2 -2
- package/dist/_internal/platform/plugins/manager.d.ts.map +1 -1
- package/dist/_internal/platform/plugins/manager.js +5 -3
- package/dist/_internal/platform/profiles/manager.d.ts +1 -1
- package/dist/_internal/platform/profiles/manager.js +1 -1
- package/dist/_internal/platform/providers/anthropic-compat.d.ts +1 -1
- package/dist/_internal/platform/providers/anthropic-compat.js +1 -1
- package/dist/_internal/platform/providers/custom-loader.d.ts +1 -1
- package/dist/_internal/platform/providers/registry.d.ts +2 -2
- package/dist/_internal/platform/providers/registry.js +2 -2
- package/dist/_internal/platform/runtime/bootstrap-background.d.ts +2 -0
- package/dist/_internal/platform/runtime/bootstrap-background.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/bootstrap-background.js +6 -6
- package/dist/_internal/platform/runtime/ecosystem/catalog.js +6 -6
- package/dist/_internal/platform/runtime/guidance.d.ts +1 -0
- package/dist/_internal/platform/runtime/guidance.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/guidance.js +6 -2
- package/dist/_internal/platform/runtime/remote/distributed-runtime-manager.d.ts +1 -1
- package/dist/_internal/platform/runtime/remote/distributed-runtime-manager.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/remote/distributed-runtime-manager.js +4 -3
- package/dist/_internal/platform/runtime/sandbox/provisioning.d.ts +7 -4
- package/dist/_internal/platform/runtime/sandbox/provisioning.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/sandbox/provisioning.js +9 -8
- package/dist/_internal/platform/runtime/services.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/services.js +6 -4
- package/dist/_internal/platform/runtime/session-persistence.d.ts +1 -0
- package/dist/_internal/platform/runtime/session-persistence.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/session-persistence.js +4 -4
- package/dist/_internal/platform/runtime/surface-root.d.ts +4 -0
- package/dist/_internal/platform/runtime/surface-root.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/surface-root.js +15 -0
- package/dist/_internal/platform/runtime/worktree/registry.d.ts +5 -1
- package/dist/_internal/platform/runtime/worktree/registry.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/worktree/registry.js +20 -17
- package/dist/_internal/platform/scheduler/scheduler.d.ts +1 -1
- package/dist/_internal/platform/scheduler/scheduler.js +1 -1
- package/dist/_internal/platform/sessions/manager.d.ts +5 -2
- package/dist/_internal/platform/sessions/manager.d.ts.map +1 -1
- package/dist/_internal/platform/sessions/manager.js +4 -3
- package/dist/_internal/platform/sessions/orchestration/registry.d.ts +4 -5
- package/dist/_internal/platform/sessions/orchestration/registry.d.ts.map +1 -1
- package/dist/_internal/platform/sessions/orchestration/registry.js +7 -8
- package/dist/_internal/platform/tools/fetch/schema.d.ts +1 -1
- package/dist/_internal/platform/tools/fetch/schema.js +1 -1
- package/dist/_internal/platform/tools/index.js +6 -6
- package/dist/_internal/platform/tools/packet/index.d.ts +4 -1
- package/dist/_internal/platform/tools/packet/index.d.ts.map +1 -1
- package/dist/_internal/platform/tools/packet/index.js +5 -2
- package/dist/_internal/platform/tools/query/index.d.ts +4 -1
- package/dist/_internal/platform/tools/query/index.d.ts.map +1 -1
- package/dist/_internal/platform/tools/query/index.js +5 -2
- package/dist/_internal/platform/tools/registry-tool/index.d.ts.map +1 -1
- package/dist/_internal/platform/tools/registry-tool/index.js +2 -4
- package/dist/_internal/platform/tools/registry-tool/skill-loader.d.ts.map +1 -1
- package/dist/_internal/platform/tools/registry-tool/skill-loader.js +1 -2
- package/dist/_internal/platform/tools/team/index.d.ts +3 -0
- package/dist/_internal/platform/tools/team/index.d.ts.map +1 -1
- package/dist/_internal/platform/tools/team/index.js +124 -119
- package/dist/_internal/platform/tools/worklist/index.d.ts +3 -0
- package/dist/_internal/platform/tools/worklist/index.d.ts.map +1 -1
- package/dist/_internal/platform/tools/worklist/index.js +108 -103
- package/dist/_internal/platform/watchers/store.d.ts.map +1 -1
- package/dist/_internal/platform/watchers/store.js +3 -2
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { dirname, isAbsolute, join, resolve } from 'node:path';
|
|
3
3
|
import { GitService } from '../../git/service.js';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { resolveScopedDirectory } from '../surface-root.js';
|
|
5
|
+
function getStorePath(workingDirectory, surfaceRoot) {
|
|
6
|
+
return resolveScopedDirectory(workingDirectory, surfaceRoot, 'worktrees.json');
|
|
6
7
|
}
|
|
7
8
|
function defaultStore() {
|
|
8
9
|
return { version: 1, records: {} };
|
|
@@ -10,20 +11,21 @@ function defaultStore() {
|
|
|
10
11
|
function normalizePath(path, workingDirectory) {
|
|
11
12
|
return resolve(workingDirectory, path);
|
|
12
13
|
}
|
|
13
|
-
function readStore(
|
|
14
|
+
function readStore(storePath) {
|
|
14
15
|
try {
|
|
15
|
-
return JSON.parse(readFileSync(
|
|
16
|
+
return JSON.parse(readFileSync(storePath, 'utf-8'));
|
|
16
17
|
}
|
|
17
18
|
catch {
|
|
18
19
|
return defaultStore();
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
export function listPersistedWorktreeMeta(options) {
|
|
22
|
-
return Object.values(readStore(options.workingDirectory
|
|
23
|
+
return Object.values(readStore(getStorePath(options.workingDirectory, options.surfaceRoot)).records)
|
|
24
|
+
.sort((a, b) => a.path.localeCompare(b.path));
|
|
23
25
|
}
|
|
24
26
|
export function getPersistedWorktreeMeta(path, options) {
|
|
25
27
|
const normalized = normalizePath(path, options.workingDirectory);
|
|
26
|
-
return readStore(options.workingDirectory).records[normalized] ?? null;
|
|
28
|
+
return readStore(getStorePath(options.workingDirectory, options.surfaceRoot)).records[normalized] ?? null;
|
|
27
29
|
}
|
|
28
30
|
export function reviewWorktreeAttachments(targetKind, targetId, options) {
|
|
29
31
|
const records = listPersistedWorktreeMeta(options).filter((record) => (targetKind === 'session' ? record.sessionId === targetId : record.taskId === targetId));
|
|
@@ -75,8 +77,7 @@ export function summarizeWorktreeOwnership(records) {
|
|
|
75
77
|
manualOwned: 0,
|
|
76
78
|
});
|
|
77
79
|
}
|
|
78
|
-
function writeStore(store,
|
|
79
|
-
const storePath = getStorePath(workingDirectory);
|
|
80
|
+
function writeStore(store, storePath) {
|
|
80
81
|
mkdirSync(dirname(storePath), { recursive: true });
|
|
81
82
|
writeFileSync(storePath, `${JSON.stringify(store, null, 2)}\n`, 'utf-8');
|
|
82
83
|
}
|
|
@@ -94,12 +95,14 @@ function classifyWorktreePath(path, workingDirectory) {
|
|
|
94
95
|
export class WorktreeRegistry {
|
|
95
96
|
git;
|
|
96
97
|
workingDirectory;
|
|
97
|
-
|
|
98
|
+
surfaceRoot;
|
|
99
|
+
constructor(workingDirectory, options) {
|
|
98
100
|
this.workingDirectory = workingDirectory;
|
|
101
|
+
this.surfaceRoot = options?.surfaceRoot;
|
|
99
102
|
this.git = new GitService(workingDirectory);
|
|
100
103
|
}
|
|
101
104
|
async list() {
|
|
102
|
-
const store = readStore(this.workingDirectory);
|
|
105
|
+
const store = readStore(getStorePath(this.workingDirectory, this.surfaceRoot));
|
|
103
106
|
const listed = await this.git.worktreeList();
|
|
104
107
|
const present = new Set(listed.map((entry) => normalizePath(entry.path, this.workingDirectory)));
|
|
105
108
|
const records = listed.map((entry) => {
|
|
@@ -134,11 +137,11 @@ export class WorktreeRegistry {
|
|
|
134
137
|
if (!present.has(path) && meta.state === 'kept')
|
|
135
138
|
nextRecords[path] = meta;
|
|
136
139
|
}
|
|
137
|
-
writeStore({ version: 1, records: nextRecords }, this.workingDirectory);
|
|
140
|
+
writeStore({ version: 1, records: nextRecords }, getStorePath(this.workingDirectory, this.surfaceRoot));
|
|
138
141
|
return records.sort((a, b) => a.path.localeCompare(b.path));
|
|
139
142
|
}
|
|
140
143
|
attach(path, target) {
|
|
141
|
-
const store = readStore(this.workingDirectory);
|
|
144
|
+
const store = readStore(getStorePath(this.workingDirectory, this.surfaceRoot));
|
|
142
145
|
const normalized = normalizePath(path, this.workingDirectory);
|
|
143
146
|
const existing = store.records[normalized];
|
|
144
147
|
const classified = classifyWorktreePath(normalized, this.workingDirectory);
|
|
@@ -151,10 +154,10 @@ export class WorktreeRegistry {
|
|
|
151
154
|
...(target.taskId ? { taskId: target.taskId } : {}),
|
|
152
155
|
updatedAt: Date.now(),
|
|
153
156
|
};
|
|
154
|
-
writeStore(store, this.workingDirectory);
|
|
157
|
+
writeStore(store, getStorePath(this.workingDirectory, this.surfaceRoot));
|
|
155
158
|
}
|
|
156
159
|
setState(path, state) {
|
|
157
|
-
const store = readStore(this.workingDirectory);
|
|
160
|
+
const store = readStore(getStorePath(this.workingDirectory, this.surfaceRoot));
|
|
158
161
|
const normalized = normalizePath(path, this.workingDirectory);
|
|
159
162
|
const existing = store.records[normalized];
|
|
160
163
|
const classified = classifyWorktreePath(normalized, this.workingDirectory);
|
|
@@ -167,13 +170,13 @@ export class WorktreeRegistry {
|
|
|
167
170
|
...(existing?.taskId ? { taskId: existing.taskId } : {}),
|
|
168
171
|
updatedAt: Date.now(),
|
|
169
172
|
};
|
|
170
|
-
writeStore(store, this.workingDirectory);
|
|
173
|
+
writeStore(store, getStorePath(this.workingDirectory, this.surfaceRoot));
|
|
171
174
|
}
|
|
172
175
|
async cleanup(path) {
|
|
173
176
|
const normalized = isAbsolute(path) ? path : normalizePath(path, this.workingDirectory);
|
|
174
177
|
await this.git.worktreeRemove(normalized);
|
|
175
|
-
const store = readStore(this.workingDirectory);
|
|
178
|
+
const store = readStore(getStorePath(this.workingDirectory, this.surfaceRoot));
|
|
176
179
|
delete store.records[normalized];
|
|
177
|
-
writeStore(store, this.workingDirectory);
|
|
180
|
+
writeStore(store, getStorePath(this.workingDirectory, this.surfaceRoot));
|
|
178
181
|
}
|
|
179
182
|
}
|
|
@@ -31,7 +31,7 @@ interface TaskSchedulerConfig {
|
|
|
31
31
|
/**
|
|
32
32
|
* TaskScheduler — cron-like task scheduler that runs inside the daemon.
|
|
33
33
|
*
|
|
34
|
-
* Tasks persist to disk
|
|
34
|
+
* Tasks persist to disk through the configured scheduler store path and survive restarts.
|
|
35
35
|
* Task execution requires an explicit spawnTask callback so runs stay owned by the caller.
|
|
36
36
|
*/
|
|
37
37
|
export declare class TaskScheduler {
|
|
@@ -316,7 +316,7 @@ function countMissedRuns(expr, fromMs, toMs, timezone) {
|
|
|
316
316
|
/**
|
|
317
317
|
* TaskScheduler — cron-like task scheduler that runs inside the daemon.
|
|
318
318
|
*
|
|
319
|
-
* Tasks persist to disk
|
|
319
|
+
* Tasks persist to disk through the configured scheduler store path and survive restarts.
|
|
320
320
|
* Task execution requires an explicit spawnTask callback so runs stay owned by the caller.
|
|
321
321
|
*/
|
|
322
322
|
export class TaskScheduler {
|
|
@@ -28,7 +28,7 @@ export interface SessionInfo {
|
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* SessionManager - Handles saving and loading named conversation sessions
|
|
31
|
-
* as JSONL files under .
|
|
31
|
+
* as JSONL files under the configured surface session directory.
|
|
32
32
|
*
|
|
33
33
|
* Format: each line is a JSON object.
|
|
34
34
|
* Line 0: { type: 'meta', ...SessionMeta }
|
|
@@ -36,7 +36,10 @@ export interface SessionInfo {
|
|
|
36
36
|
*/
|
|
37
37
|
export declare class SessionManager {
|
|
38
38
|
private sessionsDir;
|
|
39
|
-
constructor(baseDir: string
|
|
39
|
+
constructor(baseDir: string, options?: {
|
|
40
|
+
readonly surfaceRoot?: string;
|
|
41
|
+
readonly sessionsDir?: string;
|
|
42
|
+
});
|
|
40
43
|
/**
|
|
41
44
|
* Save conversation messages to a JSONL session file.
|
|
42
45
|
* Overwrites if file already exists.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/sessions/manager.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACxF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/sessions/manager.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACxF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAIvE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,aAAa,CAAC,EAAE,2BAA2B,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAA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EAAE,CAAA;KAAE,CAAC;IAiD9F;;;;OAIG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CASnC"}
|
|
@@ -2,9 +2,10 @@ import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync, unlink
|
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
import { logger } from '@pellux/goodvibes-sdk/platform/utils/logger';
|
|
4
4
|
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils/error-display';
|
|
5
|
+
import { resolveScopedDirectory } from '../runtime/surface-root.js';
|
|
5
6
|
/**
|
|
6
7
|
* SessionManager - Handles saving and loading named conversation sessions
|
|
7
|
-
* as JSONL files under .
|
|
8
|
+
* as JSONL files under the configured surface session directory.
|
|
8
9
|
*
|
|
9
10
|
* Format: each line is a JSON object.
|
|
10
11
|
* Line 0: { type: 'meta', ...SessionMeta }
|
|
@@ -12,8 +13,8 @@ import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils/error-displ
|
|
|
12
13
|
*/
|
|
13
14
|
export class SessionManager {
|
|
14
15
|
sessionsDir;
|
|
15
|
-
constructor(baseDir) {
|
|
16
|
-
this.sessionsDir =
|
|
16
|
+
constructor(baseDir, options) {
|
|
17
|
+
this.sessionsDir = options?.sessionsDir ?? resolveScopedDirectory(baseDir, options?.surfaceRoot, 'sessions');
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* Save conversation messages to a JSONL session file.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Multi-session Orchestration — Cross-Session Task Registry
|
|
3
3
|
*
|
|
4
|
-
* Wraps SessionTaskGraph with persistence to
|
|
5
|
-
*
|
|
4
|
+
* Wraps SessionTaskGraph with persistence to a host-owned task graph path
|
|
5
|
+
* and reconnect/resume hydration.
|
|
6
6
|
*
|
|
7
7
|
* The registry is the single authoritative source for the cross-session task
|
|
8
8
|
* graph within a process. Command handlers and sync integrations receive an
|
|
@@ -27,10 +27,9 @@ export declare class CrossSessionTaskRegistry {
|
|
|
27
27
|
private _flushTimer;
|
|
28
28
|
_exitHandler: (() => void) | null;
|
|
29
29
|
/**
|
|
30
|
-
* @param
|
|
31
|
-
* The graph is persisted at `<baseDir>/.goodvibes/goodvibes/sessions/task-graph.json`.
|
|
30
|
+
* @param graphPath - Absolute host-owned task graph path.
|
|
32
31
|
*/
|
|
33
|
-
constructor(
|
|
32
|
+
constructor(graphPath: string);
|
|
34
33
|
/**
|
|
35
34
|
* Link a task into the global graph — registers the task as a
|
|
36
35
|
* cross-session ref and optionally adds a dependency edge.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/sessions/orchestration/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAQ/E;;;;;;;;GAQG;AACH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmB;IAC1C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,WAAW,CAA8C;IACjE,YAAY,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAQ;IAEzC
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/sessions/orchestration/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EA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AAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAC9C,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,MAAM,GACd;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;IA8BtD;;;;;OAKG;IACI,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAMrD;;OAEG;IACI,WAAW,IAAI,iBAAiB,EAAE;IAMzC;;;;;OAKG;IACI,MAAM,CAAC,OAAO,EAAE,mBAAmB,GAAG,kBAAkB;IAQ/D;;;OAGG;IACI,QAAQ,IAAI,wBAAwB;IAI3C;;;OAGG;IACI,KAAK,IAAI,IAAI;IAQpB;;;;;OAKG;IACI,OAAO,IAAI,IAAI;IAUtB;;;OAGG;IACH,OAAO,CAAC,KAAK;IA4Bb;;;OAGG;IACH,OAAO,CAAC,MAAM;IAId,+EAA+E;IAC/E,OAAO,CAAC,eAAe;IAmBvB,0EAA0E;IAC1E,OAAO,CAAC,UAAU;CAgBnB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Multi-session Orchestration — Cross-Session Task Registry
|
|
3
3
|
*
|
|
4
|
-
* Wraps SessionTaskGraph with persistence to
|
|
5
|
-
*
|
|
4
|
+
* Wraps SessionTaskGraph with persistence to a host-owned task graph path
|
|
5
|
+
* and reconnect/resume hydration.
|
|
6
6
|
*
|
|
7
7
|
* The registry is the single authoritative source for the cross-session task
|
|
8
8
|
* graph within a process. Command handlers and sync integrations receive an
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
|
|
12
12
|
import { writeFile } from 'node:fs/promises';
|
|
13
|
-
import {
|
|
13
|
+
import { dirname } from 'path';
|
|
14
14
|
import { logger } from '../../utils/logger.js';
|
|
15
15
|
import { SessionTaskGraph } from './graph.js';
|
|
16
16
|
import { makeRefKey } from './types.js';
|
|
@@ -35,12 +35,11 @@ export class CrossSessionTaskRegistry {
|
|
|
35
35
|
_flushTimer = null;
|
|
36
36
|
_exitHandler = null;
|
|
37
37
|
/**
|
|
38
|
-
* @param
|
|
39
|
-
* The graph is persisted at `<baseDir>/.goodvibes/goodvibes/sessions/task-graph.json`.
|
|
38
|
+
* @param graphPath - Absolute host-owned task graph path.
|
|
40
39
|
*/
|
|
41
|
-
constructor(
|
|
42
|
-
this.
|
|
43
|
-
this.
|
|
40
|
+
constructor(graphPath) {
|
|
41
|
+
this._graphPath = graphPath;
|
|
42
|
+
this._dir = dirname(graphPath);
|
|
44
43
|
this._graph = new SessionTaskGraph();
|
|
45
44
|
this._load();
|
|
46
45
|
this._exitHandler = () => {
|
|
@@ -84,7 +84,7 @@ export declare const FETCH_TOOL_SCHEMA: {
|
|
|
84
84
|
};
|
|
85
85
|
readonly service: {
|
|
86
86
|
readonly type: "string";
|
|
87
|
-
readonly description: "Named service for automatic credential lookup from the service registry. Services are configured in
|
|
87
|
+
readonly description: "Named service for automatic credential lookup from the service registry. Services are configured in the host services.json file. Use the registry tool or inspect that registry to discover available service names.";
|
|
88
88
|
};
|
|
89
89
|
readonly auth: {
|
|
90
90
|
readonly type: "object";
|
|
@@ -90,7 +90,7 @@ export const FETCH_TOOL_SCHEMA = {
|
|
|
90
90
|
},
|
|
91
91
|
service: {
|
|
92
92
|
type: 'string',
|
|
93
|
-
description: 'Named service for automatic credential lookup from the service registry. Services are configured in
|
|
93
|
+
description: 'Named service for automatic credential lookup from the service registry. Services are configured in the host services.json file. Use the registry tool or inspect that registry to discover available service names.',
|
|
94
94
|
},
|
|
95
95
|
auth: {
|
|
96
96
|
type: 'object',
|
|
@@ -19,8 +19,8 @@ import { createWorkflowServices, createWorkflowTool } from '@pellux/goodvibes-sd
|
|
|
19
19
|
import { createRegistryTool } from '@pellux/goodvibes-sdk/platform/tools/registry-tool/index';
|
|
20
20
|
import { KVState } from '@pellux/goodvibes-sdk/platform/state/kv-state';
|
|
21
21
|
import { createTaskTool } from '@pellux/goodvibes-sdk/platform/tools/task/index';
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
22
|
+
import { createTeamTool } from '@pellux/goodvibes-sdk/platform/tools/team/index';
|
|
23
|
+
import { createWorklistTool } from '@pellux/goodvibes-sdk/platform/tools/worklist/index';
|
|
24
24
|
import { createMcpTool } from './mcp/index.js';
|
|
25
25
|
import { createPacketTool } from '@pellux/goodvibes-sdk/platform/tools/packet/index';
|
|
26
26
|
import { createQueryTool } from '@pellux/goodvibes-sdk/platform/tools/query/index';
|
|
@@ -129,13 +129,13 @@ export function registerAllTools(registry, deps) {
|
|
|
129
129
|
homeDirectory: deps.configManager.getHomeDirectory() ?? undefined,
|
|
130
130
|
}));
|
|
131
131
|
registry.register(createTaskTool(sessionOrchestration));
|
|
132
|
-
registry.register(
|
|
133
|
-
registry.register(
|
|
132
|
+
registry.register(createTeamTool({ surfaceRoot: deps.surfaceRoot }));
|
|
133
|
+
registry.register(createWorklistTool({ surfaceRoot: deps.surfaceRoot }));
|
|
134
134
|
if (mcpRegistry) {
|
|
135
135
|
registry.register(createMcpTool(mcpRegistry));
|
|
136
136
|
}
|
|
137
|
-
registry.register(createPacketTool(workingDirectory));
|
|
138
|
-
registry.register(createQueryTool(workingDirectory));
|
|
137
|
+
registry.register(createPacketTool({ workingDirectory, surfaceRoot: deps.surfaceRoot }));
|
|
138
|
+
registry.register(createQueryTool({ workingDirectory, surfaceRoot: deps.surfaceRoot }));
|
|
139
139
|
if (remoteRunnerRegistry) {
|
|
140
140
|
registry.register(createRemoteTool(remoteRunnerRegistry));
|
|
141
141
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import type { Tool } from '../../types/tools.js';
|
|
2
|
-
export declare function createPacketTool(
|
|
2
|
+
export declare function createPacketTool(options: string | {
|
|
3
|
+
readonly workingDirectory: string;
|
|
4
|
+
readonly surfaceRoot?: string;
|
|
5
|
+
}): Tool;
|
|
3
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/tools/packet/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/tools/packet/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAkCjD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,GAAG;IAAE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GACrF,IAAI,CAyGN"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { join, resolve } from 'node:path';
|
|
3
|
+
import { resolveScopedDirectory } from '../../runtime/surface-root.js';
|
|
3
4
|
import { PACKET_TOOL_SCHEMA } from './schema.js';
|
|
4
5
|
function summarizePacket(record) {
|
|
5
6
|
return {
|
|
@@ -16,9 +17,11 @@ function summarizePacket(record) {
|
|
|
16
17
|
publishedAt: record.publishedAt,
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
|
-
export function createPacketTool(
|
|
20
|
+
export function createPacketTool(options) {
|
|
21
|
+
const workingDirectory = typeof options === 'string' ? options : options.workingDirectory;
|
|
22
|
+
const surfaceRoot = typeof options === 'string' ? undefined : options.surfaceRoot;
|
|
20
23
|
const workspaceRoot = resolve(workingDirectory);
|
|
21
|
-
const packetsDir =
|
|
24
|
+
const packetsDir = resolveScopedDirectory(workspaceRoot, surfaceRoot);
|
|
22
25
|
const packetsPath = join(packetsDir, 'packets.json');
|
|
23
26
|
function loadPackets() {
|
|
24
27
|
try {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import type { Tool } from '../../types/tools.js';
|
|
2
|
-
export declare function createQueryTool(
|
|
2
|
+
export declare function createQueryTool(options: string | {
|
|
3
|
+
readonly workingDirectory: string;
|
|
4
|
+
readonly surfaceRoot?: string;
|
|
5
|
+
}): Tool;
|
|
3
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/tools/query/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/tools/query/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AA8BjD,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,GAAG;IAAE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GACrF,IAAI,CAmGN"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { join, resolve } from 'node:path';
|
|
3
|
+
import { resolveScopedDirectory } from '../../runtime/surface-root.js';
|
|
3
4
|
import { QUERY_TOOL_SCHEMA } from './schema.js';
|
|
4
5
|
function summarizeQuery(record) {
|
|
5
6
|
return {
|
|
@@ -14,9 +15,11 @@ function summarizeQuery(record) {
|
|
|
14
15
|
updatedAt: record.updatedAt,
|
|
15
16
|
};
|
|
16
17
|
}
|
|
17
|
-
export function createQueryTool(
|
|
18
|
+
export function createQueryTool(options) {
|
|
19
|
+
const workingDirectory = typeof options === 'string' ? options : options.workingDirectory;
|
|
20
|
+
const surfaceRoot = typeof options === 'string' ? undefined : options.surfaceRoot;
|
|
18
21
|
const workspaceRoot = resolve(workingDirectory);
|
|
19
|
-
const queriesDir =
|
|
22
|
+
const queriesDir = resolveScopedDirectory(workspaceRoot, surfaceRoot);
|
|
20
23
|
const queriesPath = join(queriesDir, 'queries.json');
|
|
21
24
|
function loadQueries() {
|
|
22
25
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/tools/registry-tool/index.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,IAAI,EAAkB,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAmCnD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/tools/registry-tool/index.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,IAAI,EAAkB,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAmCnD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AA6HD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAwC7F"}
|
|
@@ -114,20 +114,18 @@ function fuzzyFilter(items, query) {
|
|
|
114
114
|
function getSkillDirs(roots) {
|
|
115
115
|
const dirs = [
|
|
116
116
|
join(roots.workingDirectory, '.goodvibes', 'skills'),
|
|
117
|
-
join(roots.workingDirectory, '.goodvibes', 'goodvibes', 'skills'),
|
|
118
117
|
];
|
|
119
118
|
if (roots.homeDirectory) {
|
|
120
|
-
dirs.push(join(roots.homeDirectory, '.goodvibes', 'skills')
|
|
119
|
+
dirs.push(join(roots.homeDirectory, '.goodvibes', 'skills'));
|
|
121
120
|
}
|
|
122
121
|
return dirs;
|
|
123
122
|
}
|
|
124
123
|
function getAgentDirs(roots) {
|
|
125
124
|
const dirs = [
|
|
126
125
|
join(roots.workingDirectory, '.goodvibes', 'agents'),
|
|
127
|
-
join(roots.workingDirectory, '.goodvibes', 'goodvibes', 'agents'),
|
|
128
126
|
];
|
|
129
127
|
if (roots.homeDirectory) {
|
|
130
|
-
dirs.push(join(roots.homeDirectory, '.goodvibes', 'agents')
|
|
128
|
+
dirs.push(join(roots.homeDirectory, '.goodvibes', 'agents'));
|
|
131
129
|
}
|
|
132
130
|
return dirs;
|
|
133
131
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-loader.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/tools/registry-tool/skill-loader.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;
|
|
1
|
+
{"version":3,"file":"skill-loader.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/tools/registry-tool/skill-loader.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAcD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAuDxF"}
|
|
@@ -10,10 +10,9 @@ import { materializeMarkdownBody, parseMarkdownFrontmatter, normalizeFrontmatter
|
|
|
10
10
|
function getSkillDirs(roots) {
|
|
11
11
|
const dirs = [
|
|
12
12
|
join(roots.workingDirectory, '.goodvibes', 'skills'),
|
|
13
|
-
join(roots.workingDirectory, '.goodvibes', 'goodvibes', 'skills'),
|
|
14
13
|
];
|
|
15
14
|
if (roots.homeDirectory) {
|
|
16
|
-
dirs.push(join(roots.homeDirectory, '.goodvibes', 'skills')
|
|
15
|
+
dirs.push(join(roots.homeDirectory, '.goodvibes', 'skills'));
|
|
17
16
|
}
|
|
18
17
|
return dirs;
|
|
19
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/tools/team/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/tools/team/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AA6DjD,wBAAgB,cAAc,CAAC,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CA+HhF;AAED,eAAO,MAAM,QAAQ,MAAmB,CAAC"}
|