ticlawk 0.1.17-dev.14 → 0.1.17-dev.15

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.14",
3
+ "version": "0.1.17-dev.15",
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",
@@ -241,7 +241,9 @@ export async function runMessageReadCommand(args) {
241
241
  export async function runTaskCreateCommand(args) {
242
242
  const env = requireAgentEnv();
243
243
  const target = getArg(args, 'target');
244
- const conversationId = getArg(args, 'conversation-id');
244
+ // Default to the conversation this turn is running for (the daemon sets it).
245
+ // Lets a goal-lane step just `task create --title ...` without addressing.
246
+ const conversationId = getArg(args, 'conversation') || getArg(args, 'conversation-id') || env.currentConversationId;
245
247
  if (!target && !conversationId) {
246
248
  console.error('--target or --conversation-id is required');
247
249
  return 2;
@@ -276,7 +278,7 @@ export async function runTaskClaimCommand(args) {
276
278
  const messageId = getArg(args, 'message-id');
277
279
  const number = getNumberArg(args, 'number');
278
280
  const target = getArg(args, 'target');
279
- const conversationId = getArg(args, 'conversation-id');
281
+ const conversationId = getArg(args, 'conversation') || getArg(args, 'conversation-id') || env.currentConversationId;
280
282
  if (!messageId && number == null) {
281
283
  console.error('--message-id or --number is required');
282
284
  return 2;
@@ -465,7 +467,10 @@ export async function runTaskListCommand(args) {
465
467
  const env = requireAgentEnv();
466
468
  const params = new URLSearchParams();
467
469
  const target = getArg(args, 'target');
468
- const conversationId = getArg(args, 'conversation-id');
470
+ // No filter given → scope to the conversation this turn runs for, instead
471
+ // of dumping tasks from every conversation the owner can see.
472
+ const conversationId = getArg(args, 'conversation') || getArg(args, 'conversation-id')
473
+ || (target ? null : env.currentConversationId);
469
474
  if (target) params.set('target', target);
470
475
  if (conversationId) params.set('conversation_id', conversationId);
471
476
  const res = await daemonRequest({
@@ -1416,9 +1421,11 @@ export const AGENT_COMMAND_HELP = {
1416
1421
  --in-minutes 1 --recur-at 18:30 --recur-weekday 1,2,3,4,5
1417
1422
  `,
1418
1423
  task: `ticlawk task <create|claim|unclaim|update|list>
1419
- ticlawk task create --target "<target>" [--title <t>] [--assign-agent <agent-id>]
1424
+ ticlawk task create [--conversation <id>|--target "<target>"] [--title <t>] [--assign-agent <agent-id>]
1420
1425
  Body is read from stdin. Creates a brand-new group task. Group admins
1421
1426
  may assign it immediately to an agent member with --assign-agent.
1427
+ Conversation defaults to the one this turn is running for; pass
1428
+ --conversation <id> (or --target) only to address a different one.
1422
1429
  ticlawk task claim --message-id <id> [--lease-seconds N]
1423
1430
  ticlawk task claim --number <N> --target "<target>" [--lease-seconds N]
1424
1431
  ticlawk task unclaim --task-id <id>
@@ -1426,11 +1433,11 @@ export const AGENT_COMMAND_HELP = {
1426
1433
  Only a group admin can set status=done. Other agents should set
1427
1434
  in_review and let the group's admin finalize. A group admin can also
1428
1435
  reopen another agent's in_review task to in_progress for redo.
1429
- ticlawk task list [--target <target>|--conversation-id <id>]
1430
- Default view is open tasks plus tasks owned by the caller. When the
1431
- caller is a group admin and --target/--conversation-id scopes the
1432
- request to that group, the list shows the full task board, including
1433
- other agents' in_progress, in_review, and done tasks.
1436
+ ticlawk task list [--conversation <id>|--target <target>]
1437
+ Scopes to the conversation this turn runs for by default; pass
1438
+ --conversation <id> (or --target) to look at a different one. When the
1439
+ caller is a group admin and the scope is that group, the list shows the
1440
+ full task board, including other agents' in_progress/in_review/done tasks.
1434
1441
  `,
1435
1442
  workstream: `ticlawk workstream <create|delete|list|charter>
1436
1443
  Compatibility alias for group admin commands. Prefer \`ticlawk group ...\`
@@ -50,6 +50,13 @@ export function invalidateServerInfoCache(actingAgentId = null) {
50
50
  export async function resolveTarget(actingAgentId, target) {
51
51
  if (!target) return { conversationId: null, replyToMessageId: null, error: 'target is required' };
52
52
 
53
+ // `conv:<uuid>` — an explicit conversation by id (the intuitive first guess).
54
+ // Handled before the generic colon-split so the uuid isn't mistaken for a
55
+ // reply-message suffix.
56
+ if (/^conv:[0-9a-f-]{36}$/i.test(target)) {
57
+ return { conversationId: target.slice(5), replyToMessageId: null, error: null };
58
+ }
59
+
53
60
  // Strip optional message-reply suffix.
54
61
  let base = target;
55
62
  let replyToMessageId = null;
@@ -111,7 +111,7 @@ export function buildGoalStepPrompt(msg) {
111
111
  ` ${reportCmd}`,
112
112
  ``,
113
113
  `Reporting the outcome continues the loop: a running next state comes back as a fresh step; with no gap or a wait, the loop parks itself. Report exactly once — do not loop inside this turn.`,
114
- `Reach the owner only through two surfaces: \`ticlawk dashboard set\` (the goal report — routine progress, the owner pulls it) and \`ticlawk briefing publish\` (a scarce push, per the rule above). The goal lane never uses \`ticlawk message send\` — chat is the chat lane's. Write owner-facing text for someone reading cold who has never seen your plan or task board: what changed, why it matters, and what (if anything) they must do — naming things by what they are, never by a private code, run name, or task number.`,
114
+ `Reach the owner only through two surfaces: \`ticlawk dashboard set\` (the goal report — routine progress, the owner pulls it) and \`ticlawk briefing publish\` (a scarce push, per the rule above). The goal lane never uses \`ticlawk message send\` — chat is the chat lane's. Write owner-facing text for someone reading cold who has never seen your plan or task board: what changed, why it matters, and what (if anything) they must do — naming things by what they are, never by a private code, run name, task number, or an internal name for how the system works.`,
115
115
  `[/goal_step]`,
116
116
  ].join('\n'));
117
117
  } else {
@@ -135,7 +135,7 @@ function chatAuthorityMessagingSubsection(ctx) {
135
135
  : '';
136
136
  return `### Messaging
137
137
 
138
- You reply to incoming messages with \`ticlawk message send\`. Pass body via stdin or heredoc so quotes and code blocks survive. The body is plain natural language — never include an internal code, run name, or task number the recipient has no context for.
138
+ You reply to incoming messages with \`ticlawk message send\`. Pass body via stdin or heredoc so quotes and code blocks survive. The body is plain natural language — never include an internal code, run name, task number, or an internal name for how the system works, which the recipient has no context for.
139
139
 
140
140
  - \`ticlawk message send --target <target> --phase progress|final [--attach <path>]\` — send a reply. Copy \`<target>\` from the incoming message verbatim. Body via stdin. Use \`--phase progress\` for any intermediate update and \`--phase final\` for the last message of the turn; after the final send succeeds, output exactly \`<turn_end>\` and stop.
141
141
  - \`ticlawk message read --target <target> [--around <message-id>]\` — recent chat context, or context around one specific message.
@@ -207,7 +207,7 @@ function chatWorkerOverviewBlock(ctx) {
207
207
  function chatWorkerMessagingSubsection() {
208
208
  return `### Messaging
209
209
 
210
- You reply to incoming messages with \`ticlawk message send\`. Pass body via stdin or heredoc so quotes and code blocks survive. The body is plain natural language — never include an internal code, run name, or task number the recipient has no context for.
210
+ You reply to incoming messages with \`ticlawk message send\`. Pass body via stdin or heredoc so quotes and code blocks survive. The body is plain natural language — never include an internal code, run name, task number, or an internal name for how the system works, which the recipient has no context for.
211
211
 
212
212
  - \`ticlawk message send --target <target> --phase progress|final [--attach <path>]\` — send a reply. Copy \`<target>\` from the incoming message verbatim. Body via stdin. Use \`--phase progress\` for any intermediate update and \`--phase final\` for the last message of the turn; after the final send succeeds, output exactly \`<turn_end>\` and stop.
213
213
  - \`ticlawk message read --target <target> [--around <message-id>]\` — recent chat context, or context around one specific message.
@@ -261,7 +261,7 @@ Do only what this step requires; leave work for other steps to those steps. The
261
261
  function goalLaneOwnerSurfacesSubsection() {
262
262
  return `### Owner surfaces (dashboard + briefing)
263
263
 
264
- You reach the owner only through dashboard (pull) and briefing (push). You do NOT use \`ticlawk message send\` — chat is the chat lane's. Write what changed and why it matters in plain language; refer to things by what they are and do, never by an internal code, run name, or task number.
264
+ You reach the owner only through dashboard (pull) and briefing (push). You do NOT use \`ticlawk message send\` — chat is the chat lane's. Write what changed and why it matters in plain language; refer to things by what they are and do, never by an internal code, run name, task number, or an internal name for how the system works.
265
265
 
266
266
  Dashboard is the owner's at-a-glance progress report. Design it during goal setup (or when first needed), keep the design stable, update content as progress moves; redesign only when the goal, metrics, or main focus changes materially. Briefings are scarce pushes that interrupt the owner: send only when the owner must act or decide (\`--mode approval\`), asked to be told (\`--mode info\`), or would be wrong not to know now — goal done, blocked, materially off-track, or a result they are waiting on (\`--mode info\`).
267
267