@inf-monkeys-tech/monkeys 1.0.26 → 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.
package/lib/esm/index.mjs CHANGED
@@ -6806,7 +6806,7 @@ var AGENT_SESSION_CAPABILITY_EVIDENCE = Object.freeze({
6806
6806
  threadForking: { eventTypes: [], commandTypes: ["fork"] },
6807
6807
  editAndRerun: { eventTypes: [], commandTypes: ["edit-and-rerun"] },
6808
6808
  steering: { eventTypes: ["steer"], commandTypes: ["steer"] },
6809
- summary: { eventTypes: ["summary"], commandTypes: [] }
6809
+ summary: { eventTypes: ["summary"], commandTypes: ["retry-summary"] }
6810
6810
  });
6811
6811
  function findUnsupportedAgentSessionCapabilities(capabilities, evidence) {
6812
6812
  const eventTypes = new Set(evidence.eventTypes || []);
@@ -6949,6 +6949,7 @@ var AgentSessionCommandTypeSchema = z3.enum([
6949
6949
  "stop",
6950
6950
  "resume",
6951
6951
  "retry",
6952
+ "retry-summary",
6952
6953
  "approval",
6953
6954
  "fork",
6954
6955
  "edit-and-rerun",
@@ -6977,6 +6978,10 @@ var AgentSessionCommandSchema = z3.discriminatedUnion("commandType", [
6977
6978
  sessionCommand("retry", {
6978
6979
  sourceEventId: ContractIdentifierSchema
6979
6980
  }),
6981
+ sessionCommand("retry-summary", {
6982
+ sourceEventId: ContractIdentifierSchema,
6983
+ sourceRunId: ContractIdentifierSchema
6984
+ }),
6980
6985
  sessionCommand("approval", {
6981
6986
  approvalId: ContractIdentifierSchema,
6982
6987
  decision: z3.enum(["approved", "rejected"]),
@@ -7007,6 +7012,13 @@ var AgentSessionCommandSchema = z3.discriminatedUnion("commandType", [
7007
7012
  message: "Steering targetRunId must match the command runId."
7008
7013
  });
7009
7014
  }
7015
+ if (value.commandType === "retry-summary" && value.runId !== value.payload.sourceRunId) {
7016
+ context.addIssue({
7017
+ code: "custom",
7018
+ path: ["payload", "sourceRunId"],
7019
+ message: "Summary retry sourceRunId must match the command runId."
7020
+ });
7021
+ }
7010
7022
  });
7011
7023
  var AgentSessionTargetedCommandSchema = AgentSessionCommandSchema.and(
7012
7024
  z3.object({ runId: ContractIdentifierSchema })
@@ -7107,6 +7119,7 @@ var AGENT_SESSION_COMMAND_TRANSITIONS = {
7107
7119
  stop: { queued: "stopping", running: "stopping", waiting_approval: "stopping" },
7108
7120
  resume: { stopped: "queued", completed: "queued", failed: "queued" },
7109
7121
  retry: { failed: "queued" },
7122
+ "retry-summary": {},
7110
7123
  approval: { waiting_approval: "running" },
7111
7124
  fork: {},
7112
7125
  "edit-and-rerun": {},
@@ -7144,6 +7157,14 @@ var AGENT_SESSION_COMMAND_POLICIES = Object.freeze({
7144
7157
  idempotencyScope: "session-command",
7145
7158
  sequenceRule: "match-current"
7146
7159
  }),
7160
+ "retry-summary": sessionCommandPolicy({
7161
+ capability: "summary",
7162
+ allowedStatuses: ["stopped", "completed", "failed"],
7163
+ requiresRunId: true,
7164
+ sourceSessionEffect: "preserve",
7165
+ idempotencyScope: "session-command",
7166
+ sequenceRule: "match-current"
7167
+ }),
7147
7168
  approval: sessionCommandPolicy({
7148
7169
  capability: "approval",
7149
7170
  allowedStatuses: ["waiting_approval"],