dal-code 1.0.45 → 1.0.47
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/CHANGELOG.md +83 -0
- package/NOTICE +49 -1
- package/PRIVACY.md +18 -11
- package/dal-docs/extensions.md +16 -4
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-check.js +1 -1
- package/dist/cli/auth-command.js +6 -5
- package/dist/cli/list-models.js +2 -2
- package/dist/cli/piped-stdin.js +2 -0
- package/dist/cli/startup-diagnostics.js +1 -0
- package/dist/core/agent-log.d.ts +6 -0
- package/dist/core/agent-log.js +3 -0
- package/dist/core/agent-session-services.d.ts +0 -1
- package/dist/core/agent-session-services.js +1 -1
- package/dist/core/agent-session.d.ts +19 -2
- package/dist/core/agent-session.js +8 -8
- package/dist/core/client-identity.js +1 -0
- package/dist/core/compaction/branch-summarization.js +3 -3
- package/dist/core/compaction/compaction.d.ts +2 -2
- package/dist/core/compaction/compaction.js +11 -9
- package/dist/core/compaction-backoff.js +1 -0
- package/dist/core/dal-session-headers.js +1 -0
- package/dist/core/export-html/index.js +2 -2
- package/dist/core/export-html/template.html +1 -0
- package/dist/core/export-html/template.js +6 -6
- package/dist/core/export-html/vendor/marked-cjk-friendly.min.js +6 -0
- package/dist/core/export-html/vendor/marked.min.js +30 -29
- package/dist/core/extensions/engine-specifiers.js +1 -0
- package/dist/core/extensions/errors.d.ts +12 -0
- package/dist/core/extensions/errors.js +1 -0
- package/dist/core/extensions/index.d.ts +1 -0
- package/dist/core/extensions/index.js +1 -1
- package/dist/core/extensions/loader.js +1 -1
- package/dist/core/extensions/runner.d.ts +7 -1
- package/dist/core/extensions/runner.js +1 -1
- package/dist/core/extensions/types.d.ts +4 -0
- package/dist/core/extensions/virtual-modules.js +1 -1
- package/dist/core/http-dispatcher.js +1 -1
- package/dist/core/model-config.d.ts +984 -0
- package/dist/core/model-config.js +5 -5
- package/dist/core/model-identity.js +2 -0
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-runtime.d.ts +2 -0
- package/dist/core/model-runtime.js +2 -2
- package/dist/core/package-manager.d.ts +2 -0
- package/dist/core/package-manager.js +2 -2
- package/dist/core/provider-composer.d.ts +2 -1
- package/dist/core/provider-composer.js +1 -1
- package/dist/core/sandbox/bwrap-placeholders.js +1 -1
- package/dist/core/sandbox/index.d.ts +1 -1
- package/dist/core/sandbox/index.js +1 -1
- package/dist/core/sandbox/policy.d.ts +4 -0
- package/dist/core/sandbox/policy.js +1 -1
- package/dist/core/sandbox/runtime.d.ts +2 -0
- package/dist/core/sandbox/runtime.js +1 -1
- package/dist/core/sandbox/shell-sandbox.d.ts +2 -0
- package/dist/core/sandbox/shell-sandbox.js +6 -6
- package/dist/core/sdk.js +1 -1
- package/dist/core/session-stall-monitor.d.ts +41 -0
- package/dist/core/session-stall-monitor.js +2 -0
- package/dist/core/settings-manager.d.ts +4 -0
- package/dist/core/settings-manager.js +1 -1
- package/dist/core/settings-schema.d.ts +2 -0
- package/dist/core/settings-schema.js +1 -1
- package/dist/core/stall-watchdog.d.ts +55 -0
- package/dist/core/stall-watchdog.js +1 -0
- package/dist/core/system-prompt.js +10 -10
- package/dist/core/tools/bash.d.ts +1 -0
- package/dist/core/tools/bash.js +14 -14
- package/dist/core/tools/edit.d.ts +1 -1
- package/dist/core/tools/edit.js +3 -3
- package/dist/core/tools/grep.js +1 -1
- package/dist/core/tools/path-utils.d.ts +1 -0
- package/dist/core/tools/path-utils.js +1 -1
- package/dist/dal/builtins.js +2 -2
- package/dist/dal/manifest.d.ts +1 -0
- package/dist/dal/manifest.js +1 -1
- package/dist/dal/safety-net.js +3 -1
- package/dist/extensions/codemode/execute.js +22 -16
- package/dist/extensions/mcp/config.js +2 -2
- package/dist/extensions/mcp/oauth.js +2 -2
- package/dist/index.d.ts +5 -4
- package/dist/index.js +1 -1
- package/dist/main.js +4 -4
- package/dist/migrations.js +3 -5
- package/dist/modes/index.d.ts +2 -2
- package/dist/modes/index.js +1 -1
- package/dist/modes/interactive/external-editor.js +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +7 -7
- package/dist/modes/interactive/interactive-mode.js +25 -25
- package/dist/modes/interactive/session-share.js +1 -1
- package/dist/modes/print-mode.d.ts +1 -0
- package/dist/modes/print-mode.js +8 -7
- package/dist/modes/rpc/rpc-client.d.ts +13 -1
- package/dist/modes/rpc/rpc-client.js +3 -3
- package/dist/modes/rpc/rpc-mode.js +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +14 -0
- package/dist/node_modules/@dalcode/dal-advisor/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-awake/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-bridge/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-capabilities/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-capabilities/src/catalogue.js +1 -1
- package/dist/node_modules/@dalcode/dal-capabilities/src/index.js +10 -10
- package/dist/node_modules/@dalcode/dal-capabilities/src/match.js +1 -1
- package/dist/node_modules/@dalcode/dal-capabilities/src/state.js +3 -3
- package/dist/node_modules/@dalcode/dal-codeindex/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-codeindex/src/index.js +4 -4
- package/dist/node_modules/@dalcode/dal-compat/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-dap/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-dap/src/install.js +2 -2
- package/dist/node_modules/@dalcode/dal-gateway/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-goal/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-guard/package.json +5 -4
- package/dist/node_modules/@dalcode/dal-guard/src/credentials.js +7 -1
- package/dist/node_modules/@dalcode/dal-guard/src/edit-anchor-core.js +25 -23
- package/dist/node_modules/@dalcode/dal-guard/src/edit-anchor.js +4 -4
- package/dist/node_modules/@dalcode/dal-guard/src/index.js +4 -4
- package/dist/node_modules/@dalcode/dal-guard/src/policy.js +1 -1
- package/dist/node_modules/@dalcode/dal-guard/src/session-files.js +1 -0
- package/dist/node_modules/@dalcode/dal-guard/src/suspicion.js +1 -0
- package/dist/node_modules/@dalcode/dal-guard/src/workspace.js +2 -2
- package/dist/node_modules/@dalcode/dal-halo/package.json +1 -1
- package/dist/node_modules/@dalcode/dal-interactive/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-lang/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-learn/package.json +4 -2
- package/dist/node_modules/@dalcode/dal-learn/src/engine.js +4 -4
- package/dist/node_modules/@dalcode/dal-learn/src/index.js +15 -14
- package/dist/node_modules/@dalcode/dal-learn/src/revisions.js +3 -0
- package/dist/node_modules/@dalcode/dal-learn/src/safety.js +1 -1
- package/dist/node_modules/@dalcode/dal-learn/src/skill-evolution.js +14 -14
- package/dist/node_modules/@dalcode/dal-lsp/package.json +5 -3
- package/dist/node_modules/@dalcode/dal-lsp/src/config.js +1 -1
- package/dist/node_modules/@dalcode/dal-lsp/src/index.js +14 -13
- package/dist/node_modules/@dalcode/dal-lsp/src/managed.js +1 -0
- package/dist/node_modules/@dalcode/dal-mcp/package.json +7 -6
- package/dist/node_modules/@dalcode/dal-mcp/src/child-env.js +3 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/stdio-client.d.ts +1 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/stdio-client.js +3 -3
- package/dist/node_modules/@dalcode/dal-office/package.json +3 -2
- package/dist/node_modules/@dalcode/dal-office/src/extract/cell.js +1 -0
- package/dist/node_modules/@dalcode/dal-office/src/extract/index.js +2 -2
- package/dist/node_modules/@dalcode/dal-office/src/extract/ooxml.js +4 -4
- package/dist/node_modules/@dalcode/dal-office/src/extract/pdf.js +4 -4
- package/dist/node_modules/@dalcode/dal-office/src/facts.d.ts +15 -0
- package/dist/node_modules/@dalcode/dal-office/src/facts.js +4 -0
- package/dist/node_modules/@dalcode/dal-office/src/index.js +1 -1
- package/dist/node_modules/@dalcode/dal-office/src/lazy.js +1 -0
- package/dist/node_modules/@dalcode/dal-office/src/{index.d.ts → office.d.ts} +2 -3
- package/dist/node_modules/@dalcode/dal-office/src/office.js +1 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/capture.d.ts +21 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/capture.js +13 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/chart.d.ts +15 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/chart.js +3 -3
- package/dist/node_modules/@dalcode/dal-office/src/render/docx.d.ts +4 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/docx.js +1 -1
- package/dist/node_modules/@dalcode/dal-office/src/render/pptx.d.ts +2 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/pptx.js +4 -3
- package/dist/node_modules/@dalcode/dal-office/src/render/table-layout.js +1 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/xlsx-chart.d.ts +24 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/xlsx-chart.js +1 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/xlsx.d.ts +9 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/xlsx.js +1 -1
- package/dist/node_modules/@dalcode/dal-office/src/scratchpad.d.ts +2 -0
- package/dist/node_modules/@dalcode/dal-office/src/scratchpad.js +1 -1
- package/dist/node_modules/@dalcode/dal-office/src/table-stats.js +2 -0
- package/dist/node_modules/@dalcode/dal-office/src/tools/chart-generate.js +4 -3
- package/dist/node_modules/@dalcode/dal-office/src/tools/doc-generate.js +2 -3
- package/dist/node_modules/@dalcode/dal-office/src/tools/docx-edit.js +5 -5
- package/dist/node_modules/@dalcode/dal-office/src/tools/drawio-generate.js +2 -3
- package/dist/node_modules/@dalcode/dal-office/src/tools/md-generate.js +2 -3
- package/dist/node_modules/@dalcode/dal-office/src/tools/ppt-generate.js +5 -3
- package/dist/node_modules/@dalcode/dal-office/src/tools/ppt-plan.js +4 -2
- package/dist/node_modules/@dalcode/dal-office/src/tools/pptx-edit.js +5 -5
- package/dist/node_modules/@dalcode/dal-office/src/tools/read-file.js +4 -3
- package/dist/node_modules/@dalcode/dal-office/src/tools/render-page.js +4 -0
- package/dist/node_modules/@dalcode/dal-office/src/tools/sheet-generate.js +3 -3
- package/dist/node_modules/@dalcode/dal-office/src/tools/xlsx-edit.js +3 -3
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js +15 -15
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/index.js +1 -1
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/project-size.js +1 -0
- package/dist/node_modules/@dalcode/dal-pi-kit/package.json +1 -1
- package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.js +15 -15
- package/dist/node_modules/@dalcode/dal-pi-kit/src/index.js +1 -1
- package/dist/node_modules/@dalcode/dal-pi-kit/src/project-size.js +1 -0
- package/dist/node_modules/@dalcode/dal-plugins/package.json +4 -5
- package/dist/node_modules/@dalcode/dal-plugins/src/index.js +11 -11
- package/dist/node_modules/@dalcode/dal-plugins/src/manage.js +7 -7
- package/dist/node_modules/@dalcode/dal-recall/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-recall/src/index.js +1 -1
- package/dist/node_modules/@dalcode/dal-remote/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-review/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-rewind/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-rewind/src/commands.js +1 -1
- package/dist/node_modules/@dalcode/dal-rewind/src/core.d.ts +2 -0
- package/dist/node_modules/@dalcode/dal-rewind/src/core.js +6 -6
- package/dist/node_modules/@dalcode/dal-rewind/src/index.js +1 -1
- package/dist/node_modules/@dalcode/dal-rewind/src/state.js +1 -1
- package/dist/node_modules/@dalcode/dal-router/package.json +9 -9
- package/dist/node_modules/@dalcode/dal-router/src/commands.js +8 -9
- package/dist/node_modules/@dalcode/dal-router/src/config.d.ts +4 -36
- package/dist/node_modules/@dalcode/dal-router/src/config.js +2 -2
- package/dist/node_modules/@dalcode/dal-router/src/index.js +2 -4
- package/dist/node_modules/@dalcode/dal-router/src/notice.js +1 -0
- package/dist/node_modules/@dalcode/dal-router/src/roles/deliverables.js +4 -0
- package/dist/node_modules/@dalcode/dal-router/src/roles/index.js +10 -8
- package/dist/node_modules/@dalcode/dal-router/src/roles/planner.js +5 -0
- package/dist/node_modules/@dalcode/dal-router/src/roles/prompts.js +28 -17
- package/dist/node_modules/@dalcode/dal-router/src/roles/signals.js +2 -2
- package/dist/node_modules/@dalcode/dal-router/src/runtime.d.ts +0 -13
- package/dist/node_modules/@dalcode/dal-router/src/runtime.js +1 -1
- package/dist/node_modules/@dalcode/dal-router/src/subagent.js +1 -1
- package/dist/node_modules/@dalcode/dal-router/src/task-shape.d.ts +8 -0
- package/dist/node_modules/@dalcode/dal-router/src/task-shape.js +1 -0
- package/dist/node_modules/@dalcode/dal-rtk/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-skills/package.json +4 -3
- package/dist/node_modules/@dalcode/dal-skills/src/bundled/chart-design/SKILL.md +35 -0
- package/dist/node_modules/@dalcode/dal-skills/src/bundled/dal-slides/SKILL.md +17 -9
- package/dist/node_modules/@dalcode/dal-skills/src/bundled/diagram-design/SKILL.md +7 -5
- package/dist/node_modules/@dalcode/dal-skills/src/bundled/poster-design/SKILL.md +8 -6
- package/dist/node_modules/@dalcode/dal-skills/src/bundled/print-design/SKILL.md +21 -8
- package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/diagram.html +1 -1
- package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/mindmap.html +1 -1
- package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/posters/event-poster.html +1 -1
- package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/posters/poster.css +1 -1
- package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/posters/square-card.html +1 -1
- package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/posters/wechat-cover.html +1 -1
- package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/posters/xhs-card.html +1 -1
- package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/posters/xhs-cover.html +8 -5
- package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/print/letter.html +1 -1
- package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/print/report.html +1 -1
- package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/print/resume.html +7 -3
- package/dist/node_modules/@dalcode/dal-skills/src/bundled/web-design/SKILL.md +4 -4
- package/dist/node_modules/@dalcode/dal-skills/src/bundled.js +1 -1
- package/dist/node_modules/@dalcode/dal-skills/src/catalog.js +3 -2
- package/dist/node_modules/@dalcode/dal-skills/src/hint.js +1 -0
- package/dist/node_modules/@dalcode/dal-skills/src/index.js +13 -14
- package/dist/node_modules/@dalcode/dal-skills/src/search.js +1 -1
- package/dist/node_modules/@dalcode/dal-statusline/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-structured/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-subagent/package.json +5 -5
- package/dist/node_modules/@dalcode/dal-subagent/src/background.js +10 -10
- package/dist/node_modules/@dalcode/dal-subagent/src/index.js +18 -20
- package/dist/node_modules/@dalcode/dal-sync/LICENSE +21 -0
- package/dist/node_modules/@dalcode/dal-sync/package.json +35 -0
- package/dist/node_modules/@dalcode/dal-sync/src/client.js +1 -0
- package/dist/node_modules/@dalcode/dal-sync/src/core.js +2 -0
- package/dist/node_modules/@dalcode/dal-sync/src/index.js +4 -0
- package/dist/node_modules/@dalcode/dal-telemetry/package.json +4 -3
- package/dist/node_modules/@dalcode/dal-telemetry/src/config.js +3 -3
- package/dist/node_modules/@dalcode/dal-telemetry/src/failure-queue.js +3 -3
- package/dist/node_modules/@dalcode/dal-telemetry/src/failure-reporting.js +3 -5
- package/dist/node_modules/@dalcode/dal-terminal/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-tool-catalog/package.json +3 -2
- package/dist/node_modules/@dalcode/dal-tool-catalog/src/groups.js +1 -1
- package/dist/node_modules/@dalcode/dal-tool-catalog/src/index.js +4 -4
- package/dist/node_modules/@dalcode/dal-tool-catalog/src/repair-hook.js +2 -2
- package/dist/node_modules/@dalcode/dal-tool-catalog/src/repair.js +2 -2
- package/dist/node_modules/@dalcode/dal-usage/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-web/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-workflow/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-workflow/src/announce-check.js +3 -1
- package/dist/node_modules/@dalcode/dal-workflow/src/deliverable-scope.js +1 -0
- package/dist/node_modules/@dalcode/dal-workflow/src/index.js +4 -4
- package/dist/node_modules/@dalcode/dal-workflow/src/test-proof-note.js +3 -0
- package/dist/node_modules/@dalcode/dal-workflow/src/todo-snapshot.js +2 -2
- package/dist/node_modules/@dalcode/dal-workflow/src/todo.js +4 -4
- package/dist/node_modules/@dalcode/dal-workflow/src/truncation-check.js +1 -0
- package/dist/node_modules/@dalcode/dal-workflow/src/working-contract.js +1 -1
- package/dist/node_modules/@dalcode/deepailab/package.json +3 -3
- package/dist/node_modules/@dalcode/deepailab/src/index.js +3 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/README.md +5 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts +2 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +1 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +3 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent.js +1 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
- package/dist/node_modules/@earendil-works/pi-ai/README.md +78 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +5 -5
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/classifier-shared.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-workers-ai-system-one.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/lazy.d.ts +6 -2
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/lazy.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/llama-cpp-classify.js +5 -5
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +2 -2
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +6 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +5 -5
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +10 -5
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +3 -2
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +4 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/system-one-shared.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/typesafe-system-one.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/cli.js +0 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/index.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/index.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/models.d.ts +4 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/models.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.d.ts +180 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/kimi-coding.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax-cn.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai-cn.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/typesafe.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/telemetry.d.ts +286 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/telemetry.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/types.d.ts +20 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts +4 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/identity.d.ts +27 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/identity.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/transcript.d.ts +3 -2
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/transcript.js +2 -2
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/package.json +2 -2
- package/dist/node_modules/@earendil-works/pi-codemode/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-coding-agent/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-mcp/CHANGELOG.md +2 -0
- package/dist/node_modules/@earendil-works/pi-mcp/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/README.md +167 -21
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/index.d.ts +77 -2
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/index.js +1 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/memory.d.ts +35 -2
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/memory.js +1 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/metrics.d.ts +70 -0
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/metrics.js +1 -0
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/noop.d.ts +5 -2
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/noop.js +1 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/render.js +2 -0
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/testing/conformance.js +1 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/package.json +6 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +2 -2
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +8 -7
- package/dist/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal.js +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +4 -4
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui.js +2 -2
- package/dist/node_modules/@earendil-works/pi-tui/package.json +3 -2
- package/dist/package-manager-cli.js +9 -9
- package/dist/sdk/index.d.ts +2 -2
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/office.d.ts +1 -1
- package/dist/sdk/office.js +1 -1
- package/dist/sdk/router.d.ts +4 -4
- package/dist/sdk/router.js +1 -1
- package/dist/utils/clipboard-command.js +1 -1
- package/dist/utils/pi-user-agent.js +1 -1
- package/dist/utils/shell.js +2 -2
- package/dist/utils/tools-manager.js +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +15 -2
- package/package.json +6 -2
- package/dist/core/provider-attribution.js +0 -1
- package/dist/node_modules/@dalcode/dal-guard/src/review.js +0 -3
- package/dist/node_modules/@dalcode/dal-office/src/scenes.js +0 -1
- package/dist/node_modules/@dalcode/dal-plugins/src/rank.js +0 -4
- package/dist/node_modules/@dalcode/dal-router/src/assist.js +0 -4
- package/dist/node_modules/@dalcode/dal-router/src/compact-defer.js +0 -3
- package/dist/node_modules/@dalcode/dal-router/src/jev.d.ts +0 -52
- package/dist/node_modules/@dalcode/dal-router/src/jev.js +0 -5
- package/dist/node_modules/@dalcode/dal-router/src/router.d.ts +0 -32
- package/dist/node_modules/@dalcode/dal-router/src/router.js +0 -1
- package/dist/node_modules/@dalcode/dal-router/src/services.js +0 -1
- package/dist/node_modules/@dalcode/dal-subagent/src/role-pick.js +0 -2
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var h=Object.defineProperty;var i=(r,e)=>h(r,"name",{value:e,configurable:!0});var f=Object.defineProperty,p=i((r,e)=>f(r,"name",{value:e,configurable:!0}),"o");import{needsPlanning as g}from"./roles/signals.js";const k=/先(?:做|出|给|写|列)?(?:个|一个|一份)?(?:规划|计划|方案|设计)|(?:规划|计划|设计)一下(?:再|然后)|先想清楚(?:再|然后)|\bplan (?:it |this |the change |the work )?(?:first|before)\b|\b(?:make|write|draft|propose) a plan\b|\bwork out the design\b|\bdesign (?:it |this )?before\b/i,w=/(?:做|制作|生成|写|出一份|出个|创建|整理成|准备|起草|导出|帮我弄|改成|美化|排版)|\b(?:make|create|generate|build|write|prepare|draft|produce|put together|export)\b/i,x=/(?:PPT|幻灯片|演示文稿|课件|汇报材料|简历|报告|周报|月报|调研|方案书|白皮书|Word\s*文档|docx|Excel|xlsx|电子表格|表格|图表|可视化|仪表盘)|\b(?:pptx?|slides?|slide deck|deck|presentation|resume|cv|report|white ?paper|docx|word document|excel|xlsx|spreadsheet|workbook|chart|dashboard)\b/i,y=/(?:架构|系统设计|技术方案|设计(?:一个|一套|方案)|数据模型设计|接口设计)|\b(?:architecture|architect|system design|design (?:a|an|the) (?:system|api|schema|module|architecture))\b/i,v=/(?:多个文件|多文件|跨文件|跨模块|所有(?:模块|文件|调用)|整个(?:项目|仓库|代码库)|全(?:仓库|项目)|几个模块|重构|迁移)|\b(?:across (?:the )?(?:codebase|code base|repo|repository|project|modules|files)|multi-?file|every (?:caller|call site|module)|all (?:callers|call sites|modules)|codebase-wide|refactor|migrate|migration|everywhere)\b/i,q=/(?:规范|规格|按(?:照)?文档|严格按|边界(?:情况|条件)|所有(?:错误|异常)情况|每一种(?:错误|情况))|\b(?:spec(?:ification)?|exactly|edge cases?|every error case|error cases|corner cases?|the rules below)\b/i,j=/[??]\s*$|^(?:为什么|怎么|如何|什么|哪|是否|有没有|能不能|请问|解释|说明|介绍|总结|概括|看看|读一下)|^(?:why|how|what|which|where|when|who|explain|describe|summari[sz]e|tell me)\b/i,P=/(?:实现|添加|增加|新增|加上|修复|修改|改成|改为|重构|迁移|替换|重命名|删除|拆分|合并|优化|编写|写一?个|生成|创建|补充|补上|支持|修好|修一下|改一下)|\b(?:add|implement|fix|change|refactor|migrate|replace|rename|remove|delete|split|merge|optimi[sz]e|write|create|generate|build|make|convert|support|update|rewrite)\b/i,u=800;function t(r,e){const s=r.exec(e);return s?s[0].trim():void 0}i(t,"t"),p(t,"firstMatch");const T=/\.(?:m?[jt]sx?|py|go|rs|java|kt|rb|php|c|cc|cpp|h|cs|swift|vue|sql|sh)\b|\b(?:src|tests?|lib|pkg|cmd)\/|\b(?:npm|pnpm|yarn) (?:run |test)|\bunittest\b|\bpytest\b|\bgo test\b|\bcargo\b|\bregression tests?\b|单测|测试用例/i;function m(r){const e=r.trim();if(!e)return{route:"direct",kind:"empty",reasons:[]};const s=t(k,e);if(s)return{route:"split",kind:"plan-requested",reasons:[s]};const a=t(P,e),n=t(w,e),c=t(x,e),o=j.test(e);if(c&&n&&!(o&&!a)&&!T.test(e))return{route:"split",kind:"deliverable",reasons:[n,c]};if(!a)return{route:"direct",kind:o?"question":"small-change",reasons:[]};const l=t(y,e);if(l)return{route:"split",kind:"design",reasons:[l]};const d=t(v,e);if(d)return{route:"direct",kind:"multi-file",reasons:[d]};const b=t(q,e);return b?{route:"direct",kind:"spec",reasons:[b]}:e.length>=u||g(e)?{route:"direct",kind:"multi-step",reasons:[e.length>=u?`${e.length} chars`:"several steps"]}:{route:"direct",kind:o?"question":"small-change",reasons:[a]}}i(m,"q"),p(m,"classifyTask");export{m as classifyTask};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-rtk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.47",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Uses rtk, when the user has installed it, to compress the output of shell commands the agent runs. Does nothing when rtk is not installed; never installs it.",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
21
|
+
"@dalcode/dal-pi-kit": "1.0.47"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-skills",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.47",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"./bundled": "./src/bundled.js",
|
|
10
10
|
"./catalog": "./src/catalog.js",
|
|
11
11
|
"./client": "./src/client.js",
|
|
12
|
+
"./hint": "./src/hint.js",
|
|
12
13
|
"./package.json": "./package.json",
|
|
13
14
|
"./packages": "./src/packages.js"
|
|
14
15
|
},
|
|
@@ -21,8 +22,8 @@
|
|
|
21
22
|
]
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
24
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
25
|
-
"@dalcode/deepailab": "1.0.
|
|
25
|
+
"@dalcode/dal-pi-kit": "1.0.47",
|
|
26
|
+
"@dalcode/deepailab": "1.0.47",
|
|
26
27
|
"typebox": "1.3.7"
|
|
27
28
|
},
|
|
28
29
|
"peerDependencies": {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: chart-design
|
|
3
|
+
description: 在要画数据图表、把数字做成图片时使用:图表 / 柱状图 / 折线图 / 饼图 / 环形图 / 漏斗图 / 双轴图 / 组合图 / 趋势图 / 占比图 / 仪表盘 / 出图 / chart / bar chart / line chart / funnel / plot。用 office_chart_generate 一次生成 PNG、SVG 和可交互网页。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 数据图表
|
|
7
|
+
|
|
8
|
+
回复用用户提问的语言。图表只用 `office_chart_generate` 生成。它一次写出 `.png`(可直接发送、放进 PPT)、`.svg`(插入文档)、`.html` 和 `.json`,
|
|
9
|
+
配色、字体、标签、深色版本都已内置。
|
|
10
|
+
|
|
11
|
+
**不要**为了出图自己写 ECharts / matplotlib / canvas 脚本,也不要调用把数据发到外部网站的在线出图
|
|
12
|
+
服务:数据会离开用户的电脑,命令沙箱里也拿不回图片。
|
|
13
|
+
|
|
14
|
+
## 选图
|
|
15
|
+
|
|
16
|
+
| 要说明的事 | chartType | 说明 |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| 随时间的变化 | `line` | 类目是时间,按先后排 |
|
|
19
|
+
| 几项之间比大小 | `bar` | 类目名长或超过 6 项会自动变成横向条形并按大小排 |
|
|
20
|
+
| 构成、占比 | `pie` | 画成环形,中间是合计;超过 6 项时先把小项合并成「其他」再画 |
|
|
21
|
+
| 逐步转化 | `funnel` | 自动标出每一步相对上一步的转化率 |
|
|
22
|
+
| 单个指标的完成度 | `gauge` | |
|
|
23
|
+
|
|
24
|
+
- **多个指标**放进 `series`(每个 `{ name, values }`,与 `labels` 等长):同单位的并排比较;
|
|
25
|
+
单位不同的(销量和渗透率、金额和增长率)一个 `type: "bar"`、一个 `type: "line"` 并设
|
|
26
|
+
`axis: "right"`,用 `unit` / `rightUnit` 写两轴单位。
|
|
27
|
+
- 有目标、预算、及格线时加 `target: { value, label }`(如执行率图的 `{ value: 100, label: "预算 100%" }`)。
|
|
28
|
+
- `title` 写成结论(「销量五年增至 5.3 倍,2026 年渗透率过半」),`summary` 写一句依据;
|
|
29
|
+
数值只写纯数字,单位进 `unit` 或标题括号里。
|
|
30
|
+
- 数字必须来自用户或对话;只是示意时在标题里标「示例数据」。
|
|
31
|
+
|
|
32
|
+
## 交付
|
|
33
|
+
|
|
34
|
+
生成后用读图片的工具看一眼 `.png`:标签没有重叠、标题完整。交付时写出 PNG 路径,再列 SVG / HTML。
|
|
35
|
+
用户要放进 PPT 时,直接在 `office_ppt_plan` 的页面里给 `chart` 字段,生成可编辑的原生图表。
|
|
@@ -6,8 +6,7 @@ description: 在要制作、修改或检查幻灯片、PPT、PowerPoint 演示
|
|
|
6
6
|
# 幻灯片
|
|
7
7
|
|
|
8
8
|
回复用用户提问的语言。交付物是一个真实的 `.pptx` 文件,不是贴在聊天里的大纲。PPT 只用
|
|
9
|
-
`office_ppt_plan` 和 `office_ppt_generate`
|
|
10
|
-
激活 office 分组),不要用 `write` / `bash` 手写 XML、python-pptx 脚本或 Markdown 代替。版式、
|
|
9
|
+
`office_ppt_plan` 和 `office_ppt_generate` 两个工具生成,不要用 `write` / `bash` 手写 XML、python-pptx 脚本或 Markdown 代替。版式、
|
|
11
10
|
配色、字体由渲染器负责;你负责**叙事结构和每页内容的形态**。
|
|
12
11
|
|
|
13
12
|
## 先想清楚再规划
|
|
@@ -35,7 +34,11 @@ description: 在要制作、修改或检查幻灯片、PPT、PowerPoint 演示
|
|
|
35
34
|
| 小表格(≤8 列 12 行) | `table: {headers, rows}` | 报表式表格 |
|
|
36
35
|
|
|
37
36
|
- 图表页加 `takeaway`(一句 so-what),有数据来源时加 `source`。
|
|
38
|
-
- 给了 `stats` / `chart` / `columns` / `table` 时,`points`
|
|
37
|
+
- 给了 `stats` / `chart` / `columns` / `table` 时,`points` 会放进演讲者备注,**不显示在幻灯片上**,只能写讲解词;
|
|
38
|
+
这一页要让观众看到的数字写进 `title`、`subtitle`、`stats`、`chart`、`table` 或 `takeaway`。
|
|
39
|
+
- `layout` 只能是 `title` `agenda` `section` `content` `two-column` `stats` `chart` `comparison` `timeline`
|
|
40
|
+
`table` `quote` `closing` 之一;`columns` 是字段名不是版式,给了 `columns` 就写 `comparison` 或 `two-column`,
|
|
41
|
+
拿不准就不写 `layout`。
|
|
39
42
|
- **整份 PPT 的版式要有变化**:连续 3 页都是纯要点页,说明数据和对比没提炼出来。
|
|
40
43
|
- **页面上的数字必须来自素材**。用户没给、但允许虚构时,写成示例并标注「示例」;
|
|
41
44
|
**不要留「[待填写]」之类占位符,也不要留没有正文的页**——`office_ppt_generate` 会拒绝这样
|
|
@@ -60,13 +63,18 @@ description: 在要制作、修改或检查幻灯片、PPT、PowerPoint 演示
|
|
|
60
63
|
|
|
61
64
|
1. **读素材**:用户给了文件(.xlsx / .csv / .docx / .pdf / .pptx)先用 `office_read_file` 读;
|
|
62
65
|
需要汇总计算时用 `bash` 跑 python 或 node,不要心算。
|
|
63
|
-
2.
|
|
64
|
-
|
|
66
|
+
2. **列清单**:把素材里的**每个数字和关键事实**逐条列出来(如「周活 37 人(88%)」「人均每周对话 64 次」
|
|
67
|
+
「单测覆盖率 54% → 66%」),每条都要安排到某一页能看见的位置。确实不放的,写进 `omitted` 并在回复里说明。
|
|
68
|
+
3. **规划**:调用 `office_ppt_plan`,数字放进 `stats` / `chart`,对比放进 `columns`。素材是文件时把路径填进
|
|
69
|
+
`sources`,素材在用户消息里时把清单填进 `facts`:工具会核对每个数字是否出现在幻灯片上,漏了会拒绝并列出,
|
|
70
|
+
按它列的补进可见字段后重新规划。
|
|
71
|
+
4. **生成**:调用 `office_ppt_generate`(`topic` 填用户原始需求,便于自动选风格)。被拒绝时按
|
|
65
72
|
它列出的页补全内容,重新 `office_ppt_plan` 再生成。
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
73
|
+
5. **检查**:用 `office_read_file` 读回文件,确认每页都有正文,并对照第 2 步的清单逐条确认每个数字都在某页上
|
|
74
|
+
(`office_ppt_generate` 的结果也会报告素材核对);漏了就用 `office_pptx_edit` 补上,再交付。
|
|
75
|
+
版式、字体、配色由渲染器保证,不要再用 LibreOffice、访达预览转图片核对:本机这些工具常缺
|
|
76
|
+
中文字体或画不出原生图表,看到的问题多半是查看工具自己的,追下去只会白绕几十轮。
|
|
77
|
+
6. **汇报**:写出文件路径、页数和所用风格,交代完就结束,不要以「要不要我再…」收尾。工具报错时如实转述,不要声称已生成。
|
|
70
78
|
|
|
71
79
|
## 改已有的 PPT
|
|
72
80
|
|
|
@@ -11,10 +11,12 @@ description: 在要画流程图、架构图、时序图、泳道图、思维导
|
|
|
11
11
|
|
|
12
12
|
| 用户要的 | 用什么 | 交付 |
|
|
13
13
|
|---|---|---|
|
|
14
|
-
| 要能继续编辑、对外讲解的流程图/架构图/泳道图/ER 图 | `office_drawio_generate` 工具 | `.drawio
|
|
14
|
+
| 要能继续编辑、对外讲解的流程图/架构图/泳道图/ER 图 | `office_drawio_generate` 工具 | `.drawio`;同时要图片时见下方说明 |
|
|
15
15
|
| 写在 Markdown / 文档 / 网页里的流程图、时序图、状态图、甘特图 | Mermaid,套 DAL 主题 | 代码块,或 PNG/SVG |
|
|
16
16
|
| 思维导图、脑图、大纲梳理 | markmap 模板(`../visual-kit/mindmap.html`) | PNG,或可缩放的 HTML |
|
|
17
17
|
|
|
18
|
+
本机没有 draw.io 程序时 `.drawio` 不能直接转成图片:用户既要可编辑文件又要 PNG 时,把同一张图(同样的节点、文字和连线)再写成 Mermaid,按第 4 节导出 PNG;不要去找 draw.io 命令行、在线查看器或自己写 SVG/canvas 渲染。
|
|
19
|
+
|
|
18
20
|
不要用 Mermaid 的 `mindmap` 画思维导图(默认配色刺眼、括号会吞字),用 markmap。
|
|
19
21
|
|
|
20
22
|
## 2. draw.io:只写语义角色
|
|
@@ -61,7 +63,7 @@ flowchart LR
|
|
|
61
63
|
|
|
62
64
|
完整的浅色/深色配置在 `../visual-kit/mermaid-dal.json`。
|
|
63
65
|
- 节点文字里有括号、冒号、引号时用双引号包起来:`A["新品发布会(3 月)"]`。
|
|
64
|
-
- 流程图用 `flowchart LR` 或 `TD`,不要用旧的 `graph`;子流程用 `subgraph
|
|
66
|
+
- 流程图用 `flowchart LR` 或 `TD`,不要用旧的 `graph`;子流程用 `subgraph`。主线超过 5 步、或有回流/驳回分支时用 `TD`:横排的长流程导出时会按画布宽度整体缩小,字小到看不清。
|
|
65
67
|
|
|
66
68
|
## 4. 导出成图片
|
|
67
69
|
|
|
@@ -69,10 +71,10 @@ flowchart LR
|
|
|
69
71
|
- diagram.html:把示例图换成你的源码,放在 `<pre class="mermaid">` 里,一张图一个;替换 `{{标题}}`(不要标题就删掉 `<h1>`)。
|
|
70
72
|
- mindmap.html:把大纲写进 `id="outline"` 的 script 里,`#` 是中心主题,`##` 是分支,`-` 是要点。
|
|
71
73
|
- 模板会跟随系统深浅色;只改内容,不改样式和脚本。
|
|
72
|
-
2. 导出:`
|
|
73
|
-
-
|
|
74
|
+
2. 导出:`office_render_page({ path: "<页面.html>", output: "<输出.png>", width: 1200, height: 800, full: true })`(思维导图用 `width: 1600, height: 1000`,不加 `full`;要深色加 `dark: true`)。不要在 bash 里自己启动 Chrome 或写 canvas 脚本:命令沙箱里浏览器起不来,本工具在沙箱外用独立的浏览器配置渲染。
|
|
75
|
+
- 报「没有找到 Chrome / Edge」:按「浏览器验收」技能第 3 步先问用户再下载测试版 Chrome。
|
|
74
76
|
- 退出码 3 = 页面有报错或溢出,图片已生成但要看报错修正后重导。
|
|
75
|
-
3.
|
|
77
|
+
3. 看导出结果自带的预览图,确认没有重叠、没有被截断,再交付。
|
|
76
78
|
|
|
77
79
|
## 5. 不许做
|
|
78
80
|
|
|
@@ -26,21 +26,23 @@ description: 在要做海报、小红书图文、公众号封面、朋友圈长
|
|
|
26
26
|
- 标题写成短句,**手动用 `<br>` 在词语之间断行**,不要让浏览器把一个词拆到两行("为什 / 么")。
|
|
27
27
|
- 一张图只讲一件事:封面标题 ≤ 16 字,内页每条标题 ≤ 12 字、说明 ≤ 28 字,一页 3–5 条。
|
|
28
28
|
- 引号用中文引号“”,数字和中文之间留空格("10 分钟")。
|
|
29
|
-
-
|
|
29
|
+
- 模板里的示例信息(期号、页码、截止日期、嘉宾、地址、账号名 @…、二维码)都要换成用户给的;用户没给的就整块删掉,不要编一个账号名或留"二维码"空框。
|
|
30
30
|
- 数据卡上的数字必须来自用户或对话;只是示意时在来源处写"示例数据"。
|
|
31
31
|
- 需要配图(产品照、人像)时用用户给的图片,`<img>` 放进版式并 `object-fit: cover`;不要用网上随便找的图。
|
|
32
32
|
|
|
33
33
|
## 3. 导出与检查
|
|
34
34
|
|
|
35
|
+
用 `office_render_page` 导出:。不要在 bash 里自己启动 Chrome 或写 canvas 脚本:命令沙箱里浏览器起不来,本工具在沙箱外用独立的浏览器配置渲染。
|
|
36
|
+
|
|
35
37
|
```
|
|
36
|
-
|
|
38
|
+
office_render_page({ path: "<副本.html>", output: "<输出.png>", width: 1242, height: 1660, scale: 1 })
|
|
37
39
|
```
|
|
38
40
|
|
|
39
|
-
宽高按上表;公众号封面用
|
|
41
|
+
宽高按上表;公众号封面用 `width: 900, height: 383, scale: 2`。
|
|
40
42
|
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
43
|
+
- 结果里列出问题时(某一块文字放不下、页面报错),按提示删字或拆页,用同一个 output 重新导出,直到没有问题。
|
|
44
|
+
- 报「没有找到 Chrome / Edge」时,按「浏览器验收」技能第 3 步先问用户再下载。
|
|
45
|
+
- 看导出结果自带的预览图(不用另外读图):文字没有被截断、没有压住装饰元素、主标题一眼能看到。
|
|
44
46
|
- 交付时给出 PNG 路径和可再编辑的 HTML 路径。
|
|
45
47
|
|
|
46
48
|
## 4. 不许做
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: print-design
|
|
3
|
-
description: 在要出 PDF(报告、简历、信函、通知、邀请函、说明书)、把 Markdown 或网页排成可打印的文档,或做 HTML 邮件时使用:PDF / 报告 / 简历 / 信函 / 邀请函 /
|
|
3
|
+
description: 在要出 PDF(报告、简历、信函、通知、邀请函、说明书)、把 Markdown 或网页排成可打印的文档,或做 HTML 邮件时使用:PDF / 报告 / 简历 / 信函 / 邀请函 / 可打印 / 导出 PDF / 排版 / 邮件模板 / resume / report / letter。要 Word/PPT/Excel 文件时用办公工具,不用本技能。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# PDF 报告、简历、信函(以及 HTML 邮件)
|
|
@@ -9,6 +9,8 @@ description: 在要出 PDF(报告、简历、信函、通知、邀请函、说
|
|
|
9
9
|
|
|
10
10
|
## 1. 选模板(都在 `../visual-kit/print/`)
|
|
11
11
|
|
|
12
|
+
路径相对本技能文件:加载技能时给出的 location 是 `…/bundled/print-design/SKILL.md`,模板就在 `…/bundled/visual-kit/print/`,不用再去找。
|
|
13
|
+
|
|
12
14
|
| 用途 | 模板 | 要点 |
|
|
13
15
|
|---|---|---|
|
|
14
16
|
| 分析报告、调研报告、方案、周报月报、把 Markdown 排成 PDF | `report.html` | 标题区 + 核心结论 + 指标行 + 分节正文/表格/图 |
|
|
@@ -17,6 +19,15 @@ description: 在要出 PDF(报告、简历、信函、通知、邀请函、说
|
|
|
17
19
|
|
|
18
20
|
把模板和 `print.css` 复制到输出目录,在副本上改内容;版式和字号不改。
|
|
19
21
|
|
|
22
|
+
**简历按这个顺序做,一般 5–8 次工具调用就该交付:**
|
|
23
|
+
|
|
24
|
+
1. 用户给了材料文件(.docx / .pdf / .md):用 `office_read_file` 读**这一个文件**,它就是全部内容来源。不要列它所在的文件夹、不要打开旁边的旧版本或脚本、不要搜历史会话,除非用户提到它们。
|
|
25
|
+
2. 一次 `bash` 把 `resume.html` 和 `print.css` 复制到输出目录(和材料文件放在同一处,文件名用「姓名_简历」),然后改写副本里的内容。
|
|
26
|
+
3. 用户提了风格(极简、换主色、高亮):只在副本的 `<style>` 里加一行 `:root { --accent: 主色; --ink: 正文色; }`,关键数字或关键词用 `<b class="hl">` 标出,每条经历最多一处;不另写一套样式。
|
|
27
|
+
4. `office_render_page` 导出 PDF。结果里直接带预览图,看它检查,不要再导出 PNG、裁图或读图。
|
|
28
|
+
5. 检查标准只有三条:正好 1 页;没有文字被截断或重叠;用户要的风格能看出来。不满足就改,**最多再导出两次**;满足就交付。字距、留白、细线这类微调不再循环,在回复里一句话说明即可。
|
|
29
|
+
6. 只交付 PDF(附可编辑的 HTML)。用户没要 Word 就不做 Word,在回复里用一句话问要不要。
|
|
30
|
+
|
|
20
31
|
## 2. 写内容的规矩
|
|
21
32
|
|
|
22
33
|
- 标题层级最多三级(`h1` 文档标题、`h2` 章、`h3` 节);章标题用"一、二、三",节用"1.1"。
|
|
@@ -29,16 +40,18 @@ description: 在要出 PDF(报告、简历、信函、通知、邀请函、说
|
|
|
29
40
|
|
|
30
41
|
## 3. 导出与检查
|
|
31
42
|
|
|
43
|
+
用 `office_render_page` 导出 PDF。不要在 bash 里自己启动 Chrome 或写 canvas 脚本:命令沙箱里浏览器起不来,本工具在沙箱外用独立的浏览器配置渲染。
|
|
44
|
+
|
|
32
45
|
```
|
|
33
|
-
|
|
46
|
+
office_render_page({ path: "<副本.html>", output: "<输出.pdf>" })
|
|
34
47
|
```
|
|
35
48
|
|
|
36
|
-
-
|
|
49
|
+
- 结果会写"共 N 页"。简历必须是 1 页;信函一般 1 页;报告最后一页只剩几行时,删减内容或调整分页,不要留大片空白。
|
|
37
50
|
- 需要从某处另起一页:在该元素上加 `class="page-break"`。
|
|
38
51
|
- 页码由 `print.css` 自动加在页脚(首页不显示)。
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
- 交付 PDF 路径,同时给出可编辑的 HTML
|
|
52
|
+
- 报「没有找到 Chrome / Edge」时按「浏览器验收」技能第 3 步先问用户再下载;结果列出页面报错时修好重导。
|
|
53
|
+
- 检查:看导出结果自带的预览图,确认表格没有被拆在两页之间、标题没有落在页底;多页报告需要逐页核对时再用 `pdftoppm -r 80 -png <输出.pdf> <前缀>`。
|
|
54
|
+
- 交付 PDF 路径,同时给出可编辑的 HTML 路径。用户另外要 Word 时再做,不要主动多出一个格式。
|
|
42
55
|
|
|
43
56
|
## 4. HTML 邮件
|
|
44
57
|
|
|
@@ -46,10 +59,10 @@ node ../visual-kit/render.mjs <副本.html> <输出.pdf>
|
|
|
46
59
|
- 邮件客户端不认 `<style>`、flex、grid、外部 CSS 和字体:只用表格布局 + 行内样式,宽 600px,这些规矩模板里都已做好,照着加行即可。
|
|
47
60
|
- 按钮用模板里的表格按钮写法;图片用用户自己的线上地址并写 `alt`。
|
|
48
61
|
- 替换 `{{邮件标题}}` 和预览文字;不放脚本、表单、视频。
|
|
49
|
-
- 导出预览:`
|
|
62
|
+
- 导出预览:`office_render_page({ path: "notice.html", output: "preview.png", width: 680, height: 900, full: true })`。
|
|
50
63
|
|
|
51
64
|
## 5. 不许做
|
|
52
65
|
|
|
53
|
-
-
|
|
66
|
+
- 不加彩色大色块封面、渐变、水印装饰;颜色只用于强调(章节标记,以及用户要求高亮时的 `.hl` 关键词)。
|
|
54
67
|
- 正文不小于 10.5pt(五号字),表格和注释不小于 9pt;正文行距不低于 1.6。
|
|
55
68
|
- 不引网络字体(国内加载不了,导出会退回默认字体)。
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<!--
|
|
8
8
|
DAL diagram page (Mermaid). Replace the source inside the pre.mermaid element with
|
|
9
9
|
the diagram source (one pre.mermaid per diagram), keep everything else.
|
|
10
|
-
Export:
|
|
10
|
+
Export: office_render_page({ path: "diagram.html", output: "diagram.png", width: 1200, height: 800, full: true })
|
|
11
11
|
Mermaid 11.17.2 (MIT) from the npmmirror CDN, integrity-checked.
|
|
12
12
|
-->
|
|
13
13
|
<style>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<!--
|
|
8
8
|
DAL mind map page (markmap). Write the outline as Markdown headings and
|
|
9
9
|
nested lists inside the script element with id="outline"; the first heading
|
|
10
|
-
is the root. Export:
|
|
10
|
+
is the root. Export: office_render_page({ path: "mindmap.html", output: "mindmap.png", width: 1600, height: 1000 })
|
|
11
11
|
markmap 0.18.12 (MIT) and d3 7.9.0 (ISC) from the npmmirror CDN, integrity-checked.
|
|
12
12
|
-->
|
|
13
13
|
<style>
|
package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/posters/event-poster.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<title>活动海报</title>
|
|
6
|
-
<!-- 竖版活动海报 / 朋友圈长图,9:16,1080×1920。导出:
|
|
6
|
+
<!-- 竖版活动海报 / 朋友圈长图,9:16,1080×1920。导出:office_render_page({ path: "event-poster.html", output: "poster.png", width: 1080, height: 1920, scale: 1 }) -->
|
|
7
7
|
<link rel="stylesheet" href="poster.css">
|
|
8
8
|
<style>
|
|
9
9
|
.canvas{--w:1080px;--h:1920px;padding:96px 88px;display:flex;flex-direction:column}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* DAL poster & social card base. One fixed-size canvas per page:
|
|
3
3
|
* <main class="canvas" data-palette="clear"> with .canvas { --w: 1242px; --h: 1660px }
|
|
4
|
-
* Every text block that must not overflow carries data-fit="名字"; render.mjs
|
|
4
|
+
* Every text block that must not overflow carries data-fit="名字"; the export (office_render_page or render.mjs)
|
|
5
5
|
* reports any that do. Sizes are in px on purpose: the canvas is a fixed-size
|
|
6
6
|
* image, not a responsive page.
|
|
7
7
|
*/
|
package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/posters/square-card.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<title>数据卡片</title>
|
|
6
|
-
<!-- 方形数据卡 / 金句卡,1:1,1080×1080(朋友圈、微博、小红书都能用)。导出:
|
|
6
|
+
<!-- 方形数据卡 / 金句卡,1:1,1080×1080(朋友圈、微博、小红书都能用)。导出:office_render_page({ path: "square-card.html", output: "card.png", width: 1080, height: 1080, scale: 1 }) -->
|
|
7
7
|
<link rel="stylesheet" href="poster.css">
|
|
8
8
|
<style>
|
|
9
9
|
.canvas{--w:1080px;--h:1080px;padding:88px;display:flex;flex-direction:column}
|
package/dist/node_modules/@dalcode/dal-skills/src/bundled/visual-kit/posters/wechat-cover.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<title>公众号封面</title>
|
|
6
|
-
<!-- 公众号头条封面,2.35:1,900×383(导出用
|
|
6
|
+
<!-- 公众号头条封面,2.35:1,900×383(导出用 scale: 2 得到 1800×766)。分享时会被裁成正方形:关键文字放在左侧 383px 以外也能看懂。导出:office_render_page({ path: "wechat-cover.html", output: "cover.png", width: 900, height: 383, scale: 2 }) -->
|
|
7
7
|
<link rel="stylesheet" href="poster.css">
|
|
8
8
|
<style>
|
|
9
9
|
.canvas{--w:900px;--h:383px;display:grid;grid-template-columns:1fr 300px}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<title>小红书内页</title>
|
|
6
|
-
<!-- 小红书 / 图文内页,3:4,1242×1660。一页 3–5 条;更多就拆页。导出:
|
|
6
|
+
<!-- 小红书 / 图文内页,3:4,1242×1660。一页 3–5 条;更多就拆页。导出:office_render_page({ path: "xhs-card.html", output: "p2.png", width: 1242, height: 1660, scale: 1 }) -->
|
|
7
7
|
<link rel="stylesheet" href="poster.css">
|
|
8
8
|
<style>
|
|
9
9
|
.canvas{--w:1242px;--h:1660px;padding:96px;display:flex;flex-direction:column}
|
|
@@ -3,23 +3,26 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<title>小红书封面</title>
|
|
6
|
-
<!-- 小红书 / 图文封面,3:4,1242×1660。导出:
|
|
6
|
+
<!-- 小红书 / 图文封面,3:4,1242×1660。导出:office_render_page({ path: "xhs-cover.html", output: "cover.png", width: 1242, height: 1660, scale: 1 }) -->
|
|
7
7
|
<link rel="stylesheet" href="poster.css">
|
|
8
8
|
<style>
|
|
9
9
|
.canvas{--w:1242px;--h:1660px;padding:104px 96px 96px;display:flex;flex-direction:column}
|
|
10
10
|
.series{display:flex;justify-content:space-between;font-size:34px;color:var(--muted);padding-bottom:28px;border-bottom:2px solid var(--ink)}
|
|
11
|
-
.title{margin-top:
|
|
11
|
+
.title{margin-top:auto;font-size:132px;line-height:1.14;font-weight:800;letter-spacing:-0.03em;max-height:604px;overflow:hidden}
|
|
12
12
|
.sub{margin-top:48px;font-size:44px;line-height:1.5;color:var(--muted);max-width:820px;max-height:132px;overflow:hidden}
|
|
13
|
-
.big{position:absolute;right:56px;bottom:-120px;font-size:720px;line-height:1;font-weight:700;color:var(--accent)}
|
|
14
|
-
|
|
13
|
+
.big{position:absolute;right:56px;bottom:-120px;font-size:720px;line-height:1;font-weight:700;color:var(--accent);opacity:.9}
|
|
14
|
+
/* Title block on the optical middle: a cover read at thumbnail size has no empty band under the title. */
|
|
15
|
+
.lead{margin-bottom:auto;position:relative}
|
|
16
|
+
.author{font-size:34px;position:relative}
|
|
15
17
|
</style>
|
|
16
18
|
</head>
|
|
17
19
|
<body>
|
|
18
20
|
<main class="canvas" data-palette="clear">
|
|
19
21
|
<div class="series"><span>职场效率笔记</span><span>第 12 期</span></div>
|
|
20
22
|
<h1 class="title balance" data-fit="主标题">下班前 10 分钟,<br>做完这 5 件事</h1>
|
|
21
|
-
<p class="sub" data-fit="副标题">第二天早上不用再想“先干什么”,坚持一个月,加班少了一半。</p>
|
|
23
|
+
<p class="sub lead" data-fit="副标题">第二天早上不用再想“先干什么”,坚持一个月,加班少了一半。</p>
|
|
22
24
|
<div class="big num" aria-hidden="true">5</div>
|
|
25
|
+
<!-- 账号名用用户给的;没给就删掉这一行,不要编。 -->
|
|
23
26
|
<div class="author">@阿青的效率笔记</div>
|
|
24
27
|
</main>
|
|
25
28
|
</body>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<!--
|
|
7
7
|
DAL letter (A4): sender block, recipient, date, subject, body in serif,
|
|
8
8
|
signature. For notices, invitations, cover letters, statements.
|
|
9
|
-
Export:
|
|
9
|
+
Export: office_render_page({ path: "letter.html", output: "letter.pdf" })
|
|
10
10
|
-->
|
|
11
11
|
<link rel="stylesheet" href="print.css">
|
|
12
12
|
<style>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
DAL report (A4 PDF). Structure: title block, key findings, sections with
|
|
8
8
|
tables/figures, appendix. Charts: generate an SVG with the chart tool and
|
|
9
9
|
put it in a <figure>. Export:
|
|
10
|
-
|
|
10
|
+
office_render_page({ path: "report.html", output: "report.pdf" })
|
|
11
11
|
-->
|
|
12
12
|
<link rel="stylesheet" href="print.css">
|
|
13
13
|
<style>
|
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
<!--
|
|
7
7
|
DAL resume (one A4 page). Name and contact on top, then experience with
|
|
8
8
|
results in numbers, projects, education, skills. Keep it to one page:
|
|
9
|
-
|
|
10
|
-
Export:
|
|
9
|
+
The export reports the page count; anything but 1 means cut content.
|
|
10
|
+
Export: office_render_page({ path: "resume.html", output: "resume.pdf" })
|
|
11
|
+
Main colour: add :root { --accent: …; --ink: …; } to the style below; mark a key
|
|
12
|
+
figure with <b class="hl">.
|
|
11
13
|
-->
|
|
12
14
|
<link rel="stylesheet" href="print.css">
|
|
13
15
|
<style>
|
|
@@ -19,6 +21,8 @@ body { font-size: 10pt; line-height: 1.6; }
|
|
|
19
21
|
.head .role { margin-top: 2pt; font-size: 11pt; color: var(--muted); }
|
|
20
22
|
.contact { text-align: right; font-size: 9pt; color: var(--muted); line-height: 1.7; }
|
|
21
23
|
h2 { font-size: 11pt; margin: 14pt 0 6pt; padding: 0; border: 0; color: var(--accent); }
|
|
24
|
+
/* Highlighted figure or keyword: at most one per entry. Restyle with :root { --accent: …; } in this block. */
|
|
25
|
+
.hl { color: var(--accent); font-weight: 600; }
|
|
22
26
|
.item { display: grid; grid-template-columns: 1fr auto; column-gap: 12pt; margin-bottom: 9pt; break-inside: avoid; }
|
|
23
27
|
.item h3 { margin: 0; font-size: 10.5pt; }
|
|
24
28
|
.item .when { font-size: 9pt; color: var(--muted); font-variant-numeric: tabular-nums; }
|
|
@@ -40,7 +44,7 @@ h2 { font-size: 11pt; margin: 14pt 0 6pt; padding: 0; border: 0; color: var(--ac
|
|
|
40
44
|
<h3>青账科技 · 高级产品经理</h3><span class="when">2022.03 – 至今</span>
|
|
41
45
|
<div class="sub">负责报销与费控产品线,带 3 名产品经理</div>
|
|
42
46
|
<ul>
|
|
43
|
-
<li>主导发票识别功能上线,单据处理时长从 2 天降到 4 小时,付费转化率提升 18
|
|
47
|
+
<li>主导发票识别功能上线,单据处理时长从 2 天降到 4 小时,付费转化率提升 <b class="hl">18%</b>。</li>
|
|
44
48
|
<li>设计审批规则引擎,支撑 1,200 家企业客户的自定义流程,相关工单减少 60%。</li>
|
|
45
49
|
</ul>
|
|
46
50
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: web-design
|
|
3
|
-
description: 在做网页、前端界面、落地页、官网、数据看板、管理后台或调整页面样式时使用:网页 / 页面 / 前端 / 界面 / UI / 落地页 / 官网 / 看板 / dashboard /
|
|
3
|
+
description: 在做网页、前端界面、落地页、官网、数据看板、管理后台或调整页面样式时使用:网页 / 页面 / 前端 / 界面 / UI / 落地页 / 官网 / 看板 / dashboard / 管理后台 / 样式 / CSS / landing page。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<!-- Parts of the design principles below are adapted from the "frontend-design" skill by Anthropic (Apache-2.0); see NOTICE. -->
|
|
@@ -46,7 +46,7 @@ description: 在做网页、前端界面、落地页、官网、数据看板、
|
|
|
46
46
|
|
|
47
47
|
**响应式与可用性**
|
|
48
48
|
- 手机宽度(390px)不出现横向滚动;表格在小屏可以横向滚动或改成列表。
|
|
49
|
-
- 焦点环可见(tokens
|
|
49
|
+
- 焦点环可见(tokens 已处理);图标按钮有 `aria-label`;图片有 `alt`。后台和工具类界面的主操作标快捷键;落地页、官网的按钮不标(访客不会按快捷键,按钮里的「F」「⌘K」小方块只会显得奇怪)。
|
|
50
50
|
|
|
51
51
|
**第三方库**
|
|
52
52
|
- 优先不用库。需要时只从 `https://cdn.npmmirror.com/packages/<包名>/<固定版本>/files/...` 引入,并带 `integrity` 与 `crossorigin="anonymous"`;模板里已有 ECharts 的写法可照抄。
|
|
@@ -67,7 +67,7 @@ description: 在做网页、前端界面、落地页、官网、数据看板、
|
|
|
67
67
|
|
|
68
68
|
## 5. 交付前检查(截图看过才算完成)
|
|
69
69
|
|
|
70
|
-
1. 用 `
|
|
71
|
-
2.
|
|
70
|
+
1. 用 `office_render_page({ path: "<页面.html>", output: "<桌面.png>", width: 1440, height: 900, full: true })` 截桌面图,再用 `width: 390, height: 844` 截手机图,加 `dark: true` 再截一张深色。不要在 bash 里自己启动 Chrome 或写 canvas 脚本:命令沙箱里浏览器起不来,本工具在沙箱外用独立的浏览器配置渲染。结果列出页面报错或横向溢出时,修好再截。没有 Chrome 时按「浏览器验收」技能处理。
|
|
71
|
+
2. 看导出结果自带的预览图(长页面只预览到前 2800px,看下半部分时再读截图文件),逐条回答:第 4 节的禁止项一个都没有?截图缩小一半主次还分得清?手机上没有挤压、截断?深色下文字都看得清?
|
|
72
72
|
3. 列表/表格页面再看空数据、加载中、出错、超长文本四种状态有没有处理。
|
|
73
73
|
4. 交付时写出:页面文件路径、截图路径、参照了哪个产品的哪部分结构。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var m=Object.defineProperty;var t=(e,a)=>m(e,"name",{value:a,configurable:!0});var
|
|
1
|
+
var m=Object.defineProperty;var t=(e,a)=>m(e,"name",{value:a,configurable:!0});var c=Object.defineProperty,i=t((e,a)=>c(e,"name",{value:a,configurable:!0}),"t");import{dirname as r,join as d}from"node:path";import{fileURLToPath as n}from"node:url";const s=["bounded-code-repair","browser-qa","chart-design","dal-slides","diagram-design","evidence-first-retrieval","poster-design","print-design","validated-structured-output","web-design"],o="visual-kit";function l(){return d(r(n(import.meta.url)),"bundled",o)}t(l,"m"),i(l,"visualKitPath");function u(){const e=r(n(import.meta.url));return s.map(a=>d(e,"bundled",a,"SKILL.md"))}t(u,"c"),i(u,"bundledSkillPaths");export{s as BUNDLED_SKILLS,o as VISUAL_KIT_DIR,u as bundledSkillPaths,l as visualKitPath};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
var
|
|
2
|
-
`)}
|
|
1
|
+
var S=Object.defineProperty;var r=(u,t)=>S(u,"name",{value:t,configurable:!0});var k=Object.defineProperty,s=r((u,t)=>k(u,"name",{value:t,configurable:!0}),"o");import{t as a}from"@dalcode/dal-pi-kit";const L=["product","cloud","project","package"];function D(u){return u.scope==="temporary"?"product":u.scope==="project"?"project":u.origin==="package"?"package":"user"}r(D,"p"),s(D,"hostTier");function m(u,t){const e=new Set,i=[];for(const n of u){const o=n.name.toLowerCase();e.has(o)||(e.add(o),i.push({name:n.name,description:n.description,source:"local",tier:D(n),filePath:n.filePath,baseDir:n.baseDir}))}for(const n of t){const o=n.id.toLowerCase(),F=n.name.toLowerCase();e.has(o)||e.has(F)||(e.add(o),e.add(F),i.push({name:n.id,title:n.name!==n.id?n.name:void 0,description:n.description,source:"cloud",tier:"cloud",cloudId:n.id}))}return i}r(m,"x"),s(m,"mergeSkills");function d(u,t){const e=t.trim().toLowerCase();if(e.length!==0)return u.find(i=>i.name.toLowerCase()===e||i.title?.toLowerCase()===e)??u.find(i=>i.name.toLowerCase().includes(e)||i.title?.toLowerCase().includes(e))}r(d,"b"),s(d,"resolveSkill");function l(){return a("\u4EFB\u52A1\u7B26\u5408\u4E0B\u9762\u67D0\u4E2A\u6280\u80FD\u7684\u300C\u4F55\u65F6\u4F7F\u7528\u300D\u65F6\uFF0C\u5148\u7528 skill \u5DE5\u5177\u6309 name \u52A0\u8F7D\u5B83\uFF0C\u518D\u56DE\u7B54\u6216\u52A8\u624B\uFF1B\u7528\u6237\u70B9\u540D\u67D0\u4E2A\u6280\u80FD\u65F6\u5FC5\u987B\u4F7F\u7528\u5B83\uFF1B\u4E0D\u8981\u53EA\u63D0\u5230\u6280\u80FD\u800C\u4E0D\u52A0\u8F7D\u3002")}r(l,"m"),s(l,"skillRule");const E=25,p=new Set(["bounded-code-repair","debugging","testing","verification"]),C=80;function f(u,t){const e=`- ${u.title?`${u.name} (${u.title})`:u.name}: ${u.description.replace(/\s+/g," ").trim()}`;return Array.from(e).length>t?`${Array.from(e).slice(0,t-1).join("")}\u2026`:e}r(f,"g"),s(f,"listingLine");function c(u,t={}){const e=t.maxEntries??E,i=t.maxLineChars??C,n=s((o,F)=>o.name<F.name?-1:o.name>F.name?1:0,"byName");return L.flatMap(o=>u.filter(F=>F.tier===o&&!p.has(F.name)).sort(n)).slice(0,e).map(o=>f(o,i))}r(c,"k"),s(c,"listSkills");function A(u,t={}){return[l(),"",a("\u53EF\u7528\u6280\u80FD\uFF08name: \u4F55\u65F6\u4F7F\u7528\uFF09\uFF1A"),...c(u,t)].join(`
|
|
2
|
+
`)}r(A,"h"),s(A,"skillsPromptSection");function B(){return[a("\u52A0\u8F7D\u6280\u80FD\uFF1A\u4E13\u9879\u4EFB\u52A1\u7684\u64CD\u4F5C\u6307\u5F15\uFF0C\u53EF\u7528\u6280\u80FD\u5217\u5728\u7CFB\u7EDF\u63D0\u793A\u7684 skills \u90E8\u5206\u3002\u8FD9\u662F\u4F7F\u7528\u6280\u80FD\u7684\u552F\u4E00\u5165\u53E3\uFF0C\u4E0D\u8981\u7528 read \u6216 bash \u53BB\u8BFB\u6280\u80FD\u6587\u4EF6\u3002"),a("\u7528 name \u52A0\u8F7D\u67D0\u4E2A\u6280\u80FD\u7684\u5168\u6587\u5E76\u7167\u505A\u3002"),a('\u7528\u6237\u6D88\u606F\u6216\u968F\u9644\u7684\u4E0A\u4E0B\u6587\u91CC\u5DF2\u7ECF\u6709 <skill name="\u2026"> \u5757\u65F6\uFF0C\u8BE5\u6280\u80FD\u5DF2\u52A0\u8F7D\uFF0C\u76F4\u63A5\u7167\u505A\uFF0C\u4E0D\u5FC5\u518D\u6B21\u8C03\u7528\u3002')].join(`
|
|
3
|
+
`)}r(B,"D"),s(B,"describeSkillTool");export{C as DEFAULT_MAX_LINE_CHARS,E as DEFAULT_MAX_LISTED_SKILLS,p as UNLISTED_METHOD_SKILLS,B as describeSkillTool,c as listSkills,m as mergeSkills,d as resolveSkill,l as skillRule,A as skillsPromptSection};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var w=Object.defineProperty;var i=(e,t)=>w(e,"name",{value:t,configurable:!0});var x=Object.defineProperty,s=i((e,t)=>x(e,"name",{value:t,configurable:!0}),"i");import{t as k}from"@dalcode/dal-pi-kit";import{declaredTerms as z,positivePart as p}from"./search.js";const A=/[??]\s*$|^(?:为什么|怎么|如何|什么|哪|是否|有没有|能不能|请问|解释|说明|介绍|总结|概括|看一下|看看|查一下|帮我查)|^(?:why|how|what|which|where|when|who|explain|describe|summari[sz]e|tell me|look up|find out)\b/i,y=/(?:做|制作|生成|写|画|出一份|出个|创建|改成|修改|修复|修好|修一下|改一下|实现|导出|整理成|排版)|\b(?:make|create|generate|build|write|draw|fix|implement|change|update|export|design)\b/i,B=/(?:修复|修好|修一下|修掉|解决|排查).*(?:bug|报错|错误|失败|异常|不对|问题|崩溃|不合法|不正确)|(?:bug|报错|失败|异常|崩溃|不通过|红了).*(?:修|解决)|\bfix\b.*\b(?:bug|error|failing|failure|crash|broken|regression|root cause)|\b(?:bug|failing|fails|broken|crash(?:es)?|red|regression|root cause)\b.*\bfix/i,D="bounded-code-repair";function c(e){return e.toLowerCase().replace(/\s+/g,"")}i(c,"u"),s(c,"normalized");function f(e,t){if(/^[a-z0-9\s.+#_-]+$/.test(t)){const r=t.match(/[a-z0-9]+/g)??[];return r.length===0?!1:new RegExp(`(?:^|[^a-z0-9./_-])${r.join("[\\s_-]*")}(?:$|[^a-z0-9./_-])`,"i").test(e)}return c(e).includes(c(t))}i(f,"d"),s(f,"mentions");const b=[{format:"word",pattern:/\.docx?\b|\bword\b|word\s*文档/i},{format:"excel",pattern:/\.xlsx?\b|\bexcel\b|电子表格/i},{format:"ppt",pattern:/\.pptx?\b|\bpptx?\b|powerpoint|幻灯片|演示文稿/i}];function d(e){return b.filter(({pattern:t})=>t.test(e)).map(({format:t})=>t)}i(d,"y"),s(d,"officeFormats");function g(e,t){const r=p(e);return b.some(o=>o.format===t&&o.pattern.test(r))}i(g,"E"),s(g,"mentionsFormat");function h(e,t){const r=e.trim();if(!r||r.includes("<skill")||r.startsWith("/skill:"))return;const o=t.filter(n=>n.tier==="product");if(o.some(n=>f(r,n.name))||A.test(r)&&!y.test(r))return;if(B.test(r))return o.find(n=>n.name===D);const m=d(r);let u;for(const n of o){if(m.length>0&&!m.some(l=>g(n.description,l)))continue;const a=z(p(n.description)).filter(l=>f(r,l)).length;a>0&&(!u||a>u.hits)&&(u={entry:n,hits:a})}return u?.entry}i(h,"z"),s(h,"skillForRequest");function F(e){return k("\u8FD9\u4E2A\u8BF7\u6C42\u5BF9\u5E94\u6280\u80FD {name}\uFF1A\u52A8\u624B\u524D\u5148\u7528 skill \u5DE5\u5177\u52A0\u8F7D\u5B83\uFF08name: {name}\uFF09\uFF0C\u6309\u5B83\u505A\u3002").replaceAll("{name}",e.name)}i(F,"I"),s(F,"skillHint");export{h as skillForRequest,F as skillHint};
|