@ai-sdlc/orchestrator 0.5.0 → 0.9.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.
- package/dist/action-enforcement.d.ts +26 -0
- package/dist/action-enforcement.js +70 -0
- package/dist/admission-composite.d.ts +67 -0
- package/dist/admission-composite.js +158 -0
- package/dist/admission-enrichment.d.ts +142 -0
- package/dist/admission-enrichment.js +331 -0
- package/dist/admission-hc.d.ts +62 -0
- package/dist/admission-hc.js +83 -0
- package/dist/admission-score.d.ts +148 -0
- package/dist/admission-score.js +237 -0
- package/dist/analysis/analyzer.js +3 -2
- package/dist/analysis/convention-detector.d.ts +85 -2
- package/dist/analysis/convention-detector.js +375 -70
- package/dist/analysis/diff-analyzer.d.ts +33 -0
- package/dist/analysis/diff-analyzer.js +122 -0
- package/dist/analysis/hotspot-analyzer.js +3 -1
- package/dist/analysis/index.d.ts +2 -1
- package/dist/analysis/index.js +2 -1
- package/dist/artifacts/index.d.ts +65 -0
- package/dist/artifacts/index.js +142 -0
- package/dist/backlog-adapter.d.ts +121 -0
- package/dist/backlog-adapter.js +438 -0
- package/dist/calibration.d.ts +43 -0
- package/dist/calibration.js +76 -0
- package/dist/cli/commands/agents.d.ts +24 -0
- package/dist/cli/commands/agents.js +66 -1
- package/dist/cli/commands/git-remote.d.ts +49 -0
- package/dist/cli/commands/git-remote.js +91 -0
- package/dist/cli/commands/health.d.ts +4 -0
- package/dist/cli/commands/health.js +13 -1
- package/dist/cli/commands/init.d.ts +26 -0
- package/dist/cli/commands/init.js +164 -22
- package/dist/cli/commands/mcp-setup.d.ts +31 -0
- package/dist/cli/commands/mcp-setup.js +78 -8
- package/dist/cli/formatters/table.js +15 -2
- package/dist/cli/index.d.ts +14 -1
- package/dist/cli/index.js +81 -20
- package/dist/cli/versions.d.ts +57 -0
- package/dist/cli/versions.js +128 -0
- package/dist/code-area-classifier.d.ts +21 -0
- package/dist/code-area-classifier.js +48 -0
- package/dist/config.d.ts +33 -1
- package/dist/config.js +78 -8
- package/dist/cycle-utils.d.ts +51 -0
- package/dist/cycle-utils.js +77 -0
- package/dist/database/adapters/external.d.ts +24 -0
- package/dist/database/adapters/external.js +80 -0
- package/dist/database/adapters/neon.d.ts +41 -0
- package/dist/database/adapters/neon.js +98 -0
- package/dist/database/adapters/pg-snapshot-restore.d.ts +28 -0
- package/dist/database/adapters/pg-snapshot-restore.js +68 -0
- package/dist/database/adapters/sqlite-copy.d.ts +32 -0
- package/dist/database/adapters/sqlite-copy.js +145 -0
- package/dist/database/connection-injection.d.ts +35 -0
- package/dist/database/connection-injection.js +93 -0
- package/dist/database/index.d.ts +12 -0
- package/dist/database/index.js +23 -0
- package/dist/database/registry.d.ts +13 -0
- package/dist/database/registry.js +27 -0
- package/dist/database/topology.d.ts +52 -0
- package/dist/database/topology.js +44 -0
- package/dist/database/types.d.ts +89 -0
- package/dist/database/types.js +26 -0
- package/dist/defaults.d.ts +5 -0
- package/dist/defaults.js +5 -0
- package/dist/design-authority.d.ts +40 -0
- package/dist/design-authority.js +71 -0
- package/dist/design-lookahead.d.ts +64 -0
- package/dist/design-lookahead.js +86 -0
- package/dist/design-quality-trend.d.ts +87 -0
- package/dist/design-quality-trend.js +190 -0
- package/dist/design-system-context.d.ts +46 -0
- package/dist/design-system-context.js +80 -0
- package/dist/design-system-correction-loop.d.ts +64 -0
- package/dist/design-system-correction-loop.js +128 -0
- package/dist/design-system-metrics.d.ts +61 -0
- package/dist/design-system-metrics.js +104 -0
- package/dist/design-system-stewardship.d.ts +22 -0
- package/dist/design-system-stewardship.js +85 -0
- package/dist/design-system-validation.d.ts +37 -0
- package/dist/design-system-validation.js +88 -0
- package/dist/dispatch/index.d.ts +4 -0
- package/dist/dispatch/index.js +4 -0
- package/dist/dispatch/merge-gate.d.ts +46 -0
- package/dist/dispatch/merge-gate.js +90 -0
- package/dist/dispatch/requeue.d.ts +57 -0
- package/dist/dispatch/requeue.js +131 -0
- package/dist/dispatch/worker-pool.d.ts +62 -0
- package/dist/dispatch/worker-pool.js +60 -0
- package/dist/execute.d.ts +40 -0
- package/dist/execute.js +295 -30
- package/dist/fix-ci.js +40 -3
- package/dist/fix-review.d.ts +66 -0
- package/dist/fix-review.js +448 -0
- package/dist/harness/adapters/claude-code.d.ts +29 -0
- package/dist/harness/adapters/claude-code.js +191 -0
- package/dist/harness/adapters/codex.d.ts +25 -0
- package/dist/harness/adapters/codex.js +61 -0
- package/dist/harness/independence.d.ts +51 -0
- package/dist/harness/independence.js +67 -0
- package/dist/harness/index.d.ts +14 -0
- package/dist/harness/index.js +20 -0
- package/dist/harness/registry.d.ts +17 -0
- package/dist/harness/registry.js +31 -0
- package/dist/harness/types.d.ts +123 -0
- package/dist/harness/types.js +8 -0
- package/dist/harness/version-probe.d.ts +14 -0
- package/dist/harness/version-probe.js +123 -0
- package/dist/index.d.ts +39 -5
- package/dist/index.js +48 -3
- package/dist/models/classifier.d.ts +76 -0
- package/dist/models/classifier.js +221 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/dist/models/registry.d.ts +97 -0
- package/dist/models/registry.js +173 -0
- package/dist/pillar-breakdown.d.ts +63 -0
- package/dist/pillar-breakdown.js +153 -0
- package/dist/pipeline-cycle-detector.d.ts +70 -0
- package/dist/pipeline-cycle-detector.js +111 -0
- package/dist/priority.d.ts +7 -76
- package/dist/priority.js +18 -5
- package/dist/review-meta.d.ts +65 -0
- package/dist/review-meta.js +149 -0
- package/dist/review.d.ts +35 -0
- package/dist/review.js +84 -0
- package/dist/runners/claude-code-sdk.d.ts +31 -0
- package/dist/runners/claude-code-sdk.js +238 -0
- package/dist/runners/claude-code.d.ts +3 -0
- package/dist/runners/claude-code.js +319 -73
- package/dist/runners/codex.js +4 -1
- package/dist/runners/copilot.js +4 -1
- package/dist/runners/cursor.js +4 -1
- package/dist/runners/git-utils.d.ts +81 -0
- package/dist/runners/git-utils.js +201 -0
- package/dist/runners/index.d.ts +5 -1
- package/dist/runners/index.js +4 -0
- package/dist/runners/review-agent.d.ts +67 -0
- package/dist/runners/review-agent.js +350 -0
- package/dist/runners/runner-registry.js +10 -0
- package/dist/runners/sdk-review-runner.d.ts +65 -0
- package/dist/runners/sdk-review-runner.js +185 -0
- package/dist/runners/security-triage.d.ts +20 -4
- package/dist/runners/security-triage.js +42 -14
- package/dist/runners/types.d.ts +25 -0
- package/dist/runtime/attestations.d.ts +274 -0
- package/dist/runtime/attestations.js +460 -0
- package/dist/runtime/git-env.d.ts +53 -0
- package/dist/runtime/git-env.js +60 -0
- package/dist/runtime/index.d.ts +7 -0
- package/dist/runtime/index.js +7 -0
- package/dist/runtime/parallelism-flag.d.ts +10 -0
- package/dist/runtime/parallelism-flag.js +18 -0
- package/dist/runtime/port-allocator.d.ts +21 -0
- package/dist/runtime/port-allocator.js +66 -0
- package/dist/runtime/worktree-pool.d.ts +86 -0
- package/dist/runtime/worktree-pool.js +204 -0
- package/dist/runtime/worktree.d.ts +25 -0
- package/dist/runtime/worktree.js +111 -0
- package/dist/sa-scoring/auto-calibrate.d.ts +69 -0
- package/dist/sa-scoring/auto-calibrate.js +107 -0
- package/dist/sa-scoring/c1-sa2-computable.d.ts +42 -0
- package/dist/sa-scoring/c1-sa2-computable.js +59 -0
- package/dist/sa-scoring/composite.d.ts +107 -0
- package/dist/sa-scoring/composite.js +139 -0
- package/dist/sa-scoring/depparse-client.d.ts +79 -0
- package/dist/sa-scoring/depparse-client.js +187 -0
- package/dist/sa-scoring/did-compiler.d.ts +122 -0
- package/dist/sa-scoring/did-compiler.js +286 -0
- package/dist/sa-scoring/drift-monitor.d.ts +84 -0
- package/dist/sa-scoring/drift-monitor.js +186 -0
- package/dist/sa-scoring/exemplar-bank.d.ts +78 -0
- package/dist/sa-scoring/exemplar-bank.js +154 -0
- package/dist/sa-scoring/feedback-store.d.ts +100 -0
- package/dist/sa-scoring/feedback-store.js +156 -0
- package/dist/sa-scoring/index.d.ts +71 -0
- package/dist/sa-scoring/index.js +158 -0
- package/dist/sa-scoring/layer1-deterministic.d.ts +115 -0
- package/dist/sa-scoring/layer1-deterministic.js +298 -0
- package/dist/sa-scoring/layer2-structural.d.ts +71 -0
- package/dist/sa-scoring/layer2-structural.js +151 -0
- package/dist/sa-scoring/layer3-llm.d.ts +86 -0
- package/dist/sa-scoring/layer3-llm.js +282 -0
- package/dist/sa-scoring/rescore-orchestrator.d.ts +52 -0
- package/dist/sa-scoring/rescore-orchestrator.js +47 -0
- package/dist/scheduling/burn-down.d.ts +27 -0
- package/dist/scheduling/burn-down.js +43 -0
- package/dist/scheduling/calibration.d.ts +42 -0
- package/dist/scheduling/calibration.js +150 -0
- package/dist/scheduling/index.d.ts +8 -0
- package/dist/scheduling/index.js +8 -0
- package/dist/scheduling/ledger.d.ts +59 -0
- package/dist/scheduling/ledger.js +216 -0
- package/dist/scheduling/off-peak.d.ts +27 -0
- package/dist/scheduling/off-peak.js +112 -0
- package/dist/scheduling/schedule-decision.d.ts +39 -0
- package/dist/scheduling/schedule-decision.js +89 -0
- package/dist/scheduling/tier-analysis.d.ts +47 -0
- package/dist/scheduling/tier-analysis.js +81 -0
- package/dist/scheduling/types.d.ts +140 -0
- package/dist/scheduling/types.js +11 -0
- package/dist/shared.d.ts +13 -0
- package/dist/shared.js +32 -0
- package/dist/state/index.d.ts +1 -1
- package/dist/state/schema.d.ts +6 -1
- package/dist/state/schema.js +276 -1
- package/dist/state/store.d.ts +71 -1
- package/dist/state/store.js +464 -7
- package/dist/state/types.d.ts +174 -0
- package/dist/types.d.ts +1 -1
- package/dist/validate-agent-output.js +4 -1
- package/dist/watch.js +6 -0
- package/dist/workflow-patterns/artifact-writer.d.ts +16 -0
- package/dist/workflow-patterns/artifact-writer.js +34 -0
- package/dist/workflow-patterns/classifiers.d.ts +10 -0
- package/dist/workflow-patterns/classifiers.js +72 -0
- package/dist/workflow-patterns/detector.d.ts +27 -0
- package/dist/workflow-patterns/detector.js +186 -0
- package/dist/workflow-patterns/index.d.ts +8 -0
- package/dist/workflow-patterns/index.js +7 -0
- package/dist/workflow-patterns/proposal-generator.d.ts +15 -0
- package/dist/workflow-patterns/proposal-generator.js +183 -0
- package/dist/workflow-patterns/telemetry-ingest.d.ts +27 -0
- package/dist/workflow-patterns/telemetry-ingest.js +103 -0
- package/dist/workflow-patterns/types.d.ts +61 -0
- package/dist/workflow-patterns/types.js +11 -0
- package/package.json +2 -2
package/dist/state/types.d.ts
CHANGED
|
@@ -113,11 +113,16 @@ export interface CostLedgerEntry {
|
|
|
113
113
|
runId: string;
|
|
114
114
|
agentName: string;
|
|
115
115
|
pipelineType: string;
|
|
116
|
+
/** Resolved physical model ID (e.g., 'claude-sonnet-4-6'). RFC-0010 §11.4. */
|
|
116
117
|
model?: string;
|
|
118
|
+
/** Original alias used in pipeline YAML before resolution (e.g., 'sonnet'). RFC-0010 §11.4. */
|
|
119
|
+
modelAlias?: string;
|
|
117
120
|
inputTokens?: number;
|
|
118
121
|
outputTokens?: number;
|
|
119
122
|
totalTokens?: number;
|
|
120
123
|
costUsd?: number;
|
|
124
|
+
/** Informational shadow cost (what this work would have cost on pay-per-token); does NOT decrement costBudget. RFC-0010 §14.10. */
|
|
125
|
+
shadowCostUsd?: number;
|
|
121
126
|
issueId?: string;
|
|
122
127
|
issueNumber?: number;
|
|
123
128
|
prNumber?: number;
|
|
@@ -204,4 +209,173 @@ export interface AuditEntryRecord {
|
|
|
204
209
|
signature?: string;
|
|
205
210
|
createdAt?: string;
|
|
206
211
|
}
|
|
212
|
+
export interface ToolSequenceEvent {
|
|
213
|
+
id?: number;
|
|
214
|
+
sessionId: string;
|
|
215
|
+
toolName: string;
|
|
216
|
+
actionCanonical: string;
|
|
217
|
+
projectPath?: string;
|
|
218
|
+
timestamp: string;
|
|
219
|
+
ingestedAt?: string;
|
|
220
|
+
}
|
|
221
|
+
export interface WorkflowPattern {
|
|
222
|
+
id?: number;
|
|
223
|
+
patternHash: string;
|
|
224
|
+
patternType: string;
|
|
225
|
+
sequenceJson: string;
|
|
226
|
+
frequency: number;
|
|
227
|
+
sessionCount: number;
|
|
228
|
+
confidence: number;
|
|
229
|
+
firstSeen?: string;
|
|
230
|
+
lastSeen?: string;
|
|
231
|
+
status: string;
|
|
232
|
+
detectedAt?: string;
|
|
233
|
+
}
|
|
234
|
+
export interface PatternProposal {
|
|
235
|
+
id?: number;
|
|
236
|
+
patternId: number;
|
|
237
|
+
proposalType: string;
|
|
238
|
+
artifactType: string;
|
|
239
|
+
artifactPath?: string;
|
|
240
|
+
draftContent: string;
|
|
241
|
+
confidence: number;
|
|
242
|
+
status: string;
|
|
243
|
+
reviewedAt?: string;
|
|
244
|
+
reviewerReason?: string;
|
|
245
|
+
createdAt?: string;
|
|
246
|
+
}
|
|
247
|
+
export interface DesignTokenEventRecord {
|
|
248
|
+
id?: number;
|
|
249
|
+
bindingName: string;
|
|
250
|
+
eventType: 'changed' | 'deleted' | 'breaking';
|
|
251
|
+
tokensAffected?: number;
|
|
252
|
+
diffJson?: string;
|
|
253
|
+
actor?: string;
|
|
254
|
+
pipelineRunId?: string;
|
|
255
|
+
designReviewDecision?: string;
|
|
256
|
+
createdAt?: string;
|
|
257
|
+
}
|
|
258
|
+
export interface DesignReviewEventRecord {
|
|
259
|
+
id?: number;
|
|
260
|
+
bindingName: string;
|
|
261
|
+
prNumber?: number;
|
|
262
|
+
componentName?: string;
|
|
263
|
+
reviewer: string;
|
|
264
|
+
decision: 'approved' | 'rejected' | 'approved-with-comments';
|
|
265
|
+
categoriesJson?: string;
|
|
266
|
+
actionableNotes?: string;
|
|
267
|
+
createdAt?: string;
|
|
268
|
+
}
|
|
269
|
+
export interface TokenComplianceRecord {
|
|
270
|
+
id?: number;
|
|
271
|
+
bindingName: string;
|
|
272
|
+
coveragePercent: number;
|
|
273
|
+
violationsCount: number;
|
|
274
|
+
scannedAt?: string;
|
|
275
|
+
}
|
|
276
|
+
export interface VisualRegressionResultRecord {
|
|
277
|
+
id?: number;
|
|
278
|
+
bindingName: string;
|
|
279
|
+
storyName: string;
|
|
280
|
+
viewport?: number;
|
|
281
|
+
diffPercentage: number;
|
|
282
|
+
approved?: boolean;
|
|
283
|
+
approver?: string;
|
|
284
|
+
baselineUrl?: string;
|
|
285
|
+
currentUrl?: string;
|
|
286
|
+
createdAt?: string;
|
|
287
|
+
}
|
|
288
|
+
export interface UsabilitySimulationResultRecord {
|
|
289
|
+
id?: number;
|
|
290
|
+
bindingName: string;
|
|
291
|
+
storyName: string;
|
|
292
|
+
personaId?: string;
|
|
293
|
+
taskId?: string;
|
|
294
|
+
completed?: boolean;
|
|
295
|
+
actionsTaken?: number;
|
|
296
|
+
expectedActions?: number;
|
|
297
|
+
efficiency?: number;
|
|
298
|
+
findingsJson?: string;
|
|
299
|
+
createdAt?: string;
|
|
300
|
+
}
|
|
301
|
+
export interface DidCompiledArtifactRecord {
|
|
302
|
+
id?: number;
|
|
303
|
+
didName: string;
|
|
304
|
+
namespace?: string;
|
|
305
|
+
sourceHash: string;
|
|
306
|
+
scopeListsJson?: string;
|
|
307
|
+
constraintRulesJson?: string;
|
|
308
|
+
antiPatternListsJson?: string;
|
|
309
|
+
measurableSignalsJson?: string;
|
|
310
|
+
bm25CorpusBlob?: Buffer;
|
|
311
|
+
principleCorporaBlob?: Buffer;
|
|
312
|
+
compiledAt?: string;
|
|
313
|
+
}
|
|
314
|
+
export type SaDimension = 'SA-1' | 'SA-2';
|
|
315
|
+
export type SaPhase = '1' | '2a' | '2b' | '2c' | '3';
|
|
316
|
+
export interface DidScoringEventRecord {
|
|
317
|
+
id?: number;
|
|
318
|
+
didName: string;
|
|
319
|
+
issueNumber: number;
|
|
320
|
+
saDimension: SaDimension;
|
|
321
|
+
phase: SaPhase;
|
|
322
|
+
layer1ResultJson?: string;
|
|
323
|
+
layer2ResultJson?: string;
|
|
324
|
+
layer3ResultJson?: string;
|
|
325
|
+
compositeScore?: number;
|
|
326
|
+
phaseWeightsJson?: string;
|
|
327
|
+
createdAt?: string;
|
|
328
|
+
}
|
|
329
|
+
export type FeedbackSignal = 'accept' | 'dismiss' | 'escalate' | 'override';
|
|
330
|
+
export interface DidFeedbackEventRecord {
|
|
331
|
+
id?: number;
|
|
332
|
+
didName: string;
|
|
333
|
+
issueNumber: number;
|
|
334
|
+
dimension: SaDimension;
|
|
335
|
+
signal: FeedbackSignal;
|
|
336
|
+
principal?: string;
|
|
337
|
+
category?: string;
|
|
338
|
+
structuralScore?: number;
|
|
339
|
+
llmScore?: number;
|
|
340
|
+
compositeScore?: number;
|
|
341
|
+
notes?: string;
|
|
342
|
+
createdAt?: string;
|
|
343
|
+
}
|
|
344
|
+
export interface DesignChangeEventRecord {
|
|
345
|
+
id?: number;
|
|
346
|
+
didName: string;
|
|
347
|
+
changeId: string;
|
|
348
|
+
changeType: string;
|
|
349
|
+
status: string;
|
|
350
|
+
payloadJson: string;
|
|
351
|
+
emittedAt?: string;
|
|
352
|
+
}
|
|
353
|
+
export interface CodeAreaMetricsRecord {
|
|
354
|
+
id?: number;
|
|
355
|
+
codeArea: string;
|
|
356
|
+
defectDensity?: number;
|
|
357
|
+
churnRate?: number;
|
|
358
|
+
prRejectionRate?: number;
|
|
359
|
+
codeAcceptanceRate?: number;
|
|
360
|
+
hasFrontendComponents?: boolean;
|
|
361
|
+
designMetricsJson?: string;
|
|
362
|
+
dataPointCount?: number;
|
|
363
|
+
windowStart?: string;
|
|
364
|
+
windowEnd?: string;
|
|
365
|
+
computedAt?: string;
|
|
366
|
+
}
|
|
367
|
+
export interface DesignLookaheadNotificationRecord {
|
|
368
|
+
id?: number;
|
|
369
|
+
issueNumber: number;
|
|
370
|
+
firstNotifiedAt?: string;
|
|
371
|
+
lastNotifiedAt?: string;
|
|
372
|
+
pillarBreakdownJson?: string;
|
|
373
|
+
}
|
|
374
|
+
export interface SaPhaseWeightsRecord {
|
|
375
|
+
id?: number;
|
|
376
|
+
dimension: SaDimension;
|
|
377
|
+
wStructural: number;
|
|
378
|
+
wLlm: number;
|
|
379
|
+
calibratedAt?: string;
|
|
380
|
+
}
|
|
207
381
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Ensures all reference types are accessible through the orchestrator package
|
|
4
4
|
* for downstream consumers without direct reference dependency.
|
|
5
5
|
*/
|
|
6
|
-
export type { ApiVersion, Metadata, Condition, SecretRef, MetricCondition, Duration, Resource, TriggerFilter, Trigger, Provider, RoutingStrategy, ComplexityThreshold, Routing, Stage, PipelineSpec, PipelinePhase, PipelineStatus, Pipeline, AgentConstraints, HandoffContractRef, Handoff, SkillExample, Skill, AgentCard, AgentRoleSpec, AgentRoleStatus, AgentRole, GateScope, MetricRule, ToolRule, ReviewerRule, DocumentationRule, ProvenanceRule, ExpressionRule, GateRule, EnforcementLevel, Override, RetryPolicy, Evaluation, Gate, QualityGateSpec, QualityGateStatus, QualityGate, Permissions, ApprovalRequirement, Guardrails, MonitoringLevel, AutonomyLevel, PromotionCriteria, DemotionTrigger, AgentAutonomyStatus, AutonomyPolicySpec, AutonomyPolicyStatus, AutonomyPolicy, AdapterInterface, HealthCheck, AdapterBindingSpec, AdapterBindingStatus, AdapterBinding, AnyResource, ResourceKind, PriorityPolicy, PriorityDimensionConfig, PriorityDimensionsConfig, PriorityCalibrationConfig, PriorityAdaptersConfig, ValidationError, } from '@ai-sdlc/reference';
|
|
6
|
+
export type { ApiVersion, Metadata, Condition, SecretRef, MetricCondition, Duration, Resource, TriggerFilter, Trigger, Provider, RoutingStrategy, ComplexityThreshold, Routing, Stage, PipelineSpec, PipelinePhase, PipelineStatus, Pipeline, AgentConstraints, HandoffContractRef, Handoff, SkillExample, Skill, AgentCard, AgentRoleSpec, AgentRoleStatus, AgentRole, GateScope, MetricRule, ToolRule, ReviewerRule, DocumentationRule, ProvenanceRule, ExpressionRule, GateRule, EnforcementLevel, Override, RetryPolicy, Evaluation, Gate, QualityGateSpec, QualityGateStatus, QualityGate, Permissions, ApprovalRequirement, Guardrails, MonitoringLevel, AutonomyLevel, PromotionCriteria, DemotionTrigger, AgentAutonomyStatus, AutonomyPolicySpec, AutonomyPolicyStatus, AutonomyPolicy, AdapterInterface, HealthCheck, AdapterBindingSpec, AdapterBindingStatus, AdapterBinding, DesignToolAuthority, TokenFormat, TokenVersionPolicy, ConflictResolution, SyncDirection, OnTimeout, TokenPlatform, DesignReviewScope, DesignReviewAlwaysOn, DesignReviewCondition, AuthorityBlock, ChangeApproval, Stewardship, TokenSource, TokenSyncConfig, TokenConfig, CatalogSource, CatalogDiscovery, CatalogConfig, VisualRegressionProviderConfig, VisualRegressionConfig, HardcodedRule, CoverageThreshold, ComplianceConfig, DesignReviewTriggerCondition, DesignReviewTriggerConditions, DesignReviewConfig, DesignSystemBindingSpec, TokenSyncStatus, CatalogHealthStatus, TokenComplianceStatus, DesignReviewStatus, DesignSystemBindingStatus, DesignSystemBinding, AnyResource, ResourceKind, PriorityPolicy, PriorityDimensionConfig, PriorityDimensionsConfig, PriorityCalibrationConfig, PriorityAdaptersConfig, DesignSystemPermissions, DesignReviewRequirement, StageConstraints, ContextStrategy, ContextStrategyOverride, ComponentCreationPolicy, AgentDesignSystemConfig, DesignTokenComplianceRule, VisualRegressionRule, StoryCompletenessRule, DesignReviewDecision, DesignReviewFeedbackCategory, DesignReviewRating, DesignReviewFeedback, DesignReviewGateRule, ValidationError, } from '@ai-sdlc/reference';
|
|
7
7
|
export type { GateVerdict, DemotionResult, ComplexityFactor, AuthorizationContext, AuthorizationResult, AuthIdentity, AuthenticationResult, Authenticator, MutatingGateContext, ExpressionEvaluator, ExpressionVerdict, LLMEvaluationDimension, LLMEvaluationResult, LLMGateVerdict, } from '@ai-sdlc/reference';
|
|
8
8
|
export type { AgentExecutionState, HandoffValidationError, SchemaResolver, SchemaValidationError, MemoryTier, MemoryEntry, WorkingMemory, ShortTermMemory, LongTermMemory, SharedMemory, EpisodicMemory, } from '@ai-sdlc/reference';
|
|
9
9
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Pure validation module with no side effects (fully testable).
|
|
5
5
|
*/
|
|
6
6
|
import { execFile } from 'node:child_process';
|
|
7
|
+
import { cleanGitEnv } from './runtime/git-env.js';
|
|
7
8
|
/**
|
|
8
9
|
* Match a file path against a blocked-path pattern.
|
|
9
10
|
* Supports simple glob suffixes: `foo/**` matches anything under `foo/`.
|
|
@@ -52,8 +53,10 @@ export async function validateAgentOutput(ctx) {
|
|
|
52
53
|
}
|
|
53
54
|
// 3. Max lines per PR
|
|
54
55
|
if (ctx.guardrails.maxLinesPerPR !== undefined) {
|
|
56
|
+
// cleanGitEnv() prevents leaked GIT_DIR from binding this call to a
|
|
57
|
+
// parent process's git repo (AISDLC-72).
|
|
55
58
|
const stdout = await new Promise((resolve, reject) => {
|
|
56
|
-
execFile('git', ['diff', '--stat', 'HEAD~1'], { cwd: ctx.workDir }, (err, out) => {
|
|
59
|
+
execFile('git', ['diff', '--stat', 'HEAD~1'], { cwd: ctx.workDir, env: cleanGitEnv() }, (err, out) => {
|
|
57
60
|
if (err)
|
|
58
61
|
reject(err);
|
|
59
62
|
else
|
package/dist/watch.js
CHANGED
|
@@ -41,6 +41,12 @@ export function startWatch(options = {}) {
|
|
|
41
41
|
try {
|
|
42
42
|
await executePipeline(issueId, {
|
|
43
43
|
...options.executeOptions,
|
|
44
|
+
// Pass the dispatcher-selected pipeline so executePipeline doesn't
|
|
45
|
+
// re-load from disk and pick the wrong one in multi-pipeline configs
|
|
46
|
+
// (RFC-0010 dual workflow). Without this, an enqueued backlog
|
|
47
|
+
// pipeline silently downgrades to pipeline.yaml's branching/PR
|
|
48
|
+
// templates.
|
|
49
|
+
pipelineOverride: pipeline,
|
|
44
50
|
});
|
|
45
51
|
const result = { type: 'success' };
|
|
46
52
|
options.onReconcile?.(pipeline.metadata.name, result);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Artifact writer — generates files for approved pattern proposals.
|
|
3
|
+
* Never overwrites existing files.
|
|
4
|
+
*/
|
|
5
|
+
export interface WriteResult {
|
|
6
|
+
success: boolean;
|
|
7
|
+
filePath: string;
|
|
8
|
+
error?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Write a proposal artifact to the filesystem.
|
|
12
|
+
* Creates parent directories if needed.
|
|
13
|
+
* Returns error if file already exists (never overwrites).
|
|
14
|
+
*/
|
|
15
|
+
export declare function writeArtifact(projectDir: string, relativePath: string, content: string): WriteResult;
|
|
16
|
+
//# sourceMappingURL=artifact-writer.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Artifact writer — generates files for approved pattern proposals.
|
|
3
|
+
* Never overwrites existing files.
|
|
4
|
+
*/
|
|
5
|
+
import { writeFileSync, mkdirSync, existsSync } from 'node:fs';
|
|
6
|
+
import { join, dirname } from 'node:path';
|
|
7
|
+
/**
|
|
8
|
+
* Write a proposal artifact to the filesystem.
|
|
9
|
+
* Creates parent directories if needed.
|
|
10
|
+
* Returns error if file already exists (never overwrites).
|
|
11
|
+
*/
|
|
12
|
+
export function writeArtifact(projectDir, relativePath, content) {
|
|
13
|
+
const fullPath = join(projectDir, relativePath);
|
|
14
|
+
if (existsSync(fullPath)) {
|
|
15
|
+
return {
|
|
16
|
+
success: false,
|
|
17
|
+
filePath: fullPath,
|
|
18
|
+
error: `File already exists: ${relativePath}`,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
mkdirSync(dirname(fullPath), { recursive: true });
|
|
23
|
+
writeFileSync(fullPath, content, 'utf-8');
|
|
24
|
+
return { success: true, filePath: fullPath };
|
|
25
|
+
}
|
|
26
|
+
catch (err) {
|
|
27
|
+
return {
|
|
28
|
+
success: false,
|
|
29
|
+
filePath: fullPath,
|
|
30
|
+
error: err instanceof Error ? err.message : String(err),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=artifact-writer.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pattern type classifiers — refine detected patterns into
|
|
3
|
+
* specific automation types based on their structure.
|
|
4
|
+
*/
|
|
5
|
+
import type { DetectedPattern } from './types.js';
|
|
6
|
+
/**
|
|
7
|
+
* Classify a detected pattern into a specific type and suggest an artifact.
|
|
8
|
+
*/
|
|
9
|
+
export declare function classifyPattern(pattern: DetectedPattern): DetectedPattern;
|
|
10
|
+
//# sourceMappingURL=classifiers.d.ts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pattern type classifiers — refine detected patterns into
|
|
3
|
+
* specific automation types based on their structure.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Classify a detected pattern into a specific type and suggest an artifact.
|
|
7
|
+
*/
|
|
8
|
+
export function classifyPattern(pattern) {
|
|
9
|
+
// Check classifiers in priority order
|
|
10
|
+
if (isCopyPasteCycle(pattern.steps)) {
|
|
11
|
+
return {
|
|
12
|
+
...pattern,
|
|
13
|
+
patternType: 'copy-paste-cycle',
|
|
14
|
+
suggestedArtifactType: 'skill',
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
if (isPeriodicTask(pattern)) {
|
|
18
|
+
return {
|
|
19
|
+
...pattern,
|
|
20
|
+
patternType: 'periodic-task',
|
|
21
|
+
suggestedArtifactType: 'workflow',
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
// Default: command sequence
|
|
25
|
+
return {
|
|
26
|
+
...pattern,
|
|
27
|
+
patternType: 'command-sequence',
|
|
28
|
+
suggestedArtifactType: 'command',
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Copy-paste cycle: Read from one file, then Write/Edit a different file type.
|
|
33
|
+
* Suggests the user is copying boilerplate or scaffolding from templates.
|
|
34
|
+
*/
|
|
35
|
+
function isCopyPasteCycle(steps) {
|
|
36
|
+
let hasRead = false;
|
|
37
|
+
let hasWriteAfterRead = false;
|
|
38
|
+
for (const step of steps) {
|
|
39
|
+
if (step.category === 'read') {
|
|
40
|
+
hasRead = true;
|
|
41
|
+
}
|
|
42
|
+
else if (hasRead && step.category === 'write') {
|
|
43
|
+
hasWriteAfterRead = true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// Must have at least one read→write transition
|
|
47
|
+
if (!hasWriteAfterRead)
|
|
48
|
+
return false;
|
|
49
|
+
// The write should target a different file than the read
|
|
50
|
+
const readActions = steps.filter((s) => s.category === 'read').map((s) => s.action);
|
|
51
|
+
const writeActions = steps.filter((s) => s.category === 'write').map((s) => s.action);
|
|
52
|
+
// If reads and writes target different extensions, it's likely scaffolding
|
|
53
|
+
const readExts = new Set(readActions.map((a) => a.split(':').pop()));
|
|
54
|
+
const writeExts = new Set(writeActions.map((a) => a.split(':').pop()));
|
|
55
|
+
// Different file types or at least some diversity
|
|
56
|
+
const hasDistinctTargets = readExts.size > 0 && writeExts.size > 0 && ![...readExts].every((e) => writeExts.has(e));
|
|
57
|
+
return hasDistinctTargets || (readActions.length > 0 && writeActions.length > 1);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Periodic task: same pattern occurs with regular time spacing.
|
|
61
|
+
* Requires firstSeen and lastSeen spanning 7+ days.
|
|
62
|
+
*/
|
|
63
|
+
function isPeriodicTask(pattern) {
|
|
64
|
+
if (!pattern.firstSeen || !pattern.lastSeen)
|
|
65
|
+
return false;
|
|
66
|
+
const first = new Date(pattern.firstSeen).getTime();
|
|
67
|
+
const last = new Date(pattern.lastSeen).getTime();
|
|
68
|
+
const spanDays = (last - first) / (1000 * 60 * 60 * 24);
|
|
69
|
+
// Must span at least 7 days with regular occurrence
|
|
70
|
+
return spanDays >= 7 && pattern.sessionCount >= 3;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=classifiers.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow pattern detector — mines frequent n-gram sequences
|
|
3
|
+
* from tool call histories across Claude Code sessions.
|
|
4
|
+
*/
|
|
5
|
+
import type { ToolSequenceEvent } from '../state/types.js';
|
|
6
|
+
import type { CanonicalStep, NGram, DetectedPattern, DetectionOptions } from './types.js';
|
|
7
|
+
/**
|
|
8
|
+
* Convert a raw tool event to a canonical step.
|
|
9
|
+
*/
|
|
10
|
+
export declare function canonicalizeStep(event: ToolSequenceEvent): CanonicalStep;
|
|
11
|
+
/**
|
|
12
|
+
* Hash a sequence of canonical steps for grouping.
|
|
13
|
+
*/
|
|
14
|
+
export declare function hashSequence(steps: CanonicalStep[]): string;
|
|
15
|
+
/**
|
|
16
|
+
* Group tool sequence events by session, ordered by timestamp.
|
|
17
|
+
*/
|
|
18
|
+
export declare function extractSessionSequences(events: ToolSequenceEvent[]): Map<string, CanonicalStep[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Generate all contiguous n-grams from a sequence.
|
|
21
|
+
*/
|
|
22
|
+
export declare function generateNGrams(sequence: CanonicalStep[], sessionId: string, minN: number, maxN: number): NGram[];
|
|
23
|
+
/**
|
|
24
|
+
* Mine frequent patterns from tool sequence events.
|
|
25
|
+
*/
|
|
26
|
+
export declare function mineFrequentPatterns(events: ToolSequenceEvent[], opts?: Partial<DetectionOptions>): DetectedPattern[];
|
|
27
|
+
//# sourceMappingURL=detector.d.ts.map
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow pattern detector — mines frequent n-gram sequences
|
|
3
|
+
* from tool call histories across Claude Code sessions.
|
|
4
|
+
*/
|
|
5
|
+
import { createHash } from 'node:crypto';
|
|
6
|
+
import { categorizeAction } from './telemetry-ingest.js';
|
|
7
|
+
import { DEFAULT_DETECTION_OPTIONS } from './types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Convert a raw tool event to a canonical step.
|
|
10
|
+
*/
|
|
11
|
+
export function canonicalizeStep(event) {
|
|
12
|
+
return {
|
|
13
|
+
tool: event.toolName,
|
|
14
|
+
action: event.actionCanonical,
|
|
15
|
+
category: categorizeAction(event.toolName, event.actionCanonical),
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Hash a sequence of canonical steps for grouping.
|
|
20
|
+
*/
|
|
21
|
+
export function hashSequence(steps) {
|
|
22
|
+
const key = steps.map((s) => `${s.tool}:${s.action}`).join('|');
|
|
23
|
+
return createHash('sha256').update(key).digest('hex').slice(0, 16);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Group tool sequence events by session, ordered by timestamp.
|
|
27
|
+
*/
|
|
28
|
+
export function extractSessionSequences(events) {
|
|
29
|
+
const sessions = new Map();
|
|
30
|
+
for (const event of events) {
|
|
31
|
+
const existing = sessions.get(event.sessionId) ?? [];
|
|
32
|
+
existing.push(event);
|
|
33
|
+
sessions.set(event.sessionId, existing);
|
|
34
|
+
}
|
|
35
|
+
const result = new Map();
|
|
36
|
+
for (const [sessionId, sessionEvents] of sessions) {
|
|
37
|
+
const sorted = sessionEvents.sort((a, b) => new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime());
|
|
38
|
+
result.set(sessionId, sorted.map(canonicalizeStep));
|
|
39
|
+
}
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Generate all contiguous n-grams from a sequence.
|
|
44
|
+
*/
|
|
45
|
+
export function generateNGrams(sequence, sessionId, minN, maxN) {
|
|
46
|
+
const ngrams = [];
|
|
47
|
+
for (let n = minN; n <= Math.min(maxN, sequence.length); n++) {
|
|
48
|
+
for (let i = 0; i <= sequence.length - n; i++) {
|
|
49
|
+
const steps = sequence.slice(i, i + n);
|
|
50
|
+
ngrams.push({
|
|
51
|
+
steps,
|
|
52
|
+
hash: hashSequence(steps),
|
|
53
|
+
sessionId,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return ngrams;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Mine frequent patterns from tool sequence events.
|
|
61
|
+
*/
|
|
62
|
+
export function mineFrequentPatterns(events, opts) {
|
|
63
|
+
const options = { ...DEFAULT_DETECTION_OPTIONS, ...opts };
|
|
64
|
+
// Filter by project and time
|
|
65
|
+
let filtered = events;
|
|
66
|
+
if (options.projectFilter) {
|
|
67
|
+
filtered = filtered.filter((e) => e.projectPath === options.projectFilter);
|
|
68
|
+
}
|
|
69
|
+
if (options.since) {
|
|
70
|
+
const sinceDate = new Date(options.since).getTime();
|
|
71
|
+
filtered = filtered.filter((e) => new Date(e.timestamp).getTime() >= sinceDate);
|
|
72
|
+
}
|
|
73
|
+
if (filtered.length === 0)
|
|
74
|
+
return [];
|
|
75
|
+
// Group by session
|
|
76
|
+
const sessions = extractSessionSequences(filtered);
|
|
77
|
+
const totalSessions = sessions.size;
|
|
78
|
+
if (totalSessions < options.minSessionCount)
|
|
79
|
+
return [];
|
|
80
|
+
// Generate n-grams across all sessions
|
|
81
|
+
const aggregates = new Map();
|
|
82
|
+
for (const [sessionId, sequence] of sessions) {
|
|
83
|
+
const ngrams = generateNGrams(sequence, sessionId, options.minSequenceLength, options.maxSequenceLength);
|
|
84
|
+
// Deduplicate within a session (same hash counted once per session)
|
|
85
|
+
const seenInSession = new Set();
|
|
86
|
+
for (const ngram of ngrams) {
|
|
87
|
+
if (seenInSession.has(ngram.hash))
|
|
88
|
+
continue;
|
|
89
|
+
seenInSession.add(ngram.hash);
|
|
90
|
+
const existing = aggregates.get(ngram.hash);
|
|
91
|
+
if (existing) {
|
|
92
|
+
existing.frequency++;
|
|
93
|
+
existing.sessionIds.add(sessionId);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
aggregates.set(ngram.hash, {
|
|
97
|
+
steps: ngram.steps,
|
|
98
|
+
hash: ngram.hash,
|
|
99
|
+
frequency: 1,
|
|
100
|
+
sessionIds: new Set([sessionId]),
|
|
101
|
+
timestamps: [],
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
// Filter by minimum frequency and session count
|
|
107
|
+
let patterns = [];
|
|
108
|
+
for (const agg of aggregates.values()) {
|
|
109
|
+
if (agg.frequency >= options.minFrequency && agg.sessionIds.size >= options.minSessionCount) {
|
|
110
|
+
patterns.push(agg);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
// Compute confidence and find max frequency for normalization
|
|
114
|
+
const maxFrequency = Math.max(1, ...patterns.map((p) => p.frequency));
|
|
115
|
+
// Remove subsumed patterns (shorter patterns contained in longer ones with similar frequency)
|
|
116
|
+
patterns = removeSubsumedPatterns(patterns);
|
|
117
|
+
// Build detected patterns with confidence scoring
|
|
118
|
+
const detected = [];
|
|
119
|
+
for (const p of patterns) {
|
|
120
|
+
const confidence = Math.min(1.0, (p.sessionIds.size / totalSessions) * (p.frequency / maxFrequency));
|
|
121
|
+
if (confidence < options.minConfidence)
|
|
122
|
+
continue;
|
|
123
|
+
detected.push({
|
|
124
|
+
hash: p.hash,
|
|
125
|
+
steps: p.steps,
|
|
126
|
+
frequency: p.frequency,
|
|
127
|
+
sessionCount: p.sessionIds.size,
|
|
128
|
+
confidence,
|
|
129
|
+
patternType: 'command-sequence', // Default — classifiers refine this
|
|
130
|
+
suggestedArtifactType: 'command',
|
|
131
|
+
firstSeen: '', // Populated by caller from event timestamps
|
|
132
|
+
lastSeen: '',
|
|
133
|
+
exampleSessionIds: Array.from(p.sessionIds).slice(0, 5),
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
// Sort by confidence * length descending
|
|
137
|
+
detected.sort((a, b) => b.confidence * b.steps.length - a.confidence * a.steps.length);
|
|
138
|
+
return detected;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Remove patterns that are subsumed by longer patterns with similar frequency.
|
|
142
|
+
* A 3-gram is subsumed by a 5-gram if the 3-gram's steps appear contiguously
|
|
143
|
+
* in the 5-gram and the 5-gram has >= 70% of the 3-gram's frequency.
|
|
144
|
+
*/
|
|
145
|
+
function removeSubsumedPatterns(patterns) {
|
|
146
|
+
// Sort by length descending so longer patterns take priority
|
|
147
|
+
const sorted = [...patterns].sort((a, b) => b.steps.length - a.steps.length);
|
|
148
|
+
const kept = [];
|
|
149
|
+
const removed = new Set();
|
|
150
|
+
for (const pattern of sorted) {
|
|
151
|
+
if (removed.has(pattern.hash))
|
|
152
|
+
continue;
|
|
153
|
+
kept.push(pattern);
|
|
154
|
+
// Mark shorter patterns that are subsumed
|
|
155
|
+
for (const other of sorted) {
|
|
156
|
+
if (other.hash === pattern.hash || removed.has(other.hash))
|
|
157
|
+
continue;
|
|
158
|
+
if (other.steps.length >= pattern.steps.length)
|
|
159
|
+
continue;
|
|
160
|
+
if (isSubsequence(other.steps, pattern.steps) && pattern.frequency >= other.frequency * 0.7) {
|
|
161
|
+
removed.add(other.hash);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return kept;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Check if `short` appears as a contiguous subsequence in `long`.
|
|
169
|
+
*/
|
|
170
|
+
function isSubsequence(short, long) {
|
|
171
|
+
if (short.length > long.length)
|
|
172
|
+
return false;
|
|
173
|
+
for (let i = 0; i <= long.length - short.length; i++) {
|
|
174
|
+
let match = true;
|
|
175
|
+
for (let j = 0; j < short.length; j++) {
|
|
176
|
+
if (short[j].tool !== long[i + j].tool || short[j].action !== long[i + j].action) {
|
|
177
|
+
match = false;
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
if (match)
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=detector.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { readToolSequenceJSONL, readSessionMetaFiles, sessionMetaToEvents, categorizeAction, } from './telemetry-ingest.js';
|
|
2
|
+
export { canonicalizeStep, hashSequence, extractSessionSequences, generateNGrams, mineFrequentPatterns, } from './detector.js';
|
|
3
|
+
export { classifyPattern } from './classifiers.js';
|
|
4
|
+
export { generateProposal, generateName } from './proposal-generator.js';
|
|
5
|
+
export { writeArtifact, type WriteResult } from './artifact-writer.js';
|
|
6
|
+
export type { CanonicalStep, NGram, DetectedPattern, DetectionOptions, RawToolSequenceEntry, SessionMeta, } from './types.js';
|
|
7
|
+
export { DEFAULT_DETECTION_OPTIONS } from './types.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { readToolSequenceJSONL, readSessionMetaFiles, sessionMetaToEvents, categorizeAction, } from './telemetry-ingest.js';
|
|
2
|
+
export { canonicalizeStep, hashSequence, extractSessionSequences, generateNGrams, mineFrequentPatterns, } from './detector.js';
|
|
3
|
+
export { classifyPattern } from './classifiers.js';
|
|
4
|
+
export { generateProposal, generateName } from './proposal-generator.js';
|
|
5
|
+
export { writeArtifact } from './artifact-writer.js';
|
|
6
|
+
export { DEFAULT_DETECTION_OPTIONS } from './types.js';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Proposal generator — creates draft automation artifacts from detected patterns.
|
|
3
|
+
* Each pattern type maps to a specific artifact: command, skill, hook, or workflow.
|
|
4
|
+
*/
|
|
5
|
+
import type { DetectedPattern } from './types.js';
|
|
6
|
+
import type { PatternProposal } from '../state/types.js';
|
|
7
|
+
/**
|
|
8
|
+
* Generate an automation proposal from a detected pattern.
|
|
9
|
+
*/
|
|
10
|
+
export declare function generateProposal(pattern: DetectedPattern): Omit<PatternProposal, 'patternId'>;
|
|
11
|
+
/**
|
|
12
|
+
* Generate a kebab-case name from the pattern's steps.
|
|
13
|
+
*/
|
|
14
|
+
export declare function generateName(pattern: DetectedPattern): string;
|
|
15
|
+
//# sourceMappingURL=proposal-generator.d.ts.map
|