@mindfoldhq/trellis 0.6.0-beta.12 → 0.6.0-beta.13
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/dist/commands/channel/context.d.ts +16 -0
- package/dist/commands/channel/context.d.ts.map +1 -0
- package/dist/commands/channel/context.js +83 -0
- package/dist/commands/channel/context.js.map +1 -0
- package/dist/commands/channel/create.d.ts +10 -8
- package/dist/commands/channel/create.d.ts.map +1 -1
- package/dist/commands/channel/create.js +22 -97
- package/dist/commands/channel/create.js.map +1 -1
- package/dist/commands/channel/index.d.ts.map +1 -1
- package/dist/commands/channel/index.js +117 -12
- package/dist/commands/channel/index.js.map +1 -1
- package/dist/commands/channel/list.js +14 -16
- package/dist/commands/channel/list.js.map +1 -1
- package/dist/commands/channel/messages.js +8 -10
- package/dist/commands/channel/messages.js.map +1 -1
- package/dist/commands/channel/send.d.ts.map +1 -1
- package/dist/commands/channel/send.js +15 -28
- package/dist/commands/channel/send.js.map +1 -1
- package/dist/commands/channel/store/events.d.ts +28 -64
- package/dist/commands/channel/store/events.d.ts.map +1 -1
- package/dist/commands/channel/store/events.js +27 -48
- package/dist/commands/channel/store/events.js.map +1 -1
- package/dist/commands/channel/store/filter.d.ts +2 -32
- package/dist/commands/channel/store/filter.d.ts.map +1 -1
- package/dist/commands/channel/store/filter.js +1 -62
- package/dist/commands/channel/store/filter.js.map +1 -1
- package/dist/commands/channel/store/schema.d.ts +25 -34
- package/dist/commands/channel/store/schema.d.ts.map +1 -1
- package/dist/commands/channel/store/schema.js +25 -82
- package/dist/commands/channel/store/schema.js.map +1 -1
- package/dist/commands/channel/store/thread-state.d.ts +3 -17
- package/dist/commands/channel/store/thread-state.d.ts.map +1 -1
- package/dist/commands/channel/store/thread-state.js +1 -66
- package/dist/commands/channel/store/thread-state.js.map +1 -1
- package/dist/commands/channel/text-body.d.ts +13 -0
- package/dist/commands/channel/text-body.d.ts.map +1 -0
- package/dist/commands/channel/text-body.js +47 -0
- package/dist/commands/channel/text-body.js.map +1 -0
- package/dist/commands/channel/threads.d.ts +11 -0
- package/dist/commands/channel/threads.d.ts.map +1 -1
- package/dist/commands/channel/threads.js +56 -46
- package/dist/commands/channel/threads.js.map +1 -1
- package/dist/commands/channel/title.d.ts +12 -0
- package/dist/commands/channel/title.d.ts.map +1 -0
- package/dist/commands/channel/title.js +24 -0
- package/dist/commands/channel/title.js.map +1 -0
- package/dist/migrations/manifests/0.6.0-beta.13.json +9 -0
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +1 -2
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +5 -5
- package/dist/utils/task-json.d.ts +9 -42
- package/dist/utils/task-json.d.ts.map +1 -1
- package/dist/utils/task-json.js +8 -45
- package/dist/utils/task-json.js.map +1 -1
- package/package.json +9 -8
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface TitleSetCliOptions {
|
|
2
|
+
as?: string;
|
|
3
|
+
title: string;
|
|
4
|
+
scope?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface TitleClearCliOptions {
|
|
7
|
+
as?: string;
|
|
8
|
+
scope?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function channelTitleSet(channelName: string, opts: TitleSetCliOptions): Promise<void>;
|
|
11
|
+
export declare function channelTitleClear(channelName: string, opts: TitleClearCliOptions): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=title.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../src/commands/channel/title.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,kBAAkB;IACjC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,oBAAoB,GACzB,OAAO,CAAC,IAAI,CAAC,CASf"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { clearChannelTitle, setChannelTitle, } from "@mindfoldhq/trellis-core/channel";
|
|
2
|
+
import { parseChannelScope } from "./store/schema.js";
|
|
3
|
+
export async function channelTitleSet(channelName, opts) {
|
|
4
|
+
const scope = parseChannelScope(opts.scope);
|
|
5
|
+
const event = await setChannelTitle({
|
|
6
|
+
channel: channelName,
|
|
7
|
+
by: opts.as ?? "main",
|
|
8
|
+
title: opts.title,
|
|
9
|
+
...(scope !== undefined ? { scope } : {}),
|
|
10
|
+
origin: "cli",
|
|
11
|
+
});
|
|
12
|
+
console.log(JSON.stringify(event));
|
|
13
|
+
}
|
|
14
|
+
export async function channelTitleClear(channelName, opts) {
|
|
15
|
+
const scope = parseChannelScope(opts.scope);
|
|
16
|
+
const event = await clearChannelTitle({
|
|
17
|
+
channel: channelName,
|
|
18
|
+
by: opts.as ?? "main",
|
|
19
|
+
...(scope !== undefined ? { scope } : {}),
|
|
20
|
+
origin: "cli",
|
|
21
|
+
});
|
|
22
|
+
console.log(JSON.stringify(event));
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=title.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"title.js","sourceRoot":"","sources":["../../../src/commands/channel/title.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,eAAe,GAEhB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAatD,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,WAAmB,EACnB,IAAwB;IAExB,MAAM,KAAK,GAA6B,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACtE,MAAM,KAAK,GAAG,MAAM,eAAe,CAAC;QAClC,OAAO,EAAE,WAAW;QACpB,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,MAAM;QACrB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,MAAM,EAAE,KAAK;KACd,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;AACrC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,WAAmB,EACnB,IAA0B;IAE1B,MAAM,KAAK,GAA6B,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACtE,MAAM,KAAK,GAAG,MAAM,iBAAiB,CAAC;QACpC,OAAO,EAAE,WAAW;QACpB,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,MAAM;QACrB,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,MAAM,EAAE,KAAK;KACd,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.6.0-beta.13",
|
|
3
|
+
"description": "Beta patch: add the trellis-core SDK package, finalize thread channel naming/context commands, and publish core with the CLI.",
|
|
4
|
+
"breaking": true,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Enhancements:**\n- feat(core): add `@mindfoldhq/trellis-core` with public `channel`, `task`, and `testing` exports for Node consumers.\n- feat(channel): use `trellis channel create --type threads` for thread channels and add `trellis channel context`, `trellis channel title`, and `trellis channel thread rename`.\n- feat(channel): add `--context-file` and `--context-raw` as canonical context flags while accepting `--linked-context-*` aliases.\n\n**Internal:**\n- chore(release): publish `@mindfoldhq/trellis-core` before `@mindfoldhq/trellis` with one version, one dist-tag, provenance, and packed CLI dependency checks.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Beta users should replace `trellis channel create --type thread` with `trellis channel create --type threads`. Run `trellis update` to pull in the core SDK-backed channel commands. No file migration is required."
|
|
9
|
+
}
|
|
@@ -64,8 +64,7 @@ grep -r "keyword" .
|
|
|
64
64
|
|
|
65
65
|
```typescript
|
|
66
66
|
const description = (ev as { description?: string }).description;
|
|
67
|
-
const
|
|
68
|
-
.linkedContext;
|
|
67
|
+
const context = (ev as { context?: ContextEntry[] }).context;
|
|
69
68
|
```
|
|
70
69
|
|
|
71
70
|
This is duplicated contract logic even when the code is only two lines. Each
|
|
@@ -252,8 +252,8 @@ CLI input → event writer → events.jsonl → reader → filter → reducer
|
|
|
252
252
|
use the same filter model
|
|
253
253
|
|
|
254
254
|
**Real-world example**: Thread channels added `kind: "thread"`, `description`,
|
|
255
|
-
`
|
|
256
|
-
correctly, but several commands still re-parsed event payload fields with
|
|
257
|
-
casts. The fix was to make
|
|
258
|
-
`isThreadEvent`,
|
|
259
|
-
|
|
255
|
+
`context`, labels, and `lastSeq`. The first implementation replayed thread
|
|
256
|
+
state correctly, but several commands still re-parsed event payload fields with
|
|
257
|
+
local casts. The fix was to make the core event layer own `ThreadChannelEvent`
|
|
258
|
+
and `isThreadEvent`, make `reduceChannelMetadata` the only channel metadata
|
|
259
|
+
projection, and make `reduceThreads` the only thread replay reducer.
|
|
@@ -1,46 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Canonical task.json shape — single source of truth shared by all TS
|
|
2
|
+
* Canonical task.json shape — single source of truth shared by all TS
|
|
3
|
+
* writers. The canonical types and factory now live in the
|
|
4
|
+
* `@mindfoldhq/trellis-core` task API; this module re-exports them under
|
|
5
|
+
* the legacy `TaskJson` / `emptyTaskJson` names for CLI call sites.
|
|
3
6
|
*
|
|
4
|
-
*
|
|
5
|
-
* `
|
|
6
|
-
* so bootstrap tasks (trellis init) and migration tasks (trellis update
|
|
7
|
-
* --migrate) produce structurally identical task.json files.
|
|
8
|
-
*
|
|
9
|
-
* Field names, order, and null defaults match task_store.py exactly.
|
|
10
|
-
*/
|
|
11
|
-
export interface TaskJson {
|
|
12
|
-
id: string;
|
|
13
|
-
name: string;
|
|
14
|
-
title: string;
|
|
15
|
-
description: string;
|
|
16
|
-
status: string;
|
|
17
|
-
dev_type: string | null;
|
|
18
|
-
scope: string | null;
|
|
19
|
-
package: string | null;
|
|
20
|
-
priority: string;
|
|
21
|
-
creator: string;
|
|
22
|
-
assignee: string;
|
|
23
|
-
createdAt: string;
|
|
24
|
-
completedAt: string | null;
|
|
25
|
-
branch: string | null;
|
|
26
|
-
base_branch: string | null;
|
|
27
|
-
worktree_path: string | null;
|
|
28
|
-
commit: string | null;
|
|
29
|
-
pr_url: string | null;
|
|
30
|
-
subtasks: string[];
|
|
31
|
-
children: string[];
|
|
32
|
-
parent: string | null;
|
|
33
|
-
relatedFiles: string[];
|
|
34
|
-
notes: string;
|
|
35
|
-
meta: Record<string, unknown>;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Produce a fully-populated canonical-shape TaskJson.
|
|
39
|
-
*
|
|
40
|
-
* All 24 fields are emitted in canonical order. `overrides` shallow-merges on
|
|
41
|
-
* top — callers should supply the per-task values (id, name, title, assignee,
|
|
42
|
-
* createdAt, etc.) and leave null-default fields untouched unless they have a
|
|
43
|
-
* real value.
|
|
7
|
+
* New code should prefer `TrellisTaskRecord` / `emptyTaskRecord` from
|
|
8
|
+
* `@mindfoldhq/trellis-core/task` directly.
|
|
44
9
|
*/
|
|
45
|
-
|
|
10
|
+
import { emptyTaskRecord, type TrellisTaskRecord } from "@mindfoldhq/trellis-core/task";
|
|
11
|
+
export type TaskJson = TrellisTaskRecord;
|
|
12
|
+
export declare const emptyTaskJson: typeof emptyTaskRecord;
|
|
46
13
|
//# sourceMappingURL=task-json.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-json.d.ts","sourceRoot":"","sources":["../../src/utils/task-json.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"task-json.d.ts","sourceRoot":"","sources":["../../src/utils/task-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,eAAe,EACf,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,MAAM,QAAQ,GAAG,iBAAiB,CAAC;AAEzC,eAAO,MAAM,aAAa,wBAAkB,CAAC"}
|
package/dist/utils/task-json.js
CHANGED
|
@@ -1,49 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Canonical task.json shape — single source of truth shared by all TS
|
|
2
|
+
* Canonical task.json shape — single source of truth shared by all TS
|
|
3
|
+
* writers. The canonical types and factory now live in the
|
|
4
|
+
* `@mindfoldhq/trellis-core` task API; this module re-exports them under
|
|
5
|
+
* the legacy `TaskJson` / `emptyTaskJson` names for CLI call sites.
|
|
3
6
|
*
|
|
4
|
-
*
|
|
5
|
-
* `
|
|
6
|
-
* so bootstrap tasks (trellis init) and migration tasks (trellis update
|
|
7
|
-
* --migrate) produce structurally identical task.json files.
|
|
8
|
-
*
|
|
9
|
-
* Field names, order, and null defaults match task_store.py exactly.
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Produce a fully-populated canonical-shape TaskJson.
|
|
13
|
-
*
|
|
14
|
-
* All 24 fields are emitted in canonical order. `overrides` shallow-merges on
|
|
15
|
-
* top — callers should supply the per-task values (id, name, title, assignee,
|
|
16
|
-
* createdAt, etc.) and leave null-default fields untouched unless they have a
|
|
17
|
-
* real value.
|
|
7
|
+
* New code should prefer `TrellisTaskRecord` / `emptyTaskRecord` from
|
|
8
|
+
* `@mindfoldhq/trellis-core/task` directly.
|
|
18
9
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const base = {
|
|
22
|
-
id: "",
|
|
23
|
-
name: "",
|
|
24
|
-
title: "",
|
|
25
|
-
description: "",
|
|
26
|
-
status: "planning",
|
|
27
|
-
dev_type: null,
|
|
28
|
-
scope: null,
|
|
29
|
-
package: null,
|
|
30
|
-
priority: "P2",
|
|
31
|
-
creator: "",
|
|
32
|
-
assignee: "",
|
|
33
|
-
createdAt: today,
|
|
34
|
-
completedAt: null,
|
|
35
|
-
branch: null,
|
|
36
|
-
base_branch: null,
|
|
37
|
-
worktree_path: null,
|
|
38
|
-
commit: null,
|
|
39
|
-
pr_url: null,
|
|
40
|
-
subtasks: [],
|
|
41
|
-
children: [],
|
|
42
|
-
parent: null,
|
|
43
|
-
relatedFiles: [],
|
|
44
|
-
notes: "",
|
|
45
|
-
meta: {},
|
|
46
|
-
};
|
|
47
|
-
return { ...base, ...overrides };
|
|
48
|
-
}
|
|
10
|
+
import { emptyTaskRecord, } from "@mindfoldhq/trellis-core/task";
|
|
11
|
+
export const emptyTaskJson = emptyTaskRecord;
|
|
49
12
|
//# sourceMappingURL=task-json.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-json.js","sourceRoot":"","sources":["../../src/utils/task-json.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"task-json.js","sourceRoot":"","sources":["../../src/utils/task-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,eAAe,GAEhB,MAAM,+BAA+B,CAAC;AAIvC,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindfoldhq/trellis",
|
|
3
|
-
"version": "0.6.0-beta.
|
|
3
|
+
"version": "0.6.0-beta.13",
|
|
4
4
|
"description": "AI capabilities grow like ivy — Trellis provides the structure to guide them along a disciplined path",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"giget": "^3.1.1",
|
|
34
34
|
"inquirer": "^9.3.7",
|
|
35
35
|
"undici": "^6.21.0",
|
|
36
|
-
"zod": "^4.4.2"
|
|
36
|
+
"zod": "^4.4.2",
|
|
37
|
+
"@mindfoldhq/trellis-core": "0.6.0-beta.13"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@eslint/js": "^9.18.0",
|
|
@@ -77,12 +78,12 @@
|
|
|
77
78
|
"typecheck": "tsc --noEmit",
|
|
78
79
|
"lint:py": "basedpyright",
|
|
79
80
|
"lint:all": "pnpm lint && pnpm lint:py",
|
|
80
|
-
"release": "node scripts/
|
|
81
|
-
"release:minor": "node scripts/
|
|
82
|
-
"release:major": "node scripts/
|
|
83
|
-
"release:beta": "node scripts/
|
|
84
|
-
"release:rc": "node scripts/
|
|
85
|
-
"release:promote": "node scripts/
|
|
81
|
+
"release": "node scripts/release.js patch",
|
|
82
|
+
"release:minor": "node scripts/release.js minor",
|
|
83
|
+
"release:major": "node scripts/release.js major",
|
|
84
|
+
"release:beta": "node scripts/release.js beta",
|
|
85
|
+
"release:rc": "node scripts/release.js rc",
|
|
86
|
+
"release:promote": "node scripts/release.js promote",
|
|
86
87
|
"manifest": "node scripts/create-manifest.js"
|
|
87
88
|
}
|
|
88
89
|
}
|