Commit Graph
22 Commits
Author SHA1 Message Date
pyh 07f5af6fff 📝 docs: 讲清"单行"指首行,正文不禁止
之前的措辞容易被读成"提交信息只能有一行"。现在把三段结构摆出来,并写明
首行、正文、脚注各自的要求与宽度上限,正文和脚注都标注为可省略。

顺带说明:正文不是违规内容,没有正文是允许而不是必须。
2026-09-30 16:56:04 +08:00
pyh 83eae74f63 📝 docs: 补上提交信息规范的自查脚本
scripts/check-commit-log.mjs 按 CONTRIBUTING.md 的类型表检查提交首行,
只报告不拦提交。它从规范文件里读 emoji 对照,所以改表不用改脚本。

同时收紧规范:emoji 由「可选」改为「必需且必须与类型一致」。原先的写法
下 ✨ docs: 这类不匹配不会被发现。
2026-09-30 16:50:29 +08:00
pyh b5545b0806 ✨ docs: 把提交信息规范固化成 CONTRIBUTING.md
约定 emoji 在行首、类型关键字与作用域用英文、描述用中文,并给出 10 种
类型的 emoji 与码位表。因为行首 emoji 会让 commitlint / semantic-release
这类工具读不到类型,规范里同时记录了两种应对方式。

顺手修掉 README 里一句会误导的话:本地 link: 安装时,profile 的
node_modules 可能是与源码同 inode 的硬链接副本,只刷新页面看不到改动。
2026-09-30 16:49:22 +08:00
pyh fee7799d7e 把清理临时文件从通用设置移到插件页 2026-09-30 16:41:03 +08:00
pyh da8e5e43a4 refactor!: align with the DSH plugin conventions and drop the npm publish workflow
Follow the cordis-plugin-development references instead of the ad-hoc choices
the first version made.

Client half:
- register the row button under this package's own id instead of shadowing the
  shipped `archive` action at a lower priority, so the official hover buttons
  keep their cells and archiving stays where the harness put it
- drop the synthetic `pointerout` dispatched at a `[data-row-key]` ancestor:
  a plugin does not read or drive another package's DOM, so the tooltip is now
  positioned from its own button alone
- keep the self-rendered primitives, the `--dsw-*` token-only styling, and the
  modal focus/Escape behavior, and document why

Host half:
- resolve a conversation's descendants with `sessionQuery.traceSession()`
  instead of listing every stored header and re-deriving `parentSession` edges
- decide liveness from the traced `SessionRecord.live` flag, which removes the
  `agents` and `sessions` dependencies from `inject`
- build the orphan-sweep corpus from `sessionQuery.listSessions()`, which
  already merges live and persisted sessions
- document that `sessionPersistence.locate()` is a JSONL-backend diagnostic
  hook, not part of the seam, and keep probing it explicitly
- record only tree roots in the deferred-deletion ledger: the activation sweep
  removes a root with everything under it, so a separately recorded child was
  deleted twice or needed a pass that never runs
- return the activation's sweep promise from `apply()` so a test can await it

Manifest and docs:
- version 2.0.0, `private`, `dsh.manifestVersion`, and `engines`
- delete the Gitea npm publish workflow and every npm-publishing task: the
  package is distributed only through the Git repository and tags
- rewrite the README around the current install paths and the plugin's limits
2026-09-30 15:30:39 +08:00
pyh acaca33c49 ci: publish with the token that actually works
The job token belongs to the gitea-actions pseudo user, which is not an organisation member, and Gitea grants package write only to members of the owning organisation; v1.0.2 proved it with E401 on the job token and a successful publish on the PAT. The step now prefers NPM_TOKEN and only falls back to the job token, printing its identity when it does.
2026-09-30 14:31:41 +08:00
pyh 1a9165fa4f release: 1.0.2, and learn whether the built-in job token can publish
publish / npm (push) Successful in 5s
The publish step now tries the built-in Gitea job token first, prints which user it belongs to, falls back to NPM_TOKEN when the registry rejects it, and reports which token actually published. A 409 keeps meaning 'already published', so a re-run stays harmless.
2026-09-30 14:29:02 +08:00
pyh c842cd0118 docs(ci): describe the job token honestly instead of promising it
The first run failed with E401 while using the built-in token and before the workflow declared permissions, so nothing here proves the job token cannot publish. The header now says a write:package token is what makes publishing reliable, that the job token depends on the instance's Actions token settings, and that permissions: packages: write is what keeps a restricted token from being read-only.
2026-09-30 14:14:55 +08:00
pyh 0a452bd21b docs: mention the semver ref form for following 1.x
pnpm accepts #semver:^1.0.1 on a git address and resolves it against the repository tags; verified against this repository, where it selected the v1.0.1 commit.
2026-09-30 14:00:26 +08:00
pyh d09920363f docs: say which install field takes the git address
The dialog has two inputs: the spec field takes a package name, a git address or a local path, while the install source only decides which registry a package name is looked up in. Git and tarball specs are fetched directly, so the source can stay on its default; the previous wording left that open and the address ended up in the wrong field.
2026-09-30 13:54:51 +08:00
pyh b9445cbf4d docs: install from the git address or a tarball, and say why the npm source cannot work
Gitea's npm registry returns a fixed field set, so the dsh field never reaches the installer's registry preflight and the install is refused with 'declares no dsh.bundle'. The tarball and the git address carry the real package.json, so they are the routes that work.
2026-09-30 12:03:03 +08:00
pyh dbf6138df2 release: 1.0.1
publish / npm (push) Successful in 3s
Ships the rewritten README inside the package and pins the documented install specs to this version.
2026-09-30 11:54:43 +08:00
pyh 105e86edd5 docs: rewrite the README around the plugin itself
Only the features, the behaviour boundaries, the three ways to install it, and a precise compatibility statement remain; the release pipeline, the file layout and the local-directory install method are gone. The install section now mirrors how a published DSH plugin is described: npm package plus custom registry, a pinned git URL, or a downloaded tgz.
2026-09-30 11:46:17 +08:00
pyh ec8aadedb7 docs: record what the release workflow actually depends on
The publish section now says why the workflow avoids external actions, that a repeated version is a skip rather than a failure, and that an npm registry line pointing elsewhere produces a misleading 'version already exists'.
2026-09-30 11:37:25 +08:00
pyh 06889ab3ec ci: point the default registry at Gitea and recognise npm's duplicate-version error
Without setup-node nothing wrote the default registry, so npm compared versions against registry.npmjs.org and refused with 'cannot publish over the previously published versions'. The step now sets the default registry too, and treats both that message and Gitea's 409 as an idempotent skip.
2026-09-30 11:35:43 +08:00
pyh a3fbe602ff ci: drop the external actions so the runner never needs github.com
Runs 11 and 14 died on 'dial tcp 20.205.243.166:443: i/o timeout' while act_runner cloned actions/checkout from GitHub. The workflow now fetches its own ref with git and relies on the node already present in the runner image, so it only touches this instance.
2026-09-30 11:33:51 +08:00
pyh 3a806f84ab ci: treat an already-published version as a skip, not a failure
The registry check through npm view did not see the existing version, so publish ran into E409. The registry itself is the authority here: a 409 now reports 'already exists, skipping' and exits zero, while every other error still fails the step.
2026-09-30 11:31:42 +08:00
pyh f4e107782a ci: make a repeated release a no-op and drop the misleading diagnostics
Gitea does not implement the npm whoami endpoint and npm refuses to read an auth token back, so both lines only produced error-looking output. The run now checks the registry first and skips publishing a version that already exists, which also makes a manual re-run safe.
2026-09-30 11:28:57 +08:00
pyh 733f0ba456 ci: fall back to a PAT and self-diagnose the publish step
publish / npm (push) Failing after 31s
The first tagged run failed inside the publish step within a second, which is the shape of an auth rejection rather than a build problem. The step now prefers a repository NPM_TOKEN secret when one exists, prints the effective registry and a masked token, and runs npm whoami so a re-run names the cause instead of just failing.
2026-09-30 11:05:33 +08:00
pyh 37468d6ac9 feat!: publish as @dsh-plugin/session-delete with an automated Gitea npm release
publish / npm (push) Failing after 1m49s
The registry owner is the scope the package must publish under, so the name moves from @local/ to @dsh-plugin/ in all three places that must agree: package.json, cordis.patch.yml, and the client module id. `private` goes away because npm refuses to publish such a package, and publishConfig pins the registry to this organization's npm endpoint.

The tag workflow publishes whatever version the pushed v* tag names, using the built-in Gitea job token, and refuses a tag that disagrees with package.json.
2026-09-30 11:00:39 +08:00
pyh 29060db8dc chore: set the copyright holder to pyh 2026-09-30 10:57:21 +08:00
pyh 39a39adfec feat: permanently delete a conversation, sweep orphaned spill files 2026-09-30 10:43:38 +08:00