bosun 0.41.2 → 0.41.4
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 +1 -1
- package/agent/agent-pool.mjs +9 -2
- package/agent/agent-prompt-catalog.mjs +971 -0
- package/agent/agent-prompts.mjs +2 -970
- package/agent/agent-supervisor.mjs +119 -6
- package/agent/autofix-git.mjs +33 -0
- package/agent/autofix-prompts.mjs +151 -0
- package/agent/autofix.mjs +11 -175
- package/agent/bosun-skills.mjs +3 -2
- package/bosun.config.example.json +17 -0
- package/bosun.schema.json +87 -188
- package/cli.mjs +34 -1
- package/config/config-doctor.mjs +5 -250
- package/config/config-file-names.mjs +5 -0
- package/config/config.mjs +89 -493
- package/config/executor-config.mjs +493 -0
- package/config/repo-root.mjs +1 -2
- package/config/workspace-health.mjs +242 -0
- package/git/git-safety.mjs +15 -0
- package/github/github-oauth-portal.mjs +46 -0
- package/infra/library-manager-utils.mjs +22 -0
- package/infra/library-manager-well-known-sources.mjs +578 -0
- package/infra/library-manager.mjs +512 -1030
- package/infra/monitor.mjs +35 -9
- package/infra/session-tracker.mjs +10 -7
- package/kanban/kanban-adapter.mjs +17 -1
- package/lib/codebase-audit-manifests.mjs +117 -0
- package/lib/codebase-audit.mjs +18 -115
- package/package.json +18 -3
- package/server/setup-web-server.mjs +58 -5
- package/server/ui-server.mjs +1394 -79
- package/shell/codex-config-file.mjs +178 -0
- package/shell/codex-config.mjs +538 -575
- package/task/task-cli.mjs +54 -3
- package/task/task-executor.mjs +143 -13
- package/task/task-store.mjs +409 -1
- package/telegram/telegram-bot.mjs +127 -0
- package/tools/apply-pr-suggestions.mjs +401 -0
- package/tools/syntax-check.mjs +28 -9
- package/ui/app.js +3 -14
- package/ui/components/kanban-board.js +227 -4
- package/ui/components/session-list.js +85 -5
- package/ui/demo-defaults.js +338 -84
- package/ui/demo.html +155 -0
- package/ui/modules/session-api.js +96 -0
- package/ui/modules/settings-schema.js +1 -2
- package/ui/modules/state.js +43 -3
- package/ui/setup.html +4 -5
- package/ui/styles/components.css +58 -4
- package/ui/tabs/agents.js +12 -15
- package/ui/tabs/control.js +1 -0
- package/ui/tabs/library.js +484 -22
- package/ui/tabs/manual-flows.js +105 -29
- package/ui/tabs/tasks.js +848 -141
- package/ui/tabs/telemetry.js +129 -11
- package/ui/tabs/workflow-canvas-utils.mjs +130 -0
- package/ui/tabs/workflows.js +293 -23
- package/voice/voice-tool-definitions.mjs +757 -0
- package/voice/voice-tools.mjs +34 -778
- package/workflow/manual-flow-audit.mjs +165 -0
- package/workflow/manual-flows.mjs +164 -259
- package/workflow/workflow-engine.mjs +147 -58
- package/workflow/workflow-nodes/definitions.mjs +1207 -0
- package/workflow/workflow-nodes/transforms.mjs +612 -0
- package/workflow/workflow-nodes.mjs +358 -63
- package/workflow/workflow-templates.mjs +313 -191
- package/workflow-templates/_helpers.mjs +154 -0
- package/workflow-templates/agents.mjs +61 -4
- package/workflow-templates/code-quality.mjs +7 -7
- package/workflow-templates/github.mjs +20 -10
- package/workflow-templates/task-batch.mjs +44 -11
- package/workflow-templates/task-lifecycle.mjs +31 -6
- package/workspace/worktree-manager.mjs +277 -3
|
@@ -39,6 +39,61 @@ function trimTrailingSlashes(value) {
|
|
|
39
39
|
return out;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
function isAzureOpenAIHost(value) {
|
|
43
|
+
try {
|
|
44
|
+
const parsed = value instanceof URL ? value : new URL(String(value || "").trim());
|
|
45
|
+
const host = String(parsed.hostname || "").toLowerCase();
|
|
46
|
+
return host === "openai.azure.com" || host.endsWith(".openai.azure.com");
|
|
47
|
+
} catch {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function buildModelsProbeRequest({ apiKey = "", baseUrl = "" } = {}) {
|
|
53
|
+
const trimmedBase = String(baseUrl || "").trim();
|
|
54
|
+
const fallbackBase = "https://api.openai.com";
|
|
55
|
+
const headers = { "Content-Type": "application/json" };
|
|
56
|
+
|
|
57
|
+
try {
|
|
58
|
+
const parsed = new URL(trimmedBase || fallbackBase);
|
|
59
|
+
const pathname = trimTrailingSlashes(parsed.pathname || "");
|
|
60
|
+
const lowerPath = pathname.toLowerCase();
|
|
61
|
+
const isAzure = isAzureOpenAIHost(parsed);
|
|
62
|
+
|
|
63
|
+
if (apiKey) {
|
|
64
|
+
if (isAzure) headers["api-key"] = apiKey;
|
|
65
|
+
else headers.Authorization = `Bearer ${apiKey}`;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (lowerPath.endsWith("/models")) {
|
|
69
|
+
return { endpoint: parsed.toString(), headers };
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (isAzure || lowerPath === "/openai" || lowerPath.startsWith("/openai/")) {
|
|
73
|
+
parsed.pathname = "/openai/models";
|
|
74
|
+
if (!parsed.searchParams.has("api-version")) {
|
|
75
|
+
parsed.searchParams.set("api-version", "2024-10-21");
|
|
76
|
+
}
|
|
77
|
+
return { endpoint: parsed.toString(), headers };
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const v1Match = lowerPath.match(/^(.*\/v1)(?:\/.*)?$/);
|
|
81
|
+
if (v1Match) {
|
|
82
|
+
parsed.pathname = `${v1Match[1]}/models`;
|
|
83
|
+
parsed.search = "";
|
|
84
|
+
return { endpoint: parsed.toString(), headers };
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
parsed.pathname = `${pathname || ""}/v1/models`;
|
|
88
|
+
parsed.search = "";
|
|
89
|
+
return { endpoint: parsed.toString(), headers };
|
|
90
|
+
} catch {
|
|
91
|
+
const resolvedBase = trimTrailingSlashes(trimmedBase || fallbackBase);
|
|
92
|
+
if (apiKey) headers.Authorization = `Bearer ${apiKey}`;
|
|
93
|
+
return { endpoint: `${resolvedBase}/v1/models`, headers };
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
42
97
|
|
|
43
98
|
// ── Vendor file serving (hoisting-safe) ───────────────────────────────────────────
|
|
44
99
|
// Resolution order:
|
|
@@ -1750,13 +1805,9 @@ async function handleModelsProbe(body) {
|
|
|
1750
1805
|
}
|
|
1751
1806
|
|
|
1752
1807
|
// For OpenAI / compatible endpoints, try GET /v1/models
|
|
1753
|
-
const
|
|
1754
|
-
const endpoint = `${resolvedBase}/v1/models`;
|
|
1808
|
+
const { endpoint, headers } = buildModelsProbeRequest({ apiKey, baseUrl });
|
|
1755
1809
|
|
|
1756
1810
|
try {
|
|
1757
|
-
const headers = { "Content-Type": "application/json" };
|
|
1758
|
-
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
|
|
1759
|
-
|
|
1760
1811
|
const controller = new AbortController();
|
|
1761
1812
|
const timeout = setTimeout(() => controller.abort(), 8000);
|
|
1762
1813
|
|
|
@@ -3008,7 +3059,9 @@ export async function startSetupServer(options = {}) {
|
|
|
3008
3059
|
export {
|
|
3009
3060
|
applyTelegramMiniAppSetupEnv,
|
|
3010
3061
|
applyNonBlockingSetupEnvDefaults,
|
|
3062
|
+
buildModelsProbeRequest,
|
|
3011
3063
|
handleTelegramChatIdLookup,
|
|
3064
|
+
isAzureOpenAIHost,
|
|
3012
3065
|
normalizeWorkflowTemplateOverrides,
|
|
3013
3066
|
normalizeTelegramUiPort,
|
|
3014
3067
|
normalizeRepoConfigEntry,
|