@clawtopia/werewolf-evolution 0.1.7 → 0.1.8
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/dist/index.d.ts +1 -1
- package/dist/index.js +22 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -585,7 +585,7 @@ var proposalSchema = z2.object({
|
|
|
585
585
|
schemaVersion: z2.literal(1),
|
|
586
586
|
action: z2.enum(["SKIP", "SUPPORT", "COUNTER", "REFINE", "NEW"]),
|
|
587
587
|
source: z2.enum(["SELF", "OBSERVED", "EXEMPLAR"]),
|
|
588
|
-
topicId: z2.string().regex(SAFE_TOPIC).
|
|
588
|
+
topicId: z2.string().regex(SAFE_TOPIC).optional(),
|
|
589
589
|
profile: z2.string().regex(SAFE_PROFILE2).optional(),
|
|
590
590
|
decisionWindowId: z2.string().min(1).max(200).optional(),
|
|
591
591
|
decisionType: z2.string().regex(SAFE_TOKEN).optional(),
|
|
@@ -2747,7 +2747,18 @@ var WerewolfEvolutionService = class {
|
|
|
2747
2747
|
`stateAvailable=${stateAvailable}`,
|
|
2748
2748
|
"The proposal profile must equal activeProfile. The Arena envelope is not the profile authority.",
|
|
2749
2749
|
"Scan SELF, OBSERVED, and EXEMPLAR, then submit at most one SKIP/SUPPORT/COUNTER/REFINE/NEW proposal.",
|
|
2750
|
-
"
|
|
2750
|
+
"Proposal action contract:",
|
|
2751
|
+
"- When existingTopics=[] choose only NEW or SKIP. SUPPORT/COUNTER/REFINE are invalid without an existing topic.",
|
|
2752
|
+
"- NEW must omit topicId entirely. SUPPORT/COUNTER/REFINE require an existing topicId copied exactly from existingTopics.",
|
|
2753
|
+
"- When existingTopics is not empty, prefer a matching existing topic over NEW; never invent or guess a topicId.",
|
|
2754
|
+
"Proposal field contract:",
|
|
2755
|
+
"- SKIP contains only schemaVersion, action, source, and a concrete skipReason.",
|
|
2756
|
+
"- Every non-SKIP proposal must provide profile, decisionWindowId, decisionType, alternativeActionType, anchorFactId, knownFactRefs, outcomeFactRefs, trigger, rule, boundary, behavior, alternativeAction, expectedLocalEffect, observedLocalEffect, falsifier, and alternatives.",
|
|
2757
|
+
"- Never send null for an omitted field. Omit the key instead. alternativeTargetSeat may be null only to represent an explicit DAY_VOTE abstention.",
|
|
2758
|
+
"Execution versus strategy contract:",
|
|
2759
|
+
"- executionOperation must be one of the exact template operations. To claim execution risk, copy that template's operation, decisionType, trigger, rule, boundary, and alternativeAction exactly.",
|
|
2760
|
+
"- Strategy proposals must omit executionOperation. CHOOSE_VOTE_TARGET and CHOOSE_ROLE_CLAIM_TIMING are decision types, never executionOperation values.",
|
|
2761
|
+
"Call werewolf_debrief_commit exactly once after checking the complete proposal against this contract.",
|
|
2751
2762
|
"After the tool returns, regardless of accepted or rejected status, return exactly NO_REPLY. Never retry the tool call.",
|
|
2752
2763
|
"Do not return NO_REPLY before werewolf_debrief_commit returns a result.",
|
|
2753
2764
|
"Never use generic write, edit, patch, shell, or memory-write tools for debrief state."
|
|
@@ -2946,7 +2957,9 @@ var proposalParameters = Type.Object({
|
|
|
2946
2957
|
schemaVersion: Type.Literal(1),
|
|
2947
2958
|
action: Type.Union(["SKIP", "SUPPORT", "COUNTER", "REFINE", "NEW"].map((value) => Type.Literal(value))),
|
|
2948
2959
|
source: Type.Union(["SELF", "OBSERVED", "EXEMPLAR"].map((value) => Type.Literal(value))),
|
|
2949
|
-
topicId: Type.Optional(Type.
|
|
2960
|
+
topicId: Type.Optional(Type.String({
|
|
2961
|
+
description: "Existing lesson id for SUPPORT, COUNTER, or REFINE. Omit for NEW and SKIP; never send null."
|
|
2962
|
+
})),
|
|
2950
2963
|
profile: Type.Optional(Type.String()),
|
|
2951
2964
|
decisionWindowId: Type.Optional(Type.String()),
|
|
2952
2965
|
decisionType: Type.Optional(Type.String()),
|
|
@@ -2956,7 +2969,9 @@ var proposalParameters = Type.Object({
|
|
|
2956
2969
|
Type.Literal("RETRACT_PUBLIC_JUDGMENT"),
|
|
2957
2970
|
Type.Literal("AVOID_REPEATING_PRIOR_SPEAKERS"),
|
|
2958
2971
|
Type.Literal("EXPLAIN_DECIDED_WOLF_TARGET")
|
|
2959
|
-
]
|
|
2972
|
+
], {
|
|
2973
|
+
description: "Exact operation from executionTemplates. Omit for strategy proposals; never invent an operation."
|
|
2974
|
+
})),
|
|
2960
2975
|
alternativeActionType: Type.Optional(Type.String()),
|
|
2961
2976
|
alternativeTargetSeat: Type.Optional(Type.Union([Type.Integer(), Type.Null()])),
|
|
2962
2977
|
anchorFactId: Type.Optional(Type.String()),
|
|
@@ -2969,7 +2984,9 @@ var proposalParameters = Type.Object({
|
|
|
2969
2984
|
alternativeAction: Type.Optional(Type.String()),
|
|
2970
2985
|
expectedLocalEffect: Type.Optional(Type.String()),
|
|
2971
2986
|
observedLocalEffect: Type.Optional(Type.String()),
|
|
2972
|
-
falsifier: Type.Optional(Type.String(
|
|
2987
|
+
falsifier: Type.Optional(Type.String({
|
|
2988
|
+
description: "Concrete later observation that would falsify the lesson. Required for every non-SKIP proposal."
|
|
2989
|
+
})),
|
|
2973
2990
|
alternatives: Type.Optional(Type.Array(Type.String())),
|
|
2974
2991
|
skipReason: Type.Optional(Type.String())
|
|
2975
2992
|
}, { additionalProperties: false });
|