opengstack 0.13.10 → 0.14.2

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 (189) hide show
  1. package/AGENTS.md +4 -4
  2. package/CLAUDE.md +127 -110
  3. package/README.md +10 -5
  4. package/SKILL.md +500 -70
  5. package/bin/opengstack.js +69 -69
  6. package/{skills/land-and-deploy/SKILL.md → commands/autoplan.md} +7 -25
  7. package/{skills/benchmark/SKILL.md → commands/benchmark.md} +84 -108
  8. package/{skills/browse/SKILL.md → commands/browse.md} +60 -81
  9. package/{skills/ship/SKILL.md → commands/canary.md} +7 -27
  10. package/{skills/careful/SKILL.md → commands/careful.md} +2 -22
  11. package/{skills/canary/SKILL.md → commands/codex.md} +7 -26
  12. package/{skills/connect-chrome/SKILL.md → commands/connect-chrome.md} +7 -24
  13. package/commands/cso.md +70 -0
  14. package/commands/design-consultation.md +70 -0
  15. package/commands/design-review.md +70 -0
  16. package/commands/design-shotgun.md +70 -0
  17. package/commands/document-release.md +70 -0
  18. package/{skills/freeze/SKILL.md → commands/freeze.md} +3 -29
  19. package/{skills/guard/SKILL.md → commands/guard.md} +4 -35
  20. package/commands/investigate.md +70 -0
  21. package/commands/land-and-deploy.md +70 -0
  22. package/commands/office-hours.md +70 -0
  23. package/{skills/gstack-upgrade/SKILL.md → commands/opengstack-upgrade.md} +64 -79
  24. package/commands/plan-ceo-review.md +70 -0
  25. package/commands/plan-design-review.md +70 -0
  26. package/commands/plan-eng-review.md +70 -0
  27. package/commands/qa-only.md +70 -0
  28. package/commands/qa.md +70 -0
  29. package/commands/retro.md +70 -0
  30. package/commands/review.md +70 -0
  31. package/{skills/setup-browser-cookies/SKILL.md → commands/setup-browser-cookies.md} +22 -40
  32. package/commands/setup-deploy.md +70 -0
  33. package/commands/ship.md +70 -0
  34. package/commands/unfreeze.md +25 -0
  35. package/docs/designs/CHROME_VS_CHROMIUM_EXPLORATION.md +9 -9
  36. package/docs/designs/CONDUCTOR_CHROME_SIDEBAR_INTEGRATION.md +2 -2
  37. package/docs/designs/CONDUCTOR_SESSION_API.md +16 -16
  38. package/docs/designs/DESIGN_SHOTGUN.md +74 -74
  39. package/docs/designs/DESIGN_TOOLS_V1.md +111 -111
  40. package/docs/skills.md +483 -202
  41. package/package.json +42 -43
  42. package/scripts/analytics.ts +188 -0
  43. package/scripts/dev-skill.ts +83 -0
  44. package/scripts/discover-skills.ts +39 -0
  45. package/scripts/eval-compare.ts +97 -0
  46. package/scripts/eval-list.ts +117 -0
  47. package/scripts/eval-select.ts +86 -0
  48. package/scripts/eval-summary.ts +188 -0
  49. package/scripts/eval-watch.ts +172 -0
  50. package/scripts/gen-skill-docs.ts +473 -0
  51. package/scripts/resolvers/browse.ts +129 -0
  52. package/scripts/resolvers/codex-helpers.ts +133 -0
  53. package/scripts/resolvers/composition.ts +48 -0
  54. package/scripts/resolvers/confidence.ts +37 -0
  55. package/scripts/resolvers/constants.ts +50 -0
  56. package/scripts/resolvers/design.ts +950 -0
  57. package/scripts/resolvers/index.ts +59 -0
  58. package/scripts/resolvers/learnings.ts +96 -0
  59. package/scripts/resolvers/preamble.ts +505 -0
  60. package/scripts/resolvers/review.ts +884 -0
  61. package/scripts/resolvers/testing.ts +573 -0
  62. package/scripts/resolvers/types.ts +45 -0
  63. package/scripts/resolvers/utility.ts +421 -0
  64. package/scripts/skill-check.ts +190 -0
  65. package/scripts/cleanup.py +0 -100
  66. package/scripts/filter-skills.sh +0 -114
  67. package/scripts/filter_skills.py +0 -164
  68. package/scripts/install-skills.js +0 -60
  69. package/skills/autoplan/SKILL.md +0 -96
  70. package/skills/autoplan/SKILL.md.tmpl +0 -694
  71. package/skills/benchmark/SKILL.md.tmpl +0 -222
  72. package/skills/browse/SKILL.md.tmpl +0 -131
  73. package/skills/browse/bin/find-browse +0 -21
  74. package/skills/browse/bin/remote-slug +0 -14
  75. package/skills/browse/scripts/build-node-server.sh +0 -48
  76. package/skills/browse/src/activity.ts +0 -208
  77. package/skills/browse/src/browser-manager.ts +0 -959
  78. package/skills/browse/src/buffers.ts +0 -137
  79. package/skills/browse/src/bun-polyfill.cjs +0 -109
  80. package/skills/browse/src/cli.ts +0 -678
  81. package/skills/browse/src/commands.ts +0 -128
  82. package/skills/browse/src/config.ts +0 -150
  83. package/skills/browse/src/cookie-import-browser.ts +0 -625
  84. package/skills/browse/src/cookie-picker-routes.ts +0 -230
  85. package/skills/browse/src/cookie-picker-ui.ts +0 -688
  86. package/skills/browse/src/find-browse.ts +0 -61
  87. package/skills/browse/src/meta-commands.ts +0 -550
  88. package/skills/browse/src/platform.ts +0 -17
  89. package/skills/browse/src/read-commands.ts +0 -358
  90. package/skills/browse/src/server.ts +0 -1192
  91. package/skills/browse/src/sidebar-agent.ts +0 -280
  92. package/skills/browse/src/sidebar-utils.ts +0 -21
  93. package/skills/browse/src/snapshot.ts +0 -407
  94. package/skills/browse/src/url-validation.ts +0 -95
  95. package/skills/browse/src/write-commands.ts +0 -364
  96. package/skills/browse/test/activity.test.ts +0 -120
  97. package/skills/browse/test/adversarial-security.test.ts +0 -32
  98. package/skills/browse/test/browser-manager-unit.test.ts +0 -17
  99. package/skills/browse/test/bun-polyfill.test.ts +0 -72
  100. package/skills/browse/test/commands.test.ts +0 -2075
  101. package/skills/browse/test/compare-board.test.ts +0 -342
  102. package/skills/browse/test/config.test.ts +0 -316
  103. package/skills/browse/test/cookie-import-browser.test.ts +0 -519
  104. package/skills/browse/test/cookie-picker-routes.test.ts +0 -260
  105. package/skills/browse/test/file-drop.test.ts +0 -271
  106. package/skills/browse/test/find-browse.test.ts +0 -50
  107. package/skills/browse/test/findport.test.ts +0 -191
  108. package/skills/browse/test/fixtures/basic.html +0 -33
  109. package/skills/browse/test/fixtures/cursor-interactive.html +0 -22
  110. package/skills/browse/test/fixtures/dialog.html +0 -15
  111. package/skills/browse/test/fixtures/empty.html +0 -2
  112. package/skills/browse/test/fixtures/forms.html +0 -55
  113. package/skills/browse/test/fixtures/iframe.html +0 -30
  114. package/skills/browse/test/fixtures/network-idle.html +0 -30
  115. package/skills/browse/test/fixtures/qa-eval-checkout.html +0 -108
  116. package/skills/browse/test/fixtures/qa-eval-spa.html +0 -98
  117. package/skills/browse/test/fixtures/qa-eval.html +0 -51
  118. package/skills/browse/test/fixtures/responsive.html +0 -49
  119. package/skills/browse/test/fixtures/snapshot.html +0 -55
  120. package/skills/browse/test/fixtures/spa.html +0 -24
  121. package/skills/browse/test/fixtures/states.html +0 -17
  122. package/skills/browse/test/fixtures/upload.html +0 -25
  123. package/skills/browse/test/gstack-config.test.ts +0 -138
  124. package/skills/browse/test/gstack-update-check.test.ts +0 -514
  125. package/skills/browse/test/handoff.test.ts +0 -235
  126. package/skills/browse/test/path-validation.test.ts +0 -91
  127. package/skills/browse/test/platform.test.ts +0 -37
  128. package/skills/browse/test/server-auth.test.ts +0 -65
  129. package/skills/browse/test/sidebar-agent-roundtrip.test.ts +0 -226
  130. package/skills/browse/test/sidebar-agent.test.ts +0 -199
  131. package/skills/browse/test/sidebar-integration.test.ts +0 -320
  132. package/skills/browse/test/sidebar-unit.test.ts +0 -96
  133. package/skills/browse/test/snapshot.test.ts +0 -467
  134. package/skills/browse/test/state-ttl.test.ts +0 -35
  135. package/skills/browse/test/test-server.ts +0 -57
  136. package/skills/browse/test/url-validation.test.ts +0 -72
  137. package/skills/browse/test/watch.test.ts +0 -129
  138. package/skills/canary/SKILL.md.tmpl +0 -212
  139. package/skills/careful/SKILL.md.tmpl +0 -56
  140. package/skills/careful/bin/check-careful.sh +0 -112
  141. package/skills/codex/SKILL.md +0 -90
  142. package/skills/codex/SKILL.md.tmpl +0 -417
  143. package/skills/connect-chrome/SKILL.md.tmpl +0 -195
  144. package/skills/cso/ACKNOWLEDGEMENTS.md +0 -14
  145. package/skills/cso/SKILL.md +0 -93
  146. package/skills/cso/SKILL.md.tmpl +0 -606
  147. package/skills/design-consultation/SKILL.md +0 -94
  148. package/skills/design-consultation/SKILL.md.tmpl +0 -415
  149. package/skills/design-review/SKILL.md +0 -94
  150. package/skills/design-review/SKILL.md.tmpl +0 -290
  151. package/skills/design-shotgun/SKILL.md +0 -91
  152. package/skills/design-shotgun/SKILL.md.tmpl +0 -285
  153. package/skills/document-release/SKILL.md +0 -91
  154. package/skills/document-release/SKILL.md.tmpl +0 -359
  155. package/skills/freeze/SKILL.md.tmpl +0 -77
  156. package/skills/freeze/bin/check-freeze.sh +0 -79
  157. package/skills/gstack-upgrade/SKILL.md.tmpl +0 -222
  158. package/skills/guard/SKILL.md.tmpl +0 -77
  159. package/skills/investigate/SKILL.md +0 -105
  160. package/skills/investigate/SKILL.md.tmpl +0 -194
  161. package/skills/land-and-deploy/SKILL.md.tmpl +0 -881
  162. package/skills/office-hours/SKILL.md +0 -96
  163. package/skills/office-hours/SKILL.md.tmpl +0 -645
  164. package/skills/plan-ceo-review/SKILL.md +0 -94
  165. package/skills/plan-ceo-review/SKILL.md.tmpl +0 -811
  166. package/skills/plan-design-review/SKILL.md +0 -92
  167. package/skills/plan-design-review/SKILL.md.tmpl +0 -446
  168. package/skills/plan-eng-review/SKILL.md +0 -93
  169. package/skills/plan-eng-review/SKILL.md.tmpl +0 -303
  170. package/skills/qa/SKILL.md +0 -95
  171. package/skills/qa/SKILL.md.tmpl +0 -316
  172. package/skills/qa/references/issue-taxonomy.md +0 -85
  173. package/skills/qa/templates/qa-report-template.md +0 -126
  174. package/skills/qa-only/SKILL.md +0 -89
  175. package/skills/qa-only/SKILL.md.tmpl +0 -101
  176. package/skills/retro/SKILL.md +0 -89
  177. package/skills/retro/SKILL.md.tmpl +0 -820
  178. package/skills/review/SKILL.md +0 -92
  179. package/skills/review/SKILL.md.tmpl +0 -281
  180. package/skills/review/TODOS-format.md +0 -62
  181. package/skills/review/checklist.md +0 -220
  182. package/skills/review/design-checklist.md +0 -132
  183. package/skills/review/greptile-triage.md +0 -220
  184. package/skills/setup-browser-cookies/SKILL.md.tmpl +0 -81
  185. package/skills/setup-deploy/SKILL.md +0 -92
  186. package/skills/setup-deploy/SKILL.md.tmpl +0 -215
  187. package/skills/ship/SKILL.md.tmpl +0 -636
  188. package/skills/unfreeze/SKILL.md +0 -37
  189. 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
- }