chahinebrini
f0c7be25f4
feat(agenthub): TSK-0118 — Ask primitive for autonomous decision-routing
- New Ask entity (ASK-####): schema + counter + paths(EntityType 'asks') +
events(AgentHubEventType 'ask') + fsWatch(WATCHED + toEvent). Generic entities
table, no migration.
- askService: createAsk routes to config.roles.architect.preferredAgent, NEVER
the CEO (a to='ceo' is rerouted); answerAsk / escalateAsk (escalatedTo='ceo',
single channel) / getAsk / listAsks. Authority-policy JSDoc.
- Asks kept OUT of FTS5: Index.upsert gains a { fts?: boolean } option; askService
upserts with fts:false, so 'memory search' never returns asks.
- routes: POST/GET /asks, GET /asks/:id, POST /asks/:id/{answer,escalate}, each
emitChange type:'ask'.
- CLI 'ask <q> --from [--task][--wait][--timeout]' (SSE reconnect wait until
status!=pending) + ask list/answer/escalate; remoteClient ask methods.
- MCP agenthub_ask (wait via waitForTask, now woken by 'ask' events) +
agenthub_ask_list/answer/escalate; agenthub_work architect branch surfaces
pending asks ({reviews,asks,messages}).
- Unattended mode (invocation flag): work.ts ctx + CLI 'work --unattended' +
agenthub_work schema + LOOP reminder ('call agenthub_ask instead of pausing').
- tests: +askService.test.ts (routing/answer/escalate/list/FTS-exclusion),
+ask-wait.test.ts (routes roundtrip + SSE wait: answer resolves, no-answer
times out cleanly)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 01:19:42 +02:00
..
2026-06-26 14:49:47 +02:00
2026-07-12 01:19:42 +02:00
2026-07-12 01:19:42 +02:00
2026-06-24 23:39:19 +02:00
2026-06-24 23:33:27 +02:00
2026-06-24 23:31:14 +02:00
2026-06-25 12:23:23 +02:00
2026-07-12 00:46:47 +02:00
2026-06-25 13:21:10 +02:00
2026-06-24 23:57:22 +02:00
2026-06-24 23:32:14 +02:00
2026-06-26 14:49:47 +02:00
2026-06-24 23:35:53 +02:00
2026-07-12 00:46:47 +02:00
2026-06-26 22:59:37 +02:00
2026-07-01 01:52:57 +02:00
2026-07-12 00:46:47 +02:00
2026-07-12 00:56:16 +02:00
2026-06-24 23:30:15 +02:00
2026-06-25 12:32:11 +02:00
2026-06-24 23:29:32 +02:00
2026-07-12 00:56:16 +02:00
2026-07-12 00:46:47 +02:00
2026-07-12 00:46:47 +02:00
2026-06-28 00:12:50 +02:00
2026-06-24 23:36:58 +02:00
2026-06-24 23:40:23 +02:00
2026-07-12 01:02:04 +02:00
2026-07-08 20:43:42 +02:00
2026-07-12 00:46:47 +02:00
2026-07-08 04:19:36 +02:00
2026-06-27 17:15:25 +02:00
2026-06-29 00:24:39 +02:00
2026-06-25 22:24:53 +02:00
2026-07-12 01:08:59 +02:00