clearai-dsh 0.1.0 → 0.1.1
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
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are recorded here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
+
## [0.1.1] — 2026-09-12
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **The first delivery in a fresh workspace could lose its own ledger commit.** The ledger is created lazily, so if it happens to be created at the moment a step is delivered, that first commit was written as an anonymous "baseline" — the step itself then had no commit of its own in `FileHistory`. The baseline now carries the delivery's message, so the step is attributed either way. Found by CI running on the `v0.1.0` tag; the local machine never reproduced it, because another suite had already created the ledger first.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- The file-history assertion in the kernel suite picks the commit by step id instead of by position, and reports the whole history on failure rather than a truncated slice.
|
|
14
|
+
|
|
5
15
|
## [0.1.0] — 2026-09-12
|
|
6
16
|
|
|
7
17
|
The first release: ClearAI as a native DSH plugin.
|
|
@@ -23,4 +33,5 @@ The first release: ClearAI as a native DSH plugin.
|
|
|
23
33
|
- **Restart `dsh web` after installing**: both halves are cached in the running process, so a browser refresh is not enough.
|
|
24
34
|
- Known gaps — what is deliberately not implemented, and what has only been verified to a stated depth — are listed in [`docs/known-gaps.md`](docs/known-gaps.md).
|
|
25
35
|
|
|
36
|
+
[0.1.1]: https://github.com/Clearailhc/clearai-dsh/releases/tag/v0.1.1
|
|
26
37
|
[0.1.0]: https://github.com/Clearailhc/clearai-dsh/releases/tag/v0.1.0
|
package/package.json
CHANGED
|
@@ -3228,7 +3228,7 @@ export function apply(ctx, config = {}) {
|
|
|
3228
3228
|
* (`--git-dir` + `--work-tree`,用户文件夹里不会出现 `.git`)。
|
|
3229
3229
|
* 两者都不行 → mode 为 null,退化成声明目录并如实说明原因。
|
|
3230
3230
|
*/
|
|
3231
|
-
function gitContext(cwd) {
|
|
3231
|
+
function gitContext(cwd, baselineMessage) {
|
|
3232
3232
|
if (isGitWorkspace(cwd)) return { mode: 'workspace', cwd, gitDir: null, reason: null }
|
|
3233
3233
|
const gitDir = ledgerDirFor(cwd)
|
|
3234
3234
|
if (!existsSync(join(gitDir, 'HEAD'))) {
|
|
@@ -3243,7 +3243,12 @@ export function apply(ctx, config = {}) {
|
|
|
3243
3243
|
git(['--git-dir', gitDir, 'config', 'core.worktree', cwd], cwd)
|
|
3244
3244
|
const context = { mode: 'ledger', cwd, gitDir, reason: null }
|
|
3245
3245
|
const added = gitAt(context, ['add', '-A'])
|
|
3246
|
-
|
|
3246
|
+
/**
|
|
3247
|
+
* 基线的提交信息可以**由调用方给**:账本是懒建的,如果第一次建立就发生在某一步交付那一刻,
|
|
3248
|
+
* 那么这一笔既是基线、也是那一步的账 —— 信息必须写成那一步,否则那一步就"没有自己的提交"了
|
|
3249
|
+
* (实测:CI 上基线把第一步的内容吞掉,历史里那一步只剩一条匿名基线)。
|
|
3250
|
+
*/
|
|
3251
|
+
const committed = added.ok ? gitAt(context, [...GIT_IDENTITY, 'commit', '-qm', baselineMessage ?? 'clearai:旁路账本基线(工作区当时的全部内容)']) : added
|
|
3247
3252
|
if (!committed.ok && !/nothing to commit|无文件要提交|working tree clean/i.test(`${committed.out}${committed.err}`)) {
|
|
3248
3253
|
return { mode: null, cwd, gitDir: null, reason: `旁路账本基线提交失败:${(committed.err || committed.out || '').split('\n')[0]}` }
|
|
3249
3254
|
}
|
|
@@ -3266,7 +3271,8 @@ export function apply(ctx, config = {}) {
|
|
|
3266
3271
|
|
|
3267
3272
|
/** 在**当前工作区**上落一次账本提交;没有改动就不提交(空提交是噪音)。 */
|
|
3268
3273
|
function commitLedger(cwd, message) {
|
|
3269
|
-
|
|
3274
|
+
// 把这一步的信息带进建基线那一笔:懒建账本时,基线就是这一步的提交。
|
|
3275
|
+
const context = gitContext(cwd, message)
|
|
3270
3276
|
if (context.mode === null) return { ok: false, reason: context.reason ?? '没有可用的 git' }
|
|
3271
3277
|
const added = gitAt(context, ['add', '-A'])
|
|
3272
3278
|
if (added.ok !== true) return { ok: false, reason: `add 失败:${(added.err || '').split('\n')[0]}` }
|