@adversarylabs/sdk 0.1.36 → 0.1.38
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/README.md +30 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/model-diagnostics.d.ts +6 -0
- package/dist/model-diagnostics.d.ts.map +1 -0
- package/dist/model-diagnostics.js +78 -0
- package/dist/model-diagnostics.js.map +1 -0
- package/dist/model.d.ts +2 -0
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +78 -23
- package/dist/model.js.map +1 -1
- package/dist/repository-diagnostics.d.ts +29 -0
- package/dist/repository-diagnostics.d.ts.map +1 -0
- package/dist/repository-diagnostics.js +73 -0
- package/dist/repository-diagnostics.js.map +1 -0
- package/dist/repository-model.d.ts +4 -0
- package/dist/repository-model.d.ts.map +1 -1
- package/dist/repository-model.js +334 -169
- package/dist/repository-model.js.map +1 -1
- package/dist/repository-path.d.ts +4 -0
- package/dist/repository-path.d.ts.map +1 -0
- package/dist/repository-path.js +16 -0
- package/dist/repository-path.js.map +1 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -150,11 +150,16 @@ const review = await ctx.model.review<{
|
|
|
150
150
|
},
|
|
151
151
|
budget: {
|
|
152
152
|
maximumOutputTokens: 8_000,
|
|
153
|
-
timeoutMs:
|
|
153
|
+
timeoutMs: 600_000,
|
|
154
154
|
},
|
|
155
155
|
});
|
|
156
156
|
```
|
|
157
157
|
|
|
158
|
+
Model review, repository planning, and concern rewrite calls default to a ten-minute
|
|
159
|
+
inference timeout. Explicit shorter budgets remain supported; ten minutes remains
|
|
160
|
+
the maximum model request timeout. These budgets do not extend the outer worker
|
|
161
|
+
review deadline.
|
|
162
|
+
|
|
158
163
|
Adversaries may add semantic validation that cannot be expressed by JSON Schema. The adversary
|
|
159
164
|
owns the domain rule; the SDK owns bounded regeneration, feedback, timeout accounting, and usage
|
|
160
165
|
aggregation:
|
|
@@ -203,7 +208,7 @@ const review = await ctx.model.review<EngineeringReview>({
|
|
|
203
208
|
},
|
|
204
209
|
budget: {
|
|
205
210
|
maximumOutputTokens: 6_000,
|
|
206
|
-
timeoutMs:
|
|
211
|
+
timeoutMs: 600_000,
|
|
207
212
|
},
|
|
208
213
|
});
|
|
209
214
|
```
|
|
@@ -1068,6 +1073,29 @@ The event also includes job ID when available, reviewer identity, and retrieval-
|
|
|
1068
1073
|
counts. Paths, prompts, source content, and raw tool errors are excluded from the event.
|
|
1069
1074
|
The final model still receives ordinary tool results, including failed lookup results.
|
|
1070
1075
|
|
|
1076
|
+
`tools.repository.readDiagnostics: true` explicitly opts into bounded filename
|
|
1077
|
+
activity for debugging and the review UI. Unlike the default coverage event, these
|
|
1078
|
+
`repository.read-detail` events include filenames from the runner's changed-file
|
|
1079
|
+
list, directory results, or successful guarded reads. Unknown model-supplied paths
|
|
1080
|
+
are replaced with a placeholder. Valid route brackets, spaces, and Unicode names
|
|
1081
|
+
are preserved. Source contents, prompts, and raw errors remain excluded.
|
|
1082
|
+
|
|
1083
|
+
Broker calls emit content-free `model.attempt` JSON events at the start and end of
|
|
1084
|
+
each attempt. They include a request correlation ID, job ID when available,
|
|
1085
|
+
provider/model identity, elapsed milliseconds, the shared deadline, remaining
|
|
1086
|
+
time at attempt start, and a typed failure code. Provider/model fields use the
|
|
1087
|
+
successful broker response or configured runner environment; unavailable identity
|
|
1088
|
+
is `unknown`. SDK timing does not change retries or deadlines and does not include
|
|
1089
|
+
endpoints, credentials, prompts, or source contents. If the deadline expires
|
|
1090
|
+
between attempts, a terminal `model.retry-delay` event identifies the
|
|
1091
|
+
`broker_retry_delay` stage and records the timeout without inventing another
|
|
1092
|
+
model attempt. Attempt events distinguish `repository_planning` calls from
|
|
1093
|
+
`model_review` calls, and retry-delay failures retain that classification in
|
|
1094
|
+
`modelStage`. The local `diagnosticStage` field never enters the broker payload.
|
|
1095
|
+
The parent broker's provider
|
|
1096
|
+
timing remains necessary to locate failures inside inference.
|
|
1097
|
+
|
|
1098
|
+
|
|
1071
1099
|
```typescript
|
|
1072
1100
|
const review = await ctx.model.review<MyReview>({ /* prompt, schema, repository tools */ });
|
|
1073
1101
|
if (review.retrieval?.coverage?.status === "partial") {
|
package/dist/index.js
CHANGED
|
@@ -1139,7 +1139,7 @@ export const OPINION_CONCERN_REWRITE_SCHEMA = {
|
|
|
1139
1139
|
};
|
|
1140
1140
|
const DEFAULT_CONCERN_REWRITE_BUDGET = {
|
|
1141
1141
|
maximumOutputTokens: 128,
|
|
1142
|
-
timeoutMs:
|
|
1142
|
+
timeoutMs: 600_000,
|
|
1143
1143
|
};
|
|
1144
1144
|
/**
|
|
1145
1145
|
* Ensure `text` is a validated noun-phrase concern. Already-valid phrases pass
|