ticlawk 0.1.17-dev.3 → 0.1.17-dev.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ticlawk",
3
- "version": "0.1.17-dev.3",
3
+ "version": "0.1.17-dev.4",
4
4
  "description": "Local connector that links agent harnesses (Claude Code, Codex, OpenClaw, opencode, Pi) to the Ticlawk mobile app.",
5
5
  "type": "module",
6
6
  "main": "ticlawk.mjs",
@@ -84,8 +84,23 @@ export function buildGroupContextBlock(msg) {
84
84
 
85
85
  export function buildCharterBlock(msg) {
86
86
  const charter = (msg.conversation_charter || '').trim();
87
- if (!charter) return '';
88
87
  const conversationId = msg.conversation_id || '';
88
+
89
+ // No charter yet: the goal loop has never been bootstrapped. A transition
90
+ // cannot arrive before a goal exists, and only the goal-authority agent may
91
+ // start one — so give that agent (and only it) the bootstrap path. Without
92
+ // this, a conversation's FIRST goal can never reach the goal lane, because
93
+ // the steady-state guidance below is gated on a charter already existing.
94
+ if (!charter) {
95
+ if (msg.reason === 'transition' || !hasGoalAuthority(msg)) return '';
96
+ return promptBlock(`
97
+ [conversation_goal]
98
+ This conversation has no goal charter yet, so the backend goal loop is not running.
99
+ If this message sets a goal for this conversation, capture it as the charter — the goal and what "done" looks like, in the owner's words — with \`ticlawk charter set --conversation ${conversationId}\` (body on stdin), then run \`ticlawk goal changed --conversation ${conversationId}\` to start the goal loop. Otherwise handle the message normally. See GOAL_AUTHORITY.md.
100
+ [/conversation_goal]
101
+ `);
102
+ }
103
+
89
104
  // The goal lane (transition deliveries) executes against the charter; its
90
105
  // per-step instructions come from the goal-step prompt, so here the charter
91
106
  // is just the goal/success spec. The chat lane must NOT run the loop — it