@made-by-moonlight/athene-core 0.9.1

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 (285) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +241 -0
  3. package/dist/activity-events.d.ts +42 -0
  4. package/dist/activity-events.d.ts.map +1 -0
  5. package/dist/activity-events.js +192 -0
  6. package/dist/activity-events.js.map +1 -0
  7. package/dist/activity-log.d.ts +71 -0
  8. package/dist/activity-log.d.ts.map +1 -0
  9. package/dist/activity-log.js +203 -0
  10. package/dist/activity-log.js.map +1 -0
  11. package/dist/activity-signal.d.ts +20 -0
  12. package/dist/activity-signal.d.ts.map +1 -0
  13. package/dist/activity-signal.js +91 -0
  14. package/dist/activity-signal.js.map +1 -0
  15. package/dist/agent-report.d.ts +148 -0
  16. package/dist/agent-report.d.ts.map +1 -0
  17. package/dist/agent-report.js +516 -0
  18. package/dist/agent-report.js.map +1 -0
  19. package/dist/agent-selection.d.ts +31 -0
  20. package/dist/agent-selection.d.ts.map +1 -0
  21. package/dist/agent-selection.js +69 -0
  22. package/dist/agent-selection.js.map +1 -0
  23. package/dist/agent-workspace-hooks.d.ts +74 -0
  24. package/dist/agent-workspace-hooks.d.ts.map +1 -0
  25. package/dist/agent-workspace-hooks.js +988 -0
  26. package/dist/agent-workspace-hooks.js.map +1 -0
  27. package/dist/atomic-write.d.ts +6 -0
  28. package/dist/atomic-write.d.ts.map +1 -0
  29. package/dist/atomic-write.js +49 -0
  30. package/dist/atomic-write.js.map +1 -0
  31. package/dist/cleanup-stack.d.ts +37 -0
  32. package/dist/cleanup-stack.d.ts.map +1 -0
  33. package/dist/cleanup-stack.js +45 -0
  34. package/dist/cleanup-stack.js.map +1 -0
  35. package/dist/code-review-manager.d.ts +118 -0
  36. package/dist/code-review-manager.d.ts.map +1 -0
  37. package/dist/code-review-manager.js +719 -0
  38. package/dist/code-review-manager.js.map +1 -0
  39. package/dist/code-review-store.d.ts +114 -0
  40. package/dist/code-review-store.d.ts.map +1 -0
  41. package/dist/code-review-store.js +346 -0
  42. package/dist/code-review-store.js.map +1 -0
  43. package/dist/config-generator.d.ts +84 -0
  44. package/dist/config-generator.d.ts.map +1 -0
  45. package/dist/config-generator.js +295 -0
  46. package/dist/config-generator.js.map +1 -0
  47. package/dist/config.d.ts +55 -0
  48. package/dist/config.d.ts.map +1 -0
  49. package/dist/config.js +852 -0
  50. package/dist/config.js.map +1 -0
  51. package/dist/daemon-children.d.ts +55 -0
  52. package/dist/daemon-children.d.ts.map +1 -0
  53. package/dist/daemon-children.js +435 -0
  54. package/dist/daemon-children.js.map +1 -0
  55. package/dist/dashboard-notifications.d.ts +42 -0
  56. package/dist/dashboard-notifications.d.ts.map +1 -0
  57. package/dist/dashboard-notifications.js +123 -0
  58. package/dist/dashboard-notifications.js.map +1 -0
  59. package/dist/events-db.d.ts +39 -0
  60. package/dist/events-db.d.ts.map +1 -0
  61. package/dist/events-db.js +185 -0
  62. package/dist/events-db.js.map +1 -0
  63. package/dist/feature-flags.d.ts +2 -0
  64. package/dist/feature-flags.d.ts.map +1 -0
  65. package/dist/feature-flags.js +9 -0
  66. package/dist/feature-flags.js.map +1 -0
  67. package/dist/feedback-tools.d.ts +97 -0
  68. package/dist/feedback-tools.d.ts.map +1 -0
  69. package/dist/feedback-tools.js +161 -0
  70. package/dist/feedback-tools.js.map +1 -0
  71. package/dist/file-lock.d.ts +5 -0
  72. package/dist/file-lock.d.ts.map +1 -0
  73. package/dist/file-lock.js +59 -0
  74. package/dist/file-lock.js.map +1 -0
  75. package/dist/format-automated-comments.d.ts +18 -0
  76. package/dist/format-automated-comments.d.ts.map +1 -0
  77. package/dist/gh-trace.d.ts +57 -0
  78. package/dist/gh-trace.d.ts.map +1 -0
  79. package/dist/gh-trace.js +320 -0
  80. package/dist/gh-trace.js.map +1 -0
  81. package/dist/git-activity.d.ts +10 -0
  82. package/dist/git-activity.d.ts.map +1 -0
  83. package/dist/git-activity.js +30 -0
  84. package/dist/git-activity.js.map +1 -0
  85. package/dist/global-config.d.ts +1085 -0
  86. package/dist/global-config.d.ts.map +1 -0
  87. package/dist/global-config.js +1067 -0
  88. package/dist/global-config.js.map +1 -0
  89. package/dist/index.d.ts +91 -0
  90. package/dist/index.d.ts.map +1 -0
  91. package/dist/index.js +59 -0
  92. package/dist/index.js.map +1 -0
  93. package/dist/key-value.d.ts +7 -0
  94. package/dist/key-value.d.ts.map +1 -0
  95. package/dist/key-value.js +24 -0
  96. package/dist/key-value.js.map +1 -0
  97. package/dist/lifecycle-manager.d.ts +22 -0
  98. package/dist/lifecycle-manager.d.ts.map +1 -0
  99. package/dist/lifecycle-manager.js +2813 -0
  100. package/dist/lifecycle-manager.js.map +1 -0
  101. package/dist/lifecycle-state.d.ts +28 -0
  102. package/dist/lifecycle-state.d.ts.map +1 -0
  103. package/dist/lifecycle-state.js +446 -0
  104. package/dist/lifecycle-state.js.map +1 -0
  105. package/dist/lifecycle-status-decisions.d.ts +85 -0
  106. package/dist/lifecycle-status-decisions.d.ts.map +1 -0
  107. package/dist/lifecycle-status-decisions.js +262 -0
  108. package/dist/lifecycle-status-decisions.js.map +1 -0
  109. package/dist/lifecycle-transition.d.ts +81 -0
  110. package/dist/lifecycle-transition.d.ts.map +1 -0
  111. package/dist/lifecycle-transition.js +207 -0
  112. package/dist/lifecycle-transition.js.map +1 -0
  113. package/dist/metadata.d.ts +54 -0
  114. package/dist/metadata.d.ts.map +1 -0
  115. package/dist/metadata.js +484 -0
  116. package/dist/metadata.js.map +1 -0
  117. package/dist/migration/storage-v2.d.ts +76 -0
  118. package/dist/migration/storage-v2.d.ts.map +1 -0
  119. package/dist/migration/storage-v2.js +1614 -0
  120. package/dist/migration/storage-v2.js.map +1 -0
  121. package/dist/notification-data.d.ts +135 -0
  122. package/dist/notification-data.d.ts.map +1 -0
  123. package/dist/notification-data.js +204 -0
  124. package/dist/notification-data.js.map +1 -0
  125. package/dist/notification-observability.d.ts +21 -0
  126. package/dist/notification-observability.d.ts.map +1 -0
  127. package/dist/notification-observability.js +154 -0
  128. package/dist/notification-observability.js.map +1 -0
  129. package/dist/notifier-resolution.d.ts +14 -0
  130. package/dist/notifier-resolution.d.ts.map +1 -0
  131. package/dist/notifier-resolution.js +23 -0
  132. package/dist/notifier-resolution.js.map +1 -0
  133. package/dist/observability.d.ts +100 -0
  134. package/dist/observability.d.ts.map +1 -0
  135. package/dist/observability.js +535 -0
  136. package/dist/observability.js.map +1 -0
  137. package/dist/opencode-agents-md.d.ts +3 -0
  138. package/dist/opencode-agents-md.d.ts.map +1 -0
  139. package/dist/opencode-agents-md.js +40 -0
  140. package/dist/opencode-agents-md.js.map +1 -0
  141. package/dist/opencode-config.d.ts +2 -0
  142. package/dist/opencode-config.d.ts.map +1 -0
  143. package/dist/opencode-config.js +17 -0
  144. package/dist/opencode-config.js.map +1 -0
  145. package/dist/opencode-session-id.d.ts +2 -0
  146. package/dist/opencode-session-id.d.ts.map +1 -0
  147. package/dist/opencode-session-id.js +12 -0
  148. package/dist/opencode-session-id.js.map +1 -0
  149. package/dist/opencode-shared.d.ts +80 -0
  150. package/dist/opencode-shared.d.ts.map +1 -0
  151. package/dist/opencode-shared.js +202 -0
  152. package/dist/opencode-shared.js.map +1 -0
  153. package/dist/orchestrator-prompt.d.ts +19 -0
  154. package/dist/orchestrator-prompt.d.ts.map +1 -0
  155. package/dist/orchestrator-prompt.js +130 -0
  156. package/dist/orchestrator-prompt.js.map +1 -0
  157. package/dist/orchestrator-session-strategy.d.ts +5 -0
  158. package/dist/orchestrator-session-strategy.d.ts.map +1 -0
  159. package/dist/orchestrator-session-strategy.js +13 -0
  160. package/dist/orchestrator-session-strategy.js.map +1 -0
  161. package/dist/paths.d.ts +145 -0
  162. package/dist/paths.d.ts.map +1 -0
  163. package/dist/paths.js +288 -0
  164. package/dist/paths.js.map +1 -0
  165. package/dist/platform.d.ts +32 -0
  166. package/dist/platform.d.ts.map +1 -0
  167. package/dist/platform.js +211 -0
  168. package/dist/platform.js.map +1 -0
  169. package/dist/plugin-registry.d.ts +15 -0
  170. package/dist/plugin-registry.d.ts.map +1 -0
  171. package/dist/plugin-registry.js +499 -0
  172. package/dist/plugin-registry.js.map +1 -0
  173. package/dist/portfolio-projects.d.ts +7 -0
  174. package/dist/portfolio-projects.d.ts.map +1 -0
  175. package/dist/portfolio-projects.js +65 -0
  176. package/dist/portfolio-projects.js.map +1 -0
  177. package/dist/portfolio-registry.d.ts +42 -0
  178. package/dist/portfolio-registry.d.ts.map +1 -0
  179. package/dist/portfolio-registry.js +311 -0
  180. package/dist/portfolio-registry.js.map +1 -0
  181. package/dist/portfolio-routing.d.ts +5 -0
  182. package/dist/portfolio-routing.d.ts.map +1 -0
  183. package/dist/portfolio-routing.js +24 -0
  184. package/dist/portfolio-routing.js.map +1 -0
  185. package/dist/portfolio-session-service.d.ts +15 -0
  186. package/dist/portfolio-session-service.d.ts.map +1 -0
  187. package/dist/portfolio-session-service.js +206 -0
  188. package/dist/portfolio-session-service.js.map +1 -0
  189. package/dist/process-cache.d.ts +32 -0
  190. package/dist/process-cache.d.ts.map +1 -0
  191. package/dist/process-cache.js +44 -0
  192. package/dist/process-cache.js.map +1 -0
  193. package/dist/project-resolver.d.ts +5 -0
  194. package/dist/project-resolver.d.ts.map +1 -0
  195. package/dist/project-resolver.js +20 -0
  196. package/dist/project-resolver.js.map +1 -0
  197. package/dist/prompt-builder.d.ts +42 -0
  198. package/dist/prompt-builder.d.ts.map +1 -0
  199. package/dist/prompt-builder.js +182 -0
  200. package/dist/prompt-builder.js.map +1 -0
  201. package/dist/prompts/orchestrator.md.js +4 -0
  202. package/dist/prompts/orchestrator.md.js.map +1 -0
  203. package/dist/query-activity-events.d.ts +42 -0
  204. package/dist/query-activity-events.d.ts.map +1 -0
  205. package/dist/query-activity-events.js +170 -0
  206. package/dist/query-activity-events.js.map +1 -0
  207. package/dist/recovery/actions.d.ts +7 -0
  208. package/dist/recovery/actions.d.ts.map +1 -0
  209. package/dist/recovery/index.d.ts +8 -0
  210. package/dist/recovery/index.d.ts.map +1 -0
  211. package/dist/recovery/logger.d.ts +12 -0
  212. package/dist/recovery/logger.d.ts.map +1 -0
  213. package/dist/recovery/manager.d.ts +24 -0
  214. package/dist/recovery/manager.d.ts.map +1 -0
  215. package/dist/recovery/scanner.d.ts +11 -0
  216. package/dist/recovery/scanner.d.ts.map +1 -0
  217. package/dist/recovery/types.d.ts +170 -0
  218. package/dist/recovery/types.d.ts.map +1 -0
  219. package/dist/recovery/validator.d.ts +8 -0
  220. package/dist/recovery/validator.d.ts.map +1 -0
  221. package/dist/report-watcher.d.ts +93 -0
  222. package/dist/report-watcher.d.ts.map +1 -0
  223. package/dist/report-watcher.js +182 -0
  224. package/dist/report-watcher.js.map +1 -0
  225. package/dist/scm-webhook-utils.d.ts +6 -0
  226. package/dist/scm-webhook-utils.d.ts.map +1 -0
  227. package/dist/scm-webhook-utils.js +36 -0
  228. package/dist/scm-webhook-utils.js.map +1 -0
  229. package/dist/session-manager.d.ts +22 -0
  230. package/dist/session-manager.d.ts.map +1 -0
  231. package/dist/session-manager.js +3077 -0
  232. package/dist/session-manager.js.map +1 -0
  233. package/dist/spawn-target.d.ts +23 -0
  234. package/dist/spawn-target.d.ts.map +1 -0
  235. package/dist/spawn-target.js +39 -0
  236. package/dist/spawn-target.js.map +1 -0
  237. package/dist/storage-key.d.ts +9 -0
  238. package/dist/storage-key.d.ts.map +1 -0
  239. package/dist/storage-key.js +59 -0
  240. package/dist/storage-key.js.map +1 -0
  241. package/dist/tmux.d.ts +39 -0
  242. package/dist/tmux.d.ts.map +1 -0
  243. package/dist/tmux.js +141 -0
  244. package/dist/tmux.js.map +1 -0
  245. package/dist/types.d.ts +1496 -0
  246. package/dist/types.d.ts.map +1 -0
  247. package/dist/types.js +215 -0
  248. package/dist/types.js.map +1 -0
  249. package/dist/update-cache.d.ts +59 -0
  250. package/dist/update-cache.d.ts.map +1 -0
  251. package/dist/update-cache.js +77 -0
  252. package/dist/update-cache.js.map +1 -0
  253. package/dist/utils/metadata-flatten.d.ts +3 -0
  254. package/dist/utils/metadata-flatten.d.ts.map +1 -0
  255. package/dist/utils/metadata-flatten.js +18 -0
  256. package/dist/utils/metadata-flatten.js.map +1 -0
  257. package/dist/utils/pr.d.ts +7 -0
  258. package/dist/utils/pr.d.ts.map +1 -0
  259. package/dist/utils/pr.js +97 -0
  260. package/dist/utils/pr.js.map +1 -0
  261. package/dist/utils/session-from-metadata.d.ts +16 -0
  262. package/dist/utils/session-from-metadata.d.ts.map +1 -0
  263. package/dist/utils/session-from-metadata.js +87 -0
  264. package/dist/utils/session-from-metadata.js.map +1 -0
  265. package/dist/utils/session-id.d.ts +4 -0
  266. package/dist/utils/session-id.d.ts.map +1 -0
  267. package/dist/utils/session-id.js +9 -0
  268. package/dist/utils/session-id.js.map +1 -0
  269. package/dist/utils/validation.d.ts +9 -0
  270. package/dist/utils/validation.d.ts.map +1 -0
  271. package/dist/utils/validation.js +45 -0
  272. package/dist/utils/validation.js.map +1 -0
  273. package/dist/utils.d.ts +65 -0
  274. package/dist/utils.d.ts.map +1 -0
  275. package/dist/utils.js +189 -0
  276. package/dist/utils.js.map +1 -0
  277. package/dist/version-compare.d.ts +27 -0
  278. package/dist/version-compare.d.ts.map +1 -0
  279. package/dist/version-compare.js +121 -0
  280. package/dist/version-compare.js.map +1 -0
  281. package/dist/windows-pty-registry.d.ts +27 -0
  282. package/dist/windows-pty-registry.d.ts.map +1 -0
  283. package/dist/windows-pty-registry.js +109 -0
  284. package/dist/windows-pty-registry.js.map +1 -0
  285. package/package.json +110 -0
@@ -0,0 +1,1085 @@
1
+ import { z } from "zod";
2
+ import { type ProjectResolveErrorKind } from "./types.js";
3
+ export declare function generateExternalId(projectPath: string, originUrl?: string | null): string;
4
+ export interface RegisterProjectOptions {
5
+ /** @deprecated No longer used — storageKey has been removed */
6
+ allowStorageKeyReuse?: boolean;
7
+ }
8
+ /**
9
+ * Return the canonical path to the global config file.
10
+ *
11
+ * Priority:
12
+ * 1. AO_GLOBAL_CONFIG environment variable (explicit global config override)
13
+ * 2. $XDG_CONFIG_HOME/agent-orchestrator/config.yaml
14
+ * 3. ~/.agent-orchestrator/config.yaml (default)
15
+ *
16
+ * NOTE: This intentionally does NOT read AO_CONFIG_PATH. That env var is used
17
+ * by findConfigFile() to locate any config (including project-local ones).
18
+ * Using it here would risk overwriting a project-local config with global-format
19
+ * YAML when registry helpers call this function.
20
+ */
21
+ export declare function getGlobalConfigPath(): string;
22
+ export declare function isCanonicalGlobalConfigPath(configPath: string | undefined): boolean;
23
+ export declare const GlobalProjectEntrySchema: z.ZodObject<{
24
+ projectId: z.ZodOptional<z.ZodString>;
25
+ path: z.ZodString;
26
+ repo: z.ZodOptional<z.ZodObject<{
27
+ owner: z.ZodString;
28
+ name: z.ZodString;
29
+ platform: z.ZodEnum<["github", "gitlab", "bitbucket"]>;
30
+ originUrl: z.ZodString;
31
+ }, "strip", z.ZodTypeAny, {
32
+ owner: string;
33
+ name: string;
34
+ originUrl: string;
35
+ platform: "github" | "gitlab" | "bitbucket";
36
+ }, {
37
+ owner: string;
38
+ name: string;
39
+ originUrl: string;
40
+ platform: "github" | "gitlab" | "bitbucket";
41
+ }>>;
42
+ defaultBranch: z.ZodOptional<z.ZodString>;
43
+ source: z.ZodOptional<z.ZodString>;
44
+ registeredAt: z.ZodOptional<z.ZodNumber>;
45
+ displayName: z.ZodOptional<z.ZodString>;
46
+ sessionPrefix: z.ZodOptional<z.ZodString>;
47
+ storageKey: z.ZodOptional<z.ZodString>;
48
+ }, "strip", z.ZodTypeAny, {
49
+ path: string;
50
+ source?: string | undefined;
51
+ projectId?: string | undefined;
52
+ repo?: {
53
+ owner: string;
54
+ name: string;
55
+ originUrl: string;
56
+ platform: "github" | "gitlab" | "bitbucket";
57
+ } | undefined;
58
+ displayName?: string | undefined;
59
+ defaultBranch?: string | undefined;
60
+ sessionPrefix?: string | undefined;
61
+ registeredAt?: number | undefined;
62
+ storageKey?: string | undefined;
63
+ }, {
64
+ path: string;
65
+ source?: string | undefined;
66
+ projectId?: string | undefined;
67
+ repo?: {
68
+ owner: string;
69
+ name: string;
70
+ originUrl: string;
71
+ platform: "github" | "gitlab" | "bitbucket";
72
+ } | undefined;
73
+ displayName?: string | undefined;
74
+ defaultBranch?: string | undefined;
75
+ sessionPrefix?: string | undefined;
76
+ registeredAt?: number | undefined;
77
+ storageKey?: string | undefined;
78
+ }>;
79
+ export type GlobalProjectEntry = z.infer<typeof GlobalProjectEntrySchema>;
80
+ /**
81
+ * Global config schema.
82
+ * Operational settings + project registry with identity fields only.
83
+ */
84
+ /**
85
+ * Update channel — controls which npm dist-tag the auto-updater tracks.
86
+ *
87
+ * stable — @latest (weekly Thursday releases). Auto-installs when run.
88
+ * nightly — @nightly (daily Fri–Tue cron). Auto-installs when run.
89
+ * manual — no checks, no notice, no install. User runs `athene update` manually.
90
+ */
91
+ export declare const UpdateChannelSchema: z.ZodEnum<["stable", "nightly", "manual"]>;
92
+ export type UpdateChannel = z.infer<typeof UpdateChannelSchema>;
93
+ /**
94
+ * Install-method override. When set, the auto-updater bypasses path-based
95
+ * detection and uses this value to pick the upgrade command. Useful for
96
+ * non-standard install layouts (custom prefixes, asdf, etc.).
97
+ *
98
+ * Mirrors `InstallMethod` from the CLI (kept as `string` here so the core
99
+ * package doesn't depend on the CLI).
100
+ */
101
+ export declare const InstallMethodOverrideSchema: z.ZodEnum<["git", "npm-global", "pnpm-global", "bun-global", "homebrew", "unknown"]>;
102
+ export type InstallMethodOverride = z.infer<typeof InstallMethodOverrideSchema>;
103
+ export declare const GlobalConfigSchema: z.ZodObject<{
104
+ /** Web dashboard port. Default: 3000 */
105
+ port: z.ZodDefault<z.ZodNumber>;
106
+ terminalPort: z.ZodOptional<z.ZodNumber>;
107
+ directTerminalPort: z.ZodOptional<z.ZodNumber>;
108
+ /** Time before a "ready" session becomes "idle". Default: 300 000 ms (5 min). */
109
+ readyThresholdMs: z.ZodDefault<z.ZodNumber>;
110
+ /**
111
+ * Auto-update channel preference.
112
+ *
113
+ * Default `manual` (resolved at read time) so users who upgrade across
114
+ * this change keep their existing behavior — no surprise auto-installs.
115
+ * The onboarding flow prompts new users on first `athene start` and persists
116
+ * the answer here.
117
+ *
118
+ * `.catch(undefined)` makes the schema tolerant of legacy / typo'd values
119
+ * in the on-disk config: a stray `updateChannel: foo` parses as
120
+ * "unset" rather than failing the whole config load. The user can fix it
121
+ * later via `athene config set updateChannel <stable|nightly|manual>`.
122
+ */
123
+ updateChannel: z.ZodCatch<z.ZodOptional<z.ZodEnum<["stable", "nightly", "manual"]>>>;
124
+ /** Override path-based install detection. Optional. */
125
+ installMethod: z.ZodCatch<z.ZodOptional<z.ZodEnum<["git", "npm-global", "pnpm-global", "bun-global", "homebrew", "unknown"]>>>;
126
+ /** Structured observability defaults. Env vars still override at runtime. */
127
+ observability: z.ZodOptional<z.ZodObject<{
128
+ logLevel: z.ZodDefault<z.ZodEnum<["debug", "info", "warn", "error"]>>;
129
+ stderr: z.ZodDefault<z.ZodBoolean>;
130
+ }, "strip", z.ZodTypeAny, {
131
+ stderr: boolean;
132
+ logLevel: "debug" | "info" | "warn" | "error";
133
+ }, {
134
+ stderr?: boolean | undefined;
135
+ logLevel?: "debug" | "info" | "warn" | "error" | undefined;
136
+ }>>;
137
+ /** Cross-project defaults — projects inherit when fields are omitted. */
138
+ defaults: z.ZodDefault<z.ZodObject<{
139
+ runtime: z.ZodDefault<z.ZodString>;
140
+ agent: z.ZodDefault<z.ZodString>;
141
+ workspace: z.ZodDefault<z.ZodString>;
142
+ notifiers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
143
+ orchestrator: z.ZodOptional<z.ZodObject<{
144
+ agent: z.ZodOptional<z.ZodString>;
145
+ }, "strip", z.ZodTypeAny, {
146
+ agent?: string | undefined;
147
+ }, {
148
+ agent?: string | undefined;
149
+ }>>;
150
+ worker: z.ZodOptional<z.ZodObject<{
151
+ agent: z.ZodOptional<z.ZodString>;
152
+ }, "strip", z.ZodTypeAny, {
153
+ agent?: string | undefined;
154
+ }, {
155
+ agent?: string | undefined;
156
+ }>>;
157
+ }, "strip", z.ZodTypeAny, {
158
+ runtime: string;
159
+ agent: string;
160
+ workspace: string;
161
+ notifiers: string[];
162
+ worker?: {
163
+ agent?: string | undefined;
164
+ } | undefined;
165
+ orchestrator?: {
166
+ agent?: string | undefined;
167
+ } | undefined;
168
+ }, {
169
+ runtime?: string | undefined;
170
+ agent?: string | undefined;
171
+ workspace?: string | undefined;
172
+ worker?: {
173
+ agent?: string | undefined;
174
+ } | undefined;
175
+ orchestrator?: {
176
+ agent?: string | undefined;
177
+ } | undefined;
178
+ notifiers?: string[] | undefined;
179
+ }>>;
180
+ /** Project registry — map key is the canonical project ID. */
181
+ projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
182
+ projectId: z.ZodOptional<z.ZodString>;
183
+ path: z.ZodString;
184
+ repo: z.ZodOptional<z.ZodObject<{
185
+ owner: z.ZodString;
186
+ name: z.ZodString;
187
+ platform: z.ZodEnum<["github", "gitlab", "bitbucket"]>;
188
+ originUrl: z.ZodString;
189
+ }, "strip", z.ZodTypeAny, {
190
+ owner: string;
191
+ name: string;
192
+ originUrl: string;
193
+ platform: "github" | "gitlab" | "bitbucket";
194
+ }, {
195
+ owner: string;
196
+ name: string;
197
+ originUrl: string;
198
+ platform: "github" | "gitlab" | "bitbucket";
199
+ }>>;
200
+ defaultBranch: z.ZodOptional<z.ZodString>;
201
+ source: z.ZodOptional<z.ZodString>;
202
+ registeredAt: z.ZodOptional<z.ZodNumber>;
203
+ displayName: z.ZodOptional<z.ZodString>;
204
+ sessionPrefix: z.ZodOptional<z.ZodString>;
205
+ storageKey: z.ZodOptional<z.ZodString>;
206
+ }, "strip", z.ZodTypeAny, {
207
+ path: string;
208
+ source?: string | undefined;
209
+ projectId?: string | undefined;
210
+ repo?: {
211
+ owner: string;
212
+ name: string;
213
+ originUrl: string;
214
+ platform: "github" | "gitlab" | "bitbucket";
215
+ } | undefined;
216
+ displayName?: string | undefined;
217
+ defaultBranch?: string | undefined;
218
+ sessionPrefix?: string | undefined;
219
+ registeredAt?: number | undefined;
220
+ storageKey?: string | undefined;
221
+ }, {
222
+ path: string;
223
+ source?: string | undefined;
224
+ projectId?: string | undefined;
225
+ repo?: {
226
+ owner: string;
227
+ name: string;
228
+ originUrl: string;
229
+ platform: "github" | "gitlab" | "bitbucket";
230
+ } | undefined;
231
+ displayName?: string | undefined;
232
+ defaultBranch?: string | undefined;
233
+ sessionPrefix?: string | undefined;
234
+ registeredAt?: number | undefined;
235
+ storageKey?: string | undefined;
236
+ }>>>;
237
+ /** Optional explicit project ordering for sidebar / portfolio display. */
238
+ projectOrder: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
239
+ /** Notification channel configurations. */
240
+ notifiers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
241
+ plugin: z.ZodString;
242
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
243
+ plugin: z.ZodString;
244
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
245
+ plugin: z.ZodString;
246
+ }, z.ZodTypeAny, "passthrough">>>>;
247
+ /** Maps priority levels to notifier channel IDs. */
248
+ notificationRouting: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
249
+ /** Reaction rules (default reactions merged at load time). */
250
+ reactions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
251
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
252
+ /** Web dashboard port. Default: 3000 */
253
+ port: z.ZodDefault<z.ZodNumber>;
254
+ terminalPort: z.ZodOptional<z.ZodNumber>;
255
+ directTerminalPort: z.ZodOptional<z.ZodNumber>;
256
+ /** Time before a "ready" session becomes "idle". Default: 300 000 ms (5 min). */
257
+ readyThresholdMs: z.ZodDefault<z.ZodNumber>;
258
+ /**
259
+ * Auto-update channel preference.
260
+ *
261
+ * Default `manual` (resolved at read time) so users who upgrade across
262
+ * this change keep their existing behavior — no surprise auto-installs.
263
+ * The onboarding flow prompts new users on first `athene start` and persists
264
+ * the answer here.
265
+ *
266
+ * `.catch(undefined)` makes the schema tolerant of legacy / typo'd values
267
+ * in the on-disk config: a stray `updateChannel: foo` parses as
268
+ * "unset" rather than failing the whole config load. The user can fix it
269
+ * later via `athene config set updateChannel <stable|nightly|manual>`.
270
+ */
271
+ updateChannel: z.ZodCatch<z.ZodOptional<z.ZodEnum<["stable", "nightly", "manual"]>>>;
272
+ /** Override path-based install detection. Optional. */
273
+ installMethod: z.ZodCatch<z.ZodOptional<z.ZodEnum<["git", "npm-global", "pnpm-global", "bun-global", "homebrew", "unknown"]>>>;
274
+ /** Structured observability defaults. Env vars still override at runtime. */
275
+ observability: z.ZodOptional<z.ZodObject<{
276
+ logLevel: z.ZodDefault<z.ZodEnum<["debug", "info", "warn", "error"]>>;
277
+ stderr: z.ZodDefault<z.ZodBoolean>;
278
+ }, "strip", z.ZodTypeAny, {
279
+ stderr: boolean;
280
+ logLevel: "debug" | "info" | "warn" | "error";
281
+ }, {
282
+ stderr?: boolean | undefined;
283
+ logLevel?: "debug" | "info" | "warn" | "error" | undefined;
284
+ }>>;
285
+ /** Cross-project defaults — projects inherit when fields are omitted. */
286
+ defaults: z.ZodDefault<z.ZodObject<{
287
+ runtime: z.ZodDefault<z.ZodString>;
288
+ agent: z.ZodDefault<z.ZodString>;
289
+ workspace: z.ZodDefault<z.ZodString>;
290
+ notifiers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
291
+ orchestrator: z.ZodOptional<z.ZodObject<{
292
+ agent: z.ZodOptional<z.ZodString>;
293
+ }, "strip", z.ZodTypeAny, {
294
+ agent?: string | undefined;
295
+ }, {
296
+ agent?: string | undefined;
297
+ }>>;
298
+ worker: z.ZodOptional<z.ZodObject<{
299
+ agent: z.ZodOptional<z.ZodString>;
300
+ }, "strip", z.ZodTypeAny, {
301
+ agent?: string | undefined;
302
+ }, {
303
+ agent?: string | undefined;
304
+ }>>;
305
+ }, "strip", z.ZodTypeAny, {
306
+ runtime: string;
307
+ agent: string;
308
+ workspace: string;
309
+ notifiers: string[];
310
+ worker?: {
311
+ agent?: string | undefined;
312
+ } | undefined;
313
+ orchestrator?: {
314
+ agent?: string | undefined;
315
+ } | undefined;
316
+ }, {
317
+ runtime?: string | undefined;
318
+ agent?: string | undefined;
319
+ workspace?: string | undefined;
320
+ worker?: {
321
+ agent?: string | undefined;
322
+ } | undefined;
323
+ orchestrator?: {
324
+ agent?: string | undefined;
325
+ } | undefined;
326
+ notifiers?: string[] | undefined;
327
+ }>>;
328
+ /** Project registry — map key is the canonical project ID. */
329
+ projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
330
+ projectId: z.ZodOptional<z.ZodString>;
331
+ path: z.ZodString;
332
+ repo: z.ZodOptional<z.ZodObject<{
333
+ owner: z.ZodString;
334
+ name: z.ZodString;
335
+ platform: z.ZodEnum<["github", "gitlab", "bitbucket"]>;
336
+ originUrl: z.ZodString;
337
+ }, "strip", z.ZodTypeAny, {
338
+ owner: string;
339
+ name: string;
340
+ originUrl: string;
341
+ platform: "github" | "gitlab" | "bitbucket";
342
+ }, {
343
+ owner: string;
344
+ name: string;
345
+ originUrl: string;
346
+ platform: "github" | "gitlab" | "bitbucket";
347
+ }>>;
348
+ defaultBranch: z.ZodOptional<z.ZodString>;
349
+ source: z.ZodOptional<z.ZodString>;
350
+ registeredAt: z.ZodOptional<z.ZodNumber>;
351
+ displayName: z.ZodOptional<z.ZodString>;
352
+ sessionPrefix: z.ZodOptional<z.ZodString>;
353
+ storageKey: z.ZodOptional<z.ZodString>;
354
+ }, "strip", z.ZodTypeAny, {
355
+ path: string;
356
+ source?: string | undefined;
357
+ projectId?: string | undefined;
358
+ repo?: {
359
+ owner: string;
360
+ name: string;
361
+ originUrl: string;
362
+ platform: "github" | "gitlab" | "bitbucket";
363
+ } | undefined;
364
+ displayName?: string | undefined;
365
+ defaultBranch?: string | undefined;
366
+ sessionPrefix?: string | undefined;
367
+ registeredAt?: number | undefined;
368
+ storageKey?: string | undefined;
369
+ }, {
370
+ path: string;
371
+ source?: string | undefined;
372
+ projectId?: string | undefined;
373
+ repo?: {
374
+ owner: string;
375
+ name: string;
376
+ originUrl: string;
377
+ platform: "github" | "gitlab" | "bitbucket";
378
+ } | undefined;
379
+ displayName?: string | undefined;
380
+ defaultBranch?: string | undefined;
381
+ sessionPrefix?: string | undefined;
382
+ registeredAt?: number | undefined;
383
+ storageKey?: string | undefined;
384
+ }>>>;
385
+ /** Optional explicit project ordering for sidebar / portfolio display. */
386
+ projectOrder: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
387
+ /** Notification channel configurations. */
388
+ notifiers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
389
+ plugin: z.ZodString;
390
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
391
+ plugin: z.ZodString;
392
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
393
+ plugin: z.ZodString;
394
+ }, z.ZodTypeAny, "passthrough">>>>;
395
+ /** Maps priority levels to notifier channel IDs. */
396
+ notificationRouting: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
397
+ /** Reaction rules (default reactions merged at load time). */
398
+ reactions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
399
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
400
+ /** Web dashboard port. Default: 3000 */
401
+ port: z.ZodDefault<z.ZodNumber>;
402
+ terminalPort: z.ZodOptional<z.ZodNumber>;
403
+ directTerminalPort: z.ZodOptional<z.ZodNumber>;
404
+ /** Time before a "ready" session becomes "idle". Default: 300 000 ms (5 min). */
405
+ readyThresholdMs: z.ZodDefault<z.ZodNumber>;
406
+ /**
407
+ * Auto-update channel preference.
408
+ *
409
+ * Default `manual` (resolved at read time) so users who upgrade across
410
+ * this change keep their existing behavior — no surprise auto-installs.
411
+ * The onboarding flow prompts new users on first `athene start` and persists
412
+ * the answer here.
413
+ *
414
+ * `.catch(undefined)` makes the schema tolerant of legacy / typo'd values
415
+ * in the on-disk config: a stray `updateChannel: foo` parses as
416
+ * "unset" rather than failing the whole config load. The user can fix it
417
+ * later via `athene config set updateChannel <stable|nightly|manual>`.
418
+ */
419
+ updateChannel: z.ZodCatch<z.ZodOptional<z.ZodEnum<["stable", "nightly", "manual"]>>>;
420
+ /** Override path-based install detection. Optional. */
421
+ installMethod: z.ZodCatch<z.ZodOptional<z.ZodEnum<["git", "npm-global", "pnpm-global", "bun-global", "homebrew", "unknown"]>>>;
422
+ /** Structured observability defaults. Env vars still override at runtime. */
423
+ observability: z.ZodOptional<z.ZodObject<{
424
+ logLevel: z.ZodDefault<z.ZodEnum<["debug", "info", "warn", "error"]>>;
425
+ stderr: z.ZodDefault<z.ZodBoolean>;
426
+ }, "strip", z.ZodTypeAny, {
427
+ stderr: boolean;
428
+ logLevel: "debug" | "info" | "warn" | "error";
429
+ }, {
430
+ stderr?: boolean | undefined;
431
+ logLevel?: "debug" | "info" | "warn" | "error" | undefined;
432
+ }>>;
433
+ /** Cross-project defaults — projects inherit when fields are omitted. */
434
+ defaults: z.ZodDefault<z.ZodObject<{
435
+ runtime: z.ZodDefault<z.ZodString>;
436
+ agent: z.ZodDefault<z.ZodString>;
437
+ workspace: z.ZodDefault<z.ZodString>;
438
+ notifiers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
439
+ orchestrator: z.ZodOptional<z.ZodObject<{
440
+ agent: z.ZodOptional<z.ZodString>;
441
+ }, "strip", z.ZodTypeAny, {
442
+ agent?: string | undefined;
443
+ }, {
444
+ agent?: string | undefined;
445
+ }>>;
446
+ worker: z.ZodOptional<z.ZodObject<{
447
+ agent: z.ZodOptional<z.ZodString>;
448
+ }, "strip", z.ZodTypeAny, {
449
+ agent?: string | undefined;
450
+ }, {
451
+ agent?: string | undefined;
452
+ }>>;
453
+ }, "strip", z.ZodTypeAny, {
454
+ runtime: string;
455
+ agent: string;
456
+ workspace: string;
457
+ notifiers: string[];
458
+ worker?: {
459
+ agent?: string | undefined;
460
+ } | undefined;
461
+ orchestrator?: {
462
+ agent?: string | undefined;
463
+ } | undefined;
464
+ }, {
465
+ runtime?: string | undefined;
466
+ agent?: string | undefined;
467
+ workspace?: string | undefined;
468
+ worker?: {
469
+ agent?: string | undefined;
470
+ } | undefined;
471
+ orchestrator?: {
472
+ agent?: string | undefined;
473
+ } | undefined;
474
+ notifiers?: string[] | undefined;
475
+ }>>;
476
+ /** Project registry — map key is the canonical project ID. */
477
+ projects: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
478
+ projectId: z.ZodOptional<z.ZodString>;
479
+ path: z.ZodString;
480
+ repo: z.ZodOptional<z.ZodObject<{
481
+ owner: z.ZodString;
482
+ name: z.ZodString;
483
+ platform: z.ZodEnum<["github", "gitlab", "bitbucket"]>;
484
+ originUrl: z.ZodString;
485
+ }, "strip", z.ZodTypeAny, {
486
+ owner: string;
487
+ name: string;
488
+ originUrl: string;
489
+ platform: "github" | "gitlab" | "bitbucket";
490
+ }, {
491
+ owner: string;
492
+ name: string;
493
+ originUrl: string;
494
+ platform: "github" | "gitlab" | "bitbucket";
495
+ }>>;
496
+ defaultBranch: z.ZodOptional<z.ZodString>;
497
+ source: z.ZodOptional<z.ZodString>;
498
+ registeredAt: z.ZodOptional<z.ZodNumber>;
499
+ displayName: z.ZodOptional<z.ZodString>;
500
+ sessionPrefix: z.ZodOptional<z.ZodString>;
501
+ storageKey: z.ZodOptional<z.ZodString>;
502
+ }, "strip", z.ZodTypeAny, {
503
+ path: string;
504
+ source?: string | undefined;
505
+ projectId?: string | undefined;
506
+ repo?: {
507
+ owner: string;
508
+ name: string;
509
+ originUrl: string;
510
+ platform: "github" | "gitlab" | "bitbucket";
511
+ } | undefined;
512
+ displayName?: string | undefined;
513
+ defaultBranch?: string | undefined;
514
+ sessionPrefix?: string | undefined;
515
+ registeredAt?: number | undefined;
516
+ storageKey?: string | undefined;
517
+ }, {
518
+ path: string;
519
+ source?: string | undefined;
520
+ projectId?: string | undefined;
521
+ repo?: {
522
+ owner: string;
523
+ name: string;
524
+ originUrl: string;
525
+ platform: "github" | "gitlab" | "bitbucket";
526
+ } | undefined;
527
+ displayName?: string | undefined;
528
+ defaultBranch?: string | undefined;
529
+ sessionPrefix?: string | undefined;
530
+ registeredAt?: number | undefined;
531
+ storageKey?: string | undefined;
532
+ }>>>;
533
+ /** Optional explicit project ordering for sidebar / portfolio display. */
534
+ projectOrder: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
535
+ /** Notification channel configurations. */
536
+ notifiers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
537
+ plugin: z.ZodString;
538
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
539
+ plugin: z.ZodString;
540
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
541
+ plugin: z.ZodString;
542
+ }, z.ZodTypeAny, "passthrough">>>>;
543
+ /** Maps priority levels to notifier channel IDs. */
544
+ notificationRouting: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
545
+ /** Reaction rules (default reactions merged at load time). */
546
+ reactions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
547
+ }, z.ZodTypeAny, "passthrough">>;
548
+ export type GlobalConfig = z.infer<typeof GlobalConfigSchema>;
549
+ /**
550
+ * Flat, behavior-only local project config.
551
+ * Lives at <project>/agent-orchestrator.yaml.
552
+ *
553
+ * Does NOT contain identity fields: projectId, path, repo,
554
+ * defaultBranch, source, registeredAt, displayName, sessionPrefix.
555
+ * Those are owned by the global registry.
556
+ */
557
+ export declare const LocalProjectConfigSchema: z.ZodObject<{
558
+ repo: z.ZodOptional<z.ZodString>;
559
+ defaultBranch: z.ZodOptional<z.ZodString>;
560
+ runtime: z.ZodOptional<z.ZodString>;
561
+ agent: z.ZodOptional<z.ZodString>;
562
+ workspace: z.ZodOptional<z.ZodString>;
563
+ tracker: z.ZodOptional<z.ZodObject<{
564
+ plugin: z.ZodString;
565
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
566
+ plugin: z.ZodString;
567
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
568
+ plugin: z.ZodString;
569
+ }, z.ZodTypeAny, "passthrough">>>;
570
+ scm: z.ZodOptional<z.ZodObject<{
571
+ plugin: z.ZodString;
572
+ webhook: z.ZodOptional<z.ZodObject<{
573
+ enabled: z.ZodOptional<z.ZodBoolean>;
574
+ path: z.ZodOptional<z.ZodString>;
575
+ secretEnvVar: z.ZodOptional<z.ZodString>;
576
+ signatureHeader: z.ZodOptional<z.ZodString>;
577
+ eventHeader: z.ZodOptional<z.ZodString>;
578
+ deliveryHeader: z.ZodOptional<z.ZodString>;
579
+ maxBodyBytes: z.ZodOptional<z.ZodNumber>;
580
+ }, "strip", z.ZodTypeAny, {
581
+ path?: string | undefined;
582
+ enabled?: boolean | undefined;
583
+ secretEnvVar?: string | undefined;
584
+ signatureHeader?: string | undefined;
585
+ eventHeader?: string | undefined;
586
+ deliveryHeader?: string | undefined;
587
+ maxBodyBytes?: number | undefined;
588
+ }, {
589
+ path?: string | undefined;
590
+ enabled?: boolean | undefined;
591
+ secretEnvVar?: string | undefined;
592
+ signatureHeader?: string | undefined;
593
+ eventHeader?: string | undefined;
594
+ deliveryHeader?: string | undefined;
595
+ maxBodyBytes?: number | undefined;
596
+ }>>;
597
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
598
+ plugin: z.ZodString;
599
+ webhook: z.ZodOptional<z.ZodObject<{
600
+ enabled: z.ZodOptional<z.ZodBoolean>;
601
+ path: z.ZodOptional<z.ZodString>;
602
+ secretEnvVar: z.ZodOptional<z.ZodString>;
603
+ signatureHeader: z.ZodOptional<z.ZodString>;
604
+ eventHeader: z.ZodOptional<z.ZodString>;
605
+ deliveryHeader: z.ZodOptional<z.ZodString>;
606
+ maxBodyBytes: z.ZodOptional<z.ZodNumber>;
607
+ }, "strip", z.ZodTypeAny, {
608
+ path?: string | undefined;
609
+ enabled?: boolean | undefined;
610
+ secretEnvVar?: string | undefined;
611
+ signatureHeader?: string | undefined;
612
+ eventHeader?: string | undefined;
613
+ deliveryHeader?: string | undefined;
614
+ maxBodyBytes?: number | undefined;
615
+ }, {
616
+ path?: string | undefined;
617
+ enabled?: boolean | undefined;
618
+ secretEnvVar?: string | undefined;
619
+ signatureHeader?: string | undefined;
620
+ eventHeader?: string | undefined;
621
+ deliveryHeader?: string | undefined;
622
+ maxBodyBytes?: number | undefined;
623
+ }>>;
624
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
625
+ plugin: z.ZodString;
626
+ webhook: z.ZodOptional<z.ZodObject<{
627
+ enabled: z.ZodOptional<z.ZodBoolean>;
628
+ path: z.ZodOptional<z.ZodString>;
629
+ secretEnvVar: z.ZodOptional<z.ZodString>;
630
+ signatureHeader: z.ZodOptional<z.ZodString>;
631
+ eventHeader: z.ZodOptional<z.ZodString>;
632
+ deliveryHeader: z.ZodOptional<z.ZodString>;
633
+ maxBodyBytes: z.ZodOptional<z.ZodNumber>;
634
+ }, "strip", z.ZodTypeAny, {
635
+ path?: string | undefined;
636
+ enabled?: boolean | undefined;
637
+ secretEnvVar?: string | undefined;
638
+ signatureHeader?: string | undefined;
639
+ eventHeader?: string | undefined;
640
+ deliveryHeader?: string | undefined;
641
+ maxBodyBytes?: number | undefined;
642
+ }, {
643
+ path?: string | undefined;
644
+ enabled?: boolean | undefined;
645
+ secretEnvVar?: string | undefined;
646
+ signatureHeader?: string | undefined;
647
+ eventHeader?: string | undefined;
648
+ deliveryHeader?: string | undefined;
649
+ maxBodyBytes?: number | undefined;
650
+ }>>;
651
+ }, z.ZodTypeAny, "passthrough">>>;
652
+ symlinks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
653
+ postCreate: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
654
+ agentConfig: z.ZodOptional<z.ZodObject<{
655
+ permissions: z.ZodOptional<z.ZodEnum<["permissionless", "default", "auto-edit", "suggest", "skip"]>>;
656
+ model: z.ZodOptional<z.ZodString>;
657
+ orchestratorModel: z.ZodOptional<z.ZodString>;
658
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
659
+ permissions: z.ZodOptional<z.ZodEnum<["permissionless", "default", "auto-edit", "suggest", "skip"]>>;
660
+ model: z.ZodOptional<z.ZodString>;
661
+ orchestratorModel: z.ZodOptional<z.ZodString>;
662
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
663
+ permissions: z.ZodOptional<z.ZodEnum<["permissionless", "default", "auto-edit", "suggest", "skip"]>>;
664
+ model: z.ZodOptional<z.ZodString>;
665
+ orchestratorModel: z.ZodOptional<z.ZodString>;
666
+ }, z.ZodTypeAny, "passthrough">>>;
667
+ orchestrator: z.ZodOptional<z.ZodObject<{
668
+ agent: z.ZodOptional<z.ZodString>;
669
+ agentConfig: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
670
+ }, "strip", z.ZodTypeAny, {
671
+ agent?: string | undefined;
672
+ agentConfig?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
673
+ }, {
674
+ agent?: string | undefined;
675
+ agentConfig?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
676
+ }>>;
677
+ worker: z.ZodOptional<z.ZodObject<{
678
+ agent: z.ZodOptional<z.ZodString>;
679
+ agentConfig: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
680
+ }, "strip", z.ZodTypeAny, {
681
+ agent?: string | undefined;
682
+ agentConfig?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
683
+ }, {
684
+ agent?: string | undefined;
685
+ agentConfig?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
686
+ }>>;
687
+ reactions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
688
+ agentRules: z.ZodOptional<z.ZodString>;
689
+ agentRulesFile: z.ZodOptional<z.ZodString>;
690
+ orchestratorRules: z.ZodOptional<z.ZodString>;
691
+ orchestratorSessionStrategy: z.ZodOptional<z.ZodEnum<["reuse", "delete", "ignore", "delete-new", "ignore-new", "kill-previous"]>>;
692
+ opencodeIssueSessionStrategy: z.ZodOptional<z.ZodEnum<["reuse", "delete", "ignore"]>>;
693
+ decomposer: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
694
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
695
+ repo: z.ZodOptional<z.ZodString>;
696
+ defaultBranch: z.ZodOptional<z.ZodString>;
697
+ runtime: z.ZodOptional<z.ZodString>;
698
+ agent: z.ZodOptional<z.ZodString>;
699
+ workspace: z.ZodOptional<z.ZodString>;
700
+ tracker: z.ZodOptional<z.ZodObject<{
701
+ plugin: z.ZodString;
702
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
703
+ plugin: z.ZodString;
704
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
705
+ plugin: z.ZodString;
706
+ }, z.ZodTypeAny, "passthrough">>>;
707
+ scm: z.ZodOptional<z.ZodObject<{
708
+ plugin: z.ZodString;
709
+ webhook: z.ZodOptional<z.ZodObject<{
710
+ enabled: z.ZodOptional<z.ZodBoolean>;
711
+ path: z.ZodOptional<z.ZodString>;
712
+ secretEnvVar: z.ZodOptional<z.ZodString>;
713
+ signatureHeader: z.ZodOptional<z.ZodString>;
714
+ eventHeader: z.ZodOptional<z.ZodString>;
715
+ deliveryHeader: z.ZodOptional<z.ZodString>;
716
+ maxBodyBytes: z.ZodOptional<z.ZodNumber>;
717
+ }, "strip", z.ZodTypeAny, {
718
+ path?: string | undefined;
719
+ enabled?: boolean | undefined;
720
+ secretEnvVar?: string | undefined;
721
+ signatureHeader?: string | undefined;
722
+ eventHeader?: string | undefined;
723
+ deliveryHeader?: string | undefined;
724
+ maxBodyBytes?: number | undefined;
725
+ }, {
726
+ path?: string | undefined;
727
+ enabled?: boolean | undefined;
728
+ secretEnvVar?: string | undefined;
729
+ signatureHeader?: string | undefined;
730
+ eventHeader?: string | undefined;
731
+ deliveryHeader?: string | undefined;
732
+ maxBodyBytes?: number | undefined;
733
+ }>>;
734
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
735
+ plugin: z.ZodString;
736
+ webhook: z.ZodOptional<z.ZodObject<{
737
+ enabled: z.ZodOptional<z.ZodBoolean>;
738
+ path: z.ZodOptional<z.ZodString>;
739
+ secretEnvVar: z.ZodOptional<z.ZodString>;
740
+ signatureHeader: z.ZodOptional<z.ZodString>;
741
+ eventHeader: z.ZodOptional<z.ZodString>;
742
+ deliveryHeader: z.ZodOptional<z.ZodString>;
743
+ maxBodyBytes: z.ZodOptional<z.ZodNumber>;
744
+ }, "strip", z.ZodTypeAny, {
745
+ path?: string | undefined;
746
+ enabled?: boolean | undefined;
747
+ secretEnvVar?: string | undefined;
748
+ signatureHeader?: string | undefined;
749
+ eventHeader?: string | undefined;
750
+ deliveryHeader?: string | undefined;
751
+ maxBodyBytes?: number | undefined;
752
+ }, {
753
+ path?: string | undefined;
754
+ enabled?: boolean | undefined;
755
+ secretEnvVar?: string | undefined;
756
+ signatureHeader?: string | undefined;
757
+ eventHeader?: string | undefined;
758
+ deliveryHeader?: string | undefined;
759
+ maxBodyBytes?: number | undefined;
760
+ }>>;
761
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
762
+ plugin: z.ZodString;
763
+ webhook: z.ZodOptional<z.ZodObject<{
764
+ enabled: z.ZodOptional<z.ZodBoolean>;
765
+ path: z.ZodOptional<z.ZodString>;
766
+ secretEnvVar: z.ZodOptional<z.ZodString>;
767
+ signatureHeader: z.ZodOptional<z.ZodString>;
768
+ eventHeader: z.ZodOptional<z.ZodString>;
769
+ deliveryHeader: z.ZodOptional<z.ZodString>;
770
+ maxBodyBytes: z.ZodOptional<z.ZodNumber>;
771
+ }, "strip", z.ZodTypeAny, {
772
+ path?: string | undefined;
773
+ enabled?: boolean | undefined;
774
+ secretEnvVar?: string | undefined;
775
+ signatureHeader?: string | undefined;
776
+ eventHeader?: string | undefined;
777
+ deliveryHeader?: string | undefined;
778
+ maxBodyBytes?: number | undefined;
779
+ }, {
780
+ path?: string | undefined;
781
+ enabled?: boolean | undefined;
782
+ secretEnvVar?: string | undefined;
783
+ signatureHeader?: string | undefined;
784
+ eventHeader?: string | undefined;
785
+ deliveryHeader?: string | undefined;
786
+ maxBodyBytes?: number | undefined;
787
+ }>>;
788
+ }, z.ZodTypeAny, "passthrough">>>;
789
+ symlinks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
790
+ postCreate: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
791
+ agentConfig: z.ZodOptional<z.ZodObject<{
792
+ permissions: z.ZodOptional<z.ZodEnum<["permissionless", "default", "auto-edit", "suggest", "skip"]>>;
793
+ model: z.ZodOptional<z.ZodString>;
794
+ orchestratorModel: z.ZodOptional<z.ZodString>;
795
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
796
+ permissions: z.ZodOptional<z.ZodEnum<["permissionless", "default", "auto-edit", "suggest", "skip"]>>;
797
+ model: z.ZodOptional<z.ZodString>;
798
+ orchestratorModel: z.ZodOptional<z.ZodString>;
799
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
800
+ permissions: z.ZodOptional<z.ZodEnum<["permissionless", "default", "auto-edit", "suggest", "skip"]>>;
801
+ model: z.ZodOptional<z.ZodString>;
802
+ orchestratorModel: z.ZodOptional<z.ZodString>;
803
+ }, z.ZodTypeAny, "passthrough">>>;
804
+ orchestrator: z.ZodOptional<z.ZodObject<{
805
+ agent: z.ZodOptional<z.ZodString>;
806
+ agentConfig: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
807
+ }, "strip", z.ZodTypeAny, {
808
+ agent?: string | undefined;
809
+ agentConfig?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
810
+ }, {
811
+ agent?: string | undefined;
812
+ agentConfig?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
813
+ }>>;
814
+ worker: z.ZodOptional<z.ZodObject<{
815
+ agent: z.ZodOptional<z.ZodString>;
816
+ agentConfig: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
817
+ }, "strip", z.ZodTypeAny, {
818
+ agent?: string | undefined;
819
+ agentConfig?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
820
+ }, {
821
+ agent?: string | undefined;
822
+ agentConfig?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
823
+ }>>;
824
+ reactions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
825
+ agentRules: z.ZodOptional<z.ZodString>;
826
+ agentRulesFile: z.ZodOptional<z.ZodString>;
827
+ orchestratorRules: z.ZodOptional<z.ZodString>;
828
+ orchestratorSessionStrategy: z.ZodOptional<z.ZodEnum<["reuse", "delete", "ignore", "delete-new", "ignore-new", "kill-previous"]>>;
829
+ opencodeIssueSessionStrategy: z.ZodOptional<z.ZodEnum<["reuse", "delete", "ignore"]>>;
830
+ decomposer: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
831
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
832
+ repo: z.ZodOptional<z.ZodString>;
833
+ defaultBranch: z.ZodOptional<z.ZodString>;
834
+ runtime: z.ZodOptional<z.ZodString>;
835
+ agent: z.ZodOptional<z.ZodString>;
836
+ workspace: z.ZodOptional<z.ZodString>;
837
+ tracker: z.ZodOptional<z.ZodObject<{
838
+ plugin: z.ZodString;
839
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
840
+ plugin: z.ZodString;
841
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
842
+ plugin: z.ZodString;
843
+ }, z.ZodTypeAny, "passthrough">>>;
844
+ scm: z.ZodOptional<z.ZodObject<{
845
+ plugin: z.ZodString;
846
+ webhook: z.ZodOptional<z.ZodObject<{
847
+ enabled: z.ZodOptional<z.ZodBoolean>;
848
+ path: z.ZodOptional<z.ZodString>;
849
+ secretEnvVar: z.ZodOptional<z.ZodString>;
850
+ signatureHeader: z.ZodOptional<z.ZodString>;
851
+ eventHeader: z.ZodOptional<z.ZodString>;
852
+ deliveryHeader: z.ZodOptional<z.ZodString>;
853
+ maxBodyBytes: z.ZodOptional<z.ZodNumber>;
854
+ }, "strip", z.ZodTypeAny, {
855
+ path?: string | undefined;
856
+ enabled?: boolean | undefined;
857
+ secretEnvVar?: string | undefined;
858
+ signatureHeader?: string | undefined;
859
+ eventHeader?: string | undefined;
860
+ deliveryHeader?: string | undefined;
861
+ maxBodyBytes?: number | undefined;
862
+ }, {
863
+ path?: string | undefined;
864
+ enabled?: boolean | undefined;
865
+ secretEnvVar?: string | undefined;
866
+ signatureHeader?: string | undefined;
867
+ eventHeader?: string | undefined;
868
+ deliveryHeader?: string | undefined;
869
+ maxBodyBytes?: number | undefined;
870
+ }>>;
871
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
872
+ plugin: z.ZodString;
873
+ webhook: z.ZodOptional<z.ZodObject<{
874
+ enabled: z.ZodOptional<z.ZodBoolean>;
875
+ path: z.ZodOptional<z.ZodString>;
876
+ secretEnvVar: z.ZodOptional<z.ZodString>;
877
+ signatureHeader: z.ZodOptional<z.ZodString>;
878
+ eventHeader: z.ZodOptional<z.ZodString>;
879
+ deliveryHeader: z.ZodOptional<z.ZodString>;
880
+ maxBodyBytes: z.ZodOptional<z.ZodNumber>;
881
+ }, "strip", z.ZodTypeAny, {
882
+ path?: string | undefined;
883
+ enabled?: boolean | undefined;
884
+ secretEnvVar?: string | undefined;
885
+ signatureHeader?: string | undefined;
886
+ eventHeader?: string | undefined;
887
+ deliveryHeader?: string | undefined;
888
+ maxBodyBytes?: number | undefined;
889
+ }, {
890
+ path?: string | undefined;
891
+ enabled?: boolean | undefined;
892
+ secretEnvVar?: string | undefined;
893
+ signatureHeader?: string | undefined;
894
+ eventHeader?: string | undefined;
895
+ deliveryHeader?: string | undefined;
896
+ maxBodyBytes?: number | undefined;
897
+ }>>;
898
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
899
+ plugin: z.ZodString;
900
+ webhook: z.ZodOptional<z.ZodObject<{
901
+ enabled: z.ZodOptional<z.ZodBoolean>;
902
+ path: z.ZodOptional<z.ZodString>;
903
+ secretEnvVar: z.ZodOptional<z.ZodString>;
904
+ signatureHeader: z.ZodOptional<z.ZodString>;
905
+ eventHeader: z.ZodOptional<z.ZodString>;
906
+ deliveryHeader: z.ZodOptional<z.ZodString>;
907
+ maxBodyBytes: z.ZodOptional<z.ZodNumber>;
908
+ }, "strip", z.ZodTypeAny, {
909
+ path?: string | undefined;
910
+ enabled?: boolean | undefined;
911
+ secretEnvVar?: string | undefined;
912
+ signatureHeader?: string | undefined;
913
+ eventHeader?: string | undefined;
914
+ deliveryHeader?: string | undefined;
915
+ maxBodyBytes?: number | undefined;
916
+ }, {
917
+ path?: string | undefined;
918
+ enabled?: boolean | undefined;
919
+ secretEnvVar?: string | undefined;
920
+ signatureHeader?: string | undefined;
921
+ eventHeader?: string | undefined;
922
+ deliveryHeader?: string | undefined;
923
+ maxBodyBytes?: number | undefined;
924
+ }>>;
925
+ }, z.ZodTypeAny, "passthrough">>>;
926
+ symlinks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
927
+ postCreate: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
928
+ agentConfig: z.ZodOptional<z.ZodObject<{
929
+ permissions: z.ZodOptional<z.ZodEnum<["permissionless", "default", "auto-edit", "suggest", "skip"]>>;
930
+ model: z.ZodOptional<z.ZodString>;
931
+ orchestratorModel: z.ZodOptional<z.ZodString>;
932
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
933
+ permissions: z.ZodOptional<z.ZodEnum<["permissionless", "default", "auto-edit", "suggest", "skip"]>>;
934
+ model: z.ZodOptional<z.ZodString>;
935
+ orchestratorModel: z.ZodOptional<z.ZodString>;
936
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
937
+ permissions: z.ZodOptional<z.ZodEnum<["permissionless", "default", "auto-edit", "suggest", "skip"]>>;
938
+ model: z.ZodOptional<z.ZodString>;
939
+ orchestratorModel: z.ZodOptional<z.ZodString>;
940
+ }, z.ZodTypeAny, "passthrough">>>;
941
+ orchestrator: z.ZodOptional<z.ZodObject<{
942
+ agent: z.ZodOptional<z.ZodString>;
943
+ agentConfig: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
944
+ }, "strip", z.ZodTypeAny, {
945
+ agent?: string | undefined;
946
+ agentConfig?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
947
+ }, {
948
+ agent?: string | undefined;
949
+ agentConfig?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
950
+ }>>;
951
+ worker: z.ZodOptional<z.ZodObject<{
952
+ agent: z.ZodOptional<z.ZodString>;
953
+ agentConfig: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
954
+ }, "strip", z.ZodTypeAny, {
955
+ agent?: string | undefined;
956
+ agentConfig?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
957
+ }, {
958
+ agent?: string | undefined;
959
+ agentConfig?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
960
+ }>>;
961
+ reactions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
962
+ agentRules: z.ZodOptional<z.ZodString>;
963
+ agentRulesFile: z.ZodOptional<z.ZodString>;
964
+ orchestratorRules: z.ZodOptional<z.ZodString>;
965
+ orchestratorSessionStrategy: z.ZodOptional<z.ZodEnum<["reuse", "delete", "ignore", "delete-new", "ignore-new", "kill-previous"]>>;
966
+ opencodeIssueSessionStrategy: z.ZodOptional<z.ZodEnum<["reuse", "delete", "ignore"]>>;
967
+ decomposer: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
968
+ }, z.ZodTypeAny, "passthrough">>;
969
+ export type LocalProjectConfig = z.infer<typeof LocalProjectConfigSchema>;
970
+ export interface LocalProjectConfigLoadResult {
971
+ kind: "loaded" | "missing" | "old-format" | "malformed" | "invalid";
972
+ config?: LocalProjectConfig;
973
+ error?: string;
974
+ path?: string;
975
+ }
976
+ /**
977
+ * Load and validate the global config.
978
+ * Returns null if the file does not exist (not an error — first run).
979
+ */
980
+ export declare function loadGlobalConfig(configPath?: string, options?: {
981
+ alreadyLocked?: boolean;
982
+ }): GlobalConfig | null;
983
+ /**
984
+ * Save the global config atomically (temp-file + rename).
985
+ * Creates parent directories if they don't exist.
986
+ */
987
+ export declare function saveGlobalConfig(config: GlobalConfig, configPath?: string): void;
988
+ /**
989
+ * Load a flat local project config from <projectPath>/agent-orchestrator.yaml.
990
+ *
991
+ * Returns null when:
992
+ * - No config file found at projectPath
993
+ * - File has a `projects:` wrapper (old format — use loadConfig() instead)
994
+ * - File is empty or malformed
995
+ */
996
+ export declare function loadLocalProjectConfig(projectPath: string): LocalProjectConfig | null;
997
+ export declare function loadLocalProjectConfigDetailed(projectPath: string): LocalProjectConfigLoadResult;
998
+ export declare function getLocalProjectConfigPath(projectPath: string): string;
999
+ export declare function writeLocalProjectConfig(projectPath: string, config: LocalProjectConfig, configPath?: string): string;
1000
+ export declare function repairWrappedLocalProjectConfig(projectId: string, projectPath: string): void;
1001
+ /**
1002
+ * Register or update a project in the global registry.
1003
+ *
1004
+ * - If the project already exists, identity fields are preserved and only
1005
+ * updated if explicitly provided.
1006
+ * - Local behavior is never written into the registry.
1007
+ * - Write is atomic.
1008
+ */
1009
+ export declare function registerProjectInGlobalConfig(projectId: string, name: string, projectPath: string, localConfig?: (LocalProjectConfig & {
1010
+ sessionPrefix?: string;
1011
+ }) | undefined, optionsOrGlobalConfigPath?: RegisterProjectOptions | string, globalConfigPath?: string): string;
1012
+ /**
1013
+ * Build effective project configuration by merging global registry identity
1014
+ * with local behavior config.
1015
+ *
1016
+ * Load order:
1017
+ * 1. Global entry supplies identity
1018
+ * 2. Local flat config (if present) supplies behavior
1019
+ * 3. Shared defaults supply missing required behavior when local config is absent
1020
+ *
1021
+ * Returns a plain object compatible with ProjectConfig from config.ts.
1022
+ * Returns null if the project is not registered in the global config.
1023
+ */
1024
+ export declare function buildEffectiveProjectConfig(projectId: string, globalConfig: GlobalConfig, _globalConfigPath?: string): (Record<string, unknown> & {
1025
+ name: string;
1026
+ path: string;
1027
+ }) | null;
1028
+ /**
1029
+ * Resolve a single project from the canonical global registry.
1030
+ *
1031
+ * Behavior precedence:
1032
+ * 1. Identity always comes from the global registry entry
1033
+ * 2. Local flat config overrides shared defaults when it loads cleanly
1034
+ * 3. Shared defaults are used when local config is missing
1035
+ * 4. When local config is broken, resolveError is attached instead of throwing
1036
+ */
1037
+ export declare function resolveProjectIdentity(projectId: string, globalConfig: GlobalConfig, _globalConfigPath?: string): (Record<string, unknown> & {
1038
+ name: string;
1039
+ path: string;
1040
+ repo?: string;
1041
+ defaultBranch: string;
1042
+ sessionPrefix: string;
1043
+ resolveError?: string;
1044
+ resolveErrorKind?: ProjectResolveErrorKind;
1045
+ }) | null;
1046
+ /**
1047
+ * Detect if a raw parsed YAML object uses the old single-file config format.
1048
+ * Old format: top-level `projects:` map where each entry has `path` + behavior.
1049
+ */
1050
+ export declare function isOldConfigFormat(raw: unknown): boolean;
1051
+ /**
1052
+ * Migrate an old single-file config to the new hybrid format.
1053
+ *
1054
+ * What happens:
1055
+ * 1. Read old config from oldConfigPath
1056
+ * 2. Create global config at ~/.agent-orchestrator/config.yaml with:
1057
+ * - Global settings (port, defaults, notifiers, reactions)
1058
+ * - Project registry entries (identity only)
1059
+ * 3. Rewrite local config at oldConfigPath to flat behavior-only format
1060
+ * (removes name, path, sessionPrefix from each project entry, removes
1061
+ * the `projects:` wrapper — only the first/matched project is written
1062
+ * when the old config is inside the project directory)
1063
+ * 4. Returns the new global config path
1064
+ *
1065
+ * @param oldConfigPath Absolute path to the old agent-orchestrator.yaml
1066
+ * @param globalConfigPath Override for global config path (default: getGlobalConfigPath())
1067
+ * @returns The global config path
1068
+ */
1069
+ export declare function migrateToGlobalConfig(oldConfigPath: string, globalConfigPath?: string): string;
1070
+ /**
1071
+ * Build a fresh GlobalConfig with all platform-aware defaults filled in.
1072
+ *
1073
+ * Single source of truth for "what does a brand-new global config look like?"
1074
+ * — used by:
1075
+ * - The internal initial-load path here in core (`makeEmptyGlobalConfig`).
1076
+ * - `athene config set` (CLI) when no config file exists yet.
1077
+ * - `maybePromptForUpdateChannel` (CLI) when persisting the user's channel
1078
+ * pick on first run.
1079
+ *
1080
+ * Critically, `defaults.runtime` is platform-aware via `getDefaultRuntime()`
1081
+ * (returns "process" on Windows, "tmux" elsewhere) — hardcoding "tmux" would
1082
+ * lock Windows users into a non-functional config.
1083
+ */
1084
+ export declare function createDefaultGlobalConfig(): GlobalConfig;
1085
+ //# sourceMappingURL=global-config.d.ts.map