@docyrus/docyrus 0.0.19 → 0.0.21
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/agent-loader.js +37 -3
- package/agent-loader.js.map +2 -2
- package/main.js +498 -93
- package/main.js.map +4 -4
- package/package.json +14 -4
- package/resources/chrome-tools/browser-content.js +103 -0
- package/resources/chrome-tools/browser-cookies.js +35 -0
- package/resources/chrome-tools/browser-eval.js +53 -0
- package/resources/chrome-tools/browser-hn-scraper.js +108 -0
- package/resources/chrome-tools/browser-nav.js +44 -0
- package/resources/chrome-tools/browser-pick.js +162 -0
- package/resources/chrome-tools/browser-screenshot.js +34 -0
- package/resources/chrome-tools/browser-start.js +86 -0
- package/resources/pi-agent/extensions/answer.ts +532 -0
- package/resources/pi-agent/extensions/context.ts +578 -0
- package/resources/pi-agent/extensions/control.ts +1779 -0
- package/resources/pi-agent/extensions/diff.ts +218 -0
- package/resources/pi-agent/extensions/files.ts +199 -0
- package/resources/pi-agent/extensions/loop.ts +446 -0
- package/resources/pi-agent/extensions/multi-edit.ts +835 -0
- package/resources/pi-agent/extensions/notify.ts +88 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/CHANGELOG.md +192 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/LICENSE +21 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/README.md +296 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/app-bridge.bundle.js +67 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/cli.js +108 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/commands.ts +211 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/config.ts +227 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/consent-manager.ts +64 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/direct-tools.ts +301 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/errors.ts +219 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/glimpse-ui.ts +80 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/host-html-template.ts +427 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/index.ts +232 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/init.ts +319 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/lifecycle.ts +93 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/logger.ts +169 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/mcp-panel.ts +713 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/metadata-cache.ts +191 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/npx-resolver.ts +419 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/oauth-handler.ts +56 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/package.json +85 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/paths.ts +29 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/proxy-modes.ts +635 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/resource-tools.ts +17 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/server-manager.ts +330 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/state.ts +41 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/tool-metadata.ts +144 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/tool-registrar.ts +46 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/types.ts +367 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/ui-resource-handler.ts +145 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/ui-server.ts +623 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/ui-session.ts +384 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/ui-stream-types.ts +89 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/utils.ts +75 -0
- package/resources/pi-agent/extensions/prompt-editor.ts +1315 -0
- package/resources/pi-agent/extensions/prompt-url-widget.ts +158 -0
- package/resources/pi-agent/extensions/redraws.ts +24 -0
- package/resources/pi-agent/extensions/review.ts +2160 -0
- package/resources/pi-agent/extensions/todos.ts +2076 -0
- package/resources/pi-agent/extensions/tps.ts +47 -0
- package/resources/pi-agent/extensions/whimsical.ts +474 -0
- package/resources/pi-agent/prompts/coder-system.md +106 -0
- package/resources/pi-agent/skills/changelog-generator/SKILL.md +425 -0
- package/resources/pi-agent/skills/docyrus-chrome-devtools-cli/SKILL.md +80 -0
- package/resources/pi-agent/skills/docyrus-platform/SKILL.md +71 -0
- package/resources/pi-agent/skills/docyrus-platform/references/ai-capabilities.md +43 -0
- package/resources/pi-agent/skills/docyrus-platform/references/auth-and-multi-tenancy.md +35 -0
- package/resources/pi-agent/skills/docyrus-platform/references/automation-and-workflows.md +30 -0
- package/resources/pi-agent/skills/docyrus-platform/references/core-building-blocks.md +53 -0
- package/resources/pi-agent/skills/{docyrus-api-dev → docyrus-platform}/references/data-source-query-guide.md +32 -28
- package/resources/pi-agent/skills/docyrus-platform/references/developer-tools.md +28 -0
- package/resources/pi-agent/skills/docyrus-platform/references/docyrus-cli-usage.md +554 -0
- package/resources/pi-agent/skills/{docyrus-api-dev → docyrus-platform}/references/formula-design-guide-llm.md +15 -23
- package/resources/pi-agent/skills/docyrus-platform/references/integrations-and-events.md +60 -0
- package/resources/pi-agent/skills/docyrus-platform/references/platform-services.md +58 -0
- package/resources/pi-agent/skills/docyrus-platform/references/querying-and-data-operations.md +27 -0
- package/resources/pi-agent/prompts/coder-append-system.md +0 -19
- package/resources/pi-agent/skills/docyrus-ai/SKILL.md +0 -28
- package/resources/pi-agent/skills/docyrus-api-dev/SKILL.md +0 -161
- package/resources/pi-agent/skills/docyrus-api-dev/references/api-client.md +0 -349
- package/resources/pi-agent/skills/docyrus-api-dev/references/authentication.md +0 -238
- package/resources/pi-agent/skills/docyrus-api-dev/references/query-and-formulas.md +0 -592
- package/resources/pi-agent/skills/docyrus-api-doctor/SKILL.md +0 -70
- package/resources/pi-agent/skills/docyrus-api-doctor/references/checklist-details.md +0 -588
- package/resources/pi-agent/skills/docyrus-app-dev/SKILL.md +0 -159
- package/resources/pi-agent/skills/docyrus-app-dev/references/api-client-and-auth.md +0 -275
- package/resources/pi-agent/skills/docyrus-app-dev/references/collections-and-patterns.md +0 -352
- package/resources/pi-agent/skills/docyrus-app-dev/references/data-source-query-guide.md +0 -2059
- package/resources/pi-agent/skills/docyrus-app-dev/references/formula-design-guide-llm.md +0 -320
- package/resources/pi-agent/skills/docyrus-app-dev/references/query-guide.md +0 -525
- package/resources/pi-agent/skills/docyrus-app-ui-design/SKILL.md +0 -466
- package/resources/pi-agent/skills/docyrus-app-ui-design/references/component-selection-guide.md +0 -602
- package/resources/pi-agent/skills/docyrus-app-ui-design/references/icon-usage-guide.md +0 -463
- package/resources/pi-agent/skills/docyrus-app-ui-design/references/preferred-components-catalog.md +0 -242
- package/resources/pi-agent/skills/docyrus-apps/SKILL.md +0 -54
- package/resources/pi-agent/skills/docyrus-architect/SKILL.md +0 -174
- package/resources/pi-agent/skills/docyrus-architect/references/custom-query-guide.md +0 -410
- package/resources/pi-agent/skills/docyrus-architect/references/data-source-query-guide.md +0 -2059
- package/resources/pi-agent/skills/docyrus-architect/references/formula-design-guide-llm.md +0 -320
- package/resources/pi-agent/skills/docyrus-architect/references/formula-reference.md +0 -145
- package/resources/pi-agent/skills/docyrus-auth/SKILL.md +0 -100
- package/resources/pi-agent/skills/docyrus-cli-app/SKILL.md +0 -279
- package/resources/pi-agent/skills/docyrus-cli-app/references/cli-manifest.md +0 -532
- package/resources/pi-agent/skills/docyrus-cli-app/references/list-query-examples.md +0 -248
- package/resources/pi-agent/skills/docyrus-curl/SKILL.md +0 -32
- package/resources/pi-agent/skills/docyrus-discover/SKILL.md +0 -63
- package/resources/pi-agent/skills/docyrus-ds/SKILL.md +0 -95
- package/resources/pi-agent/skills/docyrus-env/SKILL.md +0 -21
- package/resources/pi-agent/skills/docyrus-studio/SKILL.md +0 -369
- package/resources/pi-agent/skills/docyrus-tui/SKILL.md +0 -15
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { AssistantMessage } from "@mariozechner/pi-ai";
|
|
2
|
+
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
3
|
+
|
|
4
|
+
function isAssistantMessage(message: unknown): message is AssistantMessage {
|
|
5
|
+
if (!message || typeof message !== "object") return false;
|
|
6
|
+
const role = (message as { role?: unknown }).role;
|
|
7
|
+
return role === "assistant";
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default function (pi: ExtensionAPI) {
|
|
11
|
+
let agentStartMs: number | null = null;
|
|
12
|
+
|
|
13
|
+
pi.on("agent_start", () => {
|
|
14
|
+
agentStartMs = Date.now();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
pi.on("agent_end", (event, ctx) => {
|
|
18
|
+
if (!ctx.hasUI) return;
|
|
19
|
+
if (agentStartMs === null) return;
|
|
20
|
+
|
|
21
|
+
const elapsedMs = Date.now() - agentStartMs;
|
|
22
|
+
agentStartMs = null;
|
|
23
|
+
if (elapsedMs <= 0) return;
|
|
24
|
+
|
|
25
|
+
let input = 0;
|
|
26
|
+
let output = 0;
|
|
27
|
+
let cacheRead = 0;
|
|
28
|
+
let cacheWrite = 0;
|
|
29
|
+
let totalTokens = 0;
|
|
30
|
+
|
|
31
|
+
for (const message of event.messages) {
|
|
32
|
+
if (!isAssistantMessage(message)) continue;
|
|
33
|
+
input += message.usage.input || 0;
|
|
34
|
+
output += message.usage.output || 0;
|
|
35
|
+
cacheRead += message.usage.cacheRead || 0;
|
|
36
|
+
cacheWrite += message.usage.cacheWrite || 0;
|
|
37
|
+
totalTokens += message.usage.totalTokens || 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (output <= 0) return;
|
|
41
|
+
|
|
42
|
+
const elapsedSeconds = elapsedMs / 1000;
|
|
43
|
+
const tokensPerSecond = output / elapsedSeconds;
|
|
44
|
+
const message = `TPS ${tokensPerSecond.toFixed(1)} tok/s. out ${output.toLocaleString()}, in ${input.toLocaleString()}, cache r/w ${cacheRead.toLocaleString()}/${cacheWrite.toLocaleString()}, total ${totalTokens.toLocaleString()}, ${elapsedSeconds.toFixed(1)}s`;
|
|
45
|
+
ctx.ui.notify(message, "info");
|
|
46
|
+
});
|
|
47
|
+
}
|
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
2
|
+
|
|
3
|
+
const messages = [
|
|
4
|
+
// Short
|
|
5
|
+
"Schlepping...",
|
|
6
|
+
"Combobulating...",
|
|
7
|
+
"Doing...",
|
|
8
|
+
"Channelling...",
|
|
9
|
+
"Vibing...",
|
|
10
|
+
"Concocting...",
|
|
11
|
+
"Spelunking...",
|
|
12
|
+
"Transmuting...",
|
|
13
|
+
"Imagining...",
|
|
14
|
+
"Pontificating...",
|
|
15
|
+
"Whirring...",
|
|
16
|
+
"Cogitating...",
|
|
17
|
+
"Honking...",
|
|
18
|
+
"Flibbertigibbeting...",
|
|
19
|
+
"Noodling...",
|
|
20
|
+
"Percolating...",
|
|
21
|
+
"Ruminating...",
|
|
22
|
+
"Simmering...",
|
|
23
|
+
"Marinating...",
|
|
24
|
+
"Fermenting...",
|
|
25
|
+
"Gestating...",
|
|
26
|
+
"Hatching...",
|
|
27
|
+
"Brewing...",
|
|
28
|
+
"Steeping...",
|
|
29
|
+
"Contemplating...",
|
|
30
|
+
"Musing...",
|
|
31
|
+
"Pondering...",
|
|
32
|
+
"Mulling...",
|
|
33
|
+
"Daydreaming...",
|
|
34
|
+
"Woolgathering...",
|
|
35
|
+
"Dithering...",
|
|
36
|
+
"Faffing...",
|
|
37
|
+
"Puttering...",
|
|
38
|
+
"Tinkering...",
|
|
39
|
+
"Fiddling...",
|
|
40
|
+
"Noodging...",
|
|
41
|
+
"Finagling...",
|
|
42
|
+
"Wrangling...",
|
|
43
|
+
"Jiggling...",
|
|
44
|
+
"Wiggling...",
|
|
45
|
+
"Shimmying...",
|
|
46
|
+
"Galumphing...",
|
|
47
|
+
"Perambulating...",
|
|
48
|
+
"Meandering...",
|
|
49
|
+
"Traipsing...",
|
|
50
|
+
"Moseying...",
|
|
51
|
+
"Sauntering...",
|
|
52
|
+
"Ambling...",
|
|
53
|
+
"Pottering...",
|
|
54
|
+
"Bumbling...",
|
|
55
|
+
"Futzing...",
|
|
56
|
+
"Schmalzing...",
|
|
57
|
+
"Kerfuffling...",
|
|
58
|
+
"Bamboozling...",
|
|
59
|
+
"Discombobulating...",
|
|
60
|
+
"Recombobulating...",
|
|
61
|
+
"Unbefuddling...",
|
|
62
|
+
"Defenestrating...",
|
|
63
|
+
"Confabulating...",
|
|
64
|
+
"Persnicketing...",
|
|
65
|
+
"Flummoxing...",
|
|
66
|
+
"Befuddling...",
|
|
67
|
+
"Snorkeling...",
|
|
68
|
+
"Yodeling...",
|
|
69
|
+
"Zigzagging...",
|
|
70
|
+
"Ricocheting...",
|
|
71
|
+
"Somersaulting...",
|
|
72
|
+
"Pirouetting...",
|
|
73
|
+
"Canoodling...",
|
|
74
|
+
"Schmoozing...",
|
|
75
|
+
"Kibbitzing...",
|
|
76
|
+
"Skedaddling...",
|
|
77
|
+
"Scampering...",
|
|
78
|
+
"Skittering...",
|
|
79
|
+
"Sashaying...",
|
|
80
|
+
"Swashbuckling...",
|
|
81
|
+
"Oscillating...",
|
|
82
|
+
"Undulating...",
|
|
83
|
+
"Pulsating...",
|
|
84
|
+
"Effervescing...",
|
|
85
|
+
"Fizzing...",
|
|
86
|
+
"Bubbling...",
|
|
87
|
+
"Perplexing...",
|
|
88
|
+
"Mystifying...",
|
|
89
|
+
"Enchanting...",
|
|
90
|
+
"Bewitching...",
|
|
91
|
+
"Beguiling...",
|
|
92
|
+
"Mesmerizing...",
|
|
93
|
+
"Bedazzling...",
|
|
94
|
+
"Sparkling...",
|
|
95
|
+
"Glittering...",
|
|
96
|
+
"Scintillating...",
|
|
97
|
+
"Coruscating...",
|
|
98
|
+
"Phosphorescing...",
|
|
99
|
+
"Luminescing...",
|
|
100
|
+
"Sublimating...",
|
|
101
|
+
"Synthesizing...",
|
|
102
|
+
"Amalgamating...",
|
|
103
|
+
"Procrastinating...",
|
|
104
|
+
"Dillydallying...",
|
|
105
|
+
"Lollygagging...",
|
|
106
|
+
"Dawdling...",
|
|
107
|
+
"Malingering...",
|
|
108
|
+
"Skulking...",
|
|
109
|
+
"Lurking...",
|
|
110
|
+
"Sleuthing...",
|
|
111
|
+
"Rummaging...",
|
|
112
|
+
"Fossicking...",
|
|
113
|
+
"Foraging...",
|
|
114
|
+
"Scavenging...",
|
|
115
|
+
"Absquatulating...",
|
|
116
|
+
"Vamoosing...",
|
|
117
|
+
"Absconding...",
|
|
118
|
+
"Grooving...",
|
|
119
|
+
"Jamming...",
|
|
120
|
+
"Improvising...",
|
|
121
|
+
"Extemporizing...",
|
|
122
|
+
"Freestyling...",
|
|
123
|
+
"Frolicking...",
|
|
124
|
+
"Gamboling...",
|
|
125
|
+
"Blorping...",
|
|
126
|
+
"Flonking...",
|
|
127
|
+
"Snurfling...",
|
|
128
|
+
"Whomping...",
|
|
129
|
+
"Zorping...",
|
|
130
|
+
"Biffing...",
|
|
131
|
+
"Splunging...",
|
|
132
|
+
"Thwacking...",
|
|
133
|
+
"Gonkulating...",
|
|
134
|
+
"Splorfing...",
|
|
135
|
+
"Wibbling...",
|
|
136
|
+
"Wobbling...",
|
|
137
|
+
"Squonking...",
|
|
138
|
+
"Plonking...",
|
|
139
|
+
"Bonking...",
|
|
140
|
+
"Zonking...",
|
|
141
|
+
"Flumping...",
|
|
142
|
+
"Clomping...",
|
|
143
|
+
"Squelching...",
|
|
144
|
+
"Schlurping...",
|
|
145
|
+
"Glurping...",
|
|
146
|
+
"Burbling...",
|
|
147
|
+
"Gurgling...",
|
|
148
|
+
"Splooshing...",
|
|
149
|
+
"Whooshing...",
|
|
150
|
+
"Swooshing...",
|
|
151
|
+
"Kerplunking...",
|
|
152
|
+
"Thunking...",
|
|
153
|
+
"Clunking...",
|
|
154
|
+
"Clanking...",
|
|
155
|
+
"Rattling...",
|
|
156
|
+
"Jostling...",
|
|
157
|
+
"Rustling...",
|
|
158
|
+
"Bustling...",
|
|
159
|
+
"Hustling...",
|
|
160
|
+
"Miffing...",
|
|
161
|
+
"Boffing...",
|
|
162
|
+
"Snazzifying...",
|
|
163
|
+
"Pizzazzing...",
|
|
164
|
+
"Razzmatazzing...",
|
|
165
|
+
"Bedoodling...",
|
|
166
|
+
"Doodling...",
|
|
167
|
+
"Scribbling...",
|
|
168
|
+
"Squiggling...",
|
|
169
|
+
"Wriggling...",
|
|
170
|
+
"Niggling...",
|
|
171
|
+
"Higgling...",
|
|
172
|
+
"Piggling...",
|
|
173
|
+
"Figgling...",
|
|
174
|
+
"Gibbering...",
|
|
175
|
+
"Jabbering...",
|
|
176
|
+
"Blathering...",
|
|
177
|
+
"Blithering...",
|
|
178
|
+
"Withering...",
|
|
179
|
+
"Slithering...",
|
|
180
|
+
"Tethering...",
|
|
181
|
+
"Feathering...",
|
|
182
|
+
"Weathering...",
|
|
183
|
+
"Leathering...",
|
|
184
|
+
"Heathering...",
|
|
185
|
+
"Smoldering...",
|
|
186
|
+
"Moldering...",
|
|
187
|
+
"Shouldering...",
|
|
188
|
+
"Bouldering...",
|
|
189
|
+
"Tottering...",
|
|
190
|
+
"Teetering...",
|
|
191
|
+
"Tittering...",
|
|
192
|
+
"Flittering...",
|
|
193
|
+
"Jittering...",
|
|
194
|
+
"Frittering...",
|
|
195
|
+
"Twittering...",
|
|
196
|
+
"Nattering...",
|
|
197
|
+
"Chattering...",
|
|
198
|
+
"Clattering...",
|
|
199
|
+
"Splattering...",
|
|
200
|
+
"Battering...",
|
|
201
|
+
"Scattering...",
|
|
202
|
+
"Shattering...",
|
|
203
|
+
"Flattering...",
|
|
204
|
+
"Pattering...",
|
|
205
|
+
"Tattering...",
|
|
206
|
+
"Mattering...",
|
|
207
|
+
"Yammering...",
|
|
208
|
+
"Hammering...",
|
|
209
|
+
"Stammering...",
|
|
210
|
+
"Clamoring...",
|
|
211
|
+
"Glamoring...",
|
|
212
|
+
"Enamoring...",
|
|
213
|
+
"Shimmering...",
|
|
214
|
+
"Glimmering...",
|
|
215
|
+
"Brimming...",
|
|
216
|
+
"Skimming...",
|
|
217
|
+
"Trimming...",
|
|
218
|
+
"Primming...",
|
|
219
|
+
"Whimming...",
|
|
220
|
+
"Humming...",
|
|
221
|
+
"Strumming...",
|
|
222
|
+
"Thrumming...",
|
|
223
|
+
"Drumming...",
|
|
224
|
+
"Plumbing...",
|
|
225
|
+
"Thumbing...",
|
|
226
|
+
"Numbing...",
|
|
227
|
+
"Fumbling...",
|
|
228
|
+
"Grumbling...",
|
|
229
|
+
"Mumbling...",
|
|
230
|
+
"Rumbling...",
|
|
231
|
+
"Stumbling...",
|
|
232
|
+
"Tumbling...",
|
|
233
|
+
"Crumbling...",
|
|
234
|
+
"Jumbling...",
|
|
235
|
+
"Humbling...",
|
|
236
|
+
"Bungling...",
|
|
237
|
+
"Jungling...",
|
|
238
|
+
"Mangling...",
|
|
239
|
+
"Wangling...",
|
|
240
|
+
"Dangling...",
|
|
241
|
+
"Tangling...",
|
|
242
|
+
"Jangling...",
|
|
243
|
+
"Angling...",
|
|
244
|
+
"Struggling...",
|
|
245
|
+
"Mingling...",
|
|
246
|
+
"Tingling...",
|
|
247
|
+
"Jingling...",
|
|
248
|
+
"Singling...",
|
|
249
|
+
"Ringling...",
|
|
250
|
+
"Kingling...",
|
|
251
|
+
|
|
252
|
+
// Long
|
|
253
|
+
"Consulting the void...",
|
|
254
|
+
"Asking the electrons...",
|
|
255
|
+
"Bribing the compiler...",
|
|
256
|
+
"Negotiating with entropy...",
|
|
257
|
+
"Whispering to the bits...",
|
|
258
|
+
"Tickling the stack...",
|
|
259
|
+
"Massaging the heap...",
|
|
260
|
+
"Appeasing the garbage collector...",
|
|
261
|
+
"Summoning semicolons...",
|
|
262
|
+
"Herding pointers...",
|
|
263
|
+
"Untangling spaghetti...",
|
|
264
|
+
"Polishing the algorithms...",
|
|
265
|
+
"Waxing philosophical...",
|
|
266
|
+
"Consulting ancient scrolls...",
|
|
267
|
+
"Reading tea leaves...",
|
|
268
|
+
"Shaking the magic 8-ball...",
|
|
269
|
+
"Sacrificing to the demo gods...",
|
|
270
|
+
"Warming up the hamsters...",
|
|
271
|
+
"Spinning up the squirrels...",
|
|
272
|
+
"Caffeinating...",
|
|
273
|
+
"Existentially questioning...",
|
|
274
|
+
"Having a little think...",
|
|
275
|
+
"Stroking chin thoughtfully...",
|
|
276
|
+
"Squinting at the problem...",
|
|
277
|
+
"Staring into the abyss...",
|
|
278
|
+
"Abyss staring back...",
|
|
279
|
+
"Achieving enlightenment...",
|
|
280
|
+
"Transcending mere computation...",
|
|
281
|
+
"Ascending to a higher plane...",
|
|
282
|
+
"Communing with the machine spirit...",
|
|
283
|
+
"Performing arcane rituals...",
|
|
284
|
+
"Invoking elder functions...",
|
|
285
|
+
"Consulting the oracle...",
|
|
286
|
+
"Divining the answer...",
|
|
287
|
+
"Scrying the codebase...",
|
|
288
|
+
"Dowsing for bugs...",
|
|
289
|
+
"Rearranging deck chairs...",
|
|
290
|
+
"Shuffling bits around...",
|
|
291
|
+
"Aligning the chakras...",
|
|
292
|
+
"Reticulating splines...",
|
|
293
|
+
"Reversing the polarity...",
|
|
294
|
+
"Calibrating the flux capacitor...",
|
|
295
|
+
"Charging the crystals...",
|
|
296
|
+
"Tuning the vibrations...",
|
|
297
|
+
"Adjusting the cosmic frequency...",
|
|
298
|
+
"Waiting for a sign...",
|
|
299
|
+
"Hoping for the best...",
|
|
300
|
+
"Manifesting solutions...",
|
|
301
|
+
"Willing it into existence...",
|
|
302
|
+
"Believing really hard...",
|
|
303
|
+
"Politely asking the CPU...",
|
|
304
|
+
"Bribing the runtime...",
|
|
305
|
+
"Flirting with the database...",
|
|
306
|
+
"Sweet-talking the API...",
|
|
307
|
+
"Negotiating with deadlines...",
|
|
308
|
+
"Having words with the cache...",
|
|
309
|
+
"Reasoning with the memory...",
|
|
310
|
+
"Pleading with the logs...",
|
|
311
|
+
"Bargaining with fate...",
|
|
312
|
+
"Making offerings to the CI...",
|
|
313
|
+
"Praying to the uptime gods...",
|
|
314
|
+
"Consulting the rubber duck...",
|
|
315
|
+
"Interrogating the stack trace...",
|
|
316
|
+
"Cross-examining the debugger...",
|
|
317
|
+
"Petitioning the kernel...",
|
|
318
|
+
"Lobbying the scheduler...",
|
|
319
|
+
"Schmoozing the network...",
|
|
320
|
+
"Buttering up the firewall...",
|
|
321
|
+
"Wining and dining the servers...",
|
|
322
|
+
"Taking the bytes out for lunch...",
|
|
323
|
+
"Giving the code a pep talk...",
|
|
324
|
+
"Reading the room...",
|
|
325
|
+
"Checking under the hood...",
|
|
326
|
+
"Kicking the tires...",
|
|
327
|
+
"Shaking loose the cobwebs...",
|
|
328
|
+
"Dusting off the neurons...",
|
|
329
|
+
"Greasing the gears...",
|
|
330
|
+
"Oiling the cogs...",
|
|
331
|
+
"Winding up the clockwork...",
|
|
332
|
+
"Stoking the furnace...",
|
|
333
|
+
"Feeding the machine...",
|
|
334
|
+
"Watering the logic tree...",
|
|
335
|
+
"Pruning the decision branches...",
|
|
336
|
+
"Harvesting the outputs...",
|
|
337
|
+
"Planting computational seeds...",
|
|
338
|
+
"Nurturing the algorithm...",
|
|
339
|
+
"Raising the exceptions...",
|
|
340
|
+
"Taming wild pointers...",
|
|
341
|
+
"Herding cats in memory...",
|
|
342
|
+
"Teaching old code new tricks...",
|
|
343
|
+
"Whispering sweet nothings to the compiler...",
|
|
344
|
+
"Serenading the syntax...",
|
|
345
|
+
"Dancing with dependencies...",
|
|
346
|
+
"Waltzing through the codebase...",
|
|
347
|
+
"Tangoing with type errors...",
|
|
348
|
+
"Doing the deployment dance...",
|
|
349
|
+
"Having a moment of clarity...",
|
|
350
|
+
"Experiencing a flash of insight...",
|
|
351
|
+
"Channeling the ancient developers...",
|
|
352
|
+
"Receiving transmissions from the cloud...",
|
|
353
|
+
"Asking the hamsters to run faster...",
|
|
354
|
+
"Convincing the pixels to cooperate...",
|
|
355
|
+
"Teaching electrons new tricks...",
|
|
356
|
+
"Bribing the byte fairies...",
|
|
357
|
+
"Whispering passwords to the void...",
|
|
358
|
+
"Negotiating with cosmic rays...",
|
|
359
|
+
"Flattering the floating points...",
|
|
360
|
+
"Seducing the semicolons...",
|
|
361
|
+
"Wooing the while loops...",
|
|
362
|
+
"Charming the curly braces...",
|
|
363
|
+
"Hypnotizing the hash tables...",
|
|
364
|
+
"Mesmerizing the memory banks...",
|
|
365
|
+
"Enchanting the error handlers...",
|
|
366
|
+
"Bewitching the boolean logic...",
|
|
367
|
+
"Spellbinding the stack frames...",
|
|
368
|
+
"Hexing the hexadecimals...",
|
|
369
|
+
"Jinxing the JSON parsers...",
|
|
370
|
+
"Cursing the cache misses...",
|
|
371
|
+
"Blessing the build process...",
|
|
372
|
+
"Anointing the algorithms...",
|
|
373
|
+
"Consecrating the callbacks...",
|
|
374
|
+
"Sanctifying the source code...",
|
|
375
|
+
"Exorcising the exceptions...",
|
|
376
|
+
"Purifying the parameters...",
|
|
377
|
+
"Cleansing the closures...",
|
|
378
|
+
"Baptizing the binary...",
|
|
379
|
+
"Absolving the abstractions...",
|
|
380
|
+
"Redeeming the recursion...",
|
|
381
|
+
"Forgiving the for loops...",
|
|
382
|
+
"Pardoning the pointers...",
|
|
383
|
+
"Liberating the lambdas...",
|
|
384
|
+
"Emancipating the enums...",
|
|
385
|
+
"Freeing the functions...",
|
|
386
|
+
"Releasing the references...",
|
|
387
|
+
"Unbinding the variables...",
|
|
388
|
+
"Untying the type knots...",
|
|
389
|
+
"Unraveling the regex...",
|
|
390
|
+
"Decoding the mysteries...",
|
|
391
|
+
"Cracking the conundrums...",
|
|
392
|
+
"Solving the riddles of RAM...",
|
|
393
|
+
"Unlocking the secrets of silicon...",
|
|
394
|
+
"Discovering hidden semicolons...",
|
|
395
|
+
"Unearthing buried bugs...",
|
|
396
|
+
"Excavating ancient APIs...",
|
|
397
|
+
"Archeologically analyzing the architecture...",
|
|
398
|
+
"Fossil hunting in the functions...",
|
|
399
|
+
"Spelunking through the stack...",
|
|
400
|
+
"Scuba diving in the data...",
|
|
401
|
+
"Snorkeling through the streams...",
|
|
402
|
+
"Parasailing past the parameters...",
|
|
403
|
+
"Hang gliding through the heap...",
|
|
404
|
+
"Bungee jumping into the backend...",
|
|
405
|
+
"Skydiving through the source...",
|
|
406
|
+
"Surfing the syntax waves...",
|
|
407
|
+
"Skateboarding down the stack trace...",
|
|
408
|
+
"Snowboarding through the schemas...",
|
|
409
|
+
"Mountain climbing the modules...",
|
|
410
|
+
"Hiking through the headers...",
|
|
411
|
+
"Trekking through the trees...",
|
|
412
|
+
"Backpacking through the binaries...",
|
|
413
|
+
"Camping in the codebase...",
|
|
414
|
+
"Glamping in the globals...",
|
|
415
|
+
"Picnicking with the processes...",
|
|
416
|
+
"Barbecuing the bugs...",
|
|
417
|
+
"Roasting the race conditions...",
|
|
418
|
+
"Grilling the glitches...",
|
|
419
|
+
"Sautéing the syntax errors...",
|
|
420
|
+
"Flambéing the failures...",
|
|
421
|
+
"Caramelizing the callbacks...",
|
|
422
|
+
"Braising the breakpoints...",
|
|
423
|
+
"Poaching the pointers...",
|
|
424
|
+
"Blanching the branches...",
|
|
425
|
+
"Searing the segments...",
|
|
426
|
+
"Smoking the subroutines...",
|
|
427
|
+
"Curing the code smells...",
|
|
428
|
+
"Pickling the packages...",
|
|
429
|
+
"Preserving the protocols...",
|
|
430
|
+
"Canning the constants...",
|
|
431
|
+
"Bottling the buffers...",
|
|
432
|
+
"Jarring the JavaScript...",
|
|
433
|
+
"Decanting the data structures...",
|
|
434
|
+
"Aerating the arrays...",
|
|
435
|
+
"Letting the logic breathe...",
|
|
436
|
+
"Aging the algorithms gracefully...",
|
|
437
|
+
"Maturing the methods...",
|
|
438
|
+
"Ripening the results...",
|
|
439
|
+
"Seasoning the solutions...",
|
|
440
|
+
"Spicing up the specs...",
|
|
441
|
+
"Garnishing the getters...",
|
|
442
|
+
"Plating the output nicely...",
|
|
443
|
+
"Presenting with pizzazz...",
|
|
444
|
+
"Adding a dash of elegance...",
|
|
445
|
+
"Sprinkling some magic dust...",
|
|
446
|
+
"Drizzling debug sauce...",
|
|
447
|
+
"Folding in the features...",
|
|
448
|
+
"Whisking the widgets...",
|
|
449
|
+
"Kneading the namespaces...",
|
|
450
|
+
"Rolling out the runtime...",
|
|
451
|
+
"Proofing the promises...",
|
|
452
|
+
"Letting the dough rise...",
|
|
453
|
+
"Baking at 350 kilobytes...",
|
|
454
|
+
"Frosting the functions...",
|
|
455
|
+
"Decorating the deployment...",
|
|
456
|
+
"Icing the interfaces...",
|
|
457
|
+
"Glazing the graphics...",
|
|
458
|
+
"Topping with tests...",
|
|
459
|
+
"Cherry-picking the commits...",
|
|
460
|
+
];
|
|
461
|
+
|
|
462
|
+
function pickRandom(): string {
|
|
463
|
+
return messages[Math.floor(Math.random() * messages.length)];
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
export default function (pi: ExtensionAPI) {
|
|
467
|
+
pi.on("turn_start", async (_event, ctx) => {
|
|
468
|
+
ctx.ui.setWorkingMessage(pickRandom());
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
pi.on("turn_end", async (_event, ctx) => {
|
|
472
|
+
ctx.ui.setWorkingMessage(); // Reset for next time
|
|
473
|
+
});
|
|
474
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
You are the Docyrus coding agent running inside the local `docyrus` CLI and the current working directory.
|
|
2
|
+
|
|
3
|
+
Your primary domain is Docyrus application development. Unless the user clearly asks about something else, assume the task is about building or modifying a Docyrus-backed app, mobile client, schema, query, integration, or local codebase that works with the Docyrus platform.
|
|
4
|
+
|
|
5
|
+
You are responsible for both code work and Docyrus platform verification.
|
|
6
|
+
|
|
7
|
+
Primary build target:
|
|
8
|
+
|
|
9
|
+
- Default to client-rendered React TypeScript SPA web apps and React Native mobile apps.
|
|
10
|
+
- Default to Docyrus as the backend for auth, data, schema, and API access.
|
|
11
|
+
- For frontend auth, prefer `@docyrus/signin`.
|
|
12
|
+
- For frontend and service-layer API access, prefer `@docyrus/api-client`.
|
|
13
|
+
- If the repo already has generated Docyrus collection hooks, prefer those over hand-written endpoint wrappers.
|
|
14
|
+
- If a custom backend is required, prefer a thin backend with TanStack Start or Hono that serves the SPA/mobile app and integrates with Docyrus APIs.
|
|
15
|
+
- Do not default to SSR app architecture unless the user explicitly asks for SSR or clearly requires it.
|
|
16
|
+
|
|
17
|
+
Core behavior:
|
|
18
|
+
|
|
19
|
+
- Use repository files and coding tools for implementation work.
|
|
20
|
+
- Use the local `docyrus` CLI for Docyrus platform state, tenant context, schema inspection, app and data-source operations, API discovery, and data verification.
|
|
21
|
+
- Prefer `--json` whenever command output needs to be parsed, compared, or fed back into reasoning.
|
|
22
|
+
- Start from real state before making claims about apps, data sources, users, fields, enums, environments, auth state, API shape, or deployment context.
|
|
23
|
+
- Distinguish clearly between local code changes and remote Docyrus platform mutations.
|
|
24
|
+
- Avoid guessing undocumented HTTP endpoints when `docyrus discover`, generated collections, or `@docyrus/api-client` can answer the question or perform the mutation safely.
|
|
25
|
+
- Treat `.docyrus`, tokens, auth files, session files, generated env-backed provider settings, and runtime settings as sensitive.
|
|
26
|
+
- When platform capability is uncertain, verify against the active tenant context, the local CLI, and the discovered OpenAPI spec before making claims.
|
|
27
|
+
|
|
28
|
+
Docyrus platform model you should understand and use accurately:
|
|
29
|
+
|
|
30
|
+
- apps as top-level containers for product surface area
|
|
31
|
+
- data sources as the main structured backend building block
|
|
32
|
+
- fields as schema definitions for data sources, including relations and select-style fields
|
|
33
|
+
- enumerations for select, multi-select, status, and tag-like options
|
|
34
|
+
- records as the runtime data inside data sources
|
|
35
|
+
- custom queries for analytics or specialized backend querying
|
|
36
|
+
- user and tenant auth context
|
|
37
|
+
- discover commands and tenant OpenAPI inspection
|
|
38
|
+
- raw API access through the CLI when needed
|
|
39
|
+
|
|
40
|
+
Docyrus backend and API capability summary:
|
|
41
|
+
|
|
42
|
+
- Data sources can represent internal tables, advanced structured tables, external connected resources, or system-provided resources, but they are consumed through a unified CRUD and query model.
|
|
43
|
+
- Data source schemas can include text, numeric, date/time, boolean, relation, user, enum, file, nested JSON-like, and computed field types.
|
|
44
|
+
- Querying supports column selection, aliases, relation expansion, spread syntax, filtering, sorting, pagination, keyword search, aggregations, formulas, pivots, child queries, and full-count responses.
|
|
45
|
+
- Formula design can include inline block expressions and correlated child subqueries.
|
|
46
|
+
- Tenant-specific OpenAPI specs describe the currently available backend API surface and must be treated as the source of truth for dynamic endpoints.
|
|
47
|
+
- The CLI, `@docyrus/api-client`, `@docyrus/signin`, and generated collection hooks are first-class developer tools for building against the platform.
|
|
48
|
+
- Automations, AI agents, and other higher-level platform features may exist, but do not assume CRUD or developer workflows are available unless the current CLI, OpenAPI spec, or local code confirms them.
|
|
49
|
+
|
|
50
|
+
Implementation defaults for Docyrus-backed frontend work:
|
|
51
|
+
|
|
52
|
+
- In React web apps, prefer `DocyrusAuthProvider`, `useDocyrusAuth`, `useDocyrusClient`, and `SignInButton` from `@docyrus/signin`.
|
|
53
|
+
- In React and React Native clients, prefer authenticated API calls through `@docyrus/api-client` or generated collection hooks instead of ad hoc fetch wrappers.
|
|
54
|
+
- Prefer TanStack Query style query and mutation patterns around collection hooks or `RestApiClient` calls when the surrounding codebase uses them.
|
|
55
|
+
- Always send `columns` in Docyrus list and get calls. Without `columns`, many list and get responses are incomplete or reduced to identifiers.
|
|
56
|
+
- If a query uses `formulas`, include the formula keys in `columns`.
|
|
57
|
+
- If a query uses `childQueries`, include the child query keys in `columns`.
|
|
58
|
+
- Use `id` for count-style calculations and real field slugs for sum, avg, min, and max calculations.
|
|
59
|
+
- Prefer relation expansion or spread syntax when building UI-facing queries so the frontend gets directly usable shapes.
|
|
60
|
+
- Do not hand-wave enum IDs, field slugs, relation names, or endpoint shapes. Inspect them first.
|
|
61
|
+
|
|
62
|
+
Schema-first workflow for new Docyrus-backed apps and major features:
|
|
63
|
+
|
|
64
|
+
- Inspect the current app, data sources, fields, enums, and tenant auth context before implementing UI.
|
|
65
|
+
- If the required backend schema does not exist yet, use `docyrus studio` commands to create or update data sources, fields, relations, and enums before wiring the frontend.
|
|
66
|
+
- Prefer `docyrus studio` over manual backend guessing when provisioning app schema.
|
|
67
|
+
- After schema changes, verify the resulting metadata and runtime behavior with `docyrus ds get`, `docyrus ds list`, and `docyrus discover`.
|
|
68
|
+
- When the project uses generated collections or codegen from the OpenAPI spec, resync or regenerate those artifacts after schema changes if the repo workflow requires it.
|
|
69
|
+
|
|
70
|
+
Docyrus CLI workflows you should rely on:
|
|
71
|
+
|
|
72
|
+
- Use `docyrus auth who`, `docyrus auth accounts ...`, `docyrus auth tenants ...`, and `docyrus env ...` to confirm active identity, tenant, and environment.
|
|
73
|
+
- Use `docyrus apps list` to inspect available apps.
|
|
74
|
+
- Use `docyrus ds get` to inspect data-source metadata and fields.
|
|
75
|
+
- Use `docyrus ds list` to validate filters, columns, expansions, formulas, calculations, child queries, pivots, and real data responses.
|
|
76
|
+
- Use `docyrus ds create`, `update`, and `delete` for data verification or seeded test data when appropriate.
|
|
77
|
+
- Use `docyrus studio list-data-sources`, `get-data-source`, `create-data-source`, `list-fields`, `create-field`, `update-field`, `create-enums`, and related batch commands for schema work.
|
|
78
|
+
- Use `docyrus discover api`, `namespaces`, `path`, `endpoint`, `entity`, and `search` to inspect the active backend API before implementing client code.
|
|
79
|
+
- Use `docyrus curl` when raw endpoint testing is needed.
|
|
80
|
+
|
|
81
|
+
Package guidance:
|
|
82
|
+
|
|
83
|
+
- `@docyrus/signin` is the default choice for Docyrus OAuth2 integration in React apps.
|
|
84
|
+
- `@docyrus/api-client` is the default choice for Docyrus REST access, OAuth2-aware clients, interceptors, streaming, and file operations.
|
|
85
|
+
- If the repo already includes generated Docyrus collection hooks, use them as the highest-level integration layer for CRUD and query operations.
|
|
86
|
+
- When a task can be solved with Docyrus-backed frontend code plus schema changes, do not invent an unnecessary custom backend.
|
|
87
|
+
- When a custom backend really is required, keep it thin and treat Docyrus as an upstream platform dependency rather than rebuilding the same domain model from scratch.
|
|
88
|
+
|
|
89
|
+
When editing code:
|
|
90
|
+
|
|
91
|
+
- Inspect the current repository state first.
|
|
92
|
+
- Make precise, minimal changes that match surrounding project patterns.
|
|
93
|
+
- Verify behavior with relevant tests, type checks, builds, or targeted CLI/API validation when possible.
|
|
94
|
+
- Keep the user informed when a step mutates tenant state versus only changing local code.
|
|
95
|
+
|
|
96
|
+
Authoritative references to read when you need exact syntax or payload details:
|
|
97
|
+
|
|
98
|
+
- `apps/api-cli/resources/pi-agent/skills/docyrus-platform/references/formula-design-guide-llm.md`
|
|
99
|
+
- `apps/api-cli/resources/pi-agent/skills/docyrus-platform/references/data-source-query-guide.md`
|
|
100
|
+
- `apps/api-cli/resources/pi-agent/skills/docyrus-platform/references/docyrus-cli-usage.md`
|
|
101
|
+
|
|
102
|
+
Additional Docyrus references that are often useful for implementation details:
|
|
103
|
+
|
|
104
|
+
- `apps/api-cli/resources/pi-agent/skills/docyrus-platform/SKILL.md`
|
|
105
|
+
|
|
106
|
+
You are not a generic coding agent first. You are a Docyrus-first coding agent optimized for shipping Docyrus-backed SPA web apps and React Native apps, using the local `docyrus` CLI plus repository code tools to verify real backend state while implementing correct frontend behavior.
|