@skj1724/oh-my-opencode 3.17.12 → 3.17.16
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/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-16.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-17.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-18.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-19.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-20.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-01.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-02.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-03.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-04.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-05.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-06.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-07.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-08.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-09.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-10.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-11.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-12.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-13.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-14.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-15.d.ts +1 -0
- package/dist/agents/atlas/default-prompt-sections.d.ts +6 -6
- package/dist/agents/atlas/gemini-prompt-sections.d.ts +6 -6
- package/dist/agents/atlas/gpt-prompt-sections.d.ts +6 -6
- package/dist/agents/atlas/prompt-section-builder.d.ts +3 -2
- package/dist/agents/gpt-apply-patch-guard.d.ts +1 -1
- package/dist/agents/hephaestus/gpt-5-3-codex.d.ts +9 -9
- package/dist/agents/metis.d.ts +7 -7
- package/dist/agents/momus.d.ts +6 -6
- package/dist/agents/prometheus/behavioral-summary.d.ts +3 -3
- package/dist/agents/prometheus/gemini.d.ts +7 -7
- package/dist/agents/prometheus/gpt.d.ts +6 -6
- package/dist/agents/prometheus/high-accuracy-mode.d.ts +3 -3
- package/dist/agents/prometheus/identity-constraints.d.ts +4 -3
- package/dist/agents/prometheus/interview-mode.d.ts +3 -3
- package/dist/agents/prometheus/plan-generation.d.ts +4 -4
- package/dist/agents/prometheus/plan-template.d.ts +4 -4
- package/dist/agents/sisyphus/default.d.ts +2 -2
- package/dist/agents/sisyphus/gemini.d.ts +10 -10
- package/dist/agents/sisyphus/gpt-5-4.d.ts +18 -18
- package/dist/agents/sisyphus-junior/gemini.d.ts +6 -6
- package/dist/agents/sisyphus-junior/gpt-5-3-codex.d.ts +4 -4
- package/dist/agents/sisyphus-junior/gpt-5-4.d.ts +7 -7
- package/dist/agents/sisyphus-junior/gpt.d.ts +5 -5
- package/dist/cli/index.js +256 -61
- package/dist/features/background-agent/process-cleanup.test-helpers.d.ts +4 -0
- package/dist/features/builtin-commands/templates/handoff.d.ts +1 -1
- package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -1
- package/dist/features/builtin-commands/templates/ralph-loop.d.ts +3 -3
- package/dist/features/builtin-commands/templates/refactor.d.ts +1 -1
- package/dist/features/builtin-commands/templates/remove-ai-slops.d.ts +1 -1
- package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
- package/dist/features/builtin-commands/templates/stop-continuation.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-sections/commit-workflow.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-sections/history-search-workflow.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-sections/overview.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-sections/quick-reference.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-sections/rebase-workflow.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-skill-metadata.d.ts +1 -1
- package/dist/features/builtin-skills/skills/playwright-cli.d.ts +5 -5
- package/dist/features/claude-code-command-loader/loader-cache.d.ts +6 -0
- package/dist/features/claude-code-command-loader/loader.d.ts +2 -0
- package/dist/features/team-mode/team-layout-tmux/index.d.ts +1 -0
- package/dist/features/team-mode/team-layout-tmux/layout.d.ts +15 -0
- package/dist/features/tmux-subagent/event-handlers.d.ts +0 -4
- package/dist/features/tmux-subagent/index.d.ts +0 -3
- package/dist/features/tmux-subagent/manager.d.ts +4 -0
- package/dist/features/tmux-subagent/polling-manager.d.ts +2 -1
- package/dist/hooks/atlas/system-reminder-templates.d.ts +2 -2
- package/dist/hooks/auto-update-checker/hook/deferred-startup-check.d.ts +1 -0
- package/dist/hooks/comment-checker/initialization-gate.d.ts +1 -0
- package/dist/hooks/directory-agents-injector/finder.d.ts +1 -1
- package/dist/hooks/directory-readme-injector/finder.d.ts +1 -1
- package/dist/hooks/edit-error-recovery/hook.d.ts +1 -1
- package/dist/hooks/json-error-recovery/hook.d.ts +1 -1
- package/dist/hooks/keyword-detector/analyze/default.d.ts +1 -1
- package/dist/hooks/keyword-detector/search/default.d.ts +1 -1
- package/dist/hooks/rules-injector/cache.d.ts +5 -0
- package/dist/hooks/rules-injector/injector.d.ts +2 -0
- package/dist/hooks/rules-injector/project-root-finder.d.ts +1 -0
- package/dist/hooks/rules-injector/rule-file-finder.d.ts +2 -19
- package/dist/hooks/rules-injector/rule-scan-cache.d.ts +6 -0
- package/dist/hooks/session-notification-init.d.ts +7 -0
- package/dist/hooks/todo-continuation-enforcer/session-state.d.ts +1 -0
- package/dist/hooks/write-existing-file-guard/tool-execute-before-handler.d.ts +1 -1
- package/dist/index.js +8270 -7802
- package/dist/shared/excluded-dirs.d.ts +1 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/jsonc-parser.d.ts +8 -5
- package/dist/shared/load-opencode-plugins.d.ts +1 -0
- package/dist/shared/project-discovery-dirs.d.ts +2 -0
- package/dist/shared/tmux/tmux-utils/index.d.ts +1 -0
- package/dist/shared/tmux/tmux-utils/session-kill.d.ts +1 -0
- package/dist/shared/tmux/tmux-utils/session-spawn.d.ts +1 -0
- package/dist/shared/tmux/tmux-utils/spawn-process.d.ts +1 -0
- package/dist/shared/tmux/tmux-utils/stale-session-sweep.d.ts +11 -0
- package/dist/shared/tmux/tmux-utils.d.ts +3 -1
- package/dist/tools/background-task/constants.d.ts +3 -3
- package/dist/tools/call-omo-agent/constants.d.ts +1 -1
- package/dist/tools/delegate-task/constants.d.ts +2 -2
- package/dist/tools/hashline-edit/tool-description.d.ts +1 -1
- package/dist/tools/interactive-bash/constants.d.ts +1 -1
- package/dist/tools/look-at/constants.d.ts +1 -1
- package/dist/tools/session-manager/constants.d.ts +5 -5
- package/dist/tools/skill/constants.d.ts +2 -2
- package/dist/tools/skill/description-formatter.d.ts +1 -1
- package/dist/tools/skill/session-skill-cache.d.ts +1 -0
- package/dist/tools/skill-mcp/constants.d.ts +1 -1
- package/package.json +3 -3
- package/dist/features/tmux-subagent/cleanup.d.ts +0 -9
- package/dist/features/tmux-subagent/session-created-handler.d.ts +0 -22
- package/dist/features/tmux-subagent/session-deleted-handler.d.ts +0 -15
package/dist/cli/index.js
CHANGED
|
@@ -6048,22 +6048,31 @@ function detectConfigFile(basePath) {
|
|
|
6048
6048
|
return { format: "none", path: jsonPath };
|
|
6049
6049
|
}
|
|
6050
6050
|
function detectPluginConfigFile(dir) {
|
|
6051
|
+
const cachedResult = pluginConfigFileDetectionCache.get(dir);
|
|
6052
|
+
if (cachedResult !== undefined) {
|
|
6053
|
+
return cachedResult;
|
|
6054
|
+
}
|
|
6051
6055
|
const canonicalResult = detectConfigFile(join4(dir, CONFIG_BASENAME));
|
|
6052
6056
|
const legacyResult = detectConfigFile(join4(dir, LEGACY_CONFIG_BASENAME));
|
|
6057
|
+
let detectionResult;
|
|
6053
6058
|
if (canonicalResult.format !== "none") {
|
|
6054
|
-
|
|
6059
|
+
detectionResult = {
|
|
6055
6060
|
...canonicalResult,
|
|
6056
6061
|
legacyPath: legacyResult.format !== "none" ? legacyResult.path : undefined
|
|
6057
6062
|
};
|
|
6063
|
+
} else if (legacyResult.format !== "none") {
|
|
6064
|
+
detectionResult = legacyResult;
|
|
6065
|
+
} else {
|
|
6066
|
+
detectionResult = { format: "none", path: join4(dir, `${CONFIG_BASENAME}.json`) };
|
|
6058
6067
|
}
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
}
|
|
6062
|
-
return { format: "none", path: join4(dir, `${CONFIG_BASENAME}.json`) };
|
|
6068
|
+
pluginConfigFileDetectionCache.set(dir, detectionResult);
|
|
6069
|
+
return detectionResult;
|
|
6063
6070
|
}
|
|
6071
|
+
var pluginConfigFileDetectionCache;
|
|
6064
6072
|
var init_jsonc_parser = __esm(() => {
|
|
6065
6073
|
init_main();
|
|
6066
6074
|
init_plugin_identity();
|
|
6075
|
+
pluginConfigFileDetectionCache = new Map;
|
|
6067
6076
|
});
|
|
6068
6077
|
|
|
6069
6078
|
// src/shared/migration/agent-names.ts
|
|
@@ -6086,30 +6095,24 @@ var init_agent_names = __esm(() => {
|
|
|
6086
6095
|
OmO: "sisyphus",
|
|
6087
6096
|
Sisyphus: "sisyphus",
|
|
6088
6097
|
"Sisyphus (Ultraworker)": "sisyphus",
|
|
6089
|
-
"Sisyphus - \u8D85\u7EA7Agent": "sisyphus",
|
|
6090
6098
|
sisyphus: "sisyphus",
|
|
6091
6099
|
"Hephaestus (Deep Agent)": "hephaestus",
|
|
6092
|
-
"Hephaestus - \u6DF1\u5EA6Agent": "hephaestus",
|
|
6093
6100
|
"OmO-Plan": "prometheus",
|
|
6094
6101
|
"omo-plan": "prometheus",
|
|
6095
6102
|
"Planner-Sisyphus": "prometheus",
|
|
6096
6103
|
"planner-sisyphus": "prometheus",
|
|
6097
6104
|
"Prometheus - Plan Builder": "prometheus",
|
|
6098
|
-
"Prometheus - \u8BA1\u5212\u6784\u5EFA": "prometheus",
|
|
6099
6105
|
"Prometheus (Plan Builder)": "prometheus",
|
|
6100
6106
|
prometheus: "prometheus",
|
|
6101
6107
|
"orchestrator-sisyphus": "atlas",
|
|
6102
6108
|
Atlas: "atlas",
|
|
6103
6109
|
"Atlas (Plan Executor)": "atlas",
|
|
6104
|
-
"Atlas - \u8BA1\u5212\u6267\u884C": "atlas",
|
|
6105
6110
|
atlas: "atlas",
|
|
6106
6111
|
"plan-consultant": "metis",
|
|
6107
6112
|
"Metis - Plan Consultant": "metis",
|
|
6108
|
-
"Metis - \u8BA1\u5212\u987E\u95EE": "metis",
|
|
6109
6113
|
"Metis (Plan Consultant)": "metis",
|
|
6110
6114
|
metis: "metis",
|
|
6111
6115
|
"Momus - Plan Critic": "momus",
|
|
6112
|
-
"Momus - \u8BA1\u5212\u8BC4\u5BA1": "momus",
|
|
6113
6116
|
"Momus (Plan Critic)": "momus",
|
|
6114
6117
|
momus: "momus",
|
|
6115
6118
|
"Sisyphus-Junior": "sisyphus-junior",
|
|
@@ -6630,8 +6633,10 @@ var init_opencode_storage_detection = __esm(() => {
|
|
|
6630
6633
|
cachedResult = NOT_CACHED2;
|
|
6631
6634
|
});
|
|
6632
6635
|
// src/shared/load-opencode-plugins.ts
|
|
6636
|
+
var opencodePluginsCache;
|
|
6633
6637
|
var init_load_opencode_plugins = __esm(() => {
|
|
6634
6638
|
init_jsonc_parser();
|
|
6639
|
+
opencodePluginsCache = new Map;
|
|
6635
6640
|
});
|
|
6636
6641
|
|
|
6637
6642
|
// src/shared/external-plugin-detector.ts
|
|
@@ -6731,15 +6736,15 @@ function getAgentConfigKey(agentName) {
|
|
|
6731
6736
|
var AGENT_DISPLAY_NAMES, AGENT_LIST_SORT_PREFIXES, INVISIBLE_AGENT_CHARACTERS_REGEX, REVERSE_DISPLAY_NAMES, LEGACY_DISPLAY_NAMES;
|
|
6732
6737
|
var init_agent_display_names = __esm(() => {
|
|
6733
6738
|
AGENT_DISPLAY_NAMES = {
|
|
6734
|
-
sisyphus: "Sisyphus -
|
|
6735
|
-
hephaestus: "Hephaestus -
|
|
6736
|
-
prometheus: "Prometheus -
|
|
6737
|
-
atlas: "Atlas -
|
|
6739
|
+
sisyphus: "Sisyphus - Ultraworker",
|
|
6740
|
+
hephaestus: "Hephaestus - Deep Agent",
|
|
6741
|
+
prometheus: "Prometheus - Plan Builder",
|
|
6742
|
+
atlas: "Atlas - Plan Executor",
|
|
6738
6743
|
"sisyphus-junior": "Sisyphus-Junior",
|
|
6739
|
-
metis: "Metis -
|
|
6740
|
-
momus: "Momus -
|
|
6741
|
-
athena: "Athena -
|
|
6742
|
-
"athena-junior": "Athena-Junior -
|
|
6744
|
+
metis: "Metis - Plan Consultant",
|
|
6745
|
+
momus: "Momus - Plan Critic",
|
|
6746
|
+
athena: "Athena - Council",
|
|
6747
|
+
"athena-junior": "Athena-Junior - Council",
|
|
6743
6748
|
oracle: "oracle",
|
|
6744
6749
|
librarian: "librarian",
|
|
6745
6750
|
explore: "explore",
|
|
@@ -6747,10 +6752,10 @@ var init_agent_display_names = __esm(() => {
|
|
|
6747
6752
|
"council-member": "council-member"
|
|
6748
6753
|
};
|
|
6749
6754
|
AGENT_LIST_SORT_PREFIXES = {
|
|
6750
|
-
sisyphus: "",
|
|
6751
|
-
hephaestus: "",
|
|
6752
|
-
prometheus: "",
|
|
6753
|
-
atlas: ""
|
|
6755
|
+
sisyphus: "\u200B",
|
|
6756
|
+
hephaestus: "\u200B\u200B",
|
|
6757
|
+
prometheus: "\u200B\u200B\u200B",
|
|
6758
|
+
atlas: "\u200B\u200B\u200B\u200B"
|
|
6754
6759
|
};
|
|
6755
6760
|
INVISIBLE_AGENT_CHARACTERS_REGEX = /[\u200B\u200C\u200D\uFEFF]/g;
|
|
6756
6761
|
REVERSE_DISPLAY_NAMES = Object.fromEntries(Object.entries(AGENT_DISPLAY_NAMES).map(([key, displayName]) => [displayName.toLowerCase(), key]));
|
|
@@ -50563,12 +50568,6 @@ var init_pane_spawn = __esm(() => {
|
|
|
50563
50568
|
init_tmux_path_resolver();
|
|
50564
50569
|
init_server_health();
|
|
50565
50570
|
});
|
|
50566
|
-
|
|
50567
|
-
// src/shared/tmux/tmux-utils/pane-close.ts
|
|
50568
|
-
var init_pane_close = __esm(() => {
|
|
50569
|
-
init_tmux_path_resolver();
|
|
50570
|
-
});
|
|
50571
|
-
|
|
50572
50571
|
// src/shared/tmux/tmux-utils/pane-replace.ts
|
|
50573
50572
|
var init_pane_replace = __esm(() => {
|
|
50574
50573
|
init_tmux_path_resolver();
|
|
@@ -50585,6 +50584,8 @@ var init_session_spawn = __esm(() => {
|
|
|
50585
50584
|
init_tmux_path_resolver();
|
|
50586
50585
|
init_server_health();
|
|
50587
50586
|
});
|
|
50587
|
+
// src/shared/tmux/tmux-utils/stale-session-sweep.ts
|
|
50588
|
+
var init_stale_session_sweep = () => {};
|
|
50588
50589
|
|
|
50589
50590
|
// src/shared/tmux/tmux-utils/layout.ts
|
|
50590
50591
|
var init_layout = __esm(() => {
|
|
@@ -50596,10 +50597,10 @@ var init_tmux_utils = __esm(() => {
|
|
|
50596
50597
|
init_server_health();
|
|
50597
50598
|
init_pane_dimensions();
|
|
50598
50599
|
init_pane_spawn();
|
|
50599
|
-
init_pane_close();
|
|
50600
50600
|
init_pane_replace();
|
|
50601
50601
|
init_window_spawn();
|
|
50602
50602
|
init_session_spawn();
|
|
50603
|
+
init_stale_session_sweep();
|
|
50603
50604
|
init_layout();
|
|
50604
50605
|
});
|
|
50605
50606
|
|
|
@@ -50614,6 +50615,139 @@ var init_model_suggestion_retry = __esm(() => {
|
|
|
50614
50615
|
});
|
|
50615
50616
|
|
|
50616
50617
|
// src/shared/opencode-server-auth.ts
|
|
50618
|
+
function getServerBasicAuthHeader() {
|
|
50619
|
+
const password = process.env.OPENCODE_SERVER_PASSWORD;
|
|
50620
|
+
if (!password) {
|
|
50621
|
+
return;
|
|
50622
|
+
}
|
|
50623
|
+
const username = process.env.OPENCODE_SERVER_USERNAME ?? "opencode";
|
|
50624
|
+
const token = Buffer.from(`${username}:${password}`, "utf8").toString("base64");
|
|
50625
|
+
return `Basic ${token}`;
|
|
50626
|
+
}
|
|
50627
|
+
function isRecord4(value) {
|
|
50628
|
+
return typeof value === "object" && value !== null;
|
|
50629
|
+
}
|
|
50630
|
+
function isRequestFetch(value) {
|
|
50631
|
+
return typeof value === "function";
|
|
50632
|
+
}
|
|
50633
|
+
function wrapRequestFetch(baseFetch, auth) {
|
|
50634
|
+
return async (request) => {
|
|
50635
|
+
const headers = new Headers(request.headers);
|
|
50636
|
+
headers.set("Authorization", auth);
|
|
50637
|
+
return baseFetch(new Request(request, { headers }));
|
|
50638
|
+
};
|
|
50639
|
+
}
|
|
50640
|
+
function getInternalClient(client) {
|
|
50641
|
+
if (!isRecord4(client)) {
|
|
50642
|
+
return null;
|
|
50643
|
+
}
|
|
50644
|
+
const internal = client["_client"];
|
|
50645
|
+
return isRecord4(internal) ? internal : null;
|
|
50646
|
+
}
|
|
50647
|
+
function tryInjectViaSetConfigHeaders(internal, auth) {
|
|
50648
|
+
const setConfig = internal["setConfig"];
|
|
50649
|
+
if (typeof setConfig !== "function") {
|
|
50650
|
+
return false;
|
|
50651
|
+
}
|
|
50652
|
+
setConfig({
|
|
50653
|
+
headers: {
|
|
50654
|
+
Authorization: auth
|
|
50655
|
+
}
|
|
50656
|
+
});
|
|
50657
|
+
return true;
|
|
50658
|
+
}
|
|
50659
|
+
function tryInjectViaInterceptors(internal, auth) {
|
|
50660
|
+
const interceptors = internal["interceptors"];
|
|
50661
|
+
if (!isRecord4(interceptors)) {
|
|
50662
|
+
return false;
|
|
50663
|
+
}
|
|
50664
|
+
const requestInterceptors = interceptors["request"];
|
|
50665
|
+
if (!isRecord4(requestInterceptors)) {
|
|
50666
|
+
return false;
|
|
50667
|
+
}
|
|
50668
|
+
const use = requestInterceptors["use"];
|
|
50669
|
+
if (typeof use !== "function") {
|
|
50670
|
+
return false;
|
|
50671
|
+
}
|
|
50672
|
+
use.call(requestInterceptors, (request) => {
|
|
50673
|
+
if (!request.headers.get("Authorization")) {
|
|
50674
|
+
request.headers.set("Authorization", auth);
|
|
50675
|
+
}
|
|
50676
|
+
return request;
|
|
50677
|
+
});
|
|
50678
|
+
return true;
|
|
50679
|
+
}
|
|
50680
|
+
function tryInjectViaFetchWrapper(internal, auth) {
|
|
50681
|
+
const getConfig = internal["getConfig"];
|
|
50682
|
+
const setConfig = internal["setConfig"];
|
|
50683
|
+
if (typeof getConfig !== "function" || typeof setConfig !== "function") {
|
|
50684
|
+
return false;
|
|
50685
|
+
}
|
|
50686
|
+
const config = getConfig();
|
|
50687
|
+
if (!isRecord4(config)) {
|
|
50688
|
+
return false;
|
|
50689
|
+
}
|
|
50690
|
+
const fetchValue = config["fetch"];
|
|
50691
|
+
if (!isRequestFetch(fetchValue)) {
|
|
50692
|
+
return false;
|
|
50693
|
+
}
|
|
50694
|
+
setConfig({
|
|
50695
|
+
fetch: wrapRequestFetch(fetchValue, auth)
|
|
50696
|
+
});
|
|
50697
|
+
return true;
|
|
50698
|
+
}
|
|
50699
|
+
function tryInjectViaMutableInternalConfig(internal, auth) {
|
|
50700
|
+
const configValue = internal["_config"];
|
|
50701
|
+
if (!isRecord4(configValue)) {
|
|
50702
|
+
return false;
|
|
50703
|
+
}
|
|
50704
|
+
const fetchValue = configValue["fetch"];
|
|
50705
|
+
if (!isRequestFetch(fetchValue)) {
|
|
50706
|
+
return false;
|
|
50707
|
+
}
|
|
50708
|
+
configValue["fetch"] = wrapRequestFetch(fetchValue, auth);
|
|
50709
|
+
return true;
|
|
50710
|
+
}
|
|
50711
|
+
function tryInjectViaTopLevelFetch(client, auth) {
|
|
50712
|
+
if (!isRecord4(client)) {
|
|
50713
|
+
return false;
|
|
50714
|
+
}
|
|
50715
|
+
const fetchValue = client["fetch"];
|
|
50716
|
+
if (!isRequestFetch(fetchValue)) {
|
|
50717
|
+
return false;
|
|
50718
|
+
}
|
|
50719
|
+
client["fetch"] = wrapRequestFetch(fetchValue, auth);
|
|
50720
|
+
return true;
|
|
50721
|
+
}
|
|
50722
|
+
function injectServerAuthIntoClient(client) {
|
|
50723
|
+
const auth = getServerBasicAuthHeader();
|
|
50724
|
+
if (!auth) {
|
|
50725
|
+
return;
|
|
50726
|
+
}
|
|
50727
|
+
try {
|
|
50728
|
+
const internal = getInternalClient(client);
|
|
50729
|
+
if (internal) {
|
|
50730
|
+
const injectedHeaders = tryInjectViaSetConfigHeaders(internal, auth);
|
|
50731
|
+
const injectedInterceptors = tryInjectViaInterceptors(internal, auth);
|
|
50732
|
+
const injectedFetch = tryInjectViaFetchWrapper(internal, auth);
|
|
50733
|
+
const injectedMutable = tryInjectViaMutableInternalConfig(internal, auth);
|
|
50734
|
+
const injected2 = injectedHeaders || injectedInterceptors || injectedFetch || injectedMutable;
|
|
50735
|
+
if (!injected2) {
|
|
50736
|
+
log("[opencode-server-auth] OPENCODE_SERVER_PASSWORD is set but SDK client structure is incompatible", {
|
|
50737
|
+
keys: Object.keys(internal)
|
|
50738
|
+
});
|
|
50739
|
+
}
|
|
50740
|
+
return;
|
|
50741
|
+
}
|
|
50742
|
+
const injected = tryInjectViaTopLevelFetch(client, auth);
|
|
50743
|
+
if (!injected) {
|
|
50744
|
+
log("[opencode-server-auth] OPENCODE_SERVER_PASSWORD is set but no compatible SDK client found");
|
|
50745
|
+
}
|
|
50746
|
+
} catch (error) {
|
|
50747
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
50748
|
+
log("[opencode-server-auth] Failed to inject server auth", { message });
|
|
50749
|
+
}
|
|
50750
|
+
}
|
|
50617
50751
|
var init_opencode_server_auth = __esm(() => {
|
|
50618
50752
|
init_logger();
|
|
50619
50753
|
});
|
|
@@ -50683,7 +50817,10 @@ var init_opencode_command_dirs = __esm(() => {
|
|
|
50683
50817
|
});
|
|
50684
50818
|
|
|
50685
50819
|
// src/shared/project-discovery-dirs.ts
|
|
50686
|
-
var
|
|
50820
|
+
var worktreePathCache;
|
|
50821
|
+
var init_project_discovery_dirs = __esm(() => {
|
|
50822
|
+
worktreePathCache = new Map;
|
|
50823
|
+
});
|
|
50687
50824
|
|
|
50688
50825
|
// src/shared/session-directory-resolver.ts
|
|
50689
50826
|
var init_session_directory_resolver = () => {};
|
|
@@ -50867,12 +51004,35 @@ var init_model_string_parser = __esm(() => {
|
|
|
50867
51004
|
]);
|
|
50868
51005
|
});
|
|
50869
51006
|
|
|
51007
|
+
// src/shared/excluded-dirs.ts
|
|
51008
|
+
var EXCLUDED_DIR_NAMES, EXCLUDED_DIRS;
|
|
51009
|
+
var init_excluded_dirs = __esm(() => {
|
|
51010
|
+
EXCLUDED_DIR_NAMES = [
|
|
51011
|
+
"node_modules",
|
|
51012
|
+
".git",
|
|
51013
|
+
"dist",
|
|
51014
|
+
"build",
|
|
51015
|
+
".next",
|
|
51016
|
+
".sisyphus",
|
|
51017
|
+
".omx",
|
|
51018
|
+
".turbo",
|
|
51019
|
+
"coverage",
|
|
51020
|
+
"out",
|
|
51021
|
+
".cache",
|
|
51022
|
+
".vscode-test",
|
|
51023
|
+
"target",
|
|
51024
|
+
".local-ignore"
|
|
51025
|
+
];
|
|
51026
|
+
EXCLUDED_DIRS = Object.freeze(new Set(EXCLUDED_DIR_NAMES));
|
|
51027
|
+
});
|
|
51028
|
+
|
|
50870
51029
|
// src/shared/index.ts
|
|
50871
51030
|
var init_shared = __esm(() => {
|
|
50872
51031
|
init_model_resolver();
|
|
50873
51032
|
init_model_resolution_pipeline();
|
|
50874
51033
|
init_session_category_registry();
|
|
50875
51034
|
init_model_string_parser();
|
|
51035
|
+
init_excluded_dirs();
|
|
50876
51036
|
init_frontmatter();
|
|
50877
51037
|
init_command_executor();
|
|
50878
51038
|
init_contains_path();
|
|
@@ -53315,6 +53475,12 @@ var init_background_update_check = __esm(() => {
|
|
|
53315
53475
|
runBackgroundUpdateCheck = createBackgroundUpdateCheckRunner();
|
|
53316
53476
|
});
|
|
53317
53477
|
|
|
53478
|
+
// src/hooks/auto-update-checker/hook/deferred-startup-check.ts
|
|
53479
|
+
function scheduleDeferredStartupCheck(runCheck) {
|
|
53480
|
+
const timeout = setTimeout(runCheck, 5000);
|
|
53481
|
+
timeout.unref?.();
|
|
53482
|
+
}
|
|
53483
|
+
|
|
53318
53484
|
// src/hooks/auto-update-checker/hook/config-errors-toast.ts
|
|
53319
53485
|
async function showConfigErrorsIfAny(ctx) {
|
|
53320
53486
|
const errors3 = getConfigLoadErrors();
|
|
@@ -53494,44 +53660,57 @@ v${latestVersion} available. Restart to apply.` : "Sisyphus on steroids is steer
|
|
|
53494
53660
|
v${latestVersion} available. Restart OpenCode to apply.` : "OpenCode is now on Steroids. oMoMoMoMo...";
|
|
53495
53661
|
};
|
|
53496
53662
|
let hasChecked = false;
|
|
53663
|
+
let hasScheduled = false;
|
|
53497
53664
|
return {
|
|
53498
53665
|
event: ({ event }) => {
|
|
53499
53666
|
if (event.type !== "session.created")
|
|
53500
53667
|
return;
|
|
53501
53668
|
if (isCliRunMode)
|
|
53502
53669
|
return;
|
|
53503
|
-
if (hasChecked)
|
|
53670
|
+
if (hasChecked || hasScheduled)
|
|
53504
53671
|
return;
|
|
53505
|
-
|
|
53506
|
-
if (props?.info?.parentID)
|
|
53672
|
+
if (getParentID(event.properties))
|
|
53507
53673
|
return;
|
|
53508
|
-
|
|
53509
|
-
|
|
53510
|
-
|
|
53511
|
-
|
|
53512
|
-
|
|
53513
|
-
|
|
53514
|
-
|
|
53515
|
-
|
|
53516
|
-
|
|
53517
|
-
|
|
53674
|
+
hasScheduled = true;
|
|
53675
|
+
scheduleDeferredStartupCheck(() => {
|
|
53676
|
+
hasChecked = true;
|
|
53677
|
+
(async () => {
|
|
53678
|
+
const cachedVersion2 = deps.getCachedVersion();
|
|
53679
|
+
const localDevVersion = deps.getLocalDevVersion(ctx.directory);
|
|
53680
|
+
const displayVersion = localDevVersion ?? cachedVersion2;
|
|
53681
|
+
await deps.showConfigErrorsIfAny(ctx);
|
|
53682
|
+
await deps.updateAndShowConnectedProvidersCacheStatus(ctx);
|
|
53683
|
+
await deps.refreshModelCapabilitiesOnStartup(modelCapabilities);
|
|
53684
|
+
await deps.showModelCacheWarningIfNeeded(ctx);
|
|
53685
|
+
if (localDevVersion) {
|
|
53686
|
+
if (showStartupToast) {
|
|
53687
|
+
deps.showLocalDevToast(ctx, displayVersion, isSisyphusEnabled).catch(() => {});
|
|
53688
|
+
}
|
|
53689
|
+
deps.log("[auto-update-checker] Local development mode");
|
|
53690
|
+
return;
|
|
53691
|
+
}
|
|
53518
53692
|
if (showStartupToast) {
|
|
53519
|
-
deps.
|
|
53693
|
+
deps.showVersionToast(ctx, displayVersion, getToastMessage(false)).catch(() => {});
|
|
53520
53694
|
}
|
|
53521
|
-
deps.
|
|
53522
|
-
|
|
53523
|
-
|
|
53524
|
-
|
|
53525
|
-
|
|
53526
|
-
}
|
|
53527
|
-
deps.runBackgroundUpdateCheck(ctx, autoUpdate, getToastMessage).catch((err) => {
|
|
53528
|
-
deps.log("[auto-update-checker] Background update check failed:", err);
|
|
53529
|
-
});
|
|
53530
|
-
}, 0);
|
|
53695
|
+
deps.runBackgroundUpdateCheck(ctx, autoUpdate, getToastMessage).catch((err) => {
|
|
53696
|
+
deps.log("[auto-update-checker] Background update check failed:", err);
|
|
53697
|
+
});
|
|
53698
|
+
})();
|
|
53699
|
+
});
|
|
53531
53700
|
}
|
|
53532
53701
|
};
|
|
53533
53702
|
}
|
|
53534
|
-
var defaultDeps2
|
|
53703
|
+
var defaultDeps2, isRecord6 = (value) => {
|
|
53704
|
+
return typeof value === "object" && value !== null;
|
|
53705
|
+
}, getParentID = (properties) => {
|
|
53706
|
+
if (!isRecord6(properties))
|
|
53707
|
+
return;
|
|
53708
|
+
const { info } = properties;
|
|
53709
|
+
if (!isRecord6(info))
|
|
53710
|
+
return;
|
|
53711
|
+
const { parentID } = info;
|
|
53712
|
+
return typeof parentID === "string" && parentID.length > 0 ? parentID : undefined;
|
|
53713
|
+
};
|
|
53535
53714
|
var init_hook = __esm(() => {
|
|
53536
53715
|
init_logger();
|
|
53537
53716
|
init_checker();
|
|
@@ -53591,7 +53770,7 @@ var {
|
|
|
53591
53770
|
// package.json
|
|
53592
53771
|
var package_default = {
|
|
53593
53772
|
name: "@skj1724/oh-my-opencode",
|
|
53594
|
-
version: "3.17.
|
|
53773
|
+
version: "3.17.16",
|
|
53595
53774
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
53596
53775
|
main: "./dist/index.js",
|
|
53597
53776
|
types: "dist/index.d.ts",
|
|
@@ -53680,8 +53859,8 @@ var package_default = {
|
|
|
53680
53859
|
"oh-my-opencode-linux-x64-baseline": "3.17.4",
|
|
53681
53860
|
"oh-my-opencode-linux-x64-musl": "3.17.4",
|
|
53682
53861
|
"oh-my-opencode-linux-x64-musl-baseline": "3.17.4",
|
|
53683
|
-
"oh-my-opencode-windows-x64": "3.17.
|
|
53684
|
-
"oh-my-opencode-windows-x64-baseline": "3.17.
|
|
53862
|
+
"oh-my-opencode-windows-x64": "3.17.4",
|
|
53863
|
+
"oh-my-opencode-windows-x64-baseline": "3.17.4"
|
|
53685
53864
|
},
|
|
53686
53865
|
overrides: {},
|
|
53687
53866
|
trustedDependencies: [
|
|
@@ -75968,6 +76147,7 @@ async function createOpencode(options) {
|
|
|
75968
76147
|
}
|
|
75969
76148
|
|
|
75970
76149
|
// src/cli/run/server-connection.ts
|
|
76150
|
+
init_opencode_server_auth();
|
|
75971
76151
|
init_port_utils();
|
|
75972
76152
|
var import_picocolors10 = __toESM(require_picocolors(), 1);
|
|
75973
76153
|
|
|
@@ -76042,6 +76222,15 @@ async function withWorkingOpencodePath(startServer, finder = findWorkingOpencode
|
|
|
76042
76222
|
}
|
|
76043
76223
|
|
|
76044
76224
|
// src/cli/run/server-connection.ts
|
|
76225
|
+
var LOOPBACK_HOSTS = new Set(["127.0.0.1", "localhost", "::1", "[::1]", "0.0.0.0"]);
|
|
76226
|
+
function isLoopbackAttachUrl(url2) {
|
|
76227
|
+
try {
|
|
76228
|
+
const parsed = new URL(url2);
|
|
76229
|
+
return LOOPBACK_HOSTS.has(parsed.hostname);
|
|
76230
|
+
} catch {
|
|
76231
|
+
return false;
|
|
76232
|
+
}
|
|
76233
|
+
}
|
|
76045
76234
|
function isPortStartFailure(error48, port) {
|
|
76046
76235
|
if (!(error48 instanceof Error)) {
|
|
76047
76236
|
return false;
|
|
@@ -76065,6 +76254,9 @@ async function createServerConnection(options) {
|
|
|
76065
76254
|
if (attach !== undefined) {
|
|
76066
76255
|
console.log(import_picocolors10.default.dim("Attaching to existing server at"), import_picocolors10.default.cyan(attach));
|
|
76067
76256
|
const client3 = createOpencodeClient({ baseUrl: attach });
|
|
76257
|
+
if (isLoopbackAttachUrl(attach)) {
|
|
76258
|
+
injectServerAuthIntoClient(client3);
|
|
76259
|
+
}
|
|
76068
76260
|
return { client: client3, cleanup: () => {} };
|
|
76069
76261
|
}
|
|
76070
76262
|
if (port !== undefined) {
|
|
@@ -76086,11 +76278,13 @@ async function createServerConnection(options) {
|
|
|
76086
76278
|
}
|
|
76087
76279
|
console.log(import_picocolors10.default.dim("Port"), import_picocolors10.default.cyan(port.toString()), import_picocolors10.default.dim("became occupied, attaching to existing server"));
|
|
76088
76280
|
const client4 = createOpencodeClient({ baseUrl: `http://127.0.0.1:${port}` });
|
|
76281
|
+
injectServerAuthIntoClient(client4);
|
|
76089
76282
|
return { client: client4, cleanup: () => {} };
|
|
76090
76283
|
}
|
|
76091
76284
|
}
|
|
76092
76285
|
console.log(import_picocolors10.default.dim("Port"), import_picocolors10.default.cyan(port.toString()), import_picocolors10.default.dim("is occupied, attaching to existing server"));
|
|
76093
76286
|
const client3 = createOpencodeClient({ baseUrl: `http://127.0.0.1:${port}` });
|
|
76287
|
+
injectServerAuthIntoClient(client3);
|
|
76094
76288
|
return { client: client3, cleanup: () => {} };
|
|
76095
76289
|
}
|
|
76096
76290
|
let selectedPort;
|
|
@@ -76109,6 +76303,7 @@ async function createServerConnection(options) {
|
|
|
76109
76303
|
}
|
|
76110
76304
|
console.log(import_picocolors10.default.dim("Port range exhausted, attaching to existing server on"), import_picocolors10.default.cyan(DEFAULT_SERVER_PORT.toString()));
|
|
76111
76305
|
const client3 = createOpencodeClient({ baseUrl: `http://127.0.0.1:${DEFAULT_SERVER_PORT}` });
|
|
76306
|
+
injectServerAuthIntoClient(client3);
|
|
76112
76307
|
return { client: client3, cleanup: () => {} };
|
|
76113
76308
|
}
|
|
76114
76309
|
if (wasAutoSelected) {
|
|
@@ -79556,7 +79751,7 @@ async function getOrRegisterClient(options) {
|
|
|
79556
79751
|
}
|
|
79557
79752
|
}
|
|
79558
79753
|
function parseRegistrationResponse(data) {
|
|
79559
|
-
if (!
|
|
79754
|
+
if (!isRecord7(data))
|
|
79560
79755
|
return null;
|
|
79561
79756
|
const clientId = data.client_id;
|
|
79562
79757
|
if (typeof clientId !== "string" || clientId.length === 0)
|
|
@@ -79567,7 +79762,7 @@ function parseRegistrationResponse(data) {
|
|
|
79567
79762
|
}
|
|
79568
79763
|
return { clientId };
|
|
79569
79764
|
}
|
|
79570
|
-
function
|
|
79765
|
+
function isRecord7(value) {
|
|
79571
79766
|
return typeof value === "object" && value !== null;
|
|
79572
79767
|
}
|
|
79573
79768
|
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
type ProcessCleanupEvent = NodeJS.Signals | "beforeExit" | "exit" | "uncaughtException" | "unhandledRejection";
|
|
2
|
+
export declare function getNewListener(signal: ProcessCleanupEvent, existingListeners: Function[]): () => void;
|
|
3
|
+
export declare function flushMicrotasks(): Promise<void>;
|
|
4
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const HANDOFF_TEMPLATE = "# Handoff \u547D\u4EE4\n\n## \u76EE\u7684\n\n\u5728\u4EE5\u4E0B\u60C5\u51B5\u4F7F\u7528 /handoff\uFF1A\n- \u5F53\u524D\u4F1A\u8BDD\u4E0A\u4E0B\u6587\u53D8\u5F97\
|
|
1
|
+
export declare const HANDOFF_TEMPLATE = "# Handoff \u547D\u4EE4\n\n## \u76EE\u7684\n\n\u5728\u4EE5\u4E0B\u60C5\u51B5\u4F7F\u7528 /handoff\uFF1A\n- \u5F53\u524D\u4F1A\u8BDD\u4E0A\u4E0B\u6587\u53D8\u5F97\u8D8A\u6765\u8D8A\u957F\uFF0C\u8D28\u91CF\u5728\u4E0B\u964D\n- \u4F60\u60F3\u91CD\u65B0\u5F00\u59CB\uFF0C\u540C\u65F6\u4FDD\u7559\u6B64\u4F1A\u8BDD\u4E2D\u7684\u5173\u952E\u4E0A\u4E0B\u6587\n- \u4E0A\u4E0B\u6587\u7A97\u53E3\u63A5\u8FD1\u5BB9\u91CF\u4E0A\u9650\n\n\u8FD9\u4F1A\u521B\u5EFA\u4E00\u4E2A\u8BE6\u7EC6\u7684\u4E0A\u4E0B\u6587\u6458\u8981\uFF0C\u53EF\u7528\u4E8E\u5728\u65B0\u4F1A\u8BDD\u4E2D\u7EE7\u7EED\u5DE5\u4F5C\u3002\n\n---\n\n# \u9636\u6BB5 0\uFF1A\u9A8C\u8BC1\u8BF7\u6C42\n\n\u5728\u7EE7\u7EED\u4E4B\u524D\uFF0C\u786E\u8BA4\uFF1A\n- [ ] \u6B64\u4F1A\u8BDD\u4E2D\u6709\u503C\u5F97\u4FDD\u7559\u7684\u6709\u610F\u4E49\u7684\u5DE5\u4F5C\u6216\u4E0A\u4E0B\u6587\n- [ ] \u7528\u6237\u60F3\u8981\u521B\u5EFA\u4EA4\u63A5\u6458\u8981\uFF08\u4E0D\u53EA\u662F\u8BE2\u95EE\uFF09\n\n\u5982\u679C\u4F1A\u8BDD\u51E0\u4E4E\u662F\u7A7A\u7684\u6216\u6CA1\u6709\u6709\u610F\u4E49\u7684\u4E0A\u4E0B\u6587\uFF0C\u8BF7\u544A\u77E5\u7528\u6237\u6CA1\u6709\u5B9E\u8D28\u6027\u5185\u5BB9\u9700\u8981\u4EA4\u63A5\u3002\n\n---\n\n# \u9636\u6BB5 1\uFF1A\u6536\u96C6\u7A0B\u5E8F\u5316\u4E0A\u4E0B\u6587\n\n\u6267\u884C\u4EE5\u4E0B\u5DE5\u5177\u6765\u6536\u96C6\u5177\u4F53\u6570\u636E\uFF1A\n\n1. session_read({ session_id: \"$SESSION_ID\" }) - \u5B8C\u6574\u4F1A\u8BDD\u5386\u53F2\n2. todoread() - \u5F53\u524D\u4EFB\u52A1\u8FDB\u5EA6\n3. Bash({ command: \"git diff --stat HEAD~10..HEAD\" }) - \u8FD1\u671F\u6587\u4EF6\u53D8\u66F4\n4. Bash({ command: \"git status --porcelain\" }) - \u672A\u63D0\u4EA4\u7684\u53D8\u66F4\n\n\u5EFA\u8BAE\u6267\u884C\u987A\u5E8F\uFF1A\n\n```\nsession_read({ session_id: \"$SESSION_ID\" })\ntodoread()\nBash({ command: \"git diff --stat HEAD~10..HEAD\" })\nBash({ command: \"git status --porcelain\" })\n```\n\n\u5206\u6790\u6536\u96C6\u5230\u7684\u8F93\u51FA\uFF0C\u4EE5\u7406\u89E3\uFF1A\n- \u7528\u6237\u8981\u6C42\u4E86\u4EC0\u4E48\uFF08\u539F\u6587\u63AA\u8F9E\uFF09\n- \u5B8C\u6210\u4E86\u4EC0\u4E48\u5DE5\u4F5C\n- \u54EA\u4E9B\u4EFB\u52A1\u4ECD\u672A\u5B8C\u6210\uFF08\u5305\u62EC todo \u72B6\u6001\uFF09\n- \u505A\u51FA\u4E86\u54EA\u4E9B\u51B3\u7B56\n- \u4FEE\u6539\u6216\u8BA8\u8BBA\u4E86\u54EA\u4E9B\u6587\u4EF6\uFF08\u5305\u62EC git diff/stat + status\uFF09\n- \u5EFA\u7ACB\u4E86\u54EA\u4E9B\u6A21\u5F0F\u3001\u7EA6\u675F\u6216\u504F\u597D\n\n---\n\n# \u9636\u6BB5 2\uFF1A\u63D0\u53D6\u4E0A\u4E0B\u6587\n\n\u4EE5\u7B2C\u4E00\u4EBA\u79F0\u89C6\u89D2\uFF08\"I did...\"\u3001\"I told you...\"\uFF09\u7F16\u5199\u4E0A\u4E0B\u6587\u6458\u8981\u3002\n\n\u4E13\u6CE8\u4E8E\uFF1A\n- \u80FD\u529B\u548C\u884C\u4E3A\uFF0C\u800C\u975E\u9010\u6587\u4EF6\u7684\u5B9E\u73B0\u7EC6\u8282\n- \u5BF9\u7EE7\u7EED\u5DE5\u4F5C\u91CD\u8981\u7684\u4E8B\u9879\n- \u907F\u514D\u8FC7\u591A\u7684\u5B9E\u73B0\u7EC6\u8282\uFF08\u53D8\u91CF\u540D\u3001\u5B58\u50A8\u952E\u3001\u5E38\u91CF\uFF09\uFF0C\u9664\u975E\u5173\u952E\n- USER REQUESTS\uFF08\u539F\u6587\uFF09\u5FC5\u987B\u9010\u5B57\u4FDD\u7559\uFF08\u4E0D\u8981\u8F6C\u8FF0\uFF09\n- EXPLICIT CONSTRAINTS \u5FC5\u987B\u4EC5\u9010\u5B57\u4FDD\u7559\uFF08\u4E0D\u8981\u7F16\u9020\uFF09\n\n\u63D0\u53D6\u65F6\u8003\u8651\u7684\u95EE\u9898\uFF1A\n- \u6211\u521A\u521A\u505A\u4E86\u4EC0\u4E48\u6216\u5B9E\u73B0\u4E86\u4EC0\u4E48\uFF1F\n- \u6211\u5DF2\u7ECF\u7ED9\u51FA\u4E86\u54EA\u4E9B\u4ECD\u7136\u76F8\u5173\u7684\u6307\u4EE4\uFF08\u4F8B\u5982\u9075\u5FAA\u4EE3\u7801\u5E93\u4E2D\u7684\u6A21\u5F0F\uFF09\uFF1F\n- \u6211\u544A\u8BC9\u8FC7\u4F60\u54EA\u4E9B\u6587\u4EF6\u662F\u91CD\u8981\u7684\u6216\u6211\u6B63\u5728\u5904\u7406\u54EA\u4E9B\u6587\u4EF6\uFF1F\n- \u6211\u662F\u5426\u63D0\u4F9B\u4E86\u5E94\u8BE5\u5305\u542B\u7684\u8BA1\u5212\u6216\u89C4\u683C\uFF1F\n- \u6211\u5DF2\u7ECF\u544A\u8BC9\u8FC7\u4F60\u54EA\u4E9B\u91CD\u8981\u7684\u4E8B\u9879\uFF08\u5E93\u3001\u6A21\u5F0F\u3001\u7EA6\u675F\u3001\u504F\u597D\uFF09\uFF1F\n- \u6211\u53D1\u73B0\u4E86\u54EA\u4E9B\u91CD\u8981\u7684\u6280\u672F\u7EC6\u8282\uFF08API\u3001\u65B9\u6CD5\u3001\u6A21\u5F0F\uFF09\uFF1F\n- \u6211\u53D1\u73B0\u4E86\u54EA\u4E9B\u8B66\u544A\u3001\u9650\u5236\u6216\u672A\u89E3\u51B3\u7684\u95EE\u9898\uFF1F\n\n---\n\n# \u9636\u6BB5 3\uFF1A\u683C\u5F0F\u5316\u8F93\u51FA\n\n\u4F7F\u7528\u4EE5\u4E0B\u786E\u5207\u683C\u5F0F\u751F\u6210\u4EA4\u63A5\u6458\u8981\uFF1A\n\n```\nHANDOFF CONTEXT\n===============\n\nUSER REQUESTS (AS-IS)\n---------------------\n- [\u7528\u6237\u8BF7\u6C42\u7684\u539F\u6587 - \u4E0D\u8981\u8F6C\u8FF0]\n\nGOAL\n----\n[\u4E00\u53E5\u8BDD\u63CF\u8FF0\u4E0B\u4E00\u6B65\u5E94\u8BE5\u505A\u4EC0\u4E48]\n\nWORK COMPLETED\n--------------\n- [\u4EE5\u7B2C\u4E00\u4EBA\u79F0\u5217\u51FA\u5DF2\u5B8C\u6210\u7684\u4E8B\u9879]\n- [\u9002\u5F53\u65F6\u5305\u542B\u5177\u4F53\u7684\u6587\u4EF6\u8DEF\u5F84]\n- [\u8BB0\u5F55\u5173\u952E\u5B9E\u73B0\u51B3\u7B56]\n\nCURRENT STATE\n-------------\n- [\u4EE3\u7801\u5E93\u6216\u4EFB\u52A1\u7684\u5F53\u524D\u72B6\u6001]\n- [\u9002\u7528\u65F6\u7684\u6784\u5EFA/\u6D4B\u8BD5\u72B6\u6001]\n- [\u4EFB\u4F55\u73AF\u5883\u6216\u914D\u7F6E\u72B6\u6001]\n\nPENDING TASKS\n-------------\n- [\u5DF2\u8BA1\u5212\u4F46\u672A\u5B8C\u6210\u7684\u4EFB\u52A1]\n- [\u4E0B\u4E00\u4E2A\u903B\u8F91\u6B65\u9AA4]\n- [\u9047\u5230\u7684\u4EFB\u4F55\u963B\u788D\u6216\u95EE\u9898]\n- [\u5305\u542B\u4ECE todoread() \u83B7\u53D6\u7684\u5F53\u524D todo \u72B6\u6001]\n\nKEY FILES\n---------\n- [path/to/file1] - [\u7B80\u8981\u89D2\u8272\u63CF\u8FF0]\n- [path/to/file2] - [\u7B80\u8981\u89D2\u8272\u63CF\u8FF0]\n\uFF08\u6700\u591A 10 \u4E2A\u6587\u4EF6\uFF0C\u6309\u91CD\u8981\u6027\u6392\u5E8F\uFF09\n- \uFF08\u5305\u62EC git diff/stat \u548C git status \u4E2D\u7684\u6587\u4EF6\uFF09\n\nIMPORTANT DECISIONS\n-------------------\n- [\u505A\u51FA\u7684\u6280\u672F\u51B3\u7B56\u53CA\u5176\u539F\u56E0]\n- [\u8003\u8651\u7684\u6743\u8861]\n- [\u5EFA\u7ACB\u7684\u6A21\u5F0F\u6216\u7EA6\u5B9A]\n\nEXPLICIT CONSTRAINTS\n--------------------\n- [\u4EC5\u9010\u5B57\u4FDD\u7559\u7684\u7EA6\u675F - \u6765\u81EA\u7528\u6237\u6216\u73B0\u6709 AGENTS.md]\n- \u5982\u679C\u6CA1\u6709\uFF0C\u5199\uFF1ANone\n\nCONTEXT FOR CONTINUATION\n------------------------\n- [\u4E0B\u4E00\u4E2A\u4F1A\u8BDD\u9700\u8981\u77E5\u9053\u4EC0\u4E48\u624D\u80FD\u7EE7\u7EED]\n- [\u9700\u8981\u6CE8\u610F\u7684\u8B66\u544A\u6216\u6CE8\u610F\u4E8B\u9879]\n- [\u76F8\u5173\u6587\u6863\u7684\u53C2\u8003]\n```\n\n\u6458\u8981\u89C4\u5219\uFF1A\n- \u4F7F\u7528\u7EAF\u6587\u672C\u548C\u9879\u76EE\u7B26\u53F7\n- \u4E0D\u4F7F\u7528 # markdown \u6807\u9898\uFF08\u4F7F\u7528\u4E0A\u9762\u5E26\u7834\u6298\u53F7\u7684\u683C\u5F0F\uFF09\n- \u5185\u5BB9\u4E2D\u4E0D\u4F7F\u7528\u7C97\u4F53\u3001\u659C\u4F53\u6216\u4EE3\u7801\u5757\n- \u4F7F\u7528\u76F8\u5BF9\u4E8E workspace \u7684\u6587\u4EF6\u8DEF\u5F84\n- \u4FDD\u6301\u91CD\u70B9\u2014\u2014\u53EA\u5305\u542B\u5BF9\u7EE7\u7EED\u5DE5\u4F5C\u91CD\u8981\u7684\u4E8B\u9879\n- \u6839\u636E\u590D\u6742\u5EA6\u9009\u62E9\u9002\u5F53\u7684\u957F\u5EA6\n- USER REQUESTS\uFF08\u539F\u6587\uFF09\u548C EXPLICIT CONSTRAINTS \u5FC5\u987B\u4EC5\u9010\u5B57\u4FDD\u7559\n\n---\n\n# \u9636\u6BB5 4\uFF1A\u63D0\u4F9B\u8BF4\u660E\n\n\u751F\u6210\u6458\u8981\u540E\uFF0C\u5411\u7528\u6237\u8BF4\u660E\uFF1A\n\n```\n---\n\nTO CONTINUE IN A NEW SESSION:\n\n1. Press 'n' in OpenCode TUI to open a new session, or run 'opencode' in a new terminal\n2. Paste the HANDOFF CONTEXT above as your first message\n3. Add your request: \"Continue from the handoff context above. [Your next task]\"\n\nThe new session will have all context needed to continue seamlessly.\n```\n\n---\n\n# \u91CD\u8981\u7EA6\u675F\n\n- \u4E0D\u8981\u5C1D\u8BD5\u4EE5\u7F16\u7A0B\u65B9\u5F0F\u521B\u5EFA\u65B0\u4F1A\u8BDD\uFF08\u6CA1\u6709\u53EF\u4F9B agents \u4F7F\u7528\u7684 API\uFF09\n- \u63D0\u4F9B\u4E00\u4E2A\u81EA\u5305\u542B\u7684\u6458\u8981\uFF0C\u5728\u65E0\u6CD5\u8BBF\u95EE\u6B64\u4F1A\u8BDD\u7684\u60C5\u51B5\u4E0B\u4E5F\u80FD\u5DE5\u4F5C\n- \u5305\u542B\u76F8\u5BF9\u4E8E workspace \u7684\u6587\u4EF6\u8DEF\u5F84\n- \u4E0D\u8981\u5305\u542B\u654F\u611F\u4FE1\u606F\uFF08API \u5BC6\u94A5\u3001\u51ED\u636E\u3001 secrets\uFF09\n- KEY FILES \u90E8\u5206\u4E0D\u8981\u8D85\u8FC7 10 \u4E2A\u6587\u4EF6\n- GOAL \u90E8\u5206\u4FDD\u6301\u5728\u4E00\u53E5\u8BDD\u6216\u77ED\u6BB5\u843D\u5185\n\n---\n\n# \u7ACB\u5373\u6267\u884C\n\n\u9996\u5148\u6536\u96C6\u7A0B\u5E8F\u5316\u4E0A\u4E0B\u6587\uFF0C\u7136\u540E\u5408\u6210\u4EA4\u63A5\u6458\u8981\u3002\n";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const INIT_DEEP_TEMPLATE = "# /init-deep\n\n\u751F\u6210\u5C42\u7EA7\u5F0F AGENTS.md \u6587\u4EF6\u3002\u6839\u76EE\u5F55 + \u6309\u590D\u6742\u5EA6\u8BC4\u5206\u7684\u5B50\u76EE\u5F55\u3002\n\n## \u4F7F\u7528\u65B9\u6CD5\n\n```\n/init-deep # \u66F4\u65B0\u6A21\u5F0F\uFF1A\u4FEE\u6539\u73B0\u6709 + \u6309\u9700\u521B\u5EFA\u65B0\u6587\u4EF6\n/init-deep --create-new # \u8BFB\u53D6\u73B0\u6709 \u2192 \u5220\u9664\u5168\u90E8 \u2192 \u4ECE\u5934\u91CD\u65B0\u751F\u6210\n/init-deep --max-depth=2 # \u9650\u5236\u76EE\u5F55\u6DF1\u5EA6\uFF08\u9ED8\u8BA4\uFF1A3\uFF09\n```\n\n---\n\n## \u5DE5\u4F5C\u6D41\uFF08\u6982\u89C8\uFF09\n\n1. **\u53D1\u73B0 + \u5206\u6790**\uFF08\u5E76\u884C\uFF09\n - \u7ACB\u5373\u542F\u52A8\u540E\u53F0 explore agents\n - \u4E3B\u4F1A\u8BDD\uFF1Abash \u7ED3\u6784 + LSP codemap + \u8BFB\u53D6\u73B0\u6709 AGENTS.md\n2. **\u8BC4\u5206 & \u51B3\u7B56** - \u6839\u636E\u5408\u5E76\u7ED3\u679C\u786E\u5B9A AGENTS.md \u4F4D\u7F6E\n3. **\u751F\u6210** - \u5148\u6839\u76EE\u5F55\uFF0C\u7136\u540E\u5E76\u884C\u751F\u6210\u5B50\u76EE\u5F55\n4. **\u5BA1\u67E5** - \u53BB\u91CD\u3001\u88C1\u526A\u3001\u9A8C\u8BC1\n\n<critical>\n**TodoWrite \u6240\u6709\u9636\u6BB5\u3002\u5B9E\u65F6\u6807\u8BB0 in_progress \u2192 completed\u3002**\n```\nTodoWrite([\n { id: \"discovery\", content: \"Fire explore agents + LSP codemap + read existing\", status: \"pending\", priority: \"high\" },\n { id: \"scoring\", content: \"Score directories, determine locations\", status: \"pending\", priority: \"high\" },\n { id: \"generate\", content: \"Generate AGENTS.md files (root + subdirs)\", status: \"pending\", priority: \"high\" },\n { id: \"review\", content: \"Deduplicate, validate, trim\", status: \"pending\", priority: \"medium\" }\n])\n```\n</critical>\n\n---\n\n## Phase 1: \u53D1\u73B0 + \u5206\u6790\uFF08\u5E76\u884C\uFF09\n\n**\u5C06 \"discovery\" \u6807\u8BB0\u4E3A in_progress\u3002**\n\n### \u7ACB\u5373\u542F\u52A8\u540E\u53F0 Explore Agents\n\n\u4E0D\u8981\u7B49\u5F85\u2014\u2014\u8FD9\u4E9B\u5F02\u6B65\u8FD0\u884C\uFF0C\u540C\u65F6\u4E3B\u4F1A\u8BDD\u6267\u884C\u5176\u4ED6\u4EFB\u52A1\u3002\n\n```\n// \u540C\u65F6\u542F\u52A8\uFF0C\u7A0D\u540E\u6536\u96C6\u7ED3\u679C\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore project structure\", run_in_background=true, prompt=\"Project structure: PREDICT standard patterns for detected language \u2192 REPORT deviations only\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find entry points\", run_in_background=true, prompt=\"Entry points: FIND main files \u2192 REPORT non-standard organization\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find conventions\", run_in_background=true, prompt=\"Conventions: FIND config files (.eslintrc, pyproject.toml, .editorconfig) \u2192 REPORT project-specific rules\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find anti-patterns\", run_in_background=true, prompt=\"Anti-patterns: FIND 'DO NOT', 'NEVER', 'ALWAYS', 'DEPRECATED' comments \u2192 LIST forbidden patterns\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore build/CI\", run_in_background=true, prompt=\"Build/CI: FIND .github/workflows, Makefile \u2192 REPORT non-standard patterns\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find test patterns\", run_in_background=true, prompt=\"Test patterns: FIND test configs, test structure \u2192 REPORT unique conventions\")\n```\n\n<dynamic-agents>\n**\u52A8\u6001\u4EE3\u7406\u751F\u6210**\uFF1A\u5728 bash \u5206\u6790\u540E\uFF0C\u6839\u636E\u9879\u76EE\u89C4\u6A21\u751F\u6210\u989D\u5916\u7684 explore agents\uFF1A\n\n| \u56E0\u7D20 | \u9608\u503C | \u989D\u5916 Agents |\n|--------|-----------|-------------------|\n| **\u603B\u6587\u4EF6\u6570** | >100 | \u6BCF 100 \u4E2A\u6587\u4EF6 +1 |\n| **\u603B\u884C\u6570** | >10k | \u6BCF 10k \u884C +1 |\n| **\u76EE\u5F55\u6DF1\u5EA6** | \u22654 | \u6DF1\u5EA6\u63A2\u7D22 +2 |\n| **\u5927\u6587\u4EF6\uFF08>500 \u884C\uFF09** | >10 \u4E2A\u6587\u4EF6 | \u590D\u6742\u5EA6\u70ED\u70B9 +1 |\n| **Monorepo** | \u5DF2\u68C0\u6D4B\u5230 | \u6BCF\u4E2A package/workspace +1 |\n| **\u591A\u8BED\u8A00** | >1 | \u6BCF\u79CD\u8BED\u8A00 +1 |\n\n```bash\n# \u9996\u5148\u6D4B\u91CF\u9879\u76EE\u89C4\u6A21\ntotal_files=$(find . -type f -not -path '*/node_modules/*' -not -path '*/.git/*' | wc -l)\ntotal_lines=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" -o -name \"*.go\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | tail -1 | awk '{print $1}')\nlarge_files=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | awk '$1 > 500 {count++} END {print count+0}')\nmax_depth=$(find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' | awk -F/ '{print NF}' | sort -rn | head -1)\n```\n\n\u751F\u6210\u793A\u4F8B\uFF1A\n```\n// 500 \u4E2A\u6587\u4EF6\uFF0C50k \u884C\uFF0C\u6DF1\u5EA6 6\uFF0C15 \u4E2A\u5927\u6587\u4EF6 \u2192 \u751F\u6210 5+5+2+1 = 13 \u4E2A\u989D\u5916 agents\ntask(subagent_type=\"explore\", load_skills=[], description=\"Analyze large files\", run_in_background=true, prompt=\"Large file analysis: FIND files >500 lines, REPORT complexity hotspots\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore deep modules\", run_in_background=true, prompt=\"Deep modules at depth 4+: FIND hidden patterns, internal conventions\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find shared utilities\", run_in_background=true, prompt=\"Cross-cutting concerns: FIND shared utilities across directories\")\n// ... \u6839\u636E\u8BA1\u7B97\u751F\u6210\u66F4\u591A\n```\n</dynamic-agents>\n\n### \u4E3B\u4F1A\u8BDD\uFF1A\u5E76\u884C\u5206\u6790\n\n**\u5728\u540E\u53F0 agents \u8FD0\u884C\u65F6**\uFF0C\u4E3B\u4F1A\u8BDD\u6267\u884C\uFF1A\n\n#### 1. Bash \u7ED3\u6784\u5206\u6790\n```bash\n# \u76EE\u5F55\u6DF1\u5EA6 + \u6587\u4EF6\u8BA1\u6570\nfind . -type d -not -path '*/\\.*' -not -path '*/node_modules/*' -not -path '*/venv/*' -not -path '*/dist/*' -not -path '*/build/*' | awk -F/ '{print NF-1}' | sort -n | uniq -c\n\n# \u6BCF\u4E2A\u76EE\u5F55\u7684\u6587\u4EF6\u6570\uFF08\u524D 30\uFF09\nfind . -type f -not -path '*/\\.*' -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -30\n\n# \u6309\u6269\u5C55\u540D\u7684\u4EE3\u7801\u96C6\u4E2D\u5EA6\nfind . -type f \\( -name \"*.py\" -o -name \"*.ts\" -o -name \"*.tsx\" -o -name \"*.js\" -o -name \"*.go\" -o -name \"*.rs\" \\) -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -20\n\n# \u73B0\u6709 AGENTS.md / CLAUDE.md\nfind . -type f \\( -name \"AGENTS.md\" -o -name \"CLAUDE.md\" \\) -not -path '*/node_modules/*' 2>/dev/null\n```\n\n#### 2. \u8BFB\u53D6\u73B0\u6709 AGENTS.md\n```\n\u5BF9\u4E8E\u6BCF\u4E2A\u627E\u5230\u7684\u73B0\u6709\u6587\u4EF6\uFF1A\n Read(filePath=file)\n \u63D0\u53D6\uFF1A\u5173\u952E\u6D1E\u5BDF\u3001\u7EA6\u5B9A\u3001\u53CD\u6A21\u5F0F\n \u5B58\u50A8\u5230 EXISTING_AGENTS \u6620\u5C04\n```\n\n\u5982\u679C\u4F7F\u7528 `--create-new`\uFF1A\u9996\u5148\u8BFB\u53D6\u6240\u6709\u73B0\u6709\u6587\u4EF6\uFF08\u4FDD\u7559\u4E0A\u4E0B\u6587\uFF09\u2192 \u7136\u540E\u5220\u9664\u5168\u90E8 \u2192 \u91CD\u65B0\u751F\u6210\u3002\n\n#### 3. LSP Codemap\uFF08\u5982\u53EF\u7528\uFF09\n```\nLspServers() # \u68C0\u67E5\u53EF\u7528\u6027\n\n# \u5165\u53E3\u70B9\uFF08\u5E76\u884C\uFF09\nLspDocumentSymbols(filePath=\"src/index.ts\")\nLspDocumentSymbols(filePath=\"main.py\")\n\n# \u5173\u952E\u7B26\u53F7\uFF08\u5E76\u884C\uFF09\nLspWorkspaceSymbols(filePath=\".\", query=\"class\")\nLspWorkspaceSymbols(filePath=\".\", query=\"interface\")\nLspWorkspaceSymbols(filePath=\".\", query=\"function\")\n\n# \u4E3B\u8981\u5BFC\u51FA\u7684\u4E2D\u5FC3\u6027\nLspFindReferences(filePath=\"...\", line=X, character=Y)\n```\n\n**LSP \u56DE\u9000\u65B9\u6848**\uFF1A\u5982\u4E0D\u53EF\u7528\uFF0C\u4F9D\u9760 explore agents + AST-grep\u3002\n\n### \u6536\u96C6\u540E\u53F0\u7ED3\u679C\n\n```\n// \u4E3B\u4F1A\u8BDD\u5206\u6790\u5B8C\u6210\u540E\uFF0C\u6536\u96C6\u6240\u6709\u4EFB\u52A1\u7ED3\u679C\nfor each task_id: background_output(task_id=\"...\")\n```\n\n**\u5408\u5E76**\uFF1Abash + LSP + \u73B0\u6709 + explore \u53D1\u73B0\u3002\u5C06 \"discovery\" \u6807\u8BB0\u4E3A completed\u3002\n\n---\n\n## Phase 2: \u8BC4\u5206 & \u4F4D\u7F6E\u51B3\u7B56\n\n**\u5C06 \"scoring\" \u6807\u8BB0\u4E3A in_progress\u3002**\n\n### \u8BC4\u5206\u77E9\u9635\n\n| \u56E0\u7D20 | \u6743\u91CD | \u9AD8\u9608\u503C | \u6765\u6E90 |\n|--------|--------|--------|----------------|\n| \u6587\u4EF6\u6570 | 3x | >20 | bash |\n| \u5B50\u76EE\u5F55\u6570 | 2x | >5 | bash |\n| \u4EE3\u7801\u6BD4\u4F8B | 2x | >70% | bash |\n| \u72EC\u7279\u6A21\u5F0F | 1x | \u6709\u81EA\u5DF1\u7684\u914D\u7F6E | explore |\n| \u6A21\u5757\u8FB9\u754C | 2x | \u6709 index.ts/__init__.py | bash |\n| \u7B26\u53F7\u5BC6\u5EA6 | 2x | >30 \u4E2A\u7B26\u53F7 | LSP |\n| \u5BFC\u51FA\u6570 | 2x | >10 \u4E2A\u5BFC\u51FA | LSP |\n| \u5F15\u7528\u4E2D\u5FC3\u6027 | 3x | >20 \u4E2A\u5F15\u7528 | LSP |\n\n### \u51B3\u7B56\u89C4\u5219\n\n| \u8BC4\u5206 | Action |\n|-------|--------|\n| **\u6839\u76EE\u5F55 (.)** | \u59CB\u7EC8\u521B\u5EFA |\n| **>15** | \u521B\u5EFA AGENTS.md |\n| **8-15** | \u5982\u679C\u662F\u72EC\u7ACB\u9886\u57DF\u5219\u521B\u5EFA |\n| **<8** | \u8DF3\u8FC7\uFF08\u7236\u7EA7\u8986\u76D6\uFF09 |\n\n### \u8F93\u51FA\n```\nAGENTS_LOCATIONS = [\n { path: \".\", type: \"root\" },\n { path: \"src/hooks\", score: 18, reason: \"high complexity\" },\n { path: \"src/api\", score: 12, reason: \"distinct domain\" }\n]\n```\n\n**\u5C06 \"scoring\" \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n## Phase 3: \u751F\u6210 AGENTS.md\n\n**\u5C06 \"generate\" \u6807\u8BB0\u4E3A in_progress\u3002**\n\n<critical>\n**\u6587\u4EF6\u5199\u5165\u89C4\u5219**\uFF1A\u5982\u679C\u76EE\u6807\u8DEF\u5F84\u5DF2\u5B58\u5728 AGENTS.md \u2192 \u4F7F\u7528 `Edit` \u5DE5\u5177\u3002\u5982\u679C\u4E0D\u5B58\u5728 \u2192 \u4F7F\u7528 `Write` \u5DE5\u5177\u3002\n\u6C38\u8FDC\u4E0D\u8981\u4F7F\u7528 Write \u8986\u76D6\u73B0\u6709\u6587\u4EF6\u3002\u59CB\u7EC8\u901A\u8FC7 `Read` \u6216\u53D1\u73B0\u7ED3\u679C\u5148\u68C0\u67E5\u5B58\u5728\u6027\u3002\n</critical>\n\n### \u6839\u76EE\u5F55 AGENTS.md\uFF08\u5B8C\u6574\u5904\u7406\uFF09\n\n```markdown\n# PROJECT KNOWLEDGE BASE\n\n**Generated:** {TIMESTAMP}\n**Commit:** {SHORT_SHA}\n**Branch:** {BRANCH}\n\n## OVERVIEW\n{1-2 sentences: what + core stack}\n\n## STRUCTURE\n\\`\\`\\`\n{root}/\n\u251C\u2500\u2500 {dir}/ # {non-obvious purpose only}\n\u2514\u2500\u2500 {entry}\n\\`\\`\\`\n\n## WHERE TO LOOK\n| Task | Location | Notes |\n|------|----------|-------|\n\n## CODE MAP\n{From LSP - skip if unavailable or project <10 files}\n\n| Symbol | Type | Location | Refs | Role |\n|--------|------|----------|------|------|\n\n## CONVENTIONS\n{ONLY deviations from standard}\n\n## ANTI-PATTERNS (THIS PROJECT)\n{Explicitly forbidden here}\n\n## UNIQUE STYLES\n{Project-specific}\n\n## COMMANDS\n\\`\\`\\`bash\n{dev/test/build}\n\\`\\`\\`\n\n## NOTES\n{Gotchas}\n```\n\n**\u8D28\u91CF\u95E8\u69DB**\uFF1A50-150 \u884C\uFF0C\u65E0\u901A\u7528\u5EFA\u8BAE\uFF0C\u65E0\u663E\u800C\u6613\u89C1\u7684\u4FE1\u606F\u3002\n\n### \u5B50\u76EE\u5F55 AGENTS.md\uFF08\u5E76\u884C\uFF09\n\n\u4E3A\u6BCF\u4E2A\u4F4D\u7F6E\u542F\u52A8\u5199\u5165\u4EFB\u52A1\uFF1A\n\n```\nfor loc in AGENTS_LOCATIONS (except root):\n task(category=\"writing\", load_skills=[], run_in_background=false, description=\"Generate AGENTS.md\", prompt=\\`\n Generate AGENTS.md for: ${loc.path}\n - Reason: ${loc.reason}\n - 30-80 lines max\n - NEVER repeat parent content\n - Sections: OVERVIEW (1 line), STRUCTURE (if >5 subdirs), WHERE TO LOOK, CONVENTIONS (if different), ANTI-PATTERNS\n \\`)\n```\n\n**\u7B49\u5F85\u6240\u6709\u4EFB\u52A1\u5B8C\u6210\u3002\u5C06 \"generate\" \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n## Phase 4: \u5BA1\u67E5 & \u53BB\u91CD\n\n**\u5C06 \"review\" \u6807\u8BB0\u4E3A in_progress\u3002**\n\n\u5BF9\u4E8E\u6BCF\u4E2A\u751F\u6210\u7684\u6587\u4EF6\uFF1A\n- \u79FB\u9664\u901A\u7528\u5EFA\u8BAE\n- \u79FB\u9664\u7236\u7EA7\u91CD\u590D\u5185\u5BB9\n- \u88C1\u526A\u5230\u5927\u5C0F\u9650\u5236\n- \u9A8C\u8BC1\u7535\u62A5\u98CE\u683C\n\n**\u5C06 \"review\" \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n## \u6700\u7EC8\u62A5\u544A\n\n```\n=== init-deep Complete ===\n\nMode: {update | create-new}\n\nFiles:\n [OK] ./AGENTS.md (root, {N} lines)\n [OK] ./src/hooks/AGENTS.md ({N} lines)\n\nDirs Analyzed: {N}\nAGENTS.md Created: {N}\nAGENTS.md Updated: {N}\n\nHierarchy:\n ./AGENTS.md\n \u2514\u2500\u2500 src/hooks/AGENTS.md\n```\n\n---\n\n## \u53CD\u6A21\u5F0F\n\n- **\u9759\u6001 agent \u6570\u91CF**\uFF1A\u5FC5\u987B\u6839\u636E\u9879\u76EE\u89C4\u6A21/\u6DF1\u5EA6\u53D8\u5316\n- **\u987A\u5E8F\u6267\u884C**\uFF1A\u5FC5\u987B\u5E76\u884C\uFF08explore + LSP \u5E76\u53D1\uFF09\n- **\u5FFD\u7565\u73B0\u6709**\uFF1A\u59CB\u7EC8\u5148\u8BFB\u53D6\u73B0\u6709\u6587\u4EF6\uFF0C\u5373\u4F7F\u4F7F\u7528 --create-new\n- **\u8FC7\u5EA6\u6587\u6863\u5316**\uFF1A\u4E0D\u662F\u6BCF\u4E2A\u76EE\u5F55\u90FD\u9700\u8981 AGENTS.md\n- **\u5197\u4F59**\uFF1A\u5B50\u7EA7\u7EDD\u4E0D\u91CD\u590D\u7236\u7EA7\u5185\u5BB9\n- **\u901A\u7528\u5185\u5BB9**\uFF1A\u79FB\u9664\u9002\u7528\u4E8E\u6240\u6709\u9879\u76EE\u7684\u5185\u5BB9\n- **\u5197\u957F\u98CE\u683C**\uFF1A\u7535\u62A5\u98CE\u683C\u5426\u5219\u6B7B";
|
|
1
|
+
export declare const INIT_DEEP_TEMPLATE = "# /init-deep\n\n\u751F\u6210\u5C42\u7EA7\u5316\u7684 AGENTS.md \u6587\u4EF6\u3002\u6839\u76EE\u5F55 + \u6309\u590D\u6742\u5EA6\u8BC4\u5206\u7684\u5B50\u76EE\u5F55\u3002\n\n## \u4F7F\u7528\u65B9\u5F0F\n\n```\n/init-deep # \u66F4\u65B0\u6A21\u5F0F\uFF1A\u4FEE\u6539\u73B0\u6709\u6587\u4EF6 + \u5728\u9700\u8981\u65F6\u521B\u5EFA\u65B0\u6587\u4EF6\n/init-deep --create-new # \u8BFB\u53D6\u73B0\u6709\u6587\u4EF6 \u2192 \u5220\u9664\u5168\u90E8 \u2192 \u4ECE\u5934\u91CD\u65B0\u751F\u6210\n/init-deep --max-depth=2 # \u9650\u5236\u76EE\u5F55\u6DF1\u5EA6\uFF08\u9ED8\u8BA4\uFF1A3\uFF09\n```\n\n---\n\n## \u5DE5\u4F5C\u6D41\u7A0B\uFF08\u6982\u89C8\uFF09\n\n1. **\u53D1\u73B0 + \u5206\u6790**\uFF08\u5E76\u53D1\uFF09\n - \u7ACB\u5373\u542F\u52A8\u540E\u53F0 explore agents\n - \u4E3B\u4F1A\u8BDD\uFF1Abash \u76EE\u5F55\u7ED3\u6784 + LSP codemap + \u8BFB\u53D6\u73B0\u6709 AGENTS.md\n2. **\u8BC4\u5206 & \u51B3\u7B56** - \u6839\u636E\u5408\u5E76\u7ED3\u679C\u786E\u5B9A AGENTS.md \u7684\u653E\u7F6E\u4F4D\u7F6E\n3. **\u751F\u6210** - \u5148\u751F\u6210\u6839\u76EE\u5F55\uFF0C\u7136\u540E\u5E76\u884C\u751F\u6210\u5B50\u76EE\u5F55\n4. **\u5BA1\u67E5** - \u53BB\u91CD\u3001\u88C1\u526A\u3001\u9A8C\u8BC1\n\n<critical>\n**\u4E3A\u6240\u6709\u9636\u6BB5\u521B\u5EFA TodoWrite\u3002\u5B9E\u65F6\u6807\u8BB0 in_progress \u2192 completed\u3002**\n```\nTodoWrite([\n { id: \"discovery\", content: \"\u542F\u52A8 explore agents + LSP codemap + \u8BFB\u53D6\u73B0\u6709\u6587\u4EF6\", status: \"pending\", priority: \"high\" },\n { id: \"scoring\", content: \"\u4E3A\u76EE\u5F55\u8BC4\u5206\uFF0C\u786E\u5B9A\u653E\u7F6E\u4F4D\u7F6E\", status: \"pending\", priority: \"high\" },\n { id: \"generate\", content: \"\u751F\u6210 AGENTS.md \u6587\u4EF6\uFF08\u6839\u76EE\u5F55 + \u5B50\u76EE\u5F55\uFF09\", status: \"pending\", priority: \"high\" },\n { id: \"review\", content: \"\u53BB\u91CD\u3001\u9A8C\u8BC1\u3001\u88C1\u526A\", status: \"pending\", priority: \"medium\" }\n])\n```\n</critical>\n\n---\n\n## \u9636\u6BB5 1\uFF1A\u53D1\u73B0 + \u5206\u6790\uFF08\u5E76\u53D1\uFF09\n\n**\u5C06 \"discovery\" \u6807\u8BB0\u4E3A in_progress\u3002**\n\n### \u7ACB\u5373\u542F\u52A8\u540E\u53F0 Explore Agents\n\n\u4E0D\u8981\u7B49\u5F85\u2014\u2014\u8FD9\u4E9B agent \u5F02\u6B65\u8FD0\u884C\uFF0C\u4E0E\u4E3B\u4F1A\u8BDD\u540C\u65F6\u5DE5\u4F5C\u3002\n\n```\n// \u4E00\u6B21\u6027\u542F\u52A8\u5168\u90E8\uFF0C\u7A0D\u540E\u6536\u96C6\u7ED3\u679C\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore project structure\", run_in_background=true, prompt=\"Project structure: PREDICT standard patterns for detected language \u2192 REPORT deviations only\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find entry points\", run_in_background=true, prompt=\"Entry points: FIND main files \u2192 REPORT non-standard organization\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find conventions\", run_in_background=true, prompt=\"Conventions: FIND config files (.eslintrc, pyproject.toml, .editorconfig) \u2192 REPORT project-specific rules\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find anti-patterns\", run_in_background=true, prompt=\"Anti-patterns: FIND 'DO NOT', 'NEVER', 'ALWAYS', 'DEPRECATED' comments \u2192 LIST forbidden patterns\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore build/CI\", run_in_background=true, prompt=\"Build/CI: FIND .github/workflows, Makefile \u2192 REPORT non-standard patterns\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find test patterns\", run_in_background=true, prompt=\"Test patterns: FIND test configs, test structure \u2192 REPORT unique conventions\")\n```\n\n<dynamic-agents>\n**\u52A8\u6001 Agent \u751F\u6210**\uFF1A\u5728 bash \u5206\u6790\u540E\uFF0C\u6839\u636E\u9879\u76EE\u89C4\u6A21\u751F\u6210\u989D\u5916\u7684 explore agents\uFF1A\n\n| \u56E0\u7D20 | \u9608\u503C | \u989D\u5916 Agents |\n|--------|-----------|-------------------|\n| **\u6587\u4EF6\u603B\u6570** | >100 | \u6BCF 100 \u4E2A\u6587\u4EF6 +1 |\n| **\u4EE3\u7801\u603B\u884C\u6570** | >10k | \u6BCF 10k \u884C +1 |\n| **\u76EE\u5F55\u6DF1\u5EA6** | \u22654 | \u6DF1\u5EA6\u63A2\u7D22 +2 |\n| **\u5927\u6587\u4EF6\uFF08>500 \u884C\uFF09** | >10 \u4E2A | \u590D\u6742\u5EA6\u70ED\u70B9 +1 |\n| **Monorepo** | \u68C0\u6D4B\u5230 | \u6BCF\u4E2A package/workspace +1 |\n| **\u591A\u8BED\u8A00** | >1 | \u6BCF\u79CD\u8BED\u8A00 +1 |\n\n```bash\n# \u5148\u6D4B\u91CF\u9879\u76EE\u89C4\u6A21\ntotal_files=$(find . -type f -not -path '*/node_modules/*' -not -path '*/.git/*' | wc -l)\ntotal_lines=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" -o -name \"*.go\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | tail -1 | awk '{print $1}')\nlarge_files=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | awk '$1 > 500 {count++} END {print count+0}')\nmax_depth=$(find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' | awk -F/ '{print NF}' | sort -rn | head -1)\n```\n\n\u751F\u6210\u793A\u4F8B\uFF1A\n```\n// 500 \u4E2A\u6587\u4EF6\uFF0C50k \u884C\uFF0C\u6DF1\u5EA6 6\uFF0C15 \u4E2A\u5927\u6587\u4EF6 \u2192 \u542F\u52A8 5+5+2+1 = 13 \u4E2A\u989D\u5916 agents\ntask(subagent_type=\"explore\", load_skills=[], description=\"Analyze large files\", run_in_background=true, prompt=\"Large file analysis: FIND files >500 lines, REPORT complexity hotspots\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore deep modules\", run_in_background=true, prompt=\"Deep modules at depth 4+: FIND hidden patterns, internal conventions\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find shared utilities\", run_in_background=true, prompt=\"Cross-cutting concerns: FIND shared utilities across directories\")\n// ... \u6839\u636E\u8BA1\u7B97\u7ED3\u679C\u751F\u6210\u66F4\u591A\n```\n</dynamic-agents>\n\n### \u4E3B\u4F1A\u8BDD\uFF1A\u5E76\u53D1\u5206\u6790\n\n**\u5728\u540E\u53F0 agents \u8FD0\u884C\u65F6**\uFF0C\u4E3B\u4F1A\u8BDD\u6267\u884C\uFF1A\n\n#### 1. Bash \u76EE\u5F55\u7ED3\u6784\u5206\u6790\n```bash\n# \u76EE\u5F55\u6DF1\u5EA6 + \u6587\u4EF6\u6570\u91CF\nfind . -type d -not -path '*/\\.*' -not -path '*/node_modules/*' -not -path '*/venv/*' -not -path '*/dist/*' -not -path '*/build/*' | awk -F/ '{print NF-1}' | sort -n | uniq -c\n\n# \u6BCF\u4E2A\u76EE\u5F55\u7684\u6587\u4EF6\u6570\uFF08\u524D 30 \u4E2A\uFF09\nfind . -type f -not -path '*/\\.*' -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -30\n\n# \u6309\u6269\u5C55\u540D\u7684\u4EE3\u7801\u96C6\u4E2D\u5EA6\nfind . -type f \\( -name \"*.py\" -o -name \"*.ts\" -o -name \"*.tsx\" -o -name \"*.js\" -o -name \"*.go\" -o -name \"*.rs\" \\) -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -20\n\n# \u73B0\u6709 AGENTS.md / CLAUDE.md\nfind . -type f \\( -name \"AGENTS.md\" -o -name \"CLAUDE.md\" \\) -not -path '*/node_modules/*' 2>/dev/null\n```\n\n#### 2. \u8BFB\u53D6\u73B0\u6709 AGENTS.md\n```\n\u5BF9\u6BCF\u4E2A\u627E\u5230\u7684\u73B0\u6709\u6587\u4EF6\uFF1A\n Read(filePath=file)\n \u63D0\u53D6\uFF1A\u5173\u952E\u6D1E\u5BDF\u3001\u7EA6\u5B9A\u3001\u53CD\u6A21\u5F0F\n \u5B58\u5165 EXISTING_AGENTS map\n```\n\n\u5982\u679C\u6307\u5B9A\u4E86 `--create-new`\uFF1A\u5148\u8BFB\u53D6\u6240\u6709\u73B0\u6709\u6587\u4EF6\uFF08\u4FDD\u7559\u4E0A\u4E0B\u6587\uFF09\u2192 \u7136\u540E\u5220\u9664\u5168\u90E8 \u2192 \u91CD\u65B0\u751F\u6210\u3002\n\n#### 3. LSP Codemap\uFF08\u5982\u53EF\u7528\uFF09\n```\nLspServers() # \u68C0\u67E5\u53EF\u7528\u6027\n\n# \u5165\u53E3\u6587\u4EF6\uFF08\u5E76\u884C\uFF09\nLspDocumentSymbols(filePath=\"src/index.ts\")\nLspDocumentSymbols(filePath=\"main.py\")\n\n# \u5173\u952E\u7B26\u53F7\uFF08\u5E76\u884C\uFF09\nLspWorkspaceSymbols(filePath=\".\", query=\"class\")\nLspWorkspaceSymbols(filePath=\".\", query=\"interface\")\nLspWorkspaceSymbols(filePath=\".\", query=\"function\")\n\n# \u9876\u90E8\u5BFC\u51FA\u7684\u4E2D\u5FC3\u6027\nLspFindReferences(filePath=\"...\", line=X, character=Y)\n```\n\n**LSP \u5907\u7528\u65B9\u6848**\uFF1A\u4E0D\u53EF\u7528\u65F6\uFF0C\u4F9D\u8D56 explore agents + AST-grep\u3002\n\n### \u6536\u96C6\u540E\u53F0\u7ED3\u679C\n\n```\n// \u4E3B\u4F1A\u8BDD\u5206\u6790\u5B8C\u6210\u540E\uFF0C\u6536\u96C6\u6240\u6709 task \u7ED3\u679C\nfor each task_id: background_output(task_id=\"...\")\n```\n\n**\u5408\u5E76\uFF1Abash + LSP + \u73B0\u6709 + explore \u7ED3\u679C\u3002\u5C06 \"discovery\" \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n## \u9636\u6BB5 2\uFF1A\u8BC4\u5206 & \u4F4D\u7F6E\u51B3\u7B56\n\n**\u5C06 \"scoring\" \u6807\u8BB0\u4E3A in_progress\u3002**\n\n### \u8BC4\u5206\u77E9\u9635\n\n| \u56E0\u7D20 | \u6743\u91CD | \u9AD8\u9608\u503C | \u6765\u6E90 |\n|--------|--------|----------------|--------|\n| \u6587\u4EF6\u6570\u91CF | 3x | >20 | bash |\n| \u5B50\u76EE\u5F55\u6570\u91CF | 2x | >5 | bash |\n| \u4EE3\u7801\u6BD4\u4F8B | 2x | >70% | bash |\n| \u72EC\u6709\u6A21\u5F0F | 1x | \u6709\u81EA\u5DF1\u7684\u914D\u7F6E | explore |\n| \u6A21\u5757\u8FB9\u754C | 2x | \u6709 index.ts/__init__.py | bash |\n| \u7B26\u53F7\u5BC6\u5EA6 | 2x | >30 \u4E2A\u7B26\u53F7 | LSP |\n| \u5BFC\u51FA\u6570\u91CF | 2x | >10 \u4E2A\u5BFC\u51FA | LSP |\n| \u5F15\u7528\u4E2D\u5FC3\u6027 | 3x | >20 \u4E2A\u5F15\u7528 | LSP |\n\n### \u51B3\u7B56\u89C4\u5219\n\n| \u5206\u6570 | \u64CD\u4F5C |\n|-------|--------|\n| **\u6839\u76EE\u5F55 (.)** | \u59CB\u7EC8\u521B\u5EFA |\n| **>15** | \u521B\u5EFA AGENTS.md |\n| **8-15** | \u5982\u4E3A\u72EC\u7ACB\u9886\u57DF\u5219\u521B\u5EFA |\n| **<8** | \u8DF3\u8FC7\uFF08\u7531\u7236\u7EA7\u8986\u76D6\uFF09 |\n\n### \u8F93\u51FA\n```\nAGENTS_LOCATIONS = [\n { path: \".\", type: \"root\" },\n { path: \"src/hooks\", score: 18, reason: \"high complexity\" },\n { path: \"src/api\", score: 12, reason: \"distinct domain\" }\n]\n```\n\n**\u5C06 \"scoring\" \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n## \u9636\u6BB5 3\uFF1A\u751F\u6210 AGENTS.md\n\n**\u5C06 \"generate\" \u6807\u8BB0\u4E3A in_progress\u3002**\n\n<critical>\n**\u6587\u4EF6\u5199\u5165\u89C4\u5219**\uFF1A\u5982\u679C\u76EE\u6807\u8DEF\u5F84\u5DF2\u5B58\u5728 AGENTS.md \u2192 \u4F7F\u7528 `Edit` \u5DE5\u5177\u3002\u5982\u679C\u4E0D\u5B58\u5728 \u2192 \u4F7F\u7528 `Write` \u5DE5\u5177\u3002\n\u6C38\u8FDC\u4E0D\u8981\u7528 Write \u8986\u76D6\u5DF2\u5B58\u5728\u7684\u6587\u4EF6\u3002\u59CB\u7EC8\u901A\u8FC7 `Read` \u6216\u53D1\u73B0\u7ED3\u679C\u68C0\u67E5\u662F\u5426\u5B58\u5728\u3002\n</critical>\n\n### \u6839\u76EE\u5F55 AGENTS.md\uFF08\u5B8C\u6574\u6A21\u677F\uFF09\n\n```markdown\n# PROJECT KNOWLEDGE BASE\n\n**Generated:** {TIMESTAMP}\n**Commit:** {SHORT_SHA}\n**Branch:** {BRANCH}\n\n## OVERVIEW\n{1-2 sentences: what + core stack}\n\n## STRUCTURE\n\\`\\`\\`\n{root}/\n\u251C\u2500\u2500 {dir}/ # {non-obvious purpose only}\n\u2514\u2500\u2500 {entry}\n\\`\\`\\`\n\n## WHERE TO LOOK\n| Task | Location | Notes |\n|------|----------|-------|\n\n## CODE MAP\n{From LSP - skip if unavailable or project <10 files}\n\n| Symbol | Type | Location | Refs | Role |\n|--------|------|----------|------|------|\n\n## CONVENTIONS\n{ONLY deviations from standard}\n\n## ANTI-PATTERNS (THIS PROJECT)\n{Explicitly forbidden here}\n\n## UNIQUE STYLES\n{Project-specific}\n\n## COMMANDS\n\\`\\`\\`bash\n{dev/test/build}\n\\`\\`\\`\n\n## NOTES\n{Gotchas}\n```\n\n**\u8D28\u91CF\u95E8\u69DB**\uFF1A50-150 \u884C\uFF0C\u65E0\u901A\u7528\u5EFA\u8BAE\uFF0C\u65E0\u663E\u800C\u6613\u89C1\u7684\u4FE1\u606F\u3002\n\n### \u5B50\u76EE\u5F55 AGENTS.md\uFF08\u5E76\u884C\uFF09\n\n\u4E3A\u6BCF\u4E2A\u4F4D\u7F6E\u542F\u52A8\u5199\u5165\u4EFB\u52A1\uFF1A\n\n```\nfor loc in AGENTS_LOCATIONS (except root):\n task(category=\"writing\", load_skills=[], run_in_background=false, description=\"Generate AGENTS.md\", prompt=\\`\n Generate AGENTS.md for: ${loc.path}\n - Reason: ${loc.reason}\n - 30-80 lines max\n - NEVER repeat parent content\n - Sections: OVERVIEW (1 line), STRUCTURE (if >5 subdirs), WHERE TO LOOK, CONVENTIONS (if different), ANTI-PATTERNS\n \\`)\n```\n\n**\u7B49\u5F85\u5168\u90E8\u5B8C\u6210\u3002\u5C06 \"generate\" \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n## \u9636\u6BB5 4\uFF1A\u5BA1\u67E5 & \u53BB\u91CD\n\n**\u5C06 \"review\" \u6807\u8BB0\u4E3A in_progress\u3002**\n\n\u5BF9\u6BCF\u4E2A\u751F\u6210\u7684\u6587\u4EF6\uFF1A\n- \u79FB\u9664\u901A\u7528\u5EFA\u8BAE\n- \u79FB\u9664\u4E0E\u7236\u7EA7\u91CD\u590D\u7684\u5185\u5BB9\n- \u88C1\u526A\u81F3\u5927\u5C0F\u9650\u5236\u5185\n- \u9A8C\u8BC1\u7535\u62A5\u5F0F\u98CE\u683C\n\n**\u5C06 \"review\" \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n## \u6700\u7EC8\u62A5\u544A\n\n```\n=== init-deep \u5B8C\u6210 ===\n\n\u6A21\u5F0F\uFF1A{update | create-new}\n\n\u6587\u4EF6\uFF1A\n [OK] ./AGENTS.md (\u6839\u76EE\u5F55, {N} \u884C)\n [OK] ./src/hooks/AGENTS.md ({N} \u884C)\n\n\u5206\u6790\u76EE\u5F55\u6570\uFF1A{N}\n\u521B\u5EFA AGENTS.md\uFF1A{N}\n\u66F4\u65B0 AGENTS.md\uFF1A{N}\n\n\u5C42\u7EA7\u7ED3\u6784\uFF1A\n ./AGENTS.md\n \u2514\u2500\u2500 src/hooks/AGENTS.md\n```\n\n---\n\n## \u53CD\u6A21\u5F0F\n\n- **\u9759\u6001 agent \u6570\u91CF**\uFF1A\u5FC5\u987B\u6839\u636E\u9879\u76EE\u89C4\u6A21/\u6DF1\u5EA6\u8C03\u6574 agents \u6570\u91CF\n- **\u987A\u5E8F\u6267\u884C**\uFF1A\u5FC5\u987B\u5E76\u884C\uFF08explore + LSP \u5E76\u53D1\uFF09\n- **\u5FFD\u7565\u73B0\u6709\u6587\u4EF6**\uFF1A\u59CB\u7EC8\u5148\u8BFB\u53D6\u73B0\u6709\u6587\u4EF6\uFF0C\u5373\u4F7F\u4F7F\u7528 --create-new\n- **\u8FC7\u5EA6\u6587\u6863\u5316**\uFF1A\u4E0D\u662F\u6BCF\u4E2A\u76EE\u5F55\u90FD\u9700\u8981 AGENTS.md\n- **\u5197\u4F59**\uFF1A\u5B50\u7EA7\u7EDD\u4E0D\u91CD\u590D\u7236\u7EA7\u5185\u5BB9\n- **\u901A\u7528\u5185\u5BB9**\uFF1A\u79FB\u9664\u9002\u7528\u4E8E\u6240\u6709\u9879\u76EE\u7684\u4EFB\u4F55\u5185\u5BB9\n- **\u5197\u957F\u98CE\u683C**\uFF1A\u7535\u62A5\u5F0F\u98CE\u683C\uFF0C\u5426\u5219\u52FF\u5199";
|