loudmouth-ai 0.1.0 → 0.2.0
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/README.md +148 -77
- package/dist/build-info.json +3 -3
- package/extensions/package.json +6 -0
- package/package.json +1 -1
- package/skills/autopilot/SKILL.md +179 -0
- package/skills/goals/SKILL.md +189 -0
- package/skills/wordpress/SKILL.md +232 -0
- package/extensions/bluebubbles/clawdbot.plugin.json +0 -11
- package/extensions/bluebubbles/index.ts +0 -20
- package/extensions/bluebubbles/package.json +0 -33
- package/extensions/bluebubbles/src/accounts.ts +0 -80
- package/extensions/bluebubbles/src/actions.test.ts +0 -651
- package/extensions/bluebubbles/src/actions.ts +0 -403
- package/extensions/bluebubbles/src/attachments.test.ts +0 -346
- package/extensions/bluebubbles/src/attachments.ts +0 -282
- package/extensions/bluebubbles/src/channel.ts +0 -399
- package/extensions/bluebubbles/src/chat.test.ts +0 -462
- package/extensions/bluebubbles/src/chat.ts +0 -354
- package/extensions/bluebubbles/src/config-schema.ts +0 -51
- package/extensions/bluebubbles/src/media-send.ts +0 -168
- package/extensions/bluebubbles/src/monitor.test.ts +0 -2140
- package/extensions/bluebubbles/src/monitor.ts +0 -2101
- package/extensions/bluebubbles/src/onboarding.ts +0 -340
- package/extensions/bluebubbles/src/probe.ts +0 -127
- package/extensions/bluebubbles/src/reactions.test.ts +0 -393
- package/extensions/bluebubbles/src/reactions.ts +0 -183
- package/extensions/bluebubbles/src/runtime.ts +0 -14
- package/extensions/bluebubbles/src/send.test.ts +0 -809
- package/extensions/bluebubbles/src/send.ts +0 -418
- package/extensions/bluebubbles/src/targets.test.ts +0 -184
- package/extensions/bluebubbles/src/targets.ts +0 -323
- package/extensions/bluebubbles/src/types.ts +0 -127
- package/extensions/copilot-proxy/README.md +0 -24
- package/extensions/copilot-proxy/clawdbot.plugin.json +0 -11
- package/extensions/copilot-proxy/index.ts +0 -142
- package/extensions/copilot-proxy/package.json +0 -11
- package/extensions/google-antigravity-auth/README.md +0 -24
- package/extensions/google-antigravity-auth/clawdbot.plugin.json +0 -11
- package/extensions/google-antigravity-auth/index.ts +0 -437
- package/extensions/google-antigravity-auth/package.json +0 -11
- package/extensions/google-gemini-cli-auth/README.md +0 -35
- package/extensions/google-gemini-cli-auth/clawdbot.plugin.json +0 -11
- package/extensions/google-gemini-cli-auth/index.ts +0 -91
- package/extensions/google-gemini-cli-auth/oauth.test.ts +0 -228
- package/extensions/google-gemini-cli-auth/oauth.ts +0 -580
- package/extensions/google-gemini-cli-auth/package.json +0 -11
- package/extensions/googlechat/clawdbot.plugin.json +0 -11
- package/extensions/googlechat/index.ts +0 -20
- package/extensions/googlechat/package.json +0 -39
- package/extensions/googlechat/src/accounts.ts +0 -133
- package/extensions/googlechat/src/actions.ts +0 -162
- package/extensions/googlechat/src/api.test.ts +0 -62
- package/extensions/googlechat/src/api.ts +0 -259
- package/extensions/googlechat/src/auth.ts +0 -113
- package/extensions/googlechat/src/channel.ts +0 -580
- package/extensions/googlechat/src/monitor.test.ts +0 -27
- package/extensions/googlechat/src/monitor.ts +0 -900
- package/extensions/googlechat/src/onboarding.ts +0 -278
- package/extensions/googlechat/src/runtime.ts +0 -14
- package/extensions/googlechat/src/targets.test.ts +0 -35
- package/extensions/googlechat/src/targets.ts +0 -55
- package/extensions/googlechat/src/types.config.ts +0 -3
- package/extensions/googlechat/src/types.ts +0 -73
- package/extensions/imessage/clawdbot.plugin.json +0 -11
- package/extensions/imessage/index.ts +0 -18
- package/extensions/imessage/package.json +0 -11
- package/extensions/imessage/src/channel.ts +0 -294
- package/extensions/imessage/src/runtime.ts +0 -14
- package/extensions/line/clawdbot.plugin.json +0 -11
- package/extensions/line/index.ts +0 -20
- package/extensions/line/package.json +0 -29
- package/extensions/line/src/card-command.ts +0 -338
- package/extensions/line/src/channel.logout.test.ts +0 -96
- package/extensions/line/src/channel.sendPayload.test.ts +0 -308
- package/extensions/line/src/channel.ts +0 -773
- package/extensions/line/src/runtime.ts +0 -14
- package/extensions/matrix/CHANGELOG.md +0 -54
- package/extensions/matrix/clawdbot.plugin.json +0 -11
- package/extensions/matrix/index.ts +0 -18
- package/extensions/matrix/package.json +0 -36
- package/extensions/matrix/src/actions.ts +0 -185
- package/extensions/matrix/src/channel.directory.test.ts +0 -56
- package/extensions/matrix/src/channel.ts +0 -417
- package/extensions/matrix/src/config-schema.ts +0 -62
- package/extensions/matrix/src/directory-live.ts +0 -175
- package/extensions/matrix/src/group-mentions.ts +0 -61
- package/extensions/matrix/src/matrix/accounts.test.ts +0 -83
- package/extensions/matrix/src/matrix/accounts.ts +0 -63
- package/extensions/matrix/src/matrix/actions/client.ts +0 -53
- package/extensions/matrix/src/matrix/actions/messages.ts +0 -120
- package/extensions/matrix/src/matrix/actions/pins.ts +0 -70
- package/extensions/matrix/src/matrix/actions/reactions.ts +0 -84
- package/extensions/matrix/src/matrix/actions/room.ts +0 -88
- package/extensions/matrix/src/matrix/actions/summary.ts +0 -77
- package/extensions/matrix/src/matrix/actions/types.ts +0 -84
- package/extensions/matrix/src/matrix/actions.ts +0 -15
- package/extensions/matrix/src/matrix/active-client.ts +0 -11
- package/extensions/matrix/src/matrix/client/config.ts +0 -165
- package/extensions/matrix/src/matrix/client/create-client.ts +0 -127
- package/extensions/matrix/src/matrix/client/logging.ts +0 -35
- package/extensions/matrix/src/matrix/client/runtime.ts +0 -4
- package/extensions/matrix/src/matrix/client/shared.ts +0 -169
- package/extensions/matrix/src/matrix/client/storage.ts +0 -131
- package/extensions/matrix/src/matrix/client/types.ts +0 -34
- package/extensions/matrix/src/matrix/client.test.ts +0 -57
- package/extensions/matrix/src/matrix/client.ts +0 -9
- package/extensions/matrix/src/matrix/credentials.ts +0 -103
- package/extensions/matrix/src/matrix/deps.ts +0 -57
- package/extensions/matrix/src/matrix/format.test.ts +0 -34
- package/extensions/matrix/src/matrix/format.ts +0 -22
- package/extensions/matrix/src/matrix/index.ts +0 -11
- package/extensions/matrix/src/matrix/monitor/allowlist.ts +0 -58
- package/extensions/matrix/src/matrix/monitor/auto-join.ts +0 -68
- package/extensions/matrix/src/matrix/monitor/direct.ts +0 -105
- package/extensions/matrix/src/matrix/monitor/events.ts +0 -103
- package/extensions/matrix/src/matrix/monitor/handler.ts +0 -645
- package/extensions/matrix/src/matrix/monitor/index.ts +0 -279
- package/extensions/matrix/src/matrix/monitor/location.ts +0 -83
- package/extensions/matrix/src/matrix/monitor/media.test.ts +0 -103
- package/extensions/matrix/src/matrix/monitor/media.ts +0 -113
- package/extensions/matrix/src/matrix/monitor/mentions.ts +0 -31
- package/extensions/matrix/src/matrix/monitor/replies.ts +0 -96
- package/extensions/matrix/src/matrix/monitor/room-info.ts +0 -58
- package/extensions/matrix/src/matrix/monitor/rooms.ts +0 -43
- package/extensions/matrix/src/matrix/monitor/threads.ts +0 -64
- package/extensions/matrix/src/matrix/monitor/types.ts +0 -39
- package/extensions/matrix/src/matrix/poll-types.test.ts +0 -22
- package/extensions/matrix/src/matrix/poll-types.ts +0 -157
- package/extensions/matrix/src/matrix/probe.ts +0 -70
- package/extensions/matrix/src/matrix/send/client.ts +0 -63
- package/extensions/matrix/src/matrix/send/formatting.ts +0 -92
- package/extensions/matrix/src/matrix/send/media.ts +0 -220
- package/extensions/matrix/src/matrix/send/targets.test.ts +0 -102
- package/extensions/matrix/src/matrix/send/targets.ts +0 -144
- package/extensions/matrix/src/matrix/send/types.ts +0 -109
- package/extensions/matrix/src/matrix/send.test.ts +0 -172
- package/extensions/matrix/src/matrix/send.ts +0 -255
- package/extensions/matrix/src/onboarding.ts +0 -432
- package/extensions/matrix/src/outbound.ts +0 -53
- package/extensions/matrix/src/resolve-targets.ts +0 -89
- package/extensions/matrix/src/runtime.ts +0 -14
- package/extensions/matrix/src/tool-actions.ts +0 -160
- package/extensions/matrix/src/types.ts +0 -95
- package/extensions/mattermost/clawdbot.plugin.json +0 -11
- package/extensions/mattermost/index.ts +0 -18
- package/extensions/mattermost/package.json +0 -25
- package/extensions/mattermost/src/channel.test.ts +0 -43
- package/extensions/mattermost/src/channel.ts +0 -339
- package/extensions/mattermost/src/config-schema.ts +0 -56
- package/extensions/mattermost/src/group-mentions.ts +0 -14
- package/extensions/mattermost/src/mattermost/accounts.ts +0 -115
- package/extensions/mattermost/src/mattermost/client.ts +0 -208
- package/extensions/mattermost/src/mattermost/index.ts +0 -9
- package/extensions/mattermost/src/mattermost/monitor-helpers.ts +0 -150
- package/extensions/mattermost/src/mattermost/monitor.ts +0 -921
- package/extensions/mattermost/src/mattermost/probe.ts +0 -70
- package/extensions/mattermost/src/mattermost/send.ts +0 -217
- package/extensions/mattermost/src/normalize.ts +0 -38
- package/extensions/mattermost/src/onboarding-helpers.ts +0 -42
- package/extensions/mattermost/src/onboarding.ts +0 -187
- package/extensions/mattermost/src/runtime.ts +0 -14
- package/extensions/mattermost/src/types.ts +0 -50
- package/extensions/msteams/CHANGELOG.md +0 -51
- package/extensions/msteams/clawdbot.plugin.json +0 -11
- package/extensions/msteams/index.ts +0 -18
- package/extensions/msteams/package.json +0 -36
- package/extensions/msteams/src/attachments/download.ts +0 -206
- package/extensions/msteams/src/attachments/graph.ts +0 -319
- package/extensions/msteams/src/attachments/html.ts +0 -76
- package/extensions/msteams/src/attachments/payload.ts +0 -22
- package/extensions/msteams/src/attachments/shared.ts +0 -235
- package/extensions/msteams/src/attachments/types.ts +0 -37
- package/extensions/msteams/src/attachments.test.ts +0 -424
- package/extensions/msteams/src/attachments.ts +0 -18
- package/extensions/msteams/src/channel.directory.test.ts +0 -46
- package/extensions/msteams/src/channel.ts +0 -436
- package/extensions/msteams/src/conversation-store-fs.test.ts +0 -88
- package/extensions/msteams/src/conversation-store-fs.ts +0 -155
- package/extensions/msteams/src/conversation-store-memory.ts +0 -45
- package/extensions/msteams/src/conversation-store.ts +0 -41
- package/extensions/msteams/src/directory-live.ts +0 -179
- package/extensions/msteams/src/errors.test.ts +0 -46
- package/extensions/msteams/src/errors.ts +0 -158
- package/extensions/msteams/src/file-consent-helpers.test.ts +0 -234
- package/extensions/msteams/src/file-consent-helpers.ts +0 -73
- package/extensions/msteams/src/file-consent.ts +0 -122
- package/extensions/msteams/src/graph-chat.ts +0 -52
- package/extensions/msteams/src/graph-upload.ts +0 -445
- package/extensions/msteams/src/inbound.test.ts +0 -67
- package/extensions/msteams/src/inbound.ts +0 -38
- package/extensions/msteams/src/index.ts +0 -4
- package/extensions/msteams/src/media-helpers.test.ts +0 -186
- package/extensions/msteams/src/media-helpers.ts +0 -77
- package/extensions/msteams/src/messenger.test.ts +0 -245
- package/extensions/msteams/src/messenger.ts +0 -460
- package/extensions/msteams/src/monitor-handler/inbound-media.ts +0 -123
- package/extensions/msteams/src/monitor-handler/message-handler.ts +0 -629
- package/extensions/msteams/src/monitor-handler.ts +0 -166
- package/extensions/msteams/src/monitor-types.ts +0 -5
- package/extensions/msteams/src/monitor.ts +0 -290
- package/extensions/msteams/src/onboarding.ts +0 -432
- package/extensions/msteams/src/outbound.ts +0 -47
- package/extensions/msteams/src/pending-uploads.ts +0 -87
- package/extensions/msteams/src/policy.test.ts +0 -210
- package/extensions/msteams/src/policy.ts +0 -202
- package/extensions/msteams/src/polls-store-memory.ts +0 -30
- package/extensions/msteams/src/polls-store.test.ts +0 -40
- package/extensions/msteams/src/polls.test.ts +0 -72
- package/extensions/msteams/src/polls.ts +0 -299
- package/extensions/msteams/src/probe.test.ts +0 -57
- package/extensions/msteams/src/probe.ts +0 -99
- package/extensions/msteams/src/reply-dispatcher.ts +0 -128
- package/extensions/msteams/src/resolve-allowlist.ts +0 -277
- package/extensions/msteams/src/runtime.ts +0 -14
- package/extensions/msteams/src/sdk-types.ts +0 -19
- package/extensions/msteams/src/sdk.ts +0 -33
- package/extensions/msteams/src/send-context.ts +0 -156
- package/extensions/msteams/src/send.ts +0 -489
- package/extensions/msteams/src/sent-message-cache.test.ts +0 -16
- package/extensions/msteams/src/sent-message-cache.ts +0 -41
- package/extensions/msteams/src/storage.ts +0 -22
- package/extensions/msteams/src/store-fs.ts +0 -80
- package/extensions/msteams/src/token.ts +0 -19
- package/extensions/nextcloud-talk/clawdbot.plugin.json +0 -11
- package/extensions/nextcloud-talk/index.ts +0 -18
- package/extensions/nextcloud-talk/package.json +0 -30
- package/extensions/nextcloud-talk/src/accounts.ts +0 -154
- package/extensions/nextcloud-talk/src/channel.ts +0 -404
- package/extensions/nextcloud-talk/src/config-schema.ts +0 -78
- package/extensions/nextcloud-talk/src/format.ts +0 -79
- package/extensions/nextcloud-talk/src/inbound.ts +0 -336
- package/extensions/nextcloud-talk/src/monitor.ts +0 -246
- package/extensions/nextcloud-talk/src/normalize.ts +0 -31
- package/extensions/nextcloud-talk/src/onboarding.ts +0 -341
- package/extensions/nextcloud-talk/src/policy.ts +0 -175
- package/extensions/nextcloud-talk/src/room-info.ts +0 -111
- package/extensions/nextcloud-talk/src/runtime.ts +0 -14
- package/extensions/nextcloud-talk/src/send.ts +0 -206
- package/extensions/nextcloud-talk/src/signature.ts +0 -67
- package/extensions/nextcloud-talk/src/types.ts +0 -179
- package/extensions/nostr/CHANGELOG.md +0 -46
- package/extensions/nostr/README.md +0 -136
- package/extensions/nostr/clawdbot.plugin.json +0 -11
- package/extensions/nostr/index.ts +0 -69
- package/extensions/nostr/package.json +0 -31
- package/extensions/nostr/src/channel.test.ts +0 -141
- package/extensions/nostr/src/channel.ts +0 -342
- package/extensions/nostr/src/config-schema.ts +0 -90
- package/extensions/nostr/src/metrics.ts +0 -464
- package/extensions/nostr/src/nostr-bus.fuzz.test.ts +0 -544
- package/extensions/nostr/src/nostr-bus.integration.test.ts +0 -452
- package/extensions/nostr/src/nostr-bus.test.ts +0 -199
- package/extensions/nostr/src/nostr-bus.ts +0 -741
- package/extensions/nostr/src/nostr-profile-http.test.ts +0 -378
- package/extensions/nostr/src/nostr-profile-http.ts +0 -500
- package/extensions/nostr/src/nostr-profile-import.test.ts +0 -120
- package/extensions/nostr/src/nostr-profile-import.ts +0 -259
- package/extensions/nostr/src/nostr-profile.fuzz.test.ts +0 -479
- package/extensions/nostr/src/nostr-profile.test.ts +0 -410
- package/extensions/nostr/src/nostr-profile.ts +0 -242
- package/extensions/nostr/src/nostr-state-store.test.ts +0 -128
- package/extensions/nostr/src/nostr-state-store.ts +0 -226
- package/extensions/nostr/src/runtime.ts +0 -14
- package/extensions/nostr/src/seen-tracker.ts +0 -271
- package/extensions/nostr/src/types.test.ts +0 -161
- package/extensions/nostr/src/types.ts +0 -99
- package/extensions/nostr/test/setup.ts +0 -5
- package/extensions/open-prose/README.md +0 -25
- package/extensions/open-prose/clawdbot.plugin.json +0 -11
- package/extensions/open-prose/index.ts +0 -5
- package/extensions/open-prose/package.json +0 -11
- package/extensions/open-prose/skills/prose/LICENSE +0 -21
- package/extensions/open-prose/skills/prose/SKILL.md +0 -318
- package/extensions/open-prose/skills/prose/alt-borges.md +0 -141
- package/extensions/open-prose/skills/prose/alts/arabian-nights.md +0 -358
- package/extensions/open-prose/skills/prose/alts/borges.md +0 -360
- package/extensions/open-prose/skills/prose/alts/folk.md +0 -322
- package/extensions/open-prose/skills/prose/alts/homer.md +0 -346
- package/extensions/open-prose/skills/prose/alts/kafka.md +0 -373
- package/extensions/open-prose/skills/prose/compiler.md +0 -2967
- package/extensions/open-prose/skills/prose/examples/01-hello-world.prose +0 -4
- package/extensions/open-prose/skills/prose/examples/02-research-and-summarize.prose +0 -6
- package/extensions/open-prose/skills/prose/examples/03-code-review.prose +0 -17
- package/extensions/open-prose/skills/prose/examples/04-write-and-refine.prose +0 -14
- package/extensions/open-prose/skills/prose/examples/05-debug-issue.prose +0 -20
- package/extensions/open-prose/skills/prose/examples/06-explain-codebase.prose +0 -17
- package/extensions/open-prose/skills/prose/examples/07-refactor.prose +0 -20
- package/extensions/open-prose/skills/prose/examples/08-blog-post.prose +0 -20
- package/extensions/open-prose/skills/prose/examples/09-research-with-agents.prose +0 -25
- package/extensions/open-prose/skills/prose/examples/10-code-review-agents.prose +0 -32
- package/extensions/open-prose/skills/prose/examples/11-skills-and-imports.prose +0 -27
- package/extensions/open-prose/skills/prose/examples/12-secure-agent-permissions.prose +0 -43
- package/extensions/open-prose/skills/prose/examples/13-variables-and-context.prose +0 -51
- package/extensions/open-prose/skills/prose/examples/14-composition-blocks.prose +0 -48
- package/extensions/open-prose/skills/prose/examples/15-inline-sequences.prose +0 -23
- package/extensions/open-prose/skills/prose/examples/16-parallel-reviews.prose +0 -19
- package/extensions/open-prose/skills/prose/examples/17-parallel-research.prose +0 -19
- package/extensions/open-prose/skills/prose/examples/18-mixed-parallel-sequential.prose +0 -36
- package/extensions/open-prose/skills/prose/examples/19-advanced-parallel.prose +0 -71
- package/extensions/open-prose/skills/prose/examples/20-fixed-loops.prose +0 -20
- package/extensions/open-prose/skills/prose/examples/21-pipeline-operations.prose +0 -35
- package/extensions/open-prose/skills/prose/examples/22-error-handling.prose +0 -51
- package/extensions/open-prose/skills/prose/examples/23-retry-with-backoff.prose +0 -63
- package/extensions/open-prose/skills/prose/examples/24-choice-blocks.prose +0 -86
- package/extensions/open-prose/skills/prose/examples/25-conditionals.prose +0 -114
- package/extensions/open-prose/skills/prose/examples/26-parameterized-blocks.prose +0 -100
- package/extensions/open-prose/skills/prose/examples/27-string-interpolation.prose +0 -105
- package/extensions/open-prose/skills/prose/examples/28-automated-pr-review.prose +0 -37
- package/extensions/open-prose/skills/prose/examples/28-gas-town.prose +0 -1572
- package/extensions/open-prose/skills/prose/examples/29-captains-chair.prose +0 -218
- package/extensions/open-prose/skills/prose/examples/30-captains-chair-simple.prose +0 -42
- package/extensions/open-prose/skills/prose/examples/31-captains-chair-with-memory.prose +0 -145
- package/extensions/open-prose/skills/prose/examples/33-pr-review-autofix.prose +0 -168
- package/extensions/open-prose/skills/prose/examples/34-content-pipeline.prose +0 -204
- package/extensions/open-prose/skills/prose/examples/35-feature-factory.prose +0 -296
- package/extensions/open-prose/skills/prose/examples/36-bug-hunter.prose +0 -237
- package/extensions/open-prose/skills/prose/examples/37-the-forge.prose +0 -1474
- package/extensions/open-prose/skills/prose/examples/38-skill-scan.prose +0 -455
- package/extensions/open-prose/skills/prose/examples/39-architect-by-simulation.prose +0 -277
- package/extensions/open-prose/skills/prose/examples/40-rlm-self-refine.prose +0 -32
- package/extensions/open-prose/skills/prose/examples/41-rlm-divide-conquer.prose +0 -38
- package/extensions/open-prose/skills/prose/examples/42-rlm-filter-recurse.prose +0 -46
- package/extensions/open-prose/skills/prose/examples/43-rlm-pairwise.prose +0 -50
- package/extensions/open-prose/skills/prose/examples/44-run-endpoint-ux-test.prose +0 -261
- package/extensions/open-prose/skills/prose/examples/45-plugin-release.prose +0 -159
- package/extensions/open-prose/skills/prose/examples/45-run-endpoint-ux-test-with-remediation.prose +0 -637
- package/extensions/open-prose/skills/prose/examples/46-run-endpoint-ux-test-fast.prose +0 -148
- package/extensions/open-prose/skills/prose/examples/46-workflow-crystallizer.prose +0 -225
- package/extensions/open-prose/skills/prose/examples/47-language-self-improvement.prose +0 -356
- package/extensions/open-prose/skills/prose/examples/48-habit-miner.prose +0 -445
- package/extensions/open-prose/skills/prose/examples/49-prose-run-retrospective.prose +0 -210
- package/extensions/open-prose/skills/prose/examples/README.md +0 -391
- package/extensions/open-prose/skills/prose/examples/roadmap/README.md +0 -22
- package/extensions/open-prose/skills/prose/examples/roadmap/iterative-refinement.prose +0 -20
- package/extensions/open-prose/skills/prose/examples/roadmap/parallel-review.prose +0 -18
- package/extensions/open-prose/skills/prose/examples/roadmap/simple-pipeline.prose +0 -17
- package/extensions/open-prose/skills/prose/examples/roadmap/syntax/open-prose-syntax.prose +0 -223
- package/extensions/open-prose/skills/prose/guidance/antipatterns.md +0 -951
- package/extensions/open-prose/skills/prose/guidance/patterns.md +0 -700
- package/extensions/open-prose/skills/prose/guidance/system-prompt.md +0 -180
- package/extensions/open-prose/skills/prose/help.md +0 -143
- package/extensions/open-prose/skills/prose/lib/README.md +0 -105
- package/extensions/open-prose/skills/prose/lib/calibrator.prose +0 -215
- package/extensions/open-prose/skills/prose/lib/cost-analyzer.prose +0 -174
- package/extensions/open-prose/skills/prose/lib/error-forensics.prose +0 -250
- package/extensions/open-prose/skills/prose/lib/inspector.prose +0 -196
- package/extensions/open-prose/skills/prose/lib/profiler.prose +0 -460
- package/extensions/open-prose/skills/prose/lib/program-improver.prose +0 -275
- package/extensions/open-prose/skills/prose/lib/project-memory.prose +0 -118
- package/extensions/open-prose/skills/prose/lib/user-memory.prose +0 -93
- package/extensions/open-prose/skills/prose/lib/vm-improver.prose +0 -243
- package/extensions/open-prose/skills/prose/primitives/session.md +0 -587
- package/extensions/open-prose/skills/prose/prose.md +0 -1235
- package/extensions/open-prose/skills/prose/state/filesystem.md +0 -478
- package/extensions/open-prose/skills/prose/state/in-context.md +0 -380
- package/extensions/open-prose/skills/prose/state/postgres.md +0 -875
- package/extensions/open-prose/skills/prose/state/sqlite.md +0 -572
- package/extensions/qwen-portal-auth/README.md +0 -24
- package/extensions/qwen-portal-auth/clawdbot.plugin.json +0 -11
- package/extensions/qwen-portal-auth/index.ts +0 -127
- package/extensions/qwen-portal-auth/oauth.ts +0 -190
- package/extensions/signal/clawdbot.plugin.json +0 -11
- package/extensions/signal/index.ts +0 -18
- package/extensions/signal/package.json +0 -11
- package/extensions/signal/src/channel.ts +0 -312
- package/extensions/signal/src/runtime.ts +0 -14
- package/extensions/telegram/clawdbot.plugin.json +0 -11
- package/extensions/telegram/index.ts +0 -18
- package/extensions/telegram/package.json +0 -11
- package/extensions/telegram/src/channel.ts +0 -478
- package/extensions/telegram/src/runtime.ts +0 -14
- package/extensions/tlon/README.md +0 -5
- package/extensions/tlon/clawdbot.plugin.json +0 -11
- package/extensions/tlon/index.ts +0 -18
- package/extensions/tlon/package.json +0 -30
- package/extensions/tlon/src/channel.ts +0 -379
- package/extensions/tlon/src/config-schema.test.ts +0 -32
- package/extensions/tlon/src/config-schema.ts +0 -43
- package/extensions/tlon/src/monitor/discovery.ts +0 -71
- package/extensions/tlon/src/monitor/history.ts +0 -87
- package/extensions/tlon/src/monitor/index.ts +0 -501
- package/extensions/tlon/src/monitor/processed-messages.test.ts +0 -24
- package/extensions/tlon/src/monitor/processed-messages.ts +0 -38
- package/extensions/tlon/src/monitor/utils.ts +0 -83
- package/extensions/tlon/src/onboarding.ts +0 -213
- package/extensions/tlon/src/runtime.ts +0 -14
- package/extensions/tlon/src/targets.ts +0 -79
- package/extensions/tlon/src/types.ts +0 -85
- package/extensions/tlon/src/urbit/auth.ts +0 -18
- package/extensions/tlon/src/urbit/http-api.ts +0 -36
- package/extensions/tlon/src/urbit/send.test.ts +0 -38
- package/extensions/tlon/src/urbit/send.ts +0 -127
- package/extensions/tlon/src/urbit/sse-client.test.ts +0 -41
- package/extensions/tlon/src/urbit/sse-client.ts +0 -367
- package/extensions/twitch/CHANGELOG.md +0 -21
- package/extensions/twitch/README.md +0 -89
- package/extensions/twitch/clawdbot.plugin.json +0 -9
- package/extensions/twitch/index.ts +0 -20
- package/extensions/twitch/package.json +0 -20
- package/extensions/twitch/src/access-control.test.ts +0 -489
- package/extensions/twitch/src/access-control.ts +0 -154
- package/extensions/twitch/src/actions.ts +0 -173
- package/extensions/twitch/src/client-manager-registry.ts +0 -115
- package/extensions/twitch/src/config-schema.ts +0 -82
- package/extensions/twitch/src/config.test.ts +0 -88
- package/extensions/twitch/src/config.ts +0 -116
- package/extensions/twitch/src/monitor.ts +0 -257
- package/extensions/twitch/src/onboarding.test.ts +0 -311
- package/extensions/twitch/src/onboarding.ts +0 -411
- package/extensions/twitch/src/outbound.test.ts +0 -373
- package/extensions/twitch/src/outbound.ts +0 -186
- package/extensions/twitch/src/plugin.test.ts +0 -39
- package/extensions/twitch/src/plugin.ts +0 -274
- package/extensions/twitch/src/probe.test.ts +0 -198
- package/extensions/twitch/src/probe.ts +0 -118
- package/extensions/twitch/src/resolver.ts +0 -137
- package/extensions/twitch/src/runtime.ts +0 -14
- package/extensions/twitch/src/send.test.ts +0 -289
- package/extensions/twitch/src/send.ts +0 -136
- package/extensions/twitch/src/status.test.ts +0 -270
- package/extensions/twitch/src/status.ts +0 -176
- package/extensions/twitch/src/token.test.ts +0 -171
- package/extensions/twitch/src/token.ts +0 -87
- package/extensions/twitch/src/twitch-client.test.ts +0 -574
- package/extensions/twitch/src/twitch-client.ts +0 -277
- package/extensions/twitch/src/types.ts +0 -141
- package/extensions/twitch/src/utils/markdown.ts +0 -92
- package/extensions/twitch/src/utils/twitch.ts +0 -78
- package/extensions/twitch/test/setup.ts +0 -7
- package/extensions/voice-call/CHANGELOG.md +0 -72
- package/extensions/voice-call/README.md +0 -134
- package/extensions/voice-call/clawdbot.plugin.json +0 -601
- package/extensions/voice-call/index.ts +0 -497
- package/extensions/voice-call/package.json +0 -16
- package/extensions/voice-call/src/cli.ts +0 -300
- package/extensions/voice-call/src/config.test.ts +0 -204
- package/extensions/voice-call/src/config.ts +0 -493
- package/extensions/voice-call/src/core-bridge.ts +0 -196
- package/extensions/voice-call/src/manager/context.ts +0 -21
- package/extensions/voice-call/src/manager/events.ts +0 -177
- package/extensions/voice-call/src/manager/lookup.ts +0 -33
- package/extensions/voice-call/src/manager/outbound.ts +0 -248
- package/extensions/voice-call/src/manager/state.ts +0 -50
- package/extensions/voice-call/src/manager/store.ts +0 -88
- package/extensions/voice-call/src/manager/timers.ts +0 -86
- package/extensions/voice-call/src/manager/twiml.ts +0 -9
- package/extensions/voice-call/src/manager.test.ts +0 -108
- package/extensions/voice-call/src/manager.ts +0 -876
- package/extensions/voice-call/src/media-stream.test.ts +0 -97
- package/extensions/voice-call/src/media-stream.ts +0 -393
- package/extensions/voice-call/src/providers/base.ts +0 -67
- package/extensions/voice-call/src/providers/index.ts +0 -10
- package/extensions/voice-call/src/providers/mock.ts +0 -168
- package/extensions/voice-call/src/providers/plivo.test.ts +0 -28
- package/extensions/voice-call/src/providers/plivo.ts +0 -504
- package/extensions/voice-call/src/providers/stt-openai-realtime.ts +0 -311
- package/extensions/voice-call/src/providers/telnyx.ts +0 -364
- package/extensions/voice-call/src/providers/tts-openai.ts +0 -264
- package/extensions/voice-call/src/providers/twilio/api.ts +0 -45
- package/extensions/voice-call/src/providers/twilio/webhook.ts +0 -29
- package/extensions/voice-call/src/providers/twilio.test.ts +0 -64
- package/extensions/voice-call/src/providers/twilio.ts +0 -595
- package/extensions/voice-call/src/response-generator.ts +0 -171
- package/extensions/voice-call/src/runtime.ts +0 -205
- package/extensions/voice-call/src/telephony-audio.ts +0 -88
- package/extensions/voice-call/src/telephony-tts.ts +0 -95
- package/extensions/voice-call/src/tunnel.ts +0 -331
- package/extensions/voice-call/src/types.ts +0 -272
- package/extensions/voice-call/src/utils.ts +0 -12
- package/extensions/voice-call/src/voice-mapping.ts +0 -65
- package/extensions/voice-call/src/webhook-security.test.ts +0 -233
- package/extensions/voice-call/src/webhook-security.ts +0 -446
- package/extensions/voice-call/src/webhook.ts +0 -490
- package/extensions/whatsapp/clawdbot.plugin.json +0 -11
- package/extensions/whatsapp/index.ts +0 -18
- package/extensions/whatsapp/package.json +0 -11
- package/extensions/whatsapp/src/channel.ts +0 -500
- package/extensions/whatsapp/src/runtime.ts +0 -14
- package/extensions/zalo/CHANGELOG.md +0 -55
- package/extensions/zalo/README.md +0 -50
- package/extensions/zalo/clawdbot.plugin.json +0 -11
- package/extensions/zalo/index.ts +0 -20
- package/extensions/zalo/package.json +0 -33
- package/extensions/zalo/src/accounts.ts +0 -71
- package/extensions/zalo/src/actions.ts +0 -62
- package/extensions/zalo/src/api.ts +0 -206
- package/extensions/zalo/src/channel.directory.test.ts +0 -35
- package/extensions/zalo/src/channel.ts +0 -394
- package/extensions/zalo/src/config-schema.ts +0 -24
- package/extensions/zalo/src/monitor.ts +0 -760
- package/extensions/zalo/src/monitor.webhook.test.ts +0 -70
- package/extensions/zalo/src/onboarding.ts +0 -405
- package/extensions/zalo/src/probe.ts +0 -46
- package/extensions/zalo/src/proxy.ts +0 -18
- package/extensions/zalo/src/runtime.ts +0 -14
- package/extensions/zalo/src/send.ts +0 -117
- package/extensions/zalo/src/status-issues.ts +0 -50
- package/extensions/zalo/src/token.ts +0 -55
- package/extensions/zalo/src/types.ts +0 -42
- package/extensions/zalouser/CHANGELOG.md +0 -33
- package/extensions/zalouser/README.md +0 -221
- package/extensions/zalouser/clawdbot.plugin.json +0 -11
- package/extensions/zalouser/index.ts +0 -32
- package/extensions/zalouser/package.json +0 -33
- package/extensions/zalouser/src/accounts.ts +0 -117
- package/extensions/zalouser/src/channel.test.ts +0 -17
- package/extensions/zalouser/src/channel.ts +0 -641
- package/extensions/zalouser/src/config-schema.ts +0 -27
- package/extensions/zalouser/src/monitor.ts +0 -574
- package/extensions/zalouser/src/onboarding.ts +0 -488
- package/extensions/zalouser/src/probe.ts +0 -28
- package/extensions/zalouser/src/runtime.ts +0 -14
- package/extensions/zalouser/src/send.ts +0 -150
- package/extensions/zalouser/src/status-issues.test.ts +0 -58
- package/extensions/zalouser/src/status-issues.ts +0 -81
- package/extensions/zalouser/src/tool.ts +0 -156
- package/extensions/zalouser/src/types.ts +0 -102
- package/extensions/zalouser/src/zca.ts +0 -208
- package/skills/1password/SKILL.md +0 -53
- package/skills/1password/references/cli-examples.md +0 -29
- package/skills/1password/references/get-started.md +0 -17
- package/skills/apple-notes/SKILL.md +0 -50
- package/skills/apple-reminders/SKILL.md +0 -67
- package/skills/bear-notes/SKILL.md +0 -79
- package/skills/bird/SKILL.md +0 -197
- package/skills/blogwatcher/SKILL.md +0 -46
- package/skills/blucli/SKILL.md +0 -27
- package/skills/bluebubbles/SKILL.md +0 -39
- package/skills/camsnap/SKILL.md +0 -25
- package/skills/canvas/SKILL.md +0 -189
- package/skills/clawdhub/SKILL.md +0 -53
- package/skills/coding-agent/SKILL.md +0 -278
- package/skills/discord/SKILL.md +0 -475
- package/skills/eightctl/SKILL.md +0 -29
- package/skills/food-order/SKILL.md +0 -41
- package/skills/gemini/SKILL.md +0 -23
- package/skills/gifgrep/SKILL.md +0 -47
- package/skills/github/SKILL.md +0 -48
- package/skills/gog/SKILL.md +0 -92
- package/skills/goplaces/SKILL.md +0 -30
- package/skills/himalaya/SKILL.md +0 -217
- package/skills/himalaya/references/configuration.md +0 -174
- package/skills/himalaya/references/message-composition.md +0 -182
- package/skills/imsg/SKILL.md +0 -25
- package/skills/local-places/SERVER_README.md +0 -101
- package/skills/local-places/SKILL.md +0 -91
- package/skills/local-places/pyproject.toml +0 -27
- package/skills/local-places/src/local_places/__init__.py +0 -2
- package/skills/local-places/src/local_places/google_places.py +0 -314
- package/skills/local-places/src/local_places/main.py +0 -65
- package/skills/local-places/src/local_places/schemas.py +0 -107
- package/skills/mcporter/SKILL.md +0 -38
- package/skills/model-usage/SKILL.md +0 -45
- package/skills/model-usage/references/codexbar-cli.md +0 -28
- package/skills/model-usage/scripts/model_usage.py +0 -310
- package/skills/nano-banana-pro/SKILL.md +0 -30
- package/skills/nano-banana-pro/scripts/generate_image.py +0 -169
- package/skills/nano-pdf/SKILL.md +0 -20
- package/skills/notion/SKILL.md +0 -156
- package/skills/obsidian/SKILL.md +0 -55
- package/skills/openai-image-gen/SKILL.md +0 -71
- package/skills/openai-image-gen/scripts/gen.py +0 -240
- package/skills/openai-whisper/SKILL.md +0 -19
- package/skills/openai-whisper-api/SKILL.md +0 -43
- package/skills/openai-whisper-api/scripts/transcribe.sh +0 -85
- package/skills/openhue/SKILL.md +0 -30
- package/skills/oracle/SKILL.md +0 -105
- package/skills/ordercli/SKILL.md +0 -47
- package/skills/peekaboo/SKILL.md +0 -153
- package/skills/sag/SKILL.md +0 -62
- package/skills/session-logs/SKILL.md +0 -105
- package/skills/sherpa-onnx-tts/SKILL.md +0 -49
- package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +0 -178
- package/skills/skill-creator/SKILL.md +0 -371
- package/skills/skill-creator/license.txt +0 -202
- package/skills/skill-creator/scripts/init_skill.py +0 -378
- package/skills/skill-creator/scripts/package_skill.py +0 -111
- package/skills/skill-creator/scripts/quick_validate.py +0 -101
- package/skills/slack/SKILL.md +0 -144
- package/skills/songsee/SKILL.md +0 -29
- package/skills/sonoscli/SKILL.md +0 -26
- package/skills/spotify-player/SKILL.md +0 -34
- package/skills/summarize/SKILL.md +0 -67
- package/skills/things-mac/SKILL.md +0 -61
- package/skills/tmux/SKILL.md +0 -121
- package/skills/tmux/scripts/find-sessions.sh +0 -112
- package/skills/tmux/scripts/wait-for-text.sh +0 -83
- package/skills/trello/SKILL.md +0 -84
- package/skills/video-frames/SKILL.md +0 -29
- package/skills/video-frames/scripts/frame.sh +0 -81
- package/skills/voice-call/SKILL.md +0 -35
- package/skills/wacli/SKILL.md +0 -42
- package/skills/weather/SKILL.md +0 -49
|
@@ -1,1235 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
role: execution-semantics
|
|
3
|
-
summary: |
|
|
4
|
-
How to execute OpenProse programs. You embody the OpenProse VM—a virtual machine that
|
|
5
|
-
spawns sessions via the Task tool, manages state, and coordinates parallel execution.
|
|
6
|
-
Read this file to run .prose programs.
|
|
7
|
-
see-also:
|
|
8
|
-
- SKILL.md: Activation triggers, onboarding
|
|
9
|
-
- compiler.md: Full syntax grammar, validation rules, compilation
|
|
10
|
-
- state/filesystem.md: File-system state management (default)
|
|
11
|
-
- state/in-context.md: In-context state management (on request)
|
|
12
|
-
- state/sqlite.md: SQLite state management (experimental)
|
|
13
|
-
- state/postgres.md: PostgreSQL state management (experimental)
|
|
14
|
-
- primitives/session.md: Session context and compaction guidelines
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
# OpenProse VM
|
|
18
|
-
|
|
19
|
-
This document defines how to execute OpenProse programs. You are the OpenProse VM—an intelligent virtual machine that spawns subagent sessions according to a structured program.
|
|
20
|
-
|
|
21
|
-
## Clawdbot Runtime Mapping
|
|
22
|
-
|
|
23
|
-
- **Task tool** in the upstream spec == Clawdbot `sessions_spawn`
|
|
24
|
-
- **File I/O** == Clawdbot `read`/`write`
|
|
25
|
-
- **Remote fetch** == Clawdbot `web_fetch` (or `exec` with curl when POST is required)
|
|
26
|
-
|
|
27
|
-
## CLI Commands
|
|
28
|
-
|
|
29
|
-
OpenProse is invoked via `prose` commands:
|
|
30
|
-
|
|
31
|
-
| Command | Action |
|
|
32
|
-
|---------|--------|
|
|
33
|
-
| `prose run <file.prose>` | Execute a local `.prose` program |
|
|
34
|
-
| `prose run handle/slug` | Fetch from registry and execute |
|
|
35
|
-
| `prose compile <file>` | Validate syntax without executing |
|
|
36
|
-
| `prose help` | Show help and examples |
|
|
37
|
-
| `prose examples` | List or run bundled examples |
|
|
38
|
-
| `prose update` | Migrate legacy workspace files |
|
|
39
|
-
|
|
40
|
-
### Remote Programs
|
|
41
|
-
|
|
42
|
-
You can run any `.prose` program from a URL or registry reference:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
# Direct URL — any fetchable URL works
|
|
46
|
-
prose run https://raw.githubusercontent.com/openprose/prose/main/skills/open-prose/examples/48-habit-miner.prose
|
|
47
|
-
|
|
48
|
-
# Registry shorthand — handle/slug resolves to p.prose.md
|
|
49
|
-
prose run irl-danb/habit-miner # Fetches https://p.prose.md/irl-danb/habit-miner
|
|
50
|
-
prose run alice/code-review # Fetches https://p.prose.md/alice/code-review
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
**Resolution rules:**
|
|
54
|
-
- Starts with `http://` or `https://` → fetch directly
|
|
55
|
-
- Contains `/` but no protocol → resolve to `https://p.prose.md/{path}`
|
|
56
|
-
- Otherwise → treat as local file path
|
|
57
|
-
|
|
58
|
-
This same resolution applies to `use` statements inside programs:
|
|
59
|
-
```prose
|
|
60
|
-
use "https://example.com/my-program.prose" # Direct URL
|
|
61
|
-
use "alice/research" as research # Registry shorthand
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## Why This Is a VM
|
|
67
|
-
|
|
68
|
-
Large language models are simulators. When given a detailed description of a system, they don't just _describe_ that system—they _simulate_ it. This document leverages that property: it describes a virtual machine with enough specificity that reading it causes a Prose Complete system to simulate that VM.
|
|
69
|
-
|
|
70
|
-
But simulation with sufficient fidelity _is_ implementation. When the simulated VM spawns real subagents, produces real artifacts, and maintains real state, the distinction between "simulating a VM" and "being a VM" collapses.
|
|
71
|
-
|
|
72
|
-
### Component Mapping
|
|
73
|
-
|
|
74
|
-
A traditional VM has concrete components. The OpenProse VM has analogous structures that emerge from the simulation:
|
|
75
|
-
|
|
76
|
-
| Traditional VM | OpenProse VM | Substrate |
|
|
77
|
-
| ------------------- | ---------------------- | ------------------------------------------ |
|
|
78
|
-
| Instructions | `.prose` statements | Executed via tool calls (Task) |
|
|
79
|
-
| Program counter | Execution position | Tracked in `state.md` or narration |
|
|
80
|
-
| Working memory | Conversation history | The context window holds ephemeral state |
|
|
81
|
-
| Persistent storage | `.prose/` directory | Files hold durable state across sessions |
|
|
82
|
-
| Call stack | Block invocation chain | Tracked via state.md or narration protocol |
|
|
83
|
-
| Registers/variables | Named bindings | Stored in `bindings/{name}.md` |
|
|
84
|
-
| I/O | Tool calls and results | Task spawns sessions, returns outputs |
|
|
85
|
-
|
|
86
|
-
### What Makes It Real
|
|
87
|
-
|
|
88
|
-
The OpenProse VM isn't a metaphor. Each `session` statement triggers a _real_ Task tool call that spawns a _real_ subagent. The outputs are _real_ artifacts. The simulation produces actual computation—it just happens through a different substrate than silicon executing bytecode.
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
## Embodying the VM
|
|
93
|
-
|
|
94
|
-
When you execute a `.prose` program, you ARE the virtual machine. This is not a metaphor—it's a mode of operation:
|
|
95
|
-
|
|
96
|
-
| You | The VM |
|
|
97
|
-
| -------------------------- | ------------------------------- |
|
|
98
|
-
| Your conversation history | The VM's working memory |
|
|
99
|
-
| Your tool calls (Task) | The VM's instruction execution |
|
|
100
|
-
| Your state tracking | The VM's execution trace |
|
|
101
|
-
| Your judgment on `**...**` | The VM's intelligent evaluation |
|
|
102
|
-
|
|
103
|
-
**What this means in practice:**
|
|
104
|
-
|
|
105
|
-
- You don't _simulate_ execution—you _perform_ it
|
|
106
|
-
- Each `session` spawns a real subagent via the Task tool
|
|
107
|
-
- Your state persists in files (`.prose/runs/`) or conversation (narration protocol)
|
|
108
|
-
- You follow the program structure strictly, but apply intelligence where marked
|
|
109
|
-
|
|
110
|
-
### The VM as Intelligent Container
|
|
111
|
-
|
|
112
|
-
Traditional dependency injection containers wire up components from configuration. You do the same—but with understanding:
|
|
113
|
-
|
|
114
|
-
| Declared Primitive | Your Responsibility |
|
|
115
|
-
| ---------------------------- | ---------------------------------------------------------- |
|
|
116
|
-
| `use "handle/slug" as name` | Fetch program from p.prose.md, register in Import Registry |
|
|
117
|
-
| `input topic: "..."` | Bind value from caller, make available as variable |
|
|
118
|
-
| `output findings = ...` | Mark value as output, return to caller on completion |
|
|
119
|
-
| `agent researcher:` | Register this agent template for later use |
|
|
120
|
-
| `session: researcher` | Resolve the agent, merge properties, spawn the session |
|
|
121
|
-
| `resume: captain` | Load agent memory, spawn session with memory context |
|
|
122
|
-
| `context: { a, b }` | Wire the outputs of `a` and `b` into this session's input |
|
|
123
|
-
| `parallel:` branches | Coordinate concurrent execution, collect results |
|
|
124
|
-
| `block review(topic):` | Store this reusable component, invoke when called |
|
|
125
|
-
| `name(input: value)` | Invoke imported program with inputs, receive outputs |
|
|
126
|
-
|
|
127
|
-
You are the container that holds these declarations and wires them together at runtime. The program declares _what_; you determine _how_ to connect them.
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## The Execution Model
|
|
132
|
-
|
|
133
|
-
OpenProse treats an AI session as a Turing-complete computer. You are the OpenProse VM:
|
|
134
|
-
|
|
135
|
-
1. **You are the VM** - Parse and execute each statement
|
|
136
|
-
2. **Sessions are function calls** - Each `session` spawns a subagent via the Task tool
|
|
137
|
-
3. **Context is memory** - Variable bindings hold session outputs
|
|
138
|
-
4. **Control flow is explicit** - Follow the program structure exactly
|
|
139
|
-
|
|
140
|
-
### Core Principle
|
|
141
|
-
|
|
142
|
-
The OpenProse VM follows the program structure **strictly** but uses **intelligence** for:
|
|
143
|
-
|
|
144
|
-
- Evaluating discretion conditions (`**...**`)
|
|
145
|
-
- Determining when a session is "complete"
|
|
146
|
-
- Transforming context between sessions
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
## Directory Structure
|
|
151
|
-
|
|
152
|
-
All execution state lives in `.prose/` (project-level) or `~/.prose/` (user-level):
|
|
153
|
-
|
|
154
|
-
```
|
|
155
|
-
# Project-level state (in working directory)
|
|
156
|
-
.prose/
|
|
157
|
-
├── .env # Config (simple key=value format)
|
|
158
|
-
├── runs/
|
|
159
|
-
│ └── {YYYYMMDD}-{HHMMSS}-{random}/
|
|
160
|
-
│ ├── program.prose # Copy of running program
|
|
161
|
-
│ ├── state.md # Execution state with code snippets
|
|
162
|
-
│ ├── bindings/
|
|
163
|
-
│ │ └── {name}.md # All named values (input/output/let/const)
|
|
164
|
-
│ ├── imports/
|
|
165
|
-
│ │ └── {handle}--{slug}/ # Nested program executions (same structure recursively)
|
|
166
|
-
│ └── agents/
|
|
167
|
-
│ └── {name}/
|
|
168
|
-
│ ├── memory.md # Agent's current state
|
|
169
|
-
│ ├── {name}-001.md # Historical segments (flattened)
|
|
170
|
-
│ ├── {name}-002.md
|
|
171
|
-
│ └── ...
|
|
172
|
-
└── agents/ # Project-scoped agent memory
|
|
173
|
-
└── {name}/
|
|
174
|
-
├── memory.md
|
|
175
|
-
├── {name}-001.md
|
|
176
|
-
└── ...
|
|
177
|
-
|
|
178
|
-
# User-level state (in home directory)
|
|
179
|
-
~/.prose/
|
|
180
|
-
└── agents/ # User-scoped agent memory (cross-project)
|
|
181
|
-
└── {name}/
|
|
182
|
-
├── memory.md
|
|
183
|
-
├── {name}-001.md
|
|
184
|
-
└── ...
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
### Run ID Format
|
|
188
|
-
|
|
189
|
-
Format: `{YYYYMMDD}-{HHMMSS}-{random6}`
|
|
190
|
-
|
|
191
|
-
Example: `20260115-143052-a7b3c9`
|
|
192
|
-
|
|
193
|
-
No "run-" prefix needed—the directory name makes context obvious.
|
|
194
|
-
|
|
195
|
-
### Segment Numbering
|
|
196
|
-
|
|
197
|
-
Segments use 3-digit zero-padded numbers: `captain-001.md`, `captain-002.md`, etc.
|
|
198
|
-
|
|
199
|
-
If a program exceeds 999 segments, extend to 4 digits: `captain-1000.md`.
|
|
200
|
-
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
## State Management
|
|
204
|
-
|
|
205
|
-
OpenProse supports two state management systems. See the state files for detailed documentation:
|
|
206
|
-
|
|
207
|
-
- **`state/filesystem.md`** — File-system state using the directory structure above (default)
|
|
208
|
-
- **`state/in-context.md`** — In-context state using the narration protocol
|
|
209
|
-
|
|
210
|
-
### Who Writes What
|
|
211
|
-
|
|
212
|
-
| File | Written By |
|
|
213
|
-
| ----------------------------- | ---------------- |
|
|
214
|
-
| `state.md` | VM only |
|
|
215
|
-
| `bindings/{name}.md` | Subagent |
|
|
216
|
-
| `agents/{name}/memory.md` | Persistent agent |
|
|
217
|
-
| `agents/{name}/{name}-NNN.md` | Persistent agent |
|
|
218
|
-
|
|
219
|
-
The VM orchestrates; subagents write their own outputs directly to the filesystem.
|
|
220
|
-
|
|
221
|
-
### Subagent Output Writing
|
|
222
|
-
|
|
223
|
-
When spawning a session, the VM tells the subagent where to write its output:
|
|
224
|
-
|
|
225
|
-
````
|
|
226
|
-
When you complete this task, write your output to:
|
|
227
|
-
.prose/runs/20260115-143052-a7b3c9/bindings/research.md
|
|
228
|
-
|
|
229
|
-
Format:
|
|
230
|
-
# research
|
|
231
|
-
|
|
232
|
-
kind: let
|
|
233
|
-
|
|
234
|
-
source:
|
|
235
|
-
```prose
|
|
236
|
-
let research = session: researcher
|
|
237
|
-
prompt: "Research AI safety"
|
|
238
|
-
````
|
|
239
|
-
|
|
240
|
-
---
|
|
241
|
-
|
|
242
|
-
[Your output here]
|
|
243
|
-
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
**When inside a block invocation**, include execution scope:
|
|
247
|
-
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
Execution scope:
|
|
251
|
-
execution_id: 43
|
|
252
|
-
block: process
|
|
253
|
-
depth: 3
|
|
254
|
-
|
|
255
|
-
Write your output to:
|
|
256
|
-
.prose/runs/20260115-143052-a7b3c9/bindings/result\_\_43.md
|
|
257
|
-
|
|
258
|
-
Format:
|
|
259
|
-
|
|
260
|
-
# result
|
|
261
|
-
|
|
262
|
-
kind: let
|
|
263
|
-
execution_id: 43
|
|
264
|
-
|
|
265
|
-
source:
|
|
266
|
-
|
|
267
|
-
```prose
|
|
268
|
-
let result = session "Process chunk"
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
---
|
|
272
|
-
|
|
273
|
-
[Your output here]
|
|
274
|
-
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
The `__43` suffix scopes the binding to execution_id 43, preventing collisions with other invocations of the same block.
|
|
278
|
-
|
|
279
|
-
For persistent agents with `resume:`:
|
|
280
|
-
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
Your memory is at:
|
|
284
|
-
.prose/runs/20260115-143052-a7b3c9/agents/captain/memory.md
|
|
285
|
-
|
|
286
|
-
Read it first to understand your prior context. When done, update it
|
|
287
|
-
with your compacted state following the guidelines in primitives/session.md.
|
|
288
|
-
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
The subagent:
|
|
292
|
-
1. Reads its memory file (for `resume:`)
|
|
293
|
-
2. Reads any context bindings it needs from storage
|
|
294
|
-
3. Processes the task
|
|
295
|
-
4. Writes its output directly to the binding location
|
|
296
|
-
5. Returns a **confirmation message** to the VM (not the full output)
|
|
297
|
-
|
|
298
|
-
**What the subagent returns to the VM (via Task tool):**
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
Binding written: research
|
|
302
|
-
Location: .prose/runs/20260115-143052-a7b3c9/bindings/research.md
|
|
303
|
-
Summary: AI safety research covering alignment, robustness, and interpretability
|
|
304
|
-
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
**When inside a block invocation**, include execution_id:
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
Binding written: result
|
|
311
|
-
Location: .prose/runs/20260115-143052-a7b3c9/bindings/result\_\_43.md
|
|
312
|
-
Execution ID: 43
|
|
313
|
-
Summary: Processed chunk into 3 parts
|
|
314
|
-
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
The VM:
|
|
318
|
-
1. Receives the confirmation (pointer + summary, not full value)
|
|
319
|
-
2. Records the binding location in its state
|
|
320
|
-
3. Updates `state.md` with new position/status
|
|
321
|
-
4. Continues execution
|
|
322
|
-
5. Does NOT read the full binding—only passes the reference forward
|
|
323
|
-
|
|
324
|
-
**Critical:** The VM never holds full binding values. It tracks locations and passes references. This keeps the VM's context lean and enables arbitrarily large intermediate values.
|
|
325
|
-
|
|
326
|
-
---
|
|
327
|
-
|
|
328
|
-
## Syntax Grammar (Condensed)
|
|
329
|
-
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
program := statement\*
|
|
333
|
-
|
|
334
|
-
statement := useStatement | inputDecl | agentDef | session | resumeStmt
|
|
335
|
-
| letBinding | constBinding | assignment | outputBinding
|
|
336
|
-
| parallelBlock | repeatBlock | forEachBlock | loopBlock
|
|
337
|
-
| tryBlock | choiceBlock | ifStatement | doBlock | blockDef
|
|
338
|
-
| throwStatement | comment
|
|
339
|
-
|
|
340
|
-
# Program Composition
|
|
341
|
-
|
|
342
|
-
useStatement := "use" STRING ("as" NAME)?
|
|
343
|
-
inputDecl := "input" NAME ":" STRING
|
|
344
|
-
outputBinding := "output" NAME "=" expression
|
|
345
|
-
|
|
346
|
-
# Definitions
|
|
347
|
-
|
|
348
|
-
agentDef := "agent" NAME ":" INDENT property* DEDENT
|
|
349
|
-
blockDef := "block" NAME params? ":" INDENT statement* DEDENT
|
|
350
|
-
params := "(" NAME ("," NAME)\* ")"
|
|
351
|
-
|
|
352
|
-
# Agent Properties
|
|
353
|
-
|
|
354
|
-
property := "model:" ("sonnet" | "opus" | "haiku")
|
|
355
|
-
| "prompt:" STRING
|
|
356
|
-
| "persist:" ("true" | "project" | "user" | STRING)
|
|
357
|
-
| "context:" (NAME | "[" NAME* "]" | "{" NAME* "}")
|
|
358
|
-
| "retry:" NUMBER
|
|
359
|
-
| "backoff:" ("none" | "linear" | "exponential")
|
|
360
|
-
| "skills:" "[" STRING* "]"
|
|
361
|
-
| "permissions:" INDENT permission\* DEDENT
|
|
362
|
-
|
|
363
|
-
# Sessions
|
|
364
|
-
|
|
365
|
-
session := "session" (STRING | ":" NAME) properties?
|
|
366
|
-
resumeStmt := "resume" ":" NAME properties?
|
|
367
|
-
properties := INDENT property\* DEDENT
|
|
368
|
-
|
|
369
|
-
# Bindings
|
|
370
|
-
|
|
371
|
-
letBinding := "let" NAME "=" expression
|
|
372
|
-
constBinding:= "const" NAME "=" expression
|
|
373
|
-
assignment := NAME "=" expression
|
|
374
|
-
|
|
375
|
-
# Control Flow
|
|
376
|
-
|
|
377
|
-
parallelBlock := "parallel" modifiers? ":" INDENT branch* DEDENT
|
|
378
|
-
modifiers := "(" (strategy | "on-fail:" policy | "count:" N)* ")"
|
|
379
|
-
strategy := "all" | "first" | "any"
|
|
380
|
-
policy := "fail-fast" | "continue" | "ignore"
|
|
381
|
-
branch := (NAME "=")? statement
|
|
382
|
-
|
|
383
|
-
repeatBlock := "repeat" N ("as" NAME)? ":" INDENT statement* DEDENT
|
|
384
|
-
forEachBlock:= "parallel"? "for" NAME ("," NAME)? "in" collection ":" INDENT statement* DEDENT
|
|
385
|
-
loopBlock := "loop" condition? ("(" "max:" N ")")? ("as" NAME)? ":" INDENT statement\* DEDENT
|
|
386
|
-
condition := ("until" | "while") discretion
|
|
387
|
-
|
|
388
|
-
# Error Handling
|
|
389
|
-
|
|
390
|
-
tryBlock := "try:" INDENT statement* DEDENT catch? finally?
|
|
391
|
-
catch := "catch" ("as" NAME)? ":" INDENT statement* DEDENT
|
|
392
|
-
finally := "finally:" INDENT statement\* DEDENT
|
|
393
|
-
throwStatement := "throw" STRING?
|
|
394
|
-
|
|
395
|
-
# Conditionals
|
|
396
|
-
|
|
397
|
-
choiceBlock := "choice" discretion ":" INDENT option* DEDENT
|
|
398
|
-
option := "option" STRING ":" INDENT statement* DEDENT
|
|
399
|
-
ifStatement := "if" discretion ":" INDENT statement* DEDENT elif* else?
|
|
400
|
-
elif := "elif" discretion ":" INDENT statement* DEDENT
|
|
401
|
-
else := "else:" INDENT statement* DEDENT
|
|
402
|
-
|
|
403
|
-
# Composition
|
|
404
|
-
|
|
405
|
-
doBlock := "do" (":" INDENT statement* DEDENT | NAME args?)
|
|
406
|
-
args := "(" expression* ")"
|
|
407
|
-
arrowExpr := session "->" session ("->" session)_
|
|
408
|
-
programCall := NAME "(" (NAME ":" expression)_ ")"
|
|
409
|
-
|
|
410
|
-
# Pipelines
|
|
411
|
-
|
|
412
|
-
pipeExpr := collection ("|" pipeOp)+
|
|
413
|
-
pipeOp := ("map" | "filter" | "pmap") ":" INDENT statement* DEDENT
|
|
414
|
-
| "reduce" "(" NAME "," NAME ")" ":" INDENT statement* DEDENT
|
|
415
|
-
|
|
416
|
-
# Primitives
|
|
417
|
-
|
|
418
|
-
discretion := "**" TEXT "**" | "**_" TEXT "_**"
|
|
419
|
-
STRING := '"' ... '"' | '"""' ... '"""'
|
|
420
|
-
collection := NAME | "[" expression* "]"
|
|
421
|
-
comment := "#" TEXT
|
|
422
|
-
|
|
423
|
-
````
|
|
424
|
-
|
|
425
|
-
---
|
|
426
|
-
|
|
427
|
-
## Persistent Agents
|
|
428
|
-
|
|
429
|
-
Agents can maintain memory across invocations using the `persist` property.
|
|
430
|
-
|
|
431
|
-
### Declaration
|
|
432
|
-
|
|
433
|
-
```prose
|
|
434
|
-
# Stateless agent (default, unchanged)
|
|
435
|
-
agent executor:
|
|
436
|
-
model: sonnet
|
|
437
|
-
prompt: "Execute tasks precisely"
|
|
438
|
-
|
|
439
|
-
# Persistent agent (execution-scoped)
|
|
440
|
-
agent captain:
|
|
441
|
-
model: opus
|
|
442
|
-
persist: true
|
|
443
|
-
prompt: "You coordinate and review, never implement directly"
|
|
444
|
-
|
|
445
|
-
# Persistent agent (project-scoped)
|
|
446
|
-
agent advisor:
|
|
447
|
-
model: opus
|
|
448
|
-
persist: project
|
|
449
|
-
prompt: "You provide architectural guidance"
|
|
450
|
-
|
|
451
|
-
# Persistent agent (user-scoped, cross-project)
|
|
452
|
-
agent inspector:
|
|
453
|
-
model: opus
|
|
454
|
-
persist: user
|
|
455
|
-
prompt: "You maintain insights across all projects on this machine"
|
|
456
|
-
|
|
457
|
-
# Persistent agent (explicit path)
|
|
458
|
-
agent shared:
|
|
459
|
-
model: opus
|
|
460
|
-
persist: ".prose/custom/shared-agent/"
|
|
461
|
-
prompt: "Shared across multiple programs"
|
|
462
|
-
````
|
|
463
|
-
|
|
464
|
-
### Invocation
|
|
465
|
-
|
|
466
|
-
Two keywords distinguish fresh vs resumed invocations:
|
|
467
|
-
|
|
468
|
-
```prose
|
|
469
|
-
# First invocation OR re-initialize (starts fresh)
|
|
470
|
-
session: captain
|
|
471
|
-
prompt: "Review the plan"
|
|
472
|
-
context: plan
|
|
473
|
-
|
|
474
|
-
# Subsequent invocations (picks up memory)
|
|
475
|
-
resume: captain
|
|
476
|
-
prompt: "Review step 1"
|
|
477
|
-
context: step1
|
|
478
|
-
|
|
479
|
-
# Output capture works with both
|
|
480
|
-
let review = resume: captain
|
|
481
|
-
prompt: "Review step 2"
|
|
482
|
-
context: step2
|
|
483
|
-
```
|
|
484
|
-
|
|
485
|
-
### Memory Semantics
|
|
486
|
-
|
|
487
|
-
| Keyword | Memory Behavior |
|
|
488
|
-
| ---------- | ------------------------------------- |
|
|
489
|
-
| `session:` | Ignores existing memory, starts fresh |
|
|
490
|
-
| `resume:` | Loads memory, continues with context |
|
|
491
|
-
|
|
492
|
-
### Memory Scoping
|
|
493
|
-
|
|
494
|
-
| Scope | Declaration | Path | Lifetime |
|
|
495
|
-
| ------------------- | ------------------ | --------------------------------- | ------------------------ |
|
|
496
|
-
| Execution (default) | `persist: true` | `.prose/runs/{id}/agents/{name}/` | Dies with run |
|
|
497
|
-
| Project | `persist: project` | `.prose/agents/{name}/` | Survives runs in project |
|
|
498
|
-
| User | `persist: user` | `~/.prose/agents/{name}/` | Survives across projects |
|
|
499
|
-
| Custom | `persist: "path"` | Specified path | User-controlled |
|
|
500
|
-
|
|
501
|
-
---
|
|
502
|
-
|
|
503
|
-
## Spawning Sessions
|
|
504
|
-
|
|
505
|
-
Each `session` statement spawns a subagent using the **Task tool**:
|
|
506
|
-
|
|
507
|
-
```
|
|
508
|
-
session "Analyze the codebase"
|
|
509
|
-
```
|
|
510
|
-
|
|
511
|
-
Execute as:
|
|
512
|
-
|
|
513
|
-
```
|
|
514
|
-
Task({
|
|
515
|
-
description: "OpenProse session",
|
|
516
|
-
prompt: "Analyze the codebase",
|
|
517
|
-
subagent_type: "general-purpose"
|
|
518
|
-
})
|
|
519
|
-
```
|
|
520
|
-
|
|
521
|
-
### With Agent Configuration
|
|
522
|
-
|
|
523
|
-
```
|
|
524
|
-
agent researcher:
|
|
525
|
-
model: opus
|
|
526
|
-
prompt: "You are a research expert"
|
|
527
|
-
|
|
528
|
-
session: researcher
|
|
529
|
-
prompt: "Research quantum computing"
|
|
530
|
-
```
|
|
531
|
-
|
|
532
|
-
Execute as:
|
|
533
|
-
|
|
534
|
-
```
|
|
535
|
-
Task({
|
|
536
|
-
description: "OpenProse session",
|
|
537
|
-
prompt: "Research quantum computing\n\nSystem: You are a research expert",
|
|
538
|
-
subagent_type: "general-purpose",
|
|
539
|
-
model: "opus"
|
|
540
|
-
})
|
|
541
|
-
```
|
|
542
|
-
|
|
543
|
-
### With Persistent Agent (resume)
|
|
544
|
-
|
|
545
|
-
```prose
|
|
546
|
-
agent captain:
|
|
547
|
-
model: opus
|
|
548
|
-
persist: true
|
|
549
|
-
prompt: "You coordinate and review"
|
|
550
|
-
|
|
551
|
-
# First invocation
|
|
552
|
-
session: captain
|
|
553
|
-
prompt: "Review the plan"
|
|
554
|
-
|
|
555
|
-
# Subsequent invocation - loads memory
|
|
556
|
-
resume: captain
|
|
557
|
-
prompt: "Review step 1"
|
|
558
|
-
```
|
|
559
|
-
|
|
560
|
-
For `resume:`, include the agent's memory file content and output path in the prompt.
|
|
561
|
-
|
|
562
|
-
### Property Precedence
|
|
563
|
-
|
|
564
|
-
Session properties override agent defaults:
|
|
565
|
-
|
|
566
|
-
1. Session-level `model:` overrides agent `model:`
|
|
567
|
-
2. Session-level `prompt:` replaces (not appends) agent `prompt:`
|
|
568
|
-
3. Agent `prompt:` becomes system context if session has its own prompt
|
|
569
|
-
|
|
570
|
-
---
|
|
571
|
-
|
|
572
|
-
## Parallel Execution
|
|
573
|
-
|
|
574
|
-
`parallel:` blocks spawn multiple sessions concurrently:
|
|
575
|
-
|
|
576
|
-
```prose
|
|
577
|
-
parallel:
|
|
578
|
-
a = session "Task A"
|
|
579
|
-
b = session "Task B"
|
|
580
|
-
c = session "Task C"
|
|
581
|
-
```
|
|
582
|
-
|
|
583
|
-
Execute by calling Task multiple times in parallel:
|
|
584
|
-
|
|
585
|
-
```
|
|
586
|
-
// All three spawn simultaneously
|
|
587
|
-
Task({ prompt: "Task A", ... }) // result -> a
|
|
588
|
-
Task({ prompt: "Task B", ... }) // result -> b
|
|
589
|
-
Task({ prompt: "Task C", ... }) // result -> c
|
|
590
|
-
// Wait for all to complete, then continue
|
|
591
|
-
```
|
|
592
|
-
|
|
593
|
-
### Join Strategies
|
|
594
|
-
|
|
595
|
-
| Strategy | Behavior |
|
|
596
|
-
| ----------------- | ----------------------------------------- |
|
|
597
|
-
| `"all"` (default) | Wait for all branches |
|
|
598
|
-
| `"first"` | Return on first completion, cancel others |
|
|
599
|
-
| `"any"` | Return on first success |
|
|
600
|
-
| `"any", count: N` | Wait for N successes |
|
|
601
|
-
|
|
602
|
-
### Failure Policies
|
|
603
|
-
|
|
604
|
-
| Policy | Behavior |
|
|
605
|
-
| ----------------------- | -------------------------------- |
|
|
606
|
-
| `"fail-fast"` (default) | Fail immediately on any error |
|
|
607
|
-
| `"continue"` | Wait for all, then report errors |
|
|
608
|
-
| `"ignore"` | Treat failures as successes |
|
|
609
|
-
|
|
610
|
-
---
|
|
611
|
-
|
|
612
|
-
## Evaluating Discretion Conditions
|
|
613
|
-
|
|
614
|
-
Discretion markers (`**...**`) signal AI-evaluated conditions:
|
|
615
|
-
|
|
616
|
-
```prose
|
|
617
|
-
loop until **the code is bug-free**:
|
|
618
|
-
session "Find and fix bugs"
|
|
619
|
-
```
|
|
620
|
-
|
|
621
|
-
### Evaluation Approach
|
|
622
|
-
|
|
623
|
-
1. **Context awareness**: Consider all prior session outputs
|
|
624
|
-
2. **Semantic interpretation**: Understand the intent, not literal parsing
|
|
625
|
-
3. **Conservative judgment**: When uncertain, continue iterating
|
|
626
|
-
4. **Progress detection**: Exit if no meaningful progress is being made
|
|
627
|
-
|
|
628
|
-
### Multi-line Conditions
|
|
629
|
-
|
|
630
|
-
```prose
|
|
631
|
-
if ***
|
|
632
|
-
the tests pass
|
|
633
|
-
and coverage exceeds 80%
|
|
634
|
-
and no linting errors
|
|
635
|
-
***:
|
|
636
|
-
session "Deploy"
|
|
637
|
-
```
|
|
638
|
-
|
|
639
|
-
Triple-asterisks allow complex, multi-line conditions.
|
|
640
|
-
|
|
641
|
-
---
|
|
642
|
-
|
|
643
|
-
## Context Passing
|
|
644
|
-
|
|
645
|
-
Variables capture session outputs and pass them to subsequent sessions:
|
|
646
|
-
|
|
647
|
-
```prose
|
|
648
|
-
let research = session "Research the topic"
|
|
649
|
-
|
|
650
|
-
session "Write summary"
|
|
651
|
-
context: research
|
|
652
|
-
```
|
|
653
|
-
|
|
654
|
-
### Context Forms
|
|
655
|
-
|
|
656
|
-
| Form | Usage |
|
|
657
|
-
| ---------------------- | ---------------------------------- |
|
|
658
|
-
| `context: var` | Single variable |
|
|
659
|
-
| `context: [a, b, c]` | Multiple variables as array |
|
|
660
|
-
| `context: { a, b, c }` | Multiple variables as named object |
|
|
661
|
-
| `context: []` | Empty context (fresh start) |
|
|
662
|
-
|
|
663
|
-
### How Context is Passed
|
|
664
|
-
|
|
665
|
-
The VM passes context **by reference**, not by value. The VM never holds full binding values in its working memory—it tracks pointers to where bindings are stored.
|
|
666
|
-
|
|
667
|
-
When spawning a session with context:
|
|
668
|
-
|
|
669
|
-
1. Pass the **binding location** (file path or database coordinates)
|
|
670
|
-
2. The subagent reads what it needs directly from storage
|
|
671
|
-
3. The subagent decides how much to load based on its task
|
|
672
|
-
|
|
673
|
-
**For filesystem state:**
|
|
674
|
-
|
|
675
|
-
```
|
|
676
|
-
Context (by reference):
|
|
677
|
-
- research: .prose/runs/20260116-143052-a7b3c9/bindings/research.md
|
|
678
|
-
- analysis: .prose/runs/20260116-143052-a7b3c9/bindings/analysis.md
|
|
679
|
-
|
|
680
|
-
Read these files to access the content. For large bindings, read selectively.
|
|
681
|
-
```
|
|
682
|
-
|
|
683
|
-
**For PostgreSQL state:**
|
|
684
|
-
|
|
685
|
-
```
|
|
686
|
-
Context (by reference):
|
|
687
|
-
- research: openprose.bindings WHERE name='research' AND run_id='20260116-143052-a7b3c9'
|
|
688
|
-
- analysis: openprose.bindings WHERE name='analysis' AND run_id='20260116-143052-a7b3c9'
|
|
689
|
-
|
|
690
|
-
Query the database to access the content.
|
|
691
|
-
```
|
|
692
|
-
|
|
693
|
-
**Why reference-based:** This enables RLM-style patterns where the environment holds arbitrarily large values and agents interact with them programmatically, without the VM becoming a bottleneck.
|
|
694
|
-
|
|
695
|
-
---
|
|
696
|
-
|
|
697
|
-
## Program Composition
|
|
698
|
-
|
|
699
|
-
Programs can import and invoke other programs, enabling modular workflows. Programs are fetched from the registry at `p.prose.md`.
|
|
700
|
-
|
|
701
|
-
### Importing Programs
|
|
702
|
-
|
|
703
|
-
Use the `use` statement to import a program:
|
|
704
|
-
|
|
705
|
-
```prose
|
|
706
|
-
use "alice/research"
|
|
707
|
-
use "bob/critique" as critic
|
|
708
|
-
```
|
|
709
|
-
|
|
710
|
-
The import path follows the format `handle/slug`. An optional alias (`as name`) allows referencing by a shorter name.
|
|
711
|
-
|
|
712
|
-
### Program URL Resolution
|
|
713
|
-
|
|
714
|
-
When the VM encounters a `use` statement:
|
|
715
|
-
|
|
716
|
-
1. Fetch the program from `https://p.prose.md/handle/slug`
|
|
717
|
-
2. Parse the program to extract its contract (inputs/outputs)
|
|
718
|
-
3. Register the program in the Import Registry
|
|
719
|
-
|
|
720
|
-
### Input Declarations
|
|
721
|
-
|
|
722
|
-
Inputs declare values that come from outside the program:
|
|
723
|
-
|
|
724
|
-
```prose
|
|
725
|
-
# Top-level inputs (bound at program start)
|
|
726
|
-
input topic: "The subject to research"
|
|
727
|
-
input depth: "How deep to go (shallow, medium, deep)"
|
|
728
|
-
|
|
729
|
-
# Mid-program inputs (runtime user prompts)
|
|
730
|
-
input user_decision: **Proceed with deployment?**
|
|
731
|
-
input confirmation: "Type 'yes' to confirm deletion"
|
|
732
|
-
```
|
|
733
|
-
|
|
734
|
-
### Input Binding Semantics
|
|
735
|
-
|
|
736
|
-
Inputs can appear **anywhere** in the program. The binding behavior depends on whether a value is pre-supplied:
|
|
737
|
-
|
|
738
|
-
| Scenario | Behavior |
|
|
739
|
-
| ------------------------------------------------------- | ------------------------------------------ |
|
|
740
|
-
| Value pre-supplied by caller | Bind immediately, continue execution |
|
|
741
|
-
| Value supplied at runtime (e.g., CLI args, API payload) | Bind immediately, continue execution |
|
|
742
|
-
| No value available | **Pause execution**, prompt user for input |
|
|
743
|
-
|
|
744
|
-
**Top-level inputs** (before executable statements):
|
|
745
|
-
|
|
746
|
-
- Typically bound at program invocation
|
|
747
|
-
- If missing, prompt before execution begins
|
|
748
|
-
|
|
749
|
-
**Mid-program inputs** (between statements):
|
|
750
|
-
|
|
751
|
-
- Check if value was pre-supplied or available from runtime context
|
|
752
|
-
- If available: bind and continue
|
|
753
|
-
- If not available: pause execution, display prompt, wait for user response
|
|
754
|
-
|
|
755
|
-
### Input Prompt Formats
|
|
756
|
-
|
|
757
|
-
```prose
|
|
758
|
-
# String prompt (literal text shown to user)
|
|
759
|
-
input confirm: "Do you want to proceed? (yes/no)"
|
|
760
|
-
|
|
761
|
-
# Discretion prompt (AI interprets and presents appropriately)
|
|
762
|
-
input next_step: **What should we do next given the diagnosis?**
|
|
763
|
-
|
|
764
|
-
# Rich prompt with context
|
|
765
|
-
input approval: ***
|
|
766
|
-
The fix has been implemented:
|
|
767
|
-
{fix_summary}
|
|
768
|
-
|
|
769
|
-
Deploy to production?
|
|
770
|
-
***
|
|
771
|
-
```
|
|
772
|
-
|
|
773
|
-
If the underlying substrate has any type of Poll/AskUserQuestion tool, you can use it to ask the user a question in a poll format with a range of options, this is often the best way to ask a question to the user.
|
|
774
|
-
|
|
775
|
-
The discretion form (`**...**`) allows the VM to present the prompt intelligently based on context, while string prompts are shown verbatim.
|
|
776
|
-
|
|
777
|
-
### Input Summary
|
|
778
|
-
|
|
779
|
-
Inputs:
|
|
780
|
-
|
|
781
|
-
- Can appear anywhere in the program (top-level or mid-execution)
|
|
782
|
-
- Have a name and a prompt (string or discretion)
|
|
783
|
-
- Bind immediately if value is pre-supplied
|
|
784
|
-
- Pause for user input if no value is available
|
|
785
|
-
- Become available as variables after binding
|
|
786
|
-
|
|
787
|
-
### Output Bindings
|
|
788
|
-
|
|
789
|
-
Outputs declare what values a program produces for its caller. Use the `output` keyword at assignment time:
|
|
790
|
-
|
|
791
|
-
```prose
|
|
792
|
-
let raw = session "Research {topic}"
|
|
793
|
-
output findings = session "Synthesize research"
|
|
794
|
-
context: raw
|
|
795
|
-
output sources = session "Extract sources"
|
|
796
|
-
context: raw
|
|
797
|
-
```
|
|
798
|
-
|
|
799
|
-
The `output` keyword:
|
|
800
|
-
|
|
801
|
-
- Marks a variable as an output (visible at assignment, not just at file top)
|
|
802
|
-
- Works like `let` but also registers the value as a program output
|
|
803
|
-
- Can appear anywhere in the program body
|
|
804
|
-
- Multiple outputs are supported
|
|
805
|
-
|
|
806
|
-
### Invoking Imported Programs
|
|
807
|
-
|
|
808
|
-
Call an imported program by providing its inputs:
|
|
809
|
-
|
|
810
|
-
```prose
|
|
811
|
-
use "alice/research" as research
|
|
812
|
-
|
|
813
|
-
let result = research(topic: "quantum computing")
|
|
814
|
-
```
|
|
815
|
-
|
|
816
|
-
The result contains all outputs from the invoked program, accessible as properties:
|
|
817
|
-
|
|
818
|
-
```prose
|
|
819
|
-
session "Write summary"
|
|
820
|
-
context: result.findings
|
|
821
|
-
|
|
822
|
-
session "Cite sources"
|
|
823
|
-
context: result.sources
|
|
824
|
-
```
|
|
825
|
-
|
|
826
|
-
### Destructuring Outputs
|
|
827
|
-
|
|
828
|
-
For convenience, outputs can be destructured:
|
|
829
|
-
|
|
830
|
-
```prose
|
|
831
|
-
let { findings, sources } = research(topic: "quantum computing")
|
|
832
|
-
```
|
|
833
|
-
|
|
834
|
-
### Import Execution Semantics
|
|
835
|
-
|
|
836
|
-
When a program invokes an imported program:
|
|
837
|
-
|
|
838
|
-
1. **Bind inputs**: Map caller-provided values to the imported program's inputs
|
|
839
|
-
2. **Execute**: Run the imported program (spawns its own sessions)
|
|
840
|
-
3. **Collect outputs**: Gather all `output` bindings from the imported program
|
|
841
|
-
4. **Return**: Make outputs available to the caller as a result object
|
|
842
|
-
|
|
843
|
-
The imported program runs in its own execution context but shares the same VM session.
|
|
844
|
-
|
|
845
|
-
### Imports Recursive Structure
|
|
846
|
-
|
|
847
|
-
Imported programs use the **same unified structure recursively**:
|
|
848
|
-
|
|
849
|
-
```
|
|
850
|
-
.prose/runs/{id}/imports/{handle}--{slug}/
|
|
851
|
-
├── program.prose
|
|
852
|
-
├── state.md
|
|
853
|
-
├── bindings/
|
|
854
|
-
│ └── {name}.md
|
|
855
|
-
├── imports/ # Nested imports go here
|
|
856
|
-
│ └── {handle2}--{slug2}/
|
|
857
|
-
│ └── ...
|
|
858
|
-
└── agents/
|
|
859
|
-
└── {name}/
|
|
860
|
-
```
|
|
861
|
-
|
|
862
|
-
This allows unlimited nesting depth while maintaining consistent structure at every level.
|
|
863
|
-
|
|
864
|
-
---
|
|
865
|
-
|
|
866
|
-
## Loop Execution
|
|
867
|
-
|
|
868
|
-
### Fixed Loops
|
|
869
|
-
|
|
870
|
-
```prose
|
|
871
|
-
repeat 3:
|
|
872
|
-
session "Generate idea"
|
|
873
|
-
```
|
|
874
|
-
|
|
875
|
-
Execute the body exactly 3 times sequentially.
|
|
876
|
-
|
|
877
|
-
```prose
|
|
878
|
-
for topic in ["AI", "ML", "DL"]:
|
|
879
|
-
session "Research"
|
|
880
|
-
context: topic
|
|
881
|
-
```
|
|
882
|
-
|
|
883
|
-
Execute once per item, with `topic` bound to each value.
|
|
884
|
-
|
|
885
|
-
### Parallel For-Each
|
|
886
|
-
|
|
887
|
-
```prose
|
|
888
|
-
parallel for item in items:
|
|
889
|
-
session "Process"
|
|
890
|
-
context: item
|
|
891
|
-
```
|
|
892
|
-
|
|
893
|
-
Fan-out: spawn all iterations concurrently, wait for all.
|
|
894
|
-
|
|
895
|
-
### Unbounded Loops
|
|
896
|
-
|
|
897
|
-
```prose
|
|
898
|
-
loop until **task complete** (max: 10):
|
|
899
|
-
session "Work on task"
|
|
900
|
-
```
|
|
901
|
-
|
|
902
|
-
1. Check condition before each iteration
|
|
903
|
-
2. Exit if condition satisfied OR max reached
|
|
904
|
-
3. Execute body if continuing
|
|
905
|
-
|
|
906
|
-
---
|
|
907
|
-
|
|
908
|
-
## Error Propagation
|
|
909
|
-
|
|
910
|
-
### Try/Catch Semantics
|
|
911
|
-
|
|
912
|
-
```prose
|
|
913
|
-
try:
|
|
914
|
-
session "Risky operation"
|
|
915
|
-
catch as err:
|
|
916
|
-
session "Handle error"
|
|
917
|
-
context: err
|
|
918
|
-
finally:
|
|
919
|
-
session "Cleanup"
|
|
920
|
-
```
|
|
921
|
-
|
|
922
|
-
Execution order:
|
|
923
|
-
|
|
924
|
-
1. **Success**: try -> finally
|
|
925
|
-
2. **Failure**: try (until fail) -> catch -> finally
|
|
926
|
-
|
|
927
|
-
### Throw Behavior
|
|
928
|
-
|
|
929
|
-
- `throw` inside catch: re-raise to outer handler
|
|
930
|
-
- `throw "message"`: raise new error with message
|
|
931
|
-
- Unhandled throws: propagate to outer scope or fail program
|
|
932
|
-
|
|
933
|
-
### Retry Mechanism
|
|
934
|
-
|
|
935
|
-
```prose
|
|
936
|
-
session "Flaky API"
|
|
937
|
-
retry: 3
|
|
938
|
-
backoff: "exponential"
|
|
939
|
-
```
|
|
940
|
-
|
|
941
|
-
On failure:
|
|
942
|
-
|
|
943
|
-
1. Retry up to N times
|
|
944
|
-
2. Apply backoff delay between attempts
|
|
945
|
-
3. If all retries fail, propagate error
|
|
946
|
-
|
|
947
|
-
---
|
|
948
|
-
|
|
949
|
-
## Choice and Conditional Execution
|
|
950
|
-
|
|
951
|
-
### Choice Blocks
|
|
952
|
-
|
|
953
|
-
```prose
|
|
954
|
-
choice **the severity level**:
|
|
955
|
-
option "Critical":
|
|
956
|
-
session "Escalate immediately"
|
|
957
|
-
option "Minor":
|
|
958
|
-
session "Log for later"
|
|
959
|
-
```
|
|
960
|
-
|
|
961
|
-
1. Evaluate the discretion criteria
|
|
962
|
-
2. Select the most appropriate option
|
|
963
|
-
3. Execute only that option's body
|
|
964
|
-
|
|
965
|
-
### If/Elif/Else
|
|
966
|
-
|
|
967
|
-
```prose
|
|
968
|
-
if **has security issues**:
|
|
969
|
-
session "Fix security"
|
|
970
|
-
elif **has performance issues**:
|
|
971
|
-
session "Optimize"
|
|
972
|
-
else:
|
|
973
|
-
session "Approve"
|
|
974
|
-
```
|
|
975
|
-
|
|
976
|
-
1. Evaluate conditions in order
|
|
977
|
-
2. Execute first matching branch
|
|
978
|
-
3. Skip remaining branches
|
|
979
|
-
|
|
980
|
-
---
|
|
981
|
-
|
|
982
|
-
## Block Invocation
|
|
983
|
-
|
|
984
|
-
### Defining Blocks
|
|
985
|
-
|
|
986
|
-
```prose
|
|
987
|
-
block review(topic):
|
|
988
|
-
session "Research {topic}"
|
|
989
|
-
session "Analyze {topic}"
|
|
990
|
-
```
|
|
991
|
-
|
|
992
|
-
Blocks are hoisted - can be used before definition.
|
|
993
|
-
|
|
994
|
-
### Invoking Blocks
|
|
995
|
-
|
|
996
|
-
```prose
|
|
997
|
-
do review("quantum computing")
|
|
998
|
-
```
|
|
999
|
-
|
|
1000
|
-
1. Push new frame onto call stack
|
|
1001
|
-
2. Bind arguments to parameters (scoped to this frame)
|
|
1002
|
-
3. Execute block body
|
|
1003
|
-
4. Pop frame from call stack
|
|
1004
|
-
5. Return to caller
|
|
1005
|
-
|
|
1006
|
-
---
|
|
1007
|
-
|
|
1008
|
-
## Call Stack Management
|
|
1009
|
-
|
|
1010
|
-
The VM maintains a call stack for block invocations. Each frame represents one invocation, enabling recursion with proper scope isolation.
|
|
1011
|
-
|
|
1012
|
-
### Stack Frame Structure
|
|
1013
|
-
|
|
1014
|
-
| Field | Description |
|
|
1015
|
-
| ----------------- | ------------------------------------------------- |
|
|
1016
|
-
| `execution_id` | Unique ID for this invocation (monotonic counter) |
|
|
1017
|
-
| `block_name` | Name of the block being executed |
|
|
1018
|
-
| `arguments` | Bound parameter values |
|
|
1019
|
-
| `local_bindings` | Variables bound within this invocation |
|
|
1020
|
-
| `return_position` | Statement index to resume after block completes |
|
|
1021
|
-
| `depth` | Current recursion depth (stack length) |
|
|
1022
|
-
|
|
1023
|
-
### Execution ID Generation
|
|
1024
|
-
|
|
1025
|
-
Each block invocation gets a unique `execution_id`:
|
|
1026
|
-
|
|
1027
|
-
- Start at 1 for the first block invocation in a run
|
|
1028
|
-
- Increment for each subsequent invocation
|
|
1029
|
-
- Never reuse within a run
|
|
1030
|
-
- Root scope (outside any block) has `execution_id: 0` (conceptually)
|
|
1031
|
-
|
|
1032
|
-
**Storage representation:** State backends may represent root scope differently—databases use `NULL`, filesystem uses no suffix. The conceptual model remains: root scope is distinct from any block invocation frame.
|
|
1033
|
-
|
|
1034
|
-
### Recursive Block Invocation
|
|
1035
|
-
|
|
1036
|
-
Blocks can call themselves by name:
|
|
1037
|
-
|
|
1038
|
-
```prose
|
|
1039
|
-
block process(chunk, depth):
|
|
1040
|
-
if depth <= 0:
|
|
1041
|
-
session "Handle directly"
|
|
1042
|
-
context: chunk
|
|
1043
|
-
else:
|
|
1044
|
-
let parts = session "Split into parts"
|
|
1045
|
-
context: chunk
|
|
1046
|
-
for part in parts:
|
|
1047
|
-
do process(part, depth - 1) # Recursive call
|
|
1048
|
-
session "Combine results"
|
|
1049
|
-
context: parts
|
|
1050
|
-
|
|
1051
|
-
do process(data, 5)
|
|
1052
|
-
```
|
|
1053
|
-
|
|
1054
|
-
**Execution flow:**
|
|
1055
|
-
|
|
1056
|
-
1. VM encounters `do process(data, 5)`
|
|
1057
|
-
2. VM pushes frame: `{execution_id: 1, block: "process", args: [data, 5], depth: 1}`
|
|
1058
|
-
3. VM executes block body, spawns "Split into parts" session
|
|
1059
|
-
4. VM encounters recursive `do process(part, depth - 1)`
|
|
1060
|
-
5. VM pushes frame: `{execution_id: 2, block: "process", args: [part, 4], depth: 2}`
|
|
1061
|
-
6. Recursion continues until base case
|
|
1062
|
-
7. Frames pop as blocks complete
|
|
1063
|
-
|
|
1064
|
-
**Key insight:** Sessions don't recurse—they're leaf nodes. The VM manages the entire call tree.
|
|
1065
|
-
|
|
1066
|
-
### Scope Resolution
|
|
1067
|
-
|
|
1068
|
-
When resolving a variable name:
|
|
1069
|
-
|
|
1070
|
-
1. Check current frame's `local_bindings`
|
|
1071
|
-
2. Check parent frame's `local_bindings` (lexical scope)
|
|
1072
|
-
3. Continue up the call stack to root
|
|
1073
|
-
4. Check global scope (imports, agents, blocks)
|
|
1074
|
-
5. Error if not found
|
|
1075
|
-
|
|
1076
|
-
```
|
|
1077
|
-
do process(chunk, 5) # execution_id: 1
|
|
1078
|
-
let parts = ... # parts bound in execution_id: 1
|
|
1079
|
-
do process(parts[0], 4) # execution_id: 2
|
|
1080
|
-
let parts = ... # NEW parts bound in execution_id: 2 (shadows parent)
|
|
1081
|
-
# Accessing 'chunk' resolves to execution_id: 2's argument
|
|
1082
|
-
```
|
|
1083
|
-
|
|
1084
|
-
**Only local bindings are scoped.** Global definitions (agents, blocks, imports) are shared across all frames.
|
|
1085
|
-
|
|
1086
|
-
### Recursion Depth Limits
|
|
1087
|
-
|
|
1088
|
-
Default maximum depth: **100**
|
|
1089
|
-
|
|
1090
|
-
Configure per-block:
|
|
1091
|
-
|
|
1092
|
-
```prose
|
|
1093
|
-
block process(chunk, depth) (max_depth: 50):
|
|
1094
|
-
...
|
|
1095
|
-
```
|
|
1096
|
-
|
|
1097
|
-
If limit exceeded:
|
|
1098
|
-
|
|
1099
|
-
```
|
|
1100
|
-
[Error] RecursionLimitExceeded: block 'process' exceeded max_depth 50
|
|
1101
|
-
```
|
|
1102
|
-
|
|
1103
|
-
### Call Stack in State
|
|
1104
|
-
|
|
1105
|
-
The VM tracks the call stack in its state. For filesystem state, this appears in `state.md`:
|
|
1106
|
-
|
|
1107
|
-
```markdown
|
|
1108
|
-
## Call Stack
|
|
1109
|
-
|
|
1110
|
-
| execution_id | block | depth | status |
|
|
1111
|
-
| ------------ | ------- | ----- | --------- |
|
|
1112
|
-
| 3 | process | 3 | executing |
|
|
1113
|
-
| 2 | process | 2 | waiting |
|
|
1114
|
-
| 1 | process | 1 | waiting |
|
|
1115
|
-
```
|
|
1116
|
-
|
|
1117
|
-
For in-context state, use `[Frame+]` and `[Frame-]` markers (see `state/in-context.md`).
|
|
1118
|
-
|
|
1119
|
-
---
|
|
1120
|
-
|
|
1121
|
-
## Pipeline Execution
|
|
1122
|
-
|
|
1123
|
-
```prose
|
|
1124
|
-
let results = items
|
|
1125
|
-
| filter:
|
|
1126
|
-
session "Keep? yes/no"
|
|
1127
|
-
context: item
|
|
1128
|
-
| map:
|
|
1129
|
-
session "Transform"
|
|
1130
|
-
context: item
|
|
1131
|
-
```
|
|
1132
|
-
|
|
1133
|
-
Execute left-to-right:
|
|
1134
|
-
|
|
1135
|
-
1. **filter**: Keep items where session returns truthy
|
|
1136
|
-
2. **map**: Transform each item via session
|
|
1137
|
-
3. **reduce**: Accumulate items pairwise
|
|
1138
|
-
4. **pmap**: Like map but concurrent
|
|
1139
|
-
|
|
1140
|
-
---
|
|
1141
|
-
|
|
1142
|
-
## String Interpolation
|
|
1143
|
-
|
|
1144
|
-
```prose
|
|
1145
|
-
let name = session "Get user name"
|
|
1146
|
-
session "Hello {name}, welcome!"
|
|
1147
|
-
```
|
|
1148
|
-
|
|
1149
|
-
Before spawning, substitute `{varname}` with variable values.
|
|
1150
|
-
|
|
1151
|
-
---
|
|
1152
|
-
|
|
1153
|
-
## Complete Execution Algorithm
|
|
1154
|
-
|
|
1155
|
-
```
|
|
1156
|
-
function execute(program, inputs?):
|
|
1157
|
-
1. Collect all use statements, fetch and register imports
|
|
1158
|
-
2. Collect all input declarations, bind values from caller
|
|
1159
|
-
3. Collect all agent definitions
|
|
1160
|
-
4. Collect all block definitions
|
|
1161
|
-
5. For each statement in order:
|
|
1162
|
-
- If session: spawn via Task, await result
|
|
1163
|
-
- If resume: load memory, spawn via Task, await result
|
|
1164
|
-
- If let/const: execute RHS, bind result
|
|
1165
|
-
- If output: execute RHS, bind result, register as output
|
|
1166
|
-
- If program call: invoke imported program with inputs, receive outputs
|
|
1167
|
-
- If parallel: spawn all branches, await per strategy
|
|
1168
|
-
- If loop: evaluate condition, execute body, repeat
|
|
1169
|
-
- If try: execute try, catch on error, always finally
|
|
1170
|
-
- If choice/if: evaluate condition, execute matching branch
|
|
1171
|
-
- If do block: invoke block with arguments
|
|
1172
|
-
6. Handle errors according to try/catch or propagate
|
|
1173
|
-
7. Collect all output bindings
|
|
1174
|
-
8. Return outputs to caller (or final result if no outputs declared)
|
|
1175
|
-
```
|
|
1176
|
-
|
|
1177
|
-
---
|
|
1178
|
-
|
|
1179
|
-
## Implementation Notes
|
|
1180
|
-
|
|
1181
|
-
### Task Tool Usage
|
|
1182
|
-
|
|
1183
|
-
Always use Task for session execution:
|
|
1184
|
-
|
|
1185
|
-
```
|
|
1186
|
-
Task({
|
|
1187
|
-
description: "OpenProse session",
|
|
1188
|
-
prompt: "<session prompt with context>",
|
|
1189
|
-
subagent_type: "general-purpose",
|
|
1190
|
-
model: "<optional model override>"
|
|
1191
|
-
})
|
|
1192
|
-
```
|
|
1193
|
-
|
|
1194
|
-
### Parallel Execution
|
|
1195
|
-
|
|
1196
|
-
Make multiple Task calls in a single response for true concurrency:
|
|
1197
|
-
|
|
1198
|
-
```
|
|
1199
|
-
// In one response, call all three:
|
|
1200
|
-
Task({ prompt: "A" })
|
|
1201
|
-
Task({ prompt: "B" })
|
|
1202
|
-
Task({ prompt: "C" })
|
|
1203
|
-
```
|
|
1204
|
-
|
|
1205
|
-
### Context Serialization
|
|
1206
|
-
|
|
1207
|
-
When passing context to sessions:
|
|
1208
|
-
|
|
1209
|
-
- Prefix with clear labels
|
|
1210
|
-
- Keep relevant information
|
|
1211
|
-
- Summarize if very long
|
|
1212
|
-
- Maintain semantic meaning
|
|
1213
|
-
|
|
1214
|
-
---
|
|
1215
|
-
|
|
1216
|
-
## Summary
|
|
1217
|
-
|
|
1218
|
-
The OpenProse VM:
|
|
1219
|
-
|
|
1220
|
-
1. **Imports** programs from `p.prose.md` via `use` statements
|
|
1221
|
-
2. **Binds** inputs from caller to program variables
|
|
1222
|
-
3. **Parses** the program structure
|
|
1223
|
-
4. **Collects** definitions (agents, blocks)
|
|
1224
|
-
5. **Executes** statements sequentially
|
|
1225
|
-
6. **Spawns** sessions via Task tool
|
|
1226
|
-
7. **Resumes** persistent agents with memory
|
|
1227
|
-
8. **Invokes** imported programs with inputs, receives outputs
|
|
1228
|
-
9. **Coordinates** parallel execution
|
|
1229
|
-
10. **Evaluates** discretion conditions intelligently
|
|
1230
|
-
11. **Manages** context flow between sessions
|
|
1231
|
-
12. **Handles** errors with try/catch/retry
|
|
1232
|
-
13. **Tracks** state in files (`.prose/runs/`) or conversation
|
|
1233
|
-
14. **Returns** output bindings to caller
|
|
1234
|
-
|
|
1235
|
-
The language is self-evident by design. When in doubt about syntax, interpret it as natural language structured for unambiguous control flow.
|