@kenkaiiii/ggcoder 5.66.0 → 5.66.2
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/assets/motion/bin/motion-check.mjs +12 -6
- package/assets/motion/skills/motion/SKILL.md +4 -2
- package/assets/motion/skills/video-qa/SKILL.md +3 -2
- package/dist/core/agent-session.d.ts +10 -3
- package/dist/core/agent-session.js +14 -4
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/ideal-review-subagent.d.ts +16 -2
- package/dist/core/ideal-review-subagent.js +19 -2
- package/dist/core/ideal-review-subagent.js.map +1 -1
- package/dist/core/subagent-manager.d.ts +3 -1
- package/dist/core/subagent-manager.js +3 -1
- package/dist/core/subagent-manager.js.map +1 -1
- package/dist/modes/subagent-worker-mode.d.ts +18 -1
- package/dist/modes/subagent-worker-mode.js +37 -14
- package/dist/modes/subagent-worker-mode.js.map +1 -1
- package/dist/motion-agent/motion-check-tool.d.ts +12 -0
- package/dist/motion-agent/motion-check-tool.js +149 -17
- package/dist/motion-agent/motion-check-tool.js.map +1 -1
- package/dist/motion-agent/motion-prompt.d.ts +1 -1
- package/dist/motion-agent/motion-prompt.js +1 -1
- package/dist/tools/subagent-shared.d.ts +5 -0
- package/dist/tools/subagent-shared.js +5 -0
- package/dist/tools/subagent-shared.js.map +1 -1
- package/package.json +4 -4
|
@@ -102,12 +102,18 @@ export function parseMotionOutput(text, slideshowRequested = false, holds = [])
|
|
|
102
102
|
error:
|
|
103
103
|
"Holds cannot exempt the entire video; explicitly requested slideshows use their own mode",
|
|
104
104
|
};
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
const staleHolds = holds.filter(
|
|
106
|
+
(hold) => !freezes.some((freeze) => freeze.end > hold.start && freeze.start < hold.end),
|
|
107
|
+
);
|
|
108
|
+
// Name the stale holds and where pixels actually freeze, so the plan is fixed in one
|
|
109
|
+
// step instead of guessed again against another full check.
|
|
110
|
+
if (staleHolds.length)
|
|
111
|
+
return {
|
|
112
|
+
ok: false,
|
|
113
|
+
error: "Stale hold declaration: no detected freeze overlaps its window",
|
|
114
|
+
staleHolds,
|
|
115
|
+
freezes,
|
|
116
|
+
};
|
|
111
117
|
const unexpectedFreezes = freezes.filter(
|
|
112
118
|
(freeze) =>
|
|
113
119
|
!holds.some(
|
|
@@ -81,7 +81,9 @@ images yourself against the `Concept` and `Language` in `frame.md`. That one too
|
|
|
81
81
|
runs the technical checks; do not repeat them or ask another model to review
|
|
82
82
|
them.
|
|
83
83
|
|
|
84
|
-
Fix concrete defects
|
|
85
|
-
|
|
84
|
+
Fix concrete defects and render. For a targeted fix or small edit, spot-check
|
|
85
|
+
the changed moments first (`spot: true`), then run one full check on the export
|
|
86
|
+
you deliver. An unchanged export needs no repeated checking unless its hold plan
|
|
87
|
+
changed. Deliver the MP4, reveal it and state real limits.
|
|
86
88
|
Sampled frames are not full playback or audio listening; technical success is
|
|
87
89
|
not proof of visual quality.
|
|
@@ -17,6 +17,7 @@ Call `motion_check` with:
|
|
|
17
17
|
- `holds`: only when the video has a deliberate static section (an end card, reading hold or pause you designed), the path to its render-bound hold plan (format below). Write it before this first call; an undeclared deliberate hold is flagged as frozen and costs a second full check.
|
|
18
18
|
- `slideshowRequested`: true only when the user actually requested a slideshow; never use it to hide broken motion.
|
|
19
19
|
- `range`: only for an export longer than 180 seconds or a targeted diagnostic, a start/end range of at most 180 seconds. Report the inspected range honestly; do not claim full-video visual coverage.
|
|
20
|
+
- `spot`: true for a quick check of a targeted fix or small edit. Put short `windows` around the moments you changed, at most 240 rendered frames in total (4 s at 60 fps). The layout check then covers every rendered frame inside them, far faster than the full check, while the pixel, hold and audio checks still cover the whole export. A spot result is never delivery verification: once it is clean, run the full check (without `spot`) once on the export you deliver.
|
|
20
21
|
|
|
21
22
|
The tool runs HyperFrames `check` (which already includes lint), decoded-pixel analysis with `motion-check.mjs` including canvas/WebGL, and audio analysis only when audio exists. It returns technical results and actual rendered overview, phone-size and consecutive-frame images **to you**, the working agent.
|
|
22
23
|
|
|
@@ -38,7 +39,7 @@ If the tool fails, its check details list each problem with where and when it oc
|
|
|
38
39
|
|
|
39
40
|
## 3. Fix only a concrete defect
|
|
40
41
|
|
|
41
|
-
A failed check or visibly wrong output warrants a targeted fix, a new versioned render and a check of
|
|
42
|
+
A failed check or visibly wrong output warrants a targeted fix, a new versioned render and a spot check of the fixed moments, then one full check once they are clean. An unchanged export does not need checking again unless you corrected its hold plan; that re-check reuses the passing source audit, so it is quick. Do not iterate toward subjective perfection or route the result to another reviewer. Report an unresolved blocker as draft/unverified rather than looping indefinitely or declaring success.
|
|
42
43
|
|
|
43
44
|
The tool measures audio and rejects non-finite levels or clipping; it does not normalize the file. Follow the user's delivery loudness target when they give one. Do not add audio to silent work or force every supplied animation through a generic -14 LUFS mix.
|
|
44
45
|
|
|
@@ -54,7 +55,7 @@ Declare only deliberate static intervals: an end card, a reading hold or another
|
|
|
54
55
|
}
|
|
55
56
|
```
|
|
56
57
|
|
|
57
|
-
Do not mark the whole video as a hold to suppress broken animation. Retain any existing meaningful motion assertions; do not invent a new assertion sidecar for every video.
|
|
58
|
+
When a hold is stale, the check lists where the pixels actually freeze; correct the plan from those times instead of guessing. Do not mark the whole video as a hold to suppress broken animation. Retain any existing meaningful motion assertions; do not invent a new assertion sidecar for every video.
|
|
58
59
|
|
|
59
60
|
## 4. Deliver
|
|
60
61
|
|
|
@@ -21,6 +21,13 @@ export interface SessionAttachment {
|
|
|
21
21
|
name: string;
|
|
22
22
|
path?: string;
|
|
23
23
|
}
|
|
24
|
+
/** Per-prompt run controls. */
|
|
25
|
+
export interface PromptRunOptions {
|
|
26
|
+
/** Offer the model no tools for this prompt. */
|
|
27
|
+
disableTools?: boolean;
|
|
28
|
+
/** Hold reasoning effort at the plan-mode ceiling for this prompt. */
|
|
29
|
+
capThinking?: boolean;
|
|
30
|
+
}
|
|
24
31
|
export interface AgentSessionOptions {
|
|
25
32
|
provider: Provider;
|
|
26
33
|
model: string;
|
|
@@ -477,10 +484,10 @@ export declare class AgentSession {
|
|
|
477
484
|
willExpandPromptTemplate(content: string): Promise<boolean>;
|
|
478
485
|
/**
|
|
479
486
|
* Process user input. Handles slash commands or runs agent loop.
|
|
487
|
+
* `capThinking` holds reasoning effort at the plan-mode ceiling for this
|
|
488
|
+
* prompt — for turns that must answer quickly from what is already known.
|
|
480
489
|
*/
|
|
481
|
-
prompt(content: string, provenance?: MessageProvenance, options?:
|
|
482
|
-
disableTools?: boolean;
|
|
483
|
-
}): Promise<void>;
|
|
490
|
+
prompt(content: string, provenance?: MessageProvenance, options?: PromptRunOptions): Promise<void>;
|
|
484
491
|
/**
|
|
485
492
|
* Prompt with multimodal attachments (images / videos) alongside optional
|
|
486
493
|
* text. Images and videos become native content blocks the model can see;
|
|
@@ -48,7 +48,7 @@ import { evaluateIdealReview, buildIdealReviewMessage, buildReviewCoverageEscala
|
|
|
48
48
|
import { evaluateLoopBreak, buildLoopBreakMessage, CycleDetector, ToolCallProgressTracker, detectTextRepetition, } from "./loop-breaker.js";
|
|
49
49
|
import { buildRegroundingMessage, requestTextForRegrounding } from "./regrounding.js";
|
|
50
50
|
import { buildSemanticLoopJudgePrompt, buildSemanticLoopMessage, MAX_SEMANTIC_LOOP_CALLS, parseSemanticLoopVerdict, shouldRunSemanticLoopCheck, SEMANTIC_LOOP_JUDGE_TIMEOUT_MS, withJudgeTimeout, } from "./semantic-loop-check.js";
|
|
51
|
-
import { buildIndependentReviewMessage, buildReviewerTask, INDEPENDENT_REVIEW_SCORE_THRESHOLD, parseReviewerFindings, REVIEWER_TOOLS, REVIEWER_WAIT_MS, } from "./ideal-review-subagent.js";
|
|
51
|
+
import { buildIndependentReviewMessage, buildReviewerTask, INDEPENDENT_REVIEW_SCORE_THRESHOLD, parseReviewerFindings, REVIEWER_TOOLS, REVIEWER_TURN_TIMEOUT_MS, REVIEWER_WAIT_MS, } from "./ideal-review-subagent.js";
|
|
52
52
|
import { buildEnvDeltaMessage } from "./env-delta.js";
|
|
53
53
|
import { wrapSteeringText, buildNotificationSteeringText, STEERING_PREFIX } from "./steering.js";
|
|
54
54
|
import { AgentNotificationQueue } from "./agent-notifications.js";
|
|
@@ -911,6 +911,8 @@ export class AgentSession {
|
|
|
911
911
|
}
|
|
912
912
|
/**
|
|
913
913
|
* Process user input. Handles slash commands or runs agent loop.
|
|
914
|
+
* `capThinking` holds reasoning effort at the plan-mode ceiling for this
|
|
915
|
+
* prompt — for turns that must answer quickly from what is already known.
|
|
914
916
|
*/
|
|
915
917
|
async prompt(content, provenance = {
|
|
916
918
|
source: "human",
|
|
@@ -1645,9 +1647,12 @@ export class AgentSession {
|
|
|
1645
1647
|
triggerReasons: decision.reasons,
|
|
1646
1648
|
});
|
|
1647
1649
|
// Active model forced at spawn time — never routed to a fast/review model.
|
|
1650
|
+
// The reviewer's own time limit ends it with a verdict on what it read;
|
|
1651
|
+
// the wait below is only a backstop against a hung child.
|
|
1648
1652
|
const snapshot = await this.subAgentManager.spawn(taskName, task, undefined, {
|
|
1649
1653
|
model: this.model,
|
|
1650
1654
|
tools: REVIEWER_TOOLS,
|
|
1655
|
+
turnTimeoutMs: REVIEWER_TURN_TIMEOUT_MS,
|
|
1651
1656
|
});
|
|
1652
1657
|
agentId = snapshot.agent_id;
|
|
1653
1658
|
const waited = await this.subAgentManager.wait([agentId], "all", REVIEWER_WAIT_MS);
|
|
@@ -1663,7 +1668,11 @@ export class AgentSession {
|
|
|
1663
1668
|
}
|
|
1664
1669
|
const findings = parseReviewerFindings(agent.output ?? "");
|
|
1665
1670
|
if (!findings) {
|
|
1666
|
-
log("WARN", "ideal", "Independent reviewer output unparseable; falling back", {
|
|
1671
|
+
log("WARN", "ideal", "Independent reviewer output unparseable; falling back", {
|
|
1672
|
+
agentId,
|
|
1673
|
+
state: agent.state,
|
|
1674
|
+
...(agent.error ? { error: agent.error } : {}),
|
|
1675
|
+
});
|
|
1667
1676
|
return [];
|
|
1668
1677
|
}
|
|
1669
1678
|
if (findings.clean) {
|
|
@@ -2132,8 +2141,9 @@ export class AgentSession {
|
|
|
2132
2141
|
// Plan mode caps effort at medium (Codex `plan_mode_reasoning_effort`
|
|
2133
2142
|
// preset): read-only exploration doesn't need xhigh/max reasoning, and
|
|
2134
2143
|
// deep-reasoning models left at the ceiling burn enormous thinking
|
|
2135
|
-
// budgets re-deriving context they cannot act on.
|
|
2136
|
-
|
|
2144
|
+
// budgets re-deriving context they cannot act on. A capped prompt
|
|
2145
|
+
// (a sub-agent's timed answer) gets the same ceiling for the same reason.
|
|
2146
|
+
thinking: this.planModeRef.current || options.capThinking
|
|
2137
2147
|
? clampThinkingForPlanMode(this.thinkingLevel)
|
|
2138
2148
|
: this.thinkingLevel,
|
|
2139
2149
|
apiKey,
|