@pennixrv/trellis 0.7.0-beta.5 → 0.7.0-beta.50
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/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +47 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/backup.d.ts +25 -0
- package/dist/commands/backup.d.ts.map +1 -0
- package/dist/commands/backup.js +152 -0
- package/dist/commands/backup.js.map +1 -0
- package/dist/commands/channel/adapters/claude.d.ts.map +1 -1
- package/dist/commands/channel/adapters/claude.js +2 -0
- package/dist/commands/channel/adapters/claude.js.map +1 -1
- package/dist/commands/channel/adapters/codex.d.ts +5 -1
- package/dist/commands/channel/adapters/codex.d.ts.map +1 -1
- package/dist/commands/channel/adapters/codex.js +19 -9
- package/dist/commands/channel/adapters/codex.js.map +1 -1
- package/dist/commands/channel/adapters/index.d.ts +3 -0
- package/dist/commands/channel/adapters/index.d.ts.map +1 -1
- package/dist/commands/channel/adapters/index.js +3 -3
- package/dist/commands/channel/adapters/index.js.map +1 -1
- package/dist/commands/channel/adapters/types.d.ts +2 -0
- package/dist/commands/channel/adapters/types.d.ts.map +1 -1
- package/dist/commands/channel/guard.d.ts.map +1 -1
- package/dist/commands/channel/guard.js +38 -29
- package/dist/commands/channel/guard.js.map +1 -1
- package/dist/commands/channel/index.d.ts.map +1 -1
- package/dist/commands/channel/index.js +52 -16
- package/dist/commands/channel/index.js.map +1 -1
- package/dist/commands/channel/kill.d.ts.map +1 -1
- package/dist/commands/channel/kill.js +37 -15
- package/dist/commands/channel/kill.js.map +1 -1
- package/dist/commands/channel/messages.d.ts.map +1 -1
- package/dist/commands/channel/messages.js +3 -2
- package/dist/commands/channel/messages.js.map +1 -1
- package/dist/commands/channel/process-identity.d.ts +3 -0
- package/dist/commands/channel/process-identity.d.ts.map +1 -0
- package/dist/commands/channel/process-identity.js +24 -0
- package/dist/commands/channel/process-identity.js.map +1 -0
- package/dist/commands/channel/profiles.d.ts +26 -0
- package/dist/commands/channel/profiles.d.ts.map +1 -0
- package/dist/commands/channel/profiles.js +186 -0
- package/dist/commands/channel/profiles.js.map +1 -0
- package/dist/commands/channel/rm.d.ts +0 -1
- package/dist/commands/channel/rm.d.ts.map +1 -1
- package/dist/commands/channel/rm.js +203 -96
- package/dist/commands/channel/rm.js.map +1 -1
- package/dist/commands/channel/spawn.d.ts +3 -0
- package/dist/commands/channel/spawn.d.ts.map +1 -1
- package/dist/commands/channel/spawn.js +43 -15
- package/dist/commands/channel/spawn.js.map +1 -1
- package/dist/commands/channel/supervisor/idle.d.ts +2 -0
- package/dist/commands/channel/supervisor/idle.d.ts.map +1 -1
- package/dist/commands/channel/supervisor/idle.js +15 -7
- package/dist/commands/channel/supervisor/idle.js.map +1 -1
- package/dist/commands/channel/supervisor/inbox.d.ts.map +1 -1
- package/dist/commands/channel/supervisor/inbox.js +48 -33
- package/dist/commands/channel/supervisor/inbox.js.map +1 -1
- package/dist/commands/channel/supervisor/stdout.d.ts.map +1 -1
- package/dist/commands/channel/supervisor/stdout.js +6 -3
- package/dist/commands/channel/supervisor/stdout.js.map +1 -1
- package/dist/commands/channel/supervisor/warning.d.ts.map +1 -1
- package/dist/commands/channel/supervisor/warning.js +2 -3
- package/dist/commands/channel/supervisor/warning.js.map +1 -1
- package/dist/commands/channel/supervisor.d.ts +12 -0
- package/dist/commands/channel/supervisor.d.ts.map +1 -1
- package/dist/commands/channel/supervisor.js +88 -16
- package/dist/commands/channel/supervisor.js.map +1 -1
- package/dist/commands/channel/wait.d.ts +3 -1
- package/dist/commands/channel/wait.d.ts.map +1 -1
- package/dist/commands/channel/wait.js +59 -14
- package/dist/commands/channel/wait.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +23 -10
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +446 -333
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/workflow.d.ts +1 -0
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +56 -1
- package/dist/commands/workflow.js.map +1 -1
- package/dist/configurators/codex.d.ts +6 -0
- package/dist/configurators/codex.d.ts.map +1 -1
- package/dist/configurators/codex.js +93 -0
- package/dist/configurators/codex.js.map +1 -1
- package/dist/configurators/shared.js +2 -2
- package/dist/configurators/shared.js.map +1 -1
- package/dist/constants/paths.d.ts +2 -0
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +2 -0
- package/dist/constants/paths.js.map +1 -1
- package/dist/migrations/manifests/0.7.0-beta.10.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.11.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.12.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.13.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.14.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.15.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.16.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.17.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.18.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.19.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.20.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.21.json +17 -0
- package/dist/migrations/manifests/0.7.0-beta.22.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.23.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.24.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.25.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.26.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.27.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.28.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.29.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.30.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.31.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.32.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.33.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.34.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.35.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.36.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.37.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.38.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.39.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.40.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.41.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.42.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.43.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.44.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.45.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.46.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.47.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.48.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.49.json +13 -0
- package/dist/migrations/manifests/0.7.0-beta.50.json +12 -0
- package/dist/migrations/manifests/0.7.0-beta.6.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.7.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.8.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.9.json +9 -0
- package/dist/templates/codex/hooks/session-start.py +21 -17
- package/dist/templates/common/bundled-skills/trellis-channel/SKILL.md +3 -1
- package/dist/templates/common/bundled-skills/trellis-channel/references/command-reference.md +24 -16
- package/dist/templates/common/bundled-skills/trellis-channel/references/forum.md +4 -12
- package/dist/templates/common/bundled-skills/trellis-channel/references/multi-target-dispatch.md +139 -0
- package/dist/templates/common/bundled-skills/trellis-channel/references/progress-debugging.md +9 -5
- package/dist/templates/common/bundled-skills/trellis-channel/references/subnode-work.md +84 -14
- package/dist/templates/common/bundled-skills/trellis-channel/references/workers.md +9 -11
- package/dist/templates/common/bundled-skills/trellis-channel/references/workflows.md +25 -14
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +13 -11
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-task-lifecycle.md +7 -2
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +6 -1
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workflow.md +6 -4
- package/dist/templates/common/bundled-skills/trellis-session-insight/SKILL.md +42 -3
- package/dist/templates/common/bundled-skills/trellis-session-insight/references/cli-quick-reference.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-session-insight/references/triggering-patterns.md +10 -2
- package/dist/templates/common/commands/continue.md +36 -8
- package/dist/templates/common/commands/finish-work.md +17 -2
- package/dist/templates/common/commands/start.md +8 -1
- package/dist/templates/common/skills/brainstorm.md +49 -22
- package/dist/templates/common/skills/break-loop.md +6 -10
- package/dist/templates/common/skills/check.md +34 -5
- package/dist/templates/copilot/hooks/session-start.py +19 -15
- package/dist/templates/copilot/prompts/brainstorm.prompt.md +27 -21
- package/dist/templates/markdown/spec/backend/database-guidelines.md.txt +22 -22
- package/dist/templates/markdown/spec/backend/directory-structure.md.txt +20 -20
- package/dist/templates/markdown/spec/backend/error-handling.md.txt +22 -22
- package/dist/templates/markdown/spec/backend/index.md.txt +19 -19
- package/dist/templates/markdown/spec/backend/logging-guidelines.md.txt +22 -22
- package/dist/templates/markdown/spec/backend/quality-guidelines.md.txt +22 -22
- package/dist/templates/markdown/spec/frontend/component-guidelines.md.txt +25 -25
- package/dist/templates/markdown/spec/frontend/directory-structure.md.txt +20 -20
- package/dist/templates/markdown/spec/frontend/hook-guidelines.md.txt +22 -22
- package/dist/templates/markdown/spec/frontend/index.md.txt +20 -20
- package/dist/templates/markdown/spec/frontend/quality-guidelines.md.txt +22 -22
- package/dist/templates/markdown/spec/frontend/state-management.md.txt +22 -22
- package/dist/templates/markdown/spec/frontend/type-safety.md.txt +22 -22
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +80 -85
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +164 -209
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +161 -185
- package/dist/templates/markdown/spec/guides/index.md.txt +51 -51
- package/dist/templates/markdown/workspace-index.md +44 -44
- package/dist/templates/opencode/lib/session-utils.js +2 -2
- package/dist/templates/shared-hooks/inject-shell-session-context.py +3 -6
- package/dist/templates/shared-hooks/inject-workflow-state.py +3 -2
- package/dist/templates/shared-hooks/session-start.py +23 -18
- package/dist/templates/trellis/agents/subnode-profiles.json +13 -0
- package/dist/templates/trellis/agents/subnode.md +11 -5
- package/dist/templates/trellis/config.yaml +2 -0
- package/dist/templates/trellis/index.d.ts +2 -1
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +4 -2
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/add_session.py +35 -32
- package/dist/templates/trellis/scripts/common/active_task.py +8 -8
- package/dist/templates/trellis/scripts/common/developer.py +18 -18
- package/dist/templates/trellis/scripts/common/ownership_record.py +13 -8
- package/dist/templates/trellis/scripts/common/safe_commit.py +38 -9
- package/dist/templates/trellis/scripts/common/task_planning.py +137 -0
- package/dist/templates/trellis/scripts/common/task_store.py +46 -14
- package/dist/templates/trellis/scripts/common/workflow_phase.py +4 -3
- package/dist/templates/trellis/scripts/subnode_artifact.py +470 -21
- package/dist/templates/trellis/scripts/task.py +175 -2
- package/dist/templates/trellis/workflow.md +407 -388
- package/dist/utils/managed-paths.d.ts +2 -0
- package/dist/utils/managed-paths.d.ts.map +1 -1
- package/dist/utils/managed-paths.js +24 -2
- package/dist/utils/managed-paths.js.map +1 -1
- package/dist/utils/template-fetcher.d.ts +1 -0
- package/dist/utils/template-fetcher.d.ts.map +1 -1
- package/dist/utils/template-fetcher.js +2 -1
- package/dist/utils/template-fetcher.js.map +1 -1
- package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
- package/dist/utils/uninstall-scrubbers.js +5 -0
- package/dist/utils/uninstall-scrubbers.js.map +1 -1
- package/dist/utils/workflow-provenance.d.ts +24 -0
- package/dist/utils/workflow-provenance.d.ts.map +1 -0
- package/dist/utils/workflow-provenance.js +71 -0
- package/dist/utils/workflow-provenance.js.map +1 -0
- package/dist/utils/workflow-resolver.d.ts +9 -2
- package/dist/utils/workflow-resolver.d.ts.map +1 -1
- package/dist/utils/workflow-resolver.js +33 -7
- package/dist/utils/workflow-resolver.js.map +1 -1
- package/package.json +2 -2
- package/dist/templates/trellis/agents/subnode.env +0 -4
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.0-beta.40",
|
|
3
|
+
"description": "Durable owned Codex session relationships and binding readiness",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "Record new owned Codex bindings outside removable Channels and expose exact historical descendants through channel sessions; wait for persisted binding before turn delivery.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Tracking starts at activation. No pre-upgrade history import or recovery; use native Trellis update for generated assets."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.0-beta.41",
|
|
3
|
+
"description": "Read-only research completion and explicit subnode dispatch approval",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "Allow complex and cross-owner analysis-only work to complete in planning without implementation approval. Require a frozen, explicitly approved evidence plan before requested subnode dispatch; preserve change-bearing Planning Seal and approval.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "No migrations. Research remains bounded by the protected-target no-change contract."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.0-beta.42",
|
|
3
|
+
"description": "Bounded in-progress amendments and retired Herdr cleanup",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "Allow explicit low-risk same-task amendments to remain in progress while preserving replan gates for material changes. Remove the retired Herdr workflow hook and integration residue.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "No migrations. Existing task state and user-owned Herdr history remain untouched."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.0-beta.43",
|
|
3
|
+
"description": "Effective AGENTS source diagnostics and progressive decisions",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "Report non-empty same-directory AGENTS overrides without modifying user rules. Screen genuine user decisions progressively and escalate material execution ambiguity through native replan. Keep project graph checks capability-aware.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "No migrations. Existing task state, user-owned AGENTS text and overrides are preserved."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.0-beta.44",
|
|
3
|
+
"description": "Bounded Codex memory queries and workflow asset boundaries",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "Read Codex JSONL memory queries in bounded passes, preserve compaction and repeated-turn semantics, enforce context character budgets, and clarify managed asset, dispatch, archive acceptance, and bulk research boundaries.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "No migrations. Existing session data, task state, and user-owned workflow files are preserved."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.0-beta.45",
|
|
3
|
+
"description": "Bounded Codex memory queries and workflow asset boundaries",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "Read Codex JSONL memory queries in bounded passes, preserve compaction and repeated-turn semantics, enforce context character budgets, and clarify managed asset, dispatch, archive acceptance, and bulk research boundaries.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "No migrations. Existing session data, task state, and user-owned workflow files are preserved."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.0-beta.46",
|
|
3
|
+
"description": "Idea-to-plan routing and closed-loop review guidance",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "Add workflow guidance for separating facts from decisions, recording evidence at the natural task artifact, grilling consequential choices, closing review loops, and assigning boundaries to neighboring defects.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "No migrations. Existing session data, task state, and user-owned workflow files are preserved."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.0-beta.47",
|
|
3
|
+
"description": "简体中文默认用户文档模板与双格式解析",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "原生 workflow、任务 PRD、workspace 和 spec 源模板使用中文优先正文;阶段标题和日志续写支持旧英文及新双语格式。",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "不迁移既有用户文档或历史日志。原生 workflow 继续按模板哈希更新,用户冲突和第三方 workflow 保持原生保护。"
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.0-beta.48",
|
|
3
|
+
"description": "工作流资源留存与安全清理边界",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "Channel、Grok 输出、FastCtx 后台任务和 Trellis 备份增加有界留存与原生清理入口;清理默认只读预览,并在无法证明归属或状态异常时安全停止。",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "不迁移既有项目资产或运行态数据。新清理入口由各组件原生所有者执行,未知、活动或无归属资源继续保留。"
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.0-beta.49",
|
|
3
|
+
"description": "Protect update backups and report actual pruning results",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": [
|
|
7
|
+
"Share an exclusive lock between update writes and backup pruning",
|
|
8
|
+
"Separate preview candidates and estimated bytes from actual successful removals",
|
|
9
|
+
"Report partial deletion failures without counting them as reclaimed bytes"
|
|
10
|
+
],
|
|
11
|
+
"migrations": [],
|
|
12
|
+
"notes": "No project migration or automatic backup deletion."
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.0-beta.50",
|
|
3
|
+
"description": "Preserve project instruction bytes when appending the Trellis block",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": [
|
|
7
|
+
"Preserve trailing spaces and blank lines in existing project instructions during init",
|
|
8
|
+
"Verify that manual content and an existing CodeGraph block remain byte-for-byte intact"
|
|
9
|
+
],
|
|
10
|
+
"migrations": [],
|
|
11
|
+
"notes": "No project workflow change or automatic migration."
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.0-beta.6",
|
|
3
|
+
"description": "Pennix v0.7 beta release tag isolation",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Bug Fixes:**\n- Beta release pushes only its newly-created tag, preventing unrelated local tags from triggering npm publish workflows.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Run `npm install -g @pennixrv/trellis@beta` then `trellis update`. No `--migrate` required."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.0-beta.7",
|
|
3
|
+
"description": "Pennix v0.7 beta release verification normalization",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Bug Fixes:**\n- Normalize npm's single-item JSON array response during local and CI visibility verification.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Run `npm install -g @pennixrv/trellis@beta` then `trellis update`. No `--migrate` required."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.0-beta.8",
|
|
3
|
+
"description": "Pennix v0.7 beta decision-chain replanning",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Features:**\n- Add an auditable same-task replan transition for material implementation-time decisions.\n- Preserve every planning interval in `trellis mem --phase brainstorm`.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Run `npm install -g @pennixrv/trellis@beta` then `trellis update`. No `--migrate` required."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.0-beta.9",
|
|
3
|
+
"description": "Pennix v0.7 beta planning and evidence governance",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Features:**\n- Require complex analysis to use normal planning and a sealed decision chain.\n- Add evidence units and schema-v2 subnode reports with coordinator-only acceptance.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Run npm install -g @pennixrv/trellis@beta then trellis update. No --migrate required."
|
|
9
|
+
}
|
|
@@ -240,8 +240,8 @@ def _get_task_status(trellis_dir: Path, hook_input: dict) -> str:
|
|
|
240
240
|
if not active.task_path:
|
|
241
241
|
return (
|
|
242
242
|
"Status: NO ACTIVE TASK\n"
|
|
243
|
-
"Next: Classify the current turn
|
|
244
|
-
"
|
|
243
|
+
"Next: Classify the current turn; simple conversation needs no task, "
|
|
244
|
+
"bounded direct work uses the direct path, and complex work creates a task only when planning is authorized."
|
|
245
245
|
)
|
|
246
246
|
|
|
247
247
|
task_ref = active.task_path
|
|
@@ -253,12 +253,10 @@ def _get_task_status(trellis_dir: Path, hook_input: dict) -> str:
|
|
|
253
253
|
)
|
|
254
254
|
|
|
255
255
|
task_json_path = task_dir / "task.json"
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
except (json.JSONDecodeError, PermissionError):
|
|
261
|
-
pass # Optional task metadata; fall back to generic status.
|
|
256
|
+
from common.io import read_json_checked
|
|
257
|
+
task_data, _reason = read_json_checked(task_json_path)
|
|
258
|
+
if task_data is None or not isinstance(task_data.get("status"), str) or not task_data["status"].strip():
|
|
259
|
+
return f"Status: TASK_ERROR\nTask: {task_ref}\nNext: Repair the existing task record through its owner before continuing; do not create a replacement task."
|
|
262
260
|
|
|
263
261
|
task_title = task_data.get("title", task_ref)
|
|
264
262
|
task_status = task_data.get("status", "unknown")
|
|
@@ -396,13 +394,15 @@ def _build_compact_current_state(
|
|
|
396
394
|
lines.append(f"Current task: ambiguous; candidates={candidates}; bind explicitly.")
|
|
397
395
|
elif active.task_path:
|
|
398
396
|
task_dir = _resolve_task_dir(trellis_dir, active.task_path)
|
|
399
|
-
status = "
|
|
397
|
+
status = "task_error"
|
|
400
398
|
task_json = task_dir / "task.json"
|
|
401
399
|
if task_json.is_file():
|
|
402
400
|
try:
|
|
403
401
|
data = json.loads(task_json.read_text(encoding="utf-8"))
|
|
404
402
|
if isinstance(data, dict):
|
|
405
|
-
|
|
403
|
+
value = data.get("status")
|
|
404
|
+
if isinstance(value, str) and value.strip():
|
|
405
|
+
status = value
|
|
406
406
|
except (json.JSONDecodeError, OSError):
|
|
407
407
|
pass # Optional task metadata; fall back to generic status.
|
|
408
408
|
lines.append(f"Current task: {_repo_relative(repo_root, task_dir)}; status={status}.")
|
|
@@ -431,19 +431,19 @@ def _build_compact_current_state(
|
|
|
431
431
|
return "\n".join(lines)
|
|
432
432
|
|
|
433
433
|
|
|
434
|
-
def _extract_range(content: str, start_header: str, end_header: str) -> str:
|
|
434
|
+
def _extract_range(content: str, start_header: tuple[str, ...], end_header: tuple[str, ...]) -> str:
|
|
435
435
|
"""Extract lines starting at `## start_header` up to (but excluding) `## end_header`."""
|
|
436
436
|
lines = content.splitlines()
|
|
437
437
|
start: "int | None" = None
|
|
438
438
|
end: int = len(lines)
|
|
439
|
-
|
|
440
|
-
|
|
439
|
+
start_matches = {f"## {header}" for header in start_header}
|
|
440
|
+
end_matches = {f"## {header}" for header in end_header}
|
|
441
441
|
for i, line in enumerate(lines):
|
|
442
442
|
stripped = line.strip()
|
|
443
|
-
if start is None and stripped
|
|
443
|
+
if start is None and stripped in start_matches:
|
|
444
444
|
start = i
|
|
445
445
|
continue
|
|
446
|
-
if start is not None and stripped
|
|
446
|
+
if start is not None and stripped in end_matches:
|
|
447
447
|
end = i
|
|
448
448
|
break
|
|
449
449
|
if start is None:
|
|
@@ -495,7 +495,7 @@ def _build_workflow_toc(workflow_path: Path) -> str:
|
|
|
495
495
|
"",
|
|
496
496
|
]
|
|
497
497
|
|
|
498
|
-
phases = _extract_range(content, "Phase Index", "Phase 1: Plan")
|
|
498
|
+
phases = _extract_range(content, ("阶段索引(Phase Index)", "Phase Index"), ("阶段一:规划(Phase 1: Plan)", "Phase 1: Plan"))
|
|
499
499
|
if phases:
|
|
500
500
|
out_lines.append(_strip_breadcrumb_tag_blocks(phases).rstrip())
|
|
501
501
|
|
|
@@ -511,11 +511,15 @@ def main() -> None:
|
|
|
511
511
|
hook_input = json.loads(sys.stdin.read())
|
|
512
512
|
if not isinstance(hook_input, dict):
|
|
513
513
|
hook_input = {}
|
|
514
|
-
|
|
514
|
+
raw_cwd = hook_input.get("cwd")
|
|
515
|
+
project_dir = Path(_normalize_windows_shell_path(raw_cwd if isinstance(raw_cwd, str) and raw_cwd else ".")).resolve()
|
|
515
516
|
except (json.JSONDecodeError, KeyError):
|
|
516
517
|
hook_input = {}
|
|
517
518
|
project_dir = Path(".").resolve()
|
|
518
519
|
|
|
520
|
+
project_dir = next((candidate for candidate in (project_dir, *project_dir.parents) if (candidate / ".trellis").is_dir()), None)
|
|
521
|
+
if project_dir is None or not (project_dir / ".trellis" / "scripts" / "common" / "active_task.py").is_file():
|
|
522
|
+
return
|
|
519
523
|
configure_project_encoding(project_dir)
|
|
520
524
|
|
|
521
525
|
trellis_dir = project_dir / ".trellis"
|
|
@@ -35,6 +35,7 @@ trellis channel context list <board> --scope global --thread <thread>
|
|
|
35
35
|
| "和 codex/claude 讨论一下", "brainstorm with another agent" | `references/workflows.md` |
|
|
36
36
|
| "派一个 implement/check agent", "让 agent review", "spawn a worker" | `references/workflows.md`, then `references/workers.md` |
|
|
37
37
|
| "独立取证", "subnode", "反证/独立审查", "持久化工作节点报告" | `references/subnode-work.md`, then `references/workers.md` |
|
|
38
|
+
| Multiple evidence units, FIFO refill, or task switching with live nodes | `references/subnode-work.md`, then `references/multi-target-dispatch.md` |
|
|
38
39
|
| "开 issue 区 / topic 群 / changelog / board", "make a forum" | `references/forum.md` |
|
|
39
40
|
| "看看这个 thread / linked context", "inspect a thread" | `references/forum.md` |
|
|
40
41
|
| "channel 卡住了 / 没输出 / progress 被截断", "worker stalled" | `references/progress-debugging.md` |
|
|
@@ -46,7 +47,7 @@ trellis channel context list <board> --scope global --thread <thread>
|
|
|
46
47
|
- Use `--context-file` / `--context-raw` and `trellis channel context add/delete/list`. `--linked-context-*` is deprecated terminology.
|
|
47
48
|
- Use `--stdin` or `--text-file` for long messages. Do not put long mixed Chinese/English text in the positional shell argument.
|
|
48
49
|
- Pretty `messages` output is an operator dashboard and may truncate progress. Use `--raw` for audit.
|
|
49
|
-
- `--as` is the speaker or worker handle, depending on the command.
|
|
50
|
+
- `--as` is the speaker or worker handle, depending on the command. Author commands default to `TRELLIS_CHANNEL_AS` or `main`; `kill` still requires the target worker, and multi-worker dispatch needs distinct worker names.
|
|
50
51
|
- `--scope project` (default) operates on the current cwd's project bucket; `--scope global` operates on the shared `__global__` bucket. Pick scope deliberately — a global board is invisible from project listings unless `--scope global` is passed.
|
|
51
52
|
- For brainstorm, do multiple pressure-test rounds. One answer plus one confirmation is review, not brainstorm.
|
|
52
53
|
- **Dispatcher wait pattern**: use `--kind done` / `--kind turn_finished` (trellis-emitted system events), NOT a user `--tag` as the completion signal. CLI help lists `phase_done` / `question` as `--tag` examples but only `interrupt` is a reserved tag with hardcoded trellis behavior; the others are opaque user labels. Relying on a worker to run `send --tag <my_signal>` is unreliable — LLM workers commonly write the tag string into prose instead of running the actual CLI command. See `references/command-reference.md` "tag vs kind".
|
|
@@ -59,6 +60,7 @@ trellis channel context list <board> --scope global --thread <thread>
|
|
|
59
60
|
- `references/forum.md` — forum channels, context, title, rename, changelog forums, thread filtering.
|
|
60
61
|
- `references/workers.md` — spawn, agent cards, context injection (`--file` / `--jsonl`), interrupts, kill semantics.
|
|
61
62
|
- `references/subnode-work.md` — bounded independent-evidence subnodes, their task artifacts, coordinator verification, and counterwork.
|
|
63
|
+
- `references/multi-target-dispatch.md` — one-host multi-target procedure, rolling FIFO acceptance, and drain before task selection.
|
|
62
64
|
- `references/progress-debugging.md` — progress/raw inspection, stalled worker diagnosis, OOM guard, exit codes.
|
|
63
65
|
- `references/command-reference.md` — current CLI command reference (every subcommand, every flag, output conventions, scope/type model).
|
|
64
66
|
|
package/dist/templates/common/bundled-skills/trellis-channel/references/command-reference.md
CHANGED
|
@@ -35,7 +35,7 @@ trellis channel create <name>
|
|
|
35
35
|
[--linked-context-file <abs-path>] # [deprecated alias]
|
|
36
36
|
[--linked-context-raw <text>] # [deprecated alias]
|
|
37
37
|
[--cwd <path>] # recorded in create event
|
|
38
|
-
[--by <agent>] # default: main
|
|
38
|
+
[--by <agent>] # default: TRELLIS_CHANNEL_AS or main
|
|
39
39
|
[--owner-session <id>] # opaque main Codex session owner
|
|
40
40
|
[--force] # overwrite existing channel
|
|
41
41
|
[--ephemeral] # hide from default list, prunable
|
|
@@ -76,7 +76,7 @@ Behavior:
|
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
78
|
trellis channel send <name> [text]
|
|
79
|
-
--as <agent>
|
|
79
|
+
[--as <agent>] # default: TRELLIS_CHANNEL_AS or main
|
|
80
80
|
[--scope project|global]
|
|
81
81
|
[--to <agents,csv>] # default: broadcast
|
|
82
82
|
[--stdin | --text-file <path>] # body from stdin or file
|
|
@@ -137,17 +137,18 @@ emit the event you intend to wait for, then pass it to `wait --after-seq`.
|
|
|
137
137
|
|
|
138
138
|
```bash
|
|
139
139
|
trellis channel wait <name>
|
|
140
|
-
--as <agent>
|
|
140
|
+
[--as <agent>] # default: TRELLIS_CHANNEL_AS or main
|
|
141
141
|
[--scope project|global]
|
|
142
142
|
[--timeout <Ns|Nm|Nh|Nms>] # parsed by parseDuration
|
|
143
143
|
[--after-seq <integer>] # replay only events after barrier
|
|
144
144
|
[--from <a,b>] # author CSV
|
|
145
|
+
[--workers <a,b>] # worker lifecycle CSV, separate mode
|
|
145
146
|
[--kind <k1,k2>] # CSV, OR semantics
|
|
146
147
|
[--thread <key>] # forum filter
|
|
147
148
|
[--action <thread-action>] # forum filter
|
|
148
149
|
[--to <target>] # default: own agent (broadcast + me)
|
|
149
150
|
[--include-progress] # also wake on progress events
|
|
150
|
-
[--all] # require every
|
|
151
|
+
[--all] # require every author or worker to match
|
|
151
152
|
```
|
|
152
153
|
|
|
153
154
|
Behavior:
|
|
@@ -155,13 +156,20 @@ Behavior:
|
|
|
155
156
|
- Streams matching events as JSON, one per line.
|
|
156
157
|
- Default `--to` filter is the caller's own agent (broadcast events still
|
|
157
158
|
match — broadcast + explicit-to-me).
|
|
158
|
-
- `--all` requires `--from` and blocks until every listed
|
|
159
|
-
|
|
159
|
+
- `--all` requires `--from` or `--workers` and blocks until every listed target
|
|
160
|
+
has matched.
|
|
161
|
+
- `--workers` waits for nonterminal-to-terminal worker lifecycle transitions
|
|
162
|
+
(`done`, `error`, `killed`, `crashed`) after the durable barrier and emits
|
|
163
|
+
terminal worker JSON with `workerId` and `lastSeq`. Supervisor author aliases
|
|
164
|
+
are handled by the core projection. Ordinary adapter errors and peer turn
|
|
165
|
+
completion are not terminal; previously terminal workers are not counted.
|
|
166
|
+
This mode rejects `--from`, `--kind`, `--to`, `--thread`, `--action` and
|
|
167
|
+
`--include-progress`. It does not accept a subnode report or disposition.
|
|
160
168
|
- Without `--after-seq`, the command captures its current event sequence before
|
|
161
169
|
constructing its watcher and ignores prior events. With `--after-seq`, it
|
|
162
170
|
replays matching events whose sequence is greater than that supplied barrier.
|
|
163
171
|
- **Timeout exits 124** and prints `timeout: still waiting on ...` to stderr
|
|
164
|
-
when `--all` was in play.
|
|
172
|
+
when `--all` or `--workers` was in play.
|
|
165
173
|
|
|
166
174
|
### `workers <name>`
|
|
167
175
|
|
|
@@ -246,7 +254,7 @@ trellis channel send T --as A --text-file /tmp/message.md
|
|
|
246
254
|
|
|
247
255
|
```bash
|
|
248
256
|
trellis channel interrupt <name> [text]
|
|
249
|
-
--as <agent>
|
|
257
|
+
[--as <agent>] # default: TRELLIS_CHANNEL_AS or main
|
|
250
258
|
--to <agent> # REQUIRED — target worker
|
|
251
259
|
[--scope project|global]
|
|
252
260
|
[--stdin | --text-file <path>]
|
|
@@ -270,6 +278,7 @@ trellis channel spawn <name>
|
|
|
270
278
|
[--scope project|global]
|
|
271
279
|
[--agent <agent-name>] # loads .trellis/agents/<name>.md
|
|
272
280
|
[--provider claude|codex] # overrides agent file
|
|
281
|
+
[--profile <id>] # subnode Codex profile; implies --agent subnode
|
|
273
282
|
[--as <worker-name>] # default: agent name
|
|
274
283
|
[--cwd <path>]
|
|
275
284
|
[--model <id>]
|
|
@@ -367,8 +376,7 @@ Behavior:
|
|
|
367
376
|
trellis channel prune
|
|
368
377
|
[--scope project|global] # omitted: scan every project
|
|
369
378
|
[--all | --empty | --idle <Ns|Nm|Nh|Nd> | --ephemeral] # mutually exclusive
|
|
370
|
-
[--yes] # actually delete
|
|
371
|
-
[--dry-run] # default true; redundant with default
|
|
379
|
+
[--yes] # actually delete; omitted means preview
|
|
372
380
|
[--keep <names,csv>] # exclusion list
|
|
373
381
|
```
|
|
374
382
|
|
|
@@ -389,7 +397,7 @@ Behavior:
|
|
|
389
397
|
|
|
390
398
|
```bash
|
|
391
399
|
trellis channel post <name> <action>
|
|
392
|
-
--as <agent>
|
|
400
|
+
[--as <agent>] # default: TRELLIS_CHANNEL_AS or main
|
|
393
401
|
[--scope project|global]
|
|
394
402
|
[--thread <key>] # required except action=opened
|
|
395
403
|
[--title <text>]
|
|
@@ -436,7 +444,7 @@ trellis channel thread <name> <thread-key>
|
|
|
436
444
|
[--raw]
|
|
437
445
|
|
|
438
446
|
trellis channel thread rename <name> <old-thread> <new-thread>
|
|
439
|
-
--as <agent>
|
|
447
|
+
[--as <agent>] # default: TRELLIS_CHANNEL_AS or main
|
|
440
448
|
[--scope project|global]
|
|
441
449
|
```
|
|
442
450
|
|
|
@@ -455,7 +463,7 @@ Behavior:
|
|
|
455
463
|
|
|
456
464
|
```bash
|
|
457
465
|
trellis channel context add <name>
|
|
458
|
-
[--as <agent>] # default: main
|
|
466
|
+
[--as <agent>] # default: TRELLIS_CHANNEL_AS or main
|
|
459
467
|
[--scope project|global]
|
|
460
468
|
[--thread <key>] # thread-level instead of channel-level
|
|
461
469
|
[--file <abs-path>] ... # repeatable
|
|
@@ -463,7 +471,7 @@ trellis channel context add <name>
|
|
|
463
471
|
# at least one of --file or --raw
|
|
464
472
|
|
|
465
473
|
trellis channel context delete <name>
|
|
466
|
-
[--as <agent>] # default: main
|
|
474
|
+
[--as <agent>] # default: TRELLIS_CHANNEL_AS or main
|
|
467
475
|
[--scope project|global]
|
|
468
476
|
[--thread <key>]
|
|
469
477
|
[--file <abs-path>] ...
|
|
@@ -486,11 +494,11 @@ Behavior:
|
|
|
486
494
|
```bash
|
|
487
495
|
trellis channel title set <name>
|
|
488
496
|
--title <text> # REQUIRED
|
|
489
|
-
[--as <agent>] # default: main
|
|
497
|
+
[--as <agent>] # default: TRELLIS_CHANNEL_AS or main
|
|
490
498
|
[--scope project|global]
|
|
491
499
|
|
|
492
500
|
trellis channel title clear <name>
|
|
493
|
-
[--as <agent>] # default: main
|
|
501
|
+
[--as <agent>] # default: TRELLIS_CHANNEL_AS or main
|
|
494
502
|
[--scope project|global]
|
|
495
503
|
```
|
|
496
504
|
|
|
@@ -26,8 +26,7 @@ trellis channel create design-feedback \
|
|
|
26
26
|
--type forum \
|
|
27
27
|
--scope global \
|
|
28
28
|
--description "Cross-project design feedback board." \
|
|
29
|
-
--context-raw "One thread per design topic; close when resolved."
|
|
30
|
-
--by main
|
|
29
|
+
--context-raw "One thread per design topic; close when resolved."
|
|
31
30
|
```
|
|
32
31
|
|
|
33
32
|
Use `--scope project` for a board scoped to one repo, `--scope global` for a
|
|
@@ -42,7 +41,6 @@ a thread is `opened`; everything afterwards uses the same `--thread` key.
|
|
|
42
41
|
```bash
|
|
43
42
|
trellis channel post design-feedback opened \
|
|
44
43
|
--scope global \
|
|
45
|
-
--as main \
|
|
46
44
|
--thread login-empty-state \
|
|
47
45
|
--title "Empty state on the login screen" \
|
|
48
46
|
--description "Track design feedback for the new login empty state." \
|
|
@@ -58,13 +56,11 @@ trellis channel post design-feedback comment \
|
|
|
58
56
|
|
|
59
57
|
trellis channel post design-feedback status \
|
|
60
58
|
--scope global \
|
|
61
|
-
--as main \
|
|
62
59
|
--thread login-empty-state \
|
|
63
60
|
--status closed
|
|
64
61
|
|
|
65
62
|
trellis channel post design-feedback summary \
|
|
66
63
|
--scope global \
|
|
67
|
-
--as main \
|
|
68
64
|
--thread login-empty-state \
|
|
69
65
|
--summary "Adopted the option-B layout; ticket TRELLIS-123 owns the fix."
|
|
70
66
|
```
|
|
@@ -187,12 +183,10 @@ wrong key (typo, wrong slug convention, etc.). Threads do not support hard
|
|
|
187
183
|
deletion — rename is the supported corrective action.
|
|
188
184
|
|
|
189
185
|
```bash
|
|
190
|
-
trellis channel thread rename design-feedback old-key new-key
|
|
191
|
-
--scope global \
|
|
192
|
-
--as main
|
|
186
|
+
trellis channel thread rename design-feedback old-key new-key --scope global
|
|
193
187
|
```
|
|
194
188
|
|
|
195
|
-
- `--as
|
|
189
|
+
- Omit `--as` to use `TRELLIS_CHANNEL_AS` or `main`; pass it only to attribute the rename to another actor.
|
|
196
190
|
- `post <name> rename` is rejected — you must use `thread rename`.
|
|
197
191
|
|
|
198
192
|
## Deletion Discipline
|
|
@@ -216,12 +210,10 @@ trellis channel create release-notes \
|
|
|
216
210
|
--type forum \
|
|
217
211
|
--scope global \
|
|
218
212
|
--description "Internal release and runtime changelog." \
|
|
219
|
-
--context-raw "One thread per notable change; close when shipped."
|
|
220
|
-
--by main
|
|
213
|
+
--context-raw "One thread per notable change; close when shipped."
|
|
221
214
|
|
|
222
215
|
trellis channel post release-notes opened \
|
|
223
216
|
--scope global \
|
|
224
|
-
--as main \
|
|
225
217
|
--thread release-2026-q1 \
|
|
226
218
|
--title "Channel threads and forum UX in 0.6" \
|
|
227
219
|
--description "Forum channel UX shipped in the 0.6 line." \
|
package/dist/templates/common/bundled-skills/trellis-channel/references/multi-target-dispatch.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Multiple Evidence Units
|
|
2
|
+
|
|
3
|
+
Use after the user has authorized independent evidence and the task owns a
|
|
4
|
+
reviewed unit mapping. Read `subnode-work.md` for artifact and acceptance rules.
|
|
5
|
+
Codex inline workflows skip native implement/check dispatch and keep ordinary
|
|
6
|
+
implementation/checking in the main session; inline mode does not disable
|
|
7
|
+
explicit Channel evidence. Channel implement/check workers belong to a
|
|
8
|
+
separately selected Channel-driven workflow, not `codex-subnode-channel`.
|
|
9
|
+
Codex Channel workers disable their own native multi-agent features to prevent
|
|
10
|
+
recursive dispatch. Missing independent reports cannot be replaced by
|
|
11
|
+
main-session pass claims.
|
|
12
|
+
|
|
13
|
+
## Prepare And Dispatch In One Host Call
|
|
14
|
+
|
|
15
|
+
Choose units by work, complexity, evidence range, and relationship. Combine only
|
|
16
|
+
individually quick/simple and obviously related points with shared context and
|
|
17
|
+
a bounded total workload. Each scope item keeps its own evidence, conclusion,
|
|
18
|
+
unknowns, and stop condition. Neither eight slots nor eight owner domains imply
|
|
19
|
+
eight work packages. Store this mapping in the task's existing plan or matrix.
|
|
20
|
+
|
|
21
|
+
Read the actual native guard and current workers/reservations. Initially fill
|
|
22
|
+
all available capacity in FIFO order; a justified dependency or resource limit
|
|
23
|
+
belongs in the task record, not an arbitrary coordinator throttle. Initialize
|
|
24
|
+
all reviewed briefs before queue creation or spawning. A failed initialization
|
|
25
|
+
stops admission; preserve/reconcile partial artifacts without dispatching them.
|
|
26
|
+
|
|
27
|
+
For a configured subnode profile, `spawn --profile <id> --as <worker>` implies
|
|
28
|
+
the subnode role and inherits its Codex provider; do not repeat
|
|
29
|
+
`--agent subnode --provider codex`. Keep each worker ID and `send --to` explicit.
|
|
30
|
+
Read each unit's selected profile/model/effort from its brief and compare the
|
|
31
|
+
durable spawned receipt with that selection; never substitute one fixed profile
|
|
32
|
+
for a mixed-unit batch. Record a mismatch rather than inferring quality from a
|
|
33
|
+
profile name when the effective values are identical.
|
|
34
|
+
Author identity on `send` defaults to `TRELLIS_CHANNEL_AS` or `main`, so routine
|
|
35
|
+
dispatch need not repeat `--as main`.
|
|
36
|
+
|
|
37
|
+
Coalesce operations that can share one noninteractive host invocation. Use ONE
|
|
38
|
+
native `exec_command` containing a standard-library loop over existing CLI
|
|
39
|
+
commands. Multiple `exec_command` calls inside `functions.exec` still count as
|
|
40
|
+
multiple host calls. This is a procedure, not a new Channel batch API, scheduler,
|
|
41
|
+
or worker-state store. Keep init and dispatch as separate admission stages.
|
|
42
|
+
|
|
43
|
+
The following runnable pattern consumes a temporary, reviewed JSON array of
|
|
44
|
+
`{"target": "unit-id", "argv": ["trellis", "channel", ...]}` entries. Use
|
|
45
|
+
`[sys.executable, ".trellis/scripts/subnode_artifact.py", ...]` for artifact
|
|
46
|
+
commands. Put claim, spawn, and send in queue order; do not include waits. Review
|
|
47
|
+
each argument vector and the native capacity before executing. The input and
|
|
48
|
+
raw receipts are temporary command data, not task authority; retain only needed
|
|
49
|
+
non-sensitive evidence and clean the temporary input after use.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# python on Windows; python3 elsewhere. Execute this whole block in ONE host call.
|
|
53
|
+
python3 - /absolute/path/to/reviewed-actions.json <<'PY'
|
|
54
|
+
import json
|
|
55
|
+
import subprocess
|
|
56
|
+
import sys
|
|
57
|
+
|
|
58
|
+
actions = json.load(open(sys.argv[1], encoding="utf-8"))
|
|
59
|
+
failed = False
|
|
60
|
+
for action in actions:
|
|
61
|
+
if failed:
|
|
62
|
+
print(json.dumps({"target": action["target"], "status": "not_attempted"}))
|
|
63
|
+
continue
|
|
64
|
+
argv = [sys.executable if part == "{python}" else part for part in action["argv"]]
|
|
65
|
+
try:
|
|
66
|
+
result = subprocess.run(argv, capture_output=True, text=True, check=False)
|
|
67
|
+
failed = result.returncode != 0
|
|
68
|
+
receipt = {"target": action["target"], "argv": argv,
|
|
69
|
+
"status": "error" if failed else "completed",
|
|
70
|
+
"exit_code": result.returncode,
|
|
71
|
+
"stdout": result.stdout, "stderr": result.stderr}
|
|
72
|
+
except OSError as error:
|
|
73
|
+
failed = True
|
|
74
|
+
receipt = {"target": action["target"], "argv": argv,
|
|
75
|
+
"status": "error", "error": str(error)}
|
|
76
|
+
print(json.dumps(receipt), flush=True)
|
|
77
|
+
sys.exit(1 if failed else 0)
|
|
78
|
+
PY
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The aggregate exit code is not per-target evidence. Inspect every receipt,
|
|
82
|
+
including missing or conflicting receipts; the first error stops later actions
|
|
83
|
+
and stops the remainder of this invocation. Reconcile completed, failed and
|
|
84
|
+
not-attempted targets before further admission; apply the local/global boundary
|
|
85
|
+
below rather than assuming every failure blocks unrelated units. Never replay a
|
|
86
|
+
claim or retry in its old worker conversation. A permitted fresh attempt needs a
|
|
87
|
+
new brief and ID with `retry_of`; old evidence is navigation only and must be
|
|
88
|
+
independently rechecked.
|
|
89
|
+
|
|
90
|
+
## Rolling FIFO
|
|
91
|
+
|
|
92
|
+
1. Capture a durable barrier before dispatch. Claim the earliest unclaimed unit,
|
|
93
|
+
spawn/send through native Channel, and preserve its receipt. The helper
|
|
94
|
+
enforces claim order; earlier claims need not be accepted to fill initial slots.
|
|
95
|
+
2. Reconcile the complete worker projection with claims and reports first.
|
|
96
|
+
Process every already-terminal unit, including terminal siblings absent from
|
|
97
|
+
an old active list. When no live work remains, enter review/closeout directly;
|
|
98
|
+
zero live workers with an exhausted queue is valid and does not prove a stall.
|
|
99
|
+
Establish exactly one native waiter for actual live workers without
|
|
100
|
+
`--all`. Resume only its live host continuation until it returns, times out,
|
|
101
|
+
or errors; run no other host action meanwhile.
|
|
102
|
+
3. Recheck dispatched items for failures, conflicts, and unresolved terminal
|
|
103
|
+
states. Still-running healthy workers do not need to finish. Validate the
|
|
104
|
+
completed worker's per-scope report, recheck sources and protected targets,
|
|
105
|
+
then write its create-once `accepted` disposition.
|
|
106
|
+
4. That acceptance plus verified native capacity authorizes the next unclaimed
|
|
107
|
+
FIFO unit immediately, while other healthy workers continue. Preserve the
|
|
108
|
+
barrier/event cursor so already emitted terminal events cannot be lost.
|
|
109
|
+
5. Local report delivery/validation failures isolate that unit and provide no
|
|
110
|
+
accepted-slot credit. Other independently accepted units refill FIFO normally;
|
|
111
|
+
a retry does not reserve an exclusive time interval. Identity, source or
|
|
112
|
+
protected-target, permission/security and capacity conflicts, missing terminal
|
|
113
|
+
evidence, conflicting receipts and unresolvable reservations stop global
|
|
114
|
+
admission. A terminal event alone never authorizes replacement. On recovery,
|
|
115
|
+
reconstruct claims, events, workers/reservations, reports, and dispositions;
|
|
116
|
+
never redispatch an old claim or require all healthy live predecessors to
|
|
117
|
+
complete merely to refill an accepted slot.
|
|
118
|
+
|
|
119
|
+
A host continuation belongs to the single outstanding wait, not to a new worker
|
|
120
|
+
notification. Resume that continuation only; do not add a waiter, status poll,
|
|
121
|
+
background shell job or progress reaction while it remains live. After a real
|
|
122
|
+
return, process its event cursor and complete projection before choosing refill,
|
|
123
|
+
another authorized wait or closeout. Use diagnostics only for an actual error,
|
|
124
|
+
timeout, conflicting fact or explicit user request.
|
|
125
|
+
|
|
126
|
+
## Temporary Task Switch
|
|
127
|
+
|
|
128
|
+
Save the old task's checkpoint. Pause refills and drain ALL already dispatched
|
|
129
|
+
units: wait, validate, and disposition each result, including failures; confirm
|
|
130
|
+
the live continuation, worker, and reservation boundaries are closed. A drain
|
|
131
|
+
does not dispatch pending queue items or turn a failure into acceptance. Do not
|
|
132
|
+
automatically kill, retry, or abandon the old queue. Preserve unclaimed work and
|
|
133
|
+
the old phase. Only after drain, run native `task.py select <new-task>`; it
|
|
134
|
+
changes context without status, branch, after_start hooks, or implementation
|
|
135
|
+
authority. With no in-flight work, select directly after saving the checkpoint.
|
|
136
|
+
|
|
137
|
+
When returning, reconstruct only the missing old-task facts and resume only
|
|
138
|
+
still-authorized work. Selecting a user-stopped audit never restarts it. Ordinary
|
|
139
|
+
continue and sufficient compaction recovery retain their direct checkpoint path.
|