opengstack 0.13.9 → 0.14.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.
Files changed (152) hide show
  1. package/{skills/land-and-deploy/SKILL.md → commands/autoplan.md} +0 -16
  2. package/{skills/benchmark/SKILL.md → commands/benchmark.md} +0 -17
  3. package/{skills/browse/SKILL.md → commands/browse.md} +0 -17
  4. package/{skills/ship/SKILL.md → commands/canary.md} +0 -18
  5. package/{skills/careful/SKILL.md → commands/careful.md} +0 -20
  6. package/{skills/canary/SKILL.md → commands/codex.md} +0 -17
  7. package/{skills/connect-chrome/SKILL.md → commands/connect-chrome.md} +0 -15
  8. package/commands/cso.md +72 -0
  9. package/commands/design-consultation.md +72 -0
  10. package/commands/design-review.md +72 -0
  11. package/commands/design-shotgun.md +72 -0
  12. package/commands/document-release.md +72 -0
  13. package/{skills/freeze/SKILL.md → commands/freeze.md} +0 -26
  14. package/{skills/gstack-upgrade/SKILL.md → commands/gstack-upgrade.md} +0 -14
  15. package/{skills/guard/SKILL.md → commands/guard.md} +0 -31
  16. package/commands/investigate.md +72 -0
  17. package/commands/land-and-deploy.md +72 -0
  18. package/commands/office-hours.md +72 -0
  19. package/commands/plan-ceo-review.md +72 -0
  20. package/commands/plan-design-review.md +72 -0
  21. package/commands/plan-eng-review.md +72 -0
  22. package/commands/qa-only.md +72 -0
  23. package/commands/qa.md +72 -0
  24. package/commands/retro.md +72 -0
  25. package/commands/review.md +72 -0
  26. package/{skills/setup-browser-cookies/SKILL.md → commands/setup-browser-cookies.md} +0 -14
  27. package/commands/setup-deploy.md +72 -0
  28. package/commands/ship.md +72 -0
  29. package/{skills/unfreeze/SKILL.md → commands/unfreeze.md} +0 -12
  30. package/package.json +4 -4
  31. package/scripts/install-commands.js +45 -0
  32. package/scripts/install-skills.js +4 -7
  33. package/skills/autoplan/SKILL.md +0 -96
  34. package/skills/autoplan/SKILL.md.tmpl +0 -694
  35. package/skills/benchmark/SKILL.md.tmpl +0 -222
  36. package/skills/browse/SKILL.md.tmpl +0 -131
  37. package/skills/browse/bin/find-browse +0 -21
  38. package/skills/browse/bin/remote-slug +0 -14
  39. package/skills/browse/scripts/build-node-server.sh +0 -48
  40. package/skills/browse/src/activity.ts +0 -208
  41. package/skills/browse/src/browser-manager.ts +0 -959
  42. package/skills/browse/src/buffers.ts +0 -137
  43. package/skills/browse/src/bun-polyfill.cjs +0 -109
  44. package/skills/browse/src/cli.ts +0 -678
  45. package/skills/browse/src/commands.ts +0 -128
  46. package/skills/browse/src/config.ts +0 -150
  47. package/skills/browse/src/cookie-import-browser.ts +0 -625
  48. package/skills/browse/src/cookie-picker-routes.ts +0 -230
  49. package/skills/browse/src/cookie-picker-ui.ts +0 -688
  50. package/skills/browse/src/find-browse.ts +0 -61
  51. package/skills/browse/src/meta-commands.ts +0 -550
  52. package/skills/browse/src/platform.ts +0 -17
  53. package/skills/browse/src/read-commands.ts +0 -358
  54. package/skills/browse/src/server.ts +0 -1192
  55. package/skills/browse/src/sidebar-agent.ts +0 -280
  56. package/skills/browse/src/sidebar-utils.ts +0 -21
  57. package/skills/browse/src/snapshot.ts +0 -407
  58. package/skills/browse/src/url-validation.ts +0 -95
  59. package/skills/browse/src/write-commands.ts +0 -364
  60. package/skills/browse/test/activity.test.ts +0 -120
  61. package/skills/browse/test/adversarial-security.test.ts +0 -32
  62. package/skills/browse/test/browser-manager-unit.test.ts +0 -17
  63. package/skills/browse/test/bun-polyfill.test.ts +0 -72
  64. package/skills/browse/test/commands.test.ts +0 -2075
  65. package/skills/browse/test/compare-board.test.ts +0 -342
  66. package/skills/browse/test/config.test.ts +0 -316
  67. package/skills/browse/test/cookie-import-browser.test.ts +0 -519
  68. package/skills/browse/test/cookie-picker-routes.test.ts +0 -260
  69. package/skills/browse/test/file-drop.test.ts +0 -271
  70. package/skills/browse/test/find-browse.test.ts +0 -50
  71. package/skills/browse/test/findport.test.ts +0 -191
  72. package/skills/browse/test/fixtures/basic.html +0 -33
  73. package/skills/browse/test/fixtures/cursor-interactive.html +0 -22
  74. package/skills/browse/test/fixtures/dialog.html +0 -15
  75. package/skills/browse/test/fixtures/empty.html +0 -2
  76. package/skills/browse/test/fixtures/forms.html +0 -55
  77. package/skills/browse/test/fixtures/iframe.html +0 -30
  78. package/skills/browse/test/fixtures/network-idle.html +0 -30
  79. package/skills/browse/test/fixtures/qa-eval-checkout.html +0 -108
  80. package/skills/browse/test/fixtures/qa-eval-spa.html +0 -98
  81. package/skills/browse/test/fixtures/qa-eval.html +0 -51
  82. package/skills/browse/test/fixtures/responsive.html +0 -49
  83. package/skills/browse/test/fixtures/snapshot.html +0 -55
  84. package/skills/browse/test/fixtures/spa.html +0 -24
  85. package/skills/browse/test/fixtures/states.html +0 -17
  86. package/skills/browse/test/fixtures/upload.html +0 -25
  87. package/skills/browse/test/gstack-config.test.ts +0 -138
  88. package/skills/browse/test/gstack-update-check.test.ts +0 -514
  89. package/skills/browse/test/handoff.test.ts +0 -235
  90. package/skills/browse/test/path-validation.test.ts +0 -91
  91. package/skills/browse/test/platform.test.ts +0 -37
  92. package/skills/browse/test/server-auth.test.ts +0 -65
  93. package/skills/browse/test/sidebar-agent-roundtrip.test.ts +0 -226
  94. package/skills/browse/test/sidebar-agent.test.ts +0 -199
  95. package/skills/browse/test/sidebar-integration.test.ts +0 -320
  96. package/skills/browse/test/sidebar-unit.test.ts +0 -96
  97. package/skills/browse/test/snapshot.test.ts +0 -467
  98. package/skills/browse/test/state-ttl.test.ts +0 -35
  99. package/skills/browse/test/test-server.ts +0 -57
  100. package/skills/browse/test/url-validation.test.ts +0 -72
  101. package/skills/browse/test/watch.test.ts +0 -129
  102. package/skills/canary/SKILL.md.tmpl +0 -212
  103. package/skills/careful/SKILL.md.tmpl +0 -56
  104. package/skills/careful/bin/check-careful.sh +0 -112
  105. package/skills/codex/SKILL.md +0 -90
  106. package/skills/codex/SKILL.md.tmpl +0 -417
  107. package/skills/connect-chrome/SKILL.md.tmpl +0 -195
  108. package/skills/cso/ACKNOWLEDGEMENTS.md +0 -14
  109. package/skills/cso/SKILL.md +0 -93
  110. package/skills/cso/SKILL.md.tmpl +0 -606
  111. package/skills/design-consultation/SKILL.md +0 -94
  112. package/skills/design-consultation/SKILL.md.tmpl +0 -415
  113. package/skills/design-review/SKILL.md +0 -94
  114. package/skills/design-review/SKILL.md.tmpl +0 -290
  115. package/skills/design-shotgun/SKILL.md +0 -91
  116. package/skills/design-shotgun/SKILL.md.tmpl +0 -285
  117. package/skills/document-release/SKILL.md +0 -91
  118. package/skills/document-release/SKILL.md.tmpl +0 -359
  119. package/skills/freeze/SKILL.md.tmpl +0 -77
  120. package/skills/freeze/bin/check-freeze.sh +0 -79
  121. package/skills/gstack-upgrade/SKILL.md.tmpl +0 -222
  122. package/skills/guard/SKILL.md.tmpl +0 -77
  123. package/skills/investigate/SKILL.md +0 -105
  124. package/skills/investigate/SKILL.md.tmpl +0 -194
  125. package/skills/land-and-deploy/SKILL.md.tmpl +0 -881
  126. package/skills/office-hours/SKILL.md +0 -96
  127. package/skills/office-hours/SKILL.md.tmpl +0 -645
  128. package/skills/plan-ceo-review/SKILL.md +0 -94
  129. package/skills/plan-ceo-review/SKILL.md.tmpl +0 -811
  130. package/skills/plan-design-review/SKILL.md +0 -92
  131. package/skills/plan-design-review/SKILL.md.tmpl +0 -446
  132. package/skills/plan-eng-review/SKILL.md +0 -93
  133. package/skills/plan-eng-review/SKILL.md.tmpl +0 -303
  134. package/skills/qa/SKILL.md +0 -95
  135. package/skills/qa/SKILL.md.tmpl +0 -316
  136. package/skills/qa/references/issue-taxonomy.md +0 -85
  137. package/skills/qa/templates/qa-report-template.md +0 -126
  138. package/skills/qa-only/SKILL.md +0 -89
  139. package/skills/qa-only/SKILL.md.tmpl +0 -101
  140. package/skills/retro/SKILL.md +0 -89
  141. package/skills/retro/SKILL.md.tmpl +0 -820
  142. package/skills/review/SKILL.md +0 -92
  143. package/skills/review/SKILL.md.tmpl +0 -281
  144. package/skills/review/TODOS-format.md +0 -62
  145. package/skills/review/checklist.md +0 -220
  146. package/skills/review/design-checklist.md +0 -132
  147. package/skills/review/greptile-triage.md +0 -220
  148. package/skills/setup-browser-cookies/SKILL.md.tmpl +0 -81
  149. package/skills/setup-deploy/SKILL.md +0 -92
  150. package/skills/setup-deploy/SKILL.md.tmpl +0 -215
  151. package/skills/ship/SKILL.md.tmpl +0 -636
  152. package/skills/unfreeze/SKILL.md.tmpl +0 -36
@@ -1,230 +0,0 @@
1
- /**
2
- * Cookie picker route handler — HTTP + Playwright glue
3
- *
4
- * Handles all /cookie-picker/* routes. Imports from cookie-import-browser.ts
5
- * (decryption) and cookie-picker-ui.ts (HTML generation).
6
- *
7
- * Routes (no auth — localhost-only, accepted risk):
8
- * GET /cookie-picker → serves the picker HTML page
9
- * GET /cookie-picker/browsers → list installed browsers
10
- * GET /cookie-picker/domains → list domains + counts for a browser
11
- * POST /cookie-picker/import → decrypt + import cookies to Playwright
12
- * POST /cookie-picker/remove → clear cookies for domains
13
- * GET /cookie-picker/imported → currently imported domains + counts
14
- */
15
-
16
- import type { BrowserManager } from './browser-manager';
17
- import { findInstalledBrowsers, listProfiles, listDomains, importCookies, CookieImportError, type PlaywrightCookie } from './cookie-import-browser';
18
- import { getCookiePickerHTML } from './cookie-picker-ui';
19
-
20
- // ─── State ──────────────────────────────────────────────────────
21
- // Tracks which domains were imported via the picker.
22
- // /imported only returns cookies for domains in this Set.
23
- // /remove clears from this Set.
24
- const importedDomains = new Set<string>();
25
- const importedCounts = new Map<string, number>();
26
-
27
- // ─── JSON Helpers ───────────────────────────────────────────────
28
-
29
- function corsOrigin(port: number): string {
30
- return `http://127.0.0.1:${port}`;
31
- }
32
-
33
- function jsonResponse(data: any, opts: { port: number; status?: number }): Response {
34
- return new Response(JSON.stringify(data), {
35
- status: opts.status ?? 200,
36
- headers: {
37
- 'Content-Type': 'application/json',
38
- 'Access-Control-Allow-Origin': corsOrigin(opts.port),
39
- },
40
- });
41
- }
42
-
43
- function errorResponse(message: string, code: string, opts: { port: number; status?: number; action?: string }): Response {
44
- return jsonResponse(
45
- { error: message, code, ...(opts.action ? { action: opts.action } : {}) },
46
- { port: opts.port, status: opts.status ?? 400 },
47
- );
48
- }
49
-
50
- // ─── Route Handler ──────────────────────────────────────────────
51
-
52
- export async function handleCookiePickerRoute(
53
- url: URL,
54
- req: Request,
55
- bm: BrowserManager,
56
- authToken?: string,
57
- ): Promise<Response> {
58
- const pathname = url.pathname;
59
- const port = parseInt(url.port, 10) || 9400;
60
-
61
- // CORS preflight
62
- if (req.method === 'OPTIONS') {
63
- return new Response(null, {
64
- status: 204,
65
- headers: {
66
- 'Access-Control-Allow-Origin': corsOrigin(port),
67
- 'Access-Control-Allow-Methods': 'GET, POST, OPTIONS',
68
- 'Access-Control-Allow-Headers': 'Content-Type, Authorization',
69
- },
70
- });
71
- }
72
-
73
- try {
74
- // GET /cookie-picker — serve the picker UI
75
- if (pathname === '/cookie-picker' && req.method === 'GET') {
76
- const html = getCookiePickerHTML(port, authToken);
77
- return new Response(html, {
78
- status: 200,
79
- headers: { 'Content-Type': 'text/html; charset=utf-8' },
80
- });
81
- }
82
-
83
- // ─── Auth gate: all data/action routes below require Bearer token ───
84
- if (authToken) {
85
- const authHeader = req.headers.get('authorization');
86
- if (!authHeader || authHeader !== `Bearer ${authToken}`) {
87
- return new Response(JSON.stringify({ error: 'Unauthorized' }), {
88
- status: 401,
89
- headers: { 'Content-Type': 'application/json' },
90
- });
91
- }
92
- }
93
-
94
- // GET /cookie-picker/browsers — list installed browsers
95
- if (pathname === '/cookie-picker/browsers' && req.method === 'GET') {
96
- const browsers = findInstalledBrowsers();
97
- return jsonResponse({
98
- browsers: browsers.map(b => ({
99
- name: b.name,
100
- aliases: b.aliases,
101
- })),
102
- }, { port });
103
- }
104
-
105
- // GET /cookie-picker/profiles?browser=<name> — list profiles for a browser
106
- if (pathname === '/cookie-picker/profiles' && req.method === 'GET') {
107
- const browserName = url.searchParams.get('browser');
108
- if (!browserName) {
109
- return errorResponse("Missing 'browser' parameter", 'missing_param', { port });
110
- }
111
- const profiles = listProfiles(browserName);
112
- return jsonResponse({ profiles }, { port });
113
- }
114
-
115
- // GET /cookie-picker/domains?browser=<name>&profile=<profile> — list domains + counts
116
- if (pathname === '/cookie-picker/domains' && req.method === 'GET') {
117
- const browserName = url.searchParams.get('browser');
118
- if (!browserName) {
119
- return errorResponse("Missing 'browser' parameter", 'missing_param', { port });
120
- }
121
- const profile = url.searchParams.get('profile') || 'Default';
122
- const result = listDomains(browserName, profile);
123
- return jsonResponse({
124
- browser: result.browser,
125
- domains: result.domains,
126
- }, { port });
127
- }
128
-
129
- // POST /cookie-picker/import — decrypt + import to Playwright session
130
- if (pathname === '/cookie-picker/import' && req.method === 'POST') {
131
- let body: any;
132
- try {
133
- body = await req.json();
134
- } catch {
135
- return errorResponse('Invalid JSON body', 'bad_request', { port });
136
- }
137
-
138
- const { browser, domains, profile } = body;
139
- if (!browser) return errorResponse("Missing 'browser' field", 'missing_param', { port });
140
- if (!domains || !Array.isArray(domains) || domains.length === 0) {
141
- return errorResponse("Missing or empty 'domains' array", 'missing_param', { port });
142
- }
143
-
144
- // Decrypt cookies from the browser DB
145
- const result = await importCookies(browser, domains, profile || 'Default');
146
-
147
- if (result.cookies.length === 0) {
148
- return jsonResponse({
149
- imported: 0,
150
- failed: result.failed,
151
- domainCounts: {},
152
- message: result.failed > 0
153
- ? `All ${result.failed} cookies failed to decrypt`
154
- : 'No cookies found for the specified domains',
155
- }, { port });
156
- }
157
-
158
- // Add to Playwright context
159
- const page = bm.getPage();
160
- await page.context().addCookies(result.cookies);
161
-
162
- // Track what was imported
163
- for (const domain of Object.keys(result.domainCounts)) {
164
- importedDomains.add(domain);
165
- importedCounts.set(domain, (importedCounts.get(domain) || 0) + result.domainCounts[domain]);
166
- }
167
-
168
- console.log(`[cookie-picker] Imported ${result.count} cookies for ${Object.keys(result.domainCounts).length} domains`);
169
-
170
- return jsonResponse({
171
- imported: result.count,
172
- failed: result.failed,
173
- domainCounts: result.domainCounts,
174
- }, { port });
175
- }
176
-
177
- // POST /cookie-picker/remove — clear cookies for domains
178
- if (pathname === '/cookie-picker/remove' && req.method === 'POST') {
179
- let body: any;
180
- try {
181
- body = await req.json();
182
- } catch {
183
- return errorResponse('Invalid JSON body', 'bad_request', { port });
184
- }
185
-
186
- const { domains } = body;
187
- if (!domains || !Array.isArray(domains) || domains.length === 0) {
188
- return errorResponse("Missing or empty 'domains' array", 'missing_param', { port });
189
- }
190
-
191
- const page = bm.getPage();
192
- const context = page.context();
193
- for (const domain of domains) {
194
- await context.clearCookies({ domain });
195
- importedDomains.delete(domain);
196
- importedCounts.delete(domain);
197
- }
198
-
199
- console.log(`[cookie-picker] Removed cookies for ${domains.length} domains`);
200
-
201
- return jsonResponse({
202
- removed: domains.length,
203
- domains,
204
- }, { port });
205
- }
206
-
207
- // GET /cookie-picker/imported — currently imported domains + counts
208
- if (pathname === '/cookie-picker/imported' && req.method === 'GET') {
209
- const entries: Array<{ domain: string; count: number }> = [];
210
- for (const domain of importedDomains) {
211
- entries.push({ domain, count: importedCounts.get(domain) || 0 });
212
- }
213
- entries.sort((a, b) => b.count - a.count);
214
-
215
- return jsonResponse({
216
- domains: entries,
217
- totalDomains: entries.length,
218
- totalCookies: entries.reduce((sum, e) => sum + e.count, 0),
219
- }, { port });
220
- }
221
-
222
- return new Response('Not found', { status: 404 });
223
- } catch (err: any) {
224
- if (err instanceof CookieImportError) {
225
- return errorResponse(err.message, err.code, { port, status: 400, action: err.action });
226
- }
227
- console.error(`[cookie-picker] Error: ${err.message}`);
228
- return errorResponse(err.message || 'Internal error', 'internal_error', { port, status: 500 });
229
- }
230
- }