@diffra-ai/cli 0.1.1 → 0.1.2
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 +47 -15
- package/dist/bundle/chunks/{anthropic-messages-M3HXJPTI.js → anthropic-messages-HME6WDIM.js} +1 -1
- package/dist/bundle/chunks/{azure-openai-responses-GIFO2563.js → azure-openai-responses-WKSFBZF5.js} +1 -1
- package/dist/bundle/chunks/bedrock-converse-stream.js +1 -1
- package/dist/bundle/chunks/{chunk-GT3WTHFU.js → chunk-3MKQN3ZR.js} +1 -1
- package/dist/bundle/chunks/{chunk-VJQ6ZYW4.js → chunk-4NMBWIZG.js} +5 -5
- package/dist/bundle/chunks/{chunk-INTHKDF2.js → chunk-65DC2T66.js} +1 -1
- package/dist/bundle/chunks/{chunk-N6QWAQ6I.js → chunk-6L2FT6AE.js} +1 -1
- package/dist/bundle/chunks/chunk-6ZD23B2R.js +2 -0
- package/dist/bundle/chunks/{chunk-OQFRYL4U.js → chunk-E3MJ4MPN.js} +1 -1
- package/dist/bundle/chunks/chunk-GRDBYTYT.js +2003 -0
- package/dist/bundle/chunks/{chunk-RJRIMI6M.js → chunk-GRYHVZSI.js} +1 -1
- package/dist/bundle/chunks/{chunk-CCH74R6M.js → chunk-MITPYV3F.js} +1 -1
- package/dist/bundle/chunks/{chunk-WEJVQTLI.js → chunk-MJRIJM22.js} +1 -1
- package/dist/bundle/chunks/{chunk-OOE7BGUD.js → chunk-PQGGR7SQ.js} +1 -1
- package/dist/bundle/chunks/{chunk-WAH3PGZX.js → chunk-PXE534VH.js} +2 -2
- package/dist/bundle/chunks/{chunk-262RLABF.js → chunk-QMZGTPRI.js} +1 -1
- package/dist/bundle/chunks/{chunk-VSFRR6IC.js → chunk-QQ6NVGNW.js} +1 -1
- package/dist/bundle/chunks/{chunk-N6Q2WLPG.js → chunk-RUI3NOFB.js} +1 -1
- package/dist/bundle/chunks/{chunk-6S2AQWGR.js → chunk-SI7T4LPD.js} +4 -4
- package/dist/bundle/chunks/{chunk-CVEPACZO.js → chunk-SMYD2SB5.js} +1 -1
- package/dist/bundle/chunks/{chunk-B3FUE2LF.js → chunk-XAA355T2.js} +1 -1
- package/dist/bundle/chunks/{cli-EC3ZETTA.js → cli-GKHAGQO6.js} +1 -1
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-YW7YYPAC.js → cloudflare-workers-ai-system-one-PVUECIVD.js} +1 -1
- package/dist/bundle/chunks/{easter-egg-3d-QN5RJMZR.js → easter-egg-3d-VAZ2JWDP.js} +1 -1
- package/dist/bundle/chunks/{execute-3J63CQJG.js → execute-OEFRHFHI.js} +1 -1
- package/dist/bundle/chunks/{google-generative-ai-F6DN2LQU.js → google-generative-ai-2YH7DK5J.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-MDWFDVAW.js → google-vertex-QNIS4SPE.js} +1 -1
- package/dist/bundle/chunks/{llama-cpp-classify-XO72TVVH.js → llama-cpp-classify-EMBT3ZMY.js} +1 -1
- package/dist/bundle/chunks/{mistral-conversations-KYVGR5VN.js → mistral-conversations-RCHJWX2M.js} +1 -1
- package/dist/bundle/chunks/{openai-codex-responses-SIQN5LUE.js → openai-codex-responses-LBZQ7HUY.js} +1 -1
- package/dist/bundle/chunks/{openai-completions-B22DYT4F.js → openai-completions-U7NS5GFY.js} +1 -1
- package/dist/bundle/chunks/{openai-decisions-4GVNTR54.js → openai-decisions-YC4ZEGAR.js} +1 -1
- package/dist/bundle/chunks/{openai-responses-5DVNSQCE.js → openai-responses-4YX6XMEO.js} +1 -1
- package/dist/bundle/chunks/{openrouter-images-SQMQNKJU.js → openrouter-images-QPPGKFJY.js} +1 -1
- package/dist/bundle/chunks/{pi-messages-GZ4HZRKJ.js → pi-messages-5W3GZ7B6.js} +1 -1
- package/dist/bundle/chunks/{runtime-KEVIZBAR.js → runtime-SI4R3AXJ.js} +1 -1
- package/dist/bundle/chunks/{typesafe-system-one-GMPGMPLA.js → typesafe-system-one-GWMQ2NLX.js} +1 -1
- package/dist/bundle/chunks/virtual-modules-ENTYMDSQ.js +2 -0
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +13 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/sandbox-command.d.ts +8 -0
- package/dist/cli/sandbox-command.d.ts.map +1 -0
- package/dist/cli/sandbox-command.js +52 -0
- package/dist/cli/sandbox-command.js.map +1 -0
- package/dist/config.d.ts +7 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +14 -0
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts +20 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +72 -2
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/approval-mode.d.ts +28 -0
- package/dist/core/approval-mode.d.ts.map +1 -0
- package/dist/core/approval-mode.js +34 -0
- package/dist/core/approval-mode.js.map +1 -0
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +15 -0
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +3 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +28 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/fast-model.d.ts +10 -0
- package/dist/core/fast-model.d.ts.map +1 -0
- package/dist/core/fast-model.js +13 -0
- package/dist/core/fast-model.js.map +1 -0
- package/dist/core/keybindings.d.ts +8 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +4 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/sandbox/escalation.d.ts +32 -0
- package/dist/core/sandbox/escalation.d.ts.map +1 -0
- package/dist/core/sandbox/escalation.js +70 -0
- package/dist/core/sandbox/escalation.js.map +1 -0
- package/dist/core/sandbox/launch.d.ts +14 -0
- package/dist/core/sandbox/launch.d.ts.map +1 -0
- package/dist/core/sandbox/launch.js +18 -0
- package/dist/core/sandbox/launch.js.map +1 -0
- package/dist/core/sandbox/policy.d.ts +50 -0
- package/dist/core/sandbox/policy.d.ts.map +1 -0
- package/dist/core/sandbox/policy.js +96 -0
- package/dist/core/sandbox/policy.js.map +1 -0
- package/dist/core/sandbox/seatbelt.d.ts +17 -0
- package/dist/core/sandbox/seatbelt.d.ts.map +1 -0
- package/dist/core/sandbox/seatbelt.js +169 -0
- package/dist/core/sandbox/seatbelt.js.map +1 -0
- package/dist/core/sandbox/windows.d.ts +30 -0
- package/dist/core/sandbox/windows.d.ts.map +1 -0
- package/dist/core/sandbox/windows.js +104 -0
- package/dist/core/sandbox/windows.js.map +1 -0
- package/dist/core/settings-defaults.d.ts +28 -0
- package/dist/core/settings-defaults.d.ts.map +1 -1
- package/dist/core/settings-defaults.js +28 -0
- package/dist/core/settings-defaults.js.map +1 -1
- package/dist/core/settings-manager.d.ts +9 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +58 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-schema.d.ts +124 -0
- package/dist/core/settings-schema.d.ts.map +1 -1
- package/dist/core/settings-schema.js +177 -0
- package/dist/core/settings-schema.js.map +1 -1
- package/dist/core/tools/bash.d.ts +12 -2
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +27 -7
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts +3 -0
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +2 -0
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/powershell.d.ts +3 -2
- package/dist/core/tools/powershell.d.ts.map +1 -1
- package/dist/core/tools/powershell.js +4 -6
- package/dist/core/tools/powershell.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +2 -2
- package/dist/core/tools/render-utils.js +5 -5
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/renderers/edit.d.ts.map +1 -1
- package/dist/core/tools/renderers/edit.js +16 -19
- package/dist/core/tools/renderers/edit.js.map +1 -1
- package/dist/core/tools/write.d.ts +3 -0
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +2 -0
- package/dist/core/tools/write.js.map +1 -1
- package/dist/extensions/agents/agent-tool.d.ts +61 -0
- package/dist/extensions/agents/agent-tool.d.ts.map +1 -0
- package/dist/extensions/agents/agent-tool.js +277 -0
- package/dist/extensions/agents/agent-tool.js.map +1 -0
- package/dist/extensions/agents/background.d.ts +56 -0
- package/dist/extensions/agents/background.d.ts.map +1 -0
- package/dist/extensions/agents/background.js +142 -0
- package/dist/extensions/agents/background.js.map +1 -0
- package/dist/extensions/agents/builtin-agents.d.ts +8 -0
- package/dist/extensions/agents/builtin-agents.d.ts.map +1 -0
- package/dist/extensions/agents/builtin-agents.js +38 -0
- package/dist/extensions/agents/builtin-agents.js.map +1 -0
- package/dist/extensions/agents/call-scopes.d.ts +34 -0
- package/dist/extensions/agents/call-scopes.d.ts.map +1 -0
- package/dist/extensions/agents/call-scopes.js +36 -0
- package/dist/extensions/agents/call-scopes.js.map +1 -0
- package/dist/extensions/agents/definitions.d.ts +64 -0
- package/dist/extensions/agents/definitions.d.ts.map +1 -0
- package/dist/extensions/agents/definitions.js +216 -0
- package/dist/extensions/agents/definitions.js.map +1 -0
- package/dist/extensions/agents/index.d.ts +15 -0
- package/dist/extensions/agents/index.d.ts.map +1 -0
- package/dist/extensions/agents/index.js +327 -0
- package/dist/extensions/agents/index.js.map +1 -0
- package/dist/extensions/agents/runner.d.ts +63 -0
- package/dist/extensions/agents/runner.d.ts.map +1 -0
- package/dist/extensions/agents/runner.js +156 -0
- package/dist/extensions/agents/runner.js.map +1 -0
- package/dist/extensions/approval/auto-classifier.d.ts +32 -0
- package/dist/extensions/approval/auto-classifier.d.ts.map +1 -0
- package/dist/extensions/approval/auto-classifier.js +116 -0
- package/dist/extensions/approval/auto-classifier.js.map +1 -0
- package/dist/extensions/approval/exit-plan-mode.d.ts +24 -0
- package/dist/extensions/approval/exit-plan-mode.d.ts.map +1 -0
- package/dist/extensions/approval/exit-plan-mode.js +99 -0
- package/dist/extensions/approval/exit-plan-mode.js.map +1 -0
- package/dist/extensions/approval/index.d.ts +15 -0
- package/dist/extensions/approval/index.d.ts.map +1 -0
- package/dist/extensions/approval/index.js +329 -0
- package/dist/extensions/approval/index.js.map +1 -0
- package/dist/extensions/approval/plan-reminders.d.ts +9 -0
- package/dist/extensions/approval/plan-reminders.d.ts.map +1 -0
- package/dist/extensions/approval/plan-reminders.js +42 -0
- package/dist/extensions/approval/plan-reminders.js.map +1 -0
- package/dist/extensions/approval/policy.d.ts +52 -0
- package/dist/extensions/approval/policy.d.ts.map +1 -0
- package/dist/extensions/approval/policy.js +124 -0
- package/dist/extensions/approval/policy.js.map +1 -0
- package/dist/extensions/approval/shell-safety.d.ts +11 -0
- package/dist/extensions/approval/shell-safety.d.ts.map +1 -0
- package/dist/extensions/approval/shell-safety.js +264 -0
- package/dist/extensions/approval/shell-safety.js.map +1 -0
- package/dist/extensions/cron/cron-expression.d.ts +30 -0
- package/dist/extensions/cron/cron-expression.d.ts.map +1 -0
- package/dist/extensions/cron/cron-expression.js +119 -0
- package/dist/extensions/cron/cron-expression.js.map +1 -0
- package/dist/extensions/cron/index.d.ts +19 -0
- package/dist/extensions/cron/index.d.ts.map +1 -0
- package/dist/extensions/cron/index.js +215 -0
- package/dist/extensions/cron/index.js.map +1 -0
- package/dist/extensions/cron/loop-args.d.ts +35 -0
- package/dist/extensions/cron/loop-args.d.ts.map +1 -0
- package/dist/extensions/cron/loop-args.js +95 -0
- package/dist/extensions/cron/loop-args.js.map +1 -0
- package/dist/extensions/cron/loop-texts.d.ts +29 -0
- package/dist/extensions/cron/loop-texts.d.ts.map +1 -0
- package/dist/extensions/cron/loop-texts.js +83 -0
- package/dist/extensions/cron/loop-texts.js.map +1 -0
- package/dist/extensions/cron/scheduler.d.ts +79 -0
- package/dist/extensions/cron/scheduler.d.ts.map +1 -0
- package/dist/extensions/cron/scheduler.js +146 -0
- package/dist/extensions/cron/scheduler.js.map +1 -0
- package/dist/extensions/cron/tools.d.ts +47 -0
- package/dist/extensions/cron/tools.d.ts.map +1 -0
- package/dist/extensions/cron/tools.js +141 -0
- package/dist/extensions/cron/tools.js.map +1 -0
- package/dist/extensions/goals/evidence.d.ts +20 -0
- package/dist/extensions/goals/evidence.d.ts.map +1 -0
- package/dist/extensions/goals/evidence.js +77 -0
- package/dist/extensions/goals/evidence.js.map +1 -0
- package/dist/extensions/goals/index.d.ts +45 -0
- package/dist/extensions/goals/index.d.ts.map +1 -0
- package/dist/extensions/goals/index.js +438 -0
- package/dist/extensions/goals/index.js.map +1 -0
- package/dist/extensions/goals/prompts.d.ts +15 -0
- package/dist/extensions/goals/prompts.d.ts.map +1 -0
- package/dist/extensions/goals/prompts.js +51 -0
- package/dist/extensions/goals/prompts.js.map +1 -0
- package/dist/extensions/goals/state.d.ts +88 -0
- package/dist/extensions/goals/state.d.ts.map +1 -0
- package/dist/extensions/goals/state.js +204 -0
- package/dist/extensions/goals/state.js.map +1 -0
- package/dist/extensions/goals/tools.d.ts +40 -0
- package/dist/extensions/goals/tools.d.ts.map +1 -0
- package/dist/extensions/goals/tools.js +118 -0
- package/dist/extensions/goals/tools.js.map +1 -0
- package/dist/extensions/goals/verifier.d.ts +30 -0
- package/dist/extensions/goals/verifier.d.ts.map +1 -0
- package/dist/extensions/goals/verifier.js +89 -0
- package/dist/extensions/goals/verifier.js.map +1 -0
- package/dist/extensions/hooks/aggregate.d.ts +30 -0
- package/dist/extensions/hooks/aggregate.d.ts.map +1 -0
- package/dist/extensions/hooks/aggregate.js +103 -0
- package/dist/extensions/hooks/aggregate.js.map +1 -0
- package/dist/extensions/hooks/config.d.ts +47 -0
- package/dist/extensions/hooks/config.d.ts.map +1 -0
- package/dist/extensions/hooks/config.js +169 -0
- package/dist/extensions/hooks/config.js.map +1 -0
- package/dist/extensions/hooks/file-watcher.d.ts +31 -0
- package/dist/extensions/hooks/file-watcher.d.ts.map +1 -0
- package/dist/extensions/hooks/file-watcher.js +106 -0
- package/dist/extensions/hooks/file-watcher.js.map +1 -0
- package/dist/extensions/hooks/index.d.ts +17 -0
- package/dist/extensions/hooks/index.d.ts.map +1 -0
- package/dist/extensions/hooks/index.js +349 -0
- package/dist/extensions/hooks/index.js.map +1 -0
- package/dist/extensions/hooks/matcher.d.ts +10 -0
- package/dist/extensions/hooks/matcher.d.ts.map +1 -0
- package/dist/extensions/hooks/matcher.js +85 -0
- package/dist/extensions/hooks/matcher.js.map +1 -0
- package/dist/extensions/hooks/runner.d.ts +54 -0
- package/dist/extensions/hooks/runner.d.ts.map +1 -0
- package/dist/extensions/hooks/runner.js +197 -0
- package/dist/extensions/hooks/runner.js.map +1 -0
- package/dist/extensions/index.d.ts.map +1 -1
- package/dist/extensions/index.js +29 -2
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/lsp/config.d.ts +40 -0
- package/dist/extensions/lsp/config.d.ts.map +1 -0
- package/dist/extensions/lsp/config.js +92 -0
- package/dist/extensions/lsp/config.js.map +1 -0
- package/dist/extensions/lsp/connection.d.ts +32 -0
- package/dist/extensions/lsp/connection.d.ts.map +1 -0
- package/dist/extensions/lsp/connection.js +124 -0
- package/dist/extensions/lsp/connection.js.map +1 -0
- package/dist/extensions/lsp/index.d.ts +15 -0
- package/dist/extensions/lsp/index.d.ts.map +1 -0
- package/dist/extensions/lsp/index.js +103 -0
- package/dist/extensions/lsp/index.js.map +1 -0
- package/dist/extensions/lsp/server.d.ts +68 -0
- package/dist/extensions/lsp/server.d.ts.map +1 -0
- package/dist/extensions/lsp/server.js +373 -0
- package/dist/extensions/lsp/server.js.map +1 -0
- package/dist/extensions/lsp/tool.d.ts +43 -0
- package/dist/extensions/lsp/tool.d.ts.map +1 -0
- package/dist/extensions/lsp/tool.js +534 -0
- package/dist/extensions/lsp/tool.js.map +1 -0
- package/dist/extensions/memory/index.d.ts +15 -0
- package/dist/extensions/memory/index.d.ts.map +1 -0
- package/dist/extensions/memory/index.js +336 -0
- package/dist/extensions/memory/index.js.map +1 -0
- package/dist/extensions/memory/memory-agent.d.ts +29 -0
- package/dist/extensions/memory/memory-agent.d.ts.map +1 -0
- package/dist/extensions/memory/memory-agent.js +102 -0
- package/dist/extensions/memory/memory-agent.js.map +1 -0
- package/dist/extensions/memory/prompts.d.ts +18 -0
- package/dist/extensions/memory/prompts.d.ts.map +1 -0
- package/dist/extensions/memory/prompts.js +124 -0
- package/dist/extensions/memory/prompts.js.map +1 -0
- package/dist/extensions/memory/recall.d.ts +14 -0
- package/dist/extensions/memory/recall.d.ts.map +1 -0
- package/dist/extensions/memory/recall.js +80 -0
- package/dist/extensions/memory/recall.js.map +1 -0
- package/dist/extensions/memory/store.d.ts +48 -0
- package/dist/extensions/memory/store.d.ts.map +1 -0
- package/dist/extensions/memory/store.js +132 -0
- package/dist/extensions/memory/store.js.map +1 -0
- package/dist/extensions/skills/bundled/batch/SKILL.md +74 -0
- package/dist/extensions/skills/bundled/review/SKILL.md +93 -0
- package/dist/extensions/skills/index.d.ts +15 -0
- package/dist/extensions/skills/index.d.ts.map +1 -0
- package/dist/extensions/skills/index.js +68 -0
- package/dist/extensions/skills/index.js.map +1 -0
- package/dist/extensions/skills/learn.d.ts +9 -0
- package/dist/extensions/skills/learn.d.ts.map +1 -0
- package/dist/extensions/skills/learn.js +46 -0
- package/dist/extensions/skills/learn.js.map +1 -0
- package/dist/extensions/todo/index.d.ts +14 -0
- package/dist/extensions/todo/index.d.ts.map +1 -0
- package/dist/extensions/todo/index.js +55 -0
- package/dist/extensions/todo/index.js.map +1 -0
- package/dist/extensions/todo/todos.d.ts +64 -0
- package/dist/extensions/todo/todos.d.ts.map +1 -0
- package/dist/extensions/todo/todos.js +145 -0
- package/dist/extensions/todo/todos.js.map +1 -0
- package/dist/extensions/todo/tool.d.ts +23 -0
- package/dist/extensions/todo/tool.d.ts.map +1 -0
- package/dist/extensions/todo/tool.js +104 -0
- package/dist/extensions/todo/tool.js.map +1 -0
- package/dist/extensions/web-fetch/fetch-tool.d.ts +27 -0
- package/dist/extensions/web-fetch/fetch-tool.d.ts.map +1 -0
- package/dist/extensions/web-fetch/fetch-tool.js +319 -0
- package/dist/extensions/web-fetch/fetch-tool.js.map +1 -0
- package/dist/extensions/web-fetch/html-to-markdown.d.ts +7 -0
- package/dist/extensions/web-fetch/html-to-markdown.d.ts.map +1 -0
- package/dist/extensions/web-fetch/html-to-markdown.js +21 -0
- package/dist/extensions/web-fetch/html-to-markdown.js.map +1 -0
- package/dist/extensions/web-fetch/index.d.ts +10 -0
- package/dist/extensions/web-fetch/index.d.ts.map +1 -0
- package/dist/extensions/web-fetch/index.js +13 -0
- package/dist/extensions/web-fetch/index.js.map +1 -0
- package/dist/extensions/web-fetch/page-fetch.d.ts +45 -0
- package/dist/extensions/web-fetch/page-fetch.d.ts.map +1 -0
- package/dist/extensions/web-fetch/page-fetch.js +117 -0
- package/dist/extensions/web-fetch/page-fetch.js.map +1 -0
- package/dist/extensions/web-fetch/pdf-text.d.ts +29 -0
- package/dist/extensions/web-fetch/pdf-text.d.ts.map +1 -0
- package/dist/extensions/web-fetch/pdf-text.js +71 -0
- package/dist/extensions/web-fetch/pdf-text.js.map +1 -0
- package/dist/extensions/web-fetch/preapproved-hosts.d.ts +7 -0
- package/dist/extensions/web-fetch/preapproved-hosts.d.ts.map +1 -0
- package/dist/extensions/web-fetch/preapproved-hosts.js +110 -0
- package/dist/extensions/web-fetch/preapproved-hosts.js.map +1 -0
- package/dist/extensions/web-search/dashscope-search.d.ts +29 -0
- package/dist/extensions/web-search/dashscope-search.d.ts.map +1 -0
- package/dist/extensions/web-search/dashscope-search.js +279 -0
- package/dist/extensions/web-search/dashscope-search.js.map +1 -0
- package/dist/extensions/web-search/index.d.ts +15 -0
- package/dist/extensions/web-search/index.d.ts.map +1 -0
- package/dist/extensions/web-search/index.js +51 -0
- package/dist/extensions/web-search/index.js.map +1 -0
- package/dist/extensions/web-search/search-config.d.ts +53 -0
- package/dist/extensions/web-search/search-config.d.ts.map +1 -0
- package/dist/extensions/web-search/search-config.js +174 -0
- package/dist/extensions/web-search/search-config.js.map +1 -0
- package/dist/extensions/web-search/search-tool.d.ts +29 -0
- package/dist/extensions/web-search/search-tool.d.ts.map +1 -0
- package/dist/extensions/web-search/search-tool.js +149 -0
- package/dist/extensions/web-search/search-tool.js.map +1 -0
- package/dist/extensions/worktree/git-worktree.d.ts +69 -0
- package/dist/extensions/worktree/git-worktree.d.ts.map +1 -0
- package/dist/extensions/worktree/git-worktree.js +199 -0
- package/dist/extensions/worktree/git-worktree.js.map +1 -0
- package/dist/extensions/worktree/index.d.ts +27 -0
- package/dist/extensions/worktree/index.d.ts.map +1 -0
- package/dist/extensions/worktree/index.js +188 -0
- package/dist/extensions/worktree/index.js.map +1 -0
- package/dist/extensions/worktree/startup.d.ts +17 -0
- package/dist/extensions/worktree/startup.d.ts.map +1 -0
- package/dist/extensions/worktree/startup.js +56 -0
- package/dist/extensions/worktree/startup.js.map +1 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +28 -4
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +18 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +87 -20
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/diffra-logo.d.ts +6 -0
- package/dist/modes/interactive/components/diffra-logo.d.ts.map +1 -1
- package/dist/modes/interactive/components/diffra-logo.js +30 -4
- package/dist/modes/interactive/components/diffra-logo.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts +1 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js +3 -3
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +16 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +84 -46
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +5 -2
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +152 -62
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tool-status.d.ts +5 -0
- package/dist/modes/interactive/components/tool-status.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-status.js +15 -0
- package/dist/modes/interactive/components/tool-status.js.map +1 -0
- package/dist/modes/interactive/components/user-message.d.ts +4 -8
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +38 -36
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +24 -8
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/dark.json +3 -2
- package/dist/modes/interactive/theme/light.json +3 -2
- package/dist/modes/interactive/theme/system-theme.d.ts +1 -0
- package/dist/modes/interactive/theme/system-theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/system-theme.js +41 -14
- package/dist/modes/interactive/theme/system-theme.js.map +1 -1
- package/dist/utils/shell.d.ts +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +12 -2
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/tools-manager.d.ts +5 -0
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +48 -0
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/approval-modes.md +99 -0
- package/docs/builtin-skills.md +53 -0
- package/docs/cli.md +380 -356
- package/docs/docs.json +264 -220
- package/docs/environment-variables.md +110 -103
- package/docs/extensions.md +24 -0
- package/docs/goals.md +84 -0
- package/docs/hooks.md +112 -0
- package/docs/keybindings.md +1 -0
- package/docs/lsp.md +71 -0
- package/docs/memory.md +71 -0
- package/docs/sandbox.md +108 -0
- package/docs/scheduled-tasks.md +84 -0
- package/docs/security.md +100 -99
- package/docs/settings.md +198 -173
- package/docs/shell-aliases.md +1 -1
- package/docs/skills.md +4 -0
- package/docs/slash-commands.md +15 -0
- package/docs/subagents.md +102 -0
- package/docs/web-tools.md +83 -0
- package/docs/windows.md +2 -1
- package/docs/worktrees.md +52 -0
- package/examples/extensions/README.md +1 -1
- package/examples/extensions/plan-mode/README.md +2 -2
- package/examples/extensions/plan-mode/index.ts +7 -4
- package/examples/extensions/subagent/README.md +2 -0
- package/examples/extensions/subagent/index.ts +3 -0
- package/examples/extensions/todo.ts +4 -0
- package/package.json +9 -8
- package/schemas/keybindings.schema.json +4 -0
- package/schemas/settings.schema.json +421 -0
- package/dist/bundle/chunks/chunk-GCKVPVMH.js +0 -2
- package/dist/bundle/chunks/chunk-UNQMECQ4.js +0 -1240
- package/dist/bundle/chunks/virtual-modules-TRFD5ZOL.js +0 -2
package/docs/sandbox.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Sandbox Commands and Edits
|
|
2
|
+
|
|
3
|
+
The sandbox limits what the model's commands and file edits can change. With it on, commands run by the `bash` and `powershell` tools, and the `write` and `edit` tools, can write only in the working folder, the temp folder, and folders you allow, and can reach the network only if you allow it. The sandbox is off by default.
|
|
4
|
+
|
|
5
|
+
The operating system enforces the limits for commands: Seatbelt on macOS, and a restricted token or a separate sandbox user on Windows. The `write` and `edit` tools run inside Diffra, so Diffra checks their paths against the same policy. Linux has no sandbox backend yet; with the sandbox on, commands there fail instead of running unsandboxed.
|
|
6
|
+
|
|
7
|
+
## Turn it on
|
|
8
|
+
|
|
9
|
+
Add a `sandbox` object to your user settings (`~/.diffra/agent/settings.json`):
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"sandbox": {
|
|
14
|
+
"mode": "workspace-write",
|
|
15
|
+
"network": false,
|
|
16
|
+
"writableRoots": ["~/.npm"]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
| Setting | Values | Default | Description |
|
|
22
|
+
|---|---|---|---|
|
|
23
|
+
| `sandbox.mode` | `off`, `read-only`, `workspace-write` | `off` | `read-only` allows no writes. `workspace-write` allows writes in the working folder, the temp folder, and `writableRoots`. |
|
|
24
|
+
| `sandbox.network` | boolean | `false` | Lets commands use the network. |
|
|
25
|
+
| `sandbox.writableRoots` | string array | `[]` | More absolute folders that `workspace-write` allows writing, such as a package manager's cache. `~` is your home folder. |
|
|
26
|
+
| `sandbox.windows` | `unelevated`, `elevated` | `unelevated` | How the sandbox works on Windows; see [Windows](#windows). |
|
|
27
|
+
|
|
28
|
+
Diffra reads these settings from your user settings only. A project's `.diffra/settings.json` cannot change them, so a repository you open cannot turn the sandbox off or widen it. Settings apply to the next command after a change; you do not need to restart.
|
|
29
|
+
|
|
30
|
+
Inside every writable folder, `.git`, `.diffra`, and `.agents` stay read-only. Git runs hooks from `.git` the next time you use it outside the sandbox, and `.diffra` and `.agents` hold settings, extensions, and skills that Diffra loads, so a command must not change them. A `git commit` therefore fails inside the sandbox; see [Denied actions](#denied-actions).
|
|
31
|
+
|
|
32
|
+
`diffra sandbox status` prints the settings in effect, and on Windows whether the elevated sandbox is set up.
|
|
33
|
+
|
|
34
|
+
## What the sandbox covers
|
|
35
|
+
|
|
36
|
+
| Covered | Not covered |
|
|
37
|
+
|---|---|
|
|
38
|
+
| Commands of the `bash` and `powershell` tools, also in subagents | Commands you run yourself with `!` |
|
|
39
|
+
| The `write` and `edit` tools | Extensions, MCP servers, hooks, and language servers, which run as you |
|
|
40
|
+
| | Reading files: commands can read what your account can read, except on Windows with the elevated backend |
|
|
41
|
+
|
|
42
|
+
The sandbox protects your files from mistakes and from instructions planted in content the model reads. It is not a boundary for code you install: extensions and MCP servers run with your full rights. For full isolation, run Diffra in a container or a virtual machine; see [Isolate Diffra](containerization.md).
|
|
43
|
+
|
|
44
|
+
## Denied actions
|
|
45
|
+
|
|
46
|
+
When the sandbox blocks a command, the command fails with an error such as `Operation not permitted` or `Access is denied`. When the `write` or `edit` tool targets a path the sandbox does not allow, the tool fails with the reason.
|
|
47
|
+
|
|
48
|
+
In the approval modes that ask before acting (`default`, `auto-edit`, and `auto`), Diffra then asks whether to run that one action without the sandbox. **Yes, run it without the sandbox once** runs it again unsandboxed; **No** keeps the failure, and the model is told the sandbox probably blocked it. In `yolo` and `plan` mode, and without an interactive UI, Diffra never asks: the action stays denied. See [Approve Tool Calls](approval-modes.md).
|
|
49
|
+
|
|
50
|
+
Diffra recognizes a blocked command by its output: a non-zero exit code together with a message such as `Operation not permitted`, `Permission denied`, `Read-only file system`, or `Access is denied`. A command that fails for another reason and prints one of these messages also leads to the question.
|
|
51
|
+
|
|
52
|
+
## macOS
|
|
53
|
+
|
|
54
|
+
Commands run under Seatbelt, the kernel sandbox of macOS, through the system's `/usr/bin/sandbox-exec`. It needs no setup and works on Intel and Apple silicon Macs.
|
|
55
|
+
|
|
56
|
+
- Reads are not limited.
|
|
57
|
+
- Writes outside the writable folders, and into the protected folders, fail with `Operation not permitted`. A command also cannot rename or delete a writable folder itself, which would move its protected folders out of reach.
|
|
58
|
+
- With `network: false`, every socket is blocked: the internet, `localhost`, and Unix sockets such as the ones of `ssh-agent` and Docker. With `network: true`, all of them are allowed; Seatbelt cannot allow some hosts and block others.
|
|
59
|
+
- Package managers write caches in your home folder (`~/.npm`, `~/Library/Caches`). Add those folders to `writableRoots` if commands should install packages.
|
|
60
|
+
|
|
61
|
+
## Windows
|
|
62
|
+
|
|
63
|
+
Windows has two backends. Both run the command through `diffra-sandbox.exe`, a helper Diffra downloads on first use.
|
|
64
|
+
|
|
65
|
+
| | `unelevated` (default) | `elevated` |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| Setup | None | `diffra sandbox setup` once, as administrator |
|
|
68
|
+
| Writes outside the writable folders | Blocked | Blocked |
|
|
69
|
+
| Deletes and moves outside the writable folders | **Not blocked** | Blocked |
|
|
70
|
+
| Reads | Not limited | Limited to what the Users group can read and to your profile, except the folders listed below |
|
|
71
|
+
| Network with `network: false` | Common tools are pointed at a closed proxy; a program can still connect | Blocked by a Windows Firewall rule |
|
|
72
|
+
| The `bash` tool (Git Bash) | Cannot run; the `powershell` tool replaces it | Runs |
|
|
73
|
+
|
|
74
|
+
### Unelevated
|
|
75
|
+
|
|
76
|
+
The command runs as you, with a restricted token. Windows checks every write against the token's restricting identities, which only the writable folders allow. Diffra adds a permission entry for each writable folder the first time a command writes there, and a deny entry for each protected folder that exists at that moment; the entries stay, so later commands start without delay. In a large folder, adding the first entry can take a while.
|
|
77
|
+
|
|
78
|
+
The restricted token does not limit deletes: Windows does not count deleting a file as a write there, so a command can delete, or move out of its folder, any file you can delete. It also does not limit reads or the network. Use the elevated backend when that matters.
|
|
79
|
+
|
|
80
|
+
Git Bash cannot start with a restricted token, so while the sandbox is on with this backend, sessions use the `powershell` tool instead of the `bash` tool.
|
|
81
|
+
|
|
82
|
+
### Elevated
|
|
83
|
+
|
|
84
|
+
`diffra sandbox setup` asks Windows for administrator rights once, then:
|
|
85
|
+
|
|
86
|
+
- creates the local group `DiffraSandboxUsers` and the users `DiffraSandboxOffline` and `DiffraSandboxOnline`, hidden from the sign-in screen, with random passwords that Diffra keeps encrypted for your account (DPAPI) in `~/.diffra/agent/sandbox`;
|
|
87
|
+
- adds a Windows Firewall rule that blocks outbound connections of `DiffraSandboxOffline`, and warns if the firewall is off for a network profile, where the rule has no effect;
|
|
88
|
+
- grants the group read access to the folders and files directly in your profile, except `.ssh`, `.tsh`, `.brev`, `.gnupg`, `.aws`, `.azure`, `.kube`, `.docker`, `.config`, `.npm`, `.pki`, `.terraform.d`, and `.diffra`. In a large profile this takes a few minutes.
|
|
89
|
+
|
|
90
|
+
Then set `"windows": "elevated"` in the `sandbox` settings. Commands run as `DiffraSandboxOffline`, or as `DiffraSandboxOnline` with `network: true`, with a restricted token that limits writes to the writable folders of the current command. Each writable folder gets permission entries for the group and for the current command.
|
|
91
|
+
|
|
92
|
+
Git refuses to work in a repository that another account owns, so Diffra marks the repository of the working folder, and the repositories inside it, as safe for sandboxed commands (`safe.directory`, set through `GIT_CONFIG_*` variables).
|
|
93
|
+
|
|
94
|
+
`diffra sandbox uninstall` removes the firewall rule, the two users with their profiles, and the group, again as administrator. Folders the sandbox used keep their permission entries for the removed group; Windows shows them as an unknown account, and they grant nothing.
|
|
95
|
+
|
|
96
|
+
### HTTPS with `network: true`
|
|
97
|
+
|
|
98
|
+
Windows' own TLS library, Schannel, refuses restricted tokens, which both backends use. Programs that rely on it cannot open HTTPS connections in the sandbox:
|
|
99
|
+
|
|
100
|
+
- Git: Diffra sets `http.sslBackend` to `openssl` for sandboxed commands, so git uses the OpenSSL that Git for Windows ships, with Git's own list of certificate authorities. If your network needs a certificate that only the Windows certificate store has, such as a company proxy's, git fails with a certificate error in the sandbox; add that certificate to the file that git's `http.sslCAInfo` names.
|
|
101
|
+
- `curl`, both Windows' own and the one in Git Bash, and PowerShell's `Invoke-WebRequest` and `Invoke-RestMethod` fail. When a command fails with `SEC_E_NO_CREDENTIALS`, as `curl` does, Diffra asks whether to run it without the sandbox, as for other denials. PowerShell's error message does not tell the cause, so Diffra does not ask there.
|
|
102
|
+
- Node, npm, Python, and Go programs bring their own TLS and work.
|
|
103
|
+
|
|
104
|
+
### The helper
|
|
105
|
+
|
|
106
|
+
Diffra downloads `diffra-sandbox.exe` from Diffra's GitHub releases on first use, checks it against a SHA-256 hash pinned in Diffra, and stores it in `~/.diffra/agent/bin`. With `DIFFRA_OFFLINE` set, Diffra does not download it. Set `DIFFRA_SANDBOX_HELPER` to the path of a `diffra-sandbox.exe` you built from `native/windows-sandbox` to use that instead.
|
|
107
|
+
|
|
108
|
+
The helper sends no telemetry.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Schedule Prompts and Loops
|
|
2
|
+
|
|
3
|
+
Diffra can run a prompt later or repeatedly while a session is open: `/loop` runs a prompt now and again on an interval or at the model's pace, and the model can schedule prompts itself, such as a reminder in 20 minutes. Scheduled tasks come from the built-in extension `builtin:cron` and are on by default.
|
|
4
|
+
|
|
5
|
+
Everything is session-only: nothing is written to disk, and quitting Diffra, `/new`, `/resume`, `/fork`, and `/reload` cancel all jobs. On quit Diffra prints what it cancelled.
|
|
6
|
+
|
|
7
|
+
## /loop
|
|
8
|
+
|
|
9
|
+
| Command | Does |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `/loop 5m check the build` | Run `check the build` now and every 5 minutes |
|
|
12
|
+
| `/loop check the PR every 30m` | The same, with the interval at the end (`every 5 minutes`, `every 2 hours` also work) |
|
|
13
|
+
| `/loop check the deploy` | Run the prompt now; the model decides whether and when to check again |
|
|
14
|
+
| `/loop` | An autonomous loop: keep the work of this conversation moving, at the model's pace |
|
|
15
|
+
| `/loop 30m` | An autonomous loop every 30 minutes |
|
|
16
|
+
| `/loop work through loop.md` | Work the task list in `loop.md` on each tick (with an interval: on each fire) |
|
|
17
|
+
| `/loop list` | List the jobs and the pending wakeup |
|
|
18
|
+
| `/loop clear` | Cancel all of them |
|
|
19
|
+
|
|
20
|
+
The prompt can be a slash command: `/loop 10m /review` runs `/review` every 10 minutes. `every` counts as an interval only when a time follows it: `/loop check every PR` has none.
|
|
21
|
+
|
|
22
|
+
### Intervals
|
|
23
|
+
|
|
24
|
+
Intervals become cron schedules that repeat evenly:
|
|
25
|
+
|
|
26
|
+
| Interval | Schedule |
|
|
27
|
+
|---|---|
|
|
28
|
+
| `Ns` | Rounded up to whole minutes |
|
|
29
|
+
| `Nm`, under 60 | `*/N * * * *` |
|
|
30
|
+
| `Nm`, 60 or more, and `Nh` | `0 */H * * *` with H dividing 24 |
|
|
31
|
+
| `1d` | `0 0 * * *`, midnight |
|
|
32
|
+
| `Nd` | `0 0 */N * *`: midnight on days 1, 1+N, 1+2N, … of each month |
|
|
33
|
+
|
|
34
|
+
An interval that does not divide the hour or day evenly, such as `7m` or `90m`, is rounded to the nearest one that does (`6m`, `2h`), and Diffra says so. `Nd` restarts each month, so the gap across a month boundary can be shorter; Diffra says that too. Day intervals over 30 are refused.
|
|
35
|
+
|
|
36
|
+
### Self-paced and autonomous loops
|
|
37
|
+
|
|
38
|
+
Without an interval, the model runs the prompt and, before ending its turn, calls `loop_wakeup` if another check is useful, with a delay of 60 to 3600 seconds. It leaves the call out when the task is complete, blocked, or there is nothing useful to check, which ends the loop. One wakeup is pending at a time, a chain of wakeups may run for 24 hours, and interrupting a turn with Escape cancels the pending wakeup.
|
|
39
|
+
|
|
40
|
+
A bare `/loop` asks the model to continue what the conversation already established (unfinished work, an open pull request's CI and review threads) without starting new work or doing anything irreversible it was not authorized to do, and to say in one sentence when there is nothing to do. The full guidance goes with the first tick and after a compaction; later ticks get a short reminder.
|
|
41
|
+
|
|
42
|
+
### loop.md
|
|
43
|
+
|
|
44
|
+
A loop over `loop.md` reads `.diffra/loop.md` in the project (only in a trusted project), else `loop.md` in the agent directory, at every tick, up to 25,000 bytes. The model gets the whole list on the first tick and whenever the file changes, and a reminder otherwise. When the file is missing, the tick runs as an autonomous one.
|
|
45
|
+
|
|
46
|
+
## Tools
|
|
47
|
+
|
|
48
|
+
| Tool | Does |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `cron_create` | Schedule `prompt` on a 5-field `cron` expression; `recurring: false` fires once. `durable: true` is refused: jobs cannot outlive the session |
|
|
51
|
+
| `cron_list` | List jobs and the pending wakeup: `id — schedule (type) [session-only]: prompt` |
|
|
52
|
+
| `cron_delete` | Cancel a job or the wakeup by `id` |
|
|
53
|
+
| `loop_wakeup` | Set the next tick of a self-paced loop: `delaySeconds`, `prompt` (usually `/loop …`), `reason` |
|
|
54
|
+
|
|
55
|
+
At most 50 jobs. A recurring job expires 7 days after it was created: it fires one last time, then is deleted.
|
|
56
|
+
|
|
57
|
+
## When prompts run
|
|
58
|
+
|
|
59
|
+
Due prompts run only while Diffra is idle, each as its own turn, one after another; a busy session runs them after the current turn. The transcript shows `Cron: <prompt>` or `Loop: <prompt>`. A job never fires in the minute it was created, and a slot fires once however late: after a sleeping laptop wakes, a job fires once, not once per missed slot.
|
|
60
|
+
|
|
61
|
+
To spread load, a recurring job fires a fixed delay after its slot, up to 10% of its period and at most 15 minutes; a one-shot set for :00 or :30 fires up to 90 seconds early.
|
|
62
|
+
|
|
63
|
+
## Time zones and daylight saving time
|
|
64
|
+
|
|
65
|
+
Cron expressions use the local time zone of the Diffra process (`TZ` changes it). There is no per-job time zone and no UTC option.
|
|
66
|
+
|
|
67
|
+
When daylight saving time starts, the skipped wall times do not exist that day: a job at `30 2 * * *` in a zone that jumps from 02:00 to 03:00 does not fire that day and fires at 02:30 the next day. When it ends, the repeated hour happens twice and a job in it fires twice: `30 1 * * *` fires at 01:30 before and again at 01:30 after the clocks go back. Jobs with a minute or hour step keep their wall-clock schedule across the change.
|
|
68
|
+
|
|
69
|
+
## Settings
|
|
70
|
+
|
|
71
|
+
| Setting | Default | Meaning |
|
|
72
|
+
|---|---|---|
|
|
73
|
+
| `experimental.cron` | `true` | Scheduled tasks; `false` removes the tools and `/loop` (read at session start) |
|
|
74
|
+
| `experimental.cronRecurringMaxAgeDays` | `7` | Days until a recurring job expires; `0` for never |
|
|
75
|
+
|
|
76
|
+
`DIFFRA_DISABLE_CRON=1` turns scheduled tasks off, and `DIFFRA_CRON_MAX_AGE_DAYS` overrides the expiry.
|
|
77
|
+
|
|
78
|
+
## Differences from Qwen Code
|
|
79
|
+
|
|
80
|
+
- `/loop` is a command, not a bundled skill: Diffra parses the interval and creates the job itself instead of asking the model to call `cron_create`, so the model only runs the prompt. Self-paced and autonomous loops still let the model decide with `loop_wakeup`.
|
|
81
|
+
- There are no durable jobs: Qwen Code supports them only with its daemon, and `durable: true` is refused in standalone sessions there too.
|
|
82
|
+
- There is no `gate` (a shell command that decides whether a fire runs) and no `sessionMode`.
|
|
83
|
+
- A busy session queues due prompts after the current turn; they are never dropped.
|
|
84
|
+
- Jobs end with the session, including `/new`, `/resume`, and `/fork`, not only with the process.
|
package/docs/security.md
CHANGED
|
@@ -1,99 +1,100 @@
|
|
|
1
|
-
# Run Diffra safely
|
|
2
|
-
|
|
3
|
-
Treat model-generated commands and code as untrusted. Diffra can read, change, and execute files with the permissions of the account that started it, and it does not ask for approval before
|
|
4
|
-
|
|
5
|
-
Files, comments, instructions, command output, and model responses can steer the model through prompt injection. Project trust controls which project resources load at startup, but it does not make that content or the resulting actions safe.
|
|
6
|
-
|
|
7
|
-
Safety comes from limiting the files, credentials, processes, and network services Diffra can access and affect if a generated action is wrong or hostile. Watching the transcript, using project trust, and reviewing changes do not create a security boundary.
|
|
8
|
-
|
|
9
|
-
## Choose how to run Diffra
|
|
10
|
-
|
|
11
|
-
Different ways of running Diffra place different limits on what generated commands can access:
|
|
12
|
-
|
|
13
|
-
| How Diffra runs | What remains protected |
|
|
14
|
-
|---|---|
|
|
15
|
-
| Directly, with the permissions of its operating-system user | Anything that user cannot access. A dedicated user account can narrow those permissions, but Diffra still shares the operating system and network with other users. |
|
|
16
|
-
| Entirely inside a container, virtual machine, or sandbox | Host files and processes that you do not expose to the environment. Credentials and network services remain accessible if you make them available inside it. This is usually the strongest practical option. |
|
|
17
|
-
| Outside the isolated environment, with only its built-in tools running inside | Host resources are protected from actions performed through those tools. Diffra itself and other extensions remain outside the boundary, so this is a narrower form of isolation. |
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- `.diffra/
|
|
41
|
-
- `.diffra/
|
|
42
|
-
- `.diffra/
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
- project
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
- `defaultProjectTrust: "
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
- Review
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
1
|
+
# Run Diffra safely
|
|
2
|
+
|
|
3
|
+
Treat model-generated commands and code as untrusted. Diffra can read, change, and execute files with the permissions of the account that started it, and by default it does not ask for approval before tool calls. [Approval modes](approval-modes.md) can make it ask, let a classifier decide, or keep a session read-only, but they only decide which calls run, not what an allowed call can reach. The optional [sandbox](sandbox.md) limits what the model's commands and edits can write and whether they reach the network. Extensions, package installers, language servers, and other child processes run with those same permissions unless an operating-system or virtualization boundary restricts them.
|
|
4
|
+
|
|
5
|
+
Files, comments, instructions, command output, and model responses can steer the model through prompt injection. Project trust controls which project resources load at startup, but it does not make that content or the resulting actions safe.
|
|
6
|
+
|
|
7
|
+
Safety comes from limiting the files, credentials, processes, and network services Diffra can access and affect if a generated action is wrong or hostile. Watching the transcript, using project trust, and reviewing changes do not create a security boundary.
|
|
8
|
+
|
|
9
|
+
## Choose how to run Diffra
|
|
10
|
+
|
|
11
|
+
Different ways of running Diffra place different limits on what generated commands can access:
|
|
12
|
+
|
|
13
|
+
| How Diffra runs | What remains protected |
|
|
14
|
+
|---|---|
|
|
15
|
+
| Directly, with the permissions of its operating-system user | Anything that user cannot access. A dedicated user account can narrow those permissions, but Diffra still shares the operating system and network with other users. |
|
|
16
|
+
| Entirely inside a container, virtual machine, or sandbox | Host files and processes that you do not expose to the environment. Credentials and network services remain accessible if you make them available inside it. This is usually the strongest practical option. |
|
|
17
|
+
| Outside the isolated environment, with only its built-in tools running inside | Host resources are protected from actions performed through those tools. Diffra itself and other extensions remain outside the boundary, so this is a narrower form of isolation. |
|
|
18
|
+
| Directly, with the built-in [sandbox](sandbox.md) on | Files outside the writable folders, and the network when it is off, from the model's commands and edits. Reads stay open except on Windows with the elevated backend, and the unelevated Windows backend does not stop deletes. Extensions, MCP servers, and hooks run outside it. |
|
|
19
|
+
|
|
20
|
+
The working folder controls resource discovery and the default location for tools, but it does not prevent commands from accessing other paths available to the Diffra process.
|
|
21
|
+
|
|
22
|
+
Whichever option you choose, only provide the files and services required for the task. Keep credentials outside the environment where possible, or use narrowly scoped, short-lived credentials. Restrict network access when commands do not need it.
|
|
23
|
+
|
|
24
|
+
For setup instructions and the limitations of each isolation method, see [Run Diffra in an isolated environment](containerization.md).
|
|
25
|
+
|
|
26
|
+
<a id="project-trust"></a>
|
|
27
|
+
|
|
28
|
+
## Understand project trust
|
|
29
|
+
|
|
30
|
+
Project trust controls whether Diffra loads most settings and resources supplied by a working folder. It prevents a folder from silently loading executable extensions before you approve it.
|
|
31
|
+
|
|
32
|
+
Project trust is not a complete startup boundary. Diffra reads the project `sessionDir` setting while selecting or creating a session, before it resolves project trust. Declining trust prevents the remaining project settings and protected resources from loading, but it cannot undo that initial session-directory lookup.
|
|
33
|
+
|
|
34
|
+
Project trust does not limit what tool calls can access or affect. After Diffra starts, enabled tools still use the operating-system permissions of the Diffra process. Instructions and other content in the folder can also influence the model.
|
|
35
|
+
|
|
36
|
+
### Resources protected by project trust
|
|
37
|
+
|
|
38
|
+
Diffra requires a project-trust decision when it finds any of these resources from the current working directory:
|
|
39
|
+
|
|
40
|
+
- `.diffra/settings.json`
|
|
41
|
+
- `.diffra/mcp.json`
|
|
42
|
+
- `.diffra/extensions`, `.diffra/skills`, `.diffra/prompts`, or `.diffra/themes`
|
|
43
|
+
- `.diffra/SYSTEM.md` or `.diffra/APPEND_SYSTEM.md`
|
|
44
|
+
- project `.agents/skills` in the current directory or an ancestor directory
|
|
45
|
+
|
|
46
|
+
A bare `.diffra` directory does not require project trust.
|
|
47
|
+
|
|
48
|
+
Granting project trust allows Diffra to load:
|
|
49
|
+
|
|
50
|
+
- project settings
|
|
51
|
+
- project MCP servers from `.diffra/mcp.json`
|
|
52
|
+
- extensions, skills, prompt templates, themes, and system-prompt files under `.diffra`
|
|
53
|
+
- missing packages configured through project settings
|
|
54
|
+
- project-local and project-package extensions
|
|
55
|
+
|
|
56
|
+
Declining project trust skips those protected resources, except for the initial `sessionDir` lookup described above.
|
|
57
|
+
|
|
58
|
+
Context files such as `AGENTS.override.md`, `AGENTS.md`, and `CLAUDE.md` load regardless of project trust unless you disable context loading. Treat instructions in a folder as untrusted input even when you decline project trust.
|
|
59
|
+
|
|
60
|
+
### How Diffra chooses a trust decision
|
|
61
|
+
|
|
62
|
+
A command-line `--approve` or `--no-approve` override applies first. When protected resources exist and there is no command-line override:
|
|
63
|
+
|
|
64
|
+
1. User-level and command-line extensions can handle the `project_trust` event. The first extension that returns yes or no owns the decision.
|
|
65
|
+
2. If no extension decides, Diffra looks for a saved decision for the current directory or one of its parents. The closest decision applies.
|
|
66
|
+
3. If no saved decision applies, Diffra follows the global `defaultProjectTrust` setting, whose default is `"ask"`.
|
|
67
|
+
|
|
68
|
+
Saved decisions use canonical directory paths and live in:
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
~/.diffra/agent/trust.json
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Use `/trust` to save a decision for future Diffra processes.
|
|
75
|
+
|
|
76
|
+
### Project trust without an interactive prompt
|
|
77
|
+
|
|
78
|
+
Print, JSON, and RPC modes cannot show the built-in trust prompt. If no command-line override, extension, or saved decision applies:
|
|
79
|
+
|
|
80
|
+
- `defaultProjectTrust: "always"` loads protected project resources.
|
|
81
|
+
- `defaultProjectTrust: "ask"` or `"never"` skips them.
|
|
82
|
+
|
|
83
|
+
Use `--approve` or `--no-approve` when an automated run needs an explicit one-time decision.
|
|
84
|
+
|
|
85
|
+
## Reduce impact and improve recovery
|
|
86
|
+
|
|
87
|
+
These practices do not replace isolation, but they reduce exposure or make recovery easier:
|
|
88
|
+
|
|
89
|
+
- Give Diffra access only to files and services required for the task.
|
|
90
|
+
- Use snapshots, backups, or version control before substantial changes.
|
|
91
|
+
- Review extensions and packages before loading them. Extensions execute inside the Diffra process.
|
|
92
|
+
- Prefer narrowly scoped, short-lived credentials.
|
|
93
|
+
- Review diffs and generated output before applying results to another system.
|
|
94
|
+
- Review sessions before exporting or sharing them. They can contain prompts, tool arguments, command output, file contents, and credentials exposed during the conversation.
|
|
95
|
+
|
|
96
|
+
## Report a security issue
|
|
97
|
+
|
|
98
|
+
Follow the repository [Security Policy](https://github.com/DingxinTao0417/diffra-cli/blob/main/SECURITY.md). Do not open a public issue for a security-sensitive report.
|
|
99
|
+
|
|
100
|
+
Expected local-agent behavior, prompt injection from untrusted content, the documented limits of the built-in sandbox, and behavior from user-installed extensions or skills are generally outside the security boundary unless the report demonstrates a privilege-boundary bypass or access that the local user did not already have.
|