stitchkit 0.90.0 → 0.90.1
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/CHANGELOG.md +46 -0
- package/dist/agent-runtime/coding-tool-refusals.d.ts +31 -10
- package/dist/agent-runtime/coding-tool-refusals.d.ts.map +1 -1
- package/dist/agent-runtime/spill.d.ts.map +1 -1
- package/dist/agent-runtime-coding-tools.js +4 -4
- package/dist/agent-runtime-harness.js +5 -5
- package/dist/agent-runtime-sandbox.js +5 -5
- package/dist/agent-runtime.js +17 -29
- package/dist/application-grammy.js +1 -1
- package/dist/application.js +2 -2
- package/dist/cli.js +7 -7
- package/dist/contract/errors.d.ts +3 -0
- package/dist/contract/errors.d.ts.map +1 -1
- package/dist/contract/index.js +2 -2
- package/dist/{index-qmgs7y68.js → index-1txvygak.js} +1 -1
- package/dist/{index-8c3a7m4g.js → index-2hrfpw2c.js} +1 -1
- package/dist/{index-7evdsyez.js → index-2hryh65w.js} +1 -1
- package/dist/{index-zyvby92n.js → index-44ht2790.js} +2 -2
- package/dist/{index-27gm3d6g.js → index-6q3zjwaz.js} +2 -2
- package/dist/{index-mnm4qp0p.js → index-79hb1wyh.js} +3 -3
- package/dist/{index-apn8repm.js → index-7gqx71yd.js} +2 -2
- package/dist/{index-7601qfg1.js → index-8dph3pw6.js} +4 -4
- package/dist/{index-90d7h2cr.js → index-bg8ypxzn.js} +3 -3
- package/dist/{index-vchzar7e.js → index-db51n3xr.js} +5 -5
- package/dist/{index-hw2chdvy.js → index-f475yj00.js} +1 -1
- package/dist/{index-q3ve2d1k.js → index-gbqjt8jz.js} +3 -3
- package/dist/index-gte38nbm.js +101 -0
- package/dist/{index-cp20z0n6.js → index-j7q0xj6d.js} +7 -55
- package/dist/{index-2bxcmqkb.js → index-kazec06k.js} +1 -1
- package/dist/{index-0w9abg87.js → index-scs3f1eg.js} +3 -0
- package/dist/{index-31jw8fjq.js → index-wb15909q.js} +1 -1
- package/dist/{index-p18f59zy.js → index-z78bjcxj.js} +1 -1
- package/dist/{index-t7fkyxcr.js → index-zkcqhxx8.js} +1 -1
- package/dist/index.js +6 -6
- package/dist/node.js +6 -6
- package/dist/observability/index.js +3 -3
- package/dist/primitives.js +2 -2
- package/dist/remote.js +5 -5
- package/dist/server/index.js +8 -8
- package/dist/testing.js +6 -6
- package/dist/tool-invoker.js +6 -6
- package/dist/tools.js +11 -11
- package/dist/tracking.js +2 -2
- package/llms-full.txt +13 -3
- package/package.json +1 -1
- package/dist/index-gskm1k5a.js +0 -50
package/dist/index-gskm1k5a.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
// src/agent-runtime/sandbox.ts
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
var AgentSandboxRestrictionSchema = z.enum([
|
|
4
|
-
"network-denied",
|
|
5
|
-
"write-contained",
|
|
6
|
-
"secrets-hidden",
|
|
7
|
-
"process-contained"
|
|
8
|
-
]);
|
|
9
|
-
var AgentSandboxGradeSchema = z.discriminatedUnion("grade", [
|
|
10
|
-
z.object({ grade: z.literal("full"), restrictions: z.array(AgentSandboxRestrictionSchema) }).strict(),
|
|
11
|
-
z.object({
|
|
12
|
-
grade: z.literal("partial"),
|
|
13
|
-
restrictions: z.array(AgentSandboxRestrictionSchema),
|
|
14
|
-
gaps: z.array(AgentSandboxRestrictionSchema)
|
|
15
|
-
}).strict(),
|
|
16
|
-
z.object({ grade: z.literal("unavailable"), reason: z.string().min(1) }).strict()
|
|
17
|
-
]);
|
|
18
|
-
var probes = new WeakMap;
|
|
19
|
-
function probeAgentProcessSandbox(sandbox, options = {}) {
|
|
20
|
-
if (options.refresh)
|
|
21
|
-
probes.delete(sandbox);
|
|
22
|
-
const present = probes.get(sandbox);
|
|
23
|
-
if (present)
|
|
24
|
-
return present;
|
|
25
|
-
const pending = Promise.resolve(sandbox.probe()).then((grade) => AgentSandboxGradeSchema.parse(grade));
|
|
26
|
-
probes.set(sandbox, pending);
|
|
27
|
-
return pending;
|
|
28
|
-
}
|
|
29
|
-
function missingSandboxRestrictions(grade, required) {
|
|
30
|
-
if (grade.grade === "unavailable")
|
|
31
|
-
return required;
|
|
32
|
-
const present = new Set(grade.restrictions);
|
|
33
|
-
return required.filter((restriction) => !present.has(restriction));
|
|
34
|
-
}
|
|
35
|
-
async function recordAgentSandboxProbe(input) {
|
|
36
|
-
const grade = await probeAgentProcessSandbox(input.sandbox);
|
|
37
|
-
const missing = missingSandboxRestrictions(grade, input.required);
|
|
38
|
-
await input.store.appendEvent({
|
|
39
|
-
conversationId: input.conversationId,
|
|
40
|
-
kind: "sandbox/probed",
|
|
41
|
-
payload: {
|
|
42
|
-
result: grade,
|
|
43
|
-
required: [...input.required],
|
|
44
|
-
missing: [...missing]
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
return grade;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export { AgentSandboxRestrictionSchema, AgentSandboxGradeSchema, probeAgentProcessSandbox, missingSandboxRestrictions, recordAgentSandboxProbe };
|