@aigile/core 0.2.1 → 0.4.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.
Files changed (176) hide show
  1. package/dist/agent-config.d.ts +850 -0
  2. package/dist/agent-config.d.ts.map +1 -0
  3. package/dist/agent-config.js +111 -0
  4. package/dist/agent-config.js.map +1 -0
  5. package/dist/collections.d.ts +33 -1
  6. package/dist/collections.d.ts.map +1 -1
  7. package/dist/collections.js +33 -1
  8. package/dist/collections.js.map +1 -1
  9. package/dist/config-sections.d.ts +78 -0
  10. package/dist/config-sections.d.ts.map +1 -0
  11. package/dist/config-sections.js +42 -0
  12. package/dist/config-sections.js.map +1 -0
  13. package/dist/config.d.ts +6795 -445
  14. package/dist/config.d.ts.map +1 -1
  15. package/dist/config.js +724 -87
  16. package/dist/config.js.map +1 -1
  17. package/dist/domain/action-item.d.ts +409 -0
  18. package/dist/domain/action-item.d.ts.map +1 -0
  19. package/dist/domain/action-item.js +155 -0
  20. package/dist/domain/action-item.js.map +1 -0
  21. package/dist/domain/ai-call.d.ts +15 -11
  22. package/dist/domain/ai-call.d.ts.map +1 -1
  23. package/dist/domain/ai-call.js +2 -0
  24. package/dist/domain/ai-call.js.map +1 -1
  25. package/dist/domain/build.d.ts +47 -5
  26. package/dist/domain/build.d.ts.map +1 -1
  27. package/dist/domain/build.js +6 -0
  28. package/dist/domain/build.js.map +1 -1
  29. package/dist/domain/change-set.d.ts +216 -0
  30. package/dist/domain/change-set.d.ts.map +1 -0
  31. package/dist/domain/change-set.js +48 -0
  32. package/dist/domain/change-set.js.map +1 -0
  33. package/dist/domain/common.d.ts +6 -3
  34. package/dist/domain/common.d.ts.map +1 -1
  35. package/dist/domain/common.js +4 -1
  36. package/dist/domain/common.js.map +1 -1
  37. package/dist/domain/conflict.d.ts +8 -8
  38. package/dist/domain/conversation.d.ts +78 -8
  39. package/dist/domain/conversation.d.ts.map +1 -1
  40. package/dist/domain/conversation.js +2 -0
  41. package/dist/domain/conversation.js.map +1 -1
  42. package/dist/domain/deliverable.d.ts +235 -0
  43. package/dist/domain/deliverable.d.ts.map +1 -0
  44. package/dist/domain/deliverable.js +76 -0
  45. package/dist/domain/deliverable.js.map +1 -0
  46. package/dist/domain/index.d.ts +4 -1
  47. package/dist/domain/index.d.ts.map +1 -1
  48. package/dist/domain/index.js +4 -1
  49. package/dist/domain/index.js.map +1 -1
  50. package/dist/domain/message.d.ts +7 -7
  51. package/dist/domain/milestone.d.ts +11 -11
  52. package/dist/domain/organization.d.ts +2 -2
  53. package/dist/domain/project.d.ts +524 -3
  54. package/dist/domain/project.d.ts.map +1 -1
  55. package/dist/domain/project.js +38 -1
  56. package/dist/domain/project.js.map +1 -1
  57. package/dist/domain/question.d.ts +238 -26
  58. package/dist/domain/question.d.ts.map +1 -1
  59. package/dist/domain/question.js +49 -4
  60. package/dist/domain/question.js.map +1 -1
  61. package/dist/domain/reassignment.d.ts +23 -18
  62. package/dist/domain/reassignment.d.ts.map +1 -1
  63. package/dist/domain/reassignment.js +14 -6
  64. package/dist/domain/reassignment.js.map +1 -1
  65. package/dist/domain/reference.d.ts +595 -0
  66. package/dist/domain/reference.d.ts.map +1 -0
  67. package/dist/domain/reference.js +180 -0
  68. package/dist/domain/reference.js.map +1 -0
  69. package/dist/domain/release.d.ts +246 -10
  70. package/dist/domain/release.d.ts.map +1 -1
  71. package/dist/domain/release.js +6 -0
  72. package/dist/domain/release.js.map +1 -1
  73. package/dist/domain/review.d.ts +11 -11
  74. package/dist/domain/role-assignment.d.ts +5 -5
  75. package/dist/domain/role-assignment.js +1 -1
  76. package/dist/domain/role.d.ts +41 -6
  77. package/dist/domain/role.d.ts.map +1 -1
  78. package/dist/domain/role.js +12 -0
  79. package/dist/domain/role.js.map +1 -1
  80. package/dist/domain/spec.d.ts +197 -6
  81. package/dist/domain/spec.d.ts.map +1 -1
  82. package/dist/domain/spec.js +73 -1
  83. package/dist/domain/spec.js.map +1 -1
  84. package/dist/domain/sweep.d.ts +11 -11
  85. package/dist/domain/sweep.d.ts.map +1 -1
  86. package/dist/domain/sweep.js +1 -1
  87. package/dist/domain/sweep.js.map +1 -1
  88. package/dist/domain/track.d.ts +16 -16
  89. package/dist/domain/user.d.ts +50 -2
  90. package/dist/domain/user.d.ts.map +1 -1
  91. package/dist/domain/user.js +13 -0
  92. package/dist/domain/user.js.map +1 -1
  93. package/dist/domain/verification.d.ts +4 -4
  94. package/dist/id.d.ts +114 -0
  95. package/dist/id.d.ts.map +1 -0
  96. package/dist/id.js +204 -0
  97. package/dist/id.js.map +1 -0
  98. package/dist/ids.d.ts +0 -2
  99. package/dist/ids.d.ts.map +1 -1
  100. package/dist/ids.js +0 -5
  101. package/dist/ids.js.map +1 -1
  102. package/dist/index.d.ts +7 -0
  103. package/dist/index.d.ts.map +1 -1
  104. package/dist/index.js +7 -0
  105. package/dist/index.js.map +1 -1
  106. package/dist/jira.d.ts +26 -0
  107. package/dist/jira.d.ts.map +1 -0
  108. package/dist/jira.js +37 -0
  109. package/dist/jira.js.map +1 -0
  110. package/dist/outline.d.ts +64 -0
  111. package/dist/outline.d.ts.map +1 -0
  112. package/dist/outline.js +127 -0
  113. package/dist/outline.js.map +1 -0
  114. package/dist/plugins/action-source.d.ts +44 -0
  115. package/dist/plugins/action-source.d.ts.map +1 -0
  116. package/dist/plugins/action-source.js +2 -0
  117. package/dist/plugins/action-source.js.map +1 -0
  118. package/dist/plugins/ai.d.ts +5 -0
  119. package/dist/plugins/ai.d.ts.map +1 -1
  120. package/dist/plugins/blob-store.d.ts +36 -0
  121. package/dist/plugins/blob-store.d.ts.map +1 -0
  122. package/dist/plugins/blob-store.js +11 -0
  123. package/dist/plugins/blob-store.js.map +1 -0
  124. package/dist/plugins/datastore.d.ts +6 -0
  125. package/dist/plugins/datastore.d.ts.map +1 -1
  126. package/dist/plugins/design.d.ts +62 -0
  127. package/dist/plugins/design.d.ts.map +1 -0
  128. package/dist/plugins/design.js +2 -0
  129. package/dist/plugins/design.js.map +1 -0
  130. package/dist/plugins/git-host.d.ts +35 -0
  131. package/dist/plugins/git-host.d.ts.map +1 -0
  132. package/dist/plugins/git-host.js +2 -0
  133. package/dist/plugins/git-host.js.map +1 -0
  134. package/dist/plugins/index.d.ts +9 -0
  135. package/dist/plugins/index.d.ts.map +1 -1
  136. package/dist/plugins/index.js +9 -0
  137. package/dist/plugins/index.js.map +1 -1
  138. package/dist/plugins/registry.d.ts +360 -0
  139. package/dist/plugins/registry.d.ts.map +1 -0
  140. package/dist/plugins/registry.js +218 -0
  141. package/dist/plugins/registry.js.map +1 -0
  142. package/dist/plugins/release-gate.d.ts +53 -0
  143. package/dist/plugins/release-gate.d.ts.map +1 -0
  144. package/dist/plugins/release-gate.js +2 -0
  145. package/dist/plugins/release-gate.js.map +1 -0
  146. package/dist/plugins/spec-cache.d.ts +23 -0
  147. package/dist/plugins/spec-cache.d.ts.map +1 -0
  148. package/dist/plugins/spec-cache.js +2 -0
  149. package/dist/plugins/spec-cache.js.map +1 -0
  150. package/dist/plugins/spec-source.d.ts +177 -0
  151. package/dist/plugins/spec-source.d.ts.map +1 -0
  152. package/dist/plugins/spec-source.js +31 -0
  153. package/dist/plugins/spec-source.js.map +1 -0
  154. package/dist/plugins/test-runner.d.ts +68 -0
  155. package/dist/plugins/test-runner.d.ts.map +1 -0
  156. package/dist/plugins/test-runner.js +14 -0
  157. package/dist/plugins/test-runner.js.map +1 -0
  158. package/dist/preamble.d.ts +11 -0
  159. package/dist/preamble.d.ts.map +1 -0
  160. package/dist/preamble.js +12 -0
  161. package/dist/preamble.js.map +1 -0
  162. package/dist/prompts.d.ts +8 -0
  163. package/dist/prompts.d.ts.map +1 -0
  164. package/dist/prompts.js +13 -0
  165. package/dist/prompts.js.map +1 -0
  166. package/dist/settings.d.ts +90 -0
  167. package/dist/settings.d.ts.map +1 -0
  168. package/dist/settings.js +120 -0
  169. package/dist/settings.js.map +1 -0
  170. package/dist/template.d.ts +89 -0
  171. package/dist/template.d.ts.map +1 -0
  172. package/dist/template.js +9 -0
  173. package/dist/template.js.map +1 -0
  174. package/package.json +9 -3
  175. package/prompts/mission.md +3 -0
  176. package/prompts/preamble.md +37 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-config.d.ts","sourceRoot":"","sources":["../src/agent-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB;;;;;;EAAmD,CAAC;AAEzF,wGAAwG;AACxG,eAAO,MAAM,oBAAoB;;;;IAI3B,kGAAkG;;IAElG,kLAAkL;;;;;;;;;;;;;;EAEtL,CAAC;AAEH,iGAAiG;AACjG,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;IAI1B,oGAAoG;;;IAGpG,oEAAoE;;;;;;;;;;;;;;;;;;;;;;;;EAExE,CAAC;AAEH,4HAA4H;AAC5H,eAAO,MAAM,mBAAmB;;;;;;QAQpB,2FAA2F;;QAE3F,oFAAoF;;;;;;;;;;;;;;;;;IAK1F,6EAA6E;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIjF,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;IAC9B,iGAAiG;;IAEjG,0JAA0J;;IAE1J,2IAA2I;;;;;;;;;;EAE/I,CAAC;AAEH,6IAA6I;AAC7I,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAG/B,mHAAmH;;;;;;;;;;;;QAhE/G,kGAAkG;;QAElG,kLAAkL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QASlL,oGAAoG;;;QAGpG,oEAAoE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAa9D,2FAA2F;;YAE3F,oFAAoF;;;;;;;;;;;;;;;;;QAK1F,6EAA6E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAY7E,iGAAiG;;QAEjG,0JAA0J;;QAE1J,2IAA2I;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqB/I,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,yEAAyE;AACzE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAhDrB,2FAA2F;;YAE3F,oFAAoF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuD9F,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAclE,+HAA+H;AAC/H,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,SAAS,EAAE,KAAK,CAAC,cAAc,GAAG,SAAS,CAAC,GAAG,cAAc,CAIrH"}
@@ -0,0 +1,111 @@
1
+ import { z } from 'zod';
2
+ import { engineerConfigSchema, sandboxConfigSchema } from './config-sections.js';
3
+ /**
4
+ * The agents' configuration (documentation/templates.md "Overrides"): one set
5
+ * for the installation, overridden per template (`agents.templates.<id>`) and
6
+ * per project (`Project.agentConfig`), project over template over installation.
7
+ * Objects merge recursively; arrays and scalars replace.
8
+ */
9
+ export const pullRequestsConfigSchema = z.object({ enabled: z.boolean().default(true) });
10
+ /** The project's checks, run by aigile on every proposed build in a clean worktree (empty: skipped). */
11
+ export const verifierConfigSchema = z.object({
12
+ checks: z.array(z.string().min(1)).default([]),
13
+ checksByProject: z.record(z.array(z.string().min(1))).default({}),
14
+ timeoutMs: z.number().int().positive().default(20 * 60 * 1000),
15
+ /** The Verifier agent adds tests that prove a build's change (where checks exist to run them). */
16
+ writeTests: z.boolean().default(true),
17
+ /** Where it may write: directory prefixes or `*.ext` patterns, relative to the checkout; none by default (the software template's agent defaults name the usual test folders). */
18
+ testPaths: z.array(z.string().min(1)).default([]),
19
+ });
20
+ /** The Monitor: the installation's read-only probes, swept on a cadence and after each merge. */
21
+ export const monitorConfigSchema = z.object({
22
+ probes: z.array(z.object({ name: z.string().min(1), command: z.string().min(1), projectId: z.string().min(1).nullable().default(null) })).default([]),
23
+ cadenceMinutes: z.number().int().positive().default(60),
24
+ auditDelaysMinutes: z.array(z.number().int().positive()).default([15, 180]),
25
+ /** Probes need the network: the host by default; `sandbox` runs them through the agents' runner. */
26
+ runtime: z.enum(['host', 'sandbox']).default('host'),
27
+ timeoutMs: z.number().int().positive().default(2 * 60 * 1000),
28
+ /** Who gets an incident when the project has no ranked approver. */
29
+ notifyUserId: z.string().min(1).nullable().default(null),
30
+ });
31
+ /** The Release Manager: the environments in order and how a release reaches each (commands the installation configures). */
32
+ export const releaseConfigSchema = z.object({
33
+ environments: z
34
+ .array(z.object({
35
+ name: z.string().min(1),
36
+ deploy: z.string().min(1),
37
+ verify: z.string().min(1).nullable().default(null),
38
+ rollback: z.string().min(1).nullable().default(null),
39
+ /** A person's go before the deploy; always true for now (nothing deploys on the clock). */
40
+ requiresGo: z.boolean().default(true),
41
+ /** Have the Monitor audit after the deploy at agents.monitor.auditDelaysMinutes. */
42
+ auditAfter: z.boolean().default(false),
43
+ }))
44
+ .default([]),
45
+ /** Deploy commands need credentials and the network: the host by default. */
46
+ runtime: z.enum(['host', 'sandbox']).default('host'),
47
+ timeoutMs: z.number().int().positive().default(30 * 60 * 1000),
48
+ notifyUserId: z.string().min(1).nullable().default(null),
49
+ });
50
+ /**
51
+ * The Spec Analyst's two kinds of conflict check (documentation/agents.md
52
+ * "Conflict detection"): a review of each new revision against the specs most
53
+ * related to it, and a sweep that reads every spec of a project at once.
54
+ */
55
+ export const specAnalystConfigSchema = z.object({
56
+ /** How much of the related specs a revision's review reads (characters; about 20,000 tokens). */
57
+ reviewChars: z.number().int().positive().default(80_000),
58
+ /** How much one sweep call reads (characters; about 800,000 tokens, inside a 1M-token context). A bigger project is swept in parts, by outline branch. */
59
+ sweepChars: z.number().int().positive().default(2_000_000),
60
+ /** Sweep every project this often (days) on the clock; 0 sweeps only on request (the project's Context pane, `aigile analyze --sweep`). */
61
+ sweepDays: z.number().nonnegative().default(0),
62
+ });
63
+ /** The Orchestrator's clock: the merge sync every tick, and automatic builds (engineer.autoBuild) once revisions settle for quietSeconds. */
64
+ export const scheduleConfigSchema = z.object({
65
+ enabled: z.boolean().default(true),
66
+ tickSeconds: z.number().int().positive().default(60),
67
+ quietSeconds: z.number().int().nonnegative().default(300),
68
+ });
69
+ export const agentsSectionsSchema = z.object({
70
+ engineer: engineerConfigSchema.default({}),
71
+ sandbox: sandboxConfigSchema.default({}),
72
+ /** Open a pull request on the host when a build is approved (tokens from the environment: AIGILE_<HOST>_TOKEN). */
73
+ pullRequests: pullRequestsConfigSchema.default({}),
74
+ verifier: verifierConfigSchema.default({}),
75
+ monitor: monitorConfigSchema.default({}),
76
+ release: releaseConfigSchema.default({}),
77
+ schedule: scheduleConfigSchema.default({}),
78
+ specAnalyst: specAnalystConfigSchema.default({}),
79
+ });
80
+ /** A partial of the sections: what a template or a project overrides. */
81
+ export const agentsOverrideSchema = z.object({
82
+ engineer: engineerConfigSchema.partial().optional(),
83
+ sandbox: sandboxConfigSchema.partial().optional(),
84
+ pullRequests: pullRequestsConfigSchema.partial().optional(),
85
+ verifier: verifierConfigSchema.partial().optional(),
86
+ monitor: monitorConfigSchema.partial().optional(),
87
+ release: releaseConfigSchema.partial().optional(),
88
+ schedule: scheduleConfigSchema.partial().optional(),
89
+ specAnalyst: specAnalystConfigSchema.partial().optional(),
90
+ });
91
+ const isPlain = (v) => typeof v === 'object' && v !== null && !Array.isArray(v);
92
+ function merge(base, over) {
93
+ if (over === undefined)
94
+ return base;
95
+ if (isPlain(base) && isPlain(over)) {
96
+ const out = { ...base };
97
+ for (const [k, v] of Object.entries(over))
98
+ if (v !== undefined)
99
+ out[k] = merge(out[k], v);
100
+ return out;
101
+ }
102
+ return over;
103
+ }
104
+ /** The sections in force for one template and one project: installation, then the template's overrides, then the project's. */
105
+ export function effectiveAgents(base, ...overrides) {
106
+ let out = base;
107
+ for (const o of overrides)
108
+ out = merge(out, o);
109
+ return out;
110
+ }
111
+ //# sourceMappingURL=agent-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-config.js","sourceRoot":"","sources":["../src/agent-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEjF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEzF,wGAAwG;AACxG,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC9C,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAA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AO,CAAC,CAAC,CAAC,CAAC;AAEvH,SAAS,KAAK,CAAI,IAAO,EAAE,IAAa;IACtC,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACpC,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACnC,MAAM,GAAG,GAA4B,EAAE,GAAG,IAAI,EAAE,CAAC;QACjD,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;YAAE,IAAI,CAAC,KAAK,SAAS;gBAAE,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC1F,OAAO,GAAQ,CAAC;IAClB,CAAC;IACD,OAAO,IAAS,CAAC;AACnB,CAAC;AAED,+HAA+H;AAC/H,MAAM,UAAU,eAAe,CAAC,IAAoB,EAAE,GAAG,SAA4C;IACnG,IAAI,GAAG,GAAG,IAAI,CAAC;IACf,KAAK,MAAM,CAAC,IAAI,SAAS;QAAE,GAAG,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAC/C,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -13,8 +13,11 @@ export declare const COLLECTIONS: {
13
13
  readonly messages: "messages";
14
14
  readonly builds: "builds";
15
15
  readonly aiCalls: "ai-calls";
16
- readonly queueItems: "queue-items";
16
+ /** What waits on a person, one record per person per thing (documentation/agents.md §3.7); `queue-items` before 0.3.0. */
17
+ readonly actionItems: "action-items";
17
18
  readonly tracks: "tracks";
19
+ /** What a project delivers, in priority order (documentation/agents.md "Deliverables"). */
20
+ readonly deliverables: "deliverables";
18
21
  readonly questions: "questions";
19
22
  readonly reassignments: "reassignments";
20
23
  readonly conversations: "conversations";
@@ -22,8 +25,37 @@ export declare const COLLECTIONS: {
22
25
  readonly verifications: "verifications";
23
26
  readonly milestones: "milestones";
24
27
  readonly sweeps: "sweeps";
28
+ /** The Spec Analyst's last review per spec (which revision, when, with what outcome): what the clock compares against. */
29
+ readonly specReviews: "spec-reviews";
30
+ /** The Spec Analyst's sweeps: every spec of a project read at once, when and with what outcome. */
31
+ readonly specSweeps: "spec-sweeps";
25
32
  readonly audits: "audits";
33
+ /** Where each spec source's sync left off (its cursor and when): what the clock hands the adapter next time. */
34
+ readonly sourceCursors: "source-cursors";
35
+ /** Edits in progress on a spec, until saved to its source (documentation/sources.md "Drafts"). */
36
+ readonly specDrafts: "spec-drafts";
37
+ /** Batches of spec edits proposed, reviewed and saved together (documentation/sources.md "Change sets"). */
38
+ readonly changeSets: "change-sets";
39
+ /** Personal API tokens (hashes, names, use), for clients that are not a browser. */
40
+ readonly apiTokens: "api-tokens";
41
+ /** The spec cache when `cache.plugin` is `datastore`: disposable, never listed as data. */
42
+ readonly cache: "cache";
26
43
  readonly releases: "releases";
44
+ /** A mirrored spec's outgoing references (links to pages, issues, URLs, attachments), one record per spec keyed by its id (documentation/sources.md "Links and attachments"). */
45
+ readonly specReferences: "spec-references";
46
+ /** Files attached to or referenced by mirrored documents, with the text extracted from them; one record per content hash. */
47
+ readonly attachments: "attachments";
48
+ /** The original bytes of an attachment (base64), kept only under `attachments.keepOriginalsUnderBytes`; keyed by the attachment's id. */
49
+ readonly attachmentOriginals: "attachment-originals";
50
+ };
51
+ /**
52
+ * Names a collection had before a rename. They are still read for one release,
53
+ * so an installation keeps working until `aigile datastore migrate` moves what
54
+ * is in them; nothing is written to them.
55
+ */
56
+ export declare const LEGACY_COLLECTIONS: {
57
+ /** `action-items` since 0.3.0. */
58
+ readonly queueItems: "queue-items";
27
59
  };
28
60
  export type CollectionName = (typeof COLLECTIONS)[keyof typeof COLLECTIONS];
29
61
  /** Prefix marking datastore-internal files (e.g. indexes) that are not entities. */
@@ -1 +1 @@
1
- {"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../src/collections.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;CAsBd,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAE5E,oFAAoF;AACpF,eAAO,MAAM,oBAAoB,OAAO,CAAC"}
1
+ {"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../src/collections.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;IAWtB,0HAA0H;;;IAG1H,2FAA2F;;;;;;;;;IAS3F,0HAA0H;;IAE1H,mGAAmG;;;IAGnG,gHAAgH;;IAEhH,kGAAkG;;IAElG,4GAA4G;;IAE5G,oFAAoF;;IAEpF,2FAA2F;;;IAG3F,iLAAiL;;IAEjL,6HAA6H;;IAE7H,yIAAyI;;CAEjI,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;IAC7B,kCAAkC;;CAE1B,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAE5E,oFAAoF;AACpF,eAAO,MAAM,oBAAoB,OAAO,CAAC"}
@@ -13,8 +13,11 @@ export const COLLECTIONS = {
13
13
  messages: 'messages',
14
14
  builds: 'builds',
15
15
  aiCalls: 'ai-calls',
16
- queueItems: 'queue-items',
16
+ /** What waits on a person, one record per person per thing (documentation/agents.md §3.7); `queue-items` before 0.3.0. */
17
+ actionItems: 'action-items',
17
18
  tracks: 'tracks',
19
+ /** What a project delivers, in priority order (documentation/agents.md "Deliverables"). */
20
+ deliverables: 'deliverables',
18
21
  questions: 'questions',
19
22
  reassignments: 'reassignments',
20
23
  conversations: 'conversations',
@@ -22,8 +25,37 @@ export const COLLECTIONS = {
22
25
  verifications: 'verifications',
23
26
  milestones: 'milestones',
24
27
  sweeps: 'sweeps',
28
+ /** The Spec Analyst's last review per spec (which revision, when, with what outcome): what the clock compares against. */
29
+ specReviews: 'spec-reviews',
30
+ /** The Spec Analyst's sweeps: every spec of a project read at once, when and with what outcome. */
31
+ specSweeps: 'spec-sweeps',
25
32
  audits: 'audits',
33
+ /** Where each spec source's sync left off (its cursor and when): what the clock hands the adapter next time. */
34
+ sourceCursors: 'source-cursors',
35
+ /** Edits in progress on a spec, until saved to its source (documentation/sources.md "Drafts"). */
36
+ specDrafts: 'spec-drafts',
37
+ /** Batches of spec edits proposed, reviewed and saved together (documentation/sources.md "Change sets"). */
38
+ changeSets: 'change-sets',
39
+ /** Personal API tokens (hashes, names, use), for clients that are not a browser. */
40
+ apiTokens: 'api-tokens',
41
+ /** The spec cache when `cache.plugin` is `datastore`: disposable, never listed as data. */
42
+ cache: 'cache',
26
43
  releases: 'releases',
44
+ /** A mirrored spec's outgoing references (links to pages, issues, URLs, attachments), one record per spec keyed by its id (documentation/sources.md "Links and attachments"). */
45
+ specReferences: 'spec-references',
46
+ /** Files attached to or referenced by mirrored documents, with the text extracted from them; one record per content hash. */
47
+ attachments: 'attachments',
48
+ /** The original bytes of an attachment (base64), kept only under `attachments.keepOriginalsUnderBytes`; keyed by the attachment's id. */
49
+ attachmentOriginals: 'attachment-originals',
50
+ };
51
+ /**
52
+ * Names a collection had before a rename. They are still read for one release,
53
+ * so an installation keeps working until `aigile datastore migrate` moves what
54
+ * is in them; nothing is written to them.
55
+ */
56
+ export const LEGACY_COLLECTIONS = {
57
+ /** `action-items` since 0.3.0. */
58
+ queueItems: 'queue-items',
27
59
  };
28
60
  /** Prefix marking datastore-internal files (e.g. indexes) that are not entities. */
29
61
  export const INTERNAL_FILE_PREFIX = '__';
@@ -1 +1 @@
1
- {"version":3,"file":"collections.js","sourceRoot":"","sources":["../src/collections.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,aAAa,EAAE,eAAe;IAC9B,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,eAA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ACzB,MAAM,EAAE,QAAQ;IAChB,gHAAgH;IAChH,aAAa,EAAE,gBAAgB;IAC/B,kGAAkG;IAClG,UAAU,EAAE,aAAa;IACzB,4GAA4G;IAC5G,UAAU,EAAE,aAAa;IACzB,oFAAoF;IACpF,SAAS,EAAE,YAAY;IACvB,2FAA2F;IAC3F,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,iLAAiL;IACjL,cAAc,EAAE,iBAAiB;IACjC,6HAA6H;IAC7H,WAAW,EAAE,aAAa;IAC1B,yIAAyI;IACzI,mBAAmB,EAAE,sBAAsB;CACnC,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,kCAAkC;IAClC,UAAU,EAAE,aAAa;CACjB,CAAC;AAIX,oFAAoF;AACpF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC"}
@@ -0,0 +1,78 @@
1
+ import { z } from 'zod';
2
+ /** The commands every template's agents may run unless configured otherwise: reading the checkout, and git (which the sandbox limits to reads). */
3
+ export declare const NEUTRAL_ALLOW: readonly string[];
4
+ export declare const engineerConfigSchema: z.ZodObject<{
5
+ /**
6
+ * First words of commands it may run; anything else is refused. `git push` is refused whatever the list says.
7
+ * The platform's default is neutral (reading tools and git); a template adds its toolchain (the software
8
+ * template: npm, cargo, pytest…) through its agent defaults (documentation/templates.md "Overrides").
9
+ */
10
+ allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
11
+ /** Output tokens across the whole build; the run stops gracefully at it. */
12
+ budgetTokens: z.ZodDefault<z.ZodNumber>;
13
+ /** Wall clock for one command and for the whole build. */
14
+ commandTimeoutMs: z.ZodDefault<z.ZodNumber>;
15
+ buildTimeoutMs: z.ZodDefault<z.ZodNumber>;
16
+ /** Start a build on its own once spec revisions settle; off, since every build spends money. */
17
+ autoBuild: z.ZodDefault<z.ZodBoolean>;
18
+ /** The Engineer proposes a plan first and builds only after a person approves it. */
19
+ planGate: z.ZodDefault<z.ZodBoolean>;
20
+ /**
21
+ * How the brief carries the specs that apply (documentation/agents.md
22
+ * "Specs on demand"): `inline` writes them out, strongest first, up to the
23
+ * brief's budget, and lists the rest; `index` writes out only the
24
+ * deliverable's specs (all of them when there is none) and lists the rest by
25
+ * title. Either way the Engineer has search_specs, get_spec and
26
+ * spec_outline to read any of them when it needs to.
27
+ */
28
+ specs: z.ZodDefault<z.ZodEnum<["inline", "index"]>>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ allow: string[];
31
+ budgetTokens: number;
32
+ commandTimeoutMs: number;
33
+ buildTimeoutMs: number;
34
+ autoBuild: boolean;
35
+ planGate: boolean;
36
+ specs: "inline" | "index";
37
+ }, {
38
+ allow?: string[] | undefined;
39
+ budgetTokens?: number | undefined;
40
+ commandTimeoutMs?: number | undefined;
41
+ buildTimeoutMs?: number | undefined;
42
+ autoBuild?: boolean | undefined;
43
+ planGate?: boolean | undefined;
44
+ specs?: "inline" | "index" | undefined;
45
+ }>;
46
+ export type EngineerConfig = z.infer<typeof engineerConfigSchema>;
47
+ export declare const sandboxConfigSchema: z.ZodObject<{
48
+ runtime: z.ZodDefault<z.ZodEnum<["auto", "host", "container"]>>;
49
+ engine: z.ZodDefault<z.ZodEnum<["auto", "podman", "docker"]>>;
50
+ image: z.ZodDefault<z.ZodString>;
51
+ /** Project id → image, for a project whose checks need another toolchain. */
52
+ imageByProject: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
53
+ memory: z.ZodDefault<z.ZodString>;
54
+ cpus: z.ZodDefault<z.ZodNumber>;
55
+ pids: z.ZodDefault<z.ZodNumber>;
56
+ /** More `run` arguments (a `--network` for a project that must reach a registry, say). */
57
+ extraArgs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ runtime: "auto" | "host" | "container";
60
+ engine: "auto" | "podman" | "docker";
61
+ image: string;
62
+ imageByProject: Record<string, string>;
63
+ memory: string;
64
+ cpus: number;
65
+ pids: number;
66
+ extraArgs: string[];
67
+ }, {
68
+ runtime?: "auto" | "host" | "container" | undefined;
69
+ engine?: "auto" | "podman" | "docker" | undefined;
70
+ image?: string | undefined;
71
+ imageByProject?: Record<string, string> | undefined;
72
+ memory?: string | undefined;
73
+ cpus?: number | undefined;
74
+ pids?: number | undefined;
75
+ extraArgs?: string[] | undefined;
76
+ }>;
77
+ export type SandboxConfig = z.infer<typeof sandboxConfigSchema>;
78
+ //# sourceMappingURL=config-sections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-sections.d.ts","sourceRoot":"","sources":["../src/config-sections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,mJAAmJ;AACnJ,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAAoI,CAAC;AAGhL,eAAO,MAAM,oBAAoB;IAC/B;;;;OAIG;;IAEH,4EAA4E;;IAE5E,0DAA0D;;;IAG1D,gGAAgG;;IAEhG,qFAAqF;;IAErF;;;;;;;OAOG;;;;;;;;;;;;;;;;;;EAEH,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,mBAAmB;;;;IAI9B,6EAA6E;;;;;IAK7E,0FAA0F;;;;;;;;;;;;;;;;;;;;EAE1F,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { z } from 'zod';
2
+ /** The commands every template's agents may run unless configured otherwise: reading the checkout, and git (which the sandbox limits to reads). */
3
+ export const NEUTRAL_ALLOW = ['ls', 'cat', 'head', 'tail', 'grep', 'find', 'wc', 'diff', 'sed', 'awk', 'sort', 'uniq', 'echo', 'pwd', 'test', 'tree', 'git'];
4
+ export const engineerConfigSchema = z.object({
5
+ /**
6
+ * First words of commands it may run; anything else is refused. `git push` is refused whatever the list says.
7
+ * The platform's default is neutral (reading tools and git); a template adds its toolchain (the software
8
+ * template: npm, cargo, pytest…) through its agent defaults (documentation/templates.md "Overrides").
9
+ */
10
+ allow: z.array(z.string()).default(() => [...NEUTRAL_ALLOW]),
11
+ /** Output tokens across the whole build; the run stops gracefully at it. */
12
+ budgetTokens: z.number().int().positive().default(200_000),
13
+ /** Wall clock for one command and for the whole build. */
14
+ commandTimeoutMs: z.number().int().positive().default(10 * 60 * 1000),
15
+ buildTimeoutMs: z.number().int().positive().default(60 * 60 * 1000),
16
+ /** Start a build on its own once spec revisions settle; off, since every build spends money. */
17
+ autoBuild: z.boolean().default(false),
18
+ /** The Engineer proposes a plan first and builds only after a person approves it. */
19
+ planGate: z.boolean().default(true),
20
+ /**
21
+ * How the brief carries the specs that apply (documentation/agents.md
22
+ * "Specs on demand"): `inline` writes them out, strongest first, up to the
23
+ * brief's budget, and lists the rest; `index` writes out only the
24
+ * deliverable's specs (all of them when there is none) and lists the rest by
25
+ * title. Either way the Engineer has search_specs, get_spec and
26
+ * spec_outline to read any of them when it needs to.
27
+ */
28
+ specs: z.enum(['inline', 'index']).default('inline'),
29
+ });
30
+ export const sandboxConfigSchema = z.object({
31
+ runtime: z.enum(['auto', 'host', 'container']).default('auto'),
32
+ engine: z.enum(['auto', 'podman', 'docker']).default('auto'),
33
+ image: z.string().min(1).default('node:22-bookworm'),
34
+ /** Project id → image, for a project whose checks need another toolchain. */
35
+ imageByProject: z.record(z.string().min(1)).default({}),
36
+ memory: z.string().min(1).default('2g'),
37
+ cpus: z.number().positive().default(2),
38
+ pids: z.number().int().positive().default(512),
39
+ /** More `run` arguments (a `--network` for a project that must reach a registry, say). */
40
+ extraArgs: z.array(z.string()).default([]),
41
+ });
42
+ //# sourceMappingURL=config-sections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-sections.js","sourceRoot":"","sources":["../src/config-sections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MA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