pagegraph 0.13.0 → 0.14.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/README.md +48 -41
- package/dist/anthropic-messages-TqKpKmfW.js +1067 -0
- package/dist/anthropic-messages-TqKpKmfW.js.map +1 -0
- package/dist/audit.d.ts +2 -0
- package/dist/audit.js +1 -1
- package/dist/audit.js.map +1 -1
- package/dist/azure-openai-responses-DJjBLwoI.js +231 -0
- package/dist/azure-openai-responses-DJjBLwoI.js.map +1 -0
- package/dist/cli.js +10487 -38044
- package/dist/cli.js.map +1 -1
- package/dist/cloudflare-workers-ai-system-one-f3ZrvNYZ.js +41 -0
- package/dist/cloudflare-workers-ai-system-one-f3ZrvNYZ.js.map +1 -0
- package/dist/config.d.ts +6 -6
- package/dist/config.js.map +1 -1
- package/dist/diagnostics-Wt5faNDM.js +108 -0
- package/dist/diagnostics-Wt5faNDM.js.map +1 -0
- package/dist/dist-cFoAzruL.js +4794 -0
- package/dist/dist-cFoAzruL.js.map +1 -0
- package/dist/env-api-keys-C-OA0yM-.js +124 -0
- package/dist/env-api-keys-C-OA0yM-.js.map +1 -0
- package/dist/error-body-CyiejW4b.js +103 -0
- package/dist/error-body-CyiejW4b.js.map +1 -0
- package/dist/github-copilot-headers-CEpMOpQF.js +24 -0
- package/dist/github-copilot-headers-CEpMOpQF.js.map +1 -0
- package/dist/google-generative-ai-BxABKIKO.js +330 -0
- package/dist/google-generative-ai-BxABKIKO.js.map +1 -0
- package/dist/google-shared-0gpM2jFi.js +19471 -0
- package/dist/google-shared-0gpM2jFi.js.map +1 -0
- package/dist/google-vertex-D8Eb5cbu.js +376 -0
- package/dist/google-vertex-D8Eb5cbu.js.map +1 -0
- package/dist/hash-Dp7EzZUo.js +18 -0
- package/dist/hash-Dp7EzZUo.js.map +1 -0
- package/dist/headers-BRNMVpzu.js +19 -0
- package/dist/headers-BRNMVpzu.js.map +1 -0
- package/dist/json-parse-C10znB7l.js +383 -0
- package/dist/json-parse-C10znB7l.js.map +1 -0
- package/dist/mistral-conversations-CvaqBWjR.js +690 -0
- package/dist/mistral-conversations-CvaqBWjR.js.map +1 -0
- package/dist/models-DcT5qOEL.js +1203 -0
- package/dist/models-DcT5qOEL.js.map +1 -0
- package/dist/node-Ccvru9GE.js +26 -0
- package/dist/node-Ccvru9GE.js.map +1 -0
- package/dist/node-MEosBOF2.js +2403 -0
- package/dist/node-MEosBOF2.js.map +1 -0
- package/dist/openai-BCBEd2eO.js +17350 -0
- package/dist/openai-BCBEd2eO.js.map +1 -0
- package/dist/openai-codex-responses-vJqxeeRC.js +1268 -0
- package/dist/openai-codex-responses-vJqxeeRC.js.map +1 -0
- package/dist/openai-completions-Cb_fRAbI.js +989 -0
- package/dist/openai-completions-Cb_fRAbI.js.map +1 -0
- package/dist/openai-prompt-cache-Bc6qNWt0.js +10 -0
- package/dist/openai-prompt-cache-Bc6qNWt0.js.map +1 -0
- package/dist/openai-responses-sDuh82G5.js +268 -0
- package/dist/openai-responses-sDuh82G5.js.map +1 -0
- package/dist/openai-responses-shared-mhuo1Jov.js +599 -0
- package/dist/openai-responses-shared-mhuo1Jov.js.map +1 -0
- package/dist/openrouter-images-CRmBkzpX.js +127 -0
- package/dist/openrouter-images-CRmBkzpX.js.map +1 -0
- package/dist/pi-D3mMmYey.js +56805 -0
- package/dist/pi-D3mMmYey.js.map +1 -0
- package/dist/pi-messages-CejiVYvO.js +308 -0
- package/dist/pi-messages-CejiVYvO.js.map +1 -0
- package/dist/provider-env-t38GK5FF.js +39 -0
- package/dist/provider-env-t38GK5FF.js.map +1 -0
- package/dist/provider-retry-DzKoh1X7.js +80 -0
- package/dist/provider-retry-DzKoh1X7.js.map +1 -0
- package/dist/rolldown-runtime-B-lAHAz2.js +37 -0
- package/dist/sanitize-unicode-Ds14l9Om.js +28 -0
- package/dist/sanitize-unicode-Ds14l9Om.js.map +1 -0
- package/dist/sdk-C9_wiO6w.js +12503 -0
- package/dist/sdk-C9_wiO6w.js.map +1 -0
- package/dist/state-BuJP_3Lr.js +28102 -0
- package/dist/state-BuJP_3Lr.js.map +1 -0
- package/dist/system-one-shared-Dl10ZF7Z.js +167 -0
- package/dist/system-one-shared-Dl10ZF7Z.js.map +1 -0
- package/dist/transform-messages-BLJ8EfK6.js +468 -0
- package/dist/transform-messages-BLJ8EfK6.js.map +1 -0
- package/dist/typesafe-system-one-CwEWMV8P.js +25 -0
- package/dist/typesafe-system-one-CwEWMV8P.js.map +1 -0
- package/package.json +4 -8
package/README.md
CHANGED
|
@@ -222,21 +222,14 @@ instead of crashing on a native binding when a request first runs the code. The
|
|
|
222
222
|
have **zero runtime dependencies** beyond their listed peers; a test pins each entry's import
|
|
223
223
|
graph.
|
|
224
224
|
|
|
225
|
-
The CLI **bundles PageGraph's Effect
|
|
226
|
-
app's Effect version; it runs on [Bun](https://bun.sh) (`bunx pagegraph`).
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
undeclared error bodies are capped at 16 KiB.
|
|
234
|
-
Discovery-only research gets one continuation to complete provider evidence. Every workflow failure
|
|
235
|
-
after run creation writes `failure.json` in the run directory, with the stage, session ID when available,
|
|
236
|
-
transcript, and cause chain. `vite` stays a peer — graph commands
|
|
237
|
-
load your app through Vite at runtime — and `lighthouse` is only needed by `pagegraph audit`.
|
|
238
|
-
Importing `pagegraph/audit` programmatically needs `effect@^4.0.0`. The Effect and TypeSafe
|
|
239
|
-
peers remain optional for other library entry points and the bundled CLI.
|
|
225
|
+
The CLI **bundles PageGraph's Effect, TypeSafe provider runtime, and Pi agent runtime**, so it does
|
|
226
|
+
not depend on the app's Effect version; it runs on [Bun](https://bun.sh) (`bunx pagegraph`). Every
|
|
227
|
+
workflow runs in-process on Pi 1.0.0. Improve workflows use guarded repository edit tools;
|
|
228
|
+
research and dry-run actions expose only read tools. Every workflow failure after run creation
|
|
229
|
+
writes `failure.json` with its stage, agent messages, and cause chain. `vite` stays a peer — graph commands load your app through Vite at
|
|
230
|
+
runtime — and `lighthouse` is only needed by `pagegraph audit`. Importing `pagegraph/audit`
|
|
231
|
+
programmatically needs `effect@^4.0.0`. The Effect and TypeSafe peers remain optional for other
|
|
232
|
+
library entry points and the bundled CLI.
|
|
240
233
|
|
|
241
234
|
### Agent skill
|
|
242
235
|
|
|
@@ -400,17 +393,26 @@ Preview hosts (`indexable: false`) drop `contentSignal` and `directives`;
|
|
|
400
393
|
|
|
401
394
|
## Agentic workflows
|
|
402
395
|
|
|
403
|
-
PageGraph
|
|
404
|
-
|
|
396
|
+
PageGraph combines the deterministic route graph with project-owned agent instructions, live
|
|
397
|
+
Executor tools, and Jev decisions. Every workflow uses Pi in-process. Scaffold the shared preset once:
|
|
405
398
|
|
|
406
399
|
```bash
|
|
407
400
|
pagegraph init
|
|
408
401
|
```
|
|
409
402
|
|
|
410
|
-
The generated `.pagegraph/
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
403
|
+
The generated `.pagegraph/agent` directory contains the `seo` agent instructions, `AGENTS.md`,
|
|
404
|
+
and customizable workflow skills with Executor recipes. Pi composes these files into its system
|
|
405
|
+
prompt and fails if a required file is missing. Pi uses its provider-specific environment variables
|
|
406
|
+
for model authentication, such as `ANTHROPIC_API_KEY` or `OPENAI_API_KEY`.
|
|
407
|
+
|
|
408
|
+
Research connects to [Executor](https://github.com/RhysSullivan/executor) through
|
|
409
|
+
`@pi-ext/executor`. Set `EXECUTOR_BASE_URL` to the server, plus `EXECUTOR_CLIENT_ID[_FILE]` and
|
|
410
|
+
`EXECUTOR_CLIENT_SECRET[_FILE]` when Cloudflare Access fronts it (both or neither). Every workflow
|
|
411
|
+
declines Executor approval requests, and only provider calls that succeeded count as evidence.
|
|
412
|
+
Use `executor_search` to discover tools and their TypeScript shapes, then `executor_execute` with
|
|
413
|
+
a TypeScript snippet calling `tools.<namespace>.<tool>(input)` and a top-level `return`.
|
|
414
|
+
Repository tools are `read_file`, `list_files`, and `search_text`; structured results go through
|
|
415
|
+
`submit_result`. Improve action turns expose `edit_file` and `write_file` in write mode.
|
|
414
416
|
|
|
415
417
|
Enable workflows in `pagegraph.config.ts`:
|
|
416
418
|
|
|
@@ -418,10 +420,10 @@ Enable workflows in `pagegraph.config.ts`:
|
|
|
418
420
|
export default defineSeoConfig({
|
|
419
421
|
// origin, disallow, and loadGraph as above
|
|
420
422
|
workflows: {
|
|
421
|
-
|
|
422
|
-
|
|
423
|
+
agent: {
|
|
424
|
+
presetDirectory: ".pagegraph/agent",
|
|
423
425
|
defaultModel: "openrouter/example/model",
|
|
424
|
-
// Optional per-
|
|
426
|
+
// Optional per-turn budget in milliseconds; default 180000.
|
|
425
427
|
timeoutMs: 360_000,
|
|
426
428
|
models: {
|
|
427
429
|
"research.keywords": "openrouter/example/research-model",
|
|
@@ -452,9 +454,9 @@ Executor's live catalog and inspect the discovered tools' argument schemas, then
|
|
|
452
454
|
structured observations with Jev. Tool paths are discovered at runtime; the generated skills contain
|
|
453
455
|
editable starter recipes, not a fixed integration list.
|
|
454
456
|
|
|
455
|
-
`workflows.
|
|
456
|
-
|
|
457
|
-
|
|
457
|
+
`workflows.agent.timeoutMs` sets the positive integer deadline in milliseconds for each Pi research or action turn
|
|
458
|
+
(maximum `2147483647`, default `180000`). Research and action share the same agent conversation,
|
|
459
|
+
so action turns retain the research context.
|
|
458
460
|
|
|
459
461
|
Selecting pages preserves their incoming and outgoing relationships to non-selected pages in
|
|
460
462
|
`evidence.neighborhood`. Those neighbors supply architecture context without becoming workflow
|
|
@@ -462,12 +464,13 @@ targets or consuming `--limit`. The agent receives the limit before research, an
|
|
|
462
464
|
the decoded result before decisions.
|
|
463
465
|
|
|
464
466
|
After research is validated, the run directory contains `research.json`: an incomplete checkpoint
|
|
465
|
-
with the collected evidence, decision inputs, and
|
|
466
|
-
its path so the evidence remains available for diagnosis. Only a completed workflow writes
|
|
467
|
+
with the collected evidence, decision inputs, and agent messages. A downstream failure
|
|
468
|
+
reports its path so the evidence remains available for diagnosis. Only a completed workflow writes
|
|
467
469
|
`run.json` and `summary.md`; a research checkpoint is not a final recommendation.
|
|
468
|
-
Model
|
|
469
|
-
|
|
470
|
-
|
|
470
|
+
Model results drop null properties and array elements before validation. Pi receives decode issues
|
|
471
|
+
and missing Executor evidence through `submit_result`, so it can correct the result in the same
|
|
472
|
+
agent loop; repeated rejected submissions fail the run. Every error after run creation writes
|
|
473
|
+
`failure.json` with the workflow, stage, agent messages, and full cause
|
|
471
474
|
chain. The error reports the artifact path and a next step; a failed artifact write preserves the
|
|
472
475
|
original error with a note.
|
|
473
476
|
|
|
@@ -486,20 +489,24 @@ original error with a note.
|
|
|
486
489
|
| `improve links` | Contextual internal-link edits from graph and page evidence |
|
|
487
490
|
|
|
488
491
|
The common selectors are repeatable `--page`, `--query`, and `--kind`, plus `--limit`, `--market`,
|
|
489
|
-
`--language`, `--refresh`, `--model`, `--
|
|
490
|
-
accept `--competitor`, `--domain`, or `--device desktop|mobile`.
|
|
491
|
-
|
|
492
|
+
`--language`, `--refresh`, `--model`, `--preset-directory`, and `--out`. Relevant workflows also
|
|
493
|
+
accept `--competitor`, `--domain`, or `--device desktop|mobile`. Workflow prompts direct the agent
|
|
494
|
+
to proceed without questions or forms and fail clearly when required input is missing.
|
|
492
495
|
|
|
493
496
|
The four `improve` workflows write source files by default and require a clean Git tree. Use
|
|
494
|
-
`--dry-run` to
|
|
497
|
+
`--dry-run` to expose only read tools, or `--allow-dirty` when you explicitly
|
|
495
498
|
want the agent to edit alongside existing changes. PageGraph leaves every diff uncommitted and
|
|
496
|
-
records modified, added, and deleted files after the workflow finishes.
|
|
499
|
+
records modified, added, and deleted files after the workflow finishes. Write tools reject paths
|
|
500
|
+
outside the repository, including symlink escapes, and paths under `.git`, `node_modules`,
|
|
501
|
+
the runs directory, and the preset directory. There is no shell tool. For `improve links`,
|
|
502
|
+
`fetch_page` reads extracted sentences from served pages on suggestion-report origins, respecting
|
|
503
|
+
robots rules and the response size limit.
|
|
497
504
|
|
|
498
505
|
Each run writes `.pagegraph/runs/<run-id>/run.json` and `summary.md`. The JSON retains the
|
|
499
|
-
deterministic graph, context,
|
|
500
|
-
|
|
501
|
-
ignored: provider output can be large or account-specific. Workflows fail when the configured model,
|
|
502
|
-
|
|
506
|
+
deterministic graph, context, Executor tool evidence, Jev question definitions and answers, Git
|
|
507
|
+
provenance, changed files, and model provenance. Schema-version-2 artifacts record `agent.runtime`
|
|
508
|
+
as the literal `pi`, with messages and usage. Keep this directory ignored: provider output can be large or account-specific. Workflows fail when the configured model,
|
|
509
|
+
Executor toolset, catalog search plus completed tool call, or `TYPESAFE_API_KEY` for Jev is
|
|
503
510
|
unavailable.
|
|
504
511
|
|
|
505
512
|
## Typed paths
|