dsh-plugin-dated-folders
其他 活跃维护

dsh-plugin-dated-folders

Aeanfx/dsh-plugin-dated-folders

该插件可将代理生成的所有输出文件自动归入对应YYYY-MM-DD格式的日度文件夹,每日仅生成一个独立目录,无需手动整理,避免文件杂乱堆积。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
19 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:Aeanfx/dsh-plugin-dated-folders
git clone https://github.com/Aeanfx/dsh-plugin-dated-folders.git
git clone git@github.com:Aeanfx/dsh-plugin-dated-folders.git
README.md main

dsh-plugin-dated-folders

npm version
License
dsh-plugin

One folder per day keeps the clutter away.

A DeepSeek Harness (DSH) plugin that keeps the workspace tidy:
every new file the agent generates goes into a folder named by the date it was created, plus a short description.

  • Folder name: YYYY-MM-DD_<description> (e.g. 2026-08-14_notes)
  • Description ≤ 10 bytes (UTF-8 — roughly 3 CJK characters or 10 ASCII letters)
  • The same-day folder is reused when it already exists; the date is the day the file is generated
  • Edits to existing files and explicitly user-specified paths are left untouched

How it works

The plugin registers one system-prompt section (dated-folders:policy, order 55) through the
systemPrompt service — the same mechanism used by the official dsh-plan-mode / dsh-persona
plugins. The rule is folded into every model request, so the agent, its subagents, and workflow
workers all follow it.

  • Platform: Host (agent plane)
  • Publishes a service: no → in an agent preset composition it sits loose (no isolate realm)
  • Depends on: @deepseek-ai/cordis (peer), zod

Install

Option 1 — agent preset row (recommended)

  1. Install the package into the profile — the loader resolves plugin packages from the
    profile directory, not from a global install (requires pnpm; install it with npm install -g pnpm):

    dsh plugin --profile web add dsh-plugin-dated-folders
  2. Add one row to your agent preset's agent.cordis.yml (e.g. a copy of standard).
    Give the row an explicit config: map:

    - id: dated-folders
     name: dsh-plugin-dated-folders
     config: {}

    To customize the rule text:

    - id: dated-folders
     name: dsh-plugin-dated-folders
     config:
       section: |
         Your custom rule text

Troubleshooting

  • Cannot find package 'dsh-plugin-dated-folders' imported from ...\profiles\web\ — the package is
    not installed into the profile; run dsh plugin --profile web add dsh-plugin-dated-folders
    (install pnpm first if missing).
  • invalid config: expected object, received undefined — the row has no config:; add
    config: {} (or a section: map). Since v0.1.1 the plugin tolerates a missing config.

Option 2 — dsh plugin directly

dsh plugin --profile web add dsh-plugin-dated-folders

Then add the composition row shown above to cordis.patch.yml (or your preset's composition).

Configuration

Field Type Default Description
section string built-in rule The rule text injected into the system prompt.

Development

npm install
node --check lib/index.js     # syntax check
node _smoke-test.mjs          # smoke test with a stub ctx (see CONTRIBUTING.md)
npm pack --dry-run            # preview the published tarball

Publishing to the community

  1. npm: create an npm account, then npm publish (community naming convention: dsh-plugin-*).
  2. GitHub: open-source the repo and tag it with the dsh-plugin topic.
  3. Ecosystem list: open a PR to add it to awesome-deepseek-harness.
  4. Official repo: deepseek-ai/deepseek-harness ("Everything is a Plugin").

About this plugin

This plugin was fully produced by the DeepSeek Harness AI agent — the idea,
architecture, code, tests, documentation, and the npm/GitHub publishing workflow
were all written by the agent in an interactive session. A human only assisted
with the operations the agent cannot perform itself: creating the GitHub and npm
accounts, uploading files through the web UI, running interactive npm login /
npm publish (two-factor authentication), and clicking through the publishing
steps. The entire conversation — from the initial "keep my workspace tidy by date"
idea to this release — is recorded in the DeepSeek Harness session log.


中文

关于本插件

本插件由 DeepSeek Harness AI 代理完全制作:创意、架构、代码、测试、文档以及
npm/GitHub 发布流程均由 AI 在交互式会话中完成。人类仅辅助执行 AI 无法亲自操作的
部分:注册 GitHub 与 npm 账号、通过网页上传文件、执行需要两步验证的交互式
npm login / npm publish,以及点击完成发布步骤。从最初"按日期整理工作区"的想法
到本次发布,整段对话都记录在 DeepSeek Harness 的会话日志中。

License

MIT — see LICENSE.


中文说明

这是什么

每日一匣,文件归位。

一个 DeepSeek Harness 插件:让 Agent 生成的所有新文件自动归档到「日期+描述」文件夹,保持工作区整洁。

  • 文件夹名:YYYY-MM-DD_描述(如 2026-08-14_笔记)
  • 描述 ≤ 10 字节(UTF-8,约 3 个汉字或 10 个英文字母),概括当天文件内容/用途
  • 当天已存在该文件夹则复用;日期取文件生成的当天
  • 编辑已有文件、用户明确指定路径不受影响

工作原理

通过 systemPrompt.section() 注入一条归档规则段落(与官方 dsh-plan-mode / dsh-persona 同款机制),
每次模型请求都会携带该规则,Agent、子代理、工作流统一遵守。

安装

前置:需要 pnpm(npm install -g pnpm)。注意:loader 从 profile 目录解析插件包,
不是全局 npm——所以插件必须装进 profile。

  1. 把插件装进 profile:

    dsh plugin --profile web add dsh-plugin-dated-folders
  2. 在 Agent 预设的 agent.cordis.yml(如 standard 的副本)中追加(行内必须带 config:,
    否则报 invalid config: expected object, received undefined;v0.1.1 起可省略):

    - id: dated-folders
     name: dsh-plugin-dated-folders
     config: {}

    自定义规则文本:

    - id: dated-folders
     name: dsh-plugin-dated-folders
     config:
       section: |
         你的自定义规则文本

常见坑

  • Cannot find package ... imported from ...\profiles\web\ → 插件没装进 profile,执行
    dsh plugin --profile web add dsh-plugin-dated-folders(缺 pnpm 先装)
  • invalid config: expected object, received undefined → 组合行缺 config:,补 config: {}

配置

字段 类型 默认 说明
section string 内置规则 注入系统提示的规则文本,可自定义

发布到社区

  1. npm:注册账号后 npm publish(社区约定命名 dsh-plugin-*)
  2. GitHub:开源仓库,打上 dsh-plugin topic
  3. 生态列表:向 awesome-deepseek-harness 提 PR 收录
  4. 官方仓库:deepseek-ai/deepseek-harness

About this plugin

This plugin was fully produced by the DeepSeek Harness AI agent — the idea,
architecture, code, tests, documentation, and the npm/GitHub publishing workflow
were all written by the agent in an interactive session. A human only assisted
with the operations the agent cannot perform itself: creating the GitHub and npm
accounts, uploading files through the web UI, running interactive npm login /
npm publish (two-factor authentication), and clicking through the publishing
steps. The entire conversation — from the initial "keep my workspace tidy by date"
idea to this release — is recorded in the DeepSeek Harness session log.


中文

关于本插件

本插件由 DeepSeek Harness AI 代理完全制作:创意、架构、代码、测试、文档以及
npm/GitHub 发布流程均由 AI 在交互式会话中完成。人类仅辅助执行 AI 无法亲自操作的
部分:注册 GitHub 与 npm 账号、通过网页上传文件、执行需要两步验证的交互式
npm login / npm publish,以及点击完成发布步骤。从最初"按日期整理工作区"的想法
到本次发布,整段对话都记录在 DeepSeek Harness 的会话日志中。

License

MIT