gooseworks 0.4.2 → 0.4.5-dev.15.facf60fb
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 +84 -22
- package/dist/agents/staging.d.ts +38 -0
- package/dist/agents/staging.d.ts.map +1 -0
- package/dist/agents/staging.js +309 -0
- package/dist/agents/staging.js.map +1 -0
- package/dist/auth/credentials.d.ts +1 -0
- package/dist/auth/credentials.d.ts.map +1 -1
- package/dist/auth/credentials.js +26 -8
- package/dist/auth/credentials.js.map +1 -1
- package/dist/auth/device-flow.d.ts +79 -0
- package/dist/auth/device-flow.d.ts.map +1 -0
- package/dist/auth/device-flow.js +411 -0
- package/dist/auth/device-flow.js.map +1 -0
- package/dist/auth/login-mode.d.ts +25 -0
- package/dist/auth/login-mode.d.ts.map +1 -0
- package/dist/auth/login-mode.js +87 -0
- package/dist/auth/login-mode.js.map +1 -0
- package/dist/auth/oauth-server.d.ts +2 -2
- package/dist/auth/oauth-server.d.ts.map +1 -1
- package/dist/auth/oauth-server.js +28 -5
- package/dist/auth/oauth-server.js.map +1 -1
- package/dist/auth/paste-login.d.ts +27 -0
- package/dist/auth/paste-login.d.ts.map +1 -0
- package/dist/auth/paste-login.js +203 -0
- package/dist/auth/paste-login.js.map +1 -0
- package/dist/commands/doctor.d.ts +29 -5
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +116 -63
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/fetch.d.ts +1 -0
- package/dist/commands/fetch.d.ts.map +1 -1
- package/dist/commands/fetch.js +64 -29
- package/dist/commands/fetch.js.map +1 -1
- package/dist/commands/formats.js +2 -2
- package/dist/commands/formats.js.map +1 -1
- package/dist/commands/graphics/publish-flow.js +1 -1
- package/dist/commands/graphics/publish-flow.js.map +1 -1
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +126 -26
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/launch.d.ts +3 -0
- package/dist/commands/launch.d.ts.map +1 -0
- package/dist/commands/launch.js +35 -0
- package/dist/commands/launch.js.map +1 -0
- package/dist/commands/login.d.ts +21 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +112 -30
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.d.ts.map +1 -1
- package/dist/commands/logout.js +7 -1
- package/dist/commands/logout.js.map +1 -1
- package/dist/commands/skills.d.ts +50 -0
- package/dist/commands/skills.d.ts.map +1 -0
- package/dist/commands/skills.js +160 -0
- package/dist/commands/skills.js.map +1 -0
- package/dist/commands/styles.js +2 -2
- package/dist/commands/styles.js.map +1 -1
- package/dist/commands/tool.d.ts +17 -0
- package/dist/commands/tool.d.ts.map +1 -0
- package/dist/commands/tool.js +239 -0
- package/dist/commands/tool.js.map +1 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +37 -6
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/video-local.d.ts +9 -0
- package/dist/commands/video-local.d.ts.map +1 -0
- package/dist/commands/video-local.js +83 -0
- package/dist/commands/video-local.js.map +1 -0
- package/dist/commands/video-save.d.ts +3 -0
- package/dist/commands/video-save.d.ts.map +1 -0
- package/dist/commands/video-save.js +83 -0
- package/dist/commands/video-save.js.map +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +14 -3
- package/dist/config.js.map +1 -1
- package/dist/environment.d.ts +9 -0
- package/dist/environment.d.ts.map +1 -0
- package/dist/environment.js +105 -0
- package/dist/environment.js.map +1 -0
- package/dist/index.js +12 -38
- package/dist/index.js.map +1 -1
- package/dist/lib/graphics-cache.d.ts.map +1 -1
- package/dist/lib/graphics-cache.js +2 -2
- package/dist/lib/graphics-cache.js.map +1 -1
- package/dist/lib/mcp-client.d.ts +53 -0
- package/dist/lib/mcp-client.d.ts.map +1 -0
- package/dist/lib/mcp-client.js +196 -0
- package/dist/lib/mcp-client.js.map +1 -0
- package/dist/lib/video-local-captions.d.ts +83 -0
- package/dist/lib/video-local-captions.d.ts.map +1 -0
- package/dist/lib/video-local-captions.js +261 -0
- package/dist/lib/video-local-captions.js.map +1 -0
- package/dist/lib/video-local-runtime.d.ts +8 -0
- package/dist/lib/video-local-runtime.d.ts.map +1 -0
- package/dist/lib/video-local-runtime.js +201 -0
- package/dist/lib/video-local-runtime.js.map +1 -0
- package/dist/lib/video-save-mcp.d.ts +9 -0
- package/dist/lib/video-save-mcp.d.ts.map +1 -0
- package/dist/lib/video-save-mcp.js +162 -0
- package/dist/lib/video-save-mcp.js.map +1 -0
- package/dist/lib/video-save.d.ts +77 -0
- package/dist/lib/video-save.d.ts.map +1 -0
- package/dist/lib/video-save.js +440 -0
- package/dist/lib/video-save.js.map +1 -0
- package/dist/program.d.ts +2 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +56 -0
- package/dist/program.js.map +1 -0
- package/dist/skills/custom-video-skill.d.ts +3 -0
- package/dist/skills/custom-video-skill.d.ts.map +1 -0
- package/dist/skills/custom-video-skill.js +6 -0
- package/dist/skills/custom-video-skill.js.map +1 -0
- package/dist/skills/installer.d.ts +12 -6
- package/dist/skills/installer.d.ts.map +1 -1
- package/dist/skills/installer.js +82 -38
- package/dist/skills/installer.js.map +1 -1
- package/dist/skills/master-skill.d.ts +34 -28
- package/dist/skills/master-skill.d.ts.map +1 -1
- package/dist/skills/master-skill.js +2264 -858
- package/dist/skills/master-skill.js.map +1 -1
- package/dist/skills/package-freshness.d.ts +16 -0
- package/dist/skills/package-freshness.d.ts.map +1 -0
- package/dist/skills/package-freshness.js +36 -0
- package/dist/skills/package-freshness.js.map +1 -0
- package/dist/skills/releases.d.ts +12 -0
- package/dist/skills/releases.d.ts.map +1 -0
- package/dist/skills/releases.js +155 -0
- package/dist/skills/releases.js.map +1 -0
- package/dist/skills/routes.d.ts.map +1 -1
- package/dist/skills/routes.js +12 -6
- package/dist/skills/routes.js.map +1 -1
- package/dist/skills/staging-content.d.ts +3 -0
- package/dist/skills/staging-content.d.ts.map +1 -0
- package/dist/skills/staging-content.js +12 -0
- package/dist/skills/staging-content.js.map +1 -0
- package/dist/utils/browser-preflight.d.ts +29 -0
- package/dist/utils/browser-preflight.d.ts.map +1 -0
- package/dist/utils/browser-preflight.js +338 -0
- package/dist/utils/browser-preflight.js.map +1 -0
- package/dist/utils/http.d.ts +7 -1
- package/dist/utils/http.d.ts.map +1 -1
- package/dist/utils/http.js +5 -1
- package/dist/utils/http.js.map +1 -1
- package/package.json +11 -3
- package/skills/goose-ads/SKILL.md +509 -239
- package/skills/goose-product-photos/SKILL.md +161 -60
- package/skills/goose-video/SKILL.md +592 -259
- package/skills/goose-video-local/SKILL.md +1409 -236
- package/skills/gooseworks/SKILL.md +327 -34
- package/skills/make-custom-video/SKILL.md +735 -0
- package/skills/manifest.json +12 -0
- package/skills/routes.json +13 -6
- package/dist/skills/fetcher.d.ts +0 -18
- package/dist/skills/fetcher.d.ts.map +0 -1
- package/dist/skills/fetcher.js +0 -118
- package/dist/skills/fetcher.js.map +0 -1
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.checkBrowserPreflight = checkBrowserPreflight;
|
|
37
|
+
const child_process_1 = require("child_process");
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const MARKER = 'GOOSE_BROWSER_PREFLIGHT=';
|
|
40
|
+
// A separate Node process preserves native module resolution (including NODE_PATH)
|
|
41
|
+
// and keeps a broken Playwright installation from hanging or crashing the CLI.
|
|
42
|
+
// Nothing imports or runs the renderer, downloads a browser, or navigates a page.
|
|
43
|
+
const PROBE = String.raw `
|
|
44
|
+
const fs = require('fs');
|
|
45
|
+
const path = require('path');
|
|
46
|
+
const { createRequire } = require('module');
|
|
47
|
+
// Register each native child synchronously at creation. A probe can crash/exit
|
|
48
|
+
// before the supervisor's inventory poll; Chromium must remain owned then too.
|
|
49
|
+
const childProcess = require('child_process');
|
|
50
|
+
const nativeSpawn = childProcess.spawn;
|
|
51
|
+
if (process.platform !== 'win32') {
|
|
52
|
+
childProcess.spawn = function(...args) {
|
|
53
|
+
const child = Reflect.apply(nativeSpawn, this, args);
|
|
54
|
+
if (child.pid) {
|
|
55
|
+
const inventory = childProcess.spawnSync('/bin/ps', ['-p', String(child.pid), '-o', 'pid=', '-o', 'ppid=', '-o', 'pgid=', '-o', 'stat=', '-o', 'lstart='], {
|
|
56
|
+
encoding: 'utf8', timeout: 250, maxBuffer: 4096, stdio: ['ignore', 'pipe', 'ignore'],
|
|
57
|
+
});
|
|
58
|
+
const row = /^\s*(\d+)\s+(\d+)\s+(\d+)\s+(\S+)\s+(.+?)\s*$/.exec(inventory.stdout || '');
|
|
59
|
+
fs.writeSync(1, 'GOOSE_BROWSER_CHILD=' + JSON.stringify({
|
|
60
|
+
pid: child.pid, parent: process.pid,
|
|
61
|
+
born: row && Number(row[2]) === process.pid ? row[5] : null,
|
|
62
|
+
}) + '\n');
|
|
63
|
+
}
|
|
64
|
+
return child; // Preserve arguments, launch flags and the native ChildProcess.
|
|
65
|
+
};
|
|
66
|
+
require('module').syncBuiltinESMExports();
|
|
67
|
+
}
|
|
68
|
+
let [anchor, selected, launchMs, closeMs] = process.argv.slice(1);
|
|
69
|
+
const meta = {};
|
|
70
|
+
let browser;
|
|
71
|
+
let completed = false;
|
|
72
|
+
function finish(code, detail) {
|
|
73
|
+
if (completed) return;
|
|
74
|
+
completed = true;
|
|
75
|
+
process.stdout.write('GOOSE_BROWSER_PREFLIGHT=' + JSON.stringify({
|
|
76
|
+
ok: code === 'ready', code, detail, ...meta,
|
|
77
|
+
}) + '\n');
|
|
78
|
+
// Keep the tree rooted here until the supervisor acknowledges the result.
|
|
79
|
+
// In particular, Windows taskkill /T needs the parent PID still alive.
|
|
80
|
+
setInterval(() => {}, 1000);
|
|
81
|
+
}
|
|
82
|
+
function message(error) { return String(error?.message || error).slice(0, 4000); }
|
|
83
|
+
async function closeBrowser() {
|
|
84
|
+
if (!browser) return;
|
|
85
|
+
await Promise.race([
|
|
86
|
+
browser.close(),
|
|
87
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error('browser close timed out')), Number(closeMs))),
|
|
88
|
+
]);
|
|
89
|
+
}
|
|
90
|
+
(async () => {
|
|
91
|
+
if (selected === 'true') {
|
|
92
|
+
try {
|
|
93
|
+
if (!fs.statSync(anchor).isFile()) throw new Error('not a file');
|
|
94
|
+
// Node resolves its main script's symlink unless explicitly told otherwise.
|
|
95
|
+
if (!/--preserve-symlinks-main\b/.test(process.env.NODE_OPTIONS || '')) anchor = fs.realpathSync(anchor);
|
|
96
|
+
meta.resolvedScript = anchor;
|
|
97
|
+
}
|
|
98
|
+
catch { return finish('invalid_script', 'Renderer script is not an existing file: ' + anchor); }
|
|
99
|
+
}
|
|
100
|
+
const fromRenderer = createRequire(anchor);
|
|
101
|
+
let playwright;
|
|
102
|
+
try {
|
|
103
|
+
meta.modulePath = fromRenderer.resolve('playwright');
|
|
104
|
+
playwright = fromRenderer('playwright');
|
|
105
|
+
meta.version = fromRenderer('playwright/package.json').version;
|
|
106
|
+
meta.cliPath = path.join(path.dirname(fromRenderer.resolve('playwright/package.json')), 'cli.js');
|
|
107
|
+
meta.executablePath = playwright.chromium.executablePath();
|
|
108
|
+
process.stdout.write('GOOSE_BROWSER_PREFLIGHT_META=' + JSON.stringify(meta) + '\n');
|
|
109
|
+
} catch (error) {
|
|
110
|
+
return finish(meta.modulePath ? 'probe_failed' : 'missing_module', message(error));
|
|
111
|
+
}
|
|
112
|
+
try {
|
|
113
|
+
// Preserve chromium.launch() defaults: no alternate executable, channel,
|
|
114
|
+
// headless mode or sandbox flags. The only override bounds the wait.
|
|
115
|
+
browser = await playwright.chromium.launch({ timeout: Number(launchMs) });
|
|
116
|
+
} catch (error) {
|
|
117
|
+
const detail = message(error);
|
|
118
|
+
const code = /executable.*doesn't exist|executable.*not found|ENOENT/i.test(detail)
|
|
119
|
+
? 'missing_browser' : /timeout|timed out/i.test(detail) ? 'timeout' : 'launch_failed';
|
|
120
|
+
return finish(code, detail);
|
|
121
|
+
}
|
|
122
|
+
try { await closeBrowser(); }
|
|
123
|
+
catch (error) { return finish('close_failed', message(error)); }
|
|
124
|
+
finish('ready', 'Chromium launched and closed with the default renderer settings');
|
|
125
|
+
})().catch(error => finish('probe_failed', message(error)));
|
|
126
|
+
`;
|
|
127
|
+
function quote(value) {
|
|
128
|
+
return process.platform === 'win32' ? `"${value}"` : `'${value.replace(/'/g, `'"'"'`)}'`;
|
|
129
|
+
}
|
|
130
|
+
function repair(code, folder, cliPath) {
|
|
131
|
+
const cd = `${process.platform === 'win32' ? 'cd /d' : 'cd'} ${quote(folder)}`;
|
|
132
|
+
const cli = cliPath ? `${quote(process.execPath)} ${quote(cliPath)}` : 'npx --no-install playwright';
|
|
133
|
+
if (code === 'invalid_script')
|
|
134
|
+
return 'Pass --renderer-script with the actual fetched renderer script path';
|
|
135
|
+
if (code === 'missing_module')
|
|
136
|
+
return `${cd} && npm install playwright && npx --no-install playwright install chromium`;
|
|
137
|
+
if (code === 'missing_browser')
|
|
138
|
+
return `${cd} && ${cli} install chromium`;
|
|
139
|
+
if (code === 'ready')
|
|
140
|
+
return '';
|
|
141
|
+
return `${cd} && ${cli} install --with-deps chromium`;
|
|
142
|
+
}
|
|
143
|
+
// spawnSync has no detached/process-group option. This supervisor uses spawn()
|
|
144
|
+
// to own the probe. Chromium creates another detached Unix group, so cleanup
|
|
145
|
+
// tracks descendants by parentage, freezes them, and kills owned PIDs before
|
|
146
|
+
// the probe. The existing synchronous doctor/install API stays compatible.
|
|
147
|
+
const SUPERVISOR = String.raw `
|
|
148
|
+
const { spawn, spawnSync } = require('child_process');
|
|
149
|
+
const [probe, ...args] = process.argv.slice(1);
|
|
150
|
+
let output = '';
|
|
151
|
+
let meta = {};
|
|
152
|
+
let finished = false;
|
|
153
|
+
const owned = new Map();
|
|
154
|
+
let rootBorn;
|
|
155
|
+
let ownershipUncertain = false;
|
|
156
|
+
const registrations = new Set();
|
|
157
|
+
function processTable() {
|
|
158
|
+
const result = spawnSync('/bin/ps', ['-A', '-o', 'pid=', '-o', 'ppid=', '-o', 'pgid=', '-o', 'stat=', '-o', 'lstart='], {
|
|
159
|
+
encoding: 'utf8', timeout: 250, maxBuffer: 256 * 1024, stdio: ['ignore', 'pipe', 'ignore'],
|
|
160
|
+
});
|
|
161
|
+
if (result.status !== 0) return null;
|
|
162
|
+
const rows = new Map();
|
|
163
|
+
for (const line of result.stdout.split('\n')) {
|
|
164
|
+
const match = /^\s*(\d+)\s+(\d+)\s+(\d+)\s+(\S+)\s+(.+?)\s*$/.exec(line);
|
|
165
|
+
if (match) rows.set(Number(match[1]), { pid: Number(match[1]), parent: Number(match[2]), group: Number(match[3]), state: match[4], born: match[5] });
|
|
166
|
+
}
|
|
167
|
+
return rows.size ? rows : null;
|
|
168
|
+
}
|
|
169
|
+
// Without a process inventory we cannot safely clean up a detached browser.
|
|
170
|
+
// Fail before launching it; never use a broad browser-name or user-wide kill.
|
|
171
|
+
if (process.platform !== 'win32' && !processTable()) {
|
|
172
|
+
process.stdout.write('GOOSE_BROWSER_PREFLIGHT=' + JSON.stringify({ ok: false, code: 'probe_failed', detail: 'Cannot inspect owned browser processes with /bin/ps; browser was not launched' }) + '\n');
|
|
173
|
+
process.exit(1);
|
|
174
|
+
}
|
|
175
|
+
const child = spawn(process.execPath, ['-e', probe, ...args], {
|
|
176
|
+
detached: process.platform !== 'win32', stdio: ['ignore', 'pipe', 'ignore'], env: process.env,
|
|
177
|
+
});
|
|
178
|
+
function discover(rows) {
|
|
179
|
+
// Retain observed children after reparenting, but reject reused PID identities.
|
|
180
|
+
for (const [pid, row] of owned) if (rows.get(pid)?.born !== row.born) owned.delete(pid);
|
|
181
|
+
const root = rows.get(child.pid);
|
|
182
|
+
if (root && (!rootBorn || root.born === rootBorn)) {
|
|
183
|
+
rootBorn = root.born;
|
|
184
|
+
owned.set(child.pid, root);
|
|
185
|
+
}
|
|
186
|
+
let changed;
|
|
187
|
+
do {
|
|
188
|
+
changed = false;
|
|
189
|
+
for (const row of rows.values()) {
|
|
190
|
+
if (!owned.has(row.pid) && owned.has(row.parent)) {
|
|
191
|
+
owned.set(row.pid, row);
|
|
192
|
+
changed = true;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
} while (changed);
|
|
196
|
+
return [...owned.keys()].map(pid => rows.get(pid)).filter(row => row && !row.state.startsWith('Z'));
|
|
197
|
+
}
|
|
198
|
+
function signal(row, name) {
|
|
199
|
+
try { process.kill(row.pid, name); } catch {} // Already gone, or reported by verification below.
|
|
200
|
+
}
|
|
201
|
+
const monitor = process.platform === 'win32' ? null : setInterval(() => {
|
|
202
|
+
const rows = processTable();
|
|
203
|
+
if (rows) discover(rows);
|
|
204
|
+
}, 100);
|
|
205
|
+
function cleanup() {
|
|
206
|
+
if (monitor) clearInterval(monitor);
|
|
207
|
+
if (!child.pid) return { ok: true, remainingPids: [] };
|
|
208
|
+
if (process.platform === 'win32') {
|
|
209
|
+
const result = spawnSync('taskkill', ['/pid', String(child.pid), '/T', '/F'], { timeout: 2000, stdio: 'ignore' });
|
|
210
|
+
return { ok: result.status === 0, remainingPids: result.status === 0 ? [] : [child.pid] };
|
|
211
|
+
}
|
|
212
|
+
const until = Date.now() + 1500;
|
|
213
|
+
const frozen = new Set();
|
|
214
|
+
let active = [];
|
|
215
|
+
let stable = false;
|
|
216
|
+
// Freeze parent processes first, then rescan for children created just before
|
|
217
|
+
// SIGSTOP. This stops further forks without changing browser launch options.
|
|
218
|
+
for (let round = 0; round < 8 && Date.now() < until; round++) {
|
|
219
|
+
const rows = processTable();
|
|
220
|
+
if (!rows) continue; // Retry a transient inventory timeout within the same budget.
|
|
221
|
+
active = discover(rows);
|
|
222
|
+
const fresh = active.filter(row => !frozen.has(row.pid));
|
|
223
|
+
for (const row of fresh) { signal(row, 'SIGSTOP'); frozen.add(row.pid); }
|
|
224
|
+
if (!fresh.length) { stable = true; break; }
|
|
225
|
+
}
|
|
226
|
+
// Use individual owned PIDs, not a whole group that could contain unrelated
|
|
227
|
+
// processes. Detached Chromium groups and their renderers are still covered.
|
|
228
|
+
for (const row of active.filter(row => row.pid !== child.pid).reverse()) signal(row, 'SIGKILL');
|
|
229
|
+
const root = active.find(row => row.pid === child.pid);
|
|
230
|
+
if (root) signal(root, 'SIGKILL');
|
|
231
|
+
else if (child.exitCode === null && child.signalCode === null) child.kill('SIGKILL');
|
|
232
|
+
while (Date.now() < until) {
|
|
233
|
+
const rows = processTable();
|
|
234
|
+
if (!rows) continue;
|
|
235
|
+
active = discover(rows);
|
|
236
|
+
if (!active.length) return { ok: stable && !ownershipUncertain, remainingPids: [] };
|
|
237
|
+
for (const row of active) signal(row, 'SIGKILL');
|
|
238
|
+
}
|
|
239
|
+
return { ok: false, remainingPids: active.map(row => row.pid) };
|
|
240
|
+
}
|
|
241
|
+
function finish(code, override) {
|
|
242
|
+
if (finished) return;
|
|
243
|
+
finished = true;
|
|
244
|
+
clearTimeout(deadline);
|
|
245
|
+
const stopped = cleanup();
|
|
246
|
+
let result = { ...meta, ...override, cleanup: stopped };
|
|
247
|
+
if (!stopped.ok) {
|
|
248
|
+
result = { ...result, ok: false, code: 'probe_failed', detail: (result.detail || 'Browser probe ended') + '; could not confirm cleanup of owned browser processes' };
|
|
249
|
+
code = 1;
|
|
250
|
+
} else if (result.code === 'timeout') result.detail += '; its owned processes were stopped';
|
|
251
|
+
const text = 'GOOSE_BROWSER_PREFLIGHT=' + JSON.stringify(result) + '\n';
|
|
252
|
+
process.stdout.write(text, () => process.exit(code));
|
|
253
|
+
}
|
|
254
|
+
const deadline = setTimeout(() => finish(1, {
|
|
255
|
+
ok: false, code: 'timeout', detail: 'Browser launch/close probe timed out',
|
|
256
|
+
}), Number(args[2]) + Number(args[3]) + 500);
|
|
257
|
+
child.stdout.on('data', chunk => {
|
|
258
|
+
output += chunk;
|
|
259
|
+
if (Buffer.byteLength(output) > 60000) finish(1, { ok: false, code: 'probe_failed', detail: 'Browser probe exceeded its diagnostic output limit' });
|
|
260
|
+
// Consume creation records before processing a terminal result. writeSync in
|
|
261
|
+
// the probe and the close (not exit) handler preserve records on abrupt exit.
|
|
262
|
+
for (const line of output.split(/\r?\n/)) {
|
|
263
|
+
if (!line.startsWith('GOOSE_BROWSER_CHILD=') || !output.includes(line + '\n') || registrations.has(line)) continue;
|
|
264
|
+
registrations.add(line);
|
|
265
|
+
try {
|
|
266
|
+
const registration = JSON.parse(line.slice('GOOSE_BROWSER_CHILD='.length));
|
|
267
|
+
if (!registration.born || registration.parent !== child.pid) { ownershipUncertain = true; continue; }
|
|
268
|
+
// The creation record has the native parent's verified start identity.
|
|
269
|
+
// Seed discovery even if that parent has already exited and reparented it.
|
|
270
|
+
owned.set(registration.pid, registration);
|
|
271
|
+
} catch { ownershipUncertain = true; }
|
|
272
|
+
}
|
|
273
|
+
const metadata = output.split(/\r?\n/).find(line => line.startsWith('GOOSE_BROWSER_PREFLIGHT_META=') && output.includes(line + '\n'));
|
|
274
|
+
if (metadata) {
|
|
275
|
+
try { meta = JSON.parse(metadata.slice('GOOSE_BROWSER_PREFLIGHT_META='.length)); } catch {}
|
|
276
|
+
}
|
|
277
|
+
const line = output.split(/\r?\n/).find(line => line.startsWith('GOOSE_BROWSER_PREFLIGHT=') && output.includes(line + '\n'));
|
|
278
|
+
if (line) {
|
|
279
|
+
try { const result = JSON.parse(line.slice('GOOSE_BROWSER_PREFLIGHT='.length)); finish(result.ok ? 0 : 1, result); }
|
|
280
|
+
catch { finish(1, { ok: false, code: 'probe_failed', detail: 'Invalid browser probe result' }); }
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
child.on('error', error => finish(1, { ok: false, code: 'probe_failed', detail: error.message }));
|
|
284
|
+
child.on('close', () => finish(1, { ok: false, code: 'probe_failed', detail: 'Browser probe closed without a result' }));
|
|
285
|
+
`;
|
|
286
|
+
/**
|
|
287
|
+
* Probe the package the script would require, using the caller's cwd and env.
|
|
288
|
+
* Without a script, this is only a general check rooted in the current folder.
|
|
289
|
+
* Browser startup creates normal temporary runtime files; no project output.
|
|
290
|
+
*/
|
|
291
|
+
function checkBrowserPreflight(opts = {}) {
|
|
292
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
293
|
+
const selected = opts.rendererScript !== undefined;
|
|
294
|
+
const anchor = path.resolve(cwd, opts.rendererScript ?? '__gooseworks_browser_probe__.js');
|
|
295
|
+
const folder = path.dirname(anchor);
|
|
296
|
+
const launchMs = opts.launchTimeoutMs ?? 15000;
|
|
297
|
+
const closeMs = opts.closeTimeoutMs ?? 3000;
|
|
298
|
+
let result;
|
|
299
|
+
try {
|
|
300
|
+
const probe = (0, child_process_1.spawnSync)(process.execPath, ['-e', SUPERVISOR, PROBE, anchor, String(selected), String(launchMs), String(closeMs)], {
|
|
301
|
+
cwd,
|
|
302
|
+
env: process.env,
|
|
303
|
+
encoding: 'utf8',
|
|
304
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
305
|
+
timeout: launchMs + closeMs + 3500,
|
|
306
|
+
killSignal: 'SIGKILL',
|
|
307
|
+
maxBuffer: 64 * 1024,
|
|
308
|
+
});
|
|
309
|
+
const error = probe.error;
|
|
310
|
+
const line = (probe.stdout ?? '').split(/\r?\n/).find((s) => s.startsWith(MARKER));
|
|
311
|
+
if (line && !probe.error) {
|
|
312
|
+
result = JSON.parse(line.slice(MARKER.length));
|
|
313
|
+
if ((result.code === 'ready' && probe.status !== 0) || !result.code)
|
|
314
|
+
throw new Error('invalid browser probe result');
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
result = {
|
|
318
|
+
ok: false,
|
|
319
|
+
code: error?.code === 'ETIMEDOUT' ? 'timeout' : 'probe_failed',
|
|
320
|
+
detail: error?.code === 'ETIMEDOUT'
|
|
321
|
+
? 'Browser probe supervisor timed out before returning a result'
|
|
322
|
+
: `Browser probe could not complete (${probe.error?.message ?? `exit ${probe.status}`})`,
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
catch (error) {
|
|
327
|
+
result = { ok: false, code: 'probe_failed', detail: `Browser probe failed: ${error instanceof Error ? error.message : String(error)}` };
|
|
328
|
+
}
|
|
329
|
+
const location = result.modulePath ? `; Playwright ${result.version ?? 'unknown version'} at ${result.modulePath}` : '';
|
|
330
|
+
const executable = result.executablePath ? `; Chromium executable: ${result.executablePath}` : '';
|
|
331
|
+
return {
|
|
332
|
+
...result,
|
|
333
|
+
...(selected ? { rendererScript: anchor } : {}),
|
|
334
|
+
detail: `${selected ? `Renderer ${anchor}` : `General browser setup in ${cwd}`}: ${result.detail}${location}${executable}`,
|
|
335
|
+
fix: repair(result.code, result.resolvedScript ? path.dirname(result.resolvedScript) : folder, result.cliPath),
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
//# sourceMappingURL=browser-preflight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-preflight.js","sourceRoot":"","sources":["../../src/utils/browser-preflight.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiRA,sDAgDC;AAjUD,iDAA0C;AAC1C,2CAA6B;AAmB7B,MAAM,MAAM,GAAG,0BAA0B,CAAC;AAE1C,mFAAmF;AACnF,+EAA+E;AAC/E,kFAAkF;AAClF,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmFvB,CAAC;AAEF,SAAS,KAAK,CAAC,KAAa;IAC1B,OAAO,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC;AAC3F,CAAC;AAED,SAAS,MAAM,CAAC,IAAsB,EAAE,MAAc,EAAE,OAAgB;IACtE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;IAC/E,MAAM,GAAG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AC,CAAC,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC;KAC/G,CAAC;AACJ,CAAC"}
|
package/dist/utils/http.d.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
export interface RequestOpts {
|
|
2
2
|
apiBase: string;
|
|
3
|
-
|
|
3
|
+
/** Omit (or pass '') for unauthenticated calls such as device sign-in. */
|
|
4
|
+
apiKey?: string;
|
|
4
5
|
method?: string;
|
|
5
6
|
path: string;
|
|
6
7
|
body?: unknown;
|
|
7
8
|
query?: Record<string, string | number | boolean | undefined>;
|
|
9
|
+
/**
|
|
10
|
+
* Abort the request after this many ms with `HttpError('Request timed out', 0)`.
|
|
11
|
+
* Only short sign-in calls pass it; proxy calls can legitimately run for minutes.
|
|
12
|
+
*/
|
|
13
|
+
timeoutMs?: number;
|
|
8
14
|
}
|
|
9
15
|
export declare class HttpError extends Error {
|
|
10
16
|
status: number;
|
package/dist/utils/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;IAC9D;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,SAAU,SAAQ,KAAK;IAClC,MAAM,EAAE,MAAM,CAAC;gBACH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAI5C;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,GAAE,MAAmB,GAAG,MAAM,CAclF;AAED,wBAAgB,WAAW,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CA6CtE"}
|
package/dist/utils/http.js
CHANGED
|
@@ -73,9 +73,10 @@ function requestJson(opts) {
|
|
|
73
73
|
const client = url.protocol === 'https:' ? https : http;
|
|
74
74
|
const method = (opts.method ?? (opts.body !== undefined ? 'POST' : 'GET')).toUpperCase();
|
|
75
75
|
const headers = {
|
|
76
|
-
'Authorization': `Bearer ${opts.apiKey}`,
|
|
77
76
|
'Accept': 'application/json',
|
|
78
77
|
};
|
|
78
|
+
if (opts.apiKey)
|
|
79
|
+
headers['Authorization'] = `Bearer ${opts.apiKey}`;
|
|
79
80
|
let bodyStr;
|
|
80
81
|
if (opts.body !== undefined && method !== 'GET' && method !== 'HEAD') {
|
|
81
82
|
bodyStr = JSON.stringify(opts.body);
|
|
@@ -102,6 +103,9 @@ function requestJson(opts) {
|
|
|
102
103
|
res.on('error', reject);
|
|
103
104
|
});
|
|
104
105
|
req.on('error', reject);
|
|
106
|
+
if (opts.timeoutMs !== undefined) {
|
|
107
|
+
req.setTimeout(opts.timeoutMs, () => req.destroy(new HttpError('Request timed out', 0)));
|
|
108
|
+
}
|
|
105
109
|
if (bodyStr)
|
|
106
110
|
req.write(bodyStr);
|
|
107
111
|
req.end();
|
package/dist/utils/http.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"http.js","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": "GooseWorks CLI — give your coding agent real data tools",
|
|
5
5
|
"bin": {
|
|
6
6
|
"gooseworks": "./dist/index.js"
|
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
"dev": "tsx src/index.ts",
|
|
12
12
|
"test": "jest",
|
|
13
13
|
"generate:skills": "tsx scripts/generate-skill-files.ts",
|
|
14
|
-
"prepublishOnly": "npm run generate:skills && npm run build && npm test"
|
|
14
|
+
"prepublishOnly": "npm run generate:skills && npm run build && npm test",
|
|
15
|
+
"changeset": "changeset",
|
|
16
|
+
"version-packages": "changeset version && npm install --package-lock-only --ignore-scripts && npm run generate:skills",
|
|
17
|
+
"test:pack": "node scripts/pack-smoke.cjs"
|
|
15
18
|
},
|
|
16
19
|
"dependencies": {
|
|
17
20
|
"chalk": "^4.1.2",
|
|
@@ -20,6 +23,7 @@
|
|
|
20
23
|
"ora": "^5.4.1"
|
|
21
24
|
},
|
|
22
25
|
"devDependencies": {
|
|
26
|
+
"@changesets/cli": "^2.31.1",
|
|
23
27
|
"@types/jest": "^29.0.0",
|
|
24
28
|
"@types/node": "^20.0.0",
|
|
25
29
|
"jest": "^29.0.0",
|
|
@@ -51,5 +55,9 @@
|
|
|
51
55
|
"url": "https://github.com/gooseworks-ai/gooseworks"
|
|
52
56
|
},
|
|
53
57
|
"homepage": "https://gooseworks.ai",
|
|
54
|
-
"author": "GooseWorks <help@gooseworks.ai>"
|
|
58
|
+
"author": "GooseWorks <help@gooseworks.ai>",
|
|
59
|
+
"gooseworksRelease": {
|
|
60
|
+
"commit": "facf60fbbd09b64789cd3f79d1282b82351af525",
|
|
61
|
+
"branch": "dev"
|
|
62
|
+
}
|
|
55
63
|
}
|