@agentic-sdlc-kit/contracts 0.9.1 → 1.1.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/agent/events.d.ts +18 -18
- package/dist/agent/execution.d.ts +22 -22
- package/dist/agent-tools/index.d.ts +85 -0
- package/dist/agent-tools/index.d.ts.map +1 -0
- package/dist/agent-tools/index.js +60 -0
- package/dist/agent-tools/index.js.map +1 -0
- package/dist/application/application-context.d.ts +194 -60
- package/dist/application/application-context.d.ts.map +1 -1
- package/dist/application/application-persistence.d.ts +276 -114
- package/dist/application/application-persistence.d.ts.map +1 -1
- package/dist/application/application-state.d.ts +18 -18
- package/dist/architecture/api-contract.d.ts +18 -18
- package/dist/architecture/architecture-options.d.ts +6 -6
- package/dist/architecture/component-map.d.ts +6 -6
- package/dist/architecture/data-model.d.ts +6 -6
- package/dist/architecture/operational-design.d.ts +6 -6
- package/dist/benchmark/bench.d.ts +330 -0
- package/dist/benchmark/bench.d.ts.map +1 -0
- package/dist/benchmark/bench.js +69 -0
- package/dist/benchmark/bench.js.map +1 -0
- package/dist/benchmark/index.d.ts +2 -0
- package/dist/benchmark/index.d.ts.map +1 -0
- package/dist/benchmark/index.js +2 -0
- package/dist/benchmark/index.js.map +1 -0
- package/dist/constitution/cli-output.d.ts +706 -0
- package/dist/constitution/cli-output.d.ts.map +1 -0
- package/dist/constitution/cli-output.js +37 -0
- package/dist/constitution/cli-output.js.map +1 -0
- package/dist/constitution/index.d.ts +4 -0
- package/dist/constitution/index.d.ts.map +1 -0
- package/dist/constitution/index.js +4 -0
- package/dist/constitution/index.js.map +1 -0
- package/dist/constitution/result.d.ts +112 -0
- package/dist/constitution/result.d.ts.map +1 -0
- package/dist/constitution/result.js +67 -0
- package/dist/constitution/result.js.map +1 -0
- package/dist/constitution/rule.d.ts +488 -0
- package/dist/constitution/rule.d.ts.map +1 -0
- package/dist/constitution/rule.js +164 -0
- package/dist/constitution/rule.js.map +1 -0
- package/dist/context/index.d.ts +2 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +2 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/project-context.d.ts +275 -0
- package/dist/context/project-context.d.ts.map +1 -0
- package/dist/context/project-context.js +56 -0
- package/dist/context/project-context.js.map +1 -0
- package/dist/evaluation/benchmark.d.ts +12 -12
- package/dist/evaluation/metrics.d.ts +4 -4
- package/dist/evolution/improvement-hypothesis.d.ts +10 -10
- package/dist/execution/execution-profile.d.ts +130 -0
- package/dist/execution/execution-profile.d.ts.map +1 -0
- package/dist/execution/execution-profile.js +44 -0
- package/dist/execution/execution-profile.js.map +1 -0
- package/dist/execution/index.d.ts +2 -0
- package/dist/execution/index.d.ts.map +1 -0
- package/dist/execution/index.js +2 -0
- package/dist/execution/index.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/installer/install-plan.d.ts +16 -16
- package/dist/installer/ownership-manifest.d.ts +2 -2
- package/dist/installer/package-manifest.d.ts +6 -6
- package/dist/learning/engineering-lesson.d.ts +14 -14
- package/dist/learning/engineering-memory.d.ts +20 -2
- package/dist/learning/engineering-memory.d.ts.map +1 -1
- package/dist/learning/engineering-memory.js +2 -0
- package/dist/learning/engineering-memory.js.map +1 -1
- package/dist/learning/experience-episode.d.ts +14 -14
- package/dist/learning/experience.d.ts +8 -8
- package/dist/learning/index.d.ts +1 -0
- package/dist/learning/index.d.ts.map +1 -1
- package/dist/learning/index.js +1 -0
- package/dist/learning/index.js.map +1 -1
- package/dist/learning/learning-event.d.ts +78 -0
- package/dist/learning/learning-event.d.ts.map +1 -0
- package/dist/learning/learning-event.js +37 -0
- package/dist/learning/learning-event.js.map +1 -0
- package/dist/learning/memory.d.ts +2 -2
- package/dist/maintenance/bug-fix-workflow.d.ts +4 -4
- package/dist/maintenance/bug-report.d.ts +6 -6
- package/dist/maintenance/refactor-contract.d.ts +8 -8
- package/dist/maintenance/refactor-workflow.d.ts +4 -4
- package/dist/observer/event-schema.d.ts +6 -6
- package/dist/observer/journal.d.ts +10 -10
- package/dist/observer/journal.d.ts.map +1 -1
- package/dist/observer/journal.js +7 -0
- package/dist/observer/journal.js.map +1 -1
- package/dist/observer/run-summary.d.ts +12 -12
- package/dist/onboard/index.d.ts +2 -0
- package/dist/onboard/index.d.ts.map +1 -0
- package/dist/onboard/index.js +2 -0
- package/dist/onboard/index.js.map +1 -0
- package/dist/onboard/onboard-report.d.ts +349 -0
- package/dist/onboard/onboard-report.d.ts.map +1 -0
- package/dist/onboard/onboard-report.js +96 -0
- package/dist/onboard/onboard-report.js.map +1 -0
- package/dist/patterns/pattern.d.ts +2 -2
- package/dist/planning/task.d.ts +36 -36
- package/dist/policy/policy.d.ts +8 -8
- package/dist/product/product-brief.d.ts +6 -6
- package/dist/product/requirements.d.ts +48 -48
- package/dist/project/project-profile.d.ts +113 -2
- package/dist/project/project-profile.d.ts.map +1 -1
- package/dist/project/project-profile.js +17 -2
- package/dist/project/project-profile.js.map +1 -1
- package/dist/routing/index.d.ts +1 -0
- package/dist/routing/index.d.ts.map +1 -1
- package/dist/routing/index.js +1 -0
- package/dist/routing/index.js.map +1 -1
- package/dist/routing/measured-routing.d.ts +41 -0
- package/dist/routing/measured-routing.d.ts.map +1 -0
- package/dist/routing/measured-routing.js +24 -0
- package/dist/routing/measured-routing.js.map +1 -0
- package/dist/routing/routing-policy.d.ts +20 -20
- package/dist/routing/routing-request.d.ts +2 -2
- package/dist/runtime-guard/action-classification.d.ts +2 -2
- package/dist/runtime-guard/audit-event.d.ts +8 -8
- package/dist/runtime-guard/policy-schema.d.ts +4 -4
- package/dist/scaffolding/scaffold-contract.d.ts +59 -59
- package/dist/scaffolding/template-manifest.d.ts +15 -15
- package/dist/secret-guard/detection-rule.d.ts +4 -4
- package/dist/secret-guard/finding.d.ts +10 -10
- package/dist/secret-guard/scanner-failure.d.ts +4 -4
- package/dist/specification/specification.d.ts +8 -8
- package/dist/stack-pack/manifest.d.ts +33 -4
- package/dist/stack-pack/manifest.d.ts.map +1 -1
- package/dist/stack-pack/manifest.js +22 -2
- package/dist/stack-pack/manifest.js.map +1 -1
- package/dist/verification/index.d.ts +1 -0
- package/dist/verification/index.d.ts.map +1 -1
- package/dist/verification/index.js +1 -0
- package/dist/verification/index.js.map +1 -1
- package/dist/verification/report.d.ts +118 -12
- package/dist/verification/report.d.ts.map +1 -1
- package/dist/verification/report.js +4 -0
- package/dist/verification/report.js.map +1 -1
- package/dist/verification/strength.d.ts +270 -0
- package/dist/verification/strength.d.ts.map +1 -0
- package/dist/verification/strength.js +168 -0
- package/dist/verification/strength.js.map +1 -0
- package/dist/workflow/next-action.d.ts +67 -6
- package/dist/workflow/next-action.d.ts.map +1 -1
- package/dist/workflow/next-action.js +23 -0
- package/dist/workflow/next-action.js.map +1 -1
- package/dist/workflow/workflow.d.ts +9 -8
- package/dist/workflow/workflow.d.ts.map +1 -1
- package/package.json +6 -1
- package/src/agent-tools/index.ts +81 -0
- package/src/benchmark/bench.ts +83 -0
- package/src/benchmark/index.ts +1 -0
- package/src/constitution/cli-output.ts +44 -0
- package/src/constitution/index.ts +3 -0
- package/src/constitution/result.test.ts +69 -0
- package/src/constitution/result.ts +74 -0
- package/src/constitution/rule-origin.test.ts +36 -0
- package/src/constitution/rule-path.test.ts +15 -0
- package/src/constitution/rule.test.ts +209 -0
- package/src/constitution/rule.ts +192 -0
- package/src/context/index.ts +1 -0
- package/src/context/project-context.ts +63 -0
- package/src/execution/execution-profile.ts +50 -0
- package/src/execution/index.ts +1 -0
- package/src/index.ts +16 -0
- package/src/learning/engineering-memory.ts +2 -0
- package/src/learning/index.ts +1 -0
- package/src/learning/learning-event.ts +42 -0
- package/src/observer/journal.ts +7 -0
- package/src/onboard/index.ts +1 -0
- package/src/onboard/onboard-report.test.ts +92 -0
- package/src/onboard/onboard-report.ts +115 -0
- package/src/project/project-profile.ts +19 -2
- package/src/routing/index.ts +1 -0
- package/src/routing/measured-routing.ts +27 -0
- package/src/stack-pack/manifest.test.ts +45 -0
- package/src/stack-pack/manifest.ts +24 -2
- package/src/verification/index.ts +1 -0
- package/src/verification/report.ts +4 -0
- package/src/verification/strength.test.ts +160 -0
- package/src/verification/strength.ts +189 -0
- package/src/workflow/next-action.test.ts +25 -0
- package/src/workflow/next-action.ts +25 -0
- package/src/workflow/workflow.ts +1 -0
package/dist/agent/events.d.ts
CHANGED
|
@@ -14,19 +14,19 @@ export declare const AgentExecutionEventSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
15
|
type: "execution.started";
|
|
16
16
|
schemaVersion: 2;
|
|
17
|
+
occurredAt: string;
|
|
17
18
|
eventId: string;
|
|
18
19
|
executionId: string;
|
|
19
20
|
sequence: number;
|
|
20
21
|
policyHash: string;
|
|
21
|
-
occurredAt: string;
|
|
22
22
|
}, {
|
|
23
23
|
type: "execution.started";
|
|
24
24
|
schemaVersion: 2;
|
|
25
|
+
occurredAt: string;
|
|
25
26
|
eventId: string;
|
|
26
27
|
executionId: string;
|
|
27
28
|
sequence: number;
|
|
28
29
|
policyHash: string;
|
|
29
|
-
occurredAt: string;
|
|
30
30
|
}>, z.ZodObject<{
|
|
31
31
|
schemaVersion: z.ZodLiteral<2>;
|
|
32
32
|
eventId: z.ZodString;
|
|
@@ -40,21 +40,21 @@ export declare const AgentExecutionEventSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
40
40
|
}, "strip", z.ZodTypeAny, {
|
|
41
41
|
type: "message.delta";
|
|
42
42
|
schemaVersion: 2;
|
|
43
|
+
occurredAt: string;
|
|
43
44
|
content: string;
|
|
44
45
|
eventId: string;
|
|
45
46
|
executionId: string;
|
|
46
47
|
sequence: number;
|
|
47
48
|
policyHash: string;
|
|
48
|
-
occurredAt: string;
|
|
49
49
|
}, {
|
|
50
50
|
type: "message.delta";
|
|
51
51
|
schemaVersion: 2;
|
|
52
|
+
occurredAt: string;
|
|
52
53
|
content: string;
|
|
53
54
|
eventId: string;
|
|
54
55
|
executionId: string;
|
|
55
56
|
sequence: number;
|
|
56
57
|
policyHash: string;
|
|
57
|
-
occurredAt: string;
|
|
58
58
|
}>, z.ZodObject<{
|
|
59
59
|
schemaVersion: z.ZodLiteral<2>;
|
|
60
60
|
eventId: z.ZodString;
|
|
@@ -69,21 +69,21 @@ export declare const AgentExecutionEventSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
69
69
|
}, "strip", z.ZodTypeAny, {
|
|
70
70
|
type: "tool.requested";
|
|
71
71
|
schemaVersion: 2;
|
|
72
|
+
occurredAt: string;
|
|
72
73
|
eventId: string;
|
|
73
74
|
executionId: string;
|
|
74
75
|
sequence: number;
|
|
75
76
|
policyHash: string;
|
|
76
|
-
occurredAt: string;
|
|
77
77
|
toolCallId: string;
|
|
78
78
|
capability: "git.read" | "repository.read" | "repository.write" | "git.write" | "process.test" | "process.build" | "process.lint" | "process.typecheck" | "network.access" | "external.approval";
|
|
79
79
|
}, {
|
|
80
80
|
type: "tool.requested";
|
|
81
81
|
schemaVersion: 2;
|
|
82
|
+
occurredAt: string;
|
|
82
83
|
eventId: string;
|
|
83
84
|
executionId: string;
|
|
84
85
|
sequence: number;
|
|
85
86
|
policyHash: string;
|
|
86
|
-
occurredAt: string;
|
|
87
87
|
toolCallId: string;
|
|
88
88
|
capability: "git.read" | "repository.read" | "repository.write" | "git.write" | "process.test" | "process.build" | "process.lint" | "process.typecheck" | "network.access" | "external.approval";
|
|
89
89
|
}>, z.ZodObject<{
|
|
@@ -101,21 +101,21 @@ export declare const AgentExecutionEventSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
101
101
|
type: "tool.result";
|
|
102
102
|
status: "failed" | "denied" | "succeeded";
|
|
103
103
|
schemaVersion: 2;
|
|
104
|
+
occurredAt: string;
|
|
104
105
|
eventId: string;
|
|
105
106
|
executionId: string;
|
|
106
107
|
sequence: number;
|
|
107
108
|
policyHash: string;
|
|
108
|
-
occurredAt: string;
|
|
109
109
|
toolCallId: string;
|
|
110
110
|
}, {
|
|
111
111
|
type: "tool.result";
|
|
112
112
|
status: "failed" | "denied" | "succeeded";
|
|
113
113
|
schemaVersion: 2;
|
|
114
|
+
occurredAt: string;
|
|
114
115
|
eventId: string;
|
|
115
116
|
executionId: string;
|
|
116
117
|
sequence: number;
|
|
117
118
|
policyHash: string;
|
|
118
|
-
occurredAt: string;
|
|
119
119
|
toolCallId: string;
|
|
120
120
|
}>, z.ZodObject<{
|
|
121
121
|
schemaVersion: z.ZodLiteral<2>;
|
|
@@ -132,24 +132,24 @@ export declare const AgentExecutionEventSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
132
132
|
}, "strip", z.ZodTypeAny, {
|
|
133
133
|
type: "approval.required";
|
|
134
134
|
schemaVersion: 2;
|
|
135
|
-
reason: string;
|
|
136
135
|
action: string;
|
|
136
|
+
reason: string;
|
|
137
|
+
occurredAt: string;
|
|
137
138
|
eventId: string;
|
|
138
139
|
executionId: string;
|
|
139
140
|
sequence: number;
|
|
140
141
|
policyHash: string;
|
|
141
|
-
occurredAt: string;
|
|
142
142
|
approvalId: string;
|
|
143
143
|
}, {
|
|
144
144
|
type: "approval.required";
|
|
145
145
|
schemaVersion: 2;
|
|
146
|
-
reason: string;
|
|
147
146
|
action: string;
|
|
147
|
+
reason: string;
|
|
148
|
+
occurredAt: string;
|
|
148
149
|
eventId: string;
|
|
149
150
|
executionId: string;
|
|
150
151
|
sequence: number;
|
|
151
152
|
policyHash: string;
|
|
152
|
-
occurredAt: string;
|
|
153
153
|
approvalId: string;
|
|
154
154
|
}>, z.ZodObject<{
|
|
155
155
|
schemaVersion: z.ZodLiteral<2>;
|
|
@@ -166,21 +166,21 @@ export declare const AgentExecutionEventSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
166
166
|
type: "execution.progress";
|
|
167
167
|
schemaVersion: 2;
|
|
168
168
|
taskId: string;
|
|
169
|
+
occurredAt: string;
|
|
169
170
|
eventId: string;
|
|
170
171
|
executionId: string;
|
|
171
172
|
sequence: number;
|
|
172
173
|
policyHash: string;
|
|
173
|
-
occurredAt: string;
|
|
174
174
|
progress?: number | undefined;
|
|
175
175
|
}, {
|
|
176
176
|
type: "execution.progress";
|
|
177
177
|
schemaVersion: 2;
|
|
178
178
|
taskId: string;
|
|
179
|
+
occurredAt: string;
|
|
179
180
|
eventId: string;
|
|
180
181
|
executionId: string;
|
|
181
182
|
sequence: number;
|
|
182
183
|
policyHash: string;
|
|
183
|
-
occurredAt: string;
|
|
184
184
|
progress?: number | undefined;
|
|
185
185
|
}>, z.ZodObject<{
|
|
186
186
|
schemaVersion: z.ZodLiteral<2>;
|
|
@@ -194,22 +194,22 @@ export declare const AgentExecutionEventSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
194
194
|
status: z.ZodEnum<["completed", "failed", "cancelled", "timed_out", "interrupted", "needs_approval"]>;
|
|
195
195
|
}, "strip", z.ZodTypeAny, {
|
|
196
196
|
type: "execution.completed";
|
|
197
|
-
status: "failed" | "completed" | "
|
|
197
|
+
status: "failed" | "completed" | "cancelled" | "interrupted" | "timed_out" | "needs_approval";
|
|
198
198
|
schemaVersion: 2;
|
|
199
|
+
occurredAt: string;
|
|
199
200
|
eventId: string;
|
|
200
201
|
executionId: string;
|
|
201
202
|
sequence: number;
|
|
202
203
|
policyHash: string;
|
|
203
|
-
occurredAt: string;
|
|
204
204
|
}, {
|
|
205
205
|
type: "execution.completed";
|
|
206
|
-
status: "failed" | "completed" | "
|
|
206
|
+
status: "failed" | "completed" | "cancelled" | "interrupted" | "timed_out" | "needs_approval";
|
|
207
207
|
schemaVersion: 2;
|
|
208
|
+
occurredAt: string;
|
|
208
209
|
eventId: string;
|
|
209
210
|
executionId: string;
|
|
210
211
|
sequence: number;
|
|
211
212
|
policyHash: string;
|
|
212
|
-
occurredAt: string;
|
|
213
213
|
}>]>;
|
|
214
214
|
export type AgentExecutionEvent = z.infer<typeof AgentExecutionEventSchema>;
|
|
215
215
|
/**
|
|
@@ -47,29 +47,29 @@ export declare const ExecutionWorkspaceSchema: z.ZodEffects<z.ZodObject<{
|
|
|
47
47
|
baseCommitSha: z.ZodOptional<z.ZodString>;
|
|
48
48
|
createdAt: z.ZodString;
|
|
49
49
|
}, "strip", z.ZodTypeAny, {
|
|
50
|
-
id: string;
|
|
51
50
|
kind: "git-worktree" | "container" | "directory";
|
|
51
|
+
id: string;
|
|
52
52
|
createdAt: string;
|
|
53
53
|
rootPath: string;
|
|
54
54
|
branch?: string | undefined;
|
|
55
55
|
baseCommitSha?: string | undefined;
|
|
56
56
|
}, {
|
|
57
|
-
id: string;
|
|
58
57
|
kind: "git-worktree" | "container" | "directory";
|
|
58
|
+
id: string;
|
|
59
59
|
createdAt: string;
|
|
60
60
|
rootPath: string;
|
|
61
61
|
branch?: string | undefined;
|
|
62
62
|
baseCommitSha?: string | undefined;
|
|
63
63
|
}>, {
|
|
64
|
-
id: string;
|
|
65
64
|
kind: "git-worktree" | "container" | "directory";
|
|
65
|
+
id: string;
|
|
66
66
|
createdAt: string;
|
|
67
67
|
rootPath: string;
|
|
68
68
|
branch?: string | undefined;
|
|
69
69
|
baseCommitSha?: string | undefined;
|
|
70
70
|
}, {
|
|
71
|
-
id: string;
|
|
72
71
|
kind: "git-worktree" | "container" | "directory";
|
|
72
|
+
id: string;
|
|
73
73
|
createdAt: string;
|
|
74
74
|
rootPath: string;
|
|
75
75
|
branch?: string | undefined;
|
|
@@ -151,29 +151,29 @@ export declare const AgentExecutionRequestSchema: z.ZodObject<{
|
|
|
151
151
|
baseCommitSha: z.ZodOptional<z.ZodString>;
|
|
152
152
|
createdAt: z.ZodString;
|
|
153
153
|
}, "strip", z.ZodTypeAny, {
|
|
154
|
-
id: string;
|
|
155
154
|
kind: "git-worktree" | "container" | "directory";
|
|
155
|
+
id: string;
|
|
156
156
|
createdAt: string;
|
|
157
157
|
rootPath: string;
|
|
158
158
|
branch?: string | undefined;
|
|
159
159
|
baseCommitSha?: string | undefined;
|
|
160
160
|
}, {
|
|
161
|
-
id: string;
|
|
162
161
|
kind: "git-worktree" | "container" | "directory";
|
|
162
|
+
id: string;
|
|
163
163
|
createdAt: string;
|
|
164
164
|
rootPath: string;
|
|
165
165
|
branch?: string | undefined;
|
|
166
166
|
baseCommitSha?: string | undefined;
|
|
167
167
|
}>, {
|
|
168
|
-
id: string;
|
|
169
168
|
kind: "git-worktree" | "container" | "directory";
|
|
169
|
+
id: string;
|
|
170
170
|
createdAt: string;
|
|
171
171
|
rootPath: string;
|
|
172
172
|
branch?: string | undefined;
|
|
173
173
|
baseCommitSha?: string | undefined;
|
|
174
174
|
}, {
|
|
175
|
-
id: string;
|
|
176
175
|
kind: "git-worktree" | "container" | "directory";
|
|
176
|
+
id: string;
|
|
177
177
|
createdAt: string;
|
|
178
178
|
rootPath: string;
|
|
179
179
|
branch?: string | undefined;
|
|
@@ -281,8 +281,8 @@ export declare const AgentExecutionRequestSchema: z.ZodObject<{
|
|
|
281
281
|
providerId: string;
|
|
282
282
|
taskKind: "requirements" | "architecture" | "planning" | "implementation" | "test_authoring" | "debugging" | "code_review" | "documentation";
|
|
283
283
|
workspace: {
|
|
284
|
-
id: string;
|
|
285
284
|
kind: "git-worktree" | "container" | "directory";
|
|
285
|
+
id: string;
|
|
286
286
|
createdAt: string;
|
|
287
287
|
rootPath: string;
|
|
288
288
|
branch?: string | undefined;
|
|
@@ -328,8 +328,8 @@ export declare const AgentExecutionRequestSchema: z.ZodObject<{
|
|
|
328
328
|
providerId: string;
|
|
329
329
|
taskKind: "requirements" | "architecture" | "planning" | "implementation" | "test_authoring" | "debugging" | "code_review" | "documentation";
|
|
330
330
|
workspace: {
|
|
331
|
-
id: string;
|
|
332
331
|
kind: "git-worktree" | "container" | "directory";
|
|
332
|
+
id: string;
|
|
333
333
|
createdAt: string;
|
|
334
334
|
rootPath: string;
|
|
335
335
|
branch?: string | undefined;
|
|
@@ -380,12 +380,12 @@ export declare const AgentApprovalRequestSchema: z.ZodObject<{
|
|
|
380
380
|
action: z.ZodString;
|
|
381
381
|
reason: z.ZodString;
|
|
382
382
|
}, "strip", z.ZodTypeAny, {
|
|
383
|
-
reason: string;
|
|
384
383
|
action: string;
|
|
384
|
+
reason: string;
|
|
385
385
|
approvalId: string;
|
|
386
386
|
}, {
|
|
387
|
-
reason: string;
|
|
388
387
|
action: string;
|
|
388
|
+
reason: string;
|
|
389
389
|
approvalId: string;
|
|
390
390
|
}>;
|
|
391
391
|
export type AgentApprovalRequest = z.infer<typeof AgentApprovalRequestSchema>;
|
|
@@ -442,12 +442,12 @@ export declare const AgentExecutionResultSchema: z.ZodObject<{
|
|
|
442
442
|
action: z.ZodString;
|
|
443
443
|
reason: z.ZodString;
|
|
444
444
|
}, "strip", z.ZodTypeAny, {
|
|
445
|
-
reason: string;
|
|
446
445
|
action: string;
|
|
446
|
+
reason: string;
|
|
447
447
|
approvalId: string;
|
|
448
448
|
}, {
|
|
449
|
-
reason: string;
|
|
450
449
|
action: string;
|
|
450
|
+
reason: string;
|
|
451
451
|
approvalId: string;
|
|
452
452
|
}>, "many">;
|
|
453
453
|
usage: z.ZodOptional<z.ZodObject<{
|
|
@@ -483,15 +483,15 @@ export declare const AgentExecutionResultSchema: z.ZodObject<{
|
|
|
483
483
|
retryable: boolean;
|
|
484
484
|
}>, "many">;
|
|
485
485
|
}, "strip", z.ZodTypeAny, {
|
|
486
|
-
status: "failed" | "completed" | "
|
|
486
|
+
status: "failed" | "completed" | "cancelled" | "interrupted" | "timed_out" | "needs_approval";
|
|
487
487
|
schemaVersion: 2;
|
|
488
|
+
taskId: string;
|
|
489
|
+
summary: string;
|
|
488
490
|
errors: {
|
|
489
491
|
code: "APPROVAL_REQUIRED" | "PROVIDER_UNREACHABLE" | "PROVIDER_RATE_LIMITED" | "PROVIDER_INTERNAL" | "CAPABILITY_DENIED" | "APPROVAL_REJECTED" | "REQUEST_INVALID" | "BUDGET_EXCEEDED" | "SESSION_EXPIRED" | "PROVIDER_TIMEOUT" | "CANCELLED" | "UNKNOWN";
|
|
490
492
|
message: string;
|
|
491
493
|
retryable: boolean;
|
|
492
494
|
}[];
|
|
493
|
-
taskId: string;
|
|
494
|
-
summary: string;
|
|
495
495
|
executionId: string;
|
|
496
496
|
workflowRunId: string;
|
|
497
497
|
providerId: string;
|
|
@@ -500,8 +500,8 @@ export declare const AgentExecutionResultSchema: z.ZodObject<{
|
|
|
500
500
|
operation: "create" | "update" | "delete";
|
|
501
501
|
}[];
|
|
502
502
|
requestedApprovals: {
|
|
503
|
-
reason: string;
|
|
504
503
|
action: string;
|
|
504
|
+
reason: string;
|
|
505
505
|
approvalId: string;
|
|
506
506
|
}[];
|
|
507
507
|
session?: {
|
|
@@ -516,15 +516,15 @@ export declare const AgentExecutionResultSchema: z.ZodObject<{
|
|
|
516
516
|
outputTokens?: number | undefined;
|
|
517
517
|
} | undefined;
|
|
518
518
|
}, {
|
|
519
|
-
status: "failed" | "completed" | "
|
|
519
|
+
status: "failed" | "completed" | "cancelled" | "interrupted" | "timed_out" | "needs_approval";
|
|
520
520
|
schemaVersion: 2;
|
|
521
|
+
taskId: string;
|
|
522
|
+
summary: string;
|
|
521
523
|
errors: {
|
|
522
524
|
code: "APPROVAL_REQUIRED" | "PROVIDER_UNREACHABLE" | "PROVIDER_RATE_LIMITED" | "PROVIDER_INTERNAL" | "CAPABILITY_DENIED" | "APPROVAL_REJECTED" | "REQUEST_INVALID" | "BUDGET_EXCEEDED" | "SESSION_EXPIRED" | "PROVIDER_TIMEOUT" | "CANCELLED" | "UNKNOWN";
|
|
523
525
|
message: string;
|
|
524
526
|
retryable: boolean;
|
|
525
527
|
}[];
|
|
526
|
-
taskId: string;
|
|
527
|
-
summary: string;
|
|
528
528
|
executionId: string;
|
|
529
529
|
workflowRunId: string;
|
|
530
530
|
providerId: string;
|
|
@@ -533,8 +533,8 @@ export declare const AgentExecutionResultSchema: z.ZodObject<{
|
|
|
533
533
|
operation: "create" | "update" | "delete";
|
|
534
534
|
}[];
|
|
535
535
|
requestedApprovals: {
|
|
536
|
-
reason: string;
|
|
537
536
|
action: string;
|
|
537
|
+
reason: string;
|
|
538
538
|
approvalId: string;
|
|
539
539
|
}[];
|
|
540
540
|
session?: {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AGENT_TOOL_NAMES: readonly ["kit_next", "kit_phase", "kit_status", "kit_rules_resolve", "kit_rules_evaluate", "kit_project_context", "kit_rules_explain", "kit_adr_search", "kit_patterns_search", "kit_verification_status", "kit_learning_record"];
|
|
3
|
+
export type AgentToolName = (typeof AGENT_TOOL_NAMES)[number];
|
|
4
|
+
export declare const KitNextInputSchema: z.ZodObject<{
|
|
5
|
+
featureId: z.ZodString;
|
|
6
|
+
}, "strict", z.ZodTypeAny, {
|
|
7
|
+
featureId: string;
|
|
8
|
+
}, {
|
|
9
|
+
featureId: string;
|
|
10
|
+
}>;
|
|
11
|
+
export type KitNextInput = z.infer<typeof KitNextInputSchema>;
|
|
12
|
+
export declare const KitPhaseInputSchema: z.ZodObject<{
|
|
13
|
+
featureId: z.ZodString;
|
|
14
|
+
taskId: z.ZodString;
|
|
15
|
+
phase: z.ZodEnum<["red", "green", "refactor"]>;
|
|
16
|
+
}, "strict", z.ZodTypeAny, {
|
|
17
|
+
taskId: string;
|
|
18
|
+
featureId: string;
|
|
19
|
+
phase: "refactor" | "red" | "green";
|
|
20
|
+
}, {
|
|
21
|
+
taskId: string;
|
|
22
|
+
featureId: string;
|
|
23
|
+
phase: "refactor" | "red" | "green";
|
|
24
|
+
}>;
|
|
25
|
+
export type KitPhaseInput = z.infer<typeof KitPhaseInputSchema>;
|
|
26
|
+
export declare const KitStatusInputSchema: z.ZodObject<{
|
|
27
|
+
featureId: z.ZodString;
|
|
28
|
+
}, "strict", z.ZodTypeAny, {
|
|
29
|
+
featureId: string;
|
|
30
|
+
}, {
|
|
31
|
+
featureId: string;
|
|
32
|
+
}>;
|
|
33
|
+
export type KitStatusInput = z.infer<typeof KitStatusInputSchema>;
|
|
34
|
+
export declare const KitRulesResolveInputSchema: z.ZodObject<{
|
|
35
|
+
files: z.ZodArray<z.ZodString, "many">;
|
|
36
|
+
stacks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
37
|
+
}, "strict", z.ZodTypeAny, {
|
|
38
|
+
files: string[];
|
|
39
|
+
stacks?: string[] | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
files: string[];
|
|
42
|
+
stacks?: string[] | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
export type KitRulesResolveInput = z.infer<typeof KitRulesResolveInputSchema>;
|
|
45
|
+
export declare const KitRulesEvaluateInputSchema: z.ZodObject<{
|
|
46
|
+
files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
47
|
+
stacks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
48
|
+
}, "strict", z.ZodTypeAny, {
|
|
49
|
+
stacks?: string[] | undefined;
|
|
50
|
+
files?: string[] | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
stacks?: string[] | undefined;
|
|
53
|
+
files?: string[] | undefined;
|
|
54
|
+
}>;
|
|
55
|
+
export type KitRulesEvaluateInput = z.infer<typeof KitRulesEvaluateInputSchema>;
|
|
56
|
+
export declare const KitProjectContextInputSchema: z.ZodObject<{
|
|
57
|
+
files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
58
|
+
stacks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
59
|
+
}, "strict", z.ZodTypeAny, {
|
|
60
|
+
stacks?: string[] | undefined;
|
|
61
|
+
files?: string[] | undefined;
|
|
62
|
+
}, {
|
|
63
|
+
stacks?: string[] | undefined;
|
|
64
|
+
files?: string[] | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
export type KitProjectContextInput = z.infer<typeof KitProjectContextInputSchema>;
|
|
67
|
+
export declare const KitRulesExplainInputSchema: z.ZodObject<{
|
|
68
|
+
ruleId: z.ZodString;
|
|
69
|
+
}, "strict", z.ZodTypeAny, {
|
|
70
|
+
ruleId: string;
|
|
71
|
+
}, {
|
|
72
|
+
ruleId: string;
|
|
73
|
+
}>;
|
|
74
|
+
export type KitRulesExplainInput = z.infer<typeof KitRulesExplainInputSchema>;
|
|
75
|
+
export declare const KitSearchInputSchema: z.ZodObject<{
|
|
76
|
+
query: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, "strict", z.ZodTypeAny, {
|
|
78
|
+
query?: string | undefined;
|
|
79
|
+
}, {
|
|
80
|
+
query?: string | undefined;
|
|
81
|
+
}>;
|
|
82
|
+
export type KitSearchInput = z.infer<typeof KitSearchInputSchema>;
|
|
83
|
+
export declare const KitVerificationStatusInputSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
|
|
84
|
+
export { LearningEventSchema as KitLearningRecordInputSchema } from '../learning/learning-event.js';
|
|
85
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent-tools/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB,oOAYnB,CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D,eAAO,MAAM,kBAAkB;;;;;;EAAsD,CAAC;AACtF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAMrB,CAAC;AACZ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,oBAAoB;;;;;;EAAsD,CAAC;AACxF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAMlE,eAAO,MAAM,0BAA0B;;;;;;;;;EAK5B,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,2BAA2B;;;;;;;;;EAK7B,CAAC;AACZ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAIhF,eAAO,MAAM,4BAA4B;;;;;;;;;EAK9B,CAAC;AACZ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,0BAA0B;;;;;;EAE5B,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,oBAAoB;;;;;;EAA+D,CAAC;AACjG,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,gCAAgC,iDAAwB,CAAC;AAGtE,OAAO,EAAE,mBAAmB,IAAI,4BAA4B,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// packages/contracts/src/agent-tools/index.ts
|
|
2
|
+
//
|
|
3
|
+
// Typed tool surface for an agent host (item 4). A host calls these tools
|
|
4
|
+
// instead of shelling out. Each input schema is strict: an unrecognized key is
|
|
5
|
+
// an error, so no tool can carry a command. A phase runs only the verification
|
|
6
|
+
// command the plan declares for its task.
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
export const AGENT_TOOL_NAMES = [
|
|
9
|
+
'kit_next',
|
|
10
|
+
'kit_phase',
|
|
11
|
+
'kit_status',
|
|
12
|
+
'kit_rules_resolve',
|
|
13
|
+
'kit_rules_evaluate',
|
|
14
|
+
'kit_project_context',
|
|
15
|
+
'kit_rules_explain',
|
|
16
|
+
'kit_adr_search',
|
|
17
|
+
'kit_patterns_search',
|
|
18
|
+
'kit_verification_status',
|
|
19
|
+
'kit_learning_record',
|
|
20
|
+
];
|
|
21
|
+
export const KitNextInputSchema = z.object({ featureId: z.string().min(1) }).strict();
|
|
22
|
+
export const KitPhaseInputSchema = z
|
|
23
|
+
.object({
|
|
24
|
+
featureId: z.string().min(1),
|
|
25
|
+
taskId: z.string().min(1),
|
|
26
|
+
phase: z.enum(['red', 'green', 'refactor']),
|
|
27
|
+
})
|
|
28
|
+
.strict();
|
|
29
|
+
export const KitStatusInputSchema = z.object({ featureId: z.string().min(1) }).strict();
|
|
30
|
+
// Read-only engineering-constitution tools (ADR-0023). Neither tool writes
|
|
31
|
+
// state or accepts a command. `stacks` defaults to the project profile.
|
|
32
|
+
const RepoFileSchema = z.string().min(1).max(1024);
|
|
33
|
+
export const KitRulesResolveInputSchema = z
|
|
34
|
+
.object({
|
|
35
|
+
files: z.array(RepoFileSchema).min(1),
|
|
36
|
+
stacks: z.array(z.string().min(1)).optional(),
|
|
37
|
+
})
|
|
38
|
+
.strict();
|
|
39
|
+
export const KitRulesEvaluateInputSchema = z
|
|
40
|
+
.object({
|
|
41
|
+
files: z.array(RepoFileSchema).optional(),
|
|
42
|
+
stacks: z.array(z.string().min(1)).optional(),
|
|
43
|
+
})
|
|
44
|
+
.strict();
|
|
45
|
+
// Read-only context tools (platform roadmap Phase 3). None writes state, runs a
|
|
46
|
+
// command, or accepts a path outside the repository.
|
|
47
|
+
export const KitProjectContextInputSchema = z
|
|
48
|
+
.object({
|
|
49
|
+
files: z.array(RepoFileSchema).optional(),
|
|
50
|
+
stacks: z.array(z.string().min(1)).optional(),
|
|
51
|
+
})
|
|
52
|
+
.strict();
|
|
53
|
+
export const KitRulesExplainInputSchema = z
|
|
54
|
+
.object({ ruleId: z.string().regex(/^[A-Z][A-Z0-9]*(-[A-Z0-9]+)*-\d{3}$/, 'rule id') })
|
|
55
|
+
.strict();
|
|
56
|
+
export const KitSearchInputSchema = z.object({ query: z.string().max(200).optional() }).strict();
|
|
57
|
+
export const KitVerificationStatusInputSchema = z.object({}).strict();
|
|
58
|
+
// Submits one privacy-safe learning event. The strict learning event schema refuses free text.
|
|
59
|
+
export { LearningEventSchema as KitLearningRecordInputSchema } from '../learning/learning-event.js';
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent-tools/index.ts"],"names":[],"mappings":"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"}
|