@virtengine/openfleet 0.25.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/.env.example +914 -0
- package/LICENSE +190 -0
- package/README.md +500 -0
- package/agent-endpoint.mjs +918 -0
- package/agent-hook-bridge.mjs +230 -0
- package/agent-hooks.mjs +1188 -0
- package/agent-pool.mjs +2403 -0
- package/agent-prompts.mjs +689 -0
- package/agent-sdk.mjs +141 -0
- package/anomaly-detector.mjs +1195 -0
- package/autofix.mjs +1294 -0
- package/claude-shell.mjs +708 -0
- package/cli.mjs +906 -0
- package/codex-config.mjs +1274 -0
- package/codex-model-profiles.mjs +135 -0
- package/codex-shell.mjs +762 -0
- package/config-doctor.mjs +613 -0
- package/config.mjs +1720 -0
- package/conflict-resolver.mjs +248 -0
- package/container-runner.mjs +450 -0
- package/copilot-shell.mjs +827 -0
- package/daemon-restart-policy.mjs +56 -0
- package/diff-stats.mjs +282 -0
- package/error-detector.mjs +829 -0
- package/fetch-runtime.mjs +34 -0
- package/fleet-coordinator.mjs +838 -0
- package/get-telegram-chat-id.mjs +71 -0
- package/git-safety.mjs +170 -0
- package/github-reconciler.mjs +403 -0
- package/hook-profiles.mjs +651 -0
- package/kanban-adapter.mjs +4491 -0
- package/lib/logger.mjs +645 -0
- package/maintenance.mjs +828 -0
- package/merge-strategy.mjs +1171 -0
- package/monitor.mjs +12207 -0
- package/openfleet.config.example.json +115 -0
- package/openfleet.schema.json +465 -0
- package/package.json +203 -0
- package/postinstall.mjs +187 -0
- package/pr-cleanup-daemon.mjs +978 -0
- package/preflight.mjs +408 -0
- package/prepublish-check.mjs +90 -0
- package/presence.mjs +328 -0
- package/primary-agent.mjs +282 -0
- package/publish.mjs +151 -0
- package/repo-root.mjs +29 -0
- package/restart-controller.mjs +100 -0
- package/review-agent.mjs +557 -0
- package/rotate-agent-logs.sh +133 -0
- package/sdk-conflict-resolver.mjs +973 -0
- package/session-tracker.mjs +880 -0
- package/setup.mjs +3937 -0
- package/shared-knowledge.mjs +410 -0
- package/shared-state-manager.mjs +841 -0
- package/shared-workspace-cli.mjs +199 -0
- package/shared-workspace-registry.mjs +537 -0
- package/shared-workspaces.json +18 -0
- package/startup-service.mjs +1070 -0
- package/sync-engine.mjs +1063 -0
- package/task-archiver.mjs +801 -0
- package/task-assessment.mjs +550 -0
- package/task-claims.mjs +924 -0
- package/task-complexity.mjs +581 -0
- package/task-executor.mjs +5111 -0
- package/task-store.mjs +753 -0
- package/telegram-bot.mjs +9281 -0
- package/telegram-sentinel.mjs +2010 -0
- package/ui/app.js +867 -0
- package/ui/app.legacy.js +1464 -0
- package/ui/app.monolith.js +2488 -0
- package/ui/components/charts.js +226 -0
- package/ui/components/chat-view.js +567 -0
- package/ui/components/command-palette.js +587 -0
- package/ui/components/diff-viewer.js +190 -0
- package/ui/components/forms.js +327 -0
- package/ui/components/kanban-board.js +451 -0
- package/ui/components/session-list.js +305 -0
- package/ui/components/shared.js +473 -0
- package/ui/index.html +70 -0
- package/ui/modules/api.js +297 -0
- package/ui/modules/icons.js +461 -0
- package/ui/modules/router.js +81 -0
- package/ui/modules/settings-schema.js +261 -0
- package/ui/modules/state.js +679 -0
- package/ui/modules/telegram.js +331 -0
- package/ui/modules/utils.js +270 -0
- package/ui/styles/animations.css +140 -0
- package/ui/styles/base.css +98 -0
- package/ui/styles/components.css +1915 -0
- package/ui/styles/kanban.css +286 -0
- package/ui/styles/layout.css +809 -0
- package/ui/styles/sessions.css +827 -0
- package/ui/styles/variables.css +188 -0
- package/ui/styles.css +141 -0
- package/ui/styles.monolith.css +1046 -0
- package/ui/tabs/agents.js +1417 -0
- package/ui/tabs/chat.js +74 -0
- package/ui/tabs/control.js +887 -0
- package/ui/tabs/dashboard.js +515 -0
- package/ui/tabs/infra.js +537 -0
- package/ui/tabs/logs.js +783 -0
- package/ui/tabs/settings.js +1487 -0
- package/ui/tabs/tasks.js +1385 -0
- package/ui-server.mjs +4073 -0
- package/update-check.mjs +465 -0
- package/utils.mjs +172 -0
- package/ve-kanban.mjs +654 -0
- package/ve-kanban.ps1 +1365 -0
- package/ve-kanban.sh +18 -0
- package/ve-orchestrator.mjs +340 -0
- package/ve-orchestrator.ps1 +6546 -0
- package/ve-orchestrator.sh +18 -0
- package/vibe-kanban-wrapper.mjs +41 -0
- package/vk-error-resolver.mjs +470 -0
- package/vk-log-stream.mjs +914 -0
- package/whatsapp-channel.mjs +520 -0
- package/workspace-monitor.mjs +581 -0
- package/workspace-reaper.mjs +405 -0
- package/workspace-registry.mjs +238 -0
- package/worktree-manager.mjs +1266 -0
package/agent-sdk.mjs
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agent-sdk.mjs — Unified Agent SDK selection (config.toml)
|
|
3
|
+
*
|
|
4
|
+
* Reads ~/.codex/config.toml to determine the primary agent SDK and
|
|
5
|
+
* capability flags for openfleet integrations.
|
|
6
|
+
*
|
|
7
|
+
* Supported primary agents: "codex", "copilot", "claude"
|
|
8
|
+
* Capability flags: steering, subagents, vscode_tools
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { readCodexConfig } from "./codex-config.mjs";
|
|
12
|
+
|
|
13
|
+
const SUPPORTED_PRIMARY = new Set(["codex", "copilot", "claude"]);
|
|
14
|
+
const DEFAULT_PRIMARY = "codex";
|
|
15
|
+
|
|
16
|
+
const DEFAULT_CAPABILITIES_BY_PRIMARY = {
|
|
17
|
+
codex: {
|
|
18
|
+
steering: true,
|
|
19
|
+
subagents: true,
|
|
20
|
+
vscodeTools: false,
|
|
21
|
+
},
|
|
22
|
+
copilot: {
|
|
23
|
+
steering: false,
|
|
24
|
+
subagents: false,
|
|
25
|
+
vscodeTools: true,
|
|
26
|
+
},
|
|
27
|
+
claude: {
|
|
28
|
+
steering: false,
|
|
29
|
+
subagents: false,
|
|
30
|
+
vscodeTools: false,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const DEFAULT_CAPABILITIES = {
|
|
35
|
+
steering: false,
|
|
36
|
+
subagents: false,
|
|
37
|
+
vscodeTools: false,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
let cachedConfig = null;
|
|
41
|
+
|
|
42
|
+
function normalizePrimary(value) {
|
|
43
|
+
const primary = String(value || "").trim().toLowerCase();
|
|
44
|
+
if (SUPPORTED_PRIMARY.has(primary)) return primary;
|
|
45
|
+
return DEFAULT_PRIMARY;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function parseTomlSection(toml, header) {
|
|
49
|
+
if (!toml || !header) return null;
|
|
50
|
+
const idx = toml.indexOf(header);
|
|
51
|
+
if (idx === -1) return null;
|
|
52
|
+
const afterHeader = idx + header.length;
|
|
53
|
+
const nextSection = toml.indexOf("\n[", afterHeader);
|
|
54
|
+
const end = nextSection === -1 ? toml.length : nextSection;
|
|
55
|
+
return toml.substring(afterHeader, end);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function parseTomlValue(section, key) {
|
|
59
|
+
if (!section) return null;
|
|
60
|
+
const regex = new RegExp(`^\\s*${key}\\s*=\\s*(.+)$`, "m");
|
|
61
|
+
const match = section.match(regex);
|
|
62
|
+
if (!match) return null;
|
|
63
|
+
return match[1].trim();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function parseTomlString(raw) {
|
|
67
|
+
if (!raw) return null;
|
|
68
|
+
const trimmed = raw.split(/\s+#/)[0].trim();
|
|
69
|
+
const quote =
|
|
70
|
+
(trimmed.startsWith('"') && trimmed.endsWith('"')) ||
|
|
71
|
+
(trimmed.startsWith("'") && trimmed.endsWith("'"));
|
|
72
|
+
if (quote) return trimmed.slice(1, -1);
|
|
73
|
+
return trimmed;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function parseTomlBool(raw) {
|
|
77
|
+
if (!raw) return null;
|
|
78
|
+
const trimmed = raw.split(/\s+#/)[0].trim().toLowerCase();
|
|
79
|
+
if (trimmed.startsWith("true")) return true;
|
|
80
|
+
if (trimmed.startsWith("false")) return false;
|
|
81
|
+
if (trimmed.startsWith("1")) return true;
|
|
82
|
+
if (trimmed.startsWith("0")) return false;
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function parseCapabilities(section) {
|
|
87
|
+
const steering = parseTomlBool(parseTomlValue(section, "steering"));
|
|
88
|
+
const subagents = parseTomlBool(parseTomlValue(section, "subagents"));
|
|
89
|
+
const vscodeTools =
|
|
90
|
+
parseTomlBool(parseTomlValue(section, "vscode_tools")) ??
|
|
91
|
+
parseTomlBool(parseTomlValue(section, "vscodeTools"));
|
|
92
|
+
return {
|
|
93
|
+
steering,
|
|
94
|
+
subagents,
|
|
95
|
+
vscodeTools,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function parseAgentSdkConfig(toml) {
|
|
100
|
+
const agentSection = parseTomlSection(toml, "[agent_sdk]");
|
|
101
|
+
const capsSection = parseTomlSection(toml, "[agent_sdk.capabilities]");
|
|
102
|
+
|
|
103
|
+
const primaryRaw = parseTomlString(parseTomlValue(agentSection, "primary"));
|
|
104
|
+
const primary = normalizePrimary(primaryRaw || DEFAULT_PRIMARY);
|
|
105
|
+
const defaults =
|
|
106
|
+
DEFAULT_CAPABILITIES_BY_PRIMARY[primary] || DEFAULT_CAPABILITIES;
|
|
107
|
+
|
|
108
|
+
const parsedCaps = parseCapabilities(capsSection);
|
|
109
|
+
|
|
110
|
+
const capabilities = {
|
|
111
|
+
steering:
|
|
112
|
+
parsedCaps.steering !== null ? parsedCaps.steering : defaults.steering,
|
|
113
|
+
subagents:
|
|
114
|
+
parsedCaps.subagents !== null ? parsedCaps.subagents : defaults.subagents,
|
|
115
|
+
vscodeTools:
|
|
116
|
+
parsedCaps.vscodeTools !== null
|
|
117
|
+
? parsedCaps.vscodeTools
|
|
118
|
+
: defaults.vscodeTools,
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
return {
|
|
122
|
+
primary,
|
|
123
|
+
capabilities,
|
|
124
|
+
source: agentSection ? "config.toml" : "defaults",
|
|
125
|
+
raw: {
|
|
126
|
+
primary: primaryRaw,
|
|
127
|
+
capabilities: parsedCaps,
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function resolveAgentSdkConfig({ reload = false } = {}) {
|
|
133
|
+
if (cachedConfig && !reload) return cachedConfig;
|
|
134
|
+
const toml = readCodexConfig();
|
|
135
|
+
cachedConfig = parseAgentSdkConfig(toml || "");
|
|
136
|
+
return cachedConfig;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function resetAgentSdkCache() {
|
|
140
|
+
cachedConfig = null;
|
|
141
|
+
}
|