@dsh-ray/assistant-growth-driver 0.0.0-stage → 0.2.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 (60) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +322 -2
  3. package/cordis.patch.yml +3 -0
  4. package/lib/association-intake.d.ts +55 -0
  5. package/lib/association-intake.d.ts.map +1 -0
  6. package/lib/association-intake.js +253 -0
  7. package/lib/association-intake.js.map +1 -0
  8. package/lib/config.d.ts +171 -0
  9. package/lib/config.d.ts.map +1 -0
  10. package/lib/config.js +401 -0
  11. package/lib/config.js.map +1 -0
  12. package/lib/deposit.d.ts +53 -0
  13. package/lib/deposit.d.ts.map +1 -0
  14. package/lib/deposit.js +56 -0
  15. package/lib/deposit.js.map +1 -0
  16. package/lib/dreaming-intake.d.ts +37 -0
  17. package/lib/dreaming-intake.d.ts.map +1 -0
  18. package/lib/dreaming-intake.js +180 -0
  19. package/lib/dreaming-intake.js.map +1 -0
  20. package/lib/growth-agent.d.ts +193 -0
  21. package/lib/growth-agent.d.ts.map +1 -0
  22. package/lib/growth-agent.js +1633 -0
  23. package/lib/growth-agent.js.map +1 -0
  24. package/lib/index.d.ts +79 -0
  25. package/lib/index.d.ts.map +1 -0
  26. package/lib/index.js +662 -0
  27. package/lib/index.js.map +1 -0
  28. package/lib/revision-target-matcher.d.ts +23 -0
  29. package/lib/revision-target-matcher.d.ts.map +1 -0
  30. package/lib/revision-target-matcher.js +51 -0
  31. package/lib/revision-target-matcher.js.map +1 -0
  32. package/lib/scanner-owner-runtime.d.ts +34 -0
  33. package/lib/scanner-owner-runtime.d.ts.map +1 -0
  34. package/lib/scanner-owner-runtime.js +99 -0
  35. package/lib/scanner-owner-runtime.js.map +1 -0
  36. package/lib/source-edits.d.ts +22 -0
  37. package/lib/source-edits.d.ts.map +1 -0
  38. package/lib/source-edits.js +77 -0
  39. package/lib/source-edits.js.map +1 -0
  40. package/lib/source-port.d.ts +223 -0
  41. package/lib/source-port.d.ts.map +1 -0
  42. package/lib/source-port.js +8 -0
  43. package/lib/source-port.js.map +1 -0
  44. package/lib/usage-runtime.d.ts +116 -0
  45. package/lib/usage-runtime.d.ts.map +1 -0
  46. package/lib/usage-runtime.js +853 -0
  47. package/lib/usage-runtime.js.map +1 -0
  48. package/lib/usage-store.d.ts +119 -0
  49. package/lib/usage-store.d.ts.map +1 -0
  50. package/lib/usage-store.js +343 -0
  51. package/lib/usage-store.js.map +1 -0
  52. package/lib/version.d.ts +2 -0
  53. package/lib/version.d.ts.map +1 -0
  54. package/lib/version.js +2 -0
  55. package/lib/version.js.map +1 -0
  56. package/lib/work-item-source.d.ts +63 -0
  57. package/lib/work-item-source.d.ts.map +1 -0
  58. package/lib/work-item-source.js +126 -0
  59. package/lib/work-item-source.js.map +1 -0
  60. package/package.json +153 -3
@@ -0,0 +1,253 @@
1
+ import { createHash } from 'node:crypto';
2
+ const CORDIS_ORIGINAL = Symbol.for('cordis.original');
3
+ const DIGEST_HEX = /^[a-f0-9]{64}$/u;
4
+ const MAX_SCAN_CANDIDATES = 64;
5
+ function boundedPrintable(value, maxBytes, allowWhitespaceFormatting = false) {
6
+ if (typeof value !== 'string')
7
+ return null;
8
+ const text = value.normalize('NFC').trim();
9
+ if (text.length === 0 || !text.isWellFormed() || Buffer.byteLength(text, 'utf8') > maxBytes)
10
+ return null;
11
+ if ([...text].some(char => {
12
+ const code = char.codePointAt(0);
13
+ if (allowWhitespaceFormatting && (code === 0x0a || code === 0x09))
14
+ return false;
15
+ return code <= 0x1f || code === 0x7f;
16
+ }))
17
+ return null;
18
+ return text;
19
+ }
20
+ function boundedStringList(value, minItems, maxItems, maxItemBytes, label) {
21
+ if (!Array.isArray(value) || value.length < minItems || value.length > maxItems) {
22
+ throw new Error(`assistant-growth-driver: association candidate requires bounded ${label}`);
23
+ }
24
+ const out = [];
25
+ for (const item of value) {
26
+ const text = boundedPrintable(item, maxItemBytes);
27
+ if (text === null) {
28
+ throw new Error(`assistant-growth-driver: invalid association candidate ${label} entry`);
29
+ }
30
+ out.push(text);
31
+ }
32
+ return Object.freeze(out);
33
+ }
34
+ function sanitizeGoalLocators(value) {
35
+ if (!Array.isArray(value) || value.length > 32) {
36
+ throw new Error('assistant-growth-driver: association candidate requires bounded goalLocators');
37
+ }
38
+ const out = [];
39
+ const seen = new Set();
40
+ for (const entry of value) {
41
+ if (entry === null || typeof entry !== 'object' || Array.isArray(entry)) {
42
+ throw new Error('assistant-growth-driver: invalid association candidate goalLocator');
43
+ }
44
+ const raw = entry;
45
+ const goalId = boundedPrintable(raw.goalId, 256);
46
+ const sessionId = boundedPrintable(raw.sessionId, 256);
47
+ if (goalId === null || sessionId === null) {
48
+ throw new Error('assistant-growth-driver: invalid association candidate goalLocator fields');
49
+ }
50
+ const key = `${sessionId}\0${goalId}`;
51
+ if (seen.has(key))
52
+ continue;
53
+ seen.add(key);
54
+ out.push(Object.freeze({ goalId, sessionId }));
55
+ }
56
+ return Object.freeze(out);
57
+ }
58
+ function digestAssociationCandidate(candidate) {
59
+ return createHash('sha256').update(JSON.stringify({
60
+ candidateId: candidate.candidateId,
61
+ ownerScopeKey: candidate.ownerScopeKey,
62
+ clusterId: candidate.clusterId,
63
+ signatureDigest: candidate.signatureDigest,
64
+ name: candidate.name,
65
+ description: candidate.description,
66
+ toolSequence: candidate.toolSequence,
67
+ sharedEntities: candidate.sharedEntities,
68
+ memberTaskIds: candidate.memberTaskIds,
69
+ goalLocators: candidate.goalLocators,
70
+ similarity: candidate.similarity,
71
+ wp04Verified: true,
72
+ status: 'pending',
73
+ createdAt: candidate.createdAt,
74
+ updatedAt: candidate.updatedAt,
75
+ })).digest('hex');
76
+ }
77
+ /**
78
+ * Compute the canonical delivery ownerScopeKey matching assistant-association's
79
+ * `computeOwnerScopeKey` in `delivery` mode without creating a runtime dependency.
80
+ */
81
+ export function computeAssociationOwnerScopeKey(scope) {
82
+ const principalDigest = createHash('sha256').update(scope.principalId, 'utf8').digest('hex');
83
+ return createHash('sha256')
84
+ .update(JSON.stringify([
85
+ 'delivery',
86
+ principalDigest,
87
+ scope.principalRecordId,
88
+ scope.principalVersion,
89
+ scope.workspace,
90
+ scope.preset,
91
+ ]), 'utf8')
92
+ .digest('hex');
93
+ }
94
+ /**
95
+ * Validate a candidate surfaced by `assistant-association` before admitting it
96
+ * into growth-driver prompt context. Only strictly `status === 'pending'` and
97
+ * `wp04Verified === true` candidates with bounded sanitized fields are accepted.
98
+ */
99
+ export function assertAssociationCandidateInput(value) {
100
+ if (value === null || typeof value !== 'object' || Array.isArray(value)) {
101
+ throw new Error('assistant-growth-driver: association candidate must be an object');
102
+ }
103
+ const raw = value;
104
+ if (raw.status !== 'pending') {
105
+ throw new Error(`assistant-growth-driver: refusing non-pending association candidate (status=${String(raw.status)})`);
106
+ }
107
+ if (raw.wp04Verified !== true) {
108
+ throw new Error(`assistant-growth-driver: refusing unverified association candidate (wp04Verified=${String(raw.wp04Verified)})`);
109
+ }
110
+ const candidateId = boundedPrintable(raw.candidateId, 128);
111
+ const ownerScopeKey = boundedPrintable(raw.ownerScopeKey, 128);
112
+ const clusterId = boundedPrintable(raw.clusterId, 128);
113
+ const signatureDigest = typeof raw.signatureDigest === 'string' && DIGEST_HEX.test(raw.signatureDigest)
114
+ ? raw.signatureDigest
115
+ : null;
116
+ const name = boundedPrintable(raw.name, 128);
117
+ const description = boundedPrintable(raw.description, 2_048, true);
118
+ const similarity = typeof raw.similarity === 'number' && Number.isFinite(raw.similarity) && raw.similarity >= 0 && raw.similarity <= 1
119
+ ? raw.similarity
120
+ : null;
121
+ const createdAt = typeof raw.createdAt === 'number' && Number.isSafeInteger(raw.createdAt) && raw.createdAt >= 0
122
+ ? raw.createdAt
123
+ : null;
124
+ const updatedAt = typeof raw.updatedAt === 'number' && Number.isSafeInteger(raw.updatedAt) && raw.updatedAt >= 0
125
+ ? raw.updatedAt
126
+ : null;
127
+ if (candidateId === null
128
+ || ownerScopeKey === null
129
+ || clusterId === null
130
+ || signatureDigest === null
131
+ || name === null
132
+ || description === null
133
+ || similarity === null
134
+ || createdAt === null
135
+ || updatedAt === null) {
136
+ throw new Error('assistant-growth-driver: invalid association candidate fields');
137
+ }
138
+ const toolSequence = boundedStringList(raw.toolSequence, 1, 32, 128, 'toolSequence');
139
+ const sharedEntities = boundedStringList(raw.sharedEntities, 0, 32, 128, 'sharedEntities');
140
+ const memberTaskIds = boundedStringList(raw.memberTaskIds, 1, 64, 256, 'memberTaskIds');
141
+ const goalLocators = sanitizeGoalLocators(raw.goalLocators);
142
+ const base = {
143
+ candidateId,
144
+ ownerScopeKey,
145
+ clusterId,
146
+ signatureDigest,
147
+ name,
148
+ description,
149
+ toolSequence,
150
+ sharedEntities,
151
+ memberTaskIds,
152
+ goalLocators,
153
+ similarity,
154
+ wp04Verified: true,
155
+ status: 'pending',
156
+ createdAt,
157
+ updatedAt,
158
+ };
159
+ const digest = digestAssociationCandidate(base);
160
+ if (raw.digest !== undefined && raw.digest !== digest) {
161
+ throw new Error('assistant-growth-driver: association candidate digest mismatch');
162
+ }
163
+ return Object.freeze({ ...base, digest });
164
+ }
165
+ function unwrapAssociation(ctx) {
166
+ const service = ctx.get('assistantAssociation', false);
167
+ if (service === undefined)
168
+ return undefined;
169
+ return service[CORDIS_ORIGINAL] ?? service;
170
+ }
171
+ function emptyDisabledResult() {
172
+ return Object.freeze({
173
+ candidates: Object.freeze([]),
174
+ summary: Object.freeze({
175
+ enabled: false,
176
+ considered: 0,
177
+ ingested: 0,
178
+ rejectedUnverified: 0,
179
+ candidateIds: Object.freeze([]),
180
+ }),
181
+ });
182
+ }
183
+ /**
184
+ * Bounded, read-only ingestion of WP04-verified pending skill candidates from
185
+ * `assistant-association`. Gracefully returns an empty disabled result when
186
+ * `assistantAssociation` is absent or disabled, and strictly rejects unverified,
187
+ * non-pending, cross-scope, or malformed candidates.
188
+ */
189
+ export function readAssociationCandidates(ctx, authority, maxCandidates) {
190
+ authority.assertCurrent();
191
+ const limit = Number.isSafeInteger(maxCandidates) ? Math.min(Math.max(1, maxCandidates), 10) : 3;
192
+ const assoc = unwrapAssociation(ctx);
193
+ if (assoc === undefined
194
+ || typeof assoc.listSkillCandidates !== 'function'
195
+ || (assoc.enabled !== undefined && assoc.enabled !== true)) {
196
+ return emptyDisabledResult();
197
+ }
198
+ const ownerScopeKey = computeAssociationOwnerScopeKey(authority.scope);
199
+ const scanLimit = Math.min(Math.max(limit * 4, 20), MAX_SCAN_CANDIDATES);
200
+ let rawCandidates;
201
+ try {
202
+ rawCandidates = assoc.listSkillCandidates(ownerScopeKey, { status: 'pending', limit: scanLimit });
203
+ }
204
+ catch (error) {
205
+ const code = error?.code;
206
+ if (code === 'disabled' || code === 'disposed') {
207
+ return emptyDisabledResult();
208
+ }
209
+ throw error;
210
+ }
211
+ const candidates = [];
212
+ const seenIds = new Set();
213
+ let considered = 0;
214
+ let rejectedUnverified = 0;
215
+ if (Array.isArray(rawCandidates)) {
216
+ for (const candidate of rawCandidates) {
217
+ if (candidates.length >= limit || considered >= MAX_SCAN_CANDIDATES)
218
+ break;
219
+ considered += 1;
220
+ let validated;
221
+ try {
222
+ validated = assertAssociationCandidateInput(candidate);
223
+ }
224
+ catch {
225
+ rejectedUnverified += 1;
226
+ continue;
227
+ }
228
+ if (validated.ownerScopeKey !== ownerScopeKey) {
229
+ rejectedUnverified += 1;
230
+ continue;
231
+ }
232
+ if (seenIds.has(validated.candidateId))
233
+ continue;
234
+ authority.assertCurrent();
235
+ seenIds.add(validated.candidateId);
236
+ candidates.push(validated);
237
+ }
238
+ }
239
+ authority.assertCurrent();
240
+ const frozenCandidates = Object.freeze(candidates);
241
+ const candidateIds = Object.freeze(frozenCandidates.map(item => item.candidateId));
242
+ return Object.freeze({
243
+ candidates: frozenCandidates,
244
+ summary: Object.freeze({
245
+ enabled: true,
246
+ considered,
247
+ ingested: frozenCandidates.length,
248
+ rejectedUnverified,
249
+ candidateIds,
250
+ }),
251
+ });
252
+ }
253
+ //# sourceMappingURL=association-intake.js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,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAC5B,CAAC;IACH,CAAC;IAED,SAAS,CAAC,aAAa,EAAE,CAAA;IACzB,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;IAClD,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAA;IAClF,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,UAAU,EAAE,gBAAgB;QAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;YACrB,OAAO,EAAE,IAAI;YACb,UAAU;YACV,QAAQ,EAAE,gBAAgB,CAAC,MAAM;YACjC,kBAAkB;YAClB,YAAY;SACb,CAAC;KACH,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,171 @@
1
+ import Schema from '@deepseek-ai/schemastery';
2
+ import { type WorkItemGrowthAuthorityPins, type WorkItemRevisionAuthorityPins } from '@dsh-ray/assistant-growth-contract';
3
+ /**
4
+ * The growth driver is enabled by default with fail-closed standby when
5
+ * host-provisioned prerequisites (such as owner `scope`, `repository`, or
6
+ * `usageLearning` paths/budgets) are omitted; explicit `enabled: false`
7
+ * disables the driver and cascades to omitted sub-tracks. Model selection
8
+ * follows the owner's conversation unless an explicit fixed pair overrides it.
9
+ */
10
+ export interface GrowthOwnerScopeConfig {
11
+ workspace: string;
12
+ preset: string;
13
+ principalId: string;
14
+ ownerRouteId: string;
15
+ }
16
+ /**
17
+ * The owner-anchored workflow bridge is a second, independently switched
18
+ * learning track inside the wake. It is opt-in and fail-closed even when the
19
+ * driver itself is enabled: it never proposes, approves, activates or installs
20
+ * anything, it only asks Delivery to re-verify and record paused candidates.
21
+ */
22
+ export interface WorkflowOwnerAnchoredConfig {
23
+ enabled?: boolean;
24
+ /** Hard cap on commit attempts in one wake (rate limit); idempotent replays are cheap. */
25
+ maxCommitsPerWake?: number;
26
+ /** Only consider owner goals last updated inside this lookback horizon (TTL). */
27
+ lookbackMs?: number;
28
+ }
29
+ /**
30
+ * The plugin source-proposal track is the third, independently switched growth
31
+ * capability. It is opt-in and fail-closed even when the driver itself is
32
+ * enabled: the growth agent may then prepare PENDING modify source plans in
33
+ * isolated worktrees, but it can never approve, sign, release, activate,
34
+ * install or reload anything. Every build-shaping value (repository path,
35
+ * timeouts, TTL, offline flag) is frozen owner configuration — the model can
36
+ * never supply a repository, worktree, base commit or environment.
37
+ */
38
+ export interface PluginSourceProposalsConfig {
39
+ enabled?: boolean;
40
+ /** Separately opt into new-plugin creation; only Host-owned durable jobs may use it. */
41
+ allowCreation?: boolean;
42
+ /** Existing-plugin modification is enabled by default for older profiles. */
43
+ allowModification?: boolean;
44
+ /** Separately opt into revising an adopted plugin from a new failed owner task. */
45
+ allowRevision?: boolean;
46
+ /** Inline builds during the model wake; durable queues Host-owned work. */
47
+ preparationMode?: 'inline' | 'durable';
48
+ /** Canonical absolute path of the dsh-ray repository the patches target. Required when enabled. */
49
+ repository?: string;
50
+ /** Hard cap on prepared modify plans in one wake (rate limit); idempotent replays are cheap. */
51
+ maxPlansPerWake?: number;
52
+ /** Per-command bounded timeout for the frozen install/check/pack gate. */
53
+ isolatedBuildTimeoutMs?: number;
54
+ /** Run pnpm install fully offline (the owner must warm the store beforehand). */
55
+ offline?: boolean;
56
+ /** Pending-plan TTL: how long the isolated worktree waits for owner action. */
57
+ planTtlMs?: number;
58
+ }
59
+ export interface AssistantGrowthDriverConfig {
60
+ enabled?: boolean;
61
+ /** 0 = no periodic wake; the driver only runs when explicitly triggered. */
62
+ intervalMs?: number;
63
+ maxReviewsPerWake?: number;
64
+ minRepeatedSuccesses?: number;
65
+ candidateTtlMs?: number;
66
+ maxModelCalls?: number;
67
+ maxToolCalls?: number;
68
+ maxOutputTokens?: number;
69
+ maxDurationMs?: number;
70
+ /**
71
+ * How the model sees the frozen growth tool surface. `native` (default) sends
72
+ * every allowlisted schema directly; `ptc` presents only the Host's reserved
73
+ * `run_code` transport plus a generated SDK, so one model turn can orchestrate
74
+ * several nested tool calls whose intermediate results stay out of context.
75
+ * PTC changes presentation only: the allowlist, approvals, budget and output
76
+ * caps are unchanged. It requires a mounted `ctx.ptcRuntime` and fails closed
77
+ * when that runtime is absent.
78
+ */
79
+ toolPresentation?: 'native' | 'ptc';
80
+ /** Omit both to inherit the owner conversation; specify both for a fixed route. */
81
+ provider?: string;
82
+ model?: string;
83
+ /** Optional effort for an explicitly configured fixed route. */
84
+ reasoningEffort?: string;
85
+ /** Optional policy budget id; when unset no budget reservation is made. */
86
+ budgetId?: string;
87
+ /** Reserved amount in the owner-configured budget metric; required when budgetId is set. */
88
+ budgetAmount?: number;
89
+ /** Credential reference only; never a literal API key. */
90
+ apiKeyEnv?: string;
91
+ scope?: GrowthOwnerScopeConfig;
92
+ workflowOwnerAnchored?: WorkflowOwnerAnchoredConfig;
93
+ pluginSourceProposals?: PluginSourceProposalsConfig;
94
+ dreamingIdeas?: DreamingIdeasIntakeConfig;
95
+ associationCandidates?: AssociationCandidatesIntakeConfig;
96
+ /** One-time opt-in to durable reviews driven by actual trusted foreground results. */
97
+ usageLearning?: {
98
+ enabled?: boolean;
99
+ databasePath?: string;
100
+ maxPending?: number;
101
+ lookbackMs?: number;
102
+ workItemFailures?: boolean;
103
+ workItemAuthorities?: WorkItemGrowthAuthorityPins;
104
+ /** Separately pinned revision corridor for already-adopted capabilities. */
105
+ workItemRevisionAuthorities?: WorkItemRevisionAuthorityPins;
106
+ /** Native discovery scans need their own explicit automation-runs allocation. */
107
+ scanBudgetId?: string;
108
+ scanBudgetAmount?: number;
109
+ };
110
+ }
111
+ export interface NormalizedWorkflowOwnerAnchoredConfig {
112
+ readonly enabled: boolean;
113
+ readonly maxCommitsPerWake: number;
114
+ readonly lookbackMs: number;
115
+ }
116
+ export interface NormalizedPluginSourceProposalsConfig {
117
+ readonly enabled: boolean;
118
+ readonly allowCreation: boolean;
119
+ readonly allowModification: boolean;
120
+ readonly allowRevision: boolean;
121
+ readonly preparationMode: 'inline' | 'durable';
122
+ readonly repository: string | null;
123
+ readonly maxPlansPerWake: number;
124
+ readonly isolatedBuildTimeoutMs: number;
125
+ readonly offline: boolean;
126
+ readonly planTtlMs: number;
127
+ }
128
+ export interface DreamingIdeasIntakeConfig {
129
+ enabled?: boolean;
130
+ maxIdeasPerWake?: number;
131
+ }
132
+ export interface NormalizedDreamingIdeasIntakeConfig {
133
+ readonly enabled: boolean;
134
+ readonly maxIdeasPerWake: number;
135
+ }
136
+ export interface AssociationCandidatesIntakeConfig {
137
+ enabled?: boolean;
138
+ maxCandidatesPerWake?: number;
139
+ }
140
+ export interface NormalizedAssociationCandidatesIntakeConfig {
141
+ readonly enabled: boolean;
142
+ readonly maxCandidatesPerWake: number;
143
+ }
144
+ export interface NormalizedGrowthDriverConfig extends Required<Omit<AssistantGrowthDriverConfig, 'provider' | 'model' | 'reasoningEffort' | 'apiKeyEnv' | 'budgetId' | 'budgetAmount' | 'scope' | 'workflowOwnerAnchored' | 'pluginSourceProposals' | 'dreamingIdeas' | 'associationCandidates' | 'usageLearning' | 'toolPresentation'>> {
145
+ readonly toolPresentation: 'native' | 'ptc';
146
+ readonly provider: string | null;
147
+ readonly model: string | null;
148
+ readonly reasoningEffort: string | null;
149
+ readonly apiKeyEnv: string | null;
150
+ readonly budgetId: string | null;
151
+ readonly budgetAmount: number | null;
152
+ readonly scope: GrowthOwnerScopeConfig | null;
153
+ readonly workflowOwnerAnchored: NormalizedWorkflowOwnerAnchoredConfig;
154
+ readonly pluginSourceProposals: NormalizedPluginSourceProposalsConfig;
155
+ readonly dreamingIdeas: NormalizedDreamingIdeasIntakeConfig;
156
+ readonly associationCandidates: NormalizedAssociationCandidatesIntakeConfig;
157
+ readonly usageLearning: Readonly<{
158
+ enabled: boolean;
159
+ databasePath: string | null;
160
+ maxPending: number;
161
+ lookbackMs: number;
162
+ scanBudgetId: string | null;
163
+ scanBudgetAmount: number | null;
164
+ workItemFailures?: true;
165
+ workItemAuthorities?: WorkItemGrowthAuthorityPins;
166
+ workItemRevisionAuthorities?: WorkItemRevisionAuthorityPins;
167
+ }>;
168
+ }
169
+ export declare const Config: Schema<AssistantGrowthDriverConfig>;
170
+ export declare function normalizeConfig(input?: AssistantGrowthDriverConfig): Readonly<NormalizedGrowthDriverConfig>;
171
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,0BAA0B,CAAA;AAC7C,OAAO,EACL,KAAK,2BAA2B,EAAE,KAAK,6BAA6B,EAAE,MAAM,oCAAoC,CAAA;AAElH;;;;;;GAMG;AAEH,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,0FAA0F;IAC1F,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,iFAAiF;IACjF,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,2BAA2B;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,wFAAwF;IACxF,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,6EAA6E;IAC7E,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,mFAAmF;IACnF,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,2EAA2E;IAC3E,eAAe,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IACtC,mGAAmG;IACnG,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,gGAAgG;IAChG,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,0EA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