@inf-monkeys-tech/monkeys 1.0.25 → 1.0.26
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/lib/contracts/agent.d.ts +140 -3
- package/lib/contracts/agent.d.ts.map +1 -1
- package/lib/contracts/agent.js +37 -3
- package/lib/contracts/agent.js.map +1 -1
- package/lib/esm/contracts/index.mjs +32 -3
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +32 -3
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +32 -3
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +32 -3
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/json-schema/agent-session-command-result.schema.json +1 -0
- package/lib/json-schema/agent-session-command.schema.json +4 -7
- package/lib/json-schema/agent-session-event.schema.json +134 -0
- package/lib/json-schema/agent-session-run-event.schema.json +134 -0
- package/lib/json-schema/agent-session-targeted-command.schema.json +4 -7
- package/lib/json-schema/agent-session-view-model.schema.json +134 -0
- package/lib/schemas/index.d.ts +138 -2
- package/lib/schemas/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/test/fixtures/agent-session-agent.json +1 -1
- package/test/fixtures/agent-session-commands.json +14 -0
package/lib/esm/index.mjs
CHANGED
|
@@ -6780,7 +6780,7 @@ var AgentSessionCapabilitiesSchema = z3.object({
|
|
|
6780
6780
|
}).strict();
|
|
6781
6781
|
var AGENT_SESSION_RUNTIME_CAPABILITIES = Object.freeze({
|
|
6782
6782
|
chatbot: AgentSessionCapabilitiesSchema.parse({ text: true, tools: true, mcp: true, skills: true, approval: true, usage: true, editAndRerun: true, summary: true }),
|
|
6783
|
-
agent: AgentSessionCapabilitiesSchema.parse({ text: true, tools: true, mcp: true, shell: true, fileChange: true, skills: true, approval: true, artifacts: true, usage: true, resume: true, editAndRerun: true, summary: true })
|
|
6783
|
+
agent: AgentSessionCapabilitiesSchema.parse({ text: true, tools: true, mcp: true, shell: true, fileChange: true, skills: true, approval: true, artifacts: true, usage: true, resume: true, editAndRerun: true, steering: true, summary: true })
|
|
6784
6784
|
});
|
|
6785
6785
|
function getAgentSessionRuntimeCapabilities(mode) {
|
|
6786
6786
|
return AGENT_SESSION_RUNTIME_CAPABILITIES[mode];
|
|
@@ -6805,7 +6805,7 @@ var AGENT_SESSION_CAPABILITY_EVIDENCE = Object.freeze({
|
|
|
6805
6805
|
testResults: { eventTypes: ["test-result"], commandTypes: [] },
|
|
6806
6806
|
threadForking: { eventTypes: [], commandTypes: ["fork"] },
|
|
6807
6807
|
editAndRerun: { eventTypes: [], commandTypes: ["edit-and-rerun"] },
|
|
6808
|
-
steering: { eventTypes: [], commandTypes: ["steer"] },
|
|
6808
|
+
steering: { eventTypes: ["steer"], commandTypes: ["steer"] },
|
|
6809
6809
|
summary: { eventTypes: ["summary"], commandTypes: [] }
|
|
6810
6810
|
});
|
|
6811
6811
|
function findUnsupportedAgentSessionCapabilities(capabilities, evidence) {
|
|
@@ -6997,7 +6997,7 @@ var AgentSessionCommandSchema = z3.discriminatedUnion("commandType", [
|
|
|
6997
6997
|
}),
|
|
6998
6998
|
sessionCommand("steer", {
|
|
6999
6999
|
targetRunId: ContractIdentifierSchema,
|
|
7000
|
-
|
|
7000
|
+
text: z3.string().trim().min(1)
|
|
7001
7001
|
})
|
|
7002
7002
|
]).superRefine((value, context) => {
|
|
7003
7003
|
if (value.commandType === "steer" && value.runId !== value.payload.targetRunId) {
|
|
@@ -7014,6 +7014,7 @@ var AgentSessionTargetedCommandSchema = AgentSessionCommandSchema.and(
|
|
|
7014
7014
|
var AgentSessionCommandErrorCodeSchema = z3.enum([
|
|
7015
7015
|
"SESSION_NOT_FOUND",
|
|
7016
7016
|
"RUN_NOT_FOUND",
|
|
7017
|
+
"ACTIVE_RUN_NOT_FOUND",
|
|
7017
7018
|
"RUN_ALREADY_FINISHED",
|
|
7018
7019
|
"STOP_TIMEOUT",
|
|
7019
7020
|
"COMMAND_NOT_SUPPORTED",
|
|
@@ -7327,6 +7328,17 @@ var AgentSessionEventSchema = z3.discriminatedUnion("eventType", [
|
|
|
7327
7328
|
durationMs: z3.number().nonnegative().optional(),
|
|
7328
7329
|
output: z3.string().optional()
|
|
7329
7330
|
}),
|
|
7331
|
+
sessionEvent("steer", {
|
|
7332
|
+
commandId: ContractIdentifierSchema,
|
|
7333
|
+
targetRunId: ContractIdentifierSchema,
|
|
7334
|
+
text: z3.string().trim().min(1),
|
|
7335
|
+
status: z3.enum(["accepted", "applied", "failed"]),
|
|
7336
|
+
error: z3.object({
|
|
7337
|
+
code: AgentSessionCommandErrorCodeSchema,
|
|
7338
|
+
message: z3.string(),
|
|
7339
|
+
retryable: z3.boolean()
|
|
7340
|
+
}).strict().optional()
|
|
7341
|
+
}),
|
|
7330
7342
|
sessionEvent("summary", {
|
|
7331
7343
|
summaryId: ContractIdentifierSchema,
|
|
7332
7344
|
runId: ContractIdentifierSchema,
|
|
@@ -7336,6 +7348,23 @@ var AgentSessionEventSchema = z3.discriminatedUnion("eventType", [
|
|
|
7336
7348
|
status: z3.enum(["generating", "completed", "failed"])
|
|
7337
7349
|
})
|
|
7338
7350
|
]).superRefine((value, context) => {
|
|
7351
|
+
if (value.eventType === "steer") {
|
|
7352
|
+
if (value.runId !== value.payload.targetRunId) {
|
|
7353
|
+
context.addIssue({
|
|
7354
|
+
code: "custom",
|
|
7355
|
+
path: ["payload", "targetRunId"],
|
|
7356
|
+
message: "Steering payload targetRunId must match the event runId."
|
|
7357
|
+
});
|
|
7358
|
+
}
|
|
7359
|
+
const requiresError = value.payload.status === "failed";
|
|
7360
|
+
if (requiresError !== Boolean(value.payload.error)) {
|
|
7361
|
+
context.addIssue({
|
|
7362
|
+
code: "custom",
|
|
7363
|
+
path: ["payload", "error"],
|
|
7364
|
+
message: requiresError ? "Failed steering events require an error." : "Accepted and applied steering events must not contain an error."
|
|
7365
|
+
});
|
|
7366
|
+
}
|
|
7367
|
+
}
|
|
7339
7368
|
if (value.eventType === "summary" && value.runId !== value.payload.runId) {
|
|
7340
7369
|
context.addIssue({
|
|
7341
7370
|
code: "custom",
|