@foldspace_npm/harness 0.1.26 → 0.1.28
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/CLAUDE.md +402 -204
- package/README.md +84 -36
- package/bin/ask.mjs +19 -9
- package/bin/attach.mjs +91 -56
- package/bin/badge.mjs +28 -8
- package/bin/cli.mjs +23 -6
- package/bin/inject.mjs +3 -4
- package/bin/observe.mjs +22 -6
- package/bin/published.mjs +141 -0
- package/package.json +6 -2
- package/recipes/INDEX.md +13 -8
- package/recipes/README.md +30 -7
- package/recipes/account-overview/README.md +6 -6
- package/recipes/account-overview/agent/actions/show_account_overview.ts +11 -16
- package/recipes/account-overview/agent/views/brand.ts +23 -14
- package/recipes/account-overview/agent/views/overview.ts +13 -17
- package/recipes/bottom-bar/README.md +12 -9
- package/recipes/bottom-bar/agent/bottomBar.ts +14 -12
- package/recipes/create-a-record/README.md +97 -0
- package/recipes/create-a-record/agent/actions/create_project.ts +26 -0
- package/recipes/create-a-record/agent/api/projects.ts +62 -0
- package/recipes/create-a-record/agent/projects.ts +145 -0
- package/recipes/create-a-record/agent/views/approval.ts +181 -0
- package/recipes/create-a-record/agent/views/brand.ts +35 -0
- package/recipes/create-a-record/agent/views/fields.ts +252 -0
- package/recipes/create-a-record/agent/views/project-card.ts +253 -0
- package/recipes/create-a-record/agent/views/steps.ts +92 -0
- package/recipes/create-a-record/fixtures/owners.ok.json +9 -0
- package/recipes/create-a-record/fixtures/project.created.json +1 -0
- package/recipes/create-a-record/fixtures/project.rejected.json +1 -0
- package/recipes/create-a-record/recipe.json +13 -0
- package/recipes/create-a-record/variants/actions/create_project.steps.ts +160 -0
- package/recipes/find-by-name/README.md +3 -1
- package/recipes/find-by-name/agent/actions/find_project_id.ts +1 -1
- package/recipes/lookup-then-view/README.md +73 -0
- package/recipes/lookup-then-view/agent/accounts.ts +174 -0
- package/recipes/lookup-then-view/agent/actions/find_account.ts +108 -0
- package/recipes/lookup-then-view/agent/actions/show_account_overview.ts +42 -0
- package/recipes/lookup-then-view/agent/api/accounts.ts +68 -0
- package/recipes/lookup-then-view/agent/views/account.ts +183 -0
- package/recipes/lookup-then-view/agent/views/brand.ts +35 -0
- package/recipes/lookup-then-view/agent/views/format.ts +73 -0
- package/recipes/lookup-then-view/agent/views/pick-one.ts +240 -0
- package/recipes/lookup-then-view/fixtures/accounts.json +319 -0
- package/recipes/lookup-then-view/fixtures/overview.ok.json +122 -0
- package/recipes/lookup-then-view/fixtures/overview.unsigned.json +14 -0
- package/recipes/lookup-then-view/recipe.json +11 -0
- package/recipes/lookup-then-view/studio/find_account.json +10 -0
- package/recipes/lookup-then-view/studio/show_account_overview.json +15 -0
- package/recipes/opportunities-at-risk/README.md +5 -5
- package/recipes/opportunities-at-risk/agent/actions/show_opportunities_at_risk.ts +9 -7
- package/recipes/opportunities-at-risk/agent/opportunities.ts +11 -10
- package/recipes/opportunities-at-risk/agent/views/at-risk.ts +1 -1
- package/recipes/opportunities-at-risk/agent/views/brand.ts +26 -15
- package/recipes/pick-from-a-list/README.md +7 -6
- package/recipes/pick-from-a-list/agent/actions/choose_project.ts +27 -12
- package/recipes/pick-from-a-list/agent/views/brand.ts +30 -9
- package/recipes/pick-from-a-list/agent/views/picker.ts +3 -3
- package/recipes/prepare-for-a-meeting/README.md +4 -4
- package/recipes/prepare-for-a-meeting/agent/actions/prepare_for_meeting.ts +3 -3
- package/recipes/records-list/README.md +6 -6
- package/recipes/records-list/agent/accounts.ts +3 -1
- package/recipes/records-list/agent/actions/list_accounts.ts +7 -7
- package/recipes/records-list/agent/views/brand.ts +26 -14
- package/recipes/server-rendered-forms/README.md +35 -0
- package/recipes/server-rendered-forms/agent/actions/create_record_via_form.ts +62 -0
- package/recipes/server-rendered-forms/agent/api/pages.ts +57 -0
- package/recipes/server-rendered-forms/agent/forms.ts +192 -0
- package/recipes/server-rendered-forms/fixtures/form.errors.html +9 -0
- package/recipes/server-rendered-forms/fixtures/form.html +17 -0
- package/recipes/server-rendered-forms/fixtures/list.html +9 -0
- package/recipes/server-rendered-forms/fixtures/record.html +4 -0
- package/recipes/server-rendered-forms/recipe.json +10 -0
- package/recipes/several-hosts/README.md +10 -13
- package/recipes/several-hosts/agent/hosts.ts +19 -136
- package/recipes/several-hosts/fixtures/wrong-page.json +6 -0
- package/recipes/several-hosts/recipe.json +3 -3
- package/recipes/swap-the-login-method/README.md +16 -5
- package/recipes/swap-the-login-method/agent/utils.ts +52 -3
- package/recipes/swap-the-login-method/variants/utils.cookies.ts +59 -6
- package/recipes/update-meeting-notes/README.md +10 -4
- package/recipes/update-meeting-notes/agent/actions/update_meeting_notes.ts +16 -5
- package/recipes/upload-contacts/README.md +5 -5
- package/recipes/upload-contacts/agent/actions/upload_contacts.ts +7 -7
- package/recipes/upload-contacts/agent/views/brand.ts +24 -14
- package/recipes/upload-contacts/agent/views/uploader.ts +28 -17
- package/recipes/who-is-the-user/README.md +7 -3
- package/src/ask-core.mjs +16 -4
- package/src/attach-daemon.mjs +9 -2
- package/src/attach-helpers.mjs +105 -0
- package/src/attach-preflight.mjs +34 -11
- package/src/badge-core.mjs +1 -1
- package/src/cdp-client.mjs +15 -19
- package/src/cdp-ownership.mjs +41 -20
- package/src/cli-help.mjs +7 -5
- package/src/cli-registry.mjs +102 -47
- package/src/diagnostics.mjs +1 -1
- package/src/init.mjs +5 -3
- package/src/keep-focus.mjs +17 -13
- package/src/lint/index.mjs +8 -1
- package/src/lint/rules.mjs +240 -43
- package/src/observe-core.mjs +163 -34
- package/src/published-core.mjs +392 -0
- package/src/region.mjs +1 -1
- package/src/runtime/agent.ts +16 -12
- package/src/runtime/http.ts +25 -15
- package/src/runtime/match.ts +1 -1
- package/src/runtime/render.ts +4 -4
- package/src/transports/README.md +2 -2
- package/src/upgrade.mjs +33 -10
- package/templates/agent-starter/CLAUDE.md +8 -5
- package/templates/agent-starter/README.md +32 -33
- package/templates/agent-starter/agent/actions/_example.ts +4 -4
- package/templates/agent-starter/agent/actions/index.ts +2 -2
- package/templates/agent-starter/agent/constants.ts +4 -3
- package/templates/agent-starter/agent/utils.ts +15 -18
- package/templates/agent-starter/claude-settings.json +2 -1
- package/templates/agent-starter/docs/app-profile.md +19 -14
- package/templates/agent-starter/foldspace.dev.json +1 -1
- package/recipes/several-hosts/fixtures/nav-record.json +0 -5
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
Durable facts about `{{APP_DOMAIN}}` and its API, established by observing the
|
|
4
4
|
running app on **<date>** from a logged-in session.
|
|
5
5
|
|
|
6
|
-
**
|
|
7
|
-
|
|
8
|
-
quoting this file. Re-run the probe before trusting an entry
|
|
6
|
+
**Every entry says how it was established.** Where something is only
|
|
7
|
+
believed, mark it **assumed** in the same breath - do not promote an
|
|
8
|
+
assumption by quoting this file. Re-run the probe before trusting an entry
|
|
9
|
+
that matters.
|
|
9
10
|
|
|
10
11
|
Do not store secrets, cookies, HAR files, tokens, or session data here. Record
|
|
11
12
|
*where* the token lives and *what a redacted value looks like*, never the value.
|
|
@@ -13,9 +14,9 @@ Do not store secrets, cookies, HAR files, tokens, or session data here. Record
|
|
|
13
14
|
How to re-run any probe below:
|
|
14
15
|
|
|
15
16
|
```bash
|
|
16
|
-
npm run inject
|
|
17
|
-
|
|
18
|
-
#
|
|
17
|
+
npm run inject # only if the test window is closed; the human signs in there
|
|
18
|
+
npx foldspace observe wait-login
|
|
19
|
+
# observe reads the test window, and works while attach runs.
|
|
19
20
|
npx foldspace observe screen --click "<a label from observe menu>" --match "<words for the data>"
|
|
20
21
|
npx foldspace observe read "<the GET path screen returned>"
|
|
21
22
|
```
|
|
@@ -27,9 +28,9 @@ Start URL: `{{START_URL}}`
|
|
|
27
28
|
## Auth
|
|
28
29
|
|
|
29
30
|
- Where the token lives (cookie name, `localStorage` key, custom header), and
|
|
30
|
-
how you know
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
how you know: `npx foldspace observe auth` reports where each header value
|
|
32
|
+
comes from, never the value.
|
|
33
|
+
- Its lifetime, measured: a short one ends probing sessions halfway.
|
|
33
34
|
- What an expired or refused response looks like, verbatim. A CORS-less refusal
|
|
34
35
|
often surfaces as `TypeError: Failed to fetch` with no status — that is not
|
|
35
36
|
"host down".
|
|
@@ -43,8 +44,11 @@ Start URL: `{{START_URL}}`
|
|
|
43
44
|
|
|
44
45
|
## Account contents
|
|
45
46
|
|
|
46
|
-
Row counts
|
|
47
|
-
|
|
47
|
+
Row counts for the experience being built, checked when you observe it. Zero
|
|
48
|
+
rows makes a demo of an empty state: say so and offer the next experience. On
|
|
49
|
+
an account with nothing to read at all, say so and offer first a card that
|
|
50
|
+
creates a record when the end user approves
|
|
51
|
+
(`node_modules/@foldspace_npm/harness/recipes/create-a-record`).
|
|
48
52
|
|
|
49
53
|
| Resource | Count | How established |
|
|
50
54
|
|---|---|---|
|
|
@@ -93,9 +97,10 @@ Mark which you verified and which came from reading the app bundle.
|
|
|
93
97
|
|
|
94
98
|
## Brand (sampled, not guessed)
|
|
95
99
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
100
|
+
`npx foldspace observe styles --write` samples the app's accent, text, border,
|
|
101
|
+
font and radius and writes `agent/views/brand.ts`. Record here the page and
|
|
102
|
+
date it sampled, and anything it fell back on. Re-sample per product; never
|
|
103
|
+
copy values across.
|
|
99
104
|
|
|
100
105
|
## Endpoints seen in the bundle but NOT called
|
|
101
106
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$comment": "Generated by foldspace init. Use the bare product ID, not the EU
|
|
2
|
+
"$comment": "Generated by foldspace init. Use the bare product ID, not the SDK key (the one that starts with EU-, in every region).",
|
|
3
3
|
"defaultTarget": "app",
|
|
4
4
|
"region": {{REGION_JSON}},
|
|
5
5
|
"sdkUrl": {{SDK_URL_JSON}},
|