stageflow 0.36.0 → 0.40.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 +61 -26
- package/dist/agent/claudeAdapter.js +21 -1
- package/dist/agent/claudeTools.d.ts +13 -0
- package/dist/agent/claudeTools.js +98 -0
- package/dist/agent/piAdapter.d.ts +9 -1
- package/dist/agent/piAdapter.js +59 -18
- package/dist/agent/piIsolatedMcp.js +14 -2
- package/dist/agent/piIsolatedMcpProbe.d.ts +5 -1
- package/dist/agent/piIsolatedMcpProbe.js +16 -30
- package/dist/agent/port.d.ts +5 -0
- package/dist/agent/sandboxPiTools.d.ts +99 -0
- package/dist/agent/sandboxPiTools.js +109 -0
- package/dist/agents/agentId.d.ts +8 -0
- package/dist/agents/agentId.js +27 -0
- package/dist/agents/approvalBroker.d.ts +16 -0
- package/dist/agents/approvalBroker.js +45 -0
- package/dist/agents/authorChat.d.ts +19 -0
- package/dist/agents/authorChat.js +63 -0
- package/dist/agents/chatTurn.d.ts +23 -0
- package/dist/agents/chatTurn.js +77 -0
- package/dist/agents/communications/agentmail.d.ts +19 -0
- package/dist/agents/communications/agentmail.js +46 -0
- package/dist/agents/communications/agentmailListener.d.ts +59 -0
- package/dist/agents/communications/agentmailListener.js +183 -0
- package/dist/agents/communications/allowlist.d.ts +10 -0
- package/dist/agents/communications/allowlist.js +36 -0
- package/dist/agents/communications/channelConnections.d.ts +3 -0
- package/dist/agents/communications/channelConnections.js +51 -0
- package/dist/agents/communications/delivery.d.ts +53 -0
- package/dist/agents/communications/delivery.js +142 -0
- package/dist/agents/communications/email.d.ts +26 -0
- package/dist/agents/communications/email.js +20 -0
- package/dist/agents/communications/identity.d.ts +13 -0
- package/dist/agents/communications/identity.js +18 -0
- package/dist/agents/communications/imessageListener.d.ts +41 -0
- package/dist/agents/communications/imessageListener.js +92 -0
- package/dist/agents/communications/inbound.d.ts +63 -0
- package/dist/agents/communications/inbound.js +143 -0
- package/dist/agents/communications/listener.d.ts +36 -0
- package/dist/agents/communications/listener.js +38 -0
- package/dist/agents/communications/photon.d.ts +19 -0
- package/dist/agents/communications/photon.js +38 -0
- package/dist/agents/communications/port.d.ts +27 -0
- package/dist/agents/communications/port.js +6 -0
- package/dist/agents/communications/slack.d.ts +28 -0
- package/dist/agents/communications/slack.js +65 -0
- package/dist/agents/communications/supervisor.d.ts +36 -0
- package/dist/agents/communications/supervisor.js +96 -0
- package/dist/agents/communications/telegram.d.ts +19 -0
- package/dist/agents/communications/telegram.js +52 -0
- package/dist/agents/definitionSummary.d.ts +13 -0
- package/dist/agents/definitionSummary.js +91 -0
- package/dist/agents/delegate.d.ts +3 -0
- package/dist/agents/delegate.js +8 -0
- package/dist/agents/errors.d.ts +10 -0
- package/dist/agents/errors.js +32 -0
- package/dist/agents/guardrails.d.ts +24 -0
- package/dist/agents/guardrails.js +39 -0
- package/dist/agents/historyFit.d.ts +10 -0
- package/dist/agents/historyFit.js +26 -0
- package/dist/agents/hostContext.d.ts +54 -0
- package/dist/agents/hostContext.js +156 -0
- package/dist/agents/ledgers.d.ts +29 -0
- package/dist/agents/ledgers.js +31 -0
- package/dist/agents/lineDiff.d.ts +12 -0
- package/dist/agents/lineDiff.js +46 -0
- package/dist/agents/ndjson.d.ts +9 -0
- package/dist/agents/ndjson.js +47 -0
- package/dist/agents/otlpExport.d.ts +9 -0
- package/dist/agents/otlpExport.js +58 -0
- package/dist/agents/otlpSink.d.ts +7 -0
- package/dist/agents/otlpSink.js +23 -0
- package/dist/agents/policy.d.ts +31 -0
- package/dist/agents/policy.js +84 -0
- package/dist/agents/projectRoot.d.ts +5 -0
- package/dist/agents/projectRoot.js +15 -0
- package/dist/agents/runtime/piRuntime.d.ts +52 -0
- package/dist/agents/runtime/piRuntime.js +474 -0
- package/dist/agents/runtime/types.d.ts +77 -0
- package/dist/agents/runtime/types.js +26 -0
- package/dist/agents/sandbox.d.ts +17 -0
- package/dist/agents/sandbox.js +10 -0
- package/dist/agents/scheduleSource.d.ts +32 -0
- package/dist/agents/scheduleSource.js +100 -0
- package/dist/agents/service.d.ts +298 -0
- package/dist/agents/service.js +1105 -0
- package/dist/agents/sessions.d.ts +38 -0
- package/dist/agents/sessions.js +321 -0
- package/dist/agents/store.d.ts +277 -0
- package/dist/agents/store.js +643 -0
- package/dist/agents/trace.d.ts +27 -0
- package/dist/agents/trace.js +29 -0
- package/dist/agents/turnLifecycle.d.ts +72 -0
- package/dist/agents/turnLifecycle.js +157 -0
- package/dist/agents/webChat/publicChat.d.ts +36 -0
- package/dist/agents/webChat/publicChat.js +290 -0
- package/dist/agents/webChat/rateLimit.d.ts +15 -0
- package/dist/agents/webChat/rateLimit.js +33 -0
- package/dist/agents/webChat/slug.d.ts +2 -0
- package/dist/agents/webChat/slug.js +9 -0
- package/dist/channels/providers/agentmail.js +14 -1
- package/dist/channels/providers/photonImessage.js +36 -0
- package/dist/channels/providers/slack.js +2 -1
- package/dist/channels/providers/telegram.js +2 -1
- package/dist/channels/types.d.ts +27 -0
- package/dist/cli/agentsCommand.d.ts +14 -0
- package/dist/cli/agentsCommand.js +291 -0
- package/dist/cli.js +9 -0
- package/dist/config/browseCatalog.js +4 -11
- package/dist/config/draftPackage.d.ts +1 -0
- package/dist/config/draftPackage.js +4 -0
- package/dist/config/hostConfig.js +9 -0
- package/dist/config/loadAgent.d.ts +266 -0
- package/dist/config/loadAgent.js +374 -0
- package/dist/config/loadPipeline.js +5 -2
- package/dist/config/loadTask.js +34 -1
- package/dist/config/mcpHostCatalog.d.ts +50 -0
- package/dist/config/mcpHostCatalog.js +405 -0
- package/dist/config/mcpOAuth.d.ts +37 -0
- package/dist/config/mcpOAuth.js +263 -0
- package/dist/config/mcpRedaction.d.ts +42 -0
- package/dist/config/mcpRedaction.js +314 -0
- package/dist/config/mcpToolCache.d.ts +20 -0
- package/dist/config/mcpToolCache.js +43 -0
- package/dist/config/mergePipelineIncludes.d.ts +2 -0
- package/dist/config/mergePipelineIncludes.js +25 -0
- package/dist/config/resolveStageMcpServers.d.ts +35 -3
- package/dist/config/resolveStageMcpServers.js +124 -9
- package/dist/config/validateCatalog.d.ts +1 -1
- package/dist/config/validateCatalog.js +22 -1
- package/dist/mcp/agentTools.d.ts +8 -0
- package/dist/mcp/agentTools.js +132 -0
- package/dist/mcp/catalogTools.js +17 -10
- package/dist/mcp/deps.d.ts +6 -0
- package/dist/mcp/pipelineAuthorSupport.d.ts +19 -0
- package/dist/mcp/pipelineAuthorSupport.js +10 -0
- package/dist/mcp/pipelineAuthorTools.d.ts +8 -0
- package/dist/mcp/pipelineAuthorTools.js +109 -0
- package/dist/mcp/server.js +5 -0
- package/dist/mcp/tools.js +4 -0
- package/dist/mcp/triggerTools.js +32 -0
- package/dist/memory/access.d.ts +36 -0
- package/dist/memory/access.js +116 -0
- package/dist/memory/agentIssues.d.ts +3 -0
- package/dist/memory/agentIssues.js +23 -0
- package/dist/memory/bashDeny.d.ts +6 -0
- package/dist/memory/bashDeny.js +35 -0
- package/dist/memory/host.d.ts +51 -0
- package/dist/memory/host.js +394 -0
- package/dist/memory/ids.d.ts +15 -0
- package/dist/memory/ids.js +31 -0
- package/dist/memory/worker.d.ts +1 -0
- package/dist/memory/worker.js +84 -0
- package/dist/models/catalog.d.ts +113 -0
- package/dist/models/catalog.js +238 -0
- package/dist/models/response.d.ts +29 -0
- package/dist/models/response.js +25 -0
- package/dist/operatorAgent/agentAuthorContext.d.ts +17 -0
- package/dist/operatorAgent/agentAuthorContext.js +32 -0
- package/dist/operatorAgent/fakeHost.js +2 -0
- package/dist/operatorAgent/host.js +6 -3
- package/dist/operatorAgent/index.d.ts +4 -0
- package/dist/operatorAgent/index.js +4 -0
- package/dist/operatorAgent/piModel.js +2 -0
- package/dist/operatorAgent/profiles/agentAuthor.d.ts +11 -0
- package/dist/operatorAgent/profiles/agentAuthor.js +192 -0
- package/dist/operatorAgent/profiles/agentAuthorPlaybook.d.ts +1 -0
- package/dist/operatorAgent/profiles/agentAuthorPlaybook.js +29 -0
- package/dist/operatorAgent/profiles/workshopAuthor.js +2 -2
- package/dist/operatorAgent/profiles/workshopAuthorTools.js +3 -3
- package/dist/operatorAgent/proposals.d.ts +1 -0
- package/dist/operatorAgent/proposals.js +23 -2
- package/dist/package-meta.d.ts +1 -1
- package/dist/package-meta.js +1 -1
- package/dist/preflight/pipelinePreflight.js +1 -0
- package/dist/runstore/createStore.d.ts +2 -0
- package/dist/runstore/createStore.js +8 -0
- package/dist/runstore/overviewSummary.d.ts +56 -0
- package/dist/runstore/overviewSummary.js +134 -0
- package/dist/runstore/port.d.ts +3 -0
- package/dist/runstore/sqlite/SqliteRunStore.d.ts +2 -0
- package/dist/runstore/sqlite/SqliteRunStore.js +18 -0
- package/dist/runstore/sqlite/migrations/013-agents.d.ts +12 -0
- package/dist/runstore/sqlite/migrations/013-agents.js +156 -0
- package/dist/runstore/sqlite/migrations/014-agent-deliveries.d.ts +11 -0
- package/dist/runstore/sqlite/migrations/014-agent-deliveries.js +32 -0
- package/dist/runstore/sqlite/migrations/index.js +4 -0
- package/dist/runtime/gitCheckoutCapability.d.ts +1 -0
- package/dist/runtime/gitCheckoutCapability.js +1 -1
- package/dist/runtime/gitWorktreeCheckout.d.ts +22 -0
- package/dist/runtime/gitWorktreeCheckout.js +120 -0
- package/dist/runtime/sandboxContainer.d.ts +62 -0
- package/dist/runtime/sandboxContainer.js +151 -0
- package/dist/runtime/sandboxDesk.d.ts +28 -0
- package/dist/runtime/sandboxDesk.js +242 -0
- package/dist/runtime/sandboxFiles.d.ts +20 -0
- package/dist/runtime/sandboxFiles.js +150 -0
- package/dist/runtime/stageAttemptBootstrap.js +15 -1
- package/dist/runtime/stageEnvironment.d.ts +2 -0
- package/dist/runtime/stageEnvironment.js +8 -1
- package/dist/runtime/stageProcessLauncher.js +23 -0
- package/dist/runtime/stageRoots.d.ts +9 -0
- package/dist/runtime/stageRoots.js +14 -0
- package/dist/runtime/stageRunner.d.ts +5 -0
- package/dist/runtime/stageRunner.js +38 -4
- package/dist/runtime/stageSandbox.d.ts +16 -0
- package/dist/runtime/stageSandbox.js +54 -0
- package/dist/runtime/stageSecrets.d.ts +6 -1
- package/dist/runtime/stageSecrets.js +34 -1
- package/dist/runtime/stageWorker.js +138 -105
- package/dist/runtime/workspaceBinding.d.ts +2 -1
- package/dist/runtime/workspaceBinding.js +20 -4
- package/dist/server/agentAuthorRoutes.d.ts +5 -0
- package/dist/server/agentAuthorRoutes.js +64 -0
- package/dist/server/agentRoutes.d.ts +5 -0
- package/dist/server/agentRoutes.js +323 -0
- package/dist/server/bootstrap.d.ts +8 -0
- package/dist/server/bootstrap.js +36 -10
- package/dist/server/controlToken.js +8 -0
- package/dist/server/http.d.ts +8 -1
- package/dist/server/http.js +172 -20
- package/dist/server/mcpHost.js +1 -0
- package/dist/server/memoryRoutes.d.ts +5 -0
- package/dist/server/memoryRoutes.js +146 -0
- package/dist/server/projectMcpRoutes.d.ts +1 -0
- package/dist/server/projectMcpRoutes.js +241 -3
- package/dist/toolkit/guard.d.ts +27 -0
- package/dist/toolkit/guard.js +98 -0
- package/dist/toolkit/index.d.ts +48 -0
- package/dist/toolkit/index.js +82 -0
- package/dist/toolkit/meta.d.ts +36 -0
- package/dist/toolkit/meta.js +117 -0
- package/dist/toolkit/profiles.d.ts +13 -0
- package/dist/toolkit/profiles.js +25 -0
- package/dist/toolkit/record.d.ts +15 -0
- package/dist/toolkit/record.js +17 -0
- package/dist/tools/memoryTools.d.ts +95 -0
- package/dist/tools/memoryTools.js +179 -0
- package/dist/types/pipeline.d.ts +3 -0
- package/dist/types/stage.d.ts +2 -0
- package/dist/types/task.d.ts +11 -1
- package/dist/ui/assets/AssistantRuntimeProvider-CsiPFhCT.js +9 -0
- package/dist/ui/assets/MarkdownText-D7tYaIFO.js +29 -0
- package/dist/ui/assets/ReadonlyStore-BfXqHykm.js +6 -0
- package/dist/ui/assets/Tooltip-DrpoRRNi.js +1 -0
- package/dist/ui/assets/chat-BbLukq9W.js +5 -0
- package/dist/ui/assets/chat-zIZU_bP1.css +2 -0
- package/dist/ui/assets/jsx-runtime-iVoFAvQ_.js +1 -0
- package/dist/ui/assets/{index-Clv4sJpU.css → main-BFo79krC.css} +1 -1
- package/dist/ui/assets/main-CijYMeM0.js +259 -0
- package/dist/ui/chat.html +25 -0
- package/dist/ui/index.html +6 -2
- package/dist/workshop/modelSettings.d.ts +2 -2
- package/dist/workshop/modelSettings.js +5 -11
- package/examples/README.md +1 -0
- package/examples/channels-smoke/README.md +12 -1
- package/examples/github-release/README.md +1 -1
- package/examples/memory/README.md +101 -0
- package/examples/memory/desk-outage.task.yaml +15 -0
- package/examples/memory/desk-refund.task.yaml +15 -0
- package/examples/memory/desk-revisit-outage.task.yaml +11 -0
- package/examples/memory/desk-revisit.pipeline.yaml +123 -0
- package/examples/memory/desk.pipeline.yaml +192 -0
- package/examples/memory/file-card.pipeline.yaml +39 -0
- package/examples/memory/file-ledger.task.yaml +22 -0
- package/examples/memory/file-release.task.yaml +24 -0
- package/examples/memory/file-rich.pipeline.yaml +40 -0
- package/examples/memory/file-ticket.task.yaml +7 -0
- package/examples/memory/file-timeline.task.yaml +28 -0
- package/examples/memory/find-card.pipeline.yaml +46 -0
- package/examples/memory/find-ticket.task.yaml +7 -0
- package/examples/memory/missing.pipeline.yaml +16 -0
- package/examples/memory/probe-bash.task.yaml +3 -0
- package/examples/memory/recall.pipeline.yaml +24 -0
- package/examples/memory/recall.task.yaml +5 -0
- package/examples/memory/remember-ada.task.yaml +6 -0
- package/examples/memory/remember-grace.task.yaml +6 -0
- package/examples/memory/remember.pipeline.yaml +58 -0
- package/examples/memory/sandbox-memory-bash.pipeline.yaml +28 -0
- package/examples/memory/stageflow.yaml +12 -0
- package/examples/memory/update-card.pipeline.yaml +43 -0
- package/examples/memory/update-ledger.task.yaml +23 -0
- package/examples/memory/update-rich.pipeline.yaml +44 -0
- package/examples/memory/update-ticket.task.yaml +7 -0
- package/examples/ship-feature/README.md +15 -0
- package/examples/stage-mcp/README.md +1 -1
- package/package.json +2 -1
- package/dist/ui/assets/index-BOhqnPNg.js +0 -260
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
id: file-release
|
|
2
|
+
goal: File the release card with a table and the rollback command
|
|
3
|
+
context: Memory new-notebook already exists. This key does not. It is not the older releases/2.4.1 card.
|
|
4
|
+
constraints: The card body is the note exactly. Do not change the cover.
|
|
5
|
+
input:
|
|
6
|
+
key: releases/2.5.0
|
|
7
|
+
note: |
|
|
8
|
+
# Release 2.5.0
|
|
9
|
+
|
|
10
|
+
Held. Do not deploy until the checkout incident on `TICKET-3180` is closed.
|
|
11
|
+
|
|
12
|
+
| Check | State | Owner |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| Payments migration | reverted on 2.4.1 | payments |
|
|
15
|
+
| EU checkout | recovered 16:40 UTC | ada@example.com |
|
|
16
|
+
| This release | held | release desk |
|
|
17
|
+
|
|
18
|
+
Rollback command that was used for 2.4.1:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
sf runs rerun --run <previous> --from payments-migrate
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Decision: ship 2.5.0 only after a clean EU checkout hour, with the migration left out.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
id: file-rich
|
|
2
|
+
memories:
|
|
3
|
+
- new-notebook
|
|
4
|
+
stages:
|
|
5
|
+
- id: file
|
|
6
|
+
entry: true
|
|
7
|
+
model: openrouter/nvidia/nemotron-3.5-lightning:free
|
|
8
|
+
system_prompt: |
|
|
9
|
+
The task input has "key" and "note".
|
|
10
|
+
The note is the full card body. It may contain headings, lists, tables, and fenced blocks. Copy it unchanged.
|
|
11
|
+
Do these steps in order, then stop:
|
|
12
|
+
1. Call add_memory_card with memory "new-notebook", that key, and content set to the note exactly. Do not summarize, rewrap, or drop a line.
|
|
13
|
+
2. Call read_memory_card with memory "new-notebook" and that key.
|
|
14
|
+
3. Call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"key":"<the key>","note":"<the exact text read_memory_card returned>"}.
|
|
15
|
+
Do not call replace_memory. Do not call update_memory_card. Do not call any memory id other than new-notebook. Do not write files. If add_memory_card returns MEMORY_CARD_EXISTS, stop and emit status failure.
|
|
16
|
+
io:
|
|
17
|
+
input:
|
|
18
|
+
schema:
|
|
19
|
+
type: object
|
|
20
|
+
required:
|
|
21
|
+
- key
|
|
22
|
+
- note
|
|
23
|
+
properties:
|
|
24
|
+
key:
|
|
25
|
+
type: string
|
|
26
|
+
note:
|
|
27
|
+
type: string
|
|
28
|
+
additionalProperties: false
|
|
29
|
+
output:
|
|
30
|
+
schema:
|
|
31
|
+
type: object
|
|
32
|
+
required:
|
|
33
|
+
- key
|
|
34
|
+
- note
|
|
35
|
+
properties:
|
|
36
|
+
key:
|
|
37
|
+
type: string
|
|
38
|
+
note:
|
|
39
|
+
type: string
|
|
40
|
+
additionalProperties: false
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
id: file-ticket-1842
|
|
2
|
+
goal: File one ticket card in the shared notebook
|
|
3
|
+
context: First card for this ticket. The cover page is separate.
|
|
4
|
+
constraints: One card. Do not change the cover.
|
|
5
|
+
input:
|
|
6
|
+
key: TICKET-1842
|
|
7
|
+
note: Refund approved for order 4412. Customer asked for store credit.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
id: file-timeline
|
|
2
|
+
goal: File the checkout outage as a structured card
|
|
3
|
+
context: Memory new-notebook already exists. This key does not.
|
|
4
|
+
constraints: The card body is the note exactly. Do not change the cover.
|
|
5
|
+
input:
|
|
6
|
+
key: TICKET-3180
|
|
7
|
+
note: |
|
|
8
|
+
# Checkout 502s — EU
|
|
9
|
+
|
|
10
|
+
## What broke
|
|
11
|
+
|
|
12
|
+
EU checkout returned 502 from 14:10 UTC. The payments migration in `releases/2.4.1` was the trigger. US traffic stayed up.
|
|
13
|
+
|
|
14
|
+
## Timeline
|
|
15
|
+
|
|
16
|
+
1. **14:10** — Error rate crossed 8% on `POST /checkout`.
|
|
17
|
+
2. **14:22** — On-call paged `ada@example.com`.
|
|
18
|
+
3. **15:05** — Rollback of `releases/2.4.1` started.
|
|
19
|
+
4. **16:40** — 502s stopped.
|
|
20
|
+
|
|
21
|
+
## Not the cause
|
|
22
|
+
|
|
23
|
+
> The storefront cache was flushed at 13:40. That was a separate change and the 502s started later, only in EU.
|
|
24
|
+
|
|
25
|
+
## Next
|
|
26
|
+
|
|
27
|
+
- Write the rollback note on `releases/2.4.1`
|
|
28
|
+
- Keep this ticket as the incident record
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
id: find-card
|
|
2
|
+
stages:
|
|
3
|
+
- id: find
|
|
4
|
+
entry: true
|
|
5
|
+
model: openrouter/nvidia/nemotron-3.5-lightning:free
|
|
6
|
+
system_prompt: |
|
|
7
|
+
The task input has "key" and "query".
|
|
8
|
+
Do these steps in order, then stop:
|
|
9
|
+
1. Call read_memory_card with memory "notebook" and that key.
|
|
10
|
+
2. Call search_memory_cards with memory "notebook" and that query.
|
|
11
|
+
3. Call read_memory with memory "notebook".
|
|
12
|
+
4. Call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"key":"<the key>","note":"<the exact card body>","hits":"<the search result as JSON text>","page":"<the exact cover>"}.
|
|
13
|
+
Do not call add_memory_card, update_memory_card, or replace_memory. Do not call any memory id other than notebook. Do not write files.
|
|
14
|
+
io:
|
|
15
|
+
input:
|
|
16
|
+
schema:
|
|
17
|
+
type: object
|
|
18
|
+
required:
|
|
19
|
+
- key
|
|
20
|
+
- query
|
|
21
|
+
properties:
|
|
22
|
+
key:
|
|
23
|
+
type: string
|
|
24
|
+
query:
|
|
25
|
+
type: string
|
|
26
|
+
additionalProperties: false
|
|
27
|
+
output:
|
|
28
|
+
schema:
|
|
29
|
+
type: object
|
|
30
|
+
required:
|
|
31
|
+
- key
|
|
32
|
+
- note
|
|
33
|
+
- hits
|
|
34
|
+
- page
|
|
35
|
+
properties:
|
|
36
|
+
key:
|
|
37
|
+
type: string
|
|
38
|
+
note:
|
|
39
|
+
type: string
|
|
40
|
+
hits:
|
|
41
|
+
type: string
|
|
42
|
+
page:
|
|
43
|
+
type: string
|
|
44
|
+
additionalProperties: false
|
|
45
|
+
memories:
|
|
46
|
+
- notebook
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
id: missing-memory
|
|
2
|
+
memories:
|
|
3
|
+
- does-not-exist
|
|
4
|
+
stages:
|
|
5
|
+
- id: blocked
|
|
6
|
+
entry: true
|
|
7
|
+
model: openrouter/nvidia/nemotron-3.5-lightning:free
|
|
8
|
+
system_prompt: |
|
|
9
|
+
This pipeline must not start. The memory it names does not exist.
|
|
10
|
+
io:
|
|
11
|
+
input:
|
|
12
|
+
schema:
|
|
13
|
+
type: object
|
|
14
|
+
output:
|
|
15
|
+
schema:
|
|
16
|
+
type: object
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
id: recall
|
|
2
|
+
memories:
|
|
3
|
+
- notebook
|
|
4
|
+
stages:
|
|
5
|
+
- id: read-page
|
|
6
|
+
entry: true
|
|
7
|
+
model: openrouter/nvidia/nemotron-3.5-lightning:free
|
|
8
|
+
system_prompt: |
|
|
9
|
+
Call read_memory with memory "notebook". Do not call replace_memory.
|
|
10
|
+
Then call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"page":"<the exact text read_memory returned>"}.
|
|
11
|
+
Do not change the page. Do not write files.
|
|
12
|
+
io:
|
|
13
|
+
input:
|
|
14
|
+
schema:
|
|
15
|
+
type: object
|
|
16
|
+
output:
|
|
17
|
+
schema:
|
|
18
|
+
type: object
|
|
19
|
+
required:
|
|
20
|
+
- page
|
|
21
|
+
properties:
|
|
22
|
+
page:
|
|
23
|
+
type: string
|
|
24
|
+
additionalProperties: false
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
id: remember
|
|
2
|
+
stages:
|
|
3
|
+
- id: record
|
|
4
|
+
entry: true
|
|
5
|
+
route:
|
|
6
|
+
- to: confirm
|
|
7
|
+
model: openrouter/nvidia/nemotron-3.5-lightning:free
|
|
8
|
+
system_prompt: |
|
|
9
|
+
The task input has one field, "note".
|
|
10
|
+
Do these steps in order, then stop:
|
|
11
|
+
1. Call read_memory with memory "notebook".
|
|
12
|
+
2. Call replace_memory with memory "notebook". Set content to the previous page, unchanged, then a newline if the page was not empty, then one new line "- " followed by the note. Keep every earlier line.
|
|
13
|
+
3. Call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"note":"<the note>","page":"<the full new page>"}.
|
|
14
|
+
Do not call any memory id other than notebook. Do not write files.
|
|
15
|
+
io:
|
|
16
|
+
input:
|
|
17
|
+
schema:
|
|
18
|
+
type: object
|
|
19
|
+
required:
|
|
20
|
+
- note
|
|
21
|
+
properties:
|
|
22
|
+
note:
|
|
23
|
+
type: string
|
|
24
|
+
additionalProperties: false
|
|
25
|
+
output:
|
|
26
|
+
schema:
|
|
27
|
+
type: object
|
|
28
|
+
required:
|
|
29
|
+
- note
|
|
30
|
+
- page
|
|
31
|
+
properties:
|
|
32
|
+
note:
|
|
33
|
+
type: string
|
|
34
|
+
page:
|
|
35
|
+
type: string
|
|
36
|
+
additionalProperties: false
|
|
37
|
+
- id: confirm
|
|
38
|
+
model: openrouter/nvidia/nemotron-3.5-lightning:free
|
|
39
|
+
system_prompt: |
|
|
40
|
+
Call read_memory with memory "notebook". Do not call replace_memory.
|
|
41
|
+
Then call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"page":"<the exact text read_memory returned>"}.
|
|
42
|
+
Do not change the page. Do not write files.
|
|
43
|
+
io:
|
|
44
|
+
input:
|
|
45
|
+
schema:
|
|
46
|
+
type: object
|
|
47
|
+
additionalProperties: true
|
|
48
|
+
output:
|
|
49
|
+
schema:
|
|
50
|
+
type: object
|
|
51
|
+
required:
|
|
52
|
+
- page
|
|
53
|
+
properties:
|
|
54
|
+
page:
|
|
55
|
+
type: string
|
|
56
|
+
additionalProperties: false
|
|
57
|
+
memories:
|
|
58
|
+
- notebook
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
id: sandbox-memory-bash
|
|
2
|
+
stages:
|
|
3
|
+
- id: probe
|
|
4
|
+
model: openrouter/nvidia/nemotron-3.5-lightning:free
|
|
5
|
+
system_prompt: |
|
|
6
|
+
Use the bash tool to look up the other memory which we dont have access to if its their. it might not be if its not found.
|
|
7
|
+
if found or not then call the following emit stage tool.
|
|
8
|
+
then also add something to the memory you have access to .
|
|
9
|
+
Then call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"found": true if the bash found the other memory, otherwise false, "output":"<the bash stdout>"}.
|
|
10
|
+
io:
|
|
11
|
+
input:
|
|
12
|
+
schema:
|
|
13
|
+
type: object
|
|
14
|
+
additionalProperties: true
|
|
15
|
+
output:
|
|
16
|
+
schema:
|
|
17
|
+
type: object
|
|
18
|
+
required:
|
|
19
|
+
- found
|
|
20
|
+
- output
|
|
21
|
+
properties:
|
|
22
|
+
found:
|
|
23
|
+
type: boolean
|
|
24
|
+
output:
|
|
25
|
+
type: string
|
|
26
|
+
additionalProperties: false
|
|
27
|
+
memories:
|
|
28
|
+
- shared-notes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
id: update-card
|
|
2
|
+
memories:
|
|
3
|
+
- notebook
|
|
4
|
+
stages:
|
|
5
|
+
- id: revise
|
|
6
|
+
entry: true
|
|
7
|
+
model: openrouter/nvidia/nemotron-3.5-lightning:free
|
|
8
|
+
system_prompt: |
|
|
9
|
+
The task input has "key" and "note".
|
|
10
|
+
Do these steps in order, then stop:
|
|
11
|
+
1. Call read_memory_card with memory "notebook" and that key.
|
|
12
|
+
2. Call update_memory_card with memory "notebook", that key, and content set to the note.
|
|
13
|
+
3. Call read_memory_card again with memory "notebook" and that key.
|
|
14
|
+
4. Call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"key":"<the key>","before":"<the first read>","note":"<the second read>"}.
|
|
15
|
+
Do not call add_memory_card. Do not call replace_memory. Do not call any memory id other than notebook. Do not write files. If the first read returns MEMORY_CARD_NOT_FOUND, stop and emit status failure.
|
|
16
|
+
io:
|
|
17
|
+
input:
|
|
18
|
+
schema:
|
|
19
|
+
type: object
|
|
20
|
+
required:
|
|
21
|
+
- key
|
|
22
|
+
- note
|
|
23
|
+
properties:
|
|
24
|
+
key:
|
|
25
|
+
type: string
|
|
26
|
+
note:
|
|
27
|
+
type: string
|
|
28
|
+
additionalProperties: false
|
|
29
|
+
output:
|
|
30
|
+
schema:
|
|
31
|
+
type: object
|
|
32
|
+
required:
|
|
33
|
+
- key
|
|
34
|
+
- before
|
|
35
|
+
- note
|
|
36
|
+
properties:
|
|
37
|
+
key:
|
|
38
|
+
type: string
|
|
39
|
+
before:
|
|
40
|
+
type: string
|
|
41
|
+
note:
|
|
42
|
+
type: string
|
|
43
|
+
additionalProperties: false
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
id: update-ledger
|
|
2
|
+
goal: Replace the refund ledger after the customer confirmed the payout
|
|
3
|
+
context: orders/4412/ledger already exists on new-notebook. This replaces that card and leaves the previous copy for the operator.
|
|
4
|
+
constraints: The card body is the note exactly. Do not change the cover. Do not add a second card.
|
|
5
|
+
input:
|
|
6
|
+
key: orders/4412/ledger
|
|
7
|
+
note: |
|
|
8
|
+
# Refund ledger — order 4412
|
|
9
|
+
|
|
10
|
+
Closed. The customer confirmed the payout.
|
|
11
|
+
|
|
12
|
+
| When | Who | Action | Amount |
|
|
13
|
+
| --- | --- | --- | --- |
|
|
14
|
+
| 2026-10-18 09:12 | grace@example.com | Request opened | 86.40 USD |
|
|
15
|
+
| 2026-10-18 11:04 | TICKET-2040 | Store credit declined | — |
|
|
16
|
+
| 2026-10-19 16:22 | payments | Paid to original card | 86.40 USD |
|
|
17
|
+
| 2026-10-20 09:03 | customer | Confirmed payout | 86.40 USD |
|
|
18
|
+
|
|
19
|
+
Still open:
|
|
20
|
+
|
|
21
|
+
- [x] Customer confirmed the payout
|
|
22
|
+
- [x] Reviewer recorded the decline
|
|
23
|
+
- [x] Receipt attached to the ticket
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
id: update-rich
|
|
2
|
+
memories:
|
|
3
|
+
- new-notebook
|
|
4
|
+
stages:
|
|
5
|
+
- id: revise
|
|
6
|
+
entry: true
|
|
7
|
+
model: openrouter/nvidia/nemotron-3.5-lightning:free
|
|
8
|
+
system_prompt: |
|
|
9
|
+
The task input has "key" and "note".
|
|
10
|
+
The note is the full new card body. Copy it unchanged, including tables and lists.
|
|
11
|
+
Do these steps in order, then stop:
|
|
12
|
+
1. Call read_memory_card with memory "new-notebook" and that key.
|
|
13
|
+
2. Call update_memory_card with memory "new-notebook", that key, and content set to the note exactly.
|
|
14
|
+
3. Call read_memory_card again with memory "new-notebook" and that key.
|
|
15
|
+
4. Call emit_stage_envelope once with status success, a one-line summary, artifacts [], and payload {"key":"<the key>","before":"<the first read>","note":"<the second read>"}.
|
|
16
|
+
Do not call add_memory_card or replace_memory. Do not call any memory id other than new-notebook. Do not write files. If the card is missing, emit status failure.
|
|
17
|
+
io:
|
|
18
|
+
input:
|
|
19
|
+
schema:
|
|
20
|
+
type: object
|
|
21
|
+
required:
|
|
22
|
+
- key
|
|
23
|
+
- note
|
|
24
|
+
properties:
|
|
25
|
+
key:
|
|
26
|
+
type: string
|
|
27
|
+
note:
|
|
28
|
+
type: string
|
|
29
|
+
additionalProperties: false
|
|
30
|
+
output:
|
|
31
|
+
schema:
|
|
32
|
+
type: object
|
|
33
|
+
required:
|
|
34
|
+
- key
|
|
35
|
+
- before
|
|
36
|
+
- note
|
|
37
|
+
properties:
|
|
38
|
+
key:
|
|
39
|
+
type: string
|
|
40
|
+
before:
|
|
41
|
+
type: string
|
|
42
|
+
note:
|
|
43
|
+
type: string
|
|
44
|
+
additionalProperties: false
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
id: update-ticket-1842
|
|
2
|
+
goal: Replace the ticket card with a later decision
|
|
3
|
+
context: The card TICKET-1842 already exists. This run changes that card only.
|
|
4
|
+
constraints: Do not add a second card. Do not change the cover.
|
|
5
|
+
input:
|
|
6
|
+
key: TICKET-1842
|
|
7
|
+
note: Refund paid out for order 4412. Store credit was declined.
|
|
@@ -121,6 +121,21 @@ run finishes (or if it fails partway through), remove the worktree with
|
|
|
121
121
|
`git worktree remove ../your-repo-feature-branch` from the main clone once
|
|
122
122
|
you no longer need it.
|
|
123
123
|
|
|
124
|
+
Alternatively, let Stageflow do this for you: point `checkout` at an object
|
|
125
|
+
instead of a path —
|
|
126
|
+
|
|
127
|
+
```yaml
|
|
128
|
+
checkout:
|
|
129
|
+
branch: your-feature-branch # optional — defaults to stageflow/<task id>
|
|
130
|
+
base: origin/main # optional — defaults to HEAD
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
— and Stageflow creates (or reuses, if it already exists) a worktree for
|
|
134
|
+
that branch the same way, as a sibling of your project root
|
|
135
|
+
(`../.stageflow-worktrees/<branch>`). It's never auto-removed, same as one
|
|
136
|
+
you make by hand — clean it up yourself with `git worktree remove` when
|
|
137
|
+
you're done.
|
|
138
|
+
|
|
124
139
|
## Create a task
|
|
125
140
|
|
|
126
141
|
Task context is the pipeline's portable feature brief. Include enough detail
|
|
@@ -39,7 +39,7 @@ PI_CURSOR_SETTING_SOURCES=all STAGEFLOW_ACTIVITY_VERBOSE=1 node dist/cli.js ui
|
|
|
39
39
|
|
|
40
40
|
`npm run dev -- ui` runs the TypeScript CLI via tsx; use `node dist/cli.js ui` after `ui:build` so the console is served from `dist/ui`. Do not use a globally installed `sf` — Homebrew `sf` is an older build that cannot load this catalog.
|
|
41
41
|
|
|
42
|
-
Open `http://127.0.0.1:3847`. Browse should list **stage-mcp** and **stage-mcp-missing-var**. **stage-mcp-dead** is excluded from the catalog manifest (so `sf validate --strict`
|
|
42
|
+
Open `http://127.0.0.1:3847`. Browse should list **stage-mcp** and **stage-mcp-missing-var**. **stage-mcp-dead** is excluded from the catalog manifest (so bare `sf validate --strict` stays green) but remains loadable by explicit path — see Scenario C.
|
|
43
43
|
|
|
44
44
|
## Terminal 2 — start a run (repo root)
|
|
45
45
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stageflow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0",
|
|
4
4
|
"description": "Stageflow — CLI pipeline runtime for configurable stages on Pi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
"@earendil-works/pi-tui": "^0.99.1",
|
|
82
82
|
"@modelcontextprotocol/node": "^2.0.0",
|
|
83
83
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
84
|
+
"agentmail": "0.5.46",
|
|
84
85
|
"better-sqlite3": "^13.0.3",
|
|
85
86
|
"croner": "^10.0.1",
|
|
86
87
|
"imapflow": "^2.2.5",
|