@toddzheng024/dscode-bundle 0.7.21 → 0.7.22
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 +4 -4
- package/plugins/dscode/index.mjs +10 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.7.
|
|
2
|
+
"version": "0.7.22",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Todd Zheng",
|
|
@@ -306,9 +306,9 @@
|
|
|
306
306
|
"@deepseek-ai/schemastery": "3.18.2",
|
|
307
307
|
"@anionex/dsh-computer-use": "0.3.2",
|
|
308
308
|
"chrome-devtools-mcp": "1.9.0",
|
|
309
|
-
"imapflow": "2.0.
|
|
310
|
-
"mailparser": "3.9.
|
|
311
|
-
"nodemailer": "10.0.
|
|
309
|
+
"imapflow": "2.0.5",
|
|
310
|
+
"mailparser": "3.9.28",
|
|
311
|
+
"nodemailer": "10.0.10",
|
|
312
312
|
"react": "18.3.1",
|
|
313
313
|
"commander": "15.0.0",
|
|
314
314
|
"eventsource-parser": "3.1.1"
|
package/plugins/dscode/index.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
1
3
|
export const name = 'dscode-execution-policy';
|
|
2
4
|
export const inject = ['systemPrompt', 'tools', 'agents', 'commands', 'terminals'];
|
|
3
5
|
export const SHELL_POLICY = `Use bash as the persistent shell for reading, searching and modifying files. Prefer rg/rg --files, sed and standard CLI tools. Use apply_patch with a standard unified diff on stdin (git apply format, a/ and b/ paths); apply_patch --check validates before writing. It is not the *** Begin Patch format. Quote heredoc delimiters to avoid shell interpolation.
|
|
@@ -23,8 +25,16 @@ export const CHILD_NAME = /^[A-Za-z](?:[A-Za-z0-9_]{0,8}[A-Za-z])?$/;
|
|
|
23
25
|
export const CHILD_NAME_RULE = 'name must be 1-10 characters of letters, digits or underscores, starting and ending with a letter';
|
|
24
26
|
const DELEGATION_TOOLS = ['subagent', 'subagent_fork', 'workflow', 'ralph'];
|
|
25
27
|
|
|
28
|
+
// Where the version-matched user guides live. Source and tar installs ship docs/ next
|
|
29
|
+
// to the plugins; the npm/Hub bundle does not, so the section falls back to the public
|
|
30
|
+
// repository there instead of pointing at a path that does not exist.
|
|
31
|
+
const DOCS_DIR = fileURLToPath(new URL('../../docs/', import.meta.url));
|
|
32
|
+
const DOCS_REPO = 'https://github.com/qiz029/dscode/blob/main/docs/';
|
|
33
|
+
export const DOCS_SECTION = `To answer questions about DSCODE itself - what it supports, how a feature is configured, what a command does - treat the bundled user guides as the source of truth instead of guessing: ${existsSync(DOCS_DIR) ? `${DOCS_DIR} plus the repository root README.md (session-bridge.md, session-communication.md, session-cards.md, memory.md, exec.md, email.md, skills.md, tui-commands.md, session-metrics.md, dscode-ultra.md, auto-review.md, demo.md)` : `the repository documentation at ${DOCS_REPO} plus the root README.md (session-bridge.md, session-communication.md, session-cards.md, memory.md, exec.md, email.md, skills.md, tui-commands.md, session-metrics.md, dscode-ultra.md, auto-review.md, demo.md)`}. Read the relevant guide before answering rather than relying on memory of an earlier session. docs/CONTEXT-HANDOFF.md, docs/session-messaging-design.md, docs/cloud-webapp-host.md and docs/verification.md are internal development records, not user documentation: never quote them to a user or treat them as a specification. When the guides do not cover something, describe only what the running installation actually does and say plainly that it is not documented.`;
|
|
34
|
+
|
|
26
35
|
export function apply(ctx) {
|
|
27
36
|
ctx.systemPrompt.section({ name: 'dscode:shell-policy', order: 1050, text: SHELL_POLICY });
|
|
37
|
+
ctx.systemPrompt.section({ name: 'dscode:docs', order: 1052, text: DOCS_SECTION });
|
|
28
38
|
ctx.systemPrompt.section({ name: 'dscode:code-discipline', order: 1053, text: CODE_DISCIPLINE });
|
|
29
39
|
ctx.systemPrompt.section({ name: 'dscode:working-discipline', order: 1054, text: WORKING_DISCIPLINE });
|
|
30
40
|
ctx.systemPrompt.section({ name: 'dscode:child-policy', order: 1051, text: ({ scope }) => scope?.session?.header?.origin === 'subagent' && scope.session.header.agentPreset === 'dscode'
|