@pixelbyte-software/pixcode 1.47.5 → 1.48.0
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/README.md +16 -30
- package/README.tr.md +1 -1
- package/dist/api-automation.html +1 -1
- package/dist/assets/index-DlAWSDTA.js +818 -0
- package/dist/assets/index-g9NMlzYt.css +32 -0
- package/dist/assets/{vendor-codemirror-CzSp4P1a.js → vendor-codemirror-CIYNS698.js} +8 -8
- package/dist/docs.html +10 -10
- package/dist/features.html +3 -3
- package/dist/index.html +3 -3
- package/dist/landing.html +21 -23
- package/dist/llms-full.txt +4 -8
- package/dist/llms.txt +5 -6
- package/dist/openapi.yaml +7 -7
- package/dist-server/server/index.js +4 -6
- package/dist-server/server/index.js.map +1 -1
- package/dist-server/server/modules/orchestration/a2a/adapters/claude-code.adapter.js +1 -1
- package/dist-server/server/modules/orchestration/a2a/adapters/claude-code.adapter.js.map +1 -1
- package/dist-server/server/modules/orchestration/a2a/adapters/codex.adapter.js +1 -1
- package/dist-server/server/modules/orchestration/a2a/adapters/codex.adapter.js.map +1 -1
- package/dist-server/server/modules/orchestration/a2a/adapters/cursor.adapter.js +1 -1
- package/dist-server/server/modules/orchestration/a2a/adapters/cursor.adapter.js.map +1 -1
- package/dist-server/server/modules/orchestration/a2a/adapters/gemini.adapter.js +1 -1
- package/dist-server/server/modules/orchestration/a2a/adapters/gemini.adapter.js.map +1 -1
- package/dist-server/server/modules/orchestration/a2a/adapters/opencode.adapter.js +1 -1
- package/dist-server/server/modules/orchestration/a2a/adapters/opencode.adapter.js.map +1 -1
- package/dist-server/server/modules/orchestration/a2a/adapters/qwen.adapter.js +1 -1
- package/dist-server/server/modules/orchestration/a2a/adapters/qwen.adapter.js.map +1 -1
- package/dist-server/server/modules/orchestration/a2a/agent-card.js +4 -4
- package/dist-server/server/modules/orchestration/a2a/agent-card.js.map +1 -1
- package/dist-server/server/modules/orchestration/a2a/routes.js +6 -2
- package/dist-server/server/modules/orchestration/a2a/routes.js.map +1 -1
- package/dist-server/server/modules/orchestration/hermes/hermes.routes.js +62 -0
- package/dist-server/server/modules/orchestration/hermes/hermes.routes.js.map +1 -0
- package/dist-server/server/modules/orchestration/index.js +2 -1
- package/dist-server/server/modules/orchestration/index.js.map +1 -1
- package/dist-server/server/modules/orchestration/tasks/orchestration-task-store.js +2 -5
- package/dist-server/server/modules/orchestration/tasks/orchestration-task-store.js.map +1 -1
- package/dist-server/server/modules/orchestration/tasks/orchestration-task.routes.js +1 -20
- package/dist-server/server/modules/orchestration/tasks/orchestration-task.routes.js.map +1 -1
- package/dist-server/server/modules/orchestration/tasks/orchestration-task.service.js +4 -37
- package/dist-server/server/modules/orchestration/tasks/orchestration-task.service.js.map +1 -1
- package/dist-server/server/modules/orchestration/tasks/task-run-graph.js +4 -62
- package/dist-server/server/modules/orchestration/tasks/task-run-graph.js.map +1 -1
- package/dist-server/server/modules/orchestration/workflows/workflow-runner.js +14 -14
- package/dist-server/server/modules/orchestration/workflows/workflow-runner.js.map +1 -1
- package/dist-server/server/modules/orchestration/workflows/workflow-trace.js +2 -2
- package/dist-server/server/modules/orchestration/workflows/workflow-trace.js.map +1 -1
- package/dist-server/server/projects.js +0 -160
- package/dist-server/server/projects.js.map +1 -1
- package/dist-server/server/routes/mcp-utils.js +0 -18
- package/dist-server/server/routes/mcp-utils.js.map +1 -1
- package/dist-server/server/services/public-api-manifest.js +0 -5
- package/dist-server/server/services/public-api-manifest.js.map +1 -1
- package/dist-server/server/services/telegram/control-center.js +2 -144
- package/dist-server/server/services/telegram/control-center.js.map +1 -1
- package/dist-server/server/services/telegram/translations.js +2 -14
- package/dist-server/server/services/telegram/translations.js.map +1 -1
- package/package.json +1 -2
- package/scripts/smoke/default-landing-routing.mjs +7 -16
- package/scripts/smoke/{a2a-roundtrip.mjs → hermes-roundtrip.mjs} +23 -23
- package/scripts/smoke/mac-desktop-runtime.mjs +1 -7
- package/scripts/smoke/orchestration-live-run.mjs +1 -1
- package/scripts/smoke/orchestration-model-sync.mjs +2 -2
- package/scripts/smoke/orchestration-user-facing-output.mjs +2 -2
- package/scripts/smoke/pixcode-workbench-1-48.mjs +55 -0
- package/scripts/smoke/taskmaster-config.mjs +21 -56
- package/scripts/smoke/taskmaster-execution-telegram.mjs +1 -50
- package/scripts/smoke/taskmaster-onboarding.mjs +1 -50
- package/scripts/smoke/taskmaster-run-graph.mjs +1 -53
- package/scripts/smoke/vscode-workbench-layout.mjs +25 -62
- package/scripts/smoke/vscode-workbench-polish.mjs +19 -5
- package/server/index.js +5 -7
- package/server/modules/orchestration/a2a/adapters/claude-code.adapter.ts +1 -1
- package/server/modules/orchestration/a2a/adapters/codex.adapter.ts +1 -1
- package/server/modules/orchestration/a2a/adapters/cursor.adapter.ts +1 -1
- package/server/modules/orchestration/a2a/adapters/gemini.adapter.ts +1 -1
- package/server/modules/orchestration/a2a/adapters/opencode.adapter.ts +1 -1
- package/server/modules/orchestration/a2a/adapters/qwen.adapter.ts +1 -1
- package/server/modules/orchestration/a2a/agent-card.ts +4 -4
- package/server/modules/orchestration/a2a/routes.ts +7 -2
- package/server/modules/orchestration/hermes/hermes.routes.ts +69 -0
- package/server/modules/orchestration/index.ts +2 -1
- package/server/modules/orchestration/tasks/orchestration-task-store.ts +2 -6
- package/server/modules/orchestration/tasks/orchestration-task.routes.ts +1 -20
- package/server/modules/orchestration/tasks/orchestration-task.service.ts +4 -41
- package/server/modules/orchestration/tasks/orchestration-task.types.ts +2 -4
- package/server/modules/orchestration/tasks/task-run-graph.ts +6 -70
- package/server/modules/orchestration/workflows/workflow-runner.ts +14 -14
- package/server/modules/orchestration/workflows/workflow-trace.ts +2 -2
- package/server/modules/orchestration/workflows/workflow.types.ts +1 -1
- package/server/projects.js +0 -170
- package/server/routes/mcp-utils.js +0 -19
- package/server/services/public-api-manifest.js +0 -5
- package/server/services/telegram/control-center.js +2 -153
- package/server/services/telegram/translations.js +2 -14
- package/dist/assets/index-BBdWwJi6.css +0 -32
- package/dist/assets/index-DfqcgNYJ.js +0 -889
- package/dist-server/server/routes/taskmaster.js +0 -1793
- package/dist-server/server/routes/taskmaster.js.map +0 -1
- package/dist-server/server/services/taskmaster-config.js +0 -128
- package/dist-server/server/services/taskmaster-config.js.map +0 -1
- package/dist-server/server/utils/mcp-detector.js +0 -134
- package/dist-server/server/utils/mcp-detector.js.map +0 -1
- package/dist-server/server/utils/taskmaster-websocket.js +0 -118
- package/dist-server/server/utils/taskmaster-websocket.js.map +0 -1
- package/server/routes/taskmaster.js +0 -1918
- package/server/services/taskmaster-config.js +0 -146
- package/server/utils/mcp-detector.js +0 -147
- package/server/utils/taskmaster-websocket.js +0 -129
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { promises as fs } from 'node:fs';
|
|
2
|
-
import os from 'node:os';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
|
|
5
|
-
const CONFIG_FILE = path.join(os.homedir(), '.pixcode', 'taskmaster-config.json');
|
|
6
|
-
|
|
7
|
-
export const TASKMASTER_CONFIG_FIELDS = Object.freeze({
|
|
8
|
-
anthropicApiKey: { env: 'ANTHROPIC_API_KEY', secret: true },
|
|
9
|
-
anthropicBaseUrl: { env: 'ANTHROPIC_BASE_URL', secret: false },
|
|
10
|
-
perplexityApiKey: { env: 'PERPLEXITY_API_KEY', secret: true },
|
|
11
|
-
openaiApiKey: { env: 'OPENAI_API_KEY', secret: true },
|
|
12
|
-
openaiBaseUrl: { env: 'OPENAI_BASE_URL', secret: false },
|
|
13
|
-
openaiCompatibleApiKey: {
|
|
14
|
-
env: 'OPENAI_API_KEY',
|
|
15
|
-
secret: true,
|
|
16
|
-
aliases: ['OPENAI_COMPATIBLE_API_KEY', 'CUSTOM_OPENAI_API_KEY'],
|
|
17
|
-
},
|
|
18
|
-
openaiCompatibleBaseUrl: {
|
|
19
|
-
env: 'OPENAI_BASE_URL',
|
|
20
|
-
secret: false,
|
|
21
|
-
aliases: ['OPENAI_COMPATIBLE_BASE_URL', 'CUSTOM_OPENAI_BASE_URL'],
|
|
22
|
-
},
|
|
23
|
-
openaiCompatibleModel: {
|
|
24
|
-
env: 'OPENAI_MODEL',
|
|
25
|
-
secret: false,
|
|
26
|
-
aliases: ['OPENAI_COMPATIBLE_MODEL', 'TASKMASTER_OPENAI_COMPATIBLE_MODEL'],
|
|
27
|
-
},
|
|
28
|
-
googleApiKey: { env: 'GOOGLE_API_KEY', secret: true, aliases: ['GEMINI_API_KEY'] },
|
|
29
|
-
openrouterApiKey: { env: 'OPENROUTER_API_KEY', secret: true },
|
|
30
|
-
azureOpenaiApiKey: { env: 'AZURE_OPENAI_API_KEY', secret: true },
|
|
31
|
-
azureOpenaiEndpoint: { env: 'AZURE_OPENAI_ENDPOINT', secret: false },
|
|
32
|
-
ollamaApiKey: { env: 'OLLAMA_API_KEY', secret: true },
|
|
33
|
-
ollamaBaseUrl: { env: 'OLLAMA_BASE_URL', secret: false },
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
async function readStore() {
|
|
37
|
-
try {
|
|
38
|
-
const raw = await fs.readFile(CONFIG_FILE, 'utf8');
|
|
39
|
-
const parsed = JSON.parse(raw);
|
|
40
|
-
return parsed && typeof parsed === 'object' ? parsed : {};
|
|
41
|
-
} catch {
|
|
42
|
-
return {};
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
async function writeStore(next) {
|
|
47
|
-
await fs.mkdir(path.dirname(CONFIG_FILE), { recursive: true });
|
|
48
|
-
await fs.writeFile(CONFIG_FILE, JSON.stringify(next, null, 2), { mode: 0o600 });
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function summarizeConfig(store) {
|
|
52
|
-
const fields = {};
|
|
53
|
-
for (const [key, definition] of Object.entries(TASKMASTER_CONFIG_FIELDS)) {
|
|
54
|
-
const value = typeof store[key] === 'string' ? store[key].trim() : '';
|
|
55
|
-
fields[key] = definition.secret
|
|
56
|
-
? { hasValue: Boolean(value), updatedAt: store.updatedAt || null }
|
|
57
|
-
: { value: value || '', hasValue: Boolean(value), updatedAt: store.updatedAt || null };
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return {
|
|
61
|
-
fields,
|
|
62
|
-
updatedAt: store.updatedAt || null,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function getManagedEnvKeys() {
|
|
67
|
-
const keys = new Set();
|
|
68
|
-
for (const definition of Object.values(TASKMASTER_CONFIG_FIELDS)) {
|
|
69
|
-
keys.add(definition.env);
|
|
70
|
-
for (const alias of definition.aliases || []) {
|
|
71
|
-
keys.add(alias);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return keys;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export function buildTaskMasterConfigEnvValues(store = {}) {
|
|
78
|
-
const values = new Map();
|
|
79
|
-
for (const [key, definition] of Object.entries(TASKMASTER_CONFIG_FIELDS)) {
|
|
80
|
-
const value = typeof store[key] === 'string' ? store[key].trim() : '';
|
|
81
|
-
if (!value) {
|
|
82
|
-
continue;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
values.set(definition.env, value);
|
|
86
|
-
for (const alias of definition.aliases || []) {
|
|
87
|
-
values.set(alias, value);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return values;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export async function getTaskMasterConfigSummary() {
|
|
95
|
-
return summarizeConfig(await readStore());
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export async function saveTaskMasterConfig(input = {}) {
|
|
99
|
-
const current = await readStore();
|
|
100
|
-
const next = { ...current };
|
|
101
|
-
|
|
102
|
-
for (const key of Object.keys(TASKMASTER_CONFIG_FIELDS)) {
|
|
103
|
-
if (!Object.prototype.hasOwnProperty.call(input, key)) {
|
|
104
|
-
continue;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const value = typeof input[key] === 'string' ? input[key].trim() : '';
|
|
108
|
-
if (!value) {
|
|
109
|
-
delete next[key];
|
|
110
|
-
} else {
|
|
111
|
-
next[key] = value;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
next.updatedAt = new Date().toISOString();
|
|
116
|
-
await writeStore(next);
|
|
117
|
-
await applyTaskMasterConfigToEnv();
|
|
118
|
-
return summarizeConfig(next);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export async function buildTaskMasterEnv(baseEnv = process.env) {
|
|
122
|
-
const store = await readStore();
|
|
123
|
-
const env = { ...baseEnv };
|
|
124
|
-
const values = buildTaskMasterConfigEnvValues(store);
|
|
125
|
-
|
|
126
|
-
for (const [envKey, value] of values.entries()) {
|
|
127
|
-
env[envKey] = value;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return env;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export async function applyTaskMasterConfigToEnv() {
|
|
134
|
-
const store = await readStore();
|
|
135
|
-
const values = buildTaskMasterConfigEnvValues(store);
|
|
136
|
-
|
|
137
|
-
for (const envKey of getManagedEnvKeys()) {
|
|
138
|
-
if (!values.has(envKey)) {
|
|
139
|
-
delete process.env[envKey];
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
for (const [envKey, value] of values.entries()) {
|
|
144
|
-
process.env[envKey] = value;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP SERVER DETECTION UTILITY
|
|
3
|
-
* ============================
|
|
4
|
-
*
|
|
5
|
-
* Centralized utility for detecting MCP server configurations.
|
|
6
|
-
* Used across TaskMaster integration and other MCP-dependent features.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { promises as fsPromises } from 'fs';
|
|
10
|
-
import path from 'path';
|
|
11
|
-
import os from 'os';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Check if task-master-ai MCP server is configured
|
|
15
|
-
* Reads directly from Claude configuration files like claude-cli.js does
|
|
16
|
-
* @returns {Promise<Object>} MCP detection result
|
|
17
|
-
*/
|
|
18
|
-
export async function detectTaskMasterMCPServer() {
|
|
19
|
-
try {
|
|
20
|
-
// Read Claude configuration files directly (same logic as mcp.js)
|
|
21
|
-
const homeDir = os.homedir();
|
|
22
|
-
const configPaths = [
|
|
23
|
-
path.join(homeDir, '.claude.json'),
|
|
24
|
-
path.join(homeDir, '.claude', 'settings.json')
|
|
25
|
-
];
|
|
26
|
-
|
|
27
|
-
let configData = null;
|
|
28
|
-
let configPath = null;
|
|
29
|
-
|
|
30
|
-
// Try to read from either config file
|
|
31
|
-
for (const filepath of configPaths) {
|
|
32
|
-
try {
|
|
33
|
-
const fileContent = await fsPromises.readFile(filepath, 'utf8');
|
|
34
|
-
configData = JSON.parse(fileContent);
|
|
35
|
-
configPath = filepath;
|
|
36
|
-
break;
|
|
37
|
-
} catch (error) {
|
|
38
|
-
// File doesn't exist or is not valid JSON, try next
|
|
39
|
-
continue;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (!configData) {
|
|
44
|
-
return {
|
|
45
|
-
hasMCPServer: false,
|
|
46
|
-
reason: 'No Claude configuration file found',
|
|
47
|
-
hasConfig: false
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Look for task-master-ai in user-scoped MCP servers
|
|
52
|
-
let taskMasterServer = null;
|
|
53
|
-
if (configData.mcpServers && typeof configData.mcpServers === 'object') {
|
|
54
|
-
const serverEntry = Object.entries(configData.mcpServers).find(([name, config]) =>
|
|
55
|
-
name === 'task-master-ai' ||
|
|
56
|
-
name.includes('task-master') ||
|
|
57
|
-
(config && config.command && config.command.includes('task-master'))
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
if (serverEntry) {
|
|
61
|
-
const [name, config] = serverEntry;
|
|
62
|
-
taskMasterServer = {
|
|
63
|
-
name,
|
|
64
|
-
scope: 'user',
|
|
65
|
-
config,
|
|
66
|
-
type: config.command ? 'stdio' : (config.url ? 'http' : 'unknown')
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Also check project-specific MCP servers if not found globally
|
|
72
|
-
if (!taskMasterServer && configData.projects) {
|
|
73
|
-
for (const [projectPath, projectConfig] of Object.entries(configData.projects)) {
|
|
74
|
-
if (projectConfig.mcpServers && typeof projectConfig.mcpServers === 'object') {
|
|
75
|
-
const serverEntry = Object.entries(projectConfig.mcpServers).find(([name, config]) =>
|
|
76
|
-
name === 'task-master-ai' ||
|
|
77
|
-
name.includes('task-master') ||
|
|
78
|
-
(config && config.command && config.command.includes('task-master'))
|
|
79
|
-
);
|
|
80
|
-
|
|
81
|
-
if (serverEntry) {
|
|
82
|
-
const [name, config] = serverEntry;
|
|
83
|
-
taskMasterServer = {
|
|
84
|
-
name,
|
|
85
|
-
scope: 'local',
|
|
86
|
-
projectPath,
|
|
87
|
-
config,
|
|
88
|
-
type: config.command ? 'stdio' : (config.url ? 'http' : 'unknown')
|
|
89
|
-
};
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if (taskMasterServer) {
|
|
97
|
-
const isValid = !!(taskMasterServer.config &&
|
|
98
|
-
(taskMasterServer.config.command || taskMasterServer.config.url));
|
|
99
|
-
const hasEnvVars = !!(taskMasterServer.config &&
|
|
100
|
-
taskMasterServer.config.env &&
|
|
101
|
-
Object.keys(taskMasterServer.config.env).length > 0);
|
|
102
|
-
|
|
103
|
-
return {
|
|
104
|
-
hasMCPServer: true,
|
|
105
|
-
isConfigured: isValid,
|
|
106
|
-
hasApiKeys: hasEnvVars,
|
|
107
|
-
scope: taskMasterServer.scope,
|
|
108
|
-
config: {
|
|
109
|
-
command: taskMasterServer.config?.command,
|
|
110
|
-
args: taskMasterServer.config?.args || [],
|
|
111
|
-
url: taskMasterServer.config?.url,
|
|
112
|
-
envVars: hasEnvVars ? Object.keys(taskMasterServer.config.env) : [],
|
|
113
|
-
type: taskMasterServer.type
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
} else {
|
|
117
|
-
// Get list of available servers for debugging
|
|
118
|
-
const availableServers = [];
|
|
119
|
-
if (configData.mcpServers) {
|
|
120
|
-
availableServers.push(...Object.keys(configData.mcpServers));
|
|
121
|
-
}
|
|
122
|
-
if (configData.projects) {
|
|
123
|
-
for (const projectConfig of Object.values(configData.projects)) {
|
|
124
|
-
if (projectConfig.mcpServers) {
|
|
125
|
-
availableServers.push(...Object.keys(projectConfig.mcpServers).map(name => `local:${name}`));
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return {
|
|
131
|
-
hasMCPServer: false,
|
|
132
|
-
reason: 'task-master-ai not found in configured MCP servers',
|
|
133
|
-
hasConfig: true,
|
|
134
|
-
configPath,
|
|
135
|
-
availableServers
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
} catch (error) {
|
|
139
|
-
console.error('Error detecting MCP server config:', error);
|
|
140
|
-
return {
|
|
141
|
-
hasMCPServer: false,
|
|
142
|
-
reason: `Error checking MCP config: ${error.message}`,
|
|
143
|
-
hasConfig: false
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TASKMASTER WEBSOCKET UTILITIES
|
|
3
|
-
* ==============================
|
|
4
|
-
*
|
|
5
|
-
* Utilities for broadcasting TaskMaster state changes via WebSocket.
|
|
6
|
-
* Integrates with the existing WebSocket system to provide real-time updates.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Broadcast TaskMaster project update to all connected clients
|
|
11
|
-
* @param {WebSocket.Server} wss - WebSocket server instance
|
|
12
|
-
* @param {string} projectName - Name of the updated project
|
|
13
|
-
* @param {Object} taskMasterData - Updated TaskMaster data
|
|
14
|
-
*/
|
|
15
|
-
export function broadcastTaskMasterProjectUpdate(wss, projectName, taskMasterData) {
|
|
16
|
-
if (!wss || !projectName) {
|
|
17
|
-
console.warn('TaskMaster WebSocket broadcast: Missing wss or projectName');
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const message = {
|
|
22
|
-
type: 'taskmaster-project-updated',
|
|
23
|
-
projectName,
|
|
24
|
-
taskMasterData,
|
|
25
|
-
timestamp: new Date().toISOString()
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
wss.clients.forEach((client) => {
|
|
30
|
-
if (client.readyState === 1) { // WebSocket.OPEN
|
|
31
|
-
try {
|
|
32
|
-
client.send(JSON.stringify(message));
|
|
33
|
-
} catch (error) {
|
|
34
|
-
console.error('Error sending TaskMaster project update:', error);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Broadcast TaskMaster tasks update for a specific project
|
|
42
|
-
* @param {WebSocket.Server} wss - WebSocket server instance
|
|
43
|
-
* @param {string} projectName - Name of the project with updated tasks
|
|
44
|
-
* @param {Object} tasksData - Updated tasks data
|
|
45
|
-
*/
|
|
46
|
-
export function broadcastTaskMasterTasksUpdate(wss, projectName, tasksData) {
|
|
47
|
-
if (!wss || !projectName) {
|
|
48
|
-
console.warn('TaskMaster WebSocket broadcast: Missing wss or projectName');
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const message = {
|
|
53
|
-
type: 'taskmaster-tasks-updated',
|
|
54
|
-
projectName,
|
|
55
|
-
tasksData,
|
|
56
|
-
timestamp: new Date().toISOString()
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
wss.clients.forEach((client) => {
|
|
61
|
-
if (client.readyState === 1) { // WebSocket.OPEN
|
|
62
|
-
try {
|
|
63
|
-
client.send(JSON.stringify(message));
|
|
64
|
-
} catch (error) {
|
|
65
|
-
console.error('Error sending TaskMaster tasks update:', error);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Broadcast MCP server status change
|
|
73
|
-
* @param {WebSocket.Server} wss - WebSocket server instance
|
|
74
|
-
* @param {Object} mcpStatus - Updated MCP server status
|
|
75
|
-
*/
|
|
76
|
-
export function broadcastMCPStatusChange(wss, mcpStatus) {
|
|
77
|
-
if (!wss) {
|
|
78
|
-
console.warn('TaskMaster WebSocket broadcast: Missing wss');
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const message = {
|
|
83
|
-
type: 'taskmaster-mcp-status-changed',
|
|
84
|
-
mcpStatus,
|
|
85
|
-
timestamp: new Date().toISOString()
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
wss.clients.forEach((client) => {
|
|
90
|
-
if (client.readyState === 1) { // WebSocket.OPEN
|
|
91
|
-
try {
|
|
92
|
-
client.send(JSON.stringify(message));
|
|
93
|
-
} catch (error) {
|
|
94
|
-
console.error('Error sending TaskMaster MCP status update:', error);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Broadcast general TaskMaster update notification
|
|
102
|
-
* @param {WebSocket.Server} wss - WebSocket server instance
|
|
103
|
-
* @param {string} updateType - Type of update (e.g., 'initialization', 'configuration')
|
|
104
|
-
* @param {Object} data - Additional data about the update
|
|
105
|
-
*/
|
|
106
|
-
export function broadcastTaskMasterUpdate(wss, updateType, data = {}) {
|
|
107
|
-
if (!wss || !updateType) {
|
|
108
|
-
console.warn('TaskMaster WebSocket broadcast: Missing wss or updateType');
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const message = {
|
|
113
|
-
type: 'taskmaster-update',
|
|
114
|
-
updateType,
|
|
115
|
-
data,
|
|
116
|
-
timestamp: new Date().toISOString()
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
wss.clients.forEach((client) => {
|
|
121
|
-
if (client.readyState === 1) { // WebSocket.OPEN
|
|
122
|
-
try {
|
|
123
|
-
client.send(JSON.stringify(message));
|
|
124
|
-
} catch (error) {
|
|
125
|
-
console.error('Error sending TaskMaster update:', error);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
}
|