@foldspace_npm/harness 0.1.30 → 0.1.31

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 CHANGED
@@ -29,8 +29,8 @@ session ends at something they can **see on their own page** - not at
29
29
 
30
30
  | Result | Do |
31
31
  |---|---|
32
- | The tool does not exist | The Foldspace MCP is not installed in this editor. Install it yourself, the one way that fits *this* region and editor. **EU** - any editor: the MCP block on <https://foldspace.ai/eu/agents.md>, never the plugin. **US** - Claude Code with git on the machine (`command -v git`): `claude plugin marketplace add https://github.com/foldspace-ai/plugins` (already added, or added from another source, is fine), then `claude plugin install foldspace-agent-builder@foldspace-plugins`; without git, or any other editor: the MCP block on <https://foldspace.ai/agents.md>. Either way it needs sign-in: start it before your turn ends, as **Connect Foldspace tools** on that page says. **The plugin** loads when your turn ends: call `list_agents` again on the human's next message. **A server added from the MCP block** (`claude mcp add`) never reaches a chat that is already running - not on the next message, not through `/mcp`: once it is signed in, the human opens a new chat in this folder and repeats their request. `claude mcp get` saying Connected proves only the setting; the check is `list_agents` in the chat you are in |
33
- | It exists but fails on auth | Installed, not signed in. Only the human can approve sign-in. Tell them exactly where - Claude Code: `/mcp` → **foldspace-eu** (**EU**) or **foldspace** (**US**; listed as `plugin:foldspace-agent-builder:foldspace` when the plugin installed it) → finish in the browser - then check again. If `/mcp` does not list that server, it was added after this chat started: the human opens a new chat in this folder, as above |
32
+ | The tool does not exist | The Foldspace MCP is not installed in this editor. Install it yourself, the one way that fits *this* region and editor. **EU** - any editor: the MCP block on <https://foldspace.ai/eu/agents.md>, never the plugin. **US** - Claude Code with git on the machine (`command -v git`): `claude plugin marketplace add https://github.com/foldspace-ai/plugins` (already added, or added from another source, is fine), then `claude plugin install foldspace-agent-builder@foldspace-plugins`; without git, or any other editor: the MCP block on <https://foldspace.ai/agents.md>. Either way it needs sign-in: start it before your turn ends, as **Connect Foldspace tools** on that page says. **The plugin** loads when your turn ends: call `list_agents` again on the human's next message. **A server added from the MCP block** (`claude mcp add`) never reaches a chat that is already running - not on the next message, not through `/mcp`: once it is signed in, the human opens a new chat in this folder and repeats their request. `claude mcp get` saying Connected proves only the setting; the check is `list_agents` in the chat you are in. **Codex**: `codex mcp add foldspace --url https://api.foldspace.ai/mcp` (**EU**: `foldspace-eu` and `https://api.eu.foldspace.ai/mcp`) adds it and starts sign-in in one step; a server added during a thread never reaches that thread, so once it is signed in the work continues in a new thread in this folder: start it yourself if Codex gives you a tool for it - the human's request word for word, plus the one paragraph the playbook's Codex block gives - and say so in one line; otherwise the human starts it and repeats their request. **Cursor**: merge the server into `~/.cursor/mcp.json` yourself, keeping every other server; it reaches this chat on the human's next message, needing sign-in. **Any editor**: never read a saved sign-in or credentials file, and never reach the Foldspace MCP any other way (curl, a script, a client you write). If its tools are not in this chat, the fix is a new chat |
33
+ | It exists but fails on auth | Installed, not signed in. Only the human can approve sign-in. Tell them exactly where - Claude Code: `/mcp` → **foldspace-eu** (**EU**) or **foldspace** (**US**; listed as `plugin:foldspace-agent-builder:foldspace` when the plugin installed it) → finish in the browser - then check again. If `/mcp` does not list that server, it was added after this chat started: the human opens a new chat in this folder, as above. Codex: run `codex mcp login foldspace` (`foldspace-eu` for **EU**) - if the browser does not open, give the human the link it prints - then a new thread. Cursor: call the server's own sign-in tool, `mcp_auth`, yourself - the human finishes in the browser - then `list_agents` in this same chat |
34
34
  | It returns agents | One agent: state its name, Agent Key and product in a line and carry on; the human objects if it is wrong. Several: ask which, as a choice |
35
35
 
36
36
  3. **Orient** — `get_agent_settings`, `list_actions`, `list_task_agents`,
@@ -162,7 +162,7 @@ Uploads and extraction are a later session.
162
162
  ### Ask as a choice, and ask almost nothing
163
163
 
164
164
  Every question to the human is an **enumerated choice with the recommended
165
- option first** (in Claude Code, `AskUserQuestion`). A first session asks only
165
+ option first** (in Claude Code, `AskUserQuestion`; elsewhere, the editor's own question tool), asked once - not repeated in your message. A first session asks only
166
166
  this: which agent (only if several), the app's hostname, which experience
167
167
  first - and a yes wherever this manual asks for one, such as agreeing the
168
168
  experience (below), upgrading, publishing an action, task agent or
@@ -794,6 +794,18 @@ import is right.
794
794
  `Bash(npx foldspace observe:*)` - and meanwhile hand that step to them: for
795
795
  a chat turn, that is them typing the question into the panel. `init`,
796
796
  `upgrade` and `deploy` ask on purpose: never give an allow rule for them.
797
+ - **A sandbox error is not a refusal.** Some editors (Codex) run your commands
798
+ in a sandbox: no network, and no writes outside this folder, unless the
799
+ human approves that one command. There `npm`, `npx foldspace`, `inject` and
800
+ anything that reaches the test window fail with errors that look like
801
+ something else - a host that cannot be resolved, `EPERM` in npm's cache,
802
+ `listen EPERM`, Chrome quitting, or *the test window is closed*. Ask to run
803
+ that same command outside the sandbox through the editor's own approval,
804
+ with one plain line on why; that approval is not a retry. Never move npm's
805
+ cache, change file ownership, or have the human run the command instead.
806
+ An approval can expire when the human sends a new message, so after one,
807
+ the same errors mean ask again - not that the window closed. If the human
808
+ declines, that is a refusal: the rule above applies.
797
809
  - **Never create an account or a key** - not in Foldspace, not in the
798
810
  customer's product, not anywhere. If one is missing, say which and where it
799
811
  goes. **Never widen your own access**: if something is refused for a site or
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foldspace_npm/harness",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "description": "Build and verify portable Foldspace action artifacts against a live app.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,24 @@
1
+ # Foldspace actions for {{APP_DOMAIN}}
2
+
3
+ This folder builds a Foldspace agent for {{APP_DOMAIN}}. Its manual is
4
+ `node_modules/@foldspace_npm/harness/CLAUDE.md` - written for every coding
5
+ agent, whatever the file name says.
6
+
7
+ **Read that manual in full before anything else**, and follow it from **Every
8
+ session starts the same way**. It is long: read it in parts of about 250 lines
9
+ until you reach its last line, because a tool that cuts long output short has
10
+ not shown you all of it. If the file is missing, run
11
+ `npm install --ignore-scripts` first. Run every command from this folder, even
12
+ when your chat started somewhere else. What follows is only what is true of
13
+ **this** product.
14
+
15
+ ## This product
16
+
17
+ | | |
18
+ |---|---|
19
+ | Agent Key | `{{AGENT_API_NAME}}` |
20
+ | Product ID | `{{PRODUCT_ID}}` |
21
+ | App | `{{APP_DOMAIN}}` |
22
+
23
+ What is known about this app, and how each fact was established, is in
24
+ `docs/app-profile.md`.