@autopilot-harness/i18n 0.1.0
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/LICENSE +21 -0
- package/README.md +8 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +60 -0
- package/dist/index.js.map +1 -0
- package/locales/en.json +73 -0
- package/locales/zh-CN.json +73 -0
- package/package.json +42 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Autopilot Harness contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# @autopilot-harness/i18n
|
|
2
|
+
|
|
3
|
+
Locale strings for Autopilot (`en`, `zh-CN`) used by the CLI and stop-hook followups.
|
|
4
|
+
|
|
5
|
+
Most users should install **[`@autopilot-harness/cli`](https://www.npmjs.com/package/@autopilot-harness/cli)** instead of depending on this package directly.
|
|
6
|
+
|
|
7
|
+
- Repo: [mt2007/autopilot-harness](https://github.com/mt2007/autopilot-harness)
|
|
8
|
+
- License: MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import en from "../locales/en.json";
|
|
2
|
+
import zhCN from "../locales/zh-CN.json";
|
|
3
|
+
export type LocaleCode = "en" | "zh-CN";
|
|
4
|
+
export type LocaleBundle = typeof en;
|
|
5
|
+
export declare function isLocaleCode(code: string): code is LocaleCode;
|
|
6
|
+
export declare function loadLocale(code: string): LocaleBundle;
|
|
7
|
+
export declare function supportedLocales(): LocaleCode[];
|
|
8
|
+
/** Slash skill folder name → i18n skill key. */
|
|
9
|
+
export declare const SKILL_I18N_KEYS: {
|
|
10
|
+
readonly "autopilot-on": "autopilot_on";
|
|
11
|
+
readonly "autopilot-run": "autopilot_run";
|
|
12
|
+
readonly "autopilot-off": "autopilot_off";
|
|
13
|
+
readonly "autopilot-resume": "autopilot_resume";
|
|
14
|
+
readonly "autopilot-replan": "autopilot_replan";
|
|
15
|
+
};
|
|
16
|
+
export type SkillFolderName = keyof typeof SKILL_I18N_KEYS;
|
|
17
|
+
export declare function skillDescription(locale: string, skillFolder: SkillFolderName): string;
|
|
18
|
+
export declare function skillDescriptions(locale: string): Record<SkillFolderName, string>;
|
|
19
|
+
export type TriggerKey = "on" | "run" | "off" | "resume" | "replan" | "resume_review";
|
|
20
|
+
export declare function stockTriggers(locale: string): Record<TriggerKey, string[]>;
|
|
21
|
+
/** True if both are string arrays with the same ordered values. */
|
|
22
|
+
export declare function sameStringList(a: unknown, b: unknown): boolean;
|
|
23
|
+
export { en, zhCN };
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,oBAAoB,CAAuB;AAC1D,OAAO,IAAI,MAAM,uBAAuB,CAAuB;AAE/D,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,OAAO,CAAC;AAExC,MAAM,MAAM,YAAY,GAAG,OAAO,EAAE,CAAC;AAOrC,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,UAAU,CAE7D;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAKrD;AAED,wBAAgB,gBAAgB,IAAI,UAAU,EAAE,CAE/C;AAED,gDAAgD;AAChD,eAAO,MAAM,eAAe;;;;;;CAMlB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,eAAe,CAAC;AAE3D,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,eAAe,GAC3B,MAAM,CAIR;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,GACb,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAQjC;AAED,MAAM,MAAM,UAAU,GAClB,IAAI,GACJ,KAAK,GACL,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,eAAe,CAAC;AAEpB,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,GACb,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC,CAU9B;AAED,mEAAmE;AACnE,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAK9D;AAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import en from "../locales/en.json" with { type: "json" };
|
|
2
|
+
import zhCN from "../locales/zh-CN.json" with { type: "json" };
|
|
3
|
+
const LOCALES = {
|
|
4
|
+
en,
|
|
5
|
+
"zh-CN": zhCN,
|
|
6
|
+
};
|
|
7
|
+
export function isLocaleCode(code) {
|
|
8
|
+
return code === "en" || code === "zh-CN";
|
|
9
|
+
}
|
|
10
|
+
export function loadLocale(code) {
|
|
11
|
+
if (isLocaleCode(code)) {
|
|
12
|
+
return LOCALES[code];
|
|
13
|
+
}
|
|
14
|
+
return LOCALES.en;
|
|
15
|
+
}
|
|
16
|
+
export function supportedLocales() {
|
|
17
|
+
return ["en", "zh-CN"];
|
|
18
|
+
}
|
|
19
|
+
/** Slash skill folder name → i18n skill key. */
|
|
20
|
+
export const SKILL_I18N_KEYS = {
|
|
21
|
+
"autopilot-on": "autopilot_on",
|
|
22
|
+
"autopilot-run": "autopilot_run",
|
|
23
|
+
"autopilot-off": "autopilot_off",
|
|
24
|
+
"autopilot-resume": "autopilot_resume",
|
|
25
|
+
"autopilot-replan": "autopilot_replan",
|
|
26
|
+
};
|
|
27
|
+
export function skillDescription(locale, skillFolder) {
|
|
28
|
+
const bundle = loadLocale(locale);
|
|
29
|
+
const key = SKILL_I18N_KEYS[skillFolder];
|
|
30
|
+
return bundle.skill[key].description;
|
|
31
|
+
}
|
|
32
|
+
export function skillDescriptions(locale) {
|
|
33
|
+
return {
|
|
34
|
+
"autopilot-on": skillDescription(locale, "autopilot-on"),
|
|
35
|
+
"autopilot-run": skillDescription(locale, "autopilot-run"),
|
|
36
|
+
"autopilot-off": skillDescription(locale, "autopilot-off"),
|
|
37
|
+
"autopilot-resume": skillDescription(locale, "autopilot-resume"),
|
|
38
|
+
"autopilot-replan": skillDescription(locale, "autopilot-replan"),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export function stockTriggers(locale) {
|
|
42
|
+
const t = loadLocale(locale).triggers;
|
|
43
|
+
return {
|
|
44
|
+
on: [...t.on],
|
|
45
|
+
run: [...t.run],
|
|
46
|
+
off: [...t.off],
|
|
47
|
+
resume: [...t.resume],
|
|
48
|
+
replan: [...t.replan],
|
|
49
|
+
resume_review: [...t.resume_review],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/** True if both are string arrays with the same ordered values. */
|
|
53
|
+
export function sameStringList(a, b) {
|
|
54
|
+
if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
return a.every((v, i) => v === b[i]);
|
|
58
|
+
}
|
|
59
|
+
export { en, zhCN };
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,oBAAoB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1D,OAAO,IAAI,MAAM,uBAAuB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAM/D,MAAM,OAAO,GAAqC;IAChD,EAAE;IACF,OAAO,EAAE,IAAI;CACd,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,OAAO,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;QACvB,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,OAAO,CAAC,EAAE,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,gDAAgD;AAChD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,cAAc,EAAE,cAAc;IAC9B,eAAe,EAAE,eAAe;IAChC,eAAe,EAAE,eAAe;IAChC,kBAAkB,EAAE,kBAAkB;IACtC,kBAAkB,EAAE,kBAAkB;CAC9B,CAAC;AAIX,MAAM,UAAU,gBAAgB,CAC9B,MAAc,EACd,WAA4B;IAE5B,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAClC,MAAM,GAAG,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;IACzC,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,MAAc;IAEd,OAAO;QACL,cAAc,EAAE,gBAAgB,CAAC,MAAM,EAAE,cAAc,CAAC;QACxD,eAAe,EAAE,gBAAgB,CAAC,MAAM,EAAE,eAAe,CAAC;QAC1D,eAAe,EAAE,gBAAgB,CAAC,MAAM,EAAE,eAAe,CAAC;QAC1D,kBAAkB,EAAE,gBAAgB,CAAC,MAAM,EAAE,kBAAkB,CAAC;QAChE,kBAAkB,EAAE,gBAAgB,CAAC,MAAM,EAAE,kBAAkB,CAAC;KACjE,CAAC;AACJ,CAAC;AAUD,MAAM,UAAU,aAAa,CAC3B,MAAc;IAEd,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC;IACtC,OAAO;QACL,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QACb,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;QACf,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;QACf,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC;KACpC,CAAC;AACJ,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,cAAc,CAAC,CAAU,EAAE,CAAU;IACnD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QACpE,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC;AAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC"}
|
package/locales/en.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"preferred_name": "Autopilot",
|
|
3
|
+
"cli": {
|
|
4
|
+
"help": "Autopilot Harness — Planning → Executing agent harness"
|
|
5
|
+
},
|
|
6
|
+
"triggers": {
|
|
7
|
+
"on": ["Autopilot ON", "Enable autopilot"],
|
|
8
|
+
"run": ["Autopilot RUN", "Start execution"],
|
|
9
|
+
"off": ["Autopilot OFF", "Disable autopilot"],
|
|
10
|
+
"resume": ["Autopilot RESUME"],
|
|
11
|
+
"replan": ["Autopilot REPLAN"],
|
|
12
|
+
"resume_review": ["Resume review"]
|
|
13
|
+
},
|
|
14
|
+
"skill": {
|
|
15
|
+
"autopilot_on": {
|
|
16
|
+
"description": "Start Planning — discuss what to build"
|
|
17
|
+
},
|
|
18
|
+
"autopilot_run": {
|
|
19
|
+
"description": "Start Executing — run checklist"
|
|
20
|
+
},
|
|
21
|
+
"autopilot_off": {
|
|
22
|
+
"description": "Pause Autopilot"
|
|
23
|
+
},
|
|
24
|
+
"autopilot_resume": {
|
|
25
|
+
"description": "Resume session (can claim a track into this chat)"
|
|
26
|
+
},
|
|
27
|
+
"autopilot_replan": {
|
|
28
|
+
"description": "Change the plan"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"followup": {
|
|
32
|
+
"review": {
|
|
33
|
+
"fix": "Review fix round {round} (no hard cap; confirm needs {total} consecutive no-edit rounds). Code changed this turn. Defect-first self-review and fix now: 1) when using git diff / git status, skip paths matching .autopilotignore, and skip untracked paths ignored by .gitignore; review only the remaining paths; 2) check correctness, null/boundaries, concurrency, security, regression, missing tests; 3) CRITICAL/HIGH must fix, MEDIUM preferably; 4) run relevant tests; 5) briefly state what you reviewed and changed (or \"self-review clean\"). Do not commit/push. If no further code changes, next stop enters multi-lens confirm.",
|
|
34
|
+
"confirm": "Review confirm {n}/{total} (session round {sessionRound}; consecutive no-edit confirms, counted on the fix-round counter). Lens 【{lensTitle}】 (multi-lens confirm, not the same checklist again). {lensFocus} Previous turn had no further code edits. Recheck under this lens only: 1) git diff / git status — no new edits vs prior turn (or only already-reviewed edits); likewise skip paths matching .autopilotignore and untracked paths ignored by .gitignore; judge only from remaining paths; 2) dig into this lens only; ban vague \"fully rechecked, all good\"; 3) CRITICAL/HIGH under this lens must fix; MEDIUM preferably; 4) if you edit, fix and run related tests; 5) close with: \"Lens ({lensTitle}): self-review clean\" or a short list of fixes; if clean, do not edit further. Do not commit/push.",
|
|
35
|
+
"confirm_final": "Review confirm {n}/{total} (session round {sessionRound}; consecutive no-edit confirms, counted on the fix-round counter). Lens 【{lensTitle}】 (multi-lens confirm, not the same checklist again). {lensFocus} Previous turn had no further code edits. Recheck under this lens only: 1) git diff / git status — no new edits vs prior turn (or only already-reviewed edits); likewise skip paths matching .autopilotignore and untracked paths ignored by .gitignore; judge only from remaining paths; 2) dig into this lens only; ban vague \"fully rechecked, all good\"; 3) read-only: record CRITICAL/HIGH/missing tests — do not change code, add tests, or commit; if you already edited, accept returning to a fix round; never commit this turn; 4) do not run commands that mutate the repo; 5) close with: \"Lens ({lensTitle}): self-review clean\" or list issues (no fixes); if clean, do not edit further. Do not commit/push. Handoff (commit) and next checklist item are handled by Advance/Done after the chain — not this turn."
|
|
36
|
+
},
|
|
37
|
+
"advance": "Advance checklist: confirm chain passed cleanly (confirm rounds do not commit). First mark the completed current item {currentId} [x] in checklist.md (do not mark the next item yet). Never mark an item [x] while you are still implementing it — only this Advance/Done followup checks off the completed item. Then, if the working tree still has uncommitted changes for this item (including checklist.md when plans/ is committed), local conventional commit only: git status/diff → stage only this checklist item's paths; never git add -A, never stage .env/secrets/.autopilot runtime; one conventional commit; no push/--no-verify/amend/force unless the user explicitly asks. If already clean after marking, skip commit. Then implement next: {nextId} — {nextTitle}.",
|
|
38
|
+
"done": "All checklist items done. Confirm chain passed (confirm rounds do not commit). Mark the last item [x]. If the working tree still has uncommitted changes for this item (including checklist.md when plans/ is committed), local conventional commit only (never stage .env/secrets/.autopilot runtime; no push unless the user asks); if clean, just confirm briefly. Phase is done.",
|
|
39
|
+
"recover": "Recover: the previous turn ended with an error. Continue the current task.",
|
|
40
|
+
"recover_planning": "Recover: the previous turn ended with an error. Continue planning; do not RUN or write product code.",
|
|
41
|
+
"recover_ambient": "Recover: the previous turn ended with an error. Continue your current work; Autopilot RUN is not active.",
|
|
42
|
+
"review_complete": "Review complete. All {total} confirm rounds passed; the review chain has ended. If the working tree still has uncommitted changes from this session, local commit only per the safe checklist (never stage .env/secrets/.autopilot runtime; no push unless the user asks); if clean, briefly confirm only.",
|
|
43
|
+
"stuck": "Stuck: no progress for several stops. Change strategy or send Autopilot RESUME after fixing.",
|
|
44
|
+
"verify_fix": "Verify failed ({reason}). Fix verify commands and rewrite verify-last.json; do not advance.",
|
|
45
|
+
"track_pick": "Select a plan by number or slug."
|
|
46
|
+
},
|
|
47
|
+
"error": {
|
|
48
|
+
"one_executor_busy": "Another session is already executing ({track}). OFF or wait, then retry.",
|
|
49
|
+
"on_while_executing": "Autopilot is executing. Send Autopilot OFF, REPLAN, or RESUME before ON."
|
|
50
|
+
},
|
|
51
|
+
"lens": {
|
|
52
|
+
"scope-correctness": {
|
|
53
|
+
"title": "Correctness & invariants",
|
|
54
|
+
"focus": "Focus on logic, state-machine/flow coherence, pre/post-conditions and business invariants; do not turn this round into a null/concurrency/security/tests mix."
|
|
55
|
+
},
|
|
56
|
+
"boundaries": {
|
|
57
|
+
"title": "Nulls, boundaries & error paths",
|
|
58
|
+
"focus": "Focus on null/empty collections, bounds, illegal input, timeout/failure returns, idempotency and safe retries; do not repeat the prior pure-logic walkthrough."
|
|
59
|
+
},
|
|
60
|
+
"concurrency": {
|
|
61
|
+
"title": "Concurrency, races & partial failure",
|
|
62
|
+
"focus": "Focus on multi-thread/multi-instance, locks/leases, races, transaction boundaries, dirty state after mid-failure and compensation; do not repeat null or security checklists."
|
|
63
|
+
},
|
|
64
|
+
"security": {
|
|
65
|
+
"title": "Security & trust boundaries",
|
|
66
|
+
"focus": "Focus on authz/privilege, injection, sensitive data leaks, secrets/config, untrusted input, and over-exposed errors; do not make this another correctness re-read."
|
|
67
|
+
},
|
|
68
|
+
"tests-regression": {
|
|
69
|
+
"title": "Test gaps & regression",
|
|
70
|
+
"focus": "Focus on missing critical-path tests, weak asserts, contract drift vs existing behavior/APIs, and likely regression points; read-only — record gaps, do not change code to add tests; do not vaguely claim full coverage."
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"preferred_name": "Autopilot",
|
|
3
|
+
"cli": {
|
|
4
|
+
"help": "Autopilot Harness — 两阶段 Agent 外骨骼:规划 → 执行"
|
|
5
|
+
},
|
|
6
|
+
"triggers": {
|
|
7
|
+
"on": ["Autopilot ON", "开启自动驾驶"],
|
|
8
|
+
"run": ["Autopilot RUN", "开始执行"],
|
|
9
|
+
"off": ["Autopilot OFF", "关闭自动驾驶"],
|
|
10
|
+
"resume": ["Autopilot RESUME", "继续执行"],
|
|
11
|
+
"replan": ["Autopilot REPLAN", "修改方案"],
|
|
12
|
+
"resume_review": ["继续自审", "Resume review"]
|
|
13
|
+
},
|
|
14
|
+
"skill": {
|
|
15
|
+
"autopilot_on": {
|
|
16
|
+
"description": "开始规划 — 讨论要做什么"
|
|
17
|
+
},
|
|
18
|
+
"autopilot_run": {
|
|
19
|
+
"description": "开始执行 — 跑 checklist"
|
|
20
|
+
},
|
|
21
|
+
"autopilot_off": {
|
|
22
|
+
"description": "暂停 Autopilot"
|
|
23
|
+
},
|
|
24
|
+
"autopilot_resume": {
|
|
25
|
+
"description": "恢复会话(可跨聊天认领 track)"
|
|
26
|
+
},
|
|
27
|
+
"autopilot_replan": {
|
|
28
|
+
"description": "修改方案"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"followup": {
|
|
32
|
+
"review": {
|
|
33
|
+
"fix": "自审修复第 {round} 轮(无硬顶;确认阶段需连续 {total} 轮无改动)。本轮改过代码。请立刻对本轮 diff 做缺陷优先自审并直接修复:1) 用 git diff / git status 看改动时,跳过命中 .autopilotignore 的路径,以及未被 Git 跟踪且被 .gitignore 忽略的路径;只对剩余路径审;2) 查正确性、空值/边界、并发、安全、回归、缺测;3) CRITICAL/HIGH 必须改,MEDIUM 尽量改;4) 跑相关测试;5) 修完后简短说明审了什么、改了什么(或「自审无问题」)。不要 commit/push。若本轮未再改代码,下一轮会进入确认审查(每轮不同审查角度)。",
|
|
34
|
+
"confirm": "自审确认 {n}/{total}(会话第 {sessionRound} 轮;连续无改动确认,计入修复轮计数)。本轮审查角度:【{lensTitle}】(通用多角度确认,非同一清单复读)。{lensFocus} 上一轮未再改代码。请按本角度复核:1) 用 git diff / git status 确认相对上一轮无新改动或仅有已审改动时,同样跳过命中 .autopilotignore 的路径,以及未被 Git 跟踪且被 .gitignore 忽略的路径;只根据剩余路径判断;2) 只深挖本角度;禁止用「全面复核无问题」敷衍;3) 本角度若有 CRITICAL/HIGH 必须改;MEDIUM 尽量改;4) 有改动则直接修复并跑相关测试;5) 结尾写:「本角度({lensTitle}):自审无问题」或简述已修项;无问题则不要再改代码。不要 commit/push。",
|
|
35
|
+
"confirm_final": "自审确认 {n}/{total}(会话第 {sessionRound} 轮;连续无改动确认,计入修复轮计数)。本轮审查角度:【{lensTitle}】(通用多角度确认,非同一清单复读)。{lensFocus} 上一轮未再改代码。请按本角度复核:1) 用 git diff / git status 确认相对上一轮无新改动或仅有已审改动时,同样跳过命中 .autopilotignore 的路径,以及未被 Git 跟踪且被 .gitignore 忽略的路径;只根据剩余路径判断;2) 只深挖本角度;禁止用「全面复核无问题」敷衍;3) 本轮只读:发现 CRITICAL/HIGH/缺测只记录,不要改代码、不要补测、不要 commit;若已经改了文件,接受回到修复轮,本轮绝不 commit;4) 不要跑会改动仓库的命令;5) 结尾写:「本角度({lensTitle}):自审无问题」或列出问题(不修复);无问题则不要再改代码。不要 commit/push。交卷(commit)与下一项由链结束后的推进/完成处理,本轮不做。"
|
|
36
|
+
},
|
|
37
|
+
"advance": "推进下一项:自审确认已干净通过(确认轮不 commit)。先勾选刚完成的当前项 {currentId} [x](不要勾下一项)。实现过程中不要提前把正在做的项勾成 [x];只有本条推进/完成指令才勾选刚完成的当前项。若 working tree 仍有本项未提交改动(含 checklist.md,且 plans/ 纳入提交时一并 stage),按安全清单本地 commit(无改动则跳过):git status/diff → 只 stage 本 checklist 项相关路径;禁止 git add -A、stage .env/密钥/.autopilot 运行时;一次 conventional commit;禁止 push/--no-verify/amend/force(仅用户明确要求才可 push)。勾选后已干净则跳过 commit。然后实现下一项:{nextId} — {nextTitle}。",
|
|
38
|
+
"done": "全部完成。自审确认已干净通过(确认轮不 commit)。勾选最后一项 [x]。若 working tree 仍有本项未提交改动(含 checklist.md,且 plans/ 纳入提交时一并 stage),按安全清单本地 commit(勿 stage .env/密钥/.autopilot 运行时;勿 push,除非用户明确要求);已干净则只简短确认即可。然后停止。",
|
|
39
|
+
"recover": "恢复:上一回合出错。继续当前任务。",
|
|
40
|
+
"recover_planning": "恢复:上一回合出错。继续当前规划,不要 RUN 或写产品代码。",
|
|
41
|
+
"recover_ambient": "恢复:上一回合出错。继续当前任务(未在执行 checklist)。",
|
|
42
|
+
"review_complete": "自审完成。连续 {total} 轮确认已通过,自审链已结束。若工作区仍有本会话未提交改动,按安全清单本地 commit(勿 stage .env/密钥/.autopilot 运行时;勿 push,除非用户明确要求);已干净则只简短确认即可。",
|
|
43
|
+
"stuck": "卡住:连续多轮无进展。请换策略,或修好后发送 Autopilot RESUME。",
|
|
44
|
+
"verify_fix": "校验失败({reason})。请修复 verify 命令并重写 verify-last.json;不要推进。",
|
|
45
|
+
"track_pick": "请用数字或 slug 选择要执行的 plan。"
|
|
46
|
+
},
|
|
47
|
+
"error": {
|
|
48
|
+
"one_executor_busy": "已有其他会话在执行({track})。请先 OFF 或等待后再试。",
|
|
49
|
+
"on_while_executing": "当前正在执行。请先发送 Autopilot OFF、REPLAN 或 RESUME,再 ON。"
|
|
50
|
+
},
|
|
51
|
+
"lens": {
|
|
52
|
+
"scope-correctness": {
|
|
53
|
+
"title": "正确性与不变量",
|
|
54
|
+
"focus": "聚焦逻辑对错、状态机/流程是否自洽、前后条件与业务不变量是否被破坏;不要把本轮做成空值/并发/安全/测试的大杂烩。"
|
|
55
|
+
},
|
|
56
|
+
"boundaries": {
|
|
57
|
+
"title": "空值、边界与错误路径",
|
|
58
|
+
"focus": "聚焦 null/空集合、上下界、非法输入、超时/失败返回、幂等与重试是否安全;不要重复上一轮的纯逻辑走查。"
|
|
59
|
+
},
|
|
60
|
+
"concurrency": {
|
|
61
|
+
"title": "并发、竞态与部分失败",
|
|
62
|
+
"focus": "聚焦多线程/多实例、锁与租约、竞态、事务边界、中途失败留下的脏状态与补偿;不要重复空值清单或安全清单。"
|
|
63
|
+
},
|
|
64
|
+
"security": {
|
|
65
|
+
"title": "安全与信任边界",
|
|
66
|
+
"focus": "聚焦鉴权/越权、注入、敏感数据泄露、密钥与配置、不可信输入、错误信息是否过曝;不要做成又一轮正确性复读。"
|
|
67
|
+
},
|
|
68
|
+
"tests-regression": {
|
|
69
|
+
"title": "测试缺口与回归",
|
|
70
|
+
"focus": "聚焦关键路径是否缺测、断言是否薄弱、与既有行为/接口契约是否漂移、最可能的回归点;本轮只读记录缺口,不要为补测改代码;不要空泛说「已全面覆盖」。"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@autopilot-harness/i18n",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Autopilot harness locale strings (en, zh-CN)",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/mt2007/autopilot-harness.git",
|
|
9
|
+
"directory": "packages/i18n"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/mt2007/autopilot-harness#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/mt2007/autopilot-harness/issues"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./locales/*": "./locales/*"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"locales"
|
|
28
|
+
],
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"typescript": "^5.8.2"
|
|
31
|
+
},
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=22"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsc -p tsconfig.json",
|
|
40
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
41
|
+
}
|
|
42
|
+
}
|