@stackwright-pro/otters 0.2.3 → 0.3.0-alpha.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 +187 -48
- package/package.json +10 -4
- package/scripts/install-agents.js +7 -4
- package/src/stackwright-pro-api-otter.json +32 -0
- package/src/stackwright-pro-auth-otter.json +730 -0
- package/src/stackwright-pro-dashboard-otter.json +530 -0
- package/src/stackwright-pro-data-otter.json +695 -0
- package/src/stackwright-pro-foreman-otter.json +587 -0
- package/src/stackwright-pro-page-otter.json +26 -0
package/README.md
CHANGED
|
@@ -1,21 +1,99 @@
|
|
|
1
1
|
# @stackwright-pro/otters
|
|
2
2
|
|
|
3
|
-
🦦🦦 **
|
|
3
|
+
🦦🦦 **Pro Otter Ecosystem** — Enterprise features that emerge when Pro otters join the raft.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Pro otters don't replace the OSS raft — they extend it. When a Pro otter joins, the entire ecosystem adapts. Page Otter discovers Dashboard Otter and offers live data. Theme Otter discovers CAC requirements and suggests secure variants. The raft self-organizes.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Dynamic Discovery
|
|
10
|
+
|
|
11
|
+
All Pro otters use `list_agents()` for dynamic discovery at startup. This pattern ensures:
|
|
12
|
+
|
|
13
|
+
- **Automatic coordination** — Pro otters find each other and OSS counterparts
|
|
14
|
+
- **Graceful degradation** — Fall back to MCP tools if an otter is missing
|
|
15
|
+
- **Context-aware behavior** — Adapt based on available teammates
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
// Every Pro otter discovers at startup
|
|
19
|
+
const agents = await list_agents();
|
|
20
|
+
const proOtters = agents.filter((a) => a.name.includes('pro-'));
|
|
21
|
+
const ossOtters = agents.filter((a) => a.name.includes('-otter') && !a.name.includes('pro-'));
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Pro + OSS Integration
|
|
25
|
+
|
|
26
|
+
When Pro otters join an OSS raft, the following capabilities emerge:
|
|
27
|
+
|
|
28
|
+
| OSS Otter | Pro Enhancement | What Emerges |
|
|
29
|
+
| ------------- | --------------- | -------------------------------------- |
|
|
30
|
+
| Brand Otter | Pro Specs | Brand validation against approved APIs |
|
|
31
|
+
| Theme Otter | Pro Auth | CAC-enabled secure themes |
|
|
32
|
+
| Page Otter | Pro Dashboard | Live data page generation |
|
|
33
|
+
| Foreman Otter | Pro Delegation | Enterprise orchestration with fallback |
|
|
34
|
+
|
|
35
|
+
### How Pro Otters Discover the OSS Raft
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
┌────────────────────────────────────────────────────────┐
|
|
39
|
+
│ DISCOVERY SEQUENCE │
|
|
40
|
+
├────────────────────────────────────────────────────────┤
|
|
41
|
+
│ │
|
|
42
|
+
│ code-puppy -i -a stackwright-pro-foreman-otter │
|
|
43
|
+
│ │
|
|
44
|
+
│ 1. Pro Foreman starts │
|
|
45
|
+
│ │
|
|
46
|
+
│ 2. list_agents() scans for otters: │
|
|
47
|
+
│ ├─► OSS Foreman detected: stackwright-foreman-otter │
|
|
48
|
+
│ ├─► Pro specialists detected: │
|
|
49
|
+
│ │ ├─► stackwright-pro-api-otter │
|
|
50
|
+
│ │ ├─► stackwright-pro-data-otter │
|
|
51
|
+
│ │ └─► stackwright-pro-dashboard-otter │
|
|
52
|
+
│ └─► OSS raft detected: │
|
|
53
|
+
│ ├─► stackwright-brand-otter │
|
|
54
|
+
│ ├─► stackwright-theme-otter │
|
|
55
|
+
│ └─► stackwright-page-otter │
|
|
56
|
+
│ │
|
|
57
|
+
│ 3. Pro Foreman delegates to OSS Foreman: │
|
|
58
|
+
│ "Delegating Brand → Theme → Pages to OSS Foreman" │
|
|
59
|
+
│ │
|
|
60
|
+
│ 4. Pro capabilities available for addition: │
|
|
61
|
+
│ "API dashboards, CAC auth, OIDC ready" │
|
|
62
|
+
│ │
|
|
63
|
+
└────────────────────────────────────────────────────────┘
|
|
64
|
+
```
|
|
6
65
|
|
|
7
66
|
---
|
|
8
67
|
|
|
9
68
|
## Installation
|
|
10
69
|
|
|
11
70
|
```bash
|
|
71
|
+
# Install Pro otters
|
|
12
72
|
npm install @stackwright-pro/otters
|
|
13
|
-
|
|
73
|
+
|
|
74
|
+
# Or with pnpm
|
|
14
75
|
pnpm add @stackwright-pro/otters
|
|
15
76
|
```
|
|
16
77
|
|
|
17
78
|
The postinstall script automatically installs Pro otters to `~/.code_puppy/agents/` for code-puppy discovery.
|
|
18
79
|
|
|
80
|
+
```bash
|
|
81
|
+
# User has OSS otters installed
|
|
82
|
+
code-puppy -i -a stackwright-foreman-otter
|
|
83
|
+
# Found: Brand ✓, Theme ✓, Page ✓
|
|
84
|
+
|
|
85
|
+
# User installs Pro otters
|
|
86
|
+
npm install @stackwright-pro/otters
|
|
87
|
+
|
|
88
|
+
# Now with Pro discovery
|
|
89
|
+
code-puppy -i -a stackwright-foreman-otter
|
|
90
|
+
# Found: Brand ✓, Theme ✓, Page ✓
|
|
91
|
+
# Pro detected: API Otter ✓, Data Otter ✓, Dashboard Otter ✓
|
|
92
|
+
# "Live API dashboards now available - want some?"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The OSS Foreman Otter orchestrates the base pipeline. When Pro otters are present, they extend it silently — offering capabilities without overwhelming users who don't need them.
|
|
96
|
+
|
|
19
97
|
If you need to re-run the installation:
|
|
20
98
|
|
|
21
99
|
```bash
|
|
@@ -24,80 +102,128 @@ node node_modules/@stackwright-pro/otters/scripts/install-agents.js
|
|
|
24
102
|
|
|
25
103
|
---
|
|
26
104
|
|
|
105
|
+
## The Pro + OSS Raft: What Emerges
|
|
106
|
+
|
|
107
|
+
When Pro otters combine with the OSS raft, these capabilities emerge:
|
|
108
|
+
|
|
109
|
+
| Combined Otters | Emergent Capability |
|
|
110
|
+
| ---------------------------- | --------------------------------------- |
|
|
111
|
+
| Page Otter + Dashboard Otter | "Add live data to this page?" |
|
|
112
|
+
| Theme Otter + Pro Auth | "Enable CAC on this theme?" |
|
|
113
|
+
| Brand Otter + Pro Specs | "Validate brand against approved APIs?" |
|
|
114
|
+
| Foreman + All Pro Otters | Enterprise orchestration |
|
|
115
|
+
| All Otters + Enterprise Mode | Security posture auto-detected |
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
27
119
|
## The Pro Otter Raft
|
|
28
120
|
|
|
29
|
-
| Otter
|
|
30
|
-
|
|
31
|
-
| 🦦🦦 **Foreman Otter**
|
|
32
|
-
| 🦦📡 **API Otter**
|
|
33
|
-
| 🦦📊 **Dashboard Otter** | Live data views
|
|
34
|
-
| 🦦🔗 **Data Otter**
|
|
121
|
+
| Otter | Role | Output |
|
|
122
|
+
| ------------------------ | -------------------- | ------------------------------------------------------------- |
|
|
123
|
+
| 🦦🦦 **Foreman Otter** | Project coordinator | Orchestrates full-stack builds (delegates to unified Foreman) |
|
|
124
|
+
| 🦦📡 **API Otter** | OpenAPI discovery | API entity types, endpoints |
|
|
125
|
+
| 🦦📊 **Dashboard Otter** | Live data views | Typed API components |
|
|
126
|
+
| 🦦🔗 **Data Otter** | Endpoint integration | ISR config, filters |
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Pro vs OSS Integration
|
|
131
|
+
|
|
132
|
+
| Feature | OSS | Pro Integration |
|
|
133
|
+
| ---------------------- | ------------ | ------------------------------ |
|
|
134
|
+
| Brand discovery | ✅ OSS Otter | ✅ Pro can extend |
|
|
135
|
+
| Theme design | ✅ OSS Otter | ✅ Enterprise themes available |
|
|
136
|
+
| Page building | ✅ OSS Otter | ✅ Live data pages emerge |
|
|
137
|
+
| API dashboards | ❌ | ✅ Discovered dynamically |
|
|
138
|
+
| CAC auth | ❌ | ✅ Suggested when available |
|
|
139
|
+
| Static site generation | ✅ | ✅ Extended with ISR |
|
|
140
|
+
|
|
141
|
+
The key insight: **Pro doesn't replace OSS — it amplifies it.** The OSS raft handles static content, SEO, and standard pages. Pro otters discover gaps in the raft and fill them with enterprise capabilities.
|
|
35
142
|
|
|
36
143
|
---
|
|
37
144
|
|
|
38
|
-
## Pro
|
|
145
|
+
## How Pro Integrates
|
|
146
|
+
|
|
147
|
+
### The Discovery Flow
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
┌─────────────────────────────────────────────────────────────────────┐
|
|
151
|
+
│ CODE-PUPPY DISCOVERY │
|
|
152
|
+
├─────────────────────────────────────────────────────────────────────┤
|
|
153
|
+
│ │
|
|
154
|
+
│ code-puppy -i -a stackwright-foreman-otter │
|
|
155
|
+
│ │
|
|
156
|
+
│ 1. Lists all available agents │
|
|
157
|
+
│ │
|
|
158
|
+
│ 2. Filters for OSS raft: │
|
|
159
|
+
│ ├─► Brand Otter ✓ │
|
|
160
|
+
│ ├─► Theme Otter ✓ │
|
|
161
|
+
│ ├─► Page Otter ✓ │
|
|
162
|
+
│ └─► Foreman Otter ✓ │
|
|
163
|
+
│ │
|
|
164
|
+
│ 3. Pro Foreman extends OSS Foreman: │
|
|
165
|
+
│ ├─► Adds API discovery hooks │
|
|
166
|
+
│ ├─► Adds ISR configuration │
|
|
167
|
+
│ └─► Adds Dashboard Otter coordination │
|
|
168
|
+
│ │
|
|
169
|
+
│ 4. Emergent suggestions: │
|
|
170
|
+
│ "API spec detected → Generate dashboard?" │
|
|
171
|
+
│ │
|
|
172
|
+
└─────────────────────────────────────────────────────────────────────┘
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Invoking Pro Otters
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# Full-stack API build (via Foreman delegation)
|
|
179
|
+
code-puppy -i -a stackwright-foreman-otter
|
|
180
|
+
|
|
181
|
+
# API entity discovery (Pro otters work alongside OSS)
|
|
182
|
+
code-puppy -i -a stackwright-pro-api-otter
|
|
183
|
+
|
|
184
|
+
# Live dashboard generation (extends Page Otter)
|
|
185
|
+
code-puppy -i -a stackwright-pro-dashboard-otter
|
|
39
186
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
| OpenAPI integration | ❌ | ✅ |
|
|
44
|
-
| Live data dashboards | ❌ | ✅ |
|
|
45
|
-
| Zod schema generation | ❌ | ✅ |
|
|
46
|
-
| Typed API clients | ❌ | ✅ |
|
|
47
|
-
| ISR configuration | ❌ | ✅ |
|
|
187
|
+
# ISR configuration (extends Data layer)
|
|
188
|
+
code-puppy -i -a stackwright-pro-data-otter
|
|
189
|
+
```
|
|
48
190
|
|
|
49
191
|
---
|
|
50
192
|
|
|
51
|
-
##
|
|
193
|
+
## The Pro Pipeline
|
|
52
194
|
|
|
53
|
-
|
|
195
|
+
When a Pro otter joins an active OSS build:
|
|
54
196
|
|
|
55
197
|
```
|
|
56
198
|
User Request (with OpenAPI spec)
|
|
57
199
|
│
|
|
58
200
|
▼
|
|
59
201
|
┌────────────────────────┐
|
|
60
|
-
│
|
|
61
|
-
│
|
|
202
|
+
│ OSS Foreman Otter │ ◄── Base coordinator
|
|
203
|
+
│ (Pro-aware) │
|
|
62
204
|
└───────┬────────────────┘
|
|
63
|
-
│
|
|
205
|
+
│ discovers Pro capabilities
|
|
64
206
|
▼
|
|
65
207
|
┌────────────────────────┐
|
|
66
|
-
│ API Otter
|
|
67
|
-
│ (entity discovery)
|
|
208
|
+
│ Pro API Otter │ ◄── OpenAPI → typed client
|
|
209
|
+
│ (entity discovery) │ (extends OSS build)
|
|
68
210
|
└───────┬────────────────┘
|
|
69
211
|
│ creates src/generated/*
|
|
70
212
|
▼
|
|
71
213
|
┌────────────────────────┐
|
|
72
|
-
│ Dashboard Otter
|
|
73
|
-
│ (
|
|
214
|
+
│ Pro Dashboard Otter │ ◄── Live API data views
|
|
215
|
+
│ (emerges with data) │
|
|
74
216
|
└───────┬────────────────┘
|
|
75
217
|
│ creates pages/api/*
|
|
76
218
|
▼
|
|
77
219
|
┌────────────────────────┐
|
|
78
|
-
│ Data Otter
|
|
79
|
-
│ (
|
|
220
|
+
│ Pro Data Otter │ ◄── ISR + endpoint config
|
|
221
|
+
│ (configures refresh) │
|
|
80
222
|
└───────┬────────────────┘
|
|
81
223
|
▼
|
|
82
224
|
USER
|
|
83
225
|
```
|
|
84
226
|
|
|
85
|
-
### Invoking Pro Otters
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
# Full-stack API build
|
|
89
|
-
code-puppy -i -a stackwright-pro-foreman-otter
|
|
90
|
-
|
|
91
|
-
# API entity discovery
|
|
92
|
-
code-puppy -i -a stackwright-pro-api-otter
|
|
93
|
-
|
|
94
|
-
# Live dashboard generation
|
|
95
|
-
code-puppy -i -a stackwright-pro-dashboard-otter
|
|
96
|
-
|
|
97
|
-
# ISR configuration
|
|
98
|
-
code-puppy -i -a stackwright-pro-data-otter
|
|
99
|
-
```
|
|
100
|
-
|
|
101
227
|
---
|
|
102
228
|
|
|
103
229
|
## Package Structure
|
|
@@ -106,10 +232,10 @@ code-puppy -i -a stackwright-pro-data-otter
|
|
|
106
232
|
@stackwright-pro/otters/
|
|
107
233
|
├── package.json
|
|
108
234
|
├── README.md
|
|
109
|
-
├── MCP_TOOLS.md
|
|
110
|
-
├── PRO_OTTER_ARCHITECTURE.md
|
|
235
|
+
├── MCP_TOOLS.md # MCP tool documentation
|
|
236
|
+
├── PRO_OTTER_ARCHITECTURE.md # Architecture details
|
|
111
237
|
├── scripts/
|
|
112
|
-
│ └── install-agents.js
|
|
238
|
+
│ └── install-agents.js # Postinstall script
|
|
113
239
|
├── stackwright-pro-foreman-otter.json
|
|
114
240
|
├── stackwright-pro-api-otter.json
|
|
115
241
|
├── stackwright-pro-dashboard-otter.json
|
|
@@ -127,6 +253,19 @@ Pro otters require:
|
|
|
127
253
|
|
|
128
254
|
---
|
|
129
255
|
|
|
256
|
+
## Emergent Capabilities
|
|
257
|
+
|
|
258
|
+
When Pro otters join the raft, unexpected capabilities emerge:
|
|
259
|
+
|
|
260
|
+
| Discovery | Emergent Feature |
|
|
261
|
+
| ---------------------------- | --------------------------------------- |
|
|
262
|
+
| Page Otter + Dashboard Otter | "Add live data to this page?" |
|
|
263
|
+
| Theme Otter + Pro Auth | "Enable CAC on this theme?" |
|
|
264
|
+
| Brand Otter + Pro Specs | "Validate brand against approved APIs?" |
|
|
265
|
+
| All otters + Enterprise | Security posture auto-detected |
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
130
269
|
## License
|
|
131
270
|
|
|
132
271
|
MIT
|
package/package.json
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackwright-pro/otters",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Stackwright Pro Otter Raft - AI agents for
|
|
3
|
+
"version": "0.3.0-alpha.0",
|
|
4
|
+
"description": "Stackwright Pro Otter Raft - AI agents for enterprise features (CAC auth, API dashboards, government use cases)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/Per-Aspera-LLC/stackwright-pro"
|
|
9
9
|
},
|
|
10
|
+
"exports": {
|
|
11
|
+
"./src": "./src",
|
|
12
|
+
"./pro-foreman": "./src/stackwright-pro-foreman-otter.json"
|
|
13
|
+
},
|
|
10
14
|
"files": [
|
|
11
|
-
"scripts"
|
|
15
|
+
"scripts",
|
|
16
|
+
"src"
|
|
12
17
|
],
|
|
13
18
|
"peerDependencies": {
|
|
14
19
|
"@stackwright-pro/mcp": "*"
|
|
15
20
|
},
|
|
16
21
|
"scripts": {
|
|
17
|
-
"postinstall": "node scripts/install-agents.js"
|
|
22
|
+
"postinstall": "node scripts/install-agents.js",
|
|
23
|
+
"test": "echo 'Pro otters are configuration-only'"
|
|
18
24
|
}
|
|
19
25
|
}
|
|
@@ -12,22 +12,25 @@ const AGENTS_DIR = path.join(os.homedir(), '.code_puppy', 'agents');
|
|
|
12
12
|
|
|
13
13
|
// Resolve package root relative to this script's location
|
|
14
14
|
const scriptDir = __dirname;
|
|
15
|
-
const packageRoot = scriptDir.endsWith('/scripts')
|
|
15
|
+
const packageRoot = scriptDir.endsWith('/scripts')
|
|
16
16
|
? path.dirname(scriptDir) // Running from within the package
|
|
17
17
|
: path.join(scriptDir, 'packages', 'otters'); // Running from monorepo root
|
|
18
18
|
|
|
19
|
+
// All Pro otters are in the src/ directory
|
|
20
|
+
const OTTERS_DIR = path.join(packageRoot, 'src');
|
|
21
|
+
|
|
19
22
|
async function installAgents() {
|
|
20
23
|
try {
|
|
21
24
|
// Ensure ~/.code_puppy/agents/ exists
|
|
22
25
|
await fs.promises.mkdir(AGENTS_DIR, { recursive: true });
|
|
23
26
|
|
|
24
|
-
// Copy all JSON files from
|
|
25
|
-
const files = await fs.promises.readdir(
|
|
27
|
+
// Copy all JSON files from src/ to ~/.code_puppy/agents/
|
|
28
|
+
const files = await fs.promises.readdir(OTTERS_DIR);
|
|
26
29
|
|
|
27
30
|
let installedCount = 0;
|
|
28
31
|
for (const file of files) {
|
|
29
32
|
if (file.endsWith('-otter.json')) {
|
|
30
|
-
const srcPath = path.join(
|
|
33
|
+
const srcPath = path.join(OTTERS_DIR, file);
|
|
31
34
|
const destPath = path.join(AGENTS_DIR, file);
|
|
32
35
|
|
|
33
36
|
await fs.promises.copyFile(srcPath, destPath);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "pro-api-otter-001",
|
|
3
|
+
"name": "stackwright-pro-api-otter",
|
|
4
|
+
"display_name": "Stackwright Pro API Otter 🦦",
|
|
5
|
+
"description": "Analyzes API specs and extracts entity definitions",
|
|
6
|
+
"tools": ["agent_run_shell_command", "list_files", "cp_list_files", "cp_read_file"],
|
|
7
|
+
"user_prompt": "Hey! 🦦 I'm the API Otter. Give me an OpenAPI spec path and I'll extract what entities and endpoints it exposes.",
|
|
8
|
+
"system_prompt": [
|
|
9
|
+
"## YOUR JOB",
|
|
10
|
+
"Analyze API specs. Extract entities, schemas, and endpoints.",
|
|
11
|
+
"",
|
|
12
|
+
"## SPEC TYPES YOU HANDLE",
|
|
13
|
+
"- OpenAPI 3.x (YAML or JSON)",
|
|
14
|
+
"- GraphQL schemas",
|
|
15
|
+
"- AsyncAPI (Kafka events)",
|
|
16
|
+
"",
|
|
17
|
+
"## YOUR WORKFLOW",
|
|
18
|
+
"1. Accept spec path from user or find in project",
|
|
19
|
+
"2. Parse spec file (use cp_read_file for local, curl for URLs)",
|
|
20
|
+
"3. Extract: endpoints, schemas, auth requirements",
|
|
21
|
+
"4. List available entities for user selection",
|
|
22
|
+
"",
|
|
23
|
+
"## OUTPUT FORMAT",
|
|
24
|
+
"Report findings as a simple list:",
|
|
25
|
+
"- Entities: {list}",
|
|
26
|
+
"- Auth: {type}",
|
|
27
|
+
"- Base URL: {url}",
|
|
28
|
+
"",
|
|
29
|
+
"## PASS TO DATA OTTER",
|
|
30
|
+
"After analysis, invoke pro-data-otter to wire collections."
|
|
31
|
+
]
|
|
32
|
+
}
|