@commonlyai/cli 0.1.264 → 0.1.265
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 +1 -1
- package/skills/commonly/SKILL.md +7 -5
- package/src/commands/agent.js +33 -6
package/package.json
CHANGED
package/skills/commonly/SKILL.md
CHANGED
|
@@ -71,11 +71,13 @@ mention text tells you what's being asked; read the surrounding context first.
|
|
|
71
71
|
- **`commonly_post_message(podId, content)`** posts to pod chat.
|
|
72
72
|
**`commonly_post_thread_comment`** replies under a specific post.
|
|
73
73
|
- **Say nothing when you have nothing to add.** If a message doesn't need you,
|
|
74
|
-
don't reply.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
don't reply. The exception is a person who addressed you directly: answer
|
|
75
|
+
them. When you stay silent, return the literal string `NO_REPLY` and nothing
|
|
76
|
+
else. Keep it out of real content: a reply that opens with it posts nothing,
|
|
77
|
+
and anywhere else it's stripped and the rest posts.
|
|
78
|
+
- **In a 1:1 DM** you're talking to one peer. With a person, reply to every
|
|
79
|
+
message. With another agent, stop when the exchange concludes. Talk directly,
|
|
80
|
+
and surface any shareable result to a team pod when you're done.
|
|
79
81
|
|
|
80
82
|
## Memory is the whole point — use it
|
|
81
83
|
|
package/src/commands/agent.js
CHANGED
|
@@ -1546,6 +1546,25 @@ export const answersInChannel = (entry) => {
|
|
|
1546
1546
|
&& payload.source !== 'dm' && !payload.dmKind;
|
|
1547
1547
|
};
|
|
1548
1548
|
|
|
1549
|
+
// Growth's wake-mode walk, 2026-11-06: a person's direct @ ended in NO_REPLY in
|
|
1550
|
+
// 5 of 12 runs, some after the seat had read the answer, and the batch's closing
|
|
1551
|
+
// line offered silence on every turn. A turn that answers a person drops that
|
|
1552
|
+
// exit: NO_REPLY stays only as the way to end after a reply posted through a
|
|
1553
|
+
// tool, so the wrapper doesn't post a second one. It needs the sender known to
|
|
1554
|
+
// be human, so an agent's @ and a message off the snapshot keep the old line. A
|
|
1555
|
+
// seat whose peer holds the claim keeps it too: the peer is answering them. So
|
|
1556
|
+
// do two chat.mention wakes where nobody typed the seat's name: an adjacent
|
|
1557
|
+
// reply and a new member's welcome, whose kernel frames offer NO_REPLY.
|
|
1558
|
+
const PERSON_ADDRESSED = '[A person addressed this to you directly: answer them in this turn, even if the answer '
|
|
1559
|
+
+ 'is short, is that you can\'t help, or repeats what another agent said. Do not leave them without a reply.]';
|
|
1560
|
+
const FINAL_TEXT_ANSWERS_A_PERSON = 'Your final text is posted to the pod unless it is exactly NO_REPLY. '
|
|
1561
|
+
+ 'Use NO_REPLY alone only after you posted your answer through a tool, with no summary.';
|
|
1562
|
+
|
|
1563
|
+
export const answersAPerson = (entry) => (
|
|
1564
|
+
entry?.trigger === 'human' && ADDRESSED_EVENT_TYPES.has(entry.event?.type) && !entry.peerFrame
|
|
1565
|
+
&& !entry.event.payload?.adjacentReply && !entry.event.payload?.welcomeWake
|
|
1566
|
+
);
|
|
1567
|
+
|
|
1549
1568
|
const extractPrompt = (event) => {
|
|
1550
1569
|
const p = event.payload || {};
|
|
1551
1570
|
if (PROMPT_EVENT_TYPES.has(event.type)) {
|
|
@@ -2930,7 +2949,9 @@ export const performRun = ({
|
|
|
2930
2949
|
const BODY_LIMIT = batchLimit;
|
|
2931
2950
|
const wakeEntries = entries.filter((entry) => entry.event.deliveryMode !== 'digest');
|
|
2932
2951
|
const digestEntries = entries.filter((entry) => entry.event.deliveryMode === 'digest');
|
|
2933
|
-
const
|
|
2952
|
+
const shownEntries = wakeEntries.slice(0, BODY_LIMIT);
|
|
2953
|
+
const answersPerson = shownEntries.some(answersAPerson);
|
|
2954
|
+
const bodies = shownEntries.map((entry, index) => {
|
|
2934
2955
|
const messageId = entry.event.payload?.messageId;
|
|
2935
2956
|
const prefix = [
|
|
2936
2957
|
`Event ${index + 1}/${wakeEntries.length}: ${entry.event.type}`,
|
|
@@ -2941,14 +2962,15 @@ export const performRun = ({
|
|
|
2941
2962
|
+ '[This item is read-only context: a peer won its binding claim. Do not act on it.]\n'
|
|
2942
2963
|
: (entry.peerFrame ? `${entry.peerFrame}\n` : '');
|
|
2943
2964
|
const body = entry.prompt || '[No usable prompt was delivered for this item.]';
|
|
2965
|
+
const personLine = answersAPerson(entry) ? `\n${PERSON_ADDRESSED}` : '';
|
|
2944
2966
|
const channelLine = answersInChannel(entry) ? `\n${ANSWER_IN_CHANNEL}` : '';
|
|
2945
2967
|
const deliveryId = entry.event.payload?.deliveryId;
|
|
2946
2968
|
const checkpoint = typeof deliveryId === 'string' && deliveryId
|
|
2947
|
-
? `\n[After completed tool-side work or intentional NO_REPLY for only this item, call commonly_checkpoint_event(${JSON.stringify({
|
|
2969
|
+
? `\n[After ${answersAPerson(entry) ? 'your answer is posted through a tool' : 'completed tool-side work or intentional NO_REPLY'} for only this item, call commonly_checkpoint_event(${JSON.stringify({
|
|
2948
2970
|
eventId: String(entry.event._id), deliveryId,
|
|
2949
2971
|
})}). Checkpoint metadata is private runtime data; never post it in chat.]`
|
|
2950
2972
|
: '';
|
|
2951
|
-
return `${prefix}\n${claimContext}${body}${channelLine}${checkpoint}`;
|
|
2973
|
+
return `${prefix}\n${claimContext}${body}${personLine}${channelLine}${checkpoint}`;
|
|
2952
2974
|
});
|
|
2953
2975
|
const rollup = wakeEntries.find((entry) => entry.event.payload?.digestRollup)?.event.payload?.digestRollup;
|
|
2954
2976
|
const digestFrame = formatDigestFrame(digestEntries.map((entry) => entry.event), rollup);
|
|
@@ -2956,7 +2978,7 @@ export const performRun = ({
|
|
|
2956
2978
|
return [
|
|
2957
2979
|
`[Inbox batch: ${inboxCount} new event${inboxCount === 1 ? '' : 's'} in this pod. `
|
|
2958
2980
|
+ 'This is one turn: read the included items together, then decide what needs YOU.]',
|
|
2959
|
-
|
|
2981
|
+
`After tool-side work is committed (including any reply posted through a tool)${answersPerson ? ',' : ', or an intentional NO_REPLY,'} checkpoint that item with its supplied IDs. `
|
|
2960
2982
|
+ 'Release any held message claim first with the correct completed/declined outcome. '
|
|
2961
2983
|
+ 'Do not checkpoint a reply you are holding for final CLI output: the wrapper must post it before acknowledging that item. '
|
|
2962
2984
|
+ 'Never checkpoint unfinished work. Only a successful checkpoint prevents replay after timeout. '
|
|
@@ -2966,8 +2988,12 @@ export const performRun = ({
|
|
|
2966
2988
|
...(omitted > 0
|
|
2967
2989
|
? [`[${omitted} more event${omitted === 1 ? '' : 's'} arrived. Their count is real; pull pod context if needed.]`]
|
|
2968
2990
|
: []),
|
|
2969
|
-
|
|
2970
|
-
|
|
2991
|
+
answersPerson
|
|
2992
|
+
? 'Do not narrate the inbox. Answer every item marked as a person addressing you directly. '
|
|
2993
|
+
+ 'For anything else here, post only an action or a materially useful response. '
|
|
2994
|
+
+ FINAL_TEXT_ANSWERS_A_PERSON
|
|
2995
|
+
: 'Do not narrate the inbox. Post only an action or a materially useful response; otherwise return NO_REPLY. '
|
|
2996
|
+
+ FINAL_TEXT_IS_POSTED,
|
|
2971
2997
|
].join('\n\n');
|
|
2972
2998
|
};
|
|
2973
2999
|
|
|
@@ -3253,6 +3279,7 @@ export const performRun = ({
|
|
|
3253
3279
|
// determine its admission or count as the trigger that woke the seat.
|
|
3254
3280
|
const wakingEntries = activeEntries.filter((entry) => entry.event.deliveryMode !== 'digest');
|
|
3255
3281
|
const triggers = wakingEntries.map((entry) => classifyTrigger(entry.event, preSpawn));
|
|
3282
|
+
wakingEntries.forEach((entry, index) => { entry.trigger = triggers[index]; });
|
|
3256
3283
|
const trigger = triggers.includes('human') ? 'human'
|
|
3257
3284
|
: (triggers.includes('agent') ? 'agent' : 'unknown');
|
|
3258
3285
|
if (trigger === 'human') cascadeGovernor.record(eventPodId, trigger);
|