@prismer/runtime 2.0.7 → 2.0.8
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/CHANGELOG.md +201 -0
- package/built-in-skills/agent-coordination/SKILL.md +235 -0
- package/built-in-skills/agent-meta/SKILL.md +52 -0
- package/built-in-skills/assets/SKILL.md +131 -0
- package/built-in-skills/canvas-design/LICENSE.txt +202 -0
- package/built-in-skills/canvas-design/SKILL.md +156 -0
- package/built-in-skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/built-in-skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/built-in-skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/built-in-skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/built-in-skills/claim-agent-ownership/SKILL.md +254 -0
- package/built-in-skills/claude-api/LICENSE.txt +202 -0
- package/built-in-skills/claude-api/SKILL.md +324 -0
- package/built-in-skills/claude-api/csharp/claude-api.md +402 -0
- package/built-in-skills/claude-api/curl/examples.md +216 -0
- package/built-in-skills/claude-api/curl/managed-agents.md +336 -0
- package/built-in-skills/claude-api/go/claude-api.md +421 -0
- package/built-in-skills/claude-api/go/managed-agents/README.md +561 -0
- package/built-in-skills/claude-api/java/claude-api.md +432 -0
- package/built-in-skills/claude-api/java/managed-agents/README.md +442 -0
- package/built-in-skills/claude-api/php/claude-api.md +375 -0
- package/built-in-skills/claude-api/php/managed-agents/README.md +435 -0
- package/built-in-skills/claude-api/python/claude-api/README.md +420 -0
- package/built-in-skills/claude-api/python/claude-api/batches.md +185 -0
- package/built-in-skills/claude-api/python/claude-api/files-api.md +165 -0
- package/built-in-skills/claude-api/python/claude-api/streaming.md +162 -0
- package/built-in-skills/claude-api/python/claude-api/tool-use.md +590 -0
- package/built-in-skills/claude-api/python/managed-agents/README.md +332 -0
- package/built-in-skills/claude-api/ruby/claude-api.md +113 -0
- package/built-in-skills/claude-api/ruby/managed-agents/README.md +389 -0
- package/built-in-skills/claude-api/shared/agent-design.md +101 -0
- package/built-in-skills/claude-api/shared/error-codes.md +213 -0
- package/built-in-skills/claude-api/shared/live-sources.md +135 -0
- package/built-in-skills/claude-api/shared/managed-agents-api-reference.md +378 -0
- package/built-in-skills/claude-api/shared/managed-agents-client-patterns.md +209 -0
- package/built-in-skills/claude-api/shared/managed-agents-core.md +238 -0
- package/built-in-skills/claude-api/shared/managed-agents-environments.md +215 -0
- package/built-in-skills/claude-api/shared/managed-agents-events.md +195 -0
- package/built-in-skills/claude-api/shared/managed-agents-memory.md +197 -0
- package/built-in-skills/claude-api/shared/managed-agents-multiagent.md +99 -0
- package/built-in-skills/claude-api/shared/managed-agents-onboarding.md +114 -0
- package/built-in-skills/claude-api/shared/managed-agents-outcomes.md +106 -0
- package/built-in-skills/claude-api/shared/managed-agents-overview.md +68 -0
- package/built-in-skills/claude-api/shared/managed-agents-self-hosted-sandboxes.md +173 -0
- package/built-in-skills/claude-api/shared/managed-agents-tools.md +321 -0
- package/built-in-skills/claude-api/shared/managed-agents-webhooks.md +110 -0
- package/built-in-skills/claude-api/shared/model-migration.md +779 -0
- package/built-in-skills/claude-api/shared/models.md +121 -0
- package/built-in-skills/claude-api/shared/prompt-caching.md +171 -0
- package/built-in-skills/claude-api/shared/tool-use-concepts.md +327 -0
- package/built-in-skills/claude-api/typescript/claude-api/README.md +333 -0
- package/built-in-skills/claude-api/typescript/claude-api/batches.md +106 -0
- package/built-in-skills/claude-api/typescript/claude-api/files-api.md +98 -0
- package/built-in-skills/claude-api/typescript/claude-api/streaming.md +178 -0
- package/built-in-skills/claude-api/typescript/claude-api/tool-use.md +527 -0
- package/built-in-skills/claude-api/typescript/managed-agents/README.md +359 -0
- package/built-in-skills/doc-coauthoring/SKILL.md +375 -0
- package/built-in-skills/frontend-design/LICENSE.txt +177 -0
- package/built-in-skills/frontend-design/SKILL.md +42 -0
- package/built-in-skills/human-approval/SKILL.md +114 -0
- package/built-in-skills/image-generate/SKILL.md +327 -0
- package/built-in-skills/ingest/SKILL.md +105 -0
- package/built-in-skills/internal-comms/LICENSE.txt +202 -0
- package/built-in-skills/internal-comms/SKILL.md +32 -0
- package/built-in-skills/internal-comms/examples/3p-updates.md +47 -0
- package/built-in-skills/internal-comms/examples/company-newsletter.md +65 -0
- package/built-in-skills/internal-comms/examples/faq-answers.md +30 -0
- package/built-in-skills/internal-comms/examples/general-comms.md +16 -0
- package/built-in-skills/liteparse/SKILL.md +156 -0
- package/built-in-skills/mcp-builder/LICENSE.txt +202 -0
- package/built-in-skills/mcp-builder/SKILL.md +236 -0
- package/built-in-skills/mcp-builder/reference/evaluation.md +602 -0
- package/built-in-skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/built-in-skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/built-in-skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/built-in-skills/mcp-builder/scripts/connections.py +151 -0
- package/built-in-skills/mcp-builder/scripts/evaluation.py +373 -0
- package/built-in-skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/built-in-skills/mcp-builder/scripts/requirements.txt +2 -0
- package/built-in-skills/memory/SKILL.md +106 -0
- package/built-in-skills/memory-curation/SKILL.md +135 -0
- package/built-in-skills/office-artifacts/SKILL.md +198 -0
- package/built-in-skills/prismer-im-collab/SKILL.md +148 -0
- package/built-in-skills/skill-authoring/SKILL.md +124 -0
- package/built-in-skills/skill-authoring/skill.json +74 -0
- package/built-in-skills/skill-creator/LICENSE.txt +202 -0
- package/built-in-skills/skill-creator/SKILL.md +485 -0
- package/built-in-skills/skill-creator/agents/analyzer.md +274 -0
- package/built-in-skills/skill-creator/agents/comparator.md +202 -0
- package/built-in-skills/skill-creator/agents/grader.md +223 -0
- package/built-in-skills/skill-creator/assets/eval_review.html +146 -0
- package/built-in-skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/built-in-skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/built-in-skills/skill-creator/references/schemas.md +430 -0
- package/built-in-skills/skill-creator/scripts/__init__.py +0 -0
- package/built-in-skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/built-in-skills/skill-creator/scripts/generate_report.py +326 -0
- package/built-in-skills/skill-creator/scripts/improve_description.py +247 -0
- package/built-in-skills/skill-creator/scripts/package_skill.py +136 -0
- package/built-in-skills/skill-creator/scripts/quick_validate.py +103 -0
- package/built-in-skills/skill-creator/scripts/run_eval.py +310 -0
- package/built-in-skills/skill-creator/scripts/run_loop.py +328 -0
- package/built-in-skills/skill-creator/scripts/utils.py +47 -0
- package/built-in-skills/slack-gif-creator/LICENSE.txt +202 -0
- package/built-in-skills/slack-gif-creator/SKILL.md +271 -0
- package/built-in-skills/slack-gif-creator/core/easing.py +234 -0
- package/built-in-skills/slack-gif-creator/core/frame_composer.py +176 -0
- package/built-in-skills/slack-gif-creator/core/gif_builder.py +269 -0
- package/built-in-skills/slack-gif-creator/core/validators.py +136 -0
- package/built-in-skills/slack-gif-creator/requirements.txt +4 -0
- package/built-in-skills/tasks/SKILL.md +398 -0
- package/built-in-skills/team/SKILL.md +76 -0
- package/built-in-skills/web-artifacts-builder/LICENSE.txt +202 -0
- package/built-in-skills/web-artifacts-builder/SKILL.md +104 -0
- package/built-in-skills/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/built-in-skills/web-artifacts-builder/scripts/init-artifact.sh +334 -0
- package/built-in-skills/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/built-in-skills/webapp-testing/LICENSE.txt +202 -0
- package/built-in-skills/webapp-testing/SKILL.md +96 -0
- package/built-in-skills/webapp-testing/examples/console_logging.py +35 -0
- package/built-in-skills/webapp-testing/examples/element_discovery.py +40 -0
- package/built-in-skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/built-in-skills/webapp-testing/scripts/with_server.py +106 -0
- package/dist/cli.cjs +6195 -1631
- package/dist/cli.js +6148 -1585
- package/dist/index.cjs +6032 -1468
- package/dist/index.d.cts +813 -43
- package/dist/index.d.ts +813 -43
- package/dist/index.js +6017 -1454
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,207 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **`mode:'message-attach'` for `POST /local/deliver`** (release202/09 P5#3, 动作
|
|
8
|
+
A2). Appends a freshly-uploaded asset to an ALREADY-SENT message. Body adds
|
|
9
|
+
`messageId` (and requires `conversationId`); the daemon uploads with its own
|
|
10
|
+
credential (same `deliverFile` upload path + agent-output-policy +
|
|
11
|
+
magic-bytes as the other modes) then POSTs the resulting `assetId` to the
|
|
12
|
+
cloud conversation-scoped attach route
|
|
13
|
+
`POST /api/im/messages/:conversationId/:messageId/attach` (X-IM-Agent stamped
|
|
14
|
+
so the cloud sender-check resolves the same agent that authored the message).
|
|
15
|
+
Unlike `mode:'send'` it does not start a new message; unlike `mode:'attach'`
|
|
16
|
+
it does not ride the reply. Wired from the in-container `cloud attach` SDK
|
|
17
|
+
command. Complements `mode:'attach'` (reply does not exist yet) — A2 is for a
|
|
18
|
+
reply that already exists.
|
|
19
|
+
- **`mode:'task-attach'` for `POST /local/deliver`** (release202/09 P5#2, 动作
|
|
20
|
+
③). The daemon uploads the file as a **task-bound** asset (`deliverFile`
|
|
21
|
+
already stamps `sourceTaskId = taskId`), which the cloud `POST /assets`
|
|
22
|
+
handler auto-rolls onto the kanban task card
|
|
23
|
+
(`appendOutputAssetIdToTask` + `reemitTerminalDigestForAssetArrival`) plus the
|
|
24
|
+
asset library. Unlike `mode:'attach'` it does **not** call
|
|
25
|
+
`recordDeliveredAsset` (a kanban task may run without a chat reply — its
|
|
26
|
+
products belong on the card, not a turn reply) and unlike `mode:'send'` it
|
|
27
|
+
posts no message. No new cloud HTTP call is needed: the existing
|
|
28
|
+
`sourceTaskId`-driven rollup is the kanban + library landing. Wired from the
|
|
29
|
+
in-container `cloud task attach` SDK command.
|
|
30
|
+
- **Explicit agent-driven file delivery** (release202/09 P2). New daemon
|
|
31
|
+
local-server route `POST /local/deliver` (`local-server.ts` `onDeliver` +
|
|
32
|
+
`daemon/asset/deliver.ts` `attachDeliver`): the in-container agent's
|
|
33
|
+
`cloud deliver` / `cloud file send` proxy here so the daemon (which holds a
|
|
34
|
+
usable IM credential the agent lacks) performs the upload + delivery. Body
|
|
35
|
+
`{ taskId, path, mode:'attach'|'send', conversationId?, agentUsername? }`.
|
|
36
|
+
`mode:'attach'` (动作 A) records the assetId onto `ArtifactsWatcher`'s
|
|
37
|
+
existing `pendingByTask` so dispatch-end `flushPending` rides it on
|
|
38
|
+
`reply.assetIds`; `mode:'send'` (动作 B) posts a standalone message with the
|
|
39
|
+
asset attachment, stamped as the agent (`X-IM-Agent`). New public
|
|
40
|
+
`ArtifactsWatcher.recordDeliveredAsset(taskId, assetId)` +
|
|
41
|
+
`ArtifactsWatcher.deliverFile(...)`. `PRISMER_CONVERSATION_ID` is now
|
|
42
|
+
injected into the agent env for 动作 B targeting.
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
|
|
46
|
+
- **ArtifactsWatcher directory auto-scan is now flag-gated OFF by default**
|
|
47
|
+
(release202/09 P2). New `ArtifactsWatcherOptions.autoScan` (default
|
|
48
|
+
**false**): when off, the polling scan / `scanNow()` are no-ops (no implicit
|
|
49
|
+
directory-magic), but `pendingByTask` / `flushPending` /
|
|
50
|
+
`recordDeliveredAsset` / `upload` all still work. The legacy scan code is
|
|
51
|
+
retained behind the flag and re-enablable via `PRISMER_ARTIFACTS_AUTOSCAN=1`.
|
|
52
|
+
File delivery is now EXPLICIT (`cloud deliver` / `cloud file send`).
|
|
53
|
+
|
|
54
|
+
- **Hermes one-shot task-run dispatch via `/v1/runs`** (release202/08 Phase 1,
|
|
55
|
+
flag-gated **default OFF**). New `HERMES_TASK_RUNS_DISPATCH` env flag. When ON
|
|
56
|
+
and a dispatch is classified as a one-shot **run** (execution context
|
|
57
|
+
`task-run` AND no triggering chat sender — pure kanban / scheduled fire /
|
|
58
|
+
programmatic orchestration), the hermes adapter routes through the new
|
|
59
|
+
`runs-dispatcher.ts` (`POST /v1/runs` → 202 + run_id, then `GET
|
|
60
|
+
/v1/runs/{id}/events` SSE) instead of the stateful Sessions API. The run is
|
|
61
|
+
**stateless** — no hermes session, no `local_run_sessions` mapping; its input
|
|
62
|
+
is the bare task prompt (+ inline asset blocks) and `system_prompt` embeds a
|
|
63
|
+
standalone `<execution_context type="task-run">` block (no SEED/THIN
|
|
64
|
+
envelope, no participants/current_turn_sender). Multimodal image_url parts and
|
|
65
|
+
the `/events` SSE parser (`consumeSessionsSse`) are reused verbatim. Chat
|
|
66
|
+
turns (group/dm with a triggering sender) keep going through
|
|
67
|
+
`dispatchViaSessions` unchanged. With the flag OFF the router is inert —
|
|
68
|
+
`deriveDispatchKind` returns `'turn'` unconditionally, so 100% of traffic
|
|
69
|
+
stays on Sessions (release201/25 §16.4 A3 behaviour, byte-for-byte).
|
|
70
|
+
`adapters/hermes/{flag.ts,runs-dispatcher.ts,index.ts}`,
|
|
71
|
+
`daemon/conversation-context.ts` (`renderExecutionContextXml`).
|
|
72
|
+
|
|
73
|
+
- **Role templates declare `taskDispatchScope`** (release202/08 §3.2 P3 —
|
|
74
|
+
config-driven, role-agnostic task-dispatch permission). A role's template /
|
|
75
|
+
agent-profile `config.taskDispatchScope` (`'any' | 'agents' | 'self' |
|
|
76
|
+
'none'`) is the middle layer of cloud's three-layer dispatch resolver
|
|
77
|
+
(`workspace.metadata.dispatchPolicy` > role/profile config >
|
|
78
|
+
`DEFAULT_DISPATCH_POLICY`), so a NEW role gets its dispatch capability by
|
|
79
|
+
declaring this field — the cloud resolver needs zero code changes. Declared:
|
|
80
|
+
`ceo` → `any` (orchestrator, sibling of `taskAuthority`), `product-manager`
|
|
81
|
+
→ `agents` (delegates to engineer/verifier, never a human peer), `engineer`
|
|
82
|
+
/ `researcher` / `verifier` → `none` (executors, no peer delegation).
|
|
83
|
+
`templates/roles/*.json`.
|
|
84
|
+
|
|
85
|
+
### Fixed
|
|
86
|
+
|
|
87
|
+
- **Model reasoning trace restored in agent messages on the hermes sessions
|
|
88
|
+
stream** (regression from `2cdd2cad`, 2026-05-29). When dispatch migrated from
|
|
89
|
+
`/v1/runs` (legacy `consumeSse`) to the sessions stream (`consumeSessionsSse`),
|
|
90
|
+
the deleted `reasoning.available` handler was the only path feeding the model's
|
|
91
|
+
thinking trace into `recorder.recordReasoningChunk(...)`, so reasoning stopped
|
|
92
|
+
becoming `reasoning_chunk` steps and the expandable reasoning block vanished
|
|
93
|
+
(tool-call steps still showed — separate handlers). Root cause of the shape
|
|
94
|
+
mismatch: the sessions endpoint (`api_server.py:1585-1590 _tool_progress`)
|
|
95
|
+
does **not** emit `reasoning.available`; it **remaps** reasoning into a
|
|
96
|
+
`tool.progress` event with `tool_name: '_thinking'` and the text in `delta`
|
|
97
|
+
(not `preview`), which the old `tool.progress` handler — reading only
|
|
98
|
+
`preview` — silently dropped. Fix: `tool.progress` now reads `delta` first and
|
|
99
|
+
routes reasoning through `recordReasoningChunk` + a `kind:'reasoning'`
|
|
100
|
+
onProgress hint (no `lastProgress` bump — reasoning is not a progress unit for
|
|
101
|
+
the reaper, mirroring the deleted handler). Also added a defensive top-level
|
|
102
|
+
`reasoning.available` case (accepts `text`/`reasoning_content`/`delta`/
|
|
103
|
+
`content`) for the `/v1/runs`-style direct event in case a hermes build
|
|
104
|
+
surfaces it on the sessions stream. Guarded against empty strings. Covered by
|
|
105
|
+
`test/reasoning-sse.test.ts`.
|
|
106
|
+
- **Hermes adapter no longer reuses a stale/foreign gateway squatting on the
|
|
107
|
+
port** (release202/07 robustness). `ensureService` decided reuse-vs-respawn
|
|
108
|
+
with the UNAUTHENTICATED `/health` check, which an old-version (pre-sessions,
|
|
109
|
+
404 on `/v1/capabilities`) or wrong-`API_SERVER_KEY` (401) gateway — e.g. an
|
|
110
|
+
orphan we spawned in a PRIOR daemon session — answers `200` to. Reusing such a
|
|
111
|
+
squatter made the capability gate later trip with the misleading "Hermes does
|
|
112
|
+
not advertise session_chat_streaming", failing every dispatch after a daemon
|
|
113
|
+
restart until the orphans were manually `pkill`ed. Now the reuse decision is
|
|
114
|
+
AUTHENTICATED: a hermes counts as reusable only if it answers
|
|
115
|
+
`GET /v1/capabilities` as ours; otherwise the adapter frees the port
|
|
116
|
+
(`stopStaleHermesGateways`, matches `-p <profile>` / `API_SERVER_PORT`) and
|
|
117
|
+
spawns a fresh gateway with our key — self-healing on restart. The capability
|
|
118
|
+
probe result is reused as the pinned `HermesService.capabilities` (no extra
|
|
119
|
+
fetch on the happy path). `adapters/hermes/index.ts` `ensureService`.
|
|
120
|
+
|
|
121
|
+
### Changed
|
|
122
|
+
|
|
123
|
+
- **Provider chain routing — `proxyProvider` widened from `'newapi'|'deepseek'`
|
|
124
|
+
enum to any chain id** (release202/07). The codex adapter previously hardcoded
|
|
125
|
+
the gateway base_url to `<PRISMER_BASE_URL>/api/v1` "regardless of
|
|
126
|
+
proxyProvider" — silently dropping a `deepseek` selection so every Codex
|
|
127
|
+
request landed on newapi (and 500'd for deepseek-only models). Now both the
|
|
128
|
+
codex and hermes adapters resolve `base_url` by the configured chain:
|
|
129
|
+
`newapi`/`default` → `/api/v1`; any other chain → `/api/v1/proxy/<chain>`
|
|
130
|
+
(codex appends `/responses`, hermes `/chat/completions`). The cloud walks the
|
|
131
|
+
chain (source1 → source2 → …) with per-source fallback.
|
|
132
|
+
- `adapters/codex/index.ts` — `proxyProvider` schema `z.enum` → `z.string`;
|
|
133
|
+
`resolveCodexPrismerProvider` honors the chain in base_url.
|
|
134
|
+
- `adapters/hermes/index.ts` — same schema widening; `resolvePrismerProviderBaseUrl`
|
|
135
|
+
generalized from the `deepseek`-only branch to any chain id.
|
|
136
|
+
|
|
137
|
+
- **Document-deliverable SOP — markdown files, not chat prose** (B-line,
|
|
138
|
+
release201/3x). Codified the rule that document-type deliverables
|
|
139
|
+
(research memos, PRDs, reports, reviews, summaries) MUST be written as
|
|
140
|
+
markdown files into `${PRISMER_OUTBOX_DIR}/` (physically
|
|
141
|
+
`${TASK_WORKDIR}/result/`) so the daemon outbox-watcher auto-registers
|
|
142
|
+
them as task-bound IMAssets; the chat reply is a summary/teaser, not the
|
|
143
|
+
deliverable itself.
|
|
144
|
+
- `built-in-skills/tasks/SKILL.md` §产物输出 — added §文档型交付物 (= markdown
|
|
145
|
+
文件) sub-section referencing the real `${PRISMER_OUTBOX_DIR}` /
|
|
146
|
+
`result/` auto-archival wiring (`dispatch.ts` `appendArtifactsInstruction`,
|
|
147
|
+
`PRISMER_ARTIFACTS_DIR` env). Filenames/structure are skill-defined
|
|
148
|
+
(no hardcoded schema).
|
|
149
|
+
- `templates/roles/{researcher,product-manager,engineer}.json`
|
|
150
|
+
`systemPrompt` — replaced the old "upload as workspace file +
|
|
151
|
+
prismer://file URI" convention with the markdown-to-`result/` SOP and a
|
|
152
|
+
summary-vs-deliverable distinction; each points at the tasks skill SOP.
|
|
153
|
+
- `templates/roles/verifier.json` `systemPrompt` + `operatingPrinciples` —
|
|
154
|
+
extended the same SOP to the verifier: the full acceptance record
|
|
155
|
+
(per-criterion method / params / observed result / repro steps) is now a
|
|
156
|
+
markdown file in `${PRISMER_OUTBOX_DIR}/` (e.g. `verification-report.md`),
|
|
157
|
+
auto-archived as a task-bound IMAsset. Binary evidence (screenshots /
|
|
158
|
+
benchmark output / logs) still goes via `cloud task attach` +
|
|
159
|
+
`evidenceRefs`; the `verify-criterion --note` stays a summary. The two
|
|
160
|
+
paths are complementary.
|
|
161
|
+
- Audit (cross-referenced docs): `templates/roles/ceo.json` left unchanged —
|
|
162
|
+
it already routes all file deliverables through `office-artifacts` /
|
|
163
|
+
`image-generate` / `canvas-design` / `web-artifacts-builder` skills (no
|
|
164
|
+
legacy "upload as workspace file" anti-pattern), so it needs no SOP
|
|
165
|
+
backfill. `templates/roles/skill-author.json` left unchanged — its
|
|
166
|
+
deliverable is a structured `status=draft` IMSkill submitted via
|
|
167
|
+
`cloud skill draft create`, not a chat-bound markdown document, so the
|
|
168
|
+
`result/` SOP does not apply.
|
|
169
|
+
|
|
170
|
+
### Added
|
|
171
|
+
|
|
172
|
+
- **Adapter version probe with KNOWN_GOOD pinning** (Release 201 v2.0.7
|
|
173
|
+
post-release P1). All four adapters (hermes / codex / claude-code /
|
|
174
|
+
openclaw) now run `<binary> --version` on startup, parse the result,
|
|
175
|
+
warn when the detected version drifts below the per-adapter
|
|
176
|
+
`MIN_VERSION`, and warn when it diverges from `KNOWN_GOOD`. Pins are
|
|
177
|
+
declared in the new `sdk/prismer-cloud/runtime/src/adapters/known-versions.ts`
|
|
178
|
+
manifest:
|
|
179
|
+
|
|
180
|
+
- hermes: MIN=`0.0.0` (soft-pass), KNOWN_GOOD=`unknown` — TODO(v2.0.8):
|
|
181
|
+
pin after cookbook run exercises a real hermes binary
|
|
182
|
+
- codex: MIN=`0.0.0` (soft-pass), KNOWN_GOOD=`unknown` — TODO(v2.0.8):
|
|
183
|
+
pin after cookbook run against `@openai/codex`
|
|
184
|
+
- claude-code: MIN=`2.0.0` (Wave-4 flag set requires 2.x), KNOWN_GOOD=
|
|
185
|
+
`unknown` — TODO(v2.0.8): pin knownGood after cookbook run
|
|
186
|
+
- openclaw: MIN=`2026.4.0`, KNOWN_GOOD=`2026.4.0` — wrapper carries a
|
|
187
|
+
2026.4.x stderr-bleed workaround, revisit once upstream fixes
|
|
188
|
+
|
|
189
|
+
Honesty note: three of the four pins are intentionally unpinned at
|
|
190
|
+
the floor — this is the governance scaffold, not a claim that we've
|
|
191
|
+
validated specific upstream revs. Bumping the pins is a v2.0.8 task
|
|
192
|
+
blocked on real cookbook runs.
|
|
193
|
+
|
|
194
|
+
- New `sdk/prismer-cloud/runtime/src/adapters/version-check.ts` —
|
|
195
|
+
`compareSemver`, `isVersionInRange`, `parseVersionFromStdout` shared
|
|
196
|
+
helpers so the four adapters do not redefine their own semver math.
|
|
197
|
+
|
|
198
|
+
- `/healthz` `adapters[]` entries now carry `minVersion` + `knownGood`
|
|
199
|
+
alongside the existing `name` / `ready` / `version` fields so cloud
|
|
200
|
+
debug-pipeline can flag drift between detected and tested versions.
|
|
201
|
+
|
|
202
|
+
- `test/adapters-version-check.test.ts` — vitest regression covering
|
|
203
|
+
compareSemver, range checks, pre-release stripping, parseVersionFromStdout,
|
|
204
|
+
and the `ADAPTER_KNOWN_VERSIONS` manifest shape.
|
|
205
|
+
|
|
5
206
|
## v2.0.1 — 2026-05-21 — Skill multi-file manifest protocol (§A.7 Phase 1) + URL asset fetch
|
|
6
207
|
|
|
7
208
|
Coordinated v2.0.1 patch release. `/VERSION` → 2.0.1. Internal preview only;
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-coordination
|
|
3
|
+
description: Find other agents, list participants in a conversation, send routed messages, attach files, and recover earlier conversation context (history / resolve a fuzzy reference / read a quoted message / read compressed summaries). Use whenever you need to delegate to another agent, address a peer in a multi-agent conversation, send a message that carries a file, or pull context that scrolled out of your prompt window. Executes via `cloud discover`, `cloud im conversations`, `cloud send`, `cloud file send`, `cloud conversation history|resolve-identifier|summary`, and `cloud quote read` CLIs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent Coordination
|
|
7
|
+
|
|
8
|
+
Multi-agent workspaces route messages between named agents. This skill bundles the four-step flow: **discover → list-in-conversation → send → (optional) attach file**. The platform enforces that messages are routed to **agents who are participants in the conversation**, so you can't shortcut steps 1–2 even when you "know" the username from chat text.
|
|
9
|
+
|
|
10
|
+
## ⛔ Inline subagents are NOT delegation
|
|
11
|
+
|
|
12
|
+
If you have an inline `Task` / `Subagent` / `ParallelAgents` / fan-out tool available (Anthropic Claude Code, Cursor, Cline, etc.), **never use it to fulfil a "delegate to <peer-agent>" request**. Inline subagents:
|
|
13
|
+
|
|
14
|
+
- run in your own process, with your own context and credentials
|
|
15
|
+
- never appear on the workspace Kanban
|
|
16
|
+
- never @-mention the supposed assignee in the conversation
|
|
17
|
+
- finish in seconds, which to the user looks like you did the work yourself (because you did)
|
|
18
|
+
|
|
19
|
+
For peer-agent delegation, the canonical paths are **`cloud task create --assignee-name <peer>`** (tracked deliverable; see the `tasks` skill) and **`cloud send <peer-username>`** (ad-hoc message; see below). Anything else — including inline subagents — is the wrong tool, and the user will notice (the supposed assignee was never @-mentioned in chat, and your response came back too fast).
|
|
20
|
+
|
|
21
|
+
## When to use
|
|
22
|
+
|
|
23
|
+
- The user asks to **delegate** something to another agent ("ask Bob to review this") — `cloud task create` for tracked work, `cloud send` for ad-hoc routing. **Never an inline subagent.**
|
|
24
|
+
- You're in a multi-agent conversation and want to **address** a specific peer.
|
|
25
|
+
- You need to **find an agent** with a specific capability (`code-review`, `data-analysis`, `repair`).
|
|
26
|
+
- You need to **send a message** that carries an attached file (report, log, image).
|
|
27
|
+
|
|
28
|
+
## CLI Reference
|
|
29
|
+
|
|
30
|
+
### Discover (workspace-wide directory)
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cloud discover # all visible agents
|
|
34
|
+
cloud discover --capability code-review # filter by capability
|
|
35
|
+
cloud discover --online-only # only online agents
|
|
36
|
+
cloud im contacts # your contact list
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### List participants in a conversation (scoped)
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
cloud im conversations # all your conversations
|
|
43
|
+
cloud im conversations --unread # unread only
|
|
44
|
+
cloud im conversations <conversationId> --members # agents + humans in this conversation
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Send a message
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Direct message to an agent
|
|
51
|
+
cloud send <to-username> "Please review the PR"
|
|
52
|
+
cloud send <to-username> "## Report" -t markdown
|
|
53
|
+
cloud send <to-username> --reply-to <messageId> "Acknowledged"
|
|
54
|
+
|
|
55
|
+
# Conversation-scoped (multi-agent group)
|
|
56
|
+
cloud im groups send <groupId> "Team update: feature shipped"
|
|
57
|
+
|
|
58
|
+
# With routing metadata
|
|
59
|
+
cloud send <to-username> "Need approval" --conversation-id <convId>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Send with attached file
|
|
63
|
+
|
|
64
|
+
> **决定怎么交付文件 — 先读这条:**
|
|
65
|
+
>
|
|
66
|
+
> - **你这次任务的最终交付物(要跟你的回复一起出现的产物)** → 写进
|
|
67
|
+
> `${PRISMER_ARTIFACTS_DIR}`(当前 dispatch 的 `artifacts/` 目录)。
|
|
68
|
+
> daemon artifacts-watcher 会自动归档并把 assetId **挂到你这条 dispatch
|
|
69
|
+
> 回复上**,于是「文件 + 你的总结文字」是**同一条消息**。这是默认路径。
|
|
70
|
+
> - **`cloud file send` 会另起一条独立消息**(先于/晚于你的回复单独落),
|
|
71
|
+
> 只适合「对话进行中临时丢个文件给对方看」这种 ad-hoc 分享,**不要**用它
|
|
72
|
+
> 交付任务最终产物 —— 否则用户会看到「一条只有文件的消息」+「一条只有
|
|
73
|
+
> 文字的消息」分裂开(release201/30 §4 + §7)。
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# 默认:最终交付物写进 artifacts/,随你的回复单条附带(无需任何 send 命令)
|
|
77
|
+
cp ./report.pdf "${PRISMER_ARTIFACTS_DIR}/" # 然后正常回复即可(平台自动收尾)
|
|
78
|
+
|
|
79
|
+
# ad-hoc 临时分享(会另起独立消息 — 不要拿来交付最终产物)
|
|
80
|
+
# 文字说明用 -c/--content(不是 --message —— 后者不存在,commander 会报
|
|
81
|
+
# unknown option,逼 agent 试错)。`cloud file send <conversationId> <path>`
|
|
82
|
+
# 之外仅 [-c|--content <text>] [--mime <type>] [--json] 三个旗标。
|
|
83
|
+
cloud file send <conversationId> ./report.pdf
|
|
84
|
+
cloud file send <conversationId> ./report.pdf --content "Latest numbers, please review"
|
|
85
|
+
cloud file send <conversationId> ./image.png --mime image/png
|
|
86
|
+
|
|
87
|
+
# On hermes (no per-dispatch env): also pass --run-id "<run_id>" (copied from
|
|
88
|
+
# <execution_context>) so the daemon proxy activates. Spawn adapters
|
|
89
|
+
# (claude-code / codex) have the env set and don't need it.
|
|
90
|
+
cloud file send <conversationId> ./report.pdf --run-id "<run_id>"
|
|
91
|
+
|
|
92
|
+
# Or upload first, then send by asset id
|
|
93
|
+
cloud file upload ./report.pdf # → returns assetId / uploadId
|
|
94
|
+
cloud send <to-username> "See attached" --asset-id <assetId>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Attach a file to a message you ALREADY sent (`cloud attach`)
|
|
98
|
+
|
|
99
|
+
> **「我已经回了,现在想给那条消息补一个产物」** —— `cloud send` / `cloud
|
|
100
|
+
> file send` 返回的 `messageId` 就是给这个用的。先发消息拿到 `messageId`,之后
|
|
101
|
+
> 产出文件时用 `cloud attach <messageId> <abs-path>` 把它**补挂到那条已发出的
|
|
102
|
+
> 消息上**(不会另起一条)。这跟 `cloud deliver`(随你**这一**回复一起发,回复
|
|
103
|
+
> 还没落)是互补的两件事:`deliver` 管「这条回复带文件」,`attach` 管「补挂到
|
|
104
|
+
> 已有消息」。
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
cloud attach <messageId> ./addendum.pdf
|
|
108
|
+
|
|
109
|
+
# On hermes (no per-dispatch env): also pass --run-id "<run_id>" and
|
|
110
|
+
# --conversation-id "<conversation_id>" (both copied from <execution_context>)
|
|
111
|
+
# so the daemon proxy activates + the attach route knows which thread the
|
|
112
|
+
# message lives in. Spawn adapters (claude-code / codex) have the env set.
|
|
113
|
+
cloud attach <messageId> ./addendum.pdf --run-id "<run_id>" --conversation-id "<conversation_id>"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Read earlier conversation context (on demand)
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
cloud conversation history <conversationId> # recent messages (oldest→newest)
|
|
120
|
+
cloud conversation history <conversationId> --limit 100 # pull more turns
|
|
121
|
+
cloud conversation history <conversationId> --before <messageId> # page further back
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
When you need context from **earlier in the conversation** than what you were handed — the user references "the layout we discussed", "that file from before", an earlier decision, or anything that isn't in the prompt you received — run `cloud conversation history <conversationId>` to fetch the prior turns yourself. Each message comes back as `{ id, role, sender, content, createdAt }`. Don't guess at what was said earlier; pull it. Don't assume the full history was pre-loaded into your prompt — it deliberately isn't (only a recent window is). Page backwards with `--before <messageId>` if you need still-older turns.
|
|
125
|
+
|
|
126
|
+
## Memory & quoting
|
|
127
|
+
|
|
128
|
+
A conversation is an unbounded sequence; only a recent window is in your prompt. Four CLIs let you recover anything that scrolled out — **pull it, never invent it**. None of this goes through MCP; it's all `cloud` CLI.
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# 1. Earlier raw turns (verbatim messages, oldest→newest)
|
|
132
|
+
cloud conversation history <conversationId> [--limit N] [--before <messageId>]
|
|
133
|
+
|
|
134
|
+
# 2. Resolve a fuzzy reference ("上次那个 layout", "the auth doc") to a canonical id
|
|
135
|
+
cloud conversation resolve-identifier <conversationId> "<alias>"
|
|
136
|
+
|
|
137
|
+
# 3. Read the full text of a specific quoted/referenced message
|
|
138
|
+
cloud quote read <conversationId> <messageId>
|
|
139
|
+
|
|
140
|
+
# 4. Read compressed summaries of older segments (cheap recall of the whole arc)
|
|
141
|
+
cloud conversation summary <conversationId>
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**When to reach for which:**
|
|
145
|
+
|
|
146
|
+
- **`history`** — you need the exact wording of recent-but-out-of-window turns, or to page back through a stretch of the conversation. Returns `{ id, role, sender, content, createdAt }` per message.
|
|
147
|
+
- **`resolve-identifier`** — the user refers to something by an alias or vague phrase ("the layout we picked", "that PR", "the doc from yesterday") and you need the canonical id before acting on it. Output is `{ ambiguous, resolved, candidates[], note }`.
|
|
148
|
+
- **`quote read`** — a message quotes/replies to an earlier one and you need that earlier message's full content (not just the snippet). Survives source deletion — if the original was deleted you get `deleted: true` + `sourceDeletedAt`, but still the snapshot content.
|
|
149
|
+
- **`summary`** — you want the gist of the *whole* conversation arc without paging through every turn. Returns compressed-segment summaries (`{ segmentSeq, summary, coversFrom/To…, messageCount, tokenCount }`) for the current range. Use it to orient, then `history` / `quote read` to drill into the exact wording.
|
|
150
|
+
|
|
151
|
+
### ⛔ Disambiguation rule (mandatory)
|
|
152
|
+
|
|
153
|
+
`resolve-identifier` returns `ambiguous: true` (with `resolved: null` and **multiple `candidates`**) when the alias matched more than one identifier. When this happens you **MUST** present the candidates to the user and ask which one they meant. **Never guess a `canonicalId`, never silently pick the first/highest-scoring candidate, never proceed on a tie.** Picking wrong here corrupts every downstream action. The `note` field in the output restates this — honour it.
|
|
154
|
+
|
|
155
|
+
When `resolved` is non-null (`ambiguous: false`), exactly one identifier matched and you may proceed. When `candidates` is empty, nothing matched — ask the user to clarify what they're referring to rather than inventing an id.
|
|
156
|
+
|
|
157
|
+
### Run checkpoints (daemon-local)
|
|
158
|
+
|
|
159
|
+
Long runs persist **phase-level** checkpoints on the daemon (one per phase transition, not per tool step). They drive automatic crash-resume; you normally never touch them. For manual save/restore of a run's checkpoint state (ops / before a risky reset), use the daemon-local `session` CLI — also `cloud`-family, never MCP:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
prismer session checkpoint list <runId> # show this run's live phase checkpoints
|
|
163
|
+
prismer session checkpoint save <runId> # snapshot them to a sidecar JSON
|
|
164
|
+
prismer session checkpoint restore <runId> # re-apply a saved snapshot
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
`<runId>` is the task/run id. These operate on local SQLite, so they work even when the daemon process is down.
|
|
168
|
+
|
|
169
|
+
## Workflow (delegating to another agent)
|
|
170
|
+
|
|
171
|
+
1. **List conversation participants first.** `cloud im conversations <convId> --members` returns the `agents` array with `username`, `id`, `displayName`, `agentType`, `capabilities`. Don't `discover` if the target is already in the conversation — it leaks agents outside the routing scope into your candidate set.
|
|
172
|
+
2. **Pick the target.** Match on capability + status. Exclude your own username. If multiple match, pick the most specific capability and surface the choice to the user if unclear.
|
|
173
|
+
3. **Compose a routed message** with: requested action, context, constraints, expected output. Don't bury the ask in pleasantries.
|
|
174
|
+
4. **Send with the exact `to-username`** the listing returned. Don't transform "@Alice" → "alice" by yourself — use the exact string the service returned.
|
|
175
|
+
5. **Check the return value.** `cloud send` may return `{ ok: false, error: 'agent_not_found' }` even when you got the username from listing (the agent may have left between calls). If `ok: false`, surface the error; don't pretend dispatch succeeded.
|
|
176
|
+
|
|
177
|
+
## Workflow (file attachment)
|
|
178
|
+
|
|
179
|
+
1. Confirm the file exists locally and is the artifact the user should receive.
|
|
180
|
+
2. Prefer writing new outputs under `PRISMER_ARTIFACTS_DIR` (the current dispatch's `artifacts/` dir) — the daemon artifacts-watcher auto-archives every file there as an IMAsset and attaches the IDs to your dispatch reply. See release201/30 §4 for the full pipeline.
|
|
181
|
+
3. Use this skill for **existing files elsewhere** or when you need an explicit message title alongside the attachment.
|
|
182
|
+
4. Record the uploaded asset ID returned by the service.
|
|
183
|
+
5. Mention the attachment in the user-facing reply **only after** the send/queue succeeded.
|
|
184
|
+
|
|
185
|
+
## Operating Rules
|
|
186
|
+
|
|
187
|
+
### Discover
|
|
188
|
+
|
|
189
|
+
- Choose capability filters based on the **actual task**, not broad role guesses. "Code review" not "developer".
|
|
190
|
+
- Use `--online-only` only when immediate response is required — otherwise async agents can pick up the task.
|
|
191
|
+
- Compare names, IDs, descriptions, capabilities, and status before picking. Identical display names exist.
|
|
192
|
+
- Use returned IDs/usernames for routing — never invent or guess identifiers from chat text.
|
|
193
|
+
|
|
194
|
+
### List participants
|
|
195
|
+
|
|
196
|
+
- This is **scoped to one conversation**, not a global directory. Don't use it to find agents you want to invite.
|
|
197
|
+
- **Humans are not callable** through `send`/`im groups send` to a user-username; they participate as conversation members but aren't routed to. Use the conversation channel itself for human-facing messages.
|
|
198
|
+
- If the list call fails, surface the error. Don't pretend a message can be routed when you don't know who's in the conversation.
|
|
199
|
+
|
|
200
|
+
### Send
|
|
201
|
+
|
|
202
|
+
- **Always use the skill** instead of just writing `@username` in plain prose when routing is intended. Plain text `@username` may or may not trigger routing depending on the channel — the CLI guarantees it.
|
|
203
|
+
- **Never send to yourself.**
|
|
204
|
+
- **Don't send to agents outside the conversation** unless this is a direct message (`cloud send <user-id>`).
|
|
205
|
+
- Don't include secrets or **unrelated private context** in the routed message. The agent on the other end gets the full text.
|
|
206
|
+
- If routing involves `@username` shorthand in the message body, prefer letting the CLI add it via `--to-username` over hand-writing the mention.
|
|
207
|
+
|
|
208
|
+
### File attach
|
|
209
|
+
|
|
210
|
+
- Don't attach unrelated files or files containing secrets. The recipient gets full access to the asset.
|
|
211
|
+
- Don't rely on **direct upload alone** to make a file visible — verify the response confirms attachment to the conversation/message.
|
|
212
|
+
- Use `--mime` override only when auto-detection would be wrong (rare; usually unset).
|
|
213
|
+
- If upload fails, report the failure and keep the local path available for retry.
|
|
214
|
+
|
|
215
|
+
### Memory & quoting
|
|
216
|
+
|
|
217
|
+
- **Pull, don't guess.** If the answer depends on something earlier in the conversation, fetch it (`history` / `quote read` / `summary`) instead of reconstructing it from memory or the user's paraphrase.
|
|
218
|
+
- **`resolve-identifier` ambiguity is a hard stop.** `ambiguous: true` → ask the user; never auto-pick. No match → ask the user; never invent an id. See the disambiguation rule above.
|
|
219
|
+
- **Quote content is authoritative over your recollection.** When a user quotes a message, `quote read` returns the exact text — defer to it even if it differs from what you remember.
|
|
220
|
+
- **Use `summary` to orient, `history`/`quote read` to drill in.** Summaries are lossy by design; never quote a user back a "summary" as if it were their exact words.
|
|
221
|
+
- These reads are membership-scoped — if you get a 403, you're not a participant in that conversation; don't retry against a different conversation id you weren't given.
|
|
222
|
+
|
|
223
|
+
## Output reporting
|
|
224
|
+
|
|
225
|
+
After discover: list each candidate as `<username> · <displayName> · capabilities=[a,b,c] · status=<online|offline>`.
|
|
226
|
+
|
|
227
|
+
After listing participants: same format, scoped to the conversation.
|
|
228
|
+
|
|
229
|
+
After send: echo the returned `messageId` and `conversationId`. If the service returned a redacted version (signed/encrypted), surface that.
|
|
230
|
+
|
|
231
|
+
After file send: echo the `messageId` + the asset's stable identifier (assetId or uploadId).
|
|
232
|
+
|
|
233
|
+
## Backing capabilities (D22 mapping)
|
|
234
|
+
|
|
235
|
+
Replaces these v1.x built-in skills: `agent-discover`, `conversation-list-agents`, `agent-send`, `message-send-file`.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-meta
|
|
3
|
+
description: Inspect, snapshot, publish, and fork Prismer long-running agents through the cloud agent lifecycle API.
|
|
4
|
+
allowed-tools: cloud.agent.spec cloud.agent.snapshot cloud.agent.snapshots cloud.agent.restore cloud.agent.publish cloud.agent.packs cloud.agent.fork prismer.agent.snapshot prismer.agent.publish prismer.agent.fork
|
|
5
|
+
metadata:
|
|
6
|
+
prismer:
|
|
7
|
+
category: workflow-core
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Agent Meta
|
|
12
|
+
|
|
13
|
+
Use this skill when the user asks you to inspect, save, restore, publish, or fork a Prismer long-running agent.
|
|
14
|
+
|
|
15
|
+
## Commands
|
|
16
|
+
|
|
17
|
+
- Inspect your 4-tuple spec:
|
|
18
|
+
`cloud agent spec <agent-id>`
|
|
19
|
+
|
|
20
|
+
- Save a private owner snapshot:
|
|
21
|
+
`cloud agent snapshot <agent-id> --label "<label>"`
|
|
22
|
+
|
|
23
|
+
- Save a snapshot with memory reference:
|
|
24
|
+
`cloud agent snapshot <agent-id> --include-memory --label "<label>"`
|
|
25
|
+
|
|
26
|
+
- List snapshots:
|
|
27
|
+
`cloud agent snapshots <agent-id>`
|
|
28
|
+
|
|
29
|
+
- Restore from a snapshot:
|
|
30
|
+
`cloud agent restore <agent-id> <snapshot-id>`
|
|
31
|
+
|
|
32
|
+
- Publish an agent pack without memory:
|
|
33
|
+
`cloud agent publish <agent-id> --slug <pack-slug> --version 1.0.0 --license proprietary`
|
|
34
|
+
|
|
35
|
+
- List public agent packs:
|
|
36
|
+
`cloud agent packs`
|
|
37
|
+
|
|
38
|
+
- Fork a pack into a workspace:
|
|
39
|
+
`cloud agent fork <pack-id-or-slug> --workspace-id <workspace-id> --display-name "<name>"`
|
|
40
|
+
|
|
41
|
+
The runtime CLI has the same operational verbs for daemon environments:
|
|
42
|
+
|
|
43
|
+
- `prismer agent snapshot <agent-id>`
|
|
44
|
+
- `prismer agent publish <agent-id> --slug <pack-slug>`
|
|
45
|
+
- `prismer agent fork <pack-id-or-slug> --workspace-id <workspace-id>`
|
|
46
|
+
|
|
47
|
+
## Rules
|
|
48
|
+
|
|
49
|
+
- Do not publish memory. The publish path strips memory by default; keep it that way unless a platform policy explicitly changes.
|
|
50
|
+
- Use snapshots for owner backup and restore. Use publish only when the user asks to share or reuse the agent as an Agent Pack.
|
|
51
|
+
- Fork creates a new identity and a clean memory partition in the target workspace.
|
|
52
|
+
- If the user asks to "save your config", create a snapshot rather than publishing.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: assets
|
|
3
|
+
description: Locate, inspect, and read content-addressed workspace assets — search by filename/metadata, describe before reading bytes, then read bounded ranges. Use whenever the user references an uploaded file, when you need to cite file evidence, or when a task input/output is an asset URI. Executes via the `cloud asset` CLI and tools.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Assets
|
|
7
|
+
|
|
8
|
+
Workspace assets are **content-addressed** (SHA-256). Each asset has a stable URI, MIME type, size, and metadata. Treat assets as **opaque bytes you must search → describe → read** in that order. Don't claim you read a file unless a CLI call actually returned its content.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- The user references a file by name, path, or `prismer://...` URI and you need its content.
|
|
13
|
+
- A task description includes asset attachments — find them, inspect them, decide if you need to read bytes.
|
|
14
|
+
- You're answering a question that requires citing file evidence (extract text, quote a paragraph, summarize a doc).
|
|
15
|
+
- You need to find a file by hash, filename, or content keyword.
|
|
16
|
+
|
|
17
|
+
## CLI Reference
|
|
18
|
+
|
|
19
|
+
### Search
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
cloud asset list # everything in current workspace
|
|
23
|
+
cloud asset list --limit 20 --kind file
|
|
24
|
+
cloud asset list --filename "design-doc*" # filename glob
|
|
25
|
+
cloud asset list --mime "application/pdf" # by MIME
|
|
26
|
+
cloud asset list --updated-after "2026-05-01" # recency
|
|
27
|
+
cloud asset by-hash <sha256> # exact content lookup
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Describe (metadata only, no bytes)
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cloud asset get <assetId> # full metadata, no content
|
|
34
|
+
# OR for in-process MCP tools (when daemon exposes them):
|
|
35
|
+
# prismer.asset.describe { uri | assetId | contentHash }
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Read (bounded ranges only)
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
cloud asset download <assetId> --out ./local-copy # whole file to disk
|
|
42
|
+
cloud asset download <assetId> --offset 0 --length 4096 # first 4 KB
|
|
43
|
+
# For LLM-friendly text extraction:
|
|
44
|
+
cloud asset read <assetId> --offset 0 --length 4096 # text range read
|
|
45
|
+
cloud asset read <assetId> --as-text # full text (for small text-like assets)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Upload / Sync
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
cloud asset upload ./report.pdf # → asset record + content hash
|
|
52
|
+
cloud asset upload ./report.pdf --conversation-id <id> # pin to conversation
|
|
53
|
+
cloud asset sync # refresh local cache index
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Workflow
|
|
57
|
+
|
|
58
|
+
1. **Search first** — use `cloud asset list` with filename / MIME / hash filters unless the user gave you an exact ID or URI.
|
|
59
|
+
2. **Describe before reading bytes** — `cloud asset get <id>` to confirm MIME, size, and that this is the right file.
|
|
60
|
+
3. **Read bounded ranges** — `--offset` + `--length`. Start with a small range (4 KB) to identify encoding/structure, then expand only if needed.
|
|
61
|
+
4. **Preserve the locator** — record the asset ID, content hash, and URI in your reply so the user can follow up.
|
|
62
|
+
|
|
63
|
+
## Operating Rules
|
|
64
|
+
|
|
65
|
+
### Search
|
|
66
|
+
|
|
67
|
+
- Don't guess asset identifiers when `asset list` can locate them. Filename + size + workspace = usually unique.
|
|
68
|
+
- Prefer **exact** filters (hash, full filename, MIME) over broad terms.
|
|
69
|
+
- Content search is **best-effort for text-like assets only**. PDFs, images, binaries won't match content queries — search by metadata.
|
|
70
|
+
- Use a small `--limit` for targeted lookups; expand only when the first batch misses.
|
|
71
|
+
|
|
72
|
+
### Describe
|
|
73
|
+
|
|
74
|
+
- **Always describe before reading.** Metadata tells you whether reading is safe (text vs binary, size, encoding).
|
|
75
|
+
- Don't treat metadata as proof of file contents — title and MIME can lie. The content hash is the only authoritative identity.
|
|
76
|
+
- If multiple locators disagree (e.g. filename matches two assets with different hashes), **stop and re-search** rather than reading the wrong file.
|
|
77
|
+
- Avoid reading binary or image-heavy assets directly. For images, use `cloud parse` (OCR) or a vision-capable downstream tool; for PDFs, use `cloud parse`.
|
|
78
|
+
|
|
79
|
+
### Read
|
|
80
|
+
|
|
81
|
+
- **Never load an entire large file** — `--length` caps reads. Start at 4 KB, expand only when the answer requires it.
|
|
82
|
+
- Byte offsets don't align to line or character boundaries in multibyte text — handle the partial-token edge at the read boundary.
|
|
83
|
+
- Watch the `truncated` flag in the response. If set, plan additional reads or tell the user the answer is based on a partial read.
|
|
84
|
+
- Report partial reads explicitly when drawing conclusions from excerpts ("based on the first 8 KB of `<filename>`...").
|
|
85
|
+
|
|
86
|
+
### Cite
|
|
87
|
+
|
|
88
|
+
- When citing file evidence, **include the asset ID/URI and the locator** (offset + length, page number, or hash). The user needs to be able to follow up.
|
|
89
|
+
- Never claim you read an asset unless a CLI/tool call **succeeded** with content in the response. Hallucinated reads are the #1 trust failure.
|
|
90
|
+
|
|
91
|
+
## Output reporting
|
|
92
|
+
|
|
93
|
+
After search: list matches with `<assetId> <filename> <mime> <sizeBytes>`. If 0 matches, say so and suggest broader filters.
|
|
94
|
+
|
|
95
|
+
After describe: surface MIME, size, and any structured metadata fields relevant to the user's question (page count for PDFs, dimensions for images, etc.).
|
|
96
|
+
|
|
97
|
+
After read: include the asset locator + range + content. If `truncated: true`, say "(partial — read X of Y bytes)".
|
|
98
|
+
|
|
99
|
+
## ContentBlock output (v2.0 §4.6 / Gap E-⑤)
|
|
100
|
+
|
|
101
|
+
When this skill resolves an **image** asset for downstream rendering, emit a
|
|
102
|
+
ContentBlock pointing at the asset id rather than inlining bytes or a
|
|
103
|
+
pre-signed URL into prose:
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{ "kind": "image", "assetId": "<assetId>", "mediaType": "image/png", "alt": "<one-line desc>" }
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
When it resolves a **file** asset (PDF, CSV, archive) the reply should include
|
|
110
|
+
the asset as an attachment (auto-handled by writing into
|
|
111
|
+
`$PRISMER_ARTIFACTS_DIR` — daemon's artifacts-watcher scans the dispatch's
|
|
112
|
+
`artifacts/` dir and auto-archives + attaches per release201/30 §4 — or
|
|
113
|
+
explicitly as):
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{ "kind": "file", "assetId": "<assetId>", "mediaType": "application/pdf", "filename": "<original>" }
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Do NOT paste raw bytes or `data:` URIs into the reply body — they bypass the
|
|
120
|
+
content-addressed store, defeat caching, and make follow-up retrieval
|
|
121
|
+
impossible. The chat renderer reads ContentBlock attachments and surfaces
|
|
122
|
+
them as previews automatically.
|
|
123
|
+
|
|
124
|
+
## Backing capabilities (D22 mapping)
|
|
125
|
+
|
|
126
|
+
Replaces these v1.x built-in skills: `asset-search`, `asset-describe`, `asset-read`.
|
|
127
|
+
|
|
128
|
+
Implements Gap E-⑤ (built-in skill multimodal output) for the asset family —
|
|
129
|
+
`assets.describe` / `assets.read` outputs flow through dispatch reply
|
|
130
|
+
attachments (`AgentDispatchReplyPayload.attachments` typed as `{kind, assetId}`
|
|
131
|
+
which maps to ContentBlock at chat-render time).
|