patchwork-os 1.1.0-beta.3.canary.436 → 1.1.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ta/desk/cells/structureRetest.d.ts +78 -0
- package/dist/ta/desk/cells/structureRetest.js +277 -0
- package/dist/ta/desk/cells/structureRetest.js.map +1 -0
- package/package.json +1 -1
- package/scripts/start-all.ps1 +209 -209
- package/scripts/start-orchestrator.ps1 +158 -158
- package/templates/recipes/crypto-daily-brief.yaml +805 -0
- package/templates/recipes/crypto-midday-pulse.yaml +133 -0
- package/templates/recipes/crypto-watchlist.example.json +8 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
apiVersion: patchwork.sh/v1
|
|
2
|
+
name: crypto-midday-pulse
|
|
3
|
+
description: >
|
|
4
|
+
Midday tripwire check — a five-minute companion to crypto-daily-brief.
|
|
5
|
+
Re-reads the morning brief's pre-committed 4h-close boundaries against
|
|
6
|
+
fresh candles, reports fired/armed status, card distances, and event
|
|
7
|
+
countdowns. NO new analysis, NO labels, NO advice — status only.
|
|
8
|
+
|
|
9
|
+
# Same bridge requirements as the daily brief (subprocess driver for the
|
|
10
|
+
# agent step). Flat runner, sequential.
|
|
11
|
+
trigger:
|
|
12
|
+
type: cron
|
|
13
|
+
at: "0 13 * * *"
|
|
14
|
+
|
|
15
|
+
allowWrites: [file, http]
|
|
16
|
+
|
|
17
|
+
budget:
|
|
18
|
+
tokensMax: 80000
|
|
19
|
+
usdMax: 1
|
|
20
|
+
onBreach: halt
|
|
21
|
+
estimateUnmeasured: true
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
# Fresh 4h candles since the 07:00 brief (12 covers >48h of closes).
|
|
25
|
+
- id: btc4h
|
|
26
|
+
tool: market.fetch
|
|
27
|
+
mode: klines
|
|
28
|
+
symbol: BTCUSDT
|
|
29
|
+
interval: "4h"
|
|
30
|
+
limit: 12
|
|
31
|
+
into: btc4h
|
|
32
|
+
expect:
|
|
33
|
+
schema:
|
|
34
|
+
type: object
|
|
35
|
+
required: [candles]
|
|
36
|
+
properties:
|
|
37
|
+
candles:
|
|
38
|
+
type: array
|
|
39
|
+
minItems: 6
|
|
40
|
+
- id: eth4h
|
|
41
|
+
tool: market.fetch
|
|
42
|
+
mode: klines
|
|
43
|
+
symbol: ETHUSDT
|
|
44
|
+
interval: "4h"
|
|
45
|
+
limit: 12
|
|
46
|
+
into: eth4h
|
|
47
|
+
expect:
|
|
48
|
+
schema:
|
|
49
|
+
type: object
|
|
50
|
+
required: [candles]
|
|
51
|
+
properties:
|
|
52
|
+
candles:
|
|
53
|
+
type: array
|
|
54
|
+
minItems: 6
|
|
55
|
+
|
|
56
|
+
# This morning's brief — the source of every boundary number used below.
|
|
57
|
+
- id: brief
|
|
58
|
+
tool: file.read
|
|
59
|
+
path: ~/.patchwork/holdings/crypto-brief-latest.md
|
|
60
|
+
into: brief
|
|
61
|
+
expect:
|
|
62
|
+
contains: "SCENARIO TREES"
|
|
63
|
+
|
|
64
|
+
# Today's cards (append-only ledger; agent filters to today's rows).
|
|
65
|
+
- id: ledger
|
|
66
|
+
tool: file.read
|
|
67
|
+
path: ~/.patchwork/ta-ledger.jsonl
|
|
68
|
+
optional: true
|
|
69
|
+
into: ledger
|
|
70
|
+
|
|
71
|
+
# Event countdowns from the user events file.
|
|
72
|
+
- id: events
|
|
73
|
+
tool: file.read
|
|
74
|
+
path: ~/.patchwork/holdings/events.md
|
|
75
|
+
optional: true
|
|
76
|
+
into: events
|
|
77
|
+
- id: catalysts
|
|
78
|
+
tool: market.catalysts
|
|
79
|
+
eventsText: "{{events}}"
|
|
80
|
+
horizonDays: 3
|
|
81
|
+
optional: true
|
|
82
|
+
into: catalysts
|
|
83
|
+
|
|
84
|
+
- id: pulse
|
|
85
|
+
agent:
|
|
86
|
+
driver: claude-code
|
|
87
|
+
model: claude-sonnet-4-6
|
|
88
|
+
prompt: |
|
|
89
|
+
Produce a MIDDAY PULSE: a status update of at most 14 short lines,
|
|
90
|
+
plain text (no markdown headers). It reports status ONLY — no new
|
|
91
|
+
analysis, no regime labels, no stance changes, no advice, no
|
|
92
|
+
probabilities, no targets. Every number must be verbatim from the
|
|
93
|
+
inputs (or simple arithmetic on them, e.g. percent distance).
|
|
94
|
+
|
|
95
|
+
Inputs:
|
|
96
|
+
<brief>{{brief}}</brief>
|
|
97
|
+
<btc4h>{{btc4h}}</btc4h>
|
|
98
|
+
<eth4h>{{eth4h}}</eth4h>
|
|
99
|
+
<ledger>{{ledger}}</ledger>
|
|
100
|
+
<catalysts>{{catalysts}}</catalysts>
|
|
101
|
+
|
|
102
|
+
Lines, in order:
|
|
103
|
+
1. "PULSE <today's date> — vs this morning's brief"
|
|
104
|
+
2-4. For BTC then ETH: find the SCENARIO TREES boundary numbers in
|
|
105
|
+
<brief> (the "CLOSES above swingHigh X" / "below swingLow Y"
|
|
106
|
+
values). Check the 4h candles' CLOSE values since the brief:
|
|
107
|
+
"BTC: up-trigger 63,933.02 — not fired (last close Z, −N.N%
|
|
108
|
+
away); down-trigger 60,755 — not fired". A close through a
|
|
109
|
+
boundary = "FIRED at <close>"; a wick-only breach = "swept,
|
|
110
|
+
unconfirmed (high/low W)"; a boundary within 1% of the last
|
|
111
|
+
close = append "(APPROACHING)".
|
|
112
|
+
5-11. Cards: parse <ledger> JSONL lines where kind=="card" and
|
|
113
|
+
type=="altsetup-v1" and madeAt starts with today's date. One
|
|
114
|
+
line each: "<DIR> <symbol>: invalidation <inv>, R-ref <rRef> —
|
|
115
|
+
card open". If <ledger> is missing write "cards: ledger
|
|
116
|
+
unavailable".
|
|
117
|
+
12. Events: each <catalysts> event with daysTo <= 2: "<label> —
|
|
118
|
+
<daysTo>d" (0d = "today").
|
|
119
|
+
13. "No action implied — next full brief 07:00."
|
|
120
|
+
Omit empty groups silently. Plain text only.
|
|
121
|
+
into: pulse
|
|
122
|
+
expect:
|
|
123
|
+
matches: "PULSE"
|
|
124
|
+
|
|
125
|
+
- id: write
|
|
126
|
+
tool: file.write
|
|
127
|
+
path: ~/.patchwork/inbox/crypto-pulse-{{date}}.md
|
|
128
|
+
content: "{{pulse}}"
|
|
129
|
+
- id: push
|
|
130
|
+
tool: http.post
|
|
131
|
+
url: https://ntfy.sh/REPLACE-WITH-YOUR-TOPIC
|
|
132
|
+
contentType: text/plain
|
|
133
|
+
body: "{{pulse}}"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Copy to ~/.patchwork/holdings/watchlist.json. Symbols + coarse tier ONLY — no quantities or cost basis, so nothing sensitive ever reaches an LLM prompt. The brief discusses levels/invalidations, not size.",
|
|
3
|
+
"watch": ["BTCUSDT", "ETHUSDT"],
|
|
4
|
+
"holdings": [
|
|
5
|
+
{ "symbol": "BTC", "tier": "core" },
|
|
6
|
+
{ "symbol": "ETH", "tier": "core" }
|
|
7
|
+
]
|
|
8
|
+
}
|