@astrofoundry/pi-astro 0.2.12 → 0.3.1
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/extensions/astro-agents/agents/code-reviewer.md +2 -2
- package/extensions/astro-agents/agents/google-tech-lead.md +2 -2
- package/extensions/astro-agents/agents/spec-writer.md +2 -2
- package/extensions/astro-agents/agents/tester-api.md +2 -2
- package/extensions/astro-agents/agents/tester-ui.md +2 -2
- package/extensions/astro-agents/agents/ui-architect.md +2 -2
- package/extensions/astro-agents/agents/ui-design-system.md +2 -2
- package/extensions/astro-agents/agents/ui-frontend-developer.md +2 -2
- package/extensions/astro-agents/discovery.ts +8 -0
- package/extensions/astro-agents/spawn.ts +4 -0
- package/extensions/grimoire/index.ts +91 -0
- package/package.json +1 -1
- package/skills/playwright-cli/SKILL.md +278 -0
- package/skills/playwright-cli/references/request-mocking.md +87 -0
- package/skills/playwright-cli/references/running-code.md +232 -0
- package/skills/playwright-cli/references/session-management.md +169 -0
- package/skills/playwright-cli/references/storage-state.md +275 -0
- package/skills/playwright-cli/references/test-generation.md +88 -0
- package/skills/playwright-cli/references/tracing.md +139 -0
- package/skills/playwright-cli/references/video-recording.md +43 -0
- package/skills/postman-cli/SKILL.md +339 -0
- package/skills/postman-cli/references/environments.md +92 -0
- package/skills/postman-cli/references/reporters.md +94 -0
- package/skills/postman-cli/references/request-scripting.md +69 -0
- package/skills/raycast-script-creator/SKILL.md +132 -0
- package/themes/astro.json +76 -0
- package/skills/.gitkeep +0 -0
- package/themes/.gitkeep +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Reporters and Report Customization
|
|
2
|
+
|
|
3
|
+
The Postman CLI has built-in reporters to generate collection run reports. Four reporters are available: CLI, JSON, JUnit, and HTML.
|
|
4
|
+
|
|
5
|
+
**Important:** JSON, JUnit, and HTML reporters only work with v2 format (JSON) collections. v3 format (YAML) collections only support the CLI reporter.
|
|
6
|
+
|
|
7
|
+
## Available reporters
|
|
8
|
+
|
|
9
|
+
### CLI (default)
|
|
10
|
+
|
|
11
|
+
Displays a report in the terminal. Always shown unless `--silent` is used.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
postman collection run ./collection -r cli
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### JSON
|
|
18
|
+
|
|
19
|
+
Creates a JSON file with full run details including request/response data.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
postman collection run ./collection -r json
|
|
23
|
+
postman collection run ./collection -r json --reporter-json-export ./reports/result.json
|
|
24
|
+
|
|
25
|
+
# use Newman-compatible JSON structure
|
|
26
|
+
postman collection run ./collection -r json --reporter-json-structure newman
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### JUnit
|
|
30
|
+
|
|
31
|
+
Creates an XML file compatible with CI/CD tools that consume JUnit format.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
postman collection run ./collection -r junit
|
|
35
|
+
postman collection run ./collection -r junit --reporter-junit-export ./reports/result.xml
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### HTML
|
|
39
|
+
|
|
40
|
+
Creates an interactive HTML report. You can filter iterations by test failures or errors.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
postman collection run ./collection -r html
|
|
44
|
+
postman collection run ./collection -r html --reporter-html-export ./reports/result.html
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Multiple reporters
|
|
48
|
+
|
|
49
|
+
Combine reporters with comma-separated list:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
postman collection run ./collection -r cli,json,junit,html
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Custom export paths
|
|
56
|
+
|
|
57
|
+
By default, reports are saved to `./postman-cli-reports/` with filenames like `collection-name-yyyy-mm-dd-hh-mm-ss`. Override with:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
--reporter-json-export <path>
|
|
61
|
+
--reporter-junit-export <path>
|
|
62
|
+
--reporter-html-export <path>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
If the path is an existing directory, the report file is saved inside it. If the directory does not exist, it is created automatically.
|
|
66
|
+
|
|
67
|
+
## Omitting sensitive data
|
|
68
|
+
|
|
69
|
+
Remove request/response bodies and headers from reports:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# omit request bodies
|
|
73
|
+
--reporter-json-omitRequestBodies
|
|
74
|
+
--reporter-html-omitRequestBodies
|
|
75
|
+
|
|
76
|
+
# omit response bodies
|
|
77
|
+
--reporter-json-omitResponseBodies
|
|
78
|
+
--reporter-html-omitResponseBodies
|
|
79
|
+
|
|
80
|
+
# omit all headers
|
|
81
|
+
--reporter-json-omitHeaders
|
|
82
|
+
--reporter-html-omitHeaders
|
|
83
|
+
|
|
84
|
+
# omit everything (headers + bodies)
|
|
85
|
+
--reporter-json-omitAllHeadersAndBody
|
|
86
|
+
--reporter-html-omitAllHeadersAndBody
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## CI/CD usage
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# generate JUnit report for CI consumption, fail on test errors
|
|
93
|
+
postman collection run ./collection -r junit --reporter-junit-export ./test-results/postman.xml --bail
|
|
94
|
+
```
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Request Scripting and Chaining
|
|
2
|
+
|
|
3
|
+
The `postman request` command supports pre-request and post-response scripts using the Postman scripting sandbox (pm.* API).
|
|
4
|
+
|
|
5
|
+
## Post-response scripts
|
|
6
|
+
|
|
7
|
+
Use `--script-post-request` to run JavaScript after receiving the response:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# validate response
|
|
11
|
+
postman request https://api.example.com/health \
|
|
12
|
+
--script-post-request "pm.test('Health check', function() { pm.expect(pm.response.json().status).to.equal('healthy'); });"
|
|
13
|
+
|
|
14
|
+
# extract and log data
|
|
15
|
+
postman request POST https://api.example.com/login \
|
|
16
|
+
--body '{"user":"admin","pass":"secret"}' \
|
|
17
|
+
--script-post-request "const token = pm.response.json().token; console.log('Token:', token);"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Chaining requests
|
|
21
|
+
|
|
22
|
+
Use shell command substitution with `--response-only` to chain requests:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# get a token, then use it in the next request
|
|
26
|
+
TOKEN=$(postman request POST https://api.example.com/login \
|
|
27
|
+
--body '{"username":"admin","password":"pass"}' \
|
|
28
|
+
--response-only | jq -r '.token')
|
|
29
|
+
|
|
30
|
+
postman request https://api.example.com/protected \
|
|
31
|
+
--auth-bearer-token "$TOKEN"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Collection scripts
|
|
35
|
+
|
|
36
|
+
Collection files (.yaml or .json) can include scripts at the collection, folder, and request levels:
|
|
37
|
+
|
|
38
|
+
```yaml
|
|
39
|
+
# in a request YAML file
|
|
40
|
+
scripts:
|
|
41
|
+
- type: afterResponse
|
|
42
|
+
code: |-
|
|
43
|
+
pm.test('Status 200', () => pm.response.to.have.status(200));
|
|
44
|
+
const res = pm.response.json();
|
|
45
|
+
pm.environment.set('_odoo_order_id', res);
|
|
46
|
+
language: text/javascript
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Script-managed variables (prefixed with `_`) are set during collection runs and chained between requests using `pm.environment.set()` and `{{variable}}` syntax.
|
|
50
|
+
|
|
51
|
+
## Available pm.* API in scripts
|
|
52
|
+
|
|
53
|
+
- `pm.response.json()` — parsed JSON response body
|
|
54
|
+
- `pm.response.to.have.status(code)` — assert status code
|
|
55
|
+
- `pm.expect(value)` — Chai BDD assertion
|
|
56
|
+
- `pm.environment.set(key, value)` — set environment variable for subsequent requests
|
|
57
|
+
- `pm.environment.get(key)` — get environment variable
|
|
58
|
+
- `pm.globals.set(key, value)` — set global variable
|
|
59
|
+
- `pm.globals.get(key)` — get global variable
|
|
60
|
+
- `console.log(...)` — log to terminal output
|
|
61
|
+
|
|
62
|
+
## Exit codes from tests
|
|
63
|
+
|
|
64
|
+
When scripts contain `pm.test()` assertions, the exit code equals the number of failed tests. This makes it suitable for CI/CD pipelines:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
postman collection run ./collection --bail --failure
|
|
68
|
+
echo "Exit code: $?"
|
|
69
|
+
```
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: raycast-script-creator
|
|
3
|
+
description: Create and install a Raycast script command in /Users/astronaute/.config/raycast/script-commands, then register it with chezmoi after the user confirms it works in Raycast. Trigger whenever the user asks to make, add, build, or scaffold a Raycast script, Raycast command, Raycast shortcut, or any shell/zsh command they want to launch from Raycast — even if they don't use the word "script". Use this for ANY request about automating something through Raycast from the keyboard.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Raycast Script Creator
|
|
7
|
+
|
|
8
|
+
Create a Raycast script command in zsh, drop it in the user's script-commands folder, let the user confirm it works in Raycast, then track it with `chezmoi add`.
|
|
9
|
+
|
|
10
|
+
## Defaults
|
|
11
|
+
|
|
12
|
+
- **Language**: `zsh` (shebang `#!/usr/bin/env zsh`). Only switch if the user explicitly asks.
|
|
13
|
+
- **Location**: `/Users/astronaute/.config/raycast/script-commands/` (flat, no subfolders).
|
|
14
|
+
- **Filename**: kebab-case of the title + extension matching the language (`.sh` for zsh/bash, `.py` for python, `.applescript` for AppleScript, `.js` for node…).
|
|
15
|
+
- **Author**: `astronaute`.
|
|
16
|
+
- **Icon**: `🤖` unless overridden.
|
|
17
|
+
- **authorURL**: omit.
|
|
18
|
+
|
|
19
|
+
## Workflow
|
|
20
|
+
|
|
21
|
+
### 1. Gather intent
|
|
22
|
+
|
|
23
|
+
From the user prompt, decide:
|
|
24
|
+
- **Behavior** — what the script does.
|
|
25
|
+
- **Title** — human-readable, Apple-Style-Guide-ish (`Toggle Hidden Files`, `Open Today's Journal`).
|
|
26
|
+
- **Mode** — `silent` (fire-and-forget), `compact` (short result line), `fullOutput` (long output window), `inline` (live in root search, needs `refreshTime`).
|
|
27
|
+
- **Arguments** — up to 3 positional args, each with `name`, `placeholder`, optional `optional`/`secure`.
|
|
28
|
+
- **needsConfirmation** — true for destructive commands.
|
|
29
|
+
|
|
30
|
+
If anything is ambiguous, ask ONE concise question with a recommended default — never ask blind.
|
|
31
|
+
|
|
32
|
+
### 2. Verify metadata spec via grimoire
|
|
33
|
+
|
|
34
|
+
Before writing, confirm the current Raycast metadata keys. Do not rely on memory:
|
|
35
|
+
|
|
36
|
+
grimoire search "script command metadata headers" --source raycast-script-commands --top 3
|
|
37
|
+
|
|
38
|
+
Run follow-up searches for edge cases (arguments, icons, refreshTime, packageName).
|
|
39
|
+
|
|
40
|
+
### 3. Write the script
|
|
41
|
+
|
|
42
|
+
Use the **Write** tool (MCP file-writing is disallowed in this project).
|
|
43
|
+
|
|
44
|
+
Template — **follow the exact section structure below**. Raycast's own template (`templates/script-command.template.sh` in `raycast/script-commands`) groups metadata into three commented sections. Missing `packageName` or skipping these section headers has caused scripts not to appear in Raycast root search even when the required keys are all present.
|
|
45
|
+
|
|
46
|
+
#!/usr/bin/env zsh
|
|
47
|
+
|
|
48
|
+
# Required parameters:
|
|
49
|
+
# @raycast.schemaVersion 1
|
|
50
|
+
# @raycast.title <Title>
|
|
51
|
+
# @raycast.mode <mode>
|
|
52
|
+
# @raycast.packageName <Package>
|
|
53
|
+
|
|
54
|
+
# Optional parameters:
|
|
55
|
+
# @raycast.icon 🤖
|
|
56
|
+
# @raycast.argument1 { "type": "text", "placeholder": "..." }
|
|
57
|
+
# @raycast.currentDirectoryPath ~ # only if needed
|
|
58
|
+
# @raycast.needsConfirmation true # only if true
|
|
59
|
+
|
|
60
|
+
# Documentation:
|
|
61
|
+
# @raycast.description <one-sentence description>
|
|
62
|
+
# @raycast.author astronaute
|
|
63
|
+
|
|
64
|
+
set -euo pipefail
|
|
65
|
+
|
|
66
|
+
<script body>
|
|
67
|
+
|
|
68
|
+
Rules:
|
|
69
|
+
- **Always include `@raycast.packageName`** — e.g. `Security`, `System`, `Developer`, `Network`. It's the root-search subtitle and empirically required for the command to be discovered reliably.
|
|
70
|
+
- **Keep the three section header comments** (`# Required parameters:`, `# Optional parameters:`, `# Documentation:`) — they match the official template and the working scripts already in the folder.
|
|
71
|
+
- **Keep the argument `placeholder` simple text**: no parentheses, no quotes, no JSON-breaking characters. `"prefix"` is fine; `"prefix (e.g. foo)"` is risky.
|
|
72
|
+
- `set -euo pipefail` on every zsh/bash script — fail fast aligns with the user's anti-defensive-programming philosophy.
|
|
73
|
+
- Double quotes around every string literal (project Rule 12).
|
|
74
|
+
- No useless comments (project Rule 5).
|
|
75
|
+
- Blank line separating metadata block from script body; Raycast needs a contiguous comment block at the top.
|
|
76
|
+
|
|
77
|
+
### 4. Make it executable
|
|
78
|
+
|
|
79
|
+
chmod +x /Users/astronaute/.config/raycast/script-commands/<filename>
|
|
80
|
+
|
|
81
|
+
### 5. Ask the user to test
|
|
82
|
+
|
|
83
|
+
Say exactly:
|
|
84
|
+
|
|
85
|
+
> Open Raycast, search for **"<Title>"**, run it, and confirm it works as expected. Reply `ok` to track it with chezmoi, or describe the issue.
|
|
86
|
+
|
|
87
|
+
Wait. Do **not** run `chezmoi add` before the user confirms.
|
|
88
|
+
|
|
89
|
+
### 6. Track with chezmoi
|
|
90
|
+
|
|
91
|
+
On confirmation:
|
|
92
|
+
|
|
93
|
+
chezmoi add /Users/astronaute/.config/raycast/script-commands/<filename>
|
|
94
|
+
|
|
95
|
+
Surface any chezmoi error verbatim — no silent retries. Do **not** run `chezmoi apply`.
|
|
96
|
+
|
|
97
|
+
## Output modes — quick reference
|
|
98
|
+
|
|
99
|
+
| Mode | Use when |
|
|
100
|
+
|------|----------|
|
|
101
|
+
| `silent` | Side-effect commands (toggle, copy, open). HUD only. |
|
|
102
|
+
| `compact` | Short success/error message or one-liner result. |
|
|
103
|
+
| `fullOutput` | Long / multi-line output (logs, lists). |
|
|
104
|
+
| `inline` | Live result in root search (system info). Requires `refreshTime`. |
|
|
105
|
+
|
|
106
|
+
## Arguments — quick reference
|
|
107
|
+
|
|
108
|
+
# @raycast.argument1 { "type": "text", "placeholder": "name" }
|
|
109
|
+
# @raycast.argument2 { "type": "dropdown", "placeholder": "env", "data": [{ "title": "Prod", "value": "prod" }] }
|
|
110
|
+
|
|
111
|
+
Positional inside the script: `$1`, `$2`, `$3`.
|
|
112
|
+
|
|
113
|
+
## Example
|
|
114
|
+
|
|
115
|
+
User: *"Create a Raycast script to copy my public IP to the clipboard."*
|
|
116
|
+
|
|
117
|
+
1. Title `Copy Public IP`, mode `silent`, icon `🌐`, no args.
|
|
118
|
+
2. Confirm any uncertain fields with the user.
|
|
119
|
+
3. `grimoire search "script command metadata headers" --source raycast-script-commands`.
|
|
120
|
+
4. Write `/Users/astronaute/.config/raycast/script-commands/copy-public-ip.sh`.
|
|
121
|
+
5. `chmod +x`.
|
|
122
|
+
6. Ask user to test in Raycast.
|
|
123
|
+
7. On `ok`, `chezmoi add <path>`.
|
|
124
|
+
|
|
125
|
+
## Avoid
|
|
126
|
+
|
|
127
|
+
- Writing via MCP tools — use Write.
|
|
128
|
+
- Env-var fallbacks unless user asks (project Rule 9).
|
|
129
|
+
- Disabling shell errors (`set +e`) without confirmation.
|
|
130
|
+
- Running `chezmoi apply` — only `add`.
|
|
131
|
+
- Creating subfolders inside `script-commands/`.
|
|
132
|
+
- Committing or pushing anything — out of scope.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
|
+
"name": "astro",
|
|
4
|
+
"vars": {
|
|
5
|
+
"bg": "#0D1117",
|
|
6
|
+
"bgLift": "#161B22",
|
|
7
|
+
"bgSelect": "#1C2128",
|
|
8
|
+
"border": "#30363D",
|
|
9
|
+
"accent": "#FFD700",
|
|
10
|
+
"text": "#E6EDF3",
|
|
11
|
+
"muted": "#8B949E",
|
|
12
|
+
"dim": "#6E7681",
|
|
13
|
+
"success": "#3FB950",
|
|
14
|
+
"error": "#F85149",
|
|
15
|
+
"warning": "#DB6D28"
|
|
16
|
+
},
|
|
17
|
+
"colors": {
|
|
18
|
+
"accent": "accent",
|
|
19
|
+
"border": "border",
|
|
20
|
+
"borderAccent": "accent",
|
|
21
|
+
"borderMuted": "#21262D",
|
|
22
|
+
"success": "success",
|
|
23
|
+
"error": "error",
|
|
24
|
+
"warning": "warning",
|
|
25
|
+
"muted": "muted",
|
|
26
|
+
"dim": "dim",
|
|
27
|
+
"text": "text",
|
|
28
|
+
"thinkingText": "muted",
|
|
29
|
+
|
|
30
|
+
"selectedBg": "bgSelect",
|
|
31
|
+
"userMessageBg": "bgLift",
|
|
32
|
+
"userMessageText": "text",
|
|
33
|
+
"customMessageBg": "#1F1D2E",
|
|
34
|
+
"customMessageText": "#C9D1D9",
|
|
35
|
+
"customMessageLabel": "accent",
|
|
36
|
+
"toolPendingBg": "#21262D",
|
|
37
|
+
"toolSuccessBg": "#0E2818",
|
|
38
|
+
"toolErrorBg": "#2D0E11",
|
|
39
|
+
"toolTitle": "accent",
|
|
40
|
+
"toolOutput": "#C9D1D9",
|
|
41
|
+
|
|
42
|
+
"syntaxComment": "muted",
|
|
43
|
+
"syntaxKeyword": "#FF7B72",
|
|
44
|
+
"syntaxFunction": "#D2A8FF",
|
|
45
|
+
"syntaxVariable": "#FFA657",
|
|
46
|
+
"syntaxString": "#A5D6FF",
|
|
47
|
+
"syntaxNumber": "#79C0FF",
|
|
48
|
+
"syntaxType": "#7EE787",
|
|
49
|
+
"syntaxOperator": "#FF7B72",
|
|
50
|
+
"syntaxPunctuation": "#C9D1D9",
|
|
51
|
+
|
|
52
|
+
"mdHeading": "accent",
|
|
53
|
+
"mdLink": "#58A6FF",
|
|
54
|
+
"mdLinkUrl": "dim",
|
|
55
|
+
"mdCode": "#FF7B72",
|
|
56
|
+
"mdCodeBlock": "text",
|
|
57
|
+
"mdCodeBlockBorder": "border",
|
|
58
|
+
"mdQuote": "muted",
|
|
59
|
+
"mdQuoteBorder": "#B58900",
|
|
60
|
+
"mdHr": "border",
|
|
61
|
+
"mdListBullet": "muted",
|
|
62
|
+
|
|
63
|
+
"toolDiffAdded": "success",
|
|
64
|
+
"toolDiffRemoved": "error",
|
|
65
|
+
"toolDiffContext": "muted",
|
|
66
|
+
|
|
67
|
+
"thinkingOff": "#3D2F0A",
|
|
68
|
+
"thinkingMinimal": "#5C4713",
|
|
69
|
+
"thinkingLow": "#8B6914",
|
|
70
|
+
"thinkingMedium": "#B58900",
|
|
71
|
+
"thinkingHigh": "#DAA520",
|
|
72
|
+
"thinkingXhigh": "accent",
|
|
73
|
+
|
|
74
|
+
"bashMode": "#39C5CF"
|
|
75
|
+
}
|
|
76
|
+
}
|
package/skills/.gitkeep
DELETED
|
File without changes
|
package/themes/.gitkeep
DELETED
|
File without changes
|