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.
Files changed (73) hide show
  1. package/.env.example +1 -1
  2. package/agent/agent-pool.mjs +9 -2
  3. package/agent/agent-prompt-catalog.mjs +971 -0
  4. package/agent/agent-prompts.mjs +2 -970
  5. package/agent/agent-supervisor.mjs +119 -6
  6. package/agent/autofix-git.mjs +33 -0
  7. package/agent/autofix-prompts.mjs +151 -0
  8. package/agent/autofix.mjs +11 -175
  9. package/agent/bosun-skills.mjs +3 -2
  10. package/bosun.config.example.json +17 -0
  11. package/bosun.schema.json +87 -188
  12. package/cli.mjs +34 -1
  13. package/config/config-doctor.mjs +5 -250
  14. package/config/config-file-names.mjs +5 -0
  15. package/config/config.mjs +89 -493
  16. package/config/executor-config.mjs +493 -0
  17. package/config/repo-root.mjs +1 -2
  18. package/config/workspace-health.mjs +242 -0
  19. package/git/git-safety.mjs +15 -0
  20. package/github/github-oauth-portal.mjs +46 -0
  21. package/infra/library-manager-utils.mjs +22 -0
  22. package/infra/library-manager-well-known-sources.mjs +578 -0
  23. package/infra/library-manager.mjs +512 -1030
  24. package/infra/monitor.mjs +35 -9
  25. package/infra/session-tracker.mjs +10 -7
  26. package/kanban/kanban-adapter.mjs +17 -1
  27. package/lib/codebase-audit-manifests.mjs +117 -0
  28. package/lib/codebase-audit.mjs +18 -115
  29. package/package.json +18 -3
  30. package/server/setup-web-server.mjs +58 -5
  31. package/server/ui-server.mjs +1394 -79
  32. package/shell/codex-config-file.mjs +178 -0
  33. package/shell/codex-config.mjs +538 -575
  34. package/task/task-cli.mjs +54 -3
  35. package/task/task-executor.mjs +143 -13
  36. package/task/task-store.mjs +409 -1
  37. package/telegram/telegram-bot.mjs +127 -0
  38. package/tools/apply-pr-suggestions.mjs +401 -0
  39. package/tools/syntax-check.mjs +28 -9
  40. package/ui/app.js +3 -14
  41. package/ui/components/kanban-board.js +227 -4
  42. package/ui/components/session-list.js +85 -5
  43. package/ui/demo-defaults.js +338 -84
  44. package/ui/demo.html +155 -0
  45. package/ui/modules/session-api.js +96 -0
  46. package/ui/modules/settings-schema.js +1 -2
  47. package/ui/modules/state.js +43 -3
  48. package/ui/setup.html +4 -5
  49. package/ui/styles/components.css +58 -4
  50. package/ui/tabs/agents.js +12 -15
  51. package/ui/tabs/control.js +1 -0
  52. package/ui/tabs/library.js +484 -22
  53. package/ui/tabs/manual-flows.js +105 -29
  54. package/ui/tabs/tasks.js +848 -141
  55. package/ui/tabs/telemetry.js +129 -11
  56. package/ui/tabs/workflow-canvas-utils.mjs +130 -0
  57. package/ui/tabs/workflows.js +293 -23
  58. package/voice/voice-tool-definitions.mjs +757 -0
  59. package/voice/voice-tools.mjs +34 -778
  60. package/workflow/manual-flow-audit.mjs +165 -0
  61. package/workflow/manual-flows.mjs +164 -259
  62. package/workflow/workflow-engine.mjs +147 -58
  63. package/workflow/workflow-nodes/definitions.mjs +1207 -0
  64. package/workflow/workflow-nodes/transforms.mjs +612 -0
  65. package/workflow/workflow-nodes.mjs +358 -63
  66. package/workflow/workflow-templates.mjs +313 -191
  67. package/workflow-templates/_helpers.mjs +154 -0
  68. package/workflow-templates/agents.mjs +61 -4
  69. package/workflow-templates/code-quality.mjs +7 -7
  70. package/workflow-templates/github.mjs +20 -10
  71. package/workflow-templates/task-batch.mjs +44 -11
  72. package/workflow-templates/task-lifecycle.mjs +31 -6
  73. 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 resolvedBase = trimTrailingSlashes(baseUrl || "https://api.openai.com");
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,