@pellux/goodvibes-sdk 0.18.17 → 0.18.19
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/schema-domain-core.js +1 -1
- package/dist/_internal/platform/config/schema-domain-runtime.js +1 -1
- 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/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/input/keybindings.d.ts +2 -1
- package/dist/_internal/platform/input/keybindings.d.ts.map +1 -1
- package/dist/_internal/platform/input/keybindings.js +2 -1
- 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/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/ecosystem/catalog.js +6 -6
- package/dist/_internal/platform/runtime/sandbox/provisioning.d.ts +11 -8
- package/dist/_internal/platform/runtime/sandbox/provisioning.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/services.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/services.js +3 -2
- 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 +2 -0
- package/dist/_internal/platform/runtime/surface-root.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/surface-root.js +8 -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/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,5 +1,6 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
-
import { dirname
|
|
2
|
+
import { dirname } from 'node:path';
|
|
3
|
+
import { resolveScopedDirectory } from '../../runtime/surface-root.js';
|
|
3
4
|
import { WORKLIST_TOOL_SCHEMA } from './schema.js';
|
|
4
5
|
function summarizeWorklist(record) {
|
|
5
6
|
const openCount = record.items.filter((item) => item.status === 'open').length;
|
|
@@ -14,11 +15,11 @@ function summarizeWorklist(record) {
|
|
|
14
15
|
updatedAt: record.updatedAt,
|
|
15
16
|
};
|
|
16
17
|
}
|
|
17
|
-
function worklistsPath(storageRoot) {
|
|
18
|
-
return
|
|
18
|
+
function worklistsPath(storageRoot, surfaceRoot) {
|
|
19
|
+
return resolveScopedDirectory(storageRoot, surfaceRoot, 'worklists.json');
|
|
19
20
|
}
|
|
20
|
-
function loadWorklists(storageRoot) {
|
|
21
|
-
const path = worklistsPath(storageRoot);
|
|
21
|
+
function loadWorklists(storageRoot, surfaceRoot) {
|
|
22
|
+
const path = worklistsPath(storageRoot, surfaceRoot);
|
|
22
23
|
if (!existsSync(path))
|
|
23
24
|
return [];
|
|
24
25
|
try {
|
|
@@ -29,112 +30,116 @@ function loadWorklists(storageRoot) {
|
|
|
29
30
|
return [];
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
|
-
function saveWorklists(storageRoot, worklists) {
|
|
33
|
-
const path = worklistsPath(storageRoot);
|
|
33
|
+
function saveWorklists(storageRoot, worklists, surfaceRoot) {
|
|
34
|
+
const path = worklistsPath(storageRoot, surfaceRoot);
|
|
34
35
|
mkdirSync(dirname(path), { recursive: true });
|
|
35
36
|
writeFileSync(path, JSON.stringify({ version: 1, worklists }, null, 2) + '\n', 'utf-8');
|
|
36
37
|
}
|
|
37
|
-
export
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (!input.storageRoot || input.storageRoot.trim().length === 0) {
|
|
51
|
-
return { success: false, error: 'worklist requires storageRoot.' };
|
|
52
|
-
}
|
|
53
|
-
const worklists = loadWorklists(input.storageRoot);
|
|
54
|
-
const view = input.view ?? 'summary';
|
|
55
|
-
if (input.mode === 'create') {
|
|
56
|
-
if (!input.worklistId || !input.title) {
|
|
57
|
-
return { success: false, error: 'create requires worklistId and title.' };
|
|
38
|
+
export function createWorklistTool(options) {
|
|
39
|
+
const surfaceRoot = options?.surfaceRoot;
|
|
40
|
+
return {
|
|
41
|
+
definition: {
|
|
42
|
+
name: 'worklist',
|
|
43
|
+
description: 'Manage durable worklists and checklist items for execution planning and follow-up.',
|
|
44
|
+
parameters: WORKLIST_TOOL_SCHEMA,
|
|
45
|
+
sideEffects: ['workflow', 'state'],
|
|
46
|
+
concurrency: 'serial',
|
|
47
|
+
},
|
|
48
|
+
async execute(args) {
|
|
49
|
+
if (!args || typeof args !== 'object' || typeof args.mode !== 'string') {
|
|
50
|
+
return { success: false, error: 'Invalid args: mode is required.' };
|
|
58
51
|
}
|
|
59
|
-
|
|
60
|
-
|
|
52
|
+
const input = args;
|
|
53
|
+
if (!input.storageRoot || input.storageRoot.trim().length === 0) {
|
|
54
|
+
return { success: false, error: 'worklist requires storageRoot.' };
|
|
61
55
|
}
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
56
|
+
const worklists = loadWorklists(input.storageRoot, surfaceRoot);
|
|
57
|
+
const view = input.view ?? 'summary';
|
|
58
|
+
if (input.mode === 'create') {
|
|
59
|
+
if (!input.worklistId || !input.title) {
|
|
60
|
+
return { success: false, error: 'create requires worklistId and title.' };
|
|
61
|
+
}
|
|
62
|
+
if (worklists.some((entry) => entry.id === input.worklistId)) {
|
|
63
|
+
return { success: false, error: `Worklist already exists: ${input.worklistId}` };
|
|
64
|
+
}
|
|
65
|
+
const now = Date.now();
|
|
66
|
+
const record = {
|
|
67
|
+
id: input.worklistId,
|
|
68
|
+
title: input.title,
|
|
69
|
+
items: [],
|
|
70
|
+
createdAt: now,
|
|
71
|
+
updatedAt: now,
|
|
72
|
+
};
|
|
73
|
+
saveWorklists(input.storageRoot, [...worklists, record], surfaceRoot);
|
|
74
|
+
return { success: true, output: JSON.stringify(record) };
|
|
75
|
+
}
|
|
76
|
+
if (input.mode === 'list') {
|
|
77
|
+
return {
|
|
78
|
+
success: true,
|
|
79
|
+
output: JSON.stringify({
|
|
80
|
+
view,
|
|
81
|
+
count: worklists.length,
|
|
82
|
+
worklists: view === 'full' ? worklists : worklists.map(summarizeWorklist),
|
|
83
|
+
}),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
const index = worklists.findIndex((entry) => entry.id === input.worklistId);
|
|
87
|
+
if (index < 0) {
|
|
88
|
+
return { success: false, error: `Unknown worklist: ${input.worklistId ?? '(missing)'}` };
|
|
89
|
+
}
|
|
90
|
+
const current = worklists[index];
|
|
91
|
+
if (input.mode === 'show') {
|
|
92
|
+
return {
|
|
93
|
+
success: true,
|
|
94
|
+
output: JSON.stringify(view === 'full' ? current : {
|
|
95
|
+
...summarizeWorklist(current),
|
|
96
|
+
items: current.items.map((item) => ({
|
|
97
|
+
id: item.id,
|
|
98
|
+
text: item.text,
|
|
99
|
+
status: item.status,
|
|
100
|
+
owner: item.owner,
|
|
101
|
+
priority: item.priority,
|
|
102
|
+
})),
|
|
103
|
+
}),
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
if (input.mode === 'add-item') {
|
|
107
|
+
if (!input.itemId || !input.text)
|
|
108
|
+
return { success: false, error: 'add-item requires itemId and text.' };
|
|
109
|
+
const next = {
|
|
110
|
+
...current,
|
|
111
|
+
items: [
|
|
112
|
+
...current.items.filter((item) => item.id !== input.itemId),
|
|
113
|
+
{ id: input.itemId, text: input.text, status: 'open', priority: input.priority ?? 'medium', ...(input.owner ? { owner: input.owner } : {}) },
|
|
114
|
+
],
|
|
115
|
+
updatedAt: Date.now(),
|
|
116
|
+
};
|
|
117
|
+
worklists[index] = next;
|
|
118
|
+
saveWorklists(input.storageRoot, worklists, surfaceRoot);
|
|
119
|
+
return { success: true, output: JSON.stringify(next) };
|
|
120
|
+
}
|
|
121
|
+
if (!input.itemId)
|
|
122
|
+
return { success: false, error: `${input.mode} requires itemId.` };
|
|
123
|
+
const nextItems = current.items
|
|
124
|
+
.filter((item) => input.mode !== 'remove-item' || item.id !== input.itemId)
|
|
125
|
+
.map((item) => {
|
|
126
|
+
if (item.id !== input.itemId)
|
|
127
|
+
return item;
|
|
128
|
+
if (input.mode === 'complete-item')
|
|
129
|
+
return { ...item, status: 'done' };
|
|
130
|
+
if (input.mode === 'reopen-item')
|
|
131
|
+
return { ...item, status: 'open' };
|
|
132
|
+
return item;
|
|
133
|
+
});
|
|
106
134
|
const next = {
|
|
107
135
|
...current,
|
|
108
|
-
items:
|
|
109
|
-
...current.items.filter((item) => item.id !== input.itemId),
|
|
110
|
-
{ id: input.itemId, text: input.text, status: 'open', priority: input.priority ?? 'medium', ...(input.owner ? { owner: input.owner } : {}) },
|
|
111
|
-
],
|
|
136
|
+
items: nextItems,
|
|
112
137
|
updatedAt: Date.now(),
|
|
113
138
|
};
|
|
114
139
|
worklists[index] = next;
|
|
115
|
-
saveWorklists(input.storageRoot, worklists);
|
|
140
|
+
saveWorklists(input.storageRoot, worklists, surfaceRoot);
|
|
116
141
|
return { success: true, output: JSON.stringify(next) };
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
.filter((item) => input.mode !== 'remove-item' || item.id !== input.itemId)
|
|
122
|
-
.map((item) => {
|
|
123
|
-
if (item.id !== input.itemId)
|
|
124
|
-
return item;
|
|
125
|
-
if (input.mode === 'complete-item')
|
|
126
|
-
return { ...item, status: 'done' };
|
|
127
|
-
if (input.mode === 'reopen-item')
|
|
128
|
-
return { ...item, status: 'open' };
|
|
129
|
-
return item;
|
|
130
|
-
});
|
|
131
|
-
const next = {
|
|
132
|
-
...current,
|
|
133
|
-
items: nextItems,
|
|
134
|
-
updatedAt: Date.now(),
|
|
135
|
-
};
|
|
136
|
-
worklists[index] = next;
|
|
137
|
-
saveWorklists(input.storageRoot, worklists);
|
|
138
|
-
return { success: true, output: JSON.stringify(next) };
|
|
139
|
-
},
|
|
140
|
-
};
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
export const worklistTool = createWorklistTool();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/watchers/store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/watchers/store.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAE1E,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAC;CAC7C;AAMD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,wBAAgB,uBAAuB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAKlE;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAElF;AAED,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAa1F;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAE/F;AAED,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAOrG"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
-
import { dirname
|
|
2
|
+
import { dirname } from 'node:path';
|
|
3
|
+
import { resolveSharedDirectory } from '../runtime/surface-root.js';
|
|
3
4
|
function sortWatchers(watchers) {
|
|
4
5
|
return [...watchers].sort((a, b) => a.label.localeCompare(b.label) || a.id.localeCompare(b.id));
|
|
5
6
|
}
|
|
6
7
|
export function getWatcherStorePath(rootPath) {
|
|
7
|
-
return
|
|
8
|
+
return resolveSharedDirectory(rootPath, 'watchers.json');
|
|
8
9
|
}
|
|
9
10
|
export function resolveWatcherStorePath(storePath) {
|
|
10
11
|
if (!storePath) {
|
package/package.json
CHANGED