ticlawk 0.1.16-dev.17 → 0.1.16-dev.19
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
|
@@ -625,11 +625,12 @@ export async function getBriefing({actingAgentId, briefingId}) {
|
|
|
625
625
|
return apiFetch(`/api/agent/briefings/${encodeURIComponent(briefingId)}?${params}`);
|
|
626
626
|
}
|
|
627
627
|
|
|
628
|
-
export async function publishBriefing({actingAgentId, bodyText, attachmentAssetId, currentConversationId}) {
|
|
628
|
+
export async function publishBriefing({actingAgentId, bodyText, attachmentAssetId, currentConversationId, responseMode}) {
|
|
629
629
|
const body = { acting_as_agent_id: actingAgentId };
|
|
630
630
|
if (bodyText != null) body.body_text = bodyText;
|
|
631
631
|
if (attachmentAssetId != null) body.attachment_asset_id = attachmentAssetId;
|
|
632
632
|
if (currentConversationId != null) body.current_conversation_id = currentConversationId;
|
|
633
|
+
if (responseMode != null) body.response_mode = responseMode;
|
|
633
634
|
return apiFetch('/api/agent/briefings', {
|
|
634
635
|
method: 'POST',
|
|
635
636
|
body: JSON.stringify(body),
|
|
@@ -1067,6 +1067,7 @@ export async function runBriefingPublishCommand(args) {
|
|
|
1067
1067
|
const env = requireAgentEnv();
|
|
1068
1068
|
const textArg = getArg(args, 'text');
|
|
1069
1069
|
const attachPath = getArg(args, 'attach');
|
|
1070
|
+
const mode = String(getArg(args, 'mode') || 'info').trim().toLowerCase();
|
|
1070
1071
|
if (!textArg) {
|
|
1071
1072
|
console.error('--text "<short>" is required');
|
|
1072
1073
|
return 2;
|
|
@@ -1075,6 +1076,10 @@ export async function runBriefingPublishCommand(args) {
|
|
|
1075
1076
|
console.error('--text must be ≤140 chars');
|
|
1076
1077
|
return 2;
|
|
1077
1078
|
}
|
|
1079
|
+
if (!['info', 'approval'].includes(mode)) {
|
|
1080
|
+
console.error('--mode must be info or approval');
|
|
1081
|
+
return 2;
|
|
1082
|
+
}
|
|
1078
1083
|
let attachmentAssetId = null;
|
|
1079
1084
|
if (attachPath) {
|
|
1080
1085
|
const contentType = inferContentType(String(attachPath));
|
|
@@ -1097,6 +1102,7 @@ export async function runBriefingPublishCommand(args) {
|
|
|
1097
1102
|
body_text: textArg,
|
|
1098
1103
|
attachment_asset_id: attachmentAssetId,
|
|
1099
1104
|
current_conversation_id: env.currentConversationId,
|
|
1105
|
+
response_mode: mode,
|
|
1100
1106
|
},
|
|
1101
1107
|
});
|
|
1102
1108
|
printJson(res.body);
|
|
@@ -1326,10 +1332,11 @@ export const AGENT_COMMAND_HELP = {
|
|
|
1326
1332
|
Any agent. Backend proxies to endpoint_config.url. No retry.
|
|
1327
1333
|
`,
|
|
1328
1334
|
briefing: `ticlawk briefing <publish|get>
|
|
1329
|
-
briefing publish --text "..." [--attach <image|video|html path>]
|
|
1335
|
+
briefing publish --text "..." [--mode info|approval] [--attach <image|video|html path>]
|
|
1330
1336
|
Publish a briefing to the owner's Briefings. Allowed from DMs, or
|
|
1331
1337
|
from groups where this agent is admin/owner.
|
|
1332
1338
|
--text short plain text (≤140 chars)
|
|
1339
|
+
--mode owner response mode: info shows ack; approval shows approve
|
|
1333
1340
|
--attach optional image, video, or HTML file when visual context matters
|
|
1334
1341
|
Briefings are independent of chat — they do NOT appear in any DM
|
|
1335
1342
|
message stream. Use this verb (not \`message send\`) for any status
|
|
@@ -982,12 +982,18 @@ export async function handleBriefingPublish(req, body, ctx) {
|
|
|
982
982
|
const attachmentAssetId = typeof body?.attachment_asset_id === 'string' && body.attachment_asset_id.trim()
|
|
983
983
|
? body.attachment_asset_id.trim()
|
|
984
984
|
: null;
|
|
985
|
+
const responseMode = typeof body?.response_mode === 'string' && body.response_mode.trim()
|
|
986
|
+
? body.response_mode.trim().toLowerCase()
|
|
987
|
+
: 'info';
|
|
985
988
|
if (!bodyText) {
|
|
986
989
|
return { status: 400, body: { error: 'body_text is required' } };
|
|
987
990
|
}
|
|
988
991
|
if (bodyText && bodyText.length > 140) {
|
|
989
992
|
return { status: 400, body: { error: 'body_text must be ≤140 chars' } };
|
|
990
993
|
}
|
|
994
|
+
if (!['info', 'approval'].includes(responseMode)) {
|
|
995
|
+
return { status: 400, body: { error: 'response_mode must be info or approval' } };
|
|
996
|
+
}
|
|
991
997
|
const currentConversationId = getCurrentConversationId(req, body);
|
|
992
998
|
try {
|
|
993
999
|
const data = await api.publishBriefing({
|
|
@@ -995,6 +1001,7 @@ export async function handleBriefingPublish(req, body, ctx) {
|
|
|
995
1001
|
bodyText,
|
|
996
1002
|
attachmentAssetId,
|
|
997
1003
|
currentConversationId,
|
|
1004
|
+
responseMode,
|
|
998
1005
|
});
|
|
999
1006
|
return { status: 200, body: data };
|
|
1000
1007
|
} catch (err) {
|
|
@@ -72,7 +72,19 @@ Core concepts:
|
|
|
72
72
|
- Task board: the persistent group task list managed through \`ticlawk task list/create/claim/unclaim/update\`.
|
|
73
73
|
- Claimable task: a task assigned to you or an unclaimed task you are about to execute.
|
|
74
74
|
- Dashboard: an owner-facing HTML report for the conversation goal. It is the visual presentation of the key information associated with the level of achievement of the goal, like a report sent to a CEO for review. It is published or updated with \`ticlawk dashboard set\` as an \`html_template\` plus optional structured \`data_json\`.
|
|
75
|
-
- Briefing: an active notification to the owner. It tells the owner what happened, why it matters to the goal, and what owner action is needed, if any. It is published with \`ticlawk briefing publish --text "..."
|
|
75
|
+
- Briefing: an active notification to the owner. It tells the owner what happened, why it matters to the goal, and what owner action is needed, if any. It is published with \`ticlawk briefing publish --text "..." --mode info\` for updates/notifications, or \`--mode approval\` when the owner needs to approve, optionally with one image, video, or HTML attachment when visual context matters.
|
|
76
|
+
`);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function buildOperatingModes() {
|
|
80
|
+
return promptBlock(`
|
|
81
|
+
Operating modes:
|
|
82
|
+
- Before acting, determine the conversation scope, your role, and the goal state from the inbound message, charter, task board, and recent context.
|
|
83
|
+
- In a DM, own the direct ask. Answer one-off asks directly; when durable owner intent is visible, run goal setup, then run the goal loop once the goal exists.
|
|
84
|
+
- In a group where you are admin or owner and a local goal exists, own the group goal loop and task system.
|
|
85
|
+
- In a group where you are admin or owner and no local goal exists, do not invent one. If the owner clearly expresses a durable group/workstream goal, run goal setup; otherwise handle only the current coordination need.
|
|
86
|
+
- In a group where you are not admin or owner, do not drive the group goal. Work only on assigned, claimable, or directly delegated tasks through the task worker loop.
|
|
87
|
+
- Ambient group messages are visible context, not automatic work, unless your role, task ownership, or expertise makes you clearly the right responder.
|
|
76
88
|
`);
|
|
77
89
|
}
|
|
78
90
|
|
|
@@ -84,6 +96,7 @@ Dashboard and briefing rules:
|
|
|
84
96
|
- Redesign the dashboard layout or basic style only when the goal, success metrics, or main owner focus changes materially; summarize the change and confirm it before replacing the dashboard design.
|
|
85
97
|
- Keep briefings for active owner notifications: milestone reached, important change, blocker, request for owner input/resources/permission/confirmation/decision, or final result.
|
|
86
98
|
- When creating or materially updating a polished HTML artifact for any ${BRAND_NAME} surface, use \`/vibeshare generate\`. If \`/vibeshare\` is not installed or available in your skills, install it first using the setup instructions at https://vibeshare.page/skill.
|
|
99
|
+
- When using \`/vibeshare generate\` for a briefing HTML attachment, include in the generation request that the HTML will render on mobile and should act as a focused visual aid for understanding the briefing: emphasize the key visual elements, relationships, status, numbers, or choices that clarify the message and owner action, rather than trying to include all supporting detail. Do not build complex gestures, slideshows, carousels, paginated flows, or custom navigation that could conflict with the host mobile surface.
|
|
87
100
|
- For ${BRAND_NAME} dashboards and briefing HTML attachments, \`/vibeshare\` is the HTML generation path only. Publish the generated dashboard HTML with \`ticlawk dashboard set\`, and publish briefing text/attachments with \`ticlawk briefing publish\`; do not use \`/vibeshare publish\` for these ${BRAND_NAME} surfaces.
|
|
88
101
|
`);
|
|
89
102
|
}
|
|
@@ -113,11 +126,12 @@ ${buildGoalSetupRules()}
|
|
|
113
126
|
4. Execute the next task yourself when appropriate, or create/assign a task when coordination is needed.
|
|
114
127
|
5. Check whether the result closes the gap.
|
|
115
128
|
6. Return to evaluating current facts against the goal.
|
|
129
|
+
- During each goal-loop iteration, explicitly write a private loop check before acting: current facts, goal/success criterion, gap, next action, and stop/continue decision. This is for your execution discipline, not a chat message. Do not send the private loop check through ${BRAND_NAME} unless the owner explicitly asks for that analysis.
|
|
116
130
|
- Stop the loop only when there is no meaningful gap, progress is blocked because the owner needs to provide input/resources/permission/confirmation/decision, or progress depends on an external/time-based wait.
|
|
117
131
|
- If there is no gap, say so briefly. If the goal is complete, report completion.
|
|
118
132
|
- If user input, resources, permission, confirmation, or a decision is needed, publish a briefing with one clear bundled request to the owner.
|
|
119
|
-
- If progress depends on future state, use a reminder or explicit resume condition rather than silently stalling.
|
|
120
|
-
- When
|
|
133
|
+
- If progress depends on an external or time-based future state and no agent or owner can act now, use a reminder or explicit resume condition rather than silently stalling. Do not use reminders to defer an executable next step or an owner decision/request.
|
|
134
|
+
- When reviewing returned task work, evaluate the evidence against the task and current goal before marking it done or using it in reports. If the task is complete, update task state, then immediately run the private loop check against the updated facts before dashboard, MEMORY.md, briefing, or wrap-up updates.
|
|
121
135
|
- Keep persistent state surfaces distinct: dashboard for goal-level reporting, MEMORY.md for your local continuity, and briefings for active owner notifications.
|
|
122
136
|
- Publish briefings and update dashboards only from DMs you own or groups where you are admin/owner.
|
|
123
137
|
`);
|
|
@@ -151,6 +165,7 @@ function buildGroupGoalScopeOverlay() {
|
|
|
151
165
|
Scope overlay: group with admin or owner role
|
|
152
166
|
- In a group where you are admin or owner, you own both the group goal loop and the task system.
|
|
153
167
|
- Use the group task board for task inventory and assignment.
|
|
168
|
+
- When you delegate substantive work to another agent, make it a group task before or while requesting the work. When results return, review the evidence, update task state only after task acceptance, then re-run the private group goal loop.
|
|
154
169
|
- Group messages coordinate working agents. Dashboard, MEMORY.md, and briefings are tracking/reporting surfaces with distinct roles.
|
|
155
170
|
- As admin/owner, update the group dashboard when the goal-level report the requester would care about has changed.
|
|
156
171
|
- As admin/owner, publish a briefing only when the owner should be actively notified: milestone reached, important change, blocker, request for owner input/resources/permission/confirmation/decision, or final result.
|
|
@@ -197,15 +212,17 @@ export function buildGoalTaskProtocolPrompt(ctx = {}) {
|
|
|
197
212
|
[protocol:${GOAL_TASK_PROTOCOL_MODULE}]
|
|
198
213
|
This is the single source of prompt truth for ${BRAND_NAME} goal/task behavior. Compose universal invariants with exactly one authority overlay and one scope overlay.
|
|
199
214
|
|
|
200
|
-
${buildUniversalInvariants()}
|
|
201
|
-
|
|
202
215
|
${buildCoreConcepts()}
|
|
203
216
|
|
|
204
|
-
${
|
|
217
|
+
${buildUniversalInvariants()}
|
|
218
|
+
|
|
219
|
+
${buildOperatingModes()}
|
|
205
220
|
|
|
206
221
|
${authorityOverlay}
|
|
207
222
|
|
|
208
223
|
${scopeOverlay}
|
|
224
|
+
|
|
225
|
+
${buildStateSurfaceRules()}
|
|
209
226
|
[/protocol:${GOAL_TASK_PROTOCOL_MODULE}]
|
|
210
227
|
`);
|
|
211
228
|
}
|
|
@@ -31,8 +31,11 @@ private activity text; it is not sent to users or groups.
|
|
|
31
31
|
- Use the exact target from the current wake message when replying.
|
|
32
32
|
- Complete the work before stopping. Progress updates are allowed, but they
|
|
33
33
|
are not completion.
|
|
34
|
-
-
|
|
35
|
-
|
|
34
|
+
- Use normal assistant output as private work trace. External
|
|
35
|
+
\`ticlawk message send\` messages should be clean, actionable
|
|
36
|
+
communication: answer, instruction, blocker, decision request, or final
|
|
37
|
+
result. Do not send private loop/checklist scratchpad unless the owner
|
|
38
|
+
explicitly asks for that analysis.
|
|
36
39
|
|
|
37
40
|
## Per-Turn Routine
|
|
38
41
|
|
|
@@ -60,12 +63,14 @@ private activity text; it is not sent to users or groups.
|
|
|
60
63
|
dashboards. \`set\` reads JSON from stdin: \`{ html_template, data_json }\`.
|
|
61
64
|
Allowed from DMs, or from groups where this agent is admin/owner.
|
|
62
65
|
- \`ticlawk briefing publish/get\`: publish or read owner-facing briefings.
|
|
63
|
-
Use \`publish --text "..."\` with
|
|
66
|
+
Use \`publish --text "..."\` with \`--mode info\` for updates/notifications
|
|
67
|
+
or \`--mode approval\` when the owner needs to approve, plus an optional
|
|
68
|
+
\`--attach <image|video|html>\`.
|
|
64
69
|
Allowed from DMs, or from groups where this agent is admin/owner.
|
|
65
70
|
- \`ticlawk task list/create/claim/unclaim/update\`: use only as allowed by
|
|
66
71
|
the goal/task protocol and backend errors.
|
|
67
|
-
- \`ticlawk reminder schedule/snooze/update/cancel\`: use for
|
|
68
|
-
follow-up that should be visible and persistent in ${BRAND_NAME}.
|
|
72
|
+
- \`ticlawk reminder schedule/snooze/update/cancel\`: use only for external or
|
|
73
|
+
time-based future follow-up that should be visible and persistent in ${BRAND_NAME}.
|
|
69
74
|
- \`ticlawk service list/info/call\`: use shared services when a published
|
|
70
75
|
tool matches the task. If a service call fails, report the failure; do not
|
|
71
76
|
retry in a loop.
|