Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 30 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Profile-bound CLI for agent-first access to growth providers. This repository
has one CLI and one workspace package: `gkit`.

The reviewed provider surface includes DataForSEO, PostHog, Google Ads, Google
Search Console, Bing Webmaster, and HubSpot.
Search Console, Bing Webmaster, HubSpot, and PageSpeed Insights.

## Requirements

Expand Down Expand Up @@ -107,6 +107,11 @@ Provider execution must bind exactly one App profile. Create one JSON file at
"secrets": {
"accessToken": "env:MY_APP_HUBSPOT_ACCESS_TOKEN"
}
},
"pagespeed": {
"secrets": {
"apiKey": "env:MY_APP_PAGESPEED_API_KEY"
}
}
}
}
Expand Down Expand Up @@ -157,7 +162,7 @@ reviewing the request:

```bash
gkit --profile my-app gsc api call \
--operation-id gsc.properties.list \
--capability-id gsc.properties.list \
--input '{}' \
--out ./gsc-properties-plan.json \
--dry-run
Expand All @@ -167,7 +172,7 @@ Remove `--dry-run` only when the profile and request are correct:

```bash
gkit --profile my-app gsc api call \
--operation-id gsc.properties.list \
--capability-id gsc.properties.list \
--input '{}' \
--out ./gsc-properties.json
```
Expand All @@ -181,7 +186,7 @@ it gkit fails with `EFFECT_NOT_ALLOWED` before any request:

```bash
gkit --profile my-app gsc api call \
--operation-id gsc.sitemaps.submit \
--capability-id gsc.sitemaps.submit \
--input '{"feedpath":"https://example.com/sitemap.xml"}' \
--allow-write \
--out ./gsc-sitemap-submit.json
Expand All @@ -192,6 +197,11 @@ Search Console; a Restricted user receives `AUTH_FAILED`. Google returns an
empty body, so the artifact is a gkit receipt with `siteUrl`, `feedpath`, and
`httpStatus`.

Each live call is journaled under `meta.operationId`. Run `gkit operations` to
see recent operations and anything still `unknown`; reconcile those with
`gkit operations reconcile` and a provider evidence reference instead of
rerunning them.

### HubSpot read-only example

HubSpot uses one profile-bound private-app access token and calls the REST API
Expand All @@ -205,7 +215,7 @@ cannot be dispatched.
gkit --profile my-app hubspot doctor
gkit describe --id hubspot.crm.objects.search
gkit --profile my-app hubspot api call \
--operation-id hubspot.crm.objects.search \
--capability-id hubspot.crm.objects.search \
--input @hubspot-search.json \
--out ./hubspot-contact-search.json \
--dry-run
Expand All @@ -221,6 +231,21 @@ for the analysis. Search pages are capped at 200 and one search query cannot
page beyond 10,000 results; other list surfaces use lower reviewed page and
total-result bounds documented by `describe`.

### PageSpeed Insights example

`pagespeed.run` runs Lighthouse for one URL and returns category scores plus
whether Chrome UX Report field data exists for the URL and its origin; the raw
PageSpeed response is the artifact. The `apiKey` secret is optional: without it
requests share Google's low anonymous quota. Runs take tens of seconds.

```bash
gkit --profile my-app pagespeed doctor
gkit --profile my-app pagespeed api call \
--capability-id pagespeed.run \
--input '{"url":"https://example.com/","strategy":"mobile","categories":["performance","seo"]}' \
--out ./pagespeed-home.json
```

## Configure an Agent

Agents do not need provider-specific CLIs or their own copies of credentials.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
type: ADR
status: accepted
---

# Journal every live Operation from the Provider Module seam

The Operation Journal (`operations.jsonl`, ADR-0015) now records every live Growth Operation for every provider and effect, and the DataForSEO-only spend ledger is removed. An Operation enters the Journal with one `attempt_started` event written immediately before the Provider Module receives control (ADR-0009), settles with `attempt_settled`, and links its published Evidence with `artifact_recorded`. Spend is not a separate store: a spend capability's `attempt_started` carries the reviewed spend authorization, and every settlement of that Operation carries its spend facts, because the authorization and settlement are created, settled, and reconciled together with the Operation. Spend blockers, Operation State (`unknown`, `not_dispatched`, `succeeded`, `failed`), and `succeeded`-requires-Evidence (ADR-0012) are projections over these events, never stored statuses.

This supersedes the start point of ADR-0003 and the vocabulary of ADR-0014. Calls that fail syntax, validation, profile, effect, or credential checks, and dry-runs, have no provider effect and are not journaled. A settlement whose provider result or spend amount is unknown stays open and changes only through an evidence-backed manual reconciliation of that same Operation (ADR-0013); a confirmed provider result is never changed. `--capability-id` now selects the capability and `meta.operationId` carries the runtime identity, completing ADR-0008. No migration reads the removed `ledger.jsonl`; no host had one when this landed.
Loading
Loading