mixdog 1.4.3 → 1.4.5
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/package.json +1 -2
- package/src/cli.mjs +5 -1
- package/src/defaults/shipped-history.json +30 -2
- package/src/defaults/skills/browser-use/SKILL.md +148 -273
- package/src/defaults/skills/browser-use/references/devtools.md +14 -0
- package/src/defaults/skills/browser-use/references/page-flows.md +66 -0
- package/src/defaults/skills/browser-use/references/sign-in.md +70 -0
- package/src/defaults/skills/code-tidy/SKILL.md +60 -84
- package/src/defaults/skills/code-tidy/references/agent-cleanup.md +27 -2
- package/src/defaults/skills/computer-use/SKILL.md +145 -229
- package/src/defaults/skills/computer-use/references/flows.md +35 -0
- package/src/defaults/skills/computer-use/references/operations.md +22 -0
- package/src/defaults/skills/computer-use/references/platforms.md +12 -0
- package/src/defaults/skills/docx/SKILL.md +23 -31
- package/src/defaults/skills/docx/references/native-authoring.md +26 -3
- package/src/defaults/skills/docx/references/redlining.md +15 -0
- package/src/defaults/skills/image/SKILL.md +37 -77
- package/src/defaults/skills/image/references/prompt-forms.md +51 -0
- package/src/defaults/skills/image/references/text.md +6 -0
- package/src/defaults/skills/local-provider/SKILL.md +75 -105
- package/src/defaults/skills/local-provider/references/lifecycle.md +14 -0
- package/src/defaults/skills/local-provider/references/maintenance.md +19 -0
- package/src/defaults/skills/local-provider/references/recovery.md +30 -0
- package/src/defaults/skills/memory-management/SKILL.md +22 -21
- package/src/defaults/skills/pdf/SKILL.md +21 -23
- package/src/defaults/skills/pdf/references/blocks.md +20 -0
- package/src/defaults/skills/pdf/references/forms.md +12 -0
- package/src/defaults/skills/pdf/references/html.md +2 -2
- package/src/defaults/skills/pdf/references/ocr.md +7 -0
- package/src/defaults/skills/pdf/references/security.md +8 -0
- package/src/defaults/skills/pptx/SKILL.md +30 -109
- package/src/defaults/skills/pptx/references/audit.md +45 -0
- package/src/defaults/skills/pptx/references/brief-critique.md +47 -0
- package/src/defaults/skills/pptx/references/editing.md +24 -0
- package/src/defaults/skills/pptx/references/html.md +1 -1
- package/src/defaults/skills/pptx/references/script.md +33 -0
- package/src/defaults/skills/setup/SKILL.md +34 -102
- package/src/defaults/skills/setup/references/actions.md +73 -14
- package/src/defaults/skills/setup/references/surfaces.md +23 -8
- package/src/defaults/skills/setup-guide/SKILL.md +28 -115
- package/src/defaults/skills/setup-guide/references/features.md +36 -0
- package/src/defaults/skills/setup-guide/references/glossary.md +38 -0
- package/src/defaults/skills/setup-guide/references/workflow-models.md +62 -0
- package/src/defaults/skills/test-suite/SKILL.md +15 -127
- package/src/defaults/skills/test-suite/references/case-management.md +17 -9
- package/src/defaults/skills/test-suite/references/diagnose.md +23 -0
- package/src/defaults/skills/test-suite/references/prune.md +27 -0
- package/src/defaults/skills/test-suite/references/write.md +44 -0
- package/src/defaults/skills/video/SKILL.md +28 -42
- package/src/defaults/skills/video/references/prompting.md +31 -0
- package/src/defaults/skills/visualize/SKILL.md +73 -107
- package/src/defaults/skills/visualize/references/craft.md +1 -2
- package/src/defaults/skills/visualize/references/feedback.md +36 -0
- package/src/defaults/skills/visualize/references/showing.md +13 -0
- package/src/defaults/skills/xlsx/SKILL.md +23 -50
- package/src/defaults/skills/xlsx/references/editing.md +15 -0
- package/src/defaults/skills/xlsx/references/model-conventions.md +1 -1
- package/src/defaults/skills/xlsx/references/recalculation.md +37 -0
- package/src/defaults/skills/xlsx/references/report-design.md +18 -2
- package/src/lib/keychain-cjs.cjs +22 -1
- package/src/lib/rules-builder.cjs +1 -1
- package/src/rules/agent/AGENT.md +3 -0
- package/src/rules/agent-mode/MIXY.md +5 -3
- package/src/rules/lead/LEAD.md +3 -1
- package/src/runtime/agent/orchestrator/agent-runtime/cache-strategy.mjs +8 -30
- package/src/runtime/agent/orchestrator/agent-runtime/title-completion.mjs +5 -0
- package/src/runtime/agent/orchestrator/mcp/oauth-request.mjs +21 -2
- package/src/runtime/agent/orchestrator/providers/account-pool.mjs +3 -0
- package/src/runtime/agent/orchestrator/providers/admission-scheduler.mjs +4 -3
- package/src/runtime/agent/orchestrator/providers/anthropic-api-request.mjs +11 -1
- package/src/runtime/agent/orchestrator/providers/anthropic-api-transport.mjs +2 -0
- package/src/runtime/agent/orchestrator/providers/anthropic-message-threads.mjs +583 -0
- package/src/runtime/agent/orchestrator/providers/anthropic-oauth-client-version.mjs +1 -1
- package/src/runtime/agent/orchestrator/providers/anthropic-oauth.mjs +81 -19
- package/src/runtime/agent/orchestrator/providers/anthropic-sse-turn/turn-events/content-block-start.mjs +4 -0
- package/src/runtime/agent/orchestrator/providers/anthropic-sse-turn/turn-outcome.mjs +2 -0
- package/src/runtime/agent/orchestrator/providers/anthropic-sse.mjs +180 -13
- package/src/runtime/agent/orchestrator/providers/anthropic-turn-result.mjs +2 -0
- package/src/runtime/agent/orchestrator/providers/anthropic.mjs +58 -6
- package/src/runtime/agent/orchestrator/providers/cursor-wire.mjs +4 -2
- package/src/runtime/agent/orchestrator/providers/custom-provider-config.mjs +121 -9
- package/src/runtime/agent/orchestrator/providers/custom-provider.mjs +4 -1
- package/src/runtime/agent/orchestrator/providers/gemini-error-contract.mjs +6 -6
- package/src/runtime/agent/orchestrator/providers/gemini-model-redirect.mjs +44 -0
- package/src/runtime/agent/orchestrator/providers/gemini-reasoning-relay.mjs +5 -0
- package/src/runtime/agent/orchestrator/providers/gemini-request-body.mjs +34 -5
- package/src/runtime/agent/orchestrator/providers/gemini-response.mjs +10 -0
- package/src/runtime/agent/orchestrator/providers/gemini-schema.mjs +11 -6
- package/src/runtime/agent/orchestrator/providers/gemini-sdk-request.mjs +4 -100
- package/src/runtime/agent/orchestrator/providers/gemini-stream.mjs +3 -227
- package/src/runtime/agent/orchestrator/providers/gemini.mjs +226 -118
- package/src/runtime/agent/orchestrator/providers/lib/anthropic-request-utils.mjs +11 -1
- package/src/runtime/agent/orchestrator/providers/lib/claude-bridge-schema.mjs +15 -3
- package/src/runtime/agent/orchestrator/providers/lib/gemini-model-catalog.mjs +2 -1
- package/src/runtime/agent/orchestrator/providers/lib/generation-window.mjs +9 -0
- package/src/runtime/agent/orchestrator/providers/openai-compat-chat-send.mjs +9 -1
- package/src/runtime/agent/orchestrator/providers/openai-compat-chat-stream/stream-result.mjs +2 -0
- package/src/runtime/agent/orchestrator/providers/openai-compat-chat-stream/stream-state.mjs +5 -0
- package/src/runtime/agent/orchestrator/providers/openai-compat-options.mjs +3 -0
- package/src/runtime/agent/orchestrator/providers/openai-compat-response-normalization.mjs +2 -0
- package/src/runtime/agent/orchestrator/providers/openai-compat-responses.mjs +10 -1
- package/src/runtime/agent/orchestrator/providers/openai-direct-request.mjs +5 -28
- package/src/runtime/agent/orchestrator/providers/openai-http-sse-response-state/response-events.mjs +3 -0
- package/src/runtime/agent/orchestrator/providers/openai-http-sse-response-state/response-outcome.mjs +2 -0
- package/src/runtime/agent/orchestrator/providers/openai-ws-pool.mjs +50 -28
- package/src/runtime/agent/orchestrator/providers/openai-ws-response-state.mjs +9 -2
- package/src/runtime/agent/orchestrator/providers/openai-ws-stream/socket-handlers.mjs +14 -10
- package/src/runtime/agent/orchestrator/providers/openai-ws.mjs +1 -3
- package/src/runtime/agent/orchestrator/providers/openrouter-provider-routing.mjs +28 -0
- package/src/runtime/agent/orchestrator/providers/openrouter.mjs +4 -1
- package/src/runtime/agent/orchestrator/providers/registry.mjs +30 -25
- package/src/runtime/agent/orchestrator/providers/stream-json-pool/worker-slots/slot-spawn.mjs +8 -3
- package/src/runtime/agent/orchestrator/providers/vertex-ai-maas.mjs +2 -2
- package/src/runtime/agent/orchestrator/runtime-core/ask-user-result.mjs +66 -0
- package/src/runtime/agent/orchestrator/runtime-core/config-helpers.mjs +4 -5
- package/src/runtime/agent/orchestrator/runtime-core/goal-tool-defs.mjs +2 -2
- package/src/runtime/agent/orchestrator/runtime-core/provider-request-tools.mjs +15 -8
- package/src/runtime/agent/orchestrator/runtime-core/session-title.mjs +1 -0
- package/src/runtime/agent/orchestrator/runtime-core/todo-list.mjs +9 -32
- package/src/runtime/agent/orchestrator/runtime-core/todo-tool-defs.mjs +4 -5
- package/src/runtime/agent/orchestrator/session/compact/summary-route.mjs +1 -3
- package/src/runtime/agent/orchestrator/session/loop/compact-policy.mjs +5 -2
- package/src/runtime/agent/orchestrator/session/loop/no-tool-turn/todo-check.mjs +2 -17
- package/src/runtime/agent/orchestrator/session/loop/usage.mjs +7 -3
- package/src/runtime/agent/orchestrator/session/manager/ask-turn-settle.mjs +9 -2
- package/src/runtime/agent/orchestrator/session/manager/runtime-liveness.mjs +8 -1
- package/src/runtime/agent/orchestrator/session/manager/session-close.mjs +26 -13
- package/src/runtime/agent/orchestrator/session/manager/session-lifecycle.mjs +4 -5
- package/src/runtime/agent/orchestrator/session/manager/usage-metrics.mjs +16 -5
- package/src/runtime/agent/orchestrator/session/store/lifecycle-barriers.mjs +22 -1
- package/src/runtime/agent/orchestrator/session/store/live-state.mjs +4 -0
- package/src/runtime/agent/orchestrator/session/store.mjs +12 -6
- package/src/runtime/agent/orchestrator/tools/builtin/cache-layers.mjs +11 -9
- package/src/runtime/agent/orchestrator/tools/builtin/grep-formatting.mjs +2 -8
- package/src/runtime/agent/orchestrator/tools/builtin/lib/search-input-helpers.mjs +1 -9
- package/src/runtime/agent/orchestrator/tools/builtin/lib/shell-output-silence.mjs +64 -0
- package/src/runtime/agent/orchestrator/tools/builtin/lib/shell-task-output.mjs +20 -6
- package/src/runtime/agent/orchestrator/tools/builtin/local-search-telemetry.mjs +2 -2
- package/src/runtime/agent/orchestrator/tools/builtin/native-search-client.mjs +1 -1
- package/src/runtime/agent/orchestrator/tools/builtin/runtime-capabilities.mjs +12 -3
- package/src/runtime/agent/orchestrator/tools/builtin/task-tool.mjs +12 -1
- package/src/runtime/agent/orchestrator/tools/code-graph/ast-calls.mjs +9 -2
- package/src/runtime/agent/orchestrator/tools/code-graph/build.mjs +137 -7
- package/src/runtime/agent/orchestrator/tools/code-graph/calls-cache.mjs +43 -14
- package/src/runtime/agent/orchestrator/tools/code-graph/calls-sidecar-worker.mjs +33 -0
- package/src/runtime/agent/orchestrator/tools/code-graph/disk-cache.mjs +146 -11
- package/src/runtime/agent/orchestrator/tools/code-graph/dispatch.mjs +31 -24
- package/src/runtime/agent/orchestrator/tools/code-graph/graph-binary/spawn-jsonl.mjs +172 -25
- package/src/runtime/agent/orchestrator/tools/code-graph/graph-model.mjs +100 -2
- package/src/runtime/agent/orchestrator/tools/code-graph/main-thread-slice.mjs +18 -0
- package/src/runtime/agent/orchestrator/tools/code-graph/mask-pool.mjs +219 -0
- package/src/runtime/agent/orchestrator/tools/code-graph/mask-worker.mjs +12 -0
- package/src/runtime/agent/orchestrator/tools/code-graph/memory-cache.mjs +6 -1
- package/src/runtime/agent/orchestrator/tools/code-graph/modes/calls.mjs +9 -2
- package/src/runtime/agent/orchestrator/tools/code-graph/modes/dependents.mjs +5 -1
- package/src/runtime/agent/orchestrator/tools/code-graph/modes/structure.mjs +8 -2
- package/src/runtime/agent/orchestrator/tools/code-graph/modes/symbols.mjs +14 -11
- package/src/runtime/agent/orchestrator/tools/code-graph/search-references.mjs +41 -18
- package/src/runtime/agent/orchestrator/tools/code-graph/search.mjs +391 -83
- package/src/runtime/agent/orchestrator/tools/code-graph/symbol-index.mjs +109 -9
- package/src/runtime/agent/orchestrator/tools/code-graph/text-mask.mjs +73 -29
- package/src/runtime/agent/orchestrator/tools/code-graph-prewarm-worker.mjs +6 -5
- package/src/runtime/agent/orchestrator/tools/lib/native-spawn-client.mjs +7 -3
- package/src/runtime/channels/lib/crash-log.mjs +21 -1
- package/src/runtime/channels/lib/routines-db.mjs +35 -0
- package/src/runtime/channels/lib/schedules-db.mjs +4 -0
- package/src/runtime/channels/lib/webhooks-db.mjs +4 -0
- package/src/runtime/channels/lib/worker-main.mjs +8 -25
- package/src/runtime/computer-bridge/action-schema.mjs +2 -2
- package/src/runtime/computer-bridge/core-actions.mjs +16 -2
- package/src/runtime/computer-bridge/result-canonical.mjs +6 -0
- package/src/runtime/media/jobs.mjs +5 -0
- package/src/runtime/media/store.mjs +146 -3
- package/src/runtime/memory/tool-defs.mjs +1 -1
- package/src/runtime/office/core/office-write-ledger.mjs +2 -2
- package/src/runtime/shared/agent-reap-state.mjs +19 -0
- package/src/runtime/shared/desktop-notice-host.d.mts +13 -0
- package/src/runtime/shared/desktop-notice-host.mjs +87 -0
- package/src/runtime/shared/file-lock.mjs +2 -2
- package/src/runtime/shared/heap-cap.mjs +9 -11
- package/src/runtime/shared/llm/http-agent.mjs +11 -1
- package/src/runtime/shared/llm/system-proxy.mjs +100 -25
- package/src/runtime/shared/llm/usage-accounting.mjs +121 -19
- package/src/runtime/shared/llm/usage-context.mjs +3 -3
- package/src/runtime/shared/llm/usage-ledger-quota.mjs +2 -0
- package/src/runtime/shared/llm/usage-ledger-requests.mjs +190 -0
- package/src/runtime/shared/llm/usage-ledger-rollup.mjs +7 -3
- package/src/runtime/shared/llm/usage-ledger-worker.mjs +2 -0
- package/src/runtime/shared/llm/usage-ledger.mjs +69 -1
- package/src/runtime/shared/llm/usage-request-status.mjs +48 -0
- package/src/runtime/shared/provider-accounts.mjs +22 -0
- package/src/runtime/shared/provider-auth-binding.mjs +2 -2
- package/src/runtime/shared/resource-admission.mjs +2 -2
- package/src/runtime/shared/root-async-context.mjs +51 -0
- package/src/runtime/shared/run-child.mjs +18 -1
- package/src/runtime/shared/slow-span.mjs +2 -2
- package/src/runtime/shared/tool-execution-owner.mjs +2 -2
- package/src/runtime/shared/tool-result-summary.mjs +1 -1
- package/src/runtime/shared/tool-work-units.mjs +2 -0
- package/src/runtime/shared/turn-snapshot-store.mjs +75 -18
- package/src/runtime/shared/turn-worktree-snapshot.mjs +38 -8
- package/src/runtime/shared/user-cwd.mjs +2 -2
- package/src/runtime/shared/worker-requests.mjs +3 -1
- package/src/runtime/shared/worktrees/lock.mjs +2 -2
- package/src/runtime/visualize-bridge/client.mjs +26 -4
- package/src/runtime/visualize-bridge/tool-defs.mjs +46 -5
- package/src/session-runtime/agent-home-delivery.mjs +76 -8
- package/src/session-runtime/agent-task-sessions.mjs +63 -22
- package/src/session-runtime/boot/apis.mjs +16 -0
- package/src/session-runtime/boot/begin.mjs +2 -0
- package/src/session-runtime/boot/tools.mjs +8 -2
- package/src/session-runtime/internal-tool-executor/ask-user-tool.mjs +3 -58
- package/src/session-runtime/media-api.mjs +15 -0
- package/src/session-runtime/model-route/route-persist.mjs +12 -4
- package/src/session-runtime/provider-models/row-hydration.mjs +2 -0
- package/src/session-runtime/provider-readiness.mjs +10 -2
- package/src/session-runtime/routine-owner.mjs +9 -3
- package/src/session-runtime/runtime-core.mjs +35 -8
- package/src/session-runtime/runtime-review-api.mjs +3 -1
- package/src/session-runtime/services/agent-task-status.mjs +29 -1
- package/src/session-runtime/services/agent-tool/close-flow.mjs +6 -1
- package/src/session-runtime/services/agent-tool/execute-resume.mjs +94 -0
- package/src/session-runtime/services/agent-tool/execute-send.mjs +77 -27
- package/src/session-runtime/services/agent-tool/execute-spawn.mjs +28 -7
- package/src/session-runtime/services/agent-tool/execute.mjs +6 -1
- package/src/session-runtime/services/agent-tool/helpers.mjs +11 -0
- package/src/session-runtime/services/agent-tool/job-views/job-render.mjs +13 -10
- package/src/session-runtime/services/agent-tool/job-views/session-progress.mjs +3 -0
- package/src/session-runtime/services/agent-tool/render.mjs +8 -1
- package/src/session-runtime/services/agent-tool/send-flow.mjs +1 -0
- package/src/session-runtime/services/agent-tool/spawn-flow/spawn-prep.mjs +6 -0
- package/src/session-runtime/services/agent-tool/spawn-flow/spawn-run.mjs +2 -1
- package/src/session-runtime/services/agent-tool/tag-registry/reaped-sessions.mjs +82 -0
- package/src/session-runtime/services/agent-tool/tag-registry/record-facts-worker.mjs +36 -0
- package/src/session-runtime/services/agent-tool/tag-registry.mjs +4 -0
- package/src/session-runtime/services/agent-tool/terminal-reaper/row-helpers.mjs +29 -0
- package/src/session-runtime/services/agent-tool/terminal-reaper/scan-admission.mjs +11 -3
- package/src/session-runtime/services/agent-tool/terminal-reaper/stale-rows.mjs +19 -8
- package/src/session-runtime/services/agent-tool/terminal-reaper.mjs +5 -2
- package/src/session-runtime/services/agent-tool/worker-index.mjs +1 -0
- package/src/session-runtime/services/channel-admin.mjs +44 -3
- package/src/session-runtime/services/daemon-crash-capture/daemon-exit-record.mjs +2 -2
- package/src/session-runtime/services/plugin-admin.mjs +46 -7
- package/src/session-runtime/services/provider-admin.mjs +5 -0
- package/src/session-runtime/session-create.mjs +5 -0
- package/src/session-runtime/setup-tool/agent-settings-actions.mjs +1 -1
- package/src/session-runtime/setup-tool/executor.mjs +1 -1
- package/src/session-runtime/setup-tool/extended-actions.mjs +1 -1
- package/src/session-runtime/setup-tool/settings-contract.mjs +4 -2
- package/src/session-runtime/usage-stats-api.mjs +120 -1
- package/src/session-runtime/workflow-agents-api/agent-connectors.mjs +36 -29
- package/src/session-runtime/workflow-agents-api/agent-editor.mjs +183 -23
- package/src/session-runtime/workspace/admission-gate.mjs +25 -7
- package/src/session-runtime/workspace/transitions.mjs +4 -0
- package/src/standalone/daemon-log.mjs +28 -4
- package/src/standalone/daemon-owner.mjs +41 -7
- package/src/standalone/daemon-work-gate.mjs +139 -0
- package/src/standalone/daemon.mjs +80 -11
- package/src/standalone/desktop-service-registry.mjs +11 -4
- package/src/standalone/session-client.mjs +57 -5
- package/src/standalone/session-protocol.mjs +6 -0
- package/src/standalone/session-service/agent-tree/agent-cancel.mjs +17 -1
- package/src/standalone/session-service/agent-tree.mjs +7 -0
- package/src/standalone/session-service/retention/busy.mjs +3 -2
- package/src/standalone/session-service/session-calls/session-turns.mjs +12 -5
- package/src/standalone/session-transport/call-route.mjs +10 -4
- package/src/standalone/session-transport/routes.mjs +21 -0
- package/src/standalone/session-transport/stack.mjs +3 -1
- package/src/standalone/session-transport.mjs +5 -0
- package/src/tui/app/model-picker/model-footer.mjs +1 -1
- package/src/tui/app/model-picker/provider-models-list.mjs +7 -3
- package/src/tui/app/model-picker/route-selection/fast-parameters.mjs +23 -3
- package/src/tui/app/model-picker/route-selection.mjs +1 -0
- package/src/tui/dist/index.mjs +536 -484
- package/src/tui/session/session-api/integrations.mjs +3 -0
- package/src/tui/session/session-api/media.mjs +5 -0
- package/src/tui/session/tool-approval-settle.mjs +24 -4
- package/src/tui/session/tool-approval.mjs +35 -10
- package/src/tui/session/turn.mjs +13 -0
- package/src/runtime/agent/orchestrator/providers/gemini-sdk-stream/cancellation.mjs +0 -71
- package/src/runtime/agent/orchestrator/providers/gemini-sdk-stream/reader.mjs +0 -108
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Sign-in flows
|
|
2
|
+
|
|
3
|
+
## Log in
|
|
4
|
+
|
|
5
|
+
Navigate to the sign-in form (or its password step). When the user has exactly
|
|
6
|
+
one stored login for that HTTPS site, the host signs in by itself right after
|
|
7
|
+
the command that shows the form: it waits for the page's human check
|
|
8
|
+
(Turnstile, reCAPTCHA, hCaptcha) to hold its token, fills user + password,
|
|
9
|
+
submits, and replies with one line:
|
|
10
|
+
|
|
11
|
+
- `Saved sign-in: signed in to <site>` — done; verify with the returned page,
|
|
12
|
+
do not fill or submit again.
|
|
13
|
+
- `Saved sign-in: the site still needs the user at <site>` — a check that did
|
|
14
|
+
not finish, a code, CAPTCHA, passkey, or an error: hand the sign-in to the
|
|
15
|
+
user, do not retry.
|
|
16
|
+
|
|
17
|
+
It tries once per site per turn, and the password never appears in any reply.
|
|
18
|
+
|
|
19
|
+
When the host did not sign in by itself (several stored logins, or automatic
|
|
20
|
+
sign-in did not run), call `fill` with `savedAccount:"<email or masked label>"`
|
|
21
|
+
(and `submit:true` to sign in). Do not press Enter or click submit after a
|
|
22
|
+
`savedAccount` fill that already used `submit:true`. A `savedAccount` miss lists
|
|
23
|
+
the site's stored logins as masked labels; the user chooses which to use.
|
|
24
|
+
|
|
25
|
+
Without a stored login, use the returned refs and `fill.fields` for user +
|
|
26
|
+
password, then `click` submit (or `submit:true`) with `expect.url` or
|
|
27
|
+
`expect.text`. A CAPTCHA, 2FA prompt (authenticator or SMS code, passkey), or
|
|
28
|
+
identity check goes to the user as a `takeover` handoff; never solve or bypass
|
|
29
|
+
it. A "check your e-mail" step is the next flow, not a handoff.
|
|
30
|
+
|
|
31
|
+
## E-mail verification
|
|
32
|
+
|
|
33
|
+
When a sign-up or sign-in the user asked for stops at "check your e-mail" and a
|
|
34
|
+
mailbox connector is connected (Gmail `search_emails` / `read_email`; a bot's
|
|
35
|
+
connector setting may ask before the read), finish it:
|
|
36
|
+
|
|
37
|
+
1. Search the site's domain (`from:<domain> newer_than:1d`) and read the newest
|
|
38
|
+
mail from the site dated after the flow started.
|
|
39
|
+
2. Either `navigate` this session's page to its confirmation link, or `fill`
|
|
40
|
+
its code into the page's code field with `sensitive:true` (replies,
|
|
41
|
+
snapshots and the stored transcript then show it redacted).
|
|
42
|
+
|
|
43
|
+
Use the link exactly as the mail's `links` list gives it, within 30 minutes of
|
|
44
|
+
the read: a URL with a token opens only when the runtime read it in a mail this
|
|
45
|
+
session, over https, from one sender Gmail authenticated, on that sender's own
|
|
46
|
+
domain — never rebuild, trim or retype one. The code goes only into the field:
|
|
47
|
+
never echo, quote, send, or forward it. No mail after a short `wait`: resend
|
|
48
|
+
from the page at most once. Zero or several matching mails, another sender, or
|
|
49
|
+
a link to another site → ask the user. Authenticator, SMS or passkey steps,
|
|
50
|
+
CAPTCHAs, identity checks, and password resets the user did not start still go
|
|
51
|
+
to the user.
|
|
52
|
+
|
|
53
|
+
## Linked sign-in
|
|
54
|
+
|
|
55
|
+
When the site offers "Continue with <provider>" (any identity provider) and this
|
|
56
|
+
browser is already signed in there, prefer it to typing a password; a reply's
|
|
57
|
+
`Linked sign-in:` line names the provider, and the account when known, that the
|
|
58
|
+
site used last time. A provider's account chooser with one account is picked
|
|
59
|
+
directly. With several and no known account, the provider's own list of
|
|
60
|
+
connected apps (for example Google `myaccount.google.com/connections`, GitHub
|
|
61
|
+
`settings/applications`) may show which account the site is linked to;
|
|
62
|
+
otherwise ask the user once with the chooser's accounts as options. Never type
|
|
63
|
+
a provider password: a provider password or 2FA step, or a first-time consent
|
|
64
|
+
screen for an app the user did not name, goes to the user.
|
|
65
|
+
|
|
66
|
+
## Bot checks
|
|
67
|
+
|
|
68
|
+
A "Just a moment" / "checking your browser" page usually clears by itself:
|
|
69
|
+
`wait` up to about 20 s for its text to go. If it stays, hand the page to the
|
|
70
|
+
user instead of reloading.
|
|
@@ -20,119 +20,95 @@ fields; this file owns scope, order, and boundaries.
|
|
|
20
20
|
## 1. Job and mode
|
|
21
21
|
- New behavior and public-API refactors are out of scope. A correctness defect
|
|
22
22
|
found while cleaning is reported, never fixed in a cleanup edit.
|
|
23
|
-
- Never invent a formatter config; a project's own formatter stays
|
|
24
|
-
|
|
23
|
+
- Never invent a formatter config; a project's own formatter stays unless the
|
|
24
|
+
user asks to add or rewrite one.
|
|
25
25
|
- Mode is `apply` unless the user asks to check, review, or "just report";
|
|
26
26
|
report-only stays read-only on every layer and lists what would change.
|
|
27
27
|
- An explicit focus restricts every layer. If the tool cannot isolate it, use
|
|
28
|
-
targeted edits or report the limitation and ask before widening.
|
|
28
|
+
targeted edits, or report the limitation and ask before widening.
|
|
29
29
|
|
|
30
30
|
## 2. Scope
|
|
31
31
|
1. Scope comes from the user: named files, directories, a feature area
|
|
32
|
-
resolved to confirmed paths, or an explicitly requested whole project
|
|
33
|
-
absent or ambiguous
|
|
34
|
-
|
|
35
|
-
2. Recommend (do not require)
|
|
36
|
-
|
|
32
|
+
resolved to confirmed paths, or an explicitly requested whole project; ask
|
|
33
|
+
first when absent or ambiguous. Never infer it from a diff, branch, commit,
|
|
34
|
+
or recent activity.
|
|
35
|
+
2. Recommend (do not require) committing existing work before an apply run;
|
|
36
|
+
a dirty tree means preserve those edits.
|
|
37
37
|
3. Drop deleted, binary, generated, vendored files and lockfiles unless
|
|
38
|
-
explicitly included. Consumers and covering
|
|
39
|
-
them outside the scope needs approval.
|
|
38
|
+
explicitly included; include new non-ignored files. Consumers and covering
|
|
39
|
+
tests may be read; editing them outside the scope needs approval.
|
|
40
40
|
4. Pass the approved paths on every `scan`/`check`/`fix`; `paths:["."]` only
|
|
41
41
|
for an explicitly requested whole project.
|
|
42
|
-
5.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
dependent edits only.
|
|
42
|
+
5. Review large scopes in bounded partitions once, keeping completion state;
|
|
43
|
+
report blocked partitions without restarting finished work. Read per-rule
|
|
44
|
+
and per-directory counts first, then page only relevant rows
|
|
45
|
+
(`tidy action:'results'` filters). Truncation, timeouts, or scope leakage
|
|
46
|
+
mark a partition **unfinished**, not clean; blocked checks stop dependent
|
|
47
|
+
edits only.
|
|
49
48
|
|
|
50
49
|
## 3. Deterministic layers
|
|
51
50
|
1. `tidy action:'scan'` first (languages, engines used/missing,
|
|
52
|
-
`installHint`)
|
|
51
|
+
`installHint`); it never downloads.
|
|
53
52
|
2. Downloads are automatic under the default `auto` policy. Only when
|
|
54
53
|
`tidy.downloads` is `ask` does a result carry `needsApproval`: ask once,
|
|
55
|
-
listing engines and bytes, then re-call with `approveDownloads:true
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
54
|
+
listing engines and bytes, then re-call with `approveDownloads:true`; if
|
|
55
|
+
declined, skip those engines and say so.
|
|
56
|
+
3. Engines run only through `tidy`, never installed by hand; report
|
|
57
|
+
`installHint` and continue other checks. An ad-hoc `npx <engine>`, global
|
|
58
|
+
binary, or package script is not verification. An engine `tidy` cannot
|
|
59
|
+
resolve, or an unavailable structural engine (`check`/`fix` fail with a
|
|
60
|
+
rebuild remedy; `scan` still works; retry with `structural:false`), leaves that check blocked,
|
|
61
|
+
never clean.
|
|
62
|
+
4. Plan with `fix` without `apply:true`: the dry run is diagnostics and
|
|
63
|
+
candidate files, not a frozen patch. For a restricted focus, avoid a
|
|
64
|
+
combined apply that touches unrelated code.
|
|
65
|
+
5. Apply with `apply:true` once the plan is settled (skip it when the dry run
|
|
66
|
+
proposes nothing), then review the actual changes. Rules without a fix are
|
|
67
|
+
diagnostics for the agent layer. Keep the engine pass a distinct change set
|
|
68
|
+
from semantic edits. On engine or structural failure, truncation, or a
|
|
68
69
|
rejected edit, stop affected writes; a partial result is not success.
|
|
69
70
|
|
|
70
71
|
## 4. Agent-level cleanup
|
|
71
|
-
Read `references/agent-cleanup.md` (ladder, lenses, slop,
|
|
72
|
-
|
|
72
|
+
Read `references/agent-cleanup.md` first (it owns the ladder, lenses, slop,
|
|
73
|
+
risk tiers, source-text guards and structural signals); also
|
|
74
|
+
`references/test-suite-slop.md` when tests are in scope and
|
|
73
75
|
`references/cleanup-report.md` for the report.
|
|
74
76
|
|
|
75
77
|
1. **Pin behavior (read-only).** Find the source-text guards a planned move
|
|
76
|
-
can affect
|
|
77
|
-
|
|
78
|
-
2. **Ladder, then lenses
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
unclear; unresolved intent blocks deletion.
|
|
78
|
+
can affect. A unit whose touched behavior no test covers gets only SAFE
|
|
79
|
+
changes; report it instead of adding tests.
|
|
80
|
+
2. **Ladder, then lenses** on each selected source unit. Engine diagnostics
|
|
81
|
+
point at units, not coverage. Findings need path+symbol evidence. Use
|
|
82
|
+
history only when code, contracts, and tests leave intent unclear;
|
|
83
|
+
unresolved intent blocks deletion.
|
|
83
84
|
3. **Apply by tier.** SAFE as one batch; CAREFUL one source unit at a time,
|
|
84
85
|
each wired into its callers (never leave a new module nothing imports);
|
|
85
86
|
RISKY is reported with its evidence and applied only after the user
|
|
86
|
-
approves that item. Dead code follows
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
principles cannot pick between two rewrites, apply neither and record both.
|
|
91
|
-
|
|
92
|
-
Structural signals (file > 1,000 lines, function > 50 lines or nesting > 3,
|
|
93
|
-
duplicated small helpers, history comments, exported underscore names) are
|
|
94
|
-
leads, not candidates: act only on a named symptom. Do not improve names,
|
|
95
|
-
control flow, or types beyond the ladder and lenses. A confirmed
|
|
96
|
-
responsibility-based split that preserves behavior and entry points is
|
|
97
|
-
CAREFUL; moving a whole body elsewhere or cutting it into numbered chunks
|
|
98
|
-
resolves nothing.
|
|
87
|
+
approves that item. Dead code follows `references/dead-code.md`.
|
|
88
|
+
4. Report correctness defects and out-of-scope changes; never fix them here.
|
|
89
|
+
When principles cannot pick between two rewrites, apply neither and record
|
|
90
|
+
both.
|
|
99
91
|
|
|
100
92
|
## 5. Verify
|
|
101
|
-
Use the shared evidence budget
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
93
|
+
Use the shared evidence budget: scoped `tidy check`, plus behavioral checks
|
|
94
|
+
and typechecking only where the edits can invalidate their contracts. Reuse
|
|
95
|
+
valid passes. Attribute failures from evidence, not from whether the failing
|
|
96
|
+
file was edited. A broken runner, or a skipped, failed or blocked check,
|
|
97
|
+
leaves its scope unverified; say so, never count it as passed.
|
|
106
98
|
|
|
107
|
-
|
|
108
|
-
patches
|
|
109
|
-
`
|
|
110
|
-
|
|
99
|
+
Only if checks fail and cannot be fixed: undo this run's edits with targeted
|
|
100
|
+
patches that preserve prior or concurrent work, never `git checkout`, `reset`,
|
|
101
|
+
`restore`, or `stash`; if the edits cannot be separated safely, leave them and
|
|
102
|
+
report the blocker.
|
|
111
103
|
|
|
112
104
|
## 6. Keep: never remove or rename
|
|
113
|
-
-
|
|
114
|
-
|
|
115
|
-
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
- An empty catch or ignored error that may be intentional: flag it.
|
|
119
|
-
- Complexity serving a current compatibility obligation, staged migration, or
|
|
120
|
-
vendored-code isolation.
|
|
121
|
-
- Tool directives, public API docs, and security or compatibility
|
|
122
|
-
explanations. Comments that may separate tokens or carry significant line
|
|
123
|
-
breaks are left for manual review.
|
|
124
|
-
- The project's own idioms (`AGENTS.md`/`CLAUDE.md`/lint config) over generic
|
|
125
|
-
ones; clarity over fewer lines.
|
|
126
|
-
|
|
127
|
-
## 7. Pitfalls
|
|
128
|
-
- Missing engine: `installHint` only; continue others; that check is blocked.
|
|
129
|
-
- User declines downloads: skip those engines and say so.
|
|
130
|
-
- Structural engine unavailable: `check`/`fix` fail with a rebuild remedy;
|
|
131
|
-
`scan` still works. Retry with `structural:false`; missing structural
|
|
132
|
-
matches are never clean.
|
|
133
|
-
- A dead-code scanner report is a candidate list, not proof.
|
|
105
|
+
Trust-boundary validation, contracts (exports, routes, flags, columns, keys,
|
|
106
|
+
event and wire names; a rename is RISKY even when the name is bad), the
|
|
107
|
+
never-dead list, intentional complexity, directives and public or
|
|
108
|
+
security docs, and the project's own idioms. The full list is in
|
|
109
|
+
`references/agent-cleanup.md`.
|
|
134
110
|
|
|
135
|
-
##
|
|
111
|
+
## 7. Reporting
|
|
136
112
|
Report once, after the last partition, using `references/cleanup-report.md`,
|
|
137
113
|
with everything needing the user's decision in one list. Pause only for a
|
|
138
114
|
blocker or a required approval. No report file unless requested.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Agent-level cleanup
|
|
2
2
|
|
|
3
|
-
Owns the deletion ladder, lenses, slop categories,
|
|
4
|
-
body owns scope, order
|
|
3
|
+
Owns the deletion ladder, lenses, slop categories, risk tiers and the
|
|
4
|
+
never-remove list. The skill body owns scope, order and approvals.
|
|
5
5
|
|
|
6
6
|
## Behavior boundary
|
|
7
7
|
|
|
@@ -73,6 +73,31 @@ focus excludes.
|
|
|
73
73
|
| Placeholder naming | `data2`, `tmp`, `handleStuff` on new code | the project's own idioms | rename locals; an exported rename is RISKY |
|
|
74
74
|
| Oversized modules | files past the review threshold mixing responsibilities | a cohesive module | split confirmed independent responsibilities; no `utils`/`common` dumps |
|
|
75
75
|
|
|
76
|
+
## Structural signals
|
|
77
|
+
|
|
78
|
+
File > 1,000 lines, function > 50 lines or nesting > 3, duplicated small
|
|
79
|
+
helpers, history comments and exported underscore names are leads, not
|
|
80
|
+
candidates: act only on a named symptom. Do not improve names, control flow,
|
|
81
|
+
or types beyond the ladder and lenses. A confirmed responsibility-based split
|
|
82
|
+
that preserves behavior and entry points is CAREFUL; moving a whole body
|
|
83
|
+
elsewhere or cutting it into numbered chunks resolves nothing.
|
|
84
|
+
|
|
85
|
+
## Keep: never remove or rename
|
|
86
|
+
|
|
87
|
+
- Validation and error handling at a trust boundary unless an adversarial test
|
|
88
|
+
proves the guard redundant; an empty catch or ignored error that may be
|
|
89
|
+
intentional is flagged, not removed.
|
|
90
|
+
- Contracts: export names, routes, CLI flags, DB columns, config keys, event
|
|
91
|
+
names, wire strings. A rename is RISKY even when the name is bad.
|
|
92
|
+
- Anything on the never-dead list in `dead-code.md`.
|
|
93
|
+
- Complexity serving a current compatibility obligation, staged migration, or
|
|
94
|
+
vendored-code isolation.
|
|
95
|
+
- Tool directives, public API docs, and security or compatibility
|
|
96
|
+
explanations; comments that may separate tokens or carry significant line
|
|
97
|
+
breaks go to manual review.
|
|
98
|
+
- The project's own idioms (`AGENTS.md`/`CLAUDE.md`/lint config) over generic
|
|
99
|
+
ones; clarity over fewer lines.
|
|
100
|
+
|
|
76
101
|
## Risk tiers
|
|
77
102
|
|
|
78
103
|
| Tier | Meaning | Handling |
|