@evomap/evolver-core 2.0.0-beta.5 → 2.0.0-beta.7
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/algo/conversationSniffer.js +6 -2
- package/dist/events/ingest.js +7 -0
- package/dist/events/paths.d.ts +9 -9
- package/dist/events/paths.js +18 -18
- package/dist/exec/claudeBridge.d.ts +15 -2
- package/dist/exec/claudeBridge.js +322 -36
- package/dist/exec/openPrRegistry.d.ts +8 -2
- package/dist/exec/openPrRegistry.js +32 -22
- package/dist/exec/runnerRegistry.d.ts +26 -0
- package/dist/exec/runnerRegistry.js +305 -47
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/issueReporter/index.d.ts +156 -0
- package/dist/issueReporter/index.js +1688 -0
- package/dist/personality/schema.d.ts +12 -12
- package/dist/util/fetchPort.d.ts +1 -0
- package/dist/util/fetchPort.js +11 -0
- package/dist/util/fileLock.d.ts +5 -3
- package/dist/util/fileLock.js +131 -50
- package/dist/util/index.d.ts +1 -0
- package/dist/util/index.js +1 -0
- package/dist/workflow/dsl.d.ts +24 -3
- package/dist/workflow/dsl.js +4 -0
- package/dist/workflow/engine.d.ts +5 -1
- package/dist/workflow/engine.js +3 -0
- package/dist/workflow/index.d.ts +3 -1
- package/dist/workflow/index.js +3 -1
- package/dist/workflow/runtime.d.ts +110 -0
- package/dist/workflow/runtime.js +1298 -0
- package/dist/workflow/stateStore.d.ts +172 -0
- package/dist/workflow/stateStore.js +1044 -0
- package/package.json +1 -1
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { type EnvFingerprint } from '../bootstrap/envFingerprint.js';
|
|
2
|
+
export type IssueReportSource = 'cycle_failure' | 'doctor' | 'review' | 'event';
|
|
3
|
+
export type IssueDraftStatus = 'draft' | 'rejected' | 'submitted';
|
|
4
|
+
export declare function isIssueReportSource(value: unknown): value is IssueReportSource;
|
|
5
|
+
export interface IssueReportInput {
|
|
6
|
+
source: IssueReportSource;
|
|
7
|
+
errorClass: string;
|
|
8
|
+
cycleIds?: readonly string[];
|
|
9
|
+
eventIds?: readonly string[];
|
|
10
|
+
traceIds?: readonly string[];
|
|
11
|
+
reproductionSteps?: readonly string[];
|
|
12
|
+
diagnosticCodes?: readonly string[];
|
|
13
|
+
failureClass?: string;
|
|
14
|
+
version?: string;
|
|
15
|
+
platform?: string;
|
|
16
|
+
arch?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface IssueDraft {
|
|
19
|
+
schemaVersion: 1;
|
|
20
|
+
fingerprint: string;
|
|
21
|
+
status: IssueDraftStatus;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
title: string;
|
|
25
|
+
body: string;
|
|
26
|
+
source: IssueReportSource;
|
|
27
|
+
errorClass: string;
|
|
28
|
+
cycleIds: string[];
|
|
29
|
+
eventIds: string[];
|
|
30
|
+
traceRefs: string[];
|
|
31
|
+
github?: {
|
|
32
|
+
issueNumber: number;
|
|
33
|
+
url: string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export interface IssueReporterOptions {
|
|
37
|
+
rootDir: string;
|
|
38
|
+
workspaceScope?: string;
|
|
39
|
+
now?: () => Date;
|
|
40
|
+
env?: Record<string, string | undefined>;
|
|
41
|
+
envFingerprint?: Partial<EnvFingerprint>;
|
|
42
|
+
dedupWindowMs?: number;
|
|
43
|
+
rateLimitWindowMs?: number;
|
|
44
|
+
maxSubmissionsPerWindow?: number;
|
|
45
|
+
logger?: (entry: IssueReporterLogEntry) => void;
|
|
46
|
+
}
|
|
47
|
+
export interface IssueReporterLogEntry {
|
|
48
|
+
fingerprint: string;
|
|
49
|
+
status: 'draft_created' | 'duplicate' | 'rejected' | 'submitted' | 'submission_failed' | 'rate_limited';
|
|
50
|
+
errorClass?: 'approval_required' | 'rate_limited' | 'transport_error' | 'invalid_response' | 'unsafe_draft' | 'local_finalize_error' | 'quota_persistence_error';
|
|
51
|
+
}
|
|
52
|
+
export interface GithubIssueTransport {
|
|
53
|
+
listOpenIssues(input: {
|
|
54
|
+
repo: string;
|
|
55
|
+
page: number;
|
|
56
|
+
perPage: number;
|
|
57
|
+
}): Promise<{
|
|
58
|
+
issues: Array<{
|
|
59
|
+
number: number;
|
|
60
|
+
url: string;
|
|
61
|
+
body: string;
|
|
62
|
+
isPullRequest: boolean;
|
|
63
|
+
}>;
|
|
64
|
+
hasNextPage: boolean;
|
|
65
|
+
}>;
|
|
66
|
+
createIssue(input: {
|
|
67
|
+
repo: string;
|
|
68
|
+
title: string;
|
|
69
|
+
body: string;
|
|
70
|
+
}): Promise<{
|
|
71
|
+
number: number;
|
|
72
|
+
url: string;
|
|
73
|
+
}>;
|
|
74
|
+
}
|
|
75
|
+
export declare class GithubIssueTransportError extends Error {
|
|
76
|
+
readonly outcome: 'not_created' | 'ambiguous';
|
|
77
|
+
constructor(outcome: 'not_created' | 'ambiguous');
|
|
78
|
+
}
|
|
79
|
+
export interface SubmitIssueOptions {
|
|
80
|
+
repo: string;
|
|
81
|
+
approved: boolean;
|
|
82
|
+
approvalSource?: 'human' | 'operator_policy';
|
|
83
|
+
transport: GithubIssueTransport;
|
|
84
|
+
}
|
|
85
|
+
export type DraftResult = {
|
|
86
|
+
status: 'created';
|
|
87
|
+
draft: IssueDraft;
|
|
88
|
+
} | {
|
|
89
|
+
status: 'duplicate';
|
|
90
|
+
draft: IssueDraft;
|
|
91
|
+
};
|
|
92
|
+
export type SubmitResult = {
|
|
93
|
+
status: 'submitted';
|
|
94
|
+
draft: IssueDraft;
|
|
95
|
+
errorClass?: 'local_finalize_error' | 'quota_persistence_error';
|
|
96
|
+
} | {
|
|
97
|
+
status: 'already_submitted';
|
|
98
|
+
draft: IssueDraft;
|
|
99
|
+
} | {
|
|
100
|
+
status: 'approval_required';
|
|
101
|
+
draft: IssueDraft;
|
|
102
|
+
} | {
|
|
103
|
+
status: 'rejected';
|
|
104
|
+
draft: IssueDraft;
|
|
105
|
+
} | {
|
|
106
|
+
status: 'rate_limited';
|
|
107
|
+
draft: IssueDraft;
|
|
108
|
+
errorClass?: 'issue_report_submission_in_flight' | 'issue_report_submission_ambiguous';
|
|
109
|
+
} | {
|
|
110
|
+
status: 'failed';
|
|
111
|
+
draft: IssueDraft;
|
|
112
|
+
errorClass: 'transport_error' | 'invalid_response' | 'unsafe_draft' | 'local_finalize_error';
|
|
113
|
+
};
|
|
114
|
+
export type IssueDraftConflictErrorClass = 'issue_report_submission_in_flight' | 'issue_report_submission_ambiguous';
|
|
115
|
+
export declare class IssueDraftConflictError extends Error {
|
|
116
|
+
readonly errorClass: IssueDraftConflictErrorClass;
|
|
117
|
+
constructor(errorClass: IssueDraftConflictErrorClass);
|
|
118
|
+
}
|
|
119
|
+
export declare function createIssueDraft(input: IssueReportInput, options: IssueReporterOptions): DraftResult;
|
|
120
|
+
export declare function rejectIssueDraft(draft: IssueDraft, options: IssueReporterOptions): IssueDraft;
|
|
121
|
+
export declare function submitIssueDraft(draft: IssueDraft, submit: SubmitIssueOptions, options: IssueReporterOptions): Promise<SubmitResult>;
|
|
122
|
+
export type IssueDraftLookupResult = {
|
|
123
|
+
status: 'found';
|
|
124
|
+
draft: IssueDraft;
|
|
125
|
+
} | {
|
|
126
|
+
status: 'missing' | 'invalid';
|
|
127
|
+
};
|
|
128
|
+
export declare function lookupIssueDraft(rootDir: string, fingerprint: string): IssueDraftLookupResult;
|
|
129
|
+
export declare function loadIssueDraft(rootDir: string, fingerprint: string): IssueDraft | null;
|
|
130
|
+
export type IssueSubmissionResolution = {
|
|
131
|
+
outcome: 'not_created' | 'abandoned';
|
|
132
|
+
} | {
|
|
133
|
+
outcome: 'submitted';
|
|
134
|
+
issueNumber: number;
|
|
135
|
+
url: string;
|
|
136
|
+
repo: string;
|
|
137
|
+
};
|
|
138
|
+
export declare function resolveIssueSubmission(fingerprint: string, resolution: IssueSubmissionResolution, options: IssueReporterOptions): IssueDraft;
|
|
139
|
+
export interface IssueReportEvent {
|
|
140
|
+
type: string;
|
|
141
|
+
eventId?: string;
|
|
142
|
+
payload?: Record<string, unknown>;
|
|
143
|
+
}
|
|
144
|
+
export interface IssueReportDoctorCheck {
|
|
145
|
+
name: string;
|
|
146
|
+
status: 'pass' | 'warn' | 'fail';
|
|
147
|
+
}
|
|
148
|
+
export interface IssueReportReviewRecord {
|
|
149
|
+
assetId: string;
|
|
150
|
+
state: 'quarantined' | 'approved' | 'rejected';
|
|
151
|
+
}
|
|
152
|
+
export declare function issueReportInputFromCycle(events: readonly IssueReportEvent[], cycleId: string): IssueReportInput | null;
|
|
153
|
+
export declare function issueReportInputFromDoctor(checks: readonly IssueReportDoctorCheck[]): IssueReportInput | null;
|
|
154
|
+
export declare function issueReportInputFromReview(record: IssueReportReviewRecord): IssueReportInput | null;
|
|
155
|
+
export declare function issueReportInputFromEvent(event: IssueReportEvent): IssueReportInput | null;
|
|
156
|
+
export declare function createIssueDraftForEventBestEffort(event: IssueReportEvent, options: IssueReporterOptions): DraftResult | null;
|