geo-ai-search-optimization 1.2.13 → 1.2.15
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/README.md +58 -0
- package/package.json +1 -1
- package/resources/geo-ai-search-optimization/references/skill-bundle-map.md +20 -0
- package/resources/geo-ai-search-optimization-agent-checkpoint/SKILL.md +23 -0
- package/resources/geo-ai-search-optimization-agent-checkpoint/agents/openai.yaml +4 -0
- package/resources/geo-ai-search-optimization-agent-decision-log/SKILL.md +23 -0
- package/resources/geo-ai-search-optimization-agent-decision-log/agents/openai.yaml +4 -0
- package/resources/geo-ai-search-optimization-usage/SKILL.md +24 -14
- package/src/agent-checkpoint.js +378 -0
- package/src/agent-decision-log.js +368 -0
- package/src/agent-progress-tracker.js +70 -0
- package/src/agent-session.js +20 -0
- package/src/agent-status-board.js +35 -0
- package/src/auto-flow.js +67 -0
- package/src/cli.js +72 -0
- package/src/index.js +2 -0
- package/src/skills.js +6 -0
package/src/cli.js
CHANGED
|
@@ -14,6 +14,8 @@ import {
|
|
|
14
14
|
renderAgentProgressTrackerMarkdown,
|
|
15
15
|
writeAgentProgressTrackerOutput
|
|
16
16
|
} from "./agent-progress-tracker.js";
|
|
17
|
+
import { createAgentCheckpoint, renderAgentCheckpointMarkdown, writeAgentCheckpointOutput } from "./agent-checkpoint.js";
|
|
18
|
+
import { createAgentDecisionLog, renderAgentDecisionLogMarkdown, writeAgentDecisionLogOutput } from "./agent-decision-log.js";
|
|
17
19
|
import { createAgentStatusBoard, renderAgentStatusBoardMarkdown, writeAgentStatusBoardOutput } from "./agent-status-board.js";
|
|
18
20
|
import { createAgentRunbook, renderAgentRunbookMarkdown, writeAgentRunbookOutput } from "./agent-runbook.js";
|
|
19
21
|
import { createAgentSession, renderAgentSessionMarkdown, writeAgentSessionOutput } from "./agent-session.js";
|
|
@@ -79,6 +81,8 @@ function printHelp() {
|
|
|
79
81
|
" geo-ai-search-optimization agent-batch-executor <input> [--intent <auto|diagnose|guide|execute|share|closeout>] [--task <id>] [--count <count>] [--format <markdown|json>] [--out <file>]",
|
|
80
82
|
" geo-ai-search-optimization agent-progress-tracker <input> [--current <id>] [--completed <id,id>] [--blocked <reason,reason>] [--format <markdown|json>] [--out <file>]",
|
|
81
83
|
" geo-ai-search-optimization agent-status-board <input> [--current <id>] [--completed <id,id>] [--blocked <reason,reason>] [--format <markdown|json>] [--out <file>]",
|
|
84
|
+
" geo-ai-search-optimization agent-checkpoint <input> [--current <id>] [--completed <id,id>] [--blocked <reason,reason>] [--format <markdown|json>] [--out <file>]",
|
|
85
|
+
" geo-ai-search-optimization agent-decision-log <input> [--append-from <file>] [--note <text>] [--current <id>] [--completed <id,id>] [--blocked <reason,reason>] [--format <markdown|json>] [--out <file>]",
|
|
82
86
|
" geo-ai-search-optimization skills [--json]",
|
|
83
87
|
" geo-ai-search-optimization where",
|
|
84
88
|
" geo-ai-search-optimization doctor [--json]",
|
|
@@ -333,6 +337,64 @@ async function handleAgentStatusBoard(args) {
|
|
|
333
337
|
process.stdout.write(renderedOutput);
|
|
334
338
|
}
|
|
335
339
|
|
|
340
|
+
async function handleAgentCheckpoint(args) {
|
|
341
|
+
const input = args.find((value) => !value.startsWith("-"));
|
|
342
|
+
if (!input) {
|
|
343
|
+
throw new Error("agent-checkpoint 需要一个输入值,可以是项目路径、网站网址或已导出的工件");
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
const format = getFlagValue(args, "--format") || (hasFlag(args, "--json") ? "json" : undefined);
|
|
347
|
+
const checkpoint = await createAgentCheckpoint(input, {
|
|
348
|
+
format,
|
|
349
|
+
currentTaskId: getFlagValue(args, "--current"),
|
|
350
|
+
completedPacketIds: getFlagValue(args, "--completed"),
|
|
351
|
+
blockedReasons: getFlagValue(args, "--blocked")
|
|
352
|
+
});
|
|
353
|
+
const outputJson = checkpoint.format === "json";
|
|
354
|
+
const renderedOutput = outputJson
|
|
355
|
+
? `${JSON.stringify(checkpoint, null, 2)}\n`
|
|
356
|
+
: renderAgentCheckpointMarkdown(checkpoint);
|
|
357
|
+
|
|
358
|
+
const outputPath = getFlagValue(args, "--out");
|
|
359
|
+
if (outputPath) {
|
|
360
|
+
const resolvedOutputPath = await writeAgentCheckpointOutput(outputPath, renderedOutput);
|
|
361
|
+
process.stdout.write(`已保存 agent checkpoint:${resolvedOutputPath}\n`);
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
process.stdout.write(renderedOutput);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
async function handleAgentDecisionLog(args) {
|
|
369
|
+
const input = args.find((value) => !value.startsWith("-"));
|
|
370
|
+
if (!input) {
|
|
371
|
+
throw new Error("agent-decision-log 需要一个输入值,可以是项目路径、网站网址或已导出的工件");
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
const format = getFlagValue(args, "--format") || (hasFlag(args, "--json") ? "json" : undefined);
|
|
375
|
+
const decisionLog = await createAgentDecisionLog(input, {
|
|
376
|
+
format,
|
|
377
|
+
appendFrom: getFlagValue(args, "--append-from"),
|
|
378
|
+
note: getFlagValue(args, "--note"),
|
|
379
|
+
currentTaskId: getFlagValue(args, "--current"),
|
|
380
|
+
completedPacketIds: getFlagValue(args, "--completed"),
|
|
381
|
+
blockedReasons: getFlagValue(args, "--blocked")
|
|
382
|
+
});
|
|
383
|
+
const outputJson = decisionLog.format === "json";
|
|
384
|
+
const renderedOutput = outputJson
|
|
385
|
+
? `${JSON.stringify(decisionLog, null, 2)}\n`
|
|
386
|
+
: renderAgentDecisionLogMarkdown(decisionLog);
|
|
387
|
+
|
|
388
|
+
const outputPath = getFlagValue(args, "--out");
|
|
389
|
+
if (outputPath) {
|
|
390
|
+
const resolvedOutputPath = await writeAgentDecisionLogOutput(outputPath, renderedOutput);
|
|
391
|
+
process.stdout.write(`已保存 agent decision log:${resolvedOutputPath}\n`);
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
process.stdout.write(renderedOutput);
|
|
396
|
+
}
|
|
397
|
+
|
|
336
398
|
function handleWhere() {
|
|
337
399
|
process.stdout.write(
|
|
338
400
|
[
|
|
@@ -908,6 +970,16 @@ export async function runCli(args = []) {
|
|
|
908
970
|
return;
|
|
909
971
|
}
|
|
910
972
|
|
|
973
|
+
if (command === "agent-checkpoint") {
|
|
974
|
+
await handleAgentCheckpoint(rest);
|
|
975
|
+
return;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
if (command === "agent-decision-log") {
|
|
979
|
+
await handleAgentDecisionLog(rest);
|
|
980
|
+
return;
|
|
981
|
+
}
|
|
982
|
+
|
|
911
983
|
if (command === "skills") {
|
|
912
984
|
await handleSkills(rest);
|
|
913
985
|
return;
|
package/src/index.js
CHANGED
|
@@ -8,6 +8,8 @@ export {
|
|
|
8
8
|
export { createAutoFlow, renderAutoFlowMarkdown, writeAutoFlowOutput } from "./auto-flow.js";
|
|
9
9
|
export { createApplyPlan, renderApplyPlanMarkdown, writeApplyPlanOutput } from "./apply-plan.js";
|
|
10
10
|
export { createAgentBatchExecutor, renderAgentBatchExecutorMarkdown, writeAgentBatchExecutorOutput } from "./agent-batch-executor.js";
|
|
11
|
+
export { createAgentCheckpoint, renderAgentCheckpointMarkdown, writeAgentCheckpointOutput } from "./agent-checkpoint.js";
|
|
12
|
+
export { createAgentDecisionLog, renderAgentDecisionLogMarkdown, writeAgentDecisionLogOutput } from "./agent-decision-log.js";
|
|
11
13
|
export { createAgentHandoff, renderAgentHandoffMarkdown, writeAgentHandoffOutput } from "./agent-handoff.js";
|
|
12
14
|
export { createAgentExecutor, renderAgentExecutorMarkdown, writeAgentExecutorOutput } from "./agent-executor.js";
|
|
13
15
|
export {
|
package/src/skills.js
CHANGED
|
@@ -11,6 +11,8 @@ const SKILL_ORDER = [
|
|
|
11
11
|
"geo-ai-search-optimization-agent-batch-executor",
|
|
12
12
|
"geo-ai-search-optimization-agent-progress-tracker",
|
|
13
13
|
"geo-ai-search-optimization-agent-status-board",
|
|
14
|
+
"geo-ai-search-optimization-agent-checkpoint",
|
|
15
|
+
"geo-ai-search-optimization-agent-decision-log",
|
|
14
16
|
"geo-ai-search-optimization-usage",
|
|
15
17
|
"geo-ai-search-optimization-agent-handoff",
|
|
16
18
|
"geo-ai-search-optimization-repair-loop",
|
|
@@ -31,6 +33,8 @@ const SKILL_CATEGORY = {
|
|
|
31
33
|
"geo-ai-search-optimization-agent-batch-executor": "execution",
|
|
32
34
|
"geo-ai-search-optimization-agent-progress-tracker": "execution",
|
|
33
35
|
"geo-ai-search-optimization-agent-status-board": "execution",
|
|
36
|
+
"geo-ai-search-optimization-agent-checkpoint": "execution",
|
|
37
|
+
"geo-ai-search-optimization-agent-decision-log": "execution",
|
|
34
38
|
"geo-ai-search-optimization-usage": "guidance",
|
|
35
39
|
"geo-ai-search-optimization-agent-handoff": "execution",
|
|
36
40
|
"geo-ai-search-optimization-repair-loop": "execution",
|
|
@@ -170,6 +174,8 @@ export function renderBundledSkillsMarkdown(bundle) {
|
|
|
170
174
|
"- 如果要连续推进前 2 到 3 包,但仍然一次只做一包,再进入 agent-batch-executor。",
|
|
171
175
|
"- 如果要追踪目前做到第几包、卡在哪、下一包是什么,再进入 agent-progress-tracker。",
|
|
172
176
|
"- 如果要把当前执行状态直接整理成看板,再进入 agent-status-board。",
|
|
177
|
+
"- 如果要在每轮结束时做继续 / 阻塞 / 收尾决策,再进入 agent-checkpoint。",
|
|
178
|
+
"- 如果要把多轮决策沉淀成可继承的历史,再进入 agent-decision-log。",
|
|
173
179
|
"- 再看 usage skill,知道什么时候该跑哪个命令。",
|
|
174
180
|
"- 如果要交给 agent 执行,再进入 handoff / apply / completion 这一条执行链。",
|
|
175
181
|
"- 如果要产出给团队分发,再进入 share / export / html / publish 这一条交付链。",
|