pagegraph 0.8.0 → 0.8.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/dist/cli.js +17 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -35710,7 +35710,7 @@ const runWith = (command, config) => {
|
|
|
35710
35710
|
};
|
|
35711
35711
|
//#endregion
|
|
35712
35712
|
//#region package.json
|
|
35713
|
-
var version = "0.8.
|
|
35713
|
+
var version = "0.8.1";
|
|
35714
35714
|
//#endregion
|
|
35715
35715
|
//#region src/core/projections.ts
|
|
35716
35716
|
const escapeXml = (value) => value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
@@ -43389,6 +43389,21 @@ const createWorkflowMutationPolicy = (options) => {
|
|
|
43389
43389
|
};
|
|
43390
43390
|
//#endregion
|
|
43391
43391
|
//#region src/workflows/opencode.ts
|
|
43392
|
+
const isActiveExecutorPlugin = (plugin) => JSON.stringify(plugin.source).toLowerCase().includes("executor") && plugin.state.status === "active";
|
|
43393
|
+
const waitForActiveExecutorPlugin = async (options) => {
|
|
43394
|
+
const timeoutMs = options.timeoutMs ?? 3e4;
|
|
43395
|
+
const pollMs = options.pollMs ?? 250;
|
|
43396
|
+
const now = options.now ?? Date.now;
|
|
43397
|
+
const sleep = options.sleep ?? ((milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds)));
|
|
43398
|
+
const deadline = now() + timeoutMs;
|
|
43399
|
+
do {
|
|
43400
|
+
if ((await options.list()).some(isActiveExecutorPlugin)) return true;
|
|
43401
|
+
const remaining = deadline - now();
|
|
43402
|
+
if (remaining <= 0) return false;
|
|
43403
|
+
await sleep(Math.min(pollMs, remaining));
|
|
43404
|
+
if (now() >= deadline) return false;
|
|
43405
|
+
} while (true);
|
|
43406
|
+
};
|
|
43392
43407
|
const assertWorkflowSkillsAvailable = (configDirectory, skills) => {
|
|
43393
43408
|
const missing = skills.flatMap((skill) => [resolve(configDirectory, "skills", skill, "SKILL.md"), resolve(configDirectory, "skills", skill, "references", "executor.md")].filter((file) => !existsSync(file)));
|
|
43394
43409
|
if (missing.length === 0) return;
|
|
@@ -43533,7 +43548,7 @@ const acquireWorkflowHost = async (options) => {
|
|
|
43533
43548
|
});
|
|
43534
43549
|
try {
|
|
43535
43550
|
const location = { directory: options.root };
|
|
43536
|
-
if ((await host.plugin.list({ location })).data
|
|
43551
|
+
if (!await waitForActiveExecutorPlugin({ list: async () => (await host.plugin.list({ location })).data })) throw new Error(`No active Executor plugin was discovered in ${configDirectory}; agentic SEO workflows require Executor.`);
|
|
43537
43552
|
const cursors = /* @__PURE__ */ new Map();
|
|
43538
43553
|
const complete = async (sessionId, prompt, workflowOptions) => {
|
|
43539
43554
|
assertWorkflowSkillsAvailable(configDirectory, workflowOptions.skills);
|