@agentshouse/skills 0.1.0-c24b2d26daab4 → 0.1.0-c3cd754e7f514

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 CHANGED
@@ -7,8 +7,6 @@ The Skills agents.house serves its agents, and the texts its agents read.
7
7
  skill and `wizard`, file for file beside upstream's `LICENSE`. `upstream.json` names the
8
8
  upstream commit, its date and the skills taken from it. Beside them stand agents.house's own
9
9
  `prototype-app`, `build-app` and `wizard`.
10
- - `guide/` is the Guide, the pages agents.house serves its agents by path: `index` is its root, and
11
- each page opens with its title and one line on what it is for.
12
10
  - `how-we-work.md` is the How-we-work document's text, and `how-we-work-earlier.json` the
13
11
  SHA-256 of every earlier text.
14
12
  - `app-guide.json` is the guide to building an App or a Site, and `agent-instructions.json` the
@@ -21,9 +19,8 @@ for (const { name } of listSkills()) console.log(name, readSkill(name).length);
21
19
  console.log(HOW_WE_WORK);
22
20
  ```
23
21
 
24
- `agentInstructions(houseRef, copies)` returns the first prompt's lines, `GUIDE` every Guide page
25
- with its path, title, first line and text, `APP_GUIDE` the App guide's lines and
26
- `EARLIER_HOW_WE_WORK_SHA256` the earlier texts' digests.
22
+ `agentInstructions(houseRef, copies)` returns the first prompt's lines, `APP_GUIDE` the guide's
23
+ lines and `EARLIER_HOW_WE_WORK_SHA256` the earlier texts' digests.
27
24
 
28
25
  The skills come from [mattpocock/skills](https://github.com/mattpocock/skills); thank you, Matt
29
26
  Pocock.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "lines": [
3
3
  "From House:",
4
- "Work with House through the `house` CLI: run `house --help`, and `house open_guide` opens `index`, the root page of House's guides and formats.",
4
+ "Work with House through the `house` CLI: run `house --help`, and `house find_command` for House's guides and formats.",
5
5
  "To give the User a file, upload it with `house upload` and link it; for an App, a Site or a website, follow `house find_command '{\"query\":\"app\"}'`. Never start a server.",
6
6
  "Optional per-Room instructions: `/rooms/private/rooms/<handle>/AGENTS.md`.",
7
7
  "For another Agent's help, `send_routine_request`; its mail comes back into this conversation. If an Agent of your User has no Routine to call, write one in the Private Room and `create_routine_access` with your User as its only caller."
package/app-guide.json CHANGED
@@ -60,13 +60,13 @@
60
60
  "",
61
61
  "## Data",
62
62
  "",
63
- "- Design the Room schema first. Each thing the App shows is one Markdown document in a Room: its frontmatter `type` names its MD type, the rest of its frontmatter holds the fields, and long text goes in `##` sections. `schema.yaml` declares the types (`open_guide` `reference/schema`).",
63
+ "- Design the Room schema first. Each thing the App shows is one Markdown document in a Room: its frontmatter `type` names its MD type, the rest of its frontmatter holds the fields, and long text goes in `##` sections. `schema.yaml` declares the types (`find_command` \"Schema\").",
64
64
  "- Keep each type in its own folder, such as `tasks/`, and read it by `pathPrefix`: a query naming `types` fails with `unknown-type` while no bound Room declares them.",
65
65
  "- Link types with `reference` fields instead of copying values; a query follows them with `hop` and `backlinks`.",
66
66
  {
67
67
  "act": "sites/create",
68
- "text": "- `app.json` `room_slots` names the Rooms the App needs, each with `access` `read` or `write` and the `types` it uses (`open_guide` `reference/app-manifest`). Bind Rooms with `set_app_bindings`, a Site's with `set_site_bindings`; App code cannot bind and reaches only bound Rooms, so it opens `bridge.ceremony('/bind/<app_ref>?slot=<name>')`, the House page where your User binds Rooms and connects account slots, which returns to the App.",
69
- "without": "- `app.json` `room_slots` names the Rooms the App needs, each with `access` `read` or `write` and the `types` it uses (`open_guide` `reference/app-manifest`). Bind Rooms with `set_app_bindings`; App code cannot bind and reaches only bound Rooms, so it opens `bridge.ceremony('/bind/<app_ref>?slot=<name>')`, the House page where your User binds Rooms and connects account slots, which returns to the App."
68
+ "text": "- `app.json` `room_slots` names the Rooms the App needs, each with `access` `read` or `write` and the `types` it uses (`find_command` \"App manifest\"). Bind Rooms with `set_app_bindings`, a Site's with `set_site_bindings`; App code cannot bind and reaches only bound Rooms, so it opens `bridge.ceremony('/bind/<app_ref>?slot=<name>')`, the House page where your User binds Rooms and connects account slots, which returns to the App.",
69
+ "without": "- `app.json` `room_slots` names the Rooms the App needs, each with `access` `read` or `write` and the `types` it uses (`find_command` \"App manifest\"). Bind Rooms with `set_app_bindings`; App code cannot bind and reaches only bound Rooms, so it opens `bridge.ceremony('/bind/<app_ref>?slot=<name>')`, the House page where your User binds Rooms and connects account slots, which returns to the App."
70
70
  },
71
71
  "- A bound Room must hold each slot type identically in its own `settings/schema.yaml`, beside any other types, or your User is warned. Write it with `edit` before binding; `create_room` makes a new Room.",
72
72
  "- Read an existing Room's `settings/schema.yaml` before inventing types. Two Apps over one schema are two interfaces over the same data, and your User's Agents read and write those documents too.",
package/dist/index.d.ts CHANGED
@@ -17,14 +17,6 @@ export interface SkillFile {
17
17
  readonly path: string;
18
18
  readonly content: string;
19
19
  }
20
- export interface GuidePage {
21
- readonly path: string;
22
- readonly title: string;
23
- readonly line: string;
24
- readonly text: string;
25
- }
26
- export declare const GUIDE_ROOT = "index";
27
- export declare const GUIDE: readonly GuidePage[];
28
20
  export declare const HOW_WE_WORK: string;
29
21
  export declare const EARLIER_HOW_WE_WORK_SHA256: readonly string[];
30
22
  export declare const APP_GUIDE: Guide;
package/dist/index.js CHANGED
@@ -5,31 +5,9 @@ const PACKAGE = fileURLToPath(new URL('..', import.meta.url));
5
5
  const SET = join(PACKAGE, 'set');
6
6
  const ENTRY = 'SKILL.md';
7
7
  const REF_PLACEHOLDER = '<house-ref>';
8
- const TREE = join(PACKAGE, 'guide');
9
- const PAGE = '.md';
10
- const FRONTMATTER = /^---\n[\s\S]*?\n---\n/u;
11
- const HEADING = /^# /u;
12
- export const GUIDE_ROOT = 'index';
13
8
  function packaged(name) {
14
9
  return readFileSync(join(PACKAGE, name), 'utf8');
15
10
  }
16
- function guidePage(file) {
17
- const text = readFileSync(join(TREE, file), 'utf8');
18
- const [heading = '', , line = ''] = text.replace(FRONTMATTER, '').split('\n');
19
- return {
20
- path: file.slice(0, -PAGE.length).split(sep).join('/'),
21
- title: heading.replace(HEADING, ''),
22
- line,
23
- text,
24
- };
25
- }
26
- export const GUIDE = readdirSync(TREE, {
27
- recursive: true,
28
- withFileTypes: true,
29
- })
30
- .filter((entry) => entry.isFile() && entry.name.endsWith(PAGE))
31
- .map((entry) => guidePage(relative(TREE, join(entry.parentPath, entry.name))))
32
- .sort((left, right) => (left.path < right.path ? -1 : 1));
33
11
  export const HOW_WE_WORK = packaged('how-we-work.md');
34
12
  export const EARLIER_HOW_WE_WORK_SHA256 = JSON.parse(packaged('how-we-work-earlier.json'));
35
13
  export const APP_GUIDE = JSON.parse(packaged('app-guide.json'));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agentshouse/skills",
3
- "version": "0.1.0-c24b2d26daab4",
4
- "description": "The Skills agents.house serves its agents, upstream's verbatim beside its own, and the texts its agents read: the Guide, the How-we-work document, the App guide and the Agent instructions",
3
+ "version": "0.1.0-c3cd754e7f514",
4
+ "description": "The Skills agents.house serves its agents, upstream's verbatim beside its own, and the texts its agents read: the How-we-work document, the App guide and the Agent instructions",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "publishConfig": {
@@ -19,7 +19,6 @@
19
19
  "files": [
20
20
  "dist",
21
21
  "set",
22
- "guide",
23
22
  "upstream.json",
24
23
  "how-we-work.md",
25
24
  "how-we-work-earlier.json",
@@ -1,9 +0,0 @@
1
- # Get started
2
-
3
- How your User signs up for House and connects you.
4
-
5
- House keeps Markdown files in Rooms, which your User shares with other people and their agents.
6
-
7
- Sign-up page: <origin>/sign-up
8
-
9
- Unless this client already reads your User's Rooms, register there and connect it; then find out what your User wants, keep the plan with `edit` as documents in their First Room, which `list_rooms` names, and make the Rooms yourself with `create_room` through `run_command`.
package/guide/index.md DELETED
@@ -1,7 +0,0 @@
1
- # House
2
-
3
- Where House's guides and formats start: `open_guide` opens a page by its `path` or finds pages by `words`.
4
-
5
- House keeps Markdown files in Rooms, which your User shares with other people and their agents.
6
-
7
- - `reference/`, the formats House reads: [Read level](reference/read-level), [App manifest](reference/app-manifest), [Routine](reference/routine), [Schema](reference/schema) and [Triggers](reference/triggers).
@@ -1,12 +0,0 @@
1
- # App manifest
2
-
3
- What an App's `app.json` declares.
4
-
5
- App manifest, `app.json` at an App’s root: `entry`, its HTML page, and `room_slots`, each with a `name`, `access` `read` or `write`, and `types` from the `schema.yaml` beside it, written like a Room schema; `set_app_bindings` fills a slot with Rooms. Where needed it adds `external_origins`, the https origins its page may reach; `account_slots`, each a `name`, the service’s `origin` and its key `form`, `{kind: bearer}`, `{kind: basic}`, `{kind: header, name}`, `{kind: query, name}` or `{kind: path, prefix}`; `conversations: true` to read your User’s conversations; `local_search: true` to call `search`; `inboxes: true` to show and answer customer chats, naming `inbox-chat` and `inbox-message` in `room_slots`; and `theme_colour`, `#rrggbb`. `find_command` "app" shows how its page works.
6
-
7
- ```json
8
- {
9
- "entry": "index.html",
10
- "room_slots": [{ "name": "tasks", "access": "write", "types": ["task"] }]
11
- }
12
- ```
@@ -1,9 +0,0 @@
1
- # Read level
2
-
3
- How much of a Room a grant or a Share lets its holder read, and where.
4
-
5
- Read level, `read` on a Room grant or a Share’s Room item, each level including the one before it: `mcp`, MCP Read, reads through `search`, `shell` and `inspect` alone, each reply at most <mcp-read-size> of the Room’s text, with no copy anywhere; `online`, Online Read, also opens the Room in browser Apps while the browser is online, and reads as `mcp` everywhere else; `local`, Local Read, copies the Room to the browser and the Environments, offline included, and is the one `export` needs. Apps need `online` or `local`.
6
-
7
- ```json
8
- { "room_ref": "r_ab12.1", "read": "online", "operations": ["write"] }
9
- ```
@@ -1,14 +0,0 @@
1
- # Routine
2
-
3
- How a Routine document in the Private Room is written.
4
-
5
- Routine, `/rooms/private/collaboration/routines/<name>.md`: `description` and `input`, a text saying what to send, empty if nothing; the body is the instruction. A Routine Request's input is text the Agent reads, and House checks no shape.
6
-
7
- ```markdown
8
- ---
9
- description: Summarize a thread in five bullets.
10
- input: The thread to summarize, as a ref or pasted text.
11
- ---
12
-
13
- Read the thread and write five bullets under summaries/.
14
- ```
@@ -1,28 +0,0 @@
1
- # Schema
2
-
3
- How a Room's `settings/schema.yaml` declares its document types.
4
-
5
- Schema, `/rooms/<room>/settings/schema.yaml`: one JSON Schema in YAML. Each top-level key is an MD type holding the schema of its frontmatter; `$defs` holds shapes reused through `$ref: '#/$defs/<name>'`. An object setting neither `additionalProperties` nor `unevaluatedProperties` refuses other keys. House adds `reference` on a string at any depth, naming the types, or `attachment`, its value links to, and `cross_room: true` beside it, letting that be another Room's document of those types; a link or reference written as its `/rooms/<room>/` path is stored relative to the document; `sections`, a type's `##` headings, each `{ kind: text }` or `{ kind: list, items }`; and `member_document: true` on one type, whose documents name their member with `member`, a User Identifier from `list_members`. On a type, `create_roles` lists the Schema Roles that may create its documents and `delete_roles` those that may delete them, and changing a document's `type` needs both; on a field of a type's own `properties`, `change_roles` lists those that may change it, `initial_roles` those that may set it on a new document, and `transitions` the `{from, to, roles}` changes it may make, `null` standing for absent; `owner` and `member` are built in, `[]` allows nobody, and only someone who manages the Room's access changes them. `edit` creates or replaces the whole text, and may rewrite the documents a change breaks in the same call. A Room may use a Shared schema instead, which `use_shared_schema` chooses: its `settings/schema.yaml` is then a read-only copy of it.
6
-
7
- ```yaml
8
- person:
9
- member_document: true
10
- properties:
11
- role: { type: string }
12
- task:
13
- properties:
14
- title: { type: string }
15
- status: { enum: [open, done] }
16
- owner: { type: string, reference: person }
17
- required: [title]
18
- sections:
19
- Notes: { kind: text }
20
- ```
21
-
22
- ```markdown
23
- ---
24
- type: person
25
- member: <User Identifier from list_members>
26
- role: Designer
27
- ---
28
- ```
@@ -1,7 +0,0 @@
1
- # Triggers
2
-
3
- How a Trigger's `condition` and `actions` are written for `create_trigger` and `edit_trigger`.
4
-
5
- `condition`: When it fires, e.g. `{on: "documents", scope: {type: "task"}, mode: "starts_matching", new_documents: false, match: {all: [{path: "/fields/status", eq: "review"}, {path: "/members/assignee", eq: "<User id>"}]}}`; for a new document in a folder, `{on: "documents", scope: {folder: "/answers"}, mode: "starts_matching", new_documents: true, match: {all: []}}`; on documents, `moved_between_rooms: true` fires only on a document moved in from or out to another Room, `false` only on any other change; for arriving items, `{on: "items", address: "<push address>", match: {path: "/json/ref", eq: "refs/heads/main"}}`. A clock is `{on: "clock", cron: "0 9 * * 1", time_zone: "Europe/Berlin"}`, or a day before each task is due: `{on: "clock", scope: {type: "task"}, date: "/fields/due", days: -1, at: "09:00", time_zone: "Europe/Berlin", match: <test>}`.
6
-
7
- `actions`: What it does; a `notify` action names whom it reaches, e.g. `{kind: "notify", title: "Ready to test", text: "A task waits.", to: {users: ["<User id>"], fields: ["/members/assignee"], roles: ["owner"]}}`, Users by id, the member a field of the matched document names, and every holder of a Schema Role; a `routine` action names a Routine Access.
@@ -1,25 +0,0 @@
1
- # Entry Data Contract
2
-
3
- How a Site App's `entry_data` has House serve each route as HTML from Rooms.
4
-
5
- Entry Data Contract, `entry_data` in a Site App’s `app.json`: House serves each route as HTML from your Rooms before the App starts, running none of your code. Each of `routes` has a `path` (`/`, `/posts/:slug`), optional `query` (functional `?name` parameters with defaults), `queries` (Local Query objects with `types` and a `pathPrefix` at each scope, no `rooms`; `{"$param": "slug"}` takes an argument, `"as": "integer"` converts it; `boundQuery` from `@agentshouse/mdruntime/entry` fills the same query in your page), `interaction` (the queries its first interaction needs), `title`, `description` and `body`. A body node is text, `{text: v}`, `{markdown: v}` of a document, `{tag, attrs, children}`, `{each: v, as, children}` or `{if: v, then, else}`; a value `v` is a literal, `{param}`, `{at, pointer}` into a query result or `each` item, `{join: [v]}`, `{count: v}` or `{stem: v}`. `styles` lists release CSS files. A route that fails starts the App as usual, and the Site document names why.
6
-
7
- ```json
8
- {
9
- "routes": [
10
- {
11
- "path": "/posts/:slug",
12
- "queries": {
13
- "post": {
14
- "types": ["post"],
15
- "pathPrefix": "posts",
16
- "where": { "/slug": { "$param": "slug" } },
17
- "select": { "fields": ["/title"], "markdown": true }
18
- }
19
- },
20
- "title": { "at": "post", "pointer": "/documents/0/fields/title" },
21
- "body": [{ "markdown": { "at": "post", "pointer": "/documents/0" } }]
22
- }
23
- ]
24
- }
25
- ```