ticlawk 0.1.17-dev.14 → 0.1.17-dev.16
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
|
@@ -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
|
-
|
|
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
|
-
|
|
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 [--
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
other agents' in_progress
|
|
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
|
|
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 exposing how the system works inside or how your work is organized behind the scenes (tracks, loops, internal states, codes, run names, task numbers).`,
|
|
115
115
|
`[/goal_step]`,
|
|
116
116
|
].join('\n'));
|
|
117
117
|
} else {
|
|
@@ -97,6 +97,12 @@ Schedule a reminder for time-based follow-up. For a fixed cadence, use ONE recur
|
|
|
97
97
|
- \`ticlawk reminder schedule --title <t> (--fire-at <iso>|--in-seconds N|--in-minutes N) (--target <target>|--anchor-conversation-id <id>) [--recur-at HH:MM] [--recur-weekday 1,2,3]\` — schedule a reminder. \`--recur-at\` is the owner's local wall-clock; the system fills the timezone. On each fire, a recurring reminder auto-advances.`;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
// The lane breakdown above is how YOU operate — your own model. It is never
|
|
101
|
+
// something to explain to a person. When someone asks what you do or what your
|
|
102
|
+
// role is, answer by what you help them accomplish, not by how the system is
|
|
103
|
+
// built.
|
|
104
|
+
const INTERNAL_MODEL_NOTE = `This split is your own operating model — never something to explain to a person. When the owner asks what you do or what your role is, answer by what you help them accomplish, not by how the system is built.`;
|
|
105
|
+
|
|
100
106
|
// ---------------------------------------------------------------------------
|
|
101
107
|
// Chat-authority (DM or group admin/owner)
|
|
102
108
|
// ---------------------------------------------------------------------------
|
|
@@ -124,7 +130,9 @@ function chatAuthorityOverviewBlock(ctx) {
|
|
|
124
130
|
return `${whereLine} The conversation is part of an agent system that drives itself to achieve a goal. It has two components:
|
|
125
131
|
|
|
126
132
|
${goalLaneBullet}
|
|
127
|
-
${chatLaneBullet}
|
|
133
|
+
${chatLaneBullet}
|
|
134
|
+
|
|
135
|
+
${INTERNAL_MODEL_NOTE}`;
|
|
128
136
|
}
|
|
129
137
|
|
|
130
138
|
function chatAuthorityMessagingSubsection(ctx) {
|
|
@@ -135,7 +143,7 @@ function chatAuthorityMessagingSubsection(ctx) {
|
|
|
135
143
|
: '';
|
|
136
144
|
return `### Messaging
|
|
137
145
|
|
|
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
|
|
146
|
+
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 expose how the system works inside or how your work is organized behind the scenes (tracks, loops, internal states, codes, run names, task numbers) — none of it means anything to them.
|
|
139
147
|
|
|
140
148
|
- \`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
149
|
- \`ticlawk message read --target <target> [--around <message-id>]\` — recent chat context, or context around one specific message.
|
|
@@ -201,13 +209,15 @@ function chatWorkerOverviewBlock(ctx) {
|
|
|
201
209
|
return `You are in a group chat named ${groupLabel} as a member, not the admin. The group is part of an agent system that drives itself to achieve a goal. It has two components:
|
|
202
210
|
|
|
203
211
|
- Goal lane — backend state machine that pursues the goal, owned by the group admin. It runs on its own; you don't drive it.
|
|
204
|
-
- Chat lane — where you are right now. Your job is to take tasks the admin or owner assigns to you and execute them. You don't set goals or touch the admin-owned surfaces (charter, dashboard, briefings, membership). You send messages to external recipients with \`ticlawk message send\`, and you execute work through \`ticlawk task claim\` / \`ticlawk task update
|
|
212
|
+
- Chat lane — where you are right now. Your job is to take tasks the admin or owner assigns to you and execute them. You don't set goals or touch the admin-owned surfaces (charter, dashboard, briefings, membership). You send messages to external recipients with \`ticlawk message send\`, and you execute work through \`ticlawk task claim\` / \`ticlawk task update\`.
|
|
213
|
+
|
|
214
|
+
${INTERNAL_MODEL_NOTE}`;
|
|
205
215
|
}
|
|
206
216
|
|
|
207
217
|
function chatWorkerMessagingSubsection() {
|
|
208
218
|
return `### Messaging
|
|
209
219
|
|
|
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
|
|
220
|
+
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 expose how the system works inside or how your work is organized behind the scenes (tracks, loops, internal states, codes, run names, task numbers) — none of it means anything to them.
|
|
211
221
|
|
|
212
222
|
- \`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
223
|
- \`ticlawk message read --target <target> [--around <message-id>]\` — recent chat context, or context around one specific message.
|
|
@@ -261,7 +271,7 @@ Do only what this step requires; leave work for other steps to those steps. The
|
|
|
261
271
|
function goalLaneOwnerSurfacesSubsection() {
|
|
262
272
|
return `### Owner surfaces (dashboard + briefing)
|
|
263
273
|
|
|
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
|
|
274
|
+
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 exposing how the system works inside or how your work is organized behind the scenes (tracks, loops, internal states, codes, run names, task numbers).
|
|
265
275
|
|
|
266
276
|
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
277
|
|