agentlife 2.6.10 → 2.6.12
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/dist/index.js +11 -29
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -908,12 +908,9 @@ All inter-system signals are fixed strings. Nothing else is a signal.
|
|
|
908
908
|
**Work-order markers — you RECEIVE (always process, never treat as end-of-conversation):**
|
|
909
909
|
- \`[action:<name>] surfaceId=<id> [key=value ...]\` — user tapped a button on a widget you own. \`<name>\` is whatever you put in \`action=\` when you pushed the widget. Process it, then update or delete the source widget in the same turn.
|
|
910
910
|
- \`[system:dismiss-requested] surfaceId=<id>\` — user tapped dismiss on a widget. You have ~30s to push an \`input\` surface with contextual alternatives before the platform finalizes the dismiss.
|
|
911
|
-
- \`[event:dismissed] surfaceId=<id>\` — dismiss
|
|
911
|
+
- \`[event:dismissed] surfaceId=<id>\` — the platform deleted a widget without your involvement (non-guided dismiss path). The widget is already gone — do NOT push \`delete\`. Clean up any custom infra tied to the surface, then \`NO_REPLY\`. Does NOT fire for widgets you deleted yourself with the \`delete\` DSL — no notification is needed when you initiated the delete.
|
|
912
912
|
- \`[system:cancelled]\` — user cancelled the turn mid-flight. Reply \`NO_REPLY\` and stop.
|
|
913
|
-
|
|
914
|
-
**Input-surface control signals — platform EMITS when the user closes/skips an input surface:**
|
|
915
|
-
- \`input_closed\` — user tapped the [×] on an input surface. Push it again later if still relevant.
|
|
916
|
-
- \`input_skipped\` — user tapped Skip. Do not re-ask this session.
|
|
913
|
+
- \`[system] <free-form text>\` — platform-generated instruction (scheduled followup firing, Supervisor notification, quality/regression signal). The \`<text>\` after \`[system] \` is the instruction; read it and act. No fixed playbook — the text is the playbook.
|
|
917
914
|
|
|
918
915
|
**Input-surface \`action=\` values — canonical set (anything else is a QUALITY ERROR on input surfaces):**
|
|
919
916
|
- \`action=choice\` or \`action=select\` → numbered single-select (one tap fires). Dispatched as \`[action:choice] label=<label>\`.
|
|
@@ -993,7 +990,7 @@ Button shapes and dispatch format for input surfaces are in **Signal Protocol**
|
|
|
993
990
|
|
|
994
991
|
**One widget, one goal.** Set at creation, MUST NOT change. If an action shifts the objective, delete and create with a new surfaceId. Platform rejects goal mutations with a QUALITY ERROR.
|
|
995
992
|
|
|
996
|
-
**User-initiated dismiss** (\`[system:dismiss-requested] surfaceId=<id>\`): you have ~30s to push an \`input\` surface with 2-3 contextual options + "Remove it" last. If the user picks an alternative, act on it and the dismiss is cancelled. If the user picks "Remove it" or
|
|
993
|
+
**User-initiated dismiss** (\`[system:dismiss-requested] surfaceId=<id>\`): you have ~30s to push an \`input\` surface with 2-3 contextual options + "Remove it" last. If the user picks an alternative, act on it and the dismiss is cancelled. If the user picks "Remove it" or the followup fires on timeout, push \`delete <parentSurfaceId>\` to finalize removal (and delete the dismiss-alt input surface in the same block). See \`DISMISS_ALTERNATIVES_GUIDANCE\` (injected on the dismiss event) for crafting rules.
|
|
997
994
|
|
|
998
995
|
### Autonomy & approval
|
|
999
996
|
|
|
@@ -1129,28 +1126,9 @@ context: <JSON — lookup keys: DB tables, date ranges, phase, config>
|
|
|
1129
1126
|
|
|
1130
1127
|
### Two-Phase Push — Loading Then Final
|
|
1131
1128
|
|
|
1132
|
-
Phase 1 — your FIRST tool call on every turn. Before any search, fetch, exec, or db call:
|
|
1133
|
-
|
|
1134
|
-
\`\`\`
|
|
1135
|
-
surface <id> size=s state=loading
|
|
1136
|
-
card
|
|
1137
|
-
column
|
|
1138
|
-
text "<short description of what you are doing>" body
|
|
1139
|
-
\`\`\`
|
|
1140
|
-
|
|
1141
|
-
Phase 2 — your LAST tool call. Same surfaceId, without state=loading:
|
|
1129
|
+
Phase 1 — your FIRST tool call on every turn. Before any search, fetch, exec, or db call, push a widget with \`state=loading\` in the header. That attribute is the only rule: it triggers the animated border on the dashboard so the user sees "work in progress." Everything else — size, layout, what the face shows, even whether it's a brand-new surface or a reused one — is your call. Match the feel of the domain: a data fetch can show a progress bar, a long exec can list steps, a quick lookup can be one line.
|
|
1142
1130
|
|
|
1143
|
-
|
|
1144
|
-
surface <id> size=m
|
|
1145
|
-
card
|
|
1146
|
-
column
|
|
1147
|
-
<face: metrics, badges, gauges — 2-second glance only>
|
|
1148
|
-
goal: <the user's objective — NOT the action you performed>
|
|
1149
|
-
detail:
|
|
1150
|
-
<full markdown: paragraphs, tables, lists, analysis>
|
|
1151
|
-
followup: +<duration> "<next step — specific action based on current data>"
|
|
1152
|
-
context: {"key": "value"}
|
|
1153
|
-
\`\`\`
|
|
1131
|
+
Phase 2 — your LAST tool call. Same surfaceId, without \`state=loading\`, with the real result (face, goal, detail, followup, context). See TOOLS.md for DSL structure.
|
|
1154
1132
|
|
|
1155
1133
|
A loading push without a final push = perpetual spinner.
|
|
1156
1134
|
|
|
@@ -1242,7 +1220,11 @@ The user is dismissing this widget. You have ~30s to push an \`input\` surface w
|
|
|
1242
1220
|
- "Remove it" is always last. Use \`action=choice\` so it renders as a numbered list.
|
|
1243
1221
|
- surfaceId: \`dismiss-alt-{parent-surfaceId}\`. Goal: reference the parent. Followup: ~1m so the flow doesn't stall if the user walks away.
|
|
1244
1222
|
|
|
1245
|
-
If the user picks an alternative → act on it; the dismiss is cancelled.
|
|
1223
|
+
If the user picks an alternative → act on it; the dismiss is cancelled.
|
|
1224
|
+
|
|
1225
|
+
If the user picks "Remove it" → push \`delete <parentSurfaceId>\` in the same turn (and delete the dismiss-alt input surface alongside it; both go in one \`agentlife_push\` with \`---\` between them). No \`[event:dismissed]\` fires in the guided flow — you initiated the delete, so no notification is needed. Clean up any custom infra inline before the delete.
|
|
1226
|
+
|
|
1227
|
+
If the 1-minute followup fires with no user response → same move: push \`delete <parentSurfaceId>\` + \`delete dismiss-alt-<parentSurfaceId>\`.`;
|
|
1246
1228
|
var ORCHESTRATOR_AGENTS_MD = `# AgentLife Orchestrator
|
|
1247
1229
|
|
|
1248
1230
|
You are a message router. You never answer questions, perform tasks, push widgets, or produce content.
|
|
@@ -4743,7 +4725,7 @@ ${parts.join(`
|
|
|
4743
4725
|
});
|
|
4744
4726
|
}
|
|
4745
4727
|
var QUALITY_CHECK_MAX_WAIT_MS = 5000;
|
|
4746
|
-
var TERMINAL_MARKERS = new Set(["NO_REPLY", "ANNOUNCE_SKIP", "REPLY_SKIP", "HEARTBEAT_OK"
|
|
4728
|
+
var TERMINAL_MARKERS = new Set(["NO_REPLY", "ANNOUNCE_SKIP", "REPLY_SKIP", "HEARTBEAT_OK"]);
|
|
4747
4729
|
function processPendingQualityChecks(state) {
|
|
4748
4730
|
if (state.disabled || !state.historyDb)
|
|
4749
4731
|
return 0;
|