@namewta/skills-hub 0.1.49 → 0.1.52
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 +4 -1
- package/THIRD_PARTY_NOTICES.md +19 -7
- package/cli.mjs +2 -2
- package/install.mjs +11 -4
- package/package.json +1 -1
- package/scripts/persistence/home.md +1 -1
- package/skills/dev/dev-build/SKILL.md +2 -0
- package/skills/dev/dev-build/references/implement-request.md +7 -2
- package/skills/dev/dev-formal-verify/SKILL.md +2 -1
- package/skills/dev/dev-formal-verify/references/create-check.md +3 -1
- package/skills/dev/dev-formal-verify/references/example.md +1 -1
- package/skills/dev/dev-formal-verify/references/tool-choice.md +1 -1
- package/skills/dev/dev-help/references/capabilities.md +6 -6
- package/skills/dev/dev-help/references/guide-verification.md +7 -1
- package/skills/dev/dev-help/references/help-method.md +7 -1
- package/skills/dev/dev-issue/SKILL.md +1 -0
- package/skills/dev/dev-issue/references/github-operations.md +8 -0
- package/skills/dev/dev-plan/references/plan-template.md +1 -0
- package/skills/dev/dev-plan/references/vertical-slicing.md +2 -0
- package/skills/dev/dev-pr/references/pull-request-evidence.md +2 -0
- package/skills/dev/dev-review/references/host-parity.md +12 -0
- package/skills/dev/dev-review/references/review-baseline.md +2 -0
- package/skills/dev/dev-setup/references/formal-options.md +1 -1
- package/skills/dev/dev-statechart/SKILL.md +17 -19
- package/skills/dev/dev-statechart/agents/openai.yaml +3 -3
- package/skills/dev/dev-statechart/assets/theme.css +135 -0
- package/skills/dev/dev-statechart/references/lean-proof.md +47 -0
- package/skills/dev/dev-statechart/references/render.md +15 -83
- package/skills/dev/dev-statechart/references/runtime.md +21 -1
- package/skills/dev/dev-statechart/scripts/lean/backends/lemma-chart.mjs +285 -0
- package/skills/dev/dev-statechart/scripts/lean/backends/mermaid.mjs +174 -0
- package/skills/dev/dev-statechart/scripts/lean/backends/proof-chart.mjs +540 -0
- package/skills/dev/dev-statechart/scripts/lean/backends/report.mjs +242 -0
- package/skills/dev/dev-statechart/scripts/lean/frontends/facts.mjs +234 -0
- package/skills/dev/dev-statechart/scripts/lean/frontends/view.mjs +217 -0
- package/skills/dev/dev-statechart/scripts/lean/ir.mjs +226 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/attribute.mjs +148 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/blocks.mjs +32 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/budget.mjs +167 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/check.mjs +70 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/contract.mjs +160 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/fold.mjs +206 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/inline.mjs +84 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/mark.mjs +432 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/reduce.mjs +73 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/trust.mjs +111 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/view-lemmas.mjs +155 -0
- package/skills/dev/dev-statechart/scripts/lean/pipeline.mjs +164 -0
- package/skills/dev/dev-statechart/scripts/lean/run.mjs +168 -0
- package/skills/dev/dev-statechart/scripts/statechart.mjs +42 -23
- package/skills/dev/dev-statechart/scripts/worker.mjs +33 -7
- package/skills/dev/dev-ui-design/SKILL.md +2 -2
- package/skills/dev/dev-ui-design/references/interaction-review.md +9 -0
- package/skills/dev/dev-verify/SKILL.md +1 -1
- package/skills/dev/dev-verify/references/evidence-storage.md +12 -0
- package/skills/dev/dev-workflow/SKILL.md +6 -6
- package/skills/dev/dev-workflow/references/method-handoffs.md +7 -1
- package/skills/dev/dev-writing/SKILL.md +2 -0
- package/skills/dev/dev-writing/references/library-docs.md +37 -0
- package/skills/home/home-doctor/references/diagnosis.md +2 -2
- package/skills/home/home-doctor/scripts/doctor.mjs +68 -38
- package/skills/home/home-project-changelog/SKILL.md +7 -7
- package/skills/home/home-project-changelog/assets/project-changelog.example.json +188 -0
- package/skills/home/home-project-changelog/assets/project-changelog.schema.json +156 -0
- package/skills/home/home-project-changelog/assets/worker-brief.md +1 -1
- package/skills/home/home-project-changelog/references/git-ranges.md +2 -2
- package/skills/home/home-project-changelog/references/schema.md +61 -0
- package/skills/home/home-project-changelog/references/tools.md +28 -22
- package/skills/home/home-project-changelog/references/workflow.md +12 -9
- package/skills/home/home-project-changelog/references/writing.md +5 -3
- package/skills/home/home-project-changelog/scripts/changelog.mjs +42 -38
- package/skills/home/home-project-changelog/scripts/contract.mjs +40 -3
- package/skills/home/home-project-changelog/scripts/legacy-markdown.mjs +116 -0
- package/skills/home/home-project-changelog/scripts/migrate.mjs +122 -0
- package/skills/home/home-project-changelog/scripts/revision.mjs +2 -196
- package/skills/home/home-project-changelog/scripts/storage.mjs +120 -125
- package/skills/home/home-project-changelog/scripts/summary.mjs +0 -60
- package/skills/home/home-route/SKILL.md +2 -2
- package/skills/home/home-route/references/routing.md +3 -1
- package/skills/home/home-route/scripts/route.mjs +79 -11
- package/skills/home/home-setup/SKILL.md +2 -1
- package/skills/home/home-setup/assets/repos.schema.json +10 -0
- package/skills/home/home-setup/references/registry.md +18 -1
- package/skills/home/home-setup/scripts/registry.mjs +67 -7
- package/skills/home/home-website/SKILL.md +13 -9
- package/skills/home/home-website/assets/website/scripts/inputs.mjs +143 -128
- package/skills/home/home-website/assets/website/scripts/render.mjs +8 -6
- package/skills/home/home-website/assets/website/scripts/site.mjs +21 -10
- package/skills/home/home-website/assets/website/site/public/home-assets/app.js +81 -34
- package/skills/home/home-website/assets/website/site/public/home-assets/site.css +92 -70
- package/skills/home/home-website/assets/website/site/templates/favicon.png +0 -0
- package/skills/home/home-website/assets/website/site/templates/layout.mjs +13 -10
- package/skills/home/home-website/assets/website/site/templates/ledger.mjs +51 -46
- package/skills/home/home-website/assets/website/site/templates/model.mjs +58 -14
- package/skills/home/home-website/assets/website/site/templates/pages.mjs +28 -30
- package/skills/home/home-website/assets/website/site/templates/project-logs.mjs +3 -107
- package/skills/home/home-website/assets/website/site.config.json +1 -1
- package/skills/home/home-website/references/website.md +64 -46
- package/skills/home/home-website/scripts/activate.mjs +106 -0
- package/skills/home/home-website/scripts/init.mjs +98 -11
- package/skills/home/home-workflow/SKILL.md +6 -4
- package/skills/system/system-clash-proxy-config/SKILL.md +21 -0
- package/skills/system/system-clash-proxy-config/agents/openai.yaml +4 -0
- package/skills/system/system-clash-proxy-config/assets/clash-override.js +328 -0
- package/skills/system/{system-proxy → system-clash-proxy-config}/references/browser-privacy.md +2 -2
- package/skills/system/{system-config → system-clash-proxy-config}/references/changes.md +2 -2
- package/skills/system/{system-proxy → system-clash-proxy-config}/references/clash-verge.md +1 -1
- package/skills/system/{system-proxy → system-clash-proxy-config}/references/diagnosis.md +1 -1
- package/skills/system/system-clash-proxy-config/references/dns-workflow.md +42 -0
- package/skills/system/system-clash-proxy-config/references/egress-macos.md +31 -0
- package/skills/system/system-clash-proxy-config/references/egress-windows.md +37 -0
- package/skills/system/system-clash-proxy-config/references/egress.md +12 -0
- package/skills/system/{system-proxy → system-clash-proxy-config}/references/flclash.md +1 -1
- package/skills/system/{system-proxy → system-clash-proxy-config}/references/index.md +1 -1
- package/skills/system/{system-clash-tun-egress → system-clash-proxy-config}/references/linux-cutover.md +29 -0
- package/skills/system/system-clash-proxy-config/references/locale-workflow.md +9 -0
- package/skills/system/{system-proxy → system-clash-proxy-config}/references/mihomo.md +1 -25
- package/skills/system/system-clash-proxy-config/references/session.md +34 -0
- package/skills/system/system-clash-proxy-config/references/subscription.md +29 -0
- package/skills/system/{system-proxy → system-clash-proxy-config}/references/troubleshooting.md +7 -7
- package/skills/system/{system-clash-tun-egress → system-clash-proxy-config}/references/verification.md +2 -0
- package/skills/system/system-clash-proxy-config/scripts/prepare-session.mjs +155 -0
- package/skills/system/system-clash-proxy-config/scripts/run-session.mjs +138 -0
- package/skills/system/system-inspect/SKILL.md +1 -1
- package/skills/system/system-inspect/references/health-audit.md +1 -1
- package/upstream-skills/zh-archify/SKILL.md +11 -11
- package/upstream-skills/zh-archify/assets/template.html +6 -3
- package/upstream-skills/zh-archify/bin/archify.mjs +67 -4
- package/upstream-skills/zh-archify/modules/code-analysis/ARCHITECTURE.md +7 -1
- package/upstream-skills/zh-archify/modules/code-analysis/bin/analyze-run.mjs +2 -1
- package/upstream-skills/zh-archify/modules/code-analysis/bin/check.mjs +29 -15
- package/upstream-skills/zh-archify/modules/code-analysis/bin/drift.mjs +3 -3
- package/upstream-skills/zh-archify/modules/code-analysis/bin/prepare.mjs +5 -6
- package/upstream-skills/zh-archify/modules/code-analysis/bin/serve.mjs +66 -36
- package/upstream-skills/zh-archify/modules/code-analysis/bin/verify-change.mjs +43 -13
- package/upstream-skills/zh-archify/modules/code-analysis/docs/TECH-GUIDE.md +1 -1
- package/upstream-skills/zh-archify/modules/code-analysis/docs/USAGE.md +37 -4
- package/upstream-skills/zh-archify/modules/code-analysis/extract/ts/functions.mjs +7 -5
- package/upstream-skills/zh-archify/modules/code-analysis/extract/ts/index.mjs +4 -1
- package/upstream-skills/zh-archify/modules/code-analysis/extract/ts/snapshot-host.mjs +9 -0
- package/upstream-skills/zh-archify/modules/code-analysis/lib/architecture-drift.mjs +28 -7
- package/upstream-skills/zh-archify/modules/code-analysis/lib/drift-capture.mjs +4 -3
- package/upstream-skills/zh-archify/modules/code-analysis/lib/git-sources.mjs +5 -3
- package/upstream-skills/zh-archify/modules/code-analysis/lib/output.mjs +272 -0
- package/upstream-skills/zh-archify/modules/code-analysis/lib/pull-request.mjs +34 -4
- package/upstream-skills/zh-archify/modules/code-analysis/lib/task.mjs +4 -2
- package/upstream-skills/zh-archify/modules/code-analysis/lib/verification-context.mjs +13 -1
- package/upstream-skills/zh-archify/modules/code-analysis/lib/verification-history.mjs +112 -0
- package/upstream-skills/zh-archify/modules/code-analysis/lib/verification.mjs +6 -2
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/atlas.mjs +71 -5
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/client/atlas.css +16 -2
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/client/atlas.js +121 -5
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/client/atlas3d.js +38 -1
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/client/overlay.css +14 -1
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/client/overlay.js +187 -27
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/client/verification.js +1 -1
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/i18n.mjs +9 -0
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/inject.mjs +1 -1
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/page.mjs +11 -6
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/pull-request.mjs +1 -1
- package/upstream-skills/zh-archify/modules/code-analysis/schemas/ai-task.schema.json +1 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/atlas.test.mjs +88 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/duplicates.test.mjs +1 -1
- package/upstream-skills/zh-archify/modules/code-analysis/test/external-workflow.test.mjs +1 -1
- package/upstream-skills/zh-archify/modules/code-analysis/test/fixtures/tasks/boundary.task.json +1 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/fixtures/tasks/boundary.task.missing.json +1 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/fixtures/tasks/complexity.task.json +1 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/fixtures/tasks/complexity.task.valid.json +1 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/fixtures/tasks/import-cycle.task.changed.json +1 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/fixtures/tasks/import-cycle.task.json +1 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/fixtures/tasks/module-cycle.task.json +1 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/function-source-range.test.mjs +10 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/output-recovery.test.mjs +626 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/pull-request.test.mjs +98 -2
- package/upstream-skills/zh-archify/modules/code-analysis/test/review.test.mjs +37 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/source-panel.test.mjs +2 -1
- package/upstream-skills/zh-archify/modules/code-analysis/test/task.test.mjs +3 -2
- package/upstream-skills/zh-archify/modules/code-analysis/test/verification-history.test.mjs +216 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/verification.test.mjs +122 -0
- package/upstream-skills/zh-archify/package-lock.json +2 -2
- package/upstream-skills/zh-archify/package.json +1 -1
- package/upstream-skills/zh-archify/references/authoring-contract.md +2 -0
- package/upstream-skills/zh-archify/references/explainer-authoring.md +1 -1
- package/upstream-skills/zh-archify/renderers/architecture/render-architecture.mjs +1 -0
- package/upstream-skills/zh-archify/renderers/class/render-class.mjs +1 -0
- package/upstream-skills/zh-archify/renderers/dataflow/render-dataflow.mjs +2 -1
- package/upstream-skills/zh-archify/renderers/erd/render-erd.mjs +1 -0
- package/upstream-skills/zh-archify/renderers/lifecycle/render-lifecycle.mjs +4 -2
- package/upstream-skills/zh-archify/renderers/sequence/render-sequence.mjs +4 -2
- package/upstream-skills/zh-archify/renderers/shared/cli.mjs +7 -1
- package/upstream-skills/zh-archify/renderers/timeline/render-timeline.mjs +1 -0
- package/upstream-skills/zh-archify/renderers/tree/render-tree.mjs +1 -0
- package/upstream-skills/zh-archify/renderers/waterfall/render-waterfall.mjs +1 -0
- package/upstream-skills/zh-archify/renderers/workflow/render-workflow.mjs +3 -2
- package/upstream-skills/zh-archify/renderers/workflow/workflow-compiler.mjs +68 -7
- package/upstream-skills/zh-archify/skill-release.json +1 -1
- package/upstream-skills/zh-modern-web-guidance/SKILL.md +4 -11
- package/upstream-skills/zh-modern-web-guidance/guides/built-in-ai/language-detection.md +20 -0
- package/upstream-skills/zh-modern-web-guidance/guides/built-in-ai/language-model.md +22 -0
- package/upstream-skills/zh-modern-web-guidance/guides/built-in-ai/prompt-api.md +22 -0
- package/upstream-skills/zh-modern-web-guidance/guides/built-in-ai/summarizer.md +20 -0
- package/upstream-skills/zh-modern-web-guidance/guides/built-in-ai/translator.md +22 -0
- package/upstream-skills/zh-modern-web-guidance/guides/performance/custom-ml-model-inference.md +342 -0
- package/upstream-skills/zh-modern-web-guidance/guides/performance/data-parallel-computation.md +337 -0
- package/upstream-skills/zh-modern-web-guidance/guides/performance/improve-next-page-load-performance.md +4 -1
- package/upstream-skills/zh-modern-web-guidance/guides/performance/large-scene-rendering.md +350 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-atoms/position-aware-tooltips.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-atoms/viewport-aware-dropdowns.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-behaviors/animate-to-from-top-layer.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-behaviors/declarative-dialog-popover-control.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-behaviors/interest-triggered-tooltips.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-behaviors/scroll-target-on-load.md +29 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-behaviors/sortable-table.md +1 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/app-menus.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/context-menu.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/copy-button.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/dialog.md +10 -1
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/hovercard.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/menu.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/navbar.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/persistent-app-tours.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/persistent-toast-notifications.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/toolbar.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/user-experience/content-first-noise-reduction.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/user-experience/natural-interactions.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/webmcp/agentic-javascript-tools.md +27 -0
- package/skills/home/home-project-changelog/assets/project-changelog.md +0 -35
- package/skills/system/system-clash-tun-egress/SKILL.md +0 -22
- package/skills/system/system-clash-tun-egress/agents/openai.yaml +0 -4
- package/skills/system/system-config/SKILL.md +0 -37
- package/skills/system/system-config/agents/openai.yaml +0 -4
- package/skills/system/system-config/references/ai-cli-config.md +0 -75
- package/skills/system/system-config/references/ai-cli-optimization.md +0 -37
- package/skills/system/system-config/references/index.md +0 -12
- package/skills/system/system-config/references/locale-workflow.md +0 -33
- package/skills/system/system-config/references/locale.md +0 -50
- package/skills/system/system-proxy/SKILL.md +0 -40
- package/skills/system/system-proxy/agents/openai.yaml +0 -4
- package/skills/system/system-proxy/assets/protected-rules.yaml +0 -7
- package/skills/system/system-proxy/references/dns-workflow.md +0 -152
- /package/skills/system/{system-config → system-clash-proxy-config}/assets/configuration.md +0 -0
- /package/skills/system/{system-proxy → system-clash-proxy-config}/assets/network.md +0 -0
- /package/skills/system/{system-proxy → system-clash-proxy-config}/references/acceptance.md +0 -0
- /package/skills/system/{system-proxy → system-clash-proxy-config}/references/dns-fields.md +0 -0
- /package/skills/system/{system-proxy → system-clash-proxy-config}/references/dns-misconceptions.md +0 -0
- /package/skills/system/{system-clash-tun-egress/references/troubleshooting.md → system-clash-proxy-config/references/egress-troubleshooting.md} +0 -0
- /package/skills/system/{system-config → system-clash-proxy-config}/references/locale-linux.md +0 -0
- /package/skills/system/{system-config → system-clash-proxy-config}/references/locale-macos.md +0 -0
- /package/skills/system/{system-config → system-clash-proxy-config}/references/locale-windows.md +0 -0
- /package/skills/system/{system-proxy → system-clash-proxy-config}/references/network-performance.md +0 -0
- /package/skills/system/{system-clash-tun-egress → system-clash-proxy-config}/references/nodes-and-dns.md +0 -0
- /package/skills/system/{system-proxy → system-clash-proxy-config}/references/platform-dns.md +0 -0
- /package/skills/system/{system-proxy → system-clash-proxy-config}/references/platforms.md +0 -0
- /package/skills/system/{system-proxy → system-clash-proxy-config}/references/tun-dns.md +0 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { spawnSync } from 'node:child_process';
|
|
6
|
+
import { parseArgs } from 'node:util';
|
|
7
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
8
|
+
|
|
9
|
+
function nodeJson(script, args, cwd) {
|
|
10
|
+
const result = spawnSync(process.execPath,[script,...args],{cwd,windowsHide:true,encoding:'utf8',maxBuffer:16*1024*1024});
|
|
11
|
+
if (result.error) throw result.error;
|
|
12
|
+
if (result.status !== 0) throw Error(result.stderr.trim() || result.stdout.trim() || '命令退出 '+result.status);
|
|
13
|
+
return JSON.parse(result.stdout);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function ensureBuildDependencies(website) {
|
|
17
|
+
const manifest = path.join(website,'node_modules','vitepress','package.json');
|
|
18
|
+
const lock = JSON.parse(fs.readFileSync(path.join(website,'package-lock.json'),'utf8'));
|
|
19
|
+
if (fs.existsSync(manifest) && JSON.parse(fs.readFileSync(manifest,'utf8')).version === lock.packages['node_modules/vitepress'].version) return;
|
|
20
|
+
const candidates = [process.env.npm_execpath,path.join(path.dirname(process.execPath),'node_modules/npm/bin/npm-cli.js'),
|
|
21
|
+
path.resolve(path.dirname(process.execPath),'../lib/node_modules/npm/bin/npm-cli.js')];
|
|
22
|
+
for (const directory of (process.env.PATH ?? process.env.Path ?? '').split(path.delimiter).filter(Boolean)) {
|
|
23
|
+
candidates.push(path.join(directory,'npm'),path.join(directory,'node_modules/npm/bin/npm-cli.js'));
|
|
24
|
+
}
|
|
25
|
+
const npm = candidates.filter(Boolean).find(file => fs.existsSync(file) && fs.realpathSync(file).endsWith('npm-cli.js'));
|
|
26
|
+
if (!npm) throw Error('构建依赖缺失。请在网站目录用 Node.js 自带的 npm ci 安装锁定依赖。');
|
|
27
|
+
const result = spawnSync(process.execPath,[fs.realpathSync(npm),'ci','--ignore-scripts','--no-audit','--no-fund'],
|
|
28
|
+
{cwd:website,windowsHide:true,encoding:'utf8',maxBuffer:8*1024*1024});
|
|
29
|
+
if (result.error) throw result.error;
|
|
30
|
+
if (result.status !== 0) throw Error('网站依赖安装失败。'+result.stderr.trim());
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export async function activate(home, title) {
|
|
34
|
+
if (!home) throw Error('激活网站需要 --home HOME。');
|
|
35
|
+
const collectionAt = new Date().toISOString();
|
|
36
|
+
const requested = path.resolve(home);
|
|
37
|
+
const entry = fs.lstatSync(requested);
|
|
38
|
+
if (!entry.isDirectory() || entry.isSymbolicLink()) throw Error('Home 根路径须为普通目录。');
|
|
39
|
+
const root = fs.realpathSync(requested);
|
|
40
|
+
const initialized = nodeJson(fileURLToPath(new URL('./init.mjs',import.meta.url)),
|
|
41
|
+
['--home',root,...(title === undefined ? [] : ['--title',title])],root);
|
|
42
|
+
const website = initialized.website;
|
|
43
|
+
const site = path.join(website,'scripts','site.mjs');
|
|
44
|
+
const sibling = (skill,file) => {
|
|
45
|
+
const entry = path.join(root,'.agents','skills',skill,'scripts',file);
|
|
46
|
+
if (!fs.existsSync(entry)) throw Error('网站取证需要已安装的 '+skill+',请重新安装 home-website 及其依赖。');
|
|
47
|
+
return import(pathToFileURL(entry).href);
|
|
48
|
+
};
|
|
49
|
+
let selection = nodeJson(site,['sources'],website);
|
|
50
|
+
const blocked = [], review = [], checked = [];
|
|
51
|
+
if (selection.needsGeneration.length) {
|
|
52
|
+
const {migrate} = await sibling('home-project-changelog','migrate.mjs');
|
|
53
|
+
const converted = migrate(root,{apply:true,repoIds:selection.needsGeneration.map(p=>p.id)});
|
|
54
|
+
for (const name of converted.unpaired) blocked.push({id:name.slice(0,-3),message:'旧日志缺少成功游标,请先核实旧原件。'});
|
|
55
|
+
if (converted.projects.length) selection = nodeJson(site,['sources'],website);
|
|
56
|
+
}
|
|
57
|
+
const storedOnly = selection.eligible.filter(project => project.sourceOnly && project.status === 'saved').map(project => project.id);
|
|
58
|
+
for (const project of selection.eligible.filter(project => project.sourceOnly && project.status === 'missing')) {
|
|
59
|
+
blocked.push({id:project.id, message:'项目没有已保存的日志。要采集 Git,请先登记仓库或声明其子模块路径。'});
|
|
60
|
+
}
|
|
61
|
+
const routed = selection.eligible.filter(project => !project.sourceOnly);
|
|
62
|
+
if (routed.length) {
|
|
63
|
+
const {readRegistry,readLocalPaths,routeRepo,routeSubmodule} = await sibling('home-route','route.mjs');
|
|
64
|
+
const {freeze,snapshot} = await sibling('home-project-changelog','changelog.mjs');
|
|
65
|
+
const registry = readRegistry(root), localPaths = readLocalPaths(root,registry);
|
|
66
|
+
const byId = new Map(registry.repos.map(repo=>[repo.id,repo]));
|
|
67
|
+
let work;
|
|
68
|
+
for (const {id,parent,submodulePath} of routed) {
|
|
69
|
+
if (blocked.some(item=>item.id === id)) continue;
|
|
70
|
+
try {
|
|
71
|
+
const route = parent
|
|
72
|
+
? routeSubmodule(root,registry,id,{parent,submodulePath},{localPaths,branchOnly:true})
|
|
73
|
+
: routeRepo(root,byId.get(id),{localPaths,branchOnly:true});
|
|
74
|
+
const plan = snapshot(root,freeze(root,route,{collectionAt}));
|
|
75
|
+
if (plan.status === 'no-changes') { checked.push(id); continue; }
|
|
76
|
+
if (plan.status !== 'ready') throw Error('未知 Git 取证状态 '+plan.status);
|
|
77
|
+
work ??= fs.mkdtempSync(path.join(os.tmpdir(),'home-website-review-'));
|
|
78
|
+
const filename = path.join(work,id+'.snapshot.json');
|
|
79
|
+
fs.writeFileSync(filename,JSON.stringify(plan,null,2)+'\n',{mode:0o600,flag:'wx'});
|
|
80
|
+
review.push({id,snapshot:filename,rangeId:plan.record.rangeId,commits:plan.commits.length});
|
|
81
|
+
} catch (error) { blocked.push({id,message:error.message}); }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (review.length || blocked.length) return {status:review.length?'needs-analysis':'blocked',website,checked,storedOnly,review,blocked,
|
|
85
|
+
next:'按 home-project-changelog 的 evidence 与 apply 核对、保存各冻结区间,然后重跑 activate。'};
|
|
86
|
+
ensureBuildDependencies(website);
|
|
87
|
+
return {...nodeJson(site,['refresh'],website), website, checked, storedOnly, blocked};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function isDirectInvocation() {
|
|
91
|
+
if (!process.argv[1]) return false;
|
|
92
|
+
try { return fs.realpathSync.native(process.argv[1]) === fs.realpathSync.native(fileURLToPath(import.meta.url)); }
|
|
93
|
+
catch { return false; }
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (isDirectInvocation()) {
|
|
97
|
+
try {
|
|
98
|
+
const {values} = parseArgs({options:{home:{type:'string'},title:{type:'string'},help:{type:'boolean'}}});
|
|
99
|
+
if (values.help) console.log('node scripts/activate.mjs --home HOME [--title NAME]');
|
|
100
|
+
else {
|
|
101
|
+
const result = await activate(values.home,values.title);
|
|
102
|
+
console.log(JSON.stringify(result,null,2));
|
|
103
|
+
if (result.status === 'blocked' || result.blocked?.length) process.exitCode=1;
|
|
104
|
+
}
|
|
105
|
+
} catch (error) { console.error(JSON.stringify({status:'failed',message:error.message})); process.exitCode=1; }
|
|
106
|
+
}
|
|
@@ -1,23 +1,95 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
4
5
|
import { parseArgs } from 'node:util';
|
|
5
6
|
import { fileURLToPath } from 'node:url';
|
|
6
7
|
|
|
7
8
|
const source = fileURLToPath(new URL('../assets/website/', import.meta.url));
|
|
8
9
|
const info = target => fs.lstatSync(target,{throwIfNoEntry:false});
|
|
10
|
+
// SHA-256 of the released v0.1.49 templates after normalizing CRLF to LF.
|
|
11
|
+
const previousTemplates = new Map([
|
|
12
|
+
['.gitignore', '3e548ce55c9b444f162d57048a5140770100dc1fea996f50a7aaa7b961fd3382'],
|
|
13
|
+
['package-lock.json', '97f8aedc5debd8a6461d070daaa3d9319aa1812ff94b04c3c441495d4d761b95'],
|
|
14
|
+
['package.json', '42e49990dd323ae74fbd5a06adc45f8c76d2df0e779bfcfc15687a872d145252'],
|
|
15
|
+
['scripts/artifact.mjs', 'b205c029b8482c80238ab2e294cb51860bd65b73da9e08cb7565f7719938a970'],
|
|
16
|
+
['scripts/inputs.mjs', '654c18df6dd6b01354da2a1134f3a0ae8beab302f7386888e16ad8761e7daf48'],
|
|
17
|
+
['scripts/preview.mjs', '1d01fe7e59129ee5c6a1d5d59c883119eaefa2fb762dabfb9f94a5b9518cc4d5'],
|
|
18
|
+
['scripts/render.mjs', 'ac63efa16c2501f8a018aec48abda2de6672888aade0a16c173d693157aa832e'],
|
|
19
|
+
['scripts/site.mjs', 'ff2d93d6ea09dd0cb072b2bad37314c9217b7f2f633945613ba03f831a88cc2f'],
|
|
20
|
+
['site.config.json', '2d3fa1c572d570b41828b5bf7a6a2ecc505e9c8c5c31a5d85a507c3964834e9f'],
|
|
21
|
+
['site/.vitepress/theme/index.js', '651b344b41958327aa7112c858699472e20c519bc82befe0bf9aee4d381edbf9'],
|
|
22
|
+
['site/public/home-assets/app.js', 'bed4876ba180b439aca70983f71ff5f740700240a7dca376fa069035d401df62'],
|
|
23
|
+
['site/public/home-assets/site.css', 'd92ec8cd248fc553213a98d0a1921a817459df441dcd9c828c9780e804b79a68'],
|
|
24
|
+
['site/public/home-assets/start.js', 'c1d5bb4733ec037d8cb47eae5491dd85b34ca866f142d83477eba3ce0d48ed8a'],
|
|
25
|
+
['site/templates/layout.mjs', 'dbab5669592247ac987a583f2b3f4f4956b75f8651c45133cd552cbcf2890c97'],
|
|
26
|
+
['site/templates/ledger.mjs', 'eff0d8079d7d52d31bf643ebbe060226f0005b01ca8e9a25cecd7a21e419c9d6'],
|
|
27
|
+
['site/templates/model.mjs', '33d7f23ae4a1ef856d52f17df2f90690b90222222f115f15355714384775eeae'],
|
|
28
|
+
['site/templates/pages.mjs', '5862c945ca8149b29f217c72ac5a8939a781d8177a7dca1451707f580146d6c1'],
|
|
29
|
+
['site/templates/project-logs.mjs', '05d734759f98d8438104bf3e76654be3ee29e01075671c0771b38f985b8f22fb'],
|
|
30
|
+
]);
|
|
31
|
+
|
|
32
|
+
const dashboardTemplates = new Map([
|
|
33
|
+
['site/templates/pages.mjs','db02173515f7055dc8eb6f0d9fbd6d6275eb1145032e65611e4558eb641126c0'],
|
|
34
|
+
['site/templates/ledger.mjs','c888afd7661ba620ead532b79ca26856e1b87f2b0d24f085b9af21db9f386b7b'],
|
|
35
|
+
['site/public/home-assets/site.css','702403de016adfbd37425611b551f15a06fb4ee0bf72d7606f6c0d0e6585c9d8'],
|
|
36
|
+
]);
|
|
37
|
+
|
|
38
|
+
const comparisonTemplates = new Map([
|
|
39
|
+
['scripts/inputs.mjs',['66b35105f259fafa18fcae009d1fe85c12608b4d2a2da286f06bcaca0609b450','6574f7558b7a83b746b0cd39040ce3737a66f402c4a57121895fddb3e6849791']],
|
|
40
|
+
['scripts/render.mjs',['7b748f6f31ece9dad9af728e62c39d75b5288fd4e3db7b1fd3bafb426ec78830']],
|
|
41
|
+
['site/templates/pages.mjs',['8cd03cc0ceb81f938ea238710278ca372e1bc46731aee3746a4cf04b345222cb']],
|
|
42
|
+
]);
|
|
43
|
+
|
|
44
|
+
const monthlyTemplates = new Map([
|
|
45
|
+
['scripts/inputs.mjs','04468bc1cfd31245dbaef867faa3d41ef022518ffb18f36183d0c033e24e21dd'],
|
|
46
|
+
['scripts/render.mjs','52346d79a642525014b0ba87af788af46f9285d96befa3b9ee1ec7a1df70f6ae'],
|
|
47
|
+
['site/templates/model.mjs','23fcc2844ce78d957e02b6858447b4c84ecc4c5585c96a7dec04098637251867'],
|
|
48
|
+
['site/templates/layout.mjs','66a2d762092465dc105def8bdb47c69431c1411265fbcd2e11601508b033b78b'],
|
|
49
|
+
['site/templates/ledger.mjs','5fe4ddbd289bc77a80a31d62aeac29a4ce0afa2dd46ce7c9e432716fea5d3db5'],
|
|
50
|
+
['site/templates/pages.mjs','324d41c43f96c00cc2cfc4e1717c5f1a0be7757c9487cfb55d2b6f4207b85c21'],
|
|
51
|
+
['site/templates/project-logs.mjs','70b4e7ac4dc21e9e6c93ac15cc58882afac84191e7b1bb7be8d79ce85487524f'],
|
|
52
|
+
['site/public/home-assets/app.js','d355c9ec67e595fe304679b4a9e9ff9382affe337dbdfec8915dd75c974c9a86'],
|
|
53
|
+
['site/public/home-assets/site.css','8cf8c0f1ed1f2856afb284a7d1bb94721c0c2229497ec213165ed50519fc68dc'],
|
|
54
|
+
]);
|
|
55
|
+
|
|
56
|
+
const intervalTemplates = new Map([
|
|
57
|
+
['site/templates/ledger.mjs','48160e54a7eb6fe1495764871b3831083e7902877ad7d9972b3f84f1b46fd9a3'],
|
|
58
|
+
['site/public/home-assets/app.js','a17773b19894df20e470bb5ef446b7d935dcc4a97c2d5038f3e9db1fdbd91268'],
|
|
59
|
+
['site/public/home-assets/site.css','2c0fd2446fbf4c3ed5fa32919959acae8ae43297f54c046d450f149d377306fd'],
|
|
60
|
+
]);
|
|
61
|
+
|
|
62
|
+
const normalized = bytes => bytes.toString('utf8').replace(/\r\n/gu,'\n');
|
|
63
|
+
|
|
64
|
+
function updatePristine(target, before, expected, mode) {
|
|
65
|
+
const newline = before.includes('\r\n') ? '\r\n' : '\n';
|
|
66
|
+
const stage = path.join(path.dirname(target),'.website-'+randomUUID()+'.tmp');
|
|
67
|
+
const descriptor = fs.openSync(stage,'wx',mode);
|
|
68
|
+
try {
|
|
69
|
+
try { fs.writeFileSync(descriptor,normalized(expected).replaceAll('\n',newline)); }
|
|
70
|
+
finally { fs.closeSync(descriptor); }
|
|
71
|
+
if (!info(target)?.isFile() || !fs.readFileSync(target).equals(before)) {
|
|
72
|
+
throw Error('网站模板在更新期间发生变化:'+path.basename(target));
|
|
73
|
+
}
|
|
74
|
+
fs.renameSync(stage,target);
|
|
75
|
+
} finally {
|
|
76
|
+
if (info(stage)) fs.unlinkSync(stage);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
9
80
|
function ensureDirectory(target) {
|
|
10
81
|
try { fs.mkdirSync(target); }
|
|
11
82
|
catch (error) { if (error.code !== 'EEXIST') throw error; }
|
|
12
83
|
if (!info(target)?.isDirectory()) throw Error('须使用普通目录:'+target);
|
|
13
84
|
}
|
|
14
|
-
function initialize(home) {
|
|
85
|
+
function initialize(home, title) {
|
|
86
|
+
if (title !== undefined && (!title.trim() || /[\x00-\x1f\x7f]/u.test(title))) throw Error('网站名称须为单行文字。');
|
|
15
87
|
const requested = path.resolve(home);
|
|
16
88
|
if (!info(requested)?.isDirectory()) throw Error('Home 根须为已有普通目录。');
|
|
17
89
|
const root = fs.realpathSync(requested);
|
|
18
90
|
const website = path.join(root,'.agents','home','website');
|
|
19
91
|
for (const directory of [path.join(root,'.agents'),path.join(root,'.agents','home'),website]) ensureDirectory(directory);
|
|
20
|
-
const created = [], existing = [], conflicts = [];
|
|
92
|
+
const created = [], updated = [], existing = [], conflicts = [];
|
|
21
93
|
function copy(from, to, relative='') {
|
|
22
94
|
for (const entry of fs.readdirSync(from,{withFileTypes:true})) {
|
|
23
95
|
const name = entry.name === 'gitignore.tmpl' ? '.gitignore' : entry.name;
|
|
@@ -28,28 +100,43 @@ function initialize(home) {
|
|
|
28
100
|
ensureDirectory(target);
|
|
29
101
|
copy(original,target,label+'/');
|
|
30
102
|
} else if (entry.isFile()) {
|
|
103
|
+
const bytes = fs.readFileSync(original);
|
|
104
|
+
let expected = bytes;
|
|
105
|
+
if (label === 'site.config.json' && title !== undefined) {
|
|
106
|
+
expected = Buffer.from(JSON.stringify({...JSON.parse(bytes),title},null,2)+'\n');
|
|
107
|
+
}
|
|
31
108
|
try {
|
|
32
|
-
fs.
|
|
109
|
+
fs.writeFileSync(target,expected,{flag:'wx'});
|
|
33
110
|
created.push(label);
|
|
34
111
|
} catch (error) {
|
|
35
112
|
if (error.code !== 'EEXIST') throw error;
|
|
36
|
-
|
|
37
|
-
if (
|
|
38
|
-
|
|
113
|
+
const current = info(target);
|
|
114
|
+
if (!current?.isFile()) throw Error('须使用普通文件:'+label);
|
|
115
|
+
const before = fs.readFileSync(target);
|
|
116
|
+
if (expected.equals(before) || previousTemplates.has(label) && normalized(expected) === normalized(before)) {
|
|
117
|
+
existing.push(label);
|
|
118
|
+
} else if ([previousTemplates, dashboardTemplates, monthlyTemplates, intervalTemplates].map(templates => templates.get(label))
|
|
119
|
+
.concat(comparisonTemplates.get(label) ?? []).includes(createHash('sha256').update(normalized(before)).digest('hex'))) {
|
|
120
|
+
updatePristine(target,before,expected,current.mode);
|
|
121
|
+
updated.push(label);
|
|
122
|
+
} else {
|
|
123
|
+
conflicts.push(label);
|
|
124
|
+
}
|
|
39
125
|
}
|
|
40
126
|
} else throw Error('网站模板包含非普通文件:'+label);
|
|
41
127
|
}
|
|
42
128
|
}
|
|
43
129
|
copy(source,website);
|
|
44
|
-
return {status:created.length?'initialized':'existing',website,created,existing,conflicts,
|
|
45
|
-
next:['
|
|
130
|
+
return {status:created.length?'initialized':updated.length?'updated':'existing',website,created,updated,existing,conflicts,
|
|
131
|
+
next:['node .agents/home/website/scripts/site.mjs sources','npm --prefix .agents/home/website ci',
|
|
132
|
+
'npm --prefix .agents/home/website run build','npm --prefix .agents/home/website run preview']};
|
|
46
133
|
}
|
|
47
134
|
try {
|
|
48
|
-
const {values} = parseArgs({options:{home:{type:'string'},help:{type:'boolean'}}});
|
|
49
|
-
if (values.help) console.log('用法:node scripts/init.mjs --home <Home 根>');
|
|
135
|
+
const {values} = parseArgs({options:{home:{type:'string'},title:{type:'string'},help:{type:'boolean'}}});
|
|
136
|
+
if (values.help) console.log('用法:node scripts/init.mjs --home <Home 根> [--title <网站名称>]');
|
|
50
137
|
else {
|
|
51
138
|
if (!values.home) throw Error('请显式提供 --home <Home 根>。');
|
|
52
|
-
console.log(JSON.stringify(initialize(values.home),null,2));
|
|
139
|
+
console.log(JSON.stringify(initialize(values.home,values.title),null,2));
|
|
53
140
|
}
|
|
54
141
|
} catch (error) {
|
|
55
142
|
console.error(JSON.stringify({status:'failed',message:error.message}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: home-workflow
|
|
3
|
-
description: 从 Home
|
|
3
|
+
description: 从 Home 向已登记项目派发工作、查询项目内部资料、接续任务或验收交付。用于「去项目 A 查一下」「让项目 A 修改」「继续上次派给 A 的任务」和跨项目协作。每次激活必须先读实际 Home 的 .agents/home/AGENTS.md 和已安装的 home-route 入口。涉及项目调查、修改、派发或续办时,必须先用 home-route 核对目标。查询已派任务进度用 home-tasks,专项联合验收用 home-integrate。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Home 任务协调
|
|
@@ -9,7 +9,9 @@ description: 从 Home 向一个或多个已登记项目派发工作、查询项
|
|
|
9
9
|
|
|
10
10
|
已授权的项目变更日志可由当前执行者按项目规则读取冻结区间的 Git 证据。由 `home-project-changelog` 负责正式日志和游标。
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## 激活后的必读入口
|
|
13
|
+
|
|
14
|
+
每次激活先确定实际 Home 根,读取该根下的 `.agents/home/AGENTS.md`,再读取该 Home 已安装的 `home-route` 入口。这两项读取完成后再按意图分流。入口缺失或不可读时,指出具体路径或缺少的技能。可用时调用 `home-doctor` 诊断,也可先做最小只读检查。继续处理不依赖该入口的工作。
|
|
13
15
|
|
|
14
16
|
## 按意图选择方法
|
|
15
17
|
|
|
@@ -30,9 +32,9 @@ description: 从 Home 向一个或多个已登记项目派发工作、查询项
|
|
|
30
32
|
|
|
31
33
|
## 执行
|
|
32
34
|
|
|
33
|
-
1.
|
|
35
|
+
1. 按 Home 入口中的用户约定、本次目标、范围和完成条件选择方法并打开对应资料。需要 Home 项目背景或长期决定时用 `home-knowledge` 按 repo ID 或主题查询。
|
|
34
36
|
2. 复合任务只补真实缺口,按上表调用;始终沿用同一目标和证据。缺少登记或配置时让 `home-setup` 处理有关分支,不重新做全套初始化。
|
|
35
|
-
3.
|
|
37
|
+
3. 调查、修改、派发或续办具体项目的任务前,调用 `home-route` 核对每个目标的 repo ID、实际 checkout 和 Git 身份。用户给出路径时也要核对,续办时核对原任务绑定的 checkout。目标解析失败、有歧义或身份冲突时暂停该目标,并继续可独立推进的工作。路由通过后,按[项目任务与多级自治](references/delegation.md)选派遣方式和 team,按目标 repo ID 核对 CLI、模型和推理参数。
|
|
36
38
|
4. 按[协调与接续](references/coordination.md)使用 `home-tasks` 管理主题、派发、回执和项目占用。核对发送前的占用与依赖后,调用选定入口。尚未能派发的工作先记录为待派。需要新派发而缺 `home-tasks` 时说明缺项。恢复既有会话时查原方法。
|
|
37
39
|
5. 收到交付后核对任务范围、绑定版本、实际读取的项目上下文和验证边界;必要时交原负责人修订。项目自报完成不代替 owner 验收。跨项目组合结论交 `home-integrate`。
|
|
38
40
|
6. 按任务价值和用户约定调用 `home-history` 保存实际事件、`home-knowledge` 提炼仍有效结论。允许没有值得记录的内容;history 不改当前派遣状态,知识推断不改执行默认。
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: system-clash-proxy-config
|
|
3
|
+
description: 配置 Clash Party、Mihomo Party 或 Clash Verge Rev 的指定订阅覆写,整理或删除节点、继承具体直连白名单。按需在 Windows、macOS、Linux 建立 TUN 公网防直连、代理 DNS 和停机保护,排查应用出口差异,或一次性调整宿主时区、语言及定位权限。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Clash 订阅与整机出口配置
|
|
7
|
+
|
|
8
|
+
先确认用户要改的行为、实际主机、客户端和目标订阅。沿用已经给出的授权、白名单、节点和地区偏好。订阅可独立整理;只有启用整机保护才配置防火墙和会话代理。当前 shell、WSL、容器或 SSH 工作区可能与用户桌面位于不同主机。
|
|
9
|
+
|
|
10
|
+
| 用户要做的事 | 从这里开始 | 完成依据 |
|
|
11
|
+
| --- | --- | --- |
|
|
12
|
+
| 整理订阅、删除节点、修改白名单 | [指定订阅的覆写](references/subscription.md)和[可导入脚本](assets/clash-override.js) | 该订阅已挂载,刷新后可选节点、首命中规则和最终配置符合请求 |
|
|
13
|
+
| 开 TUN,异常时封住公网 | [整机切换](references/egress.md),再读实际平台的方法 | 物理接口仅承载获准业务和核实的节点外层传输,故障时受保护请求失败 |
|
|
14
|
+
| DNS 随节点出站或排查泄漏 | [DNS 路径与验证](references/dns-workflow.md) | 观察到真实上游查询、所选叶节点和物理出口;分别核对系统与应用解析 |
|
|
15
|
+
| 客户端退出后仍要使用白名单网站 | [会话白名单代理](references/session.md) | 真实应用提交域名,备用代理仅承担解析,访问共享 IP 上的其他域名仍受阻 |
|
|
16
|
+
| 指定城市、语言或浏览器地区偏好 | [一次性地区设置](references/locale-workflow.md) | 逐项读回当前用户或系统的值,核实浏览器可见结果和待登录项 |
|
|
17
|
+
| 代理报错、慢、IPv6 或 UDP 路径异常 | [分层诊断](references/diagnosis.md);按症状查[诊断资料](references/index.md) | 在原应用、主机和会话中复现并复验 |
|
|
18
|
+
|
|
19
|
+
用户只要求生成脚本时,交付可导入的文件和目标订阅挂载位置。已要求激活时,保存差异、备份和恢复入口,应用到真实持久来源并读回;只报告亲自核对的行为。公网白名单目标会看到本机出口。远程切换前保住独立管理路径,先装主机出口限制,再允许核心接管。
|
|
20
|
+
|
|
21
|
+
主机约定归 `.agents/system/<host>/`,脱敏运行原件按需放在 `temp/system/hosts/<host>/<主题>/<run-id>/`。系统 Change 使用[网络记录](assets/network.md)或[配置记录](assets/configuration.md)更新 `evidences/` 下与 task 同名的报告。订阅、节点凭据、控制密钥、完整有效配置和恢复副本存放在主机私有位置。
|