@inf-monkeys-tech/monkeys 1.0.25 → 1.0.27

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.
@@ -7677,7 +7677,7 @@ var AgentSessionCapabilitiesSchema = z5.object({
7677
7677
  }).strict();
7678
7678
  var AGENT_SESSION_RUNTIME_CAPABILITIES = Object.freeze({
7679
7679
  chatbot: AgentSessionCapabilitiesSchema.parse({ text: true, tools: true, mcp: true, skills: true, approval: true, usage: true, editAndRerun: true, summary: true }),
7680
- 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 })
7680
+ 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 })
7681
7681
  });
7682
7682
  var AGENT_SESSION_CAPABILITY_EVIDENCE = Object.freeze({
7683
7683
  text: { eventTypes: ["message"], commandTypes: [] },
@@ -7699,8 +7699,8 @@ var AGENT_SESSION_CAPABILITY_EVIDENCE = Object.freeze({
7699
7699
  testResults: { eventTypes: ["test-result"], commandTypes: [] },
7700
7700
  threadForking: { eventTypes: [], commandTypes: ["fork"] },
7701
7701
  editAndRerun: { eventTypes: [], commandTypes: ["edit-and-rerun"] },
7702
- steering: { eventTypes: [], commandTypes: ["steer"] },
7703
- summary: { eventTypes: ["summary"], commandTypes: [] }
7702
+ steering: { eventTypes: ["steer"], commandTypes: ["steer"] },
7703
+ summary: { eventTypes: ["summary"], commandTypes: ["retry-summary"] }
7704
7704
  });
7705
7705
  var AgentSessionSnapshotSchema = z5.object({
7706
7706
  mode: AgentModeSchema,
@@ -7834,6 +7834,7 @@ var AgentSessionCommandTypeSchema = z5.enum([
7834
7834
  "stop",
7835
7835
  "resume",
7836
7836
  "retry",
7837
+ "retry-summary",
7837
7838
  "approval",
7838
7839
  "fork",
7839
7840
  "edit-and-rerun",
@@ -7862,6 +7863,10 @@ var AgentSessionCommandSchema = z5.discriminatedUnion("commandType", [
7862
7863
  sessionCommand("retry", {
7863
7864
  sourceEventId: ContractIdentifierSchema
7864
7865
  }),
7866
+ sessionCommand("retry-summary", {
7867
+ sourceEventId: ContractIdentifierSchema,
7868
+ sourceRunId: ContractIdentifierSchema
7869
+ }),
7865
7870
  sessionCommand("approval", {
7866
7871
  approvalId: ContractIdentifierSchema,
7867
7872
  decision: z5.enum(["approved", "rejected"]),
@@ -7882,7 +7887,7 @@ var AgentSessionCommandSchema = z5.discriminatedUnion("commandType", [
7882
7887
  }),
7883
7888
  sessionCommand("steer", {
7884
7889
  targetRunId: ContractIdentifierSchema,
7885
- guidanceParts: z5.array(JsonValueSchema).min(1)
7890
+ text: z5.string().trim().min(1)
7886
7891
  })
7887
7892
  ]).superRefine((value, context) => {
7888
7893
  if (value.commandType === "steer" && value.runId !== value.payload.targetRunId) {
@@ -7892,6 +7897,13 @@ var AgentSessionCommandSchema = z5.discriminatedUnion("commandType", [
7892
7897
  message: "Steering targetRunId must match the command runId."
7893
7898
  });
7894
7899
  }
7900
+ if (value.commandType === "retry-summary" && value.runId !== value.payload.sourceRunId) {
7901
+ context.addIssue({
7902
+ code: "custom",
7903
+ path: ["payload", "sourceRunId"],
7904
+ message: "Summary retry sourceRunId must match the command runId."
7905
+ });
7906
+ }
7895
7907
  });
7896
7908
  var AgentSessionTargetedCommandSchema = AgentSessionCommandSchema.and(
7897
7909
  z5.object({ runId: ContractIdentifierSchema })
@@ -7899,6 +7911,7 @@ var AgentSessionTargetedCommandSchema = AgentSessionCommandSchema.and(
7899
7911
  var AgentSessionCommandErrorCodeSchema = z5.enum([
7900
7912
  "SESSION_NOT_FOUND",
7901
7913
  "RUN_NOT_FOUND",
7914
+ "ACTIVE_RUN_NOT_FOUND",
7902
7915
  "RUN_ALREADY_FINISHED",
7903
7916
  "STOP_TIMEOUT",
7904
7917
  "COMMAND_NOT_SUPPORTED",
@@ -8019,6 +8032,14 @@ var AGENT_SESSION_COMMAND_POLICIES = Object.freeze({
8019
8032
  idempotencyScope: "session-command",
8020
8033
  sequenceRule: "match-current"
8021
8034
  }),
8035
+ "retry-summary": sessionCommandPolicy({
8036
+ capability: "summary",
8037
+ allowedStatuses: ["stopped", "completed", "failed"],
8038
+ requiresRunId: true,
8039
+ sourceSessionEffect: "preserve",
8040
+ idempotencyScope: "session-command",
8041
+ sequenceRule: "match-current"
8042
+ }),
8022
8043
  approval: sessionCommandPolicy({
8023
8044
  capability: "approval",
8024
8045
  allowedStatuses: ["waiting_approval"],
@@ -8181,6 +8202,17 @@ var AgentSessionEventSchema = z5.discriminatedUnion("eventType", [
8181
8202
  durationMs: z5.number().nonnegative().optional(),
8182
8203
  output: z5.string().optional()
8183
8204
  }),
8205
+ sessionEvent("steer", {
8206
+ commandId: ContractIdentifierSchema,
8207
+ targetRunId: ContractIdentifierSchema,
8208
+ text: z5.string().trim().min(1),
8209
+ status: z5.enum(["accepted", "applied", "failed"]),
8210
+ error: z5.object({
8211
+ code: AgentSessionCommandErrorCodeSchema,
8212
+ message: z5.string(),
8213
+ retryable: z5.boolean()
8214
+ }).strict().optional()
8215
+ }),
8184
8216
  sessionEvent("summary", {
8185
8217
  summaryId: ContractIdentifierSchema,
8186
8218
  runId: ContractIdentifierSchema,
@@ -8190,6 +8222,23 @@ var AgentSessionEventSchema = z5.discriminatedUnion("eventType", [
8190
8222
  status: z5.enum(["generating", "completed", "failed"])
8191
8223
  })
8192
8224
  ]).superRefine((value, context) => {
8225
+ if (value.eventType === "steer") {
8226
+ if (value.runId !== value.payload.targetRunId) {
8227
+ context.addIssue({
8228
+ code: "custom",
8229
+ path: ["payload", "targetRunId"],
8230
+ message: "Steering payload targetRunId must match the event runId."
8231
+ });
8232
+ }
8233
+ const requiresError = value.payload.status === "failed";
8234
+ if (requiresError !== Boolean(value.payload.error)) {
8235
+ context.addIssue({
8236
+ code: "custom",
8237
+ path: ["payload", "error"],
8238
+ message: requiresError ? "Failed steering events require an error." : "Accepted and applied steering events must not contain an error."
8239
+ });
8240
+ }
8241
+ }
8193
8242
  if (value.eventType === "summary" && value.runId !== value.payload.runId) {
8194
8243
  context.addIssue({
8195
8244
  code: "custom",