@agentshouse/skills 0.1.0-cd4855b00cef6 → 0.1.0-cdd2bd42c3fbd

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
@@ -24,8 +24,8 @@ console.log(OWNER_RULES);
24
24
  ```
25
25
 
26
26
  `agentInstructions(houseRef, copies)` returns the first prompt's lines, `GUIDE` every Guide page
27
- with its path, title, first line and text, `WORK_ON_TICKET` the `routines/work-on-ticket` page's
28
- text and `EARLIER_OWNER_RULES_SHA256` the earlier texts' digests.
27
+ with its path, title, first line and text and `EARLIER_OWNER_RULES_SHA256` the earlier texts'
28
+ digests.
29
29
 
30
30
  The skills come from [mattpocock/skills](https://github.com/mattpocock/skills); thank you, Matt
31
31
  Pocock.
package/dist/index.d.ts CHANGED
@@ -15,7 +15,6 @@ export interface GuidePage {
15
15
  export declare const GUIDE_ROOT = "index";
16
16
  export declare const GUIDE: readonly GuidePage[];
17
17
  export declare const OWNER_RULES: string;
18
- export declare const WORK_ON_TICKET: string;
19
18
  export declare const EARLIER_OWNER_RULES_SHA256: readonly string[];
20
19
  export declare function agentInstructions(houseRef: string, copies: readonly string[]): string[];
21
20
  export declare function listSkills(): readonly Skill[];
package/dist/index.js CHANGED
@@ -11,7 +11,6 @@ const FRONTMATTER = /^---\n[\s\S]*?\n---\n\n?/u;
11
11
  const HEADING = /^# /u;
12
12
  export const GUIDE_ROOT = 'index';
13
13
  const OWNER_RULES_PAGE = 'owner-rules';
14
- const WORK_ON_TICKET_PAGE = 'routines/work-on-ticket';
15
14
  function packaged(name) {
16
15
  return readFileSync(join(PACKAGE, name), 'utf8');
17
16
  }
@@ -33,7 +32,6 @@ export const GUIDE = readdirSync(TREE, {
33
32
  .map((entry) => guidePage(relative(TREE, join(entry.parentPath, entry.name))))
34
33
  .sort((left, right) => (left.path < right.path ? -1 : 1));
35
34
  export const OWNER_RULES = GUIDE.find((page) => page.path === OWNER_RULES_PAGE).text;
36
- export const WORK_ON_TICKET = GUIDE.find((page) => page.path === WORK_ON_TICKET_PAGE).text;
37
35
  export const EARLIER_OWNER_RULES_SHA256 = JSON.parse(packaged('owner-rules-earlier.json'));
38
36
  const INSTRUCTIONS = JSON.parse(packaged('agent-instructions.json'));
39
37
  export function agentInstructions(houseRef, copies) {
@@ -8,5 +8,6 @@ How an App keeps what it shows as typed documents in the Rooms bound to it.
8
8
  - `app.json` `room_slots` names the Rooms the App needs, each with `access` `read` or `write` and the `types` it uses ([App manifest](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, which returns to the App.
9
9
  - 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.
10
10
  - 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.
11
+ - House's own facts, such as your User's Rooms, come from House acts: name each in `app.json` `house_acts` and call it with `runtime.call('<act>', input)`, such as `runtime.call('rooms/read', {})`. A call needs a connection, so offline show what the bound Rooms hold. A slot holding the Private Room brings its Triggers and none of the other documents House writes under its `house/`.
11
12
  - What no browser can do, such as acting when documents change or at a set time, is a Trigger (`create_trigger`) that notifies or runs one of the App's [functions](apps/functions) on House's servers; what it writes reaches the App at once.
12
13
  - A Trigger may also start a [Routine](reference/routine) on an Agent of your User.
@@ -2,7 +2,9 @@
2
2
 
3
3
  How to get an App's repository, build it and publish every change.
4
4
 
5
- - An App with an `a_` reference already exists, even with no release yet, as every App your User makes in the panel does. Clone its `.git` address, `<origin>/app/<app_ref>.git` or its `source_url` in `list_apps`, with `git clone -c 'credential.helper=!kit git-credential' -c user.name=<agent-git-name> -c user.email=<agent-git-email> <address>`, so Git signs in as you and can commit, in every later step too. Run `npm ci --ignore-scripts`, then publish with `npm run publish`, never with `--name`.
5
+ - An App with an `a_` reference already exists, even with no release yet, as every App your User makes in the panel does. Clone its `.git` address, `<origin>/app/<app_ref>.git` or its `source_url` in `list_apps`, with `git clone -c user.name=<agent-git-name> -c user.email=<agent-git-email> <address>`, so Git commits as you in every later step too. Run `npm ci --ignore-scripts`, then publish with `npm run publish`, never with `--name`.
6
+ - Git signs in as you with a credential your User makes for you on `<origin>/connections`, given as its password.
7
+ - When the Kit runs you, add `-c 'credential.helper=!kit git-credential'` to the clone instead, so the Kit signs Git in.
6
8
  - Only when no App exists yet, clone `<origin>/app/new.git` the same way: it gives mdui, a minimal App in plain TypeScript with its test and `npm run publish`. Run `npm ci --ignore-scripts`, then `npm run publish -- --name "<display name>"`, which creates the App and prints its address and its `.git` address. Then `git remote set-url origin <that .git address>`; every later `npm run publish` goes there, without `--name`.
7
9
  - Use any framework and build tool. `npm run build` leaves the whole release in `dist/`: the entry HTML, every file it loads, `app.json` and `schema.yaml`. The entry names files by relative paths (Vite: `base: './'`), carries no inline script and loads nothing from outside the release, so bundle fonts and libraries. A release holds at most <release-files> files and <release-size>.
8
10
  - Your User sees a change only once it is published, so an ask to change an App is an ask to publish it: end every change with a commit and `npm run publish`, which builds, pushes `main` and the build, and prints `published` or the reason House refused. A `git push` of `main` alone publishes nothing and says so. A refused push changes nothing and the previous release keeps running.
package/guide/index.md CHANGED
@@ -8,5 +8,5 @@ While your User's My Room, which `list_rooms` marks, holds no `wayfinding-map`,
8
8
 
9
9
  - `apps/`, building an App over your User's Rooms: [Build an App](apps/build), and the functions House runs for it when a Trigger fires: [App functions](apps/functions).
10
10
  - `reference/`, the formats House reads: [Access level](reference/access-level), [App manifest](reference/app-manifest), [Schema](reference/schema) and [Triggers](reference/triggers).
11
- - `routines/`, the Routines House writes into every Private Room, each written as [Routine](reference/routine) says: [Work on ticket](routines/work-on-ticket).
11
+ - `routines/`, the Routine the panel writes for My Room for each Agent it makes, naming that Agent, written as [Routine](reference/routine) says: [Work on ticket](routines/work-on-ticket).
12
12
  - `skills/`, House's Skills: [Prototype an App](skills/prototype-app).
@@ -2,7 +2,7 @@
2
2
 
3
3
  What an App's `app.json` declares.
4
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; `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`; `house_model`, the House model types it shows, which it reads from your User’s Private Room under `house/` without binding that Room; `house_acts`, the House acts it calls by their act names, such as `rooms/rename`, never one only a person takes or one that changes what an App reaches; `functions`, each a `name` and the `entry` file a Trigger runs on House's servers ([App functions](apps/functions)); and `theme_colour`, `#rrggbb`. A User who does not own the App is asked once to allow the House model types and House acts it declares, and again only for those a later release adds; a declined one reads nothing and is refused. [Build an App](apps/build) shows how its page works.
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; `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`; `house_acts`, the House acts it calls by their act names, such as `rooms/read` for your User’s Rooms or `rooms/rename`, never one only a person takes or one that changes what an App reaches, except that a Self-hosted Building's App may declare its administrators' acts, `building/people/read`, `building/people/add`, `building/people/remove`, `building/administrators/name`, `building/administrators/take`, `building/factor/require`, `building/factor/stop-requiring` and `building/factor/reset`, which its page calls in an administrator's browser once it has asked them to confirm each, `building/people/read` refusing anyone else `not_building_administrator`; `functions`, each a `name` and the `entry` file a Trigger runs on House's servers ([App functions](apps/functions)); and `theme_colour`, `#rrggbb`. A User who does not own the App is asked once to allow the House acts it declares, and again only for those a later release adds; a declined one is refused. [Build an App](apps/build) shows how its page works.
6
6
 
7
7
  ```json
8
8
  {
@@ -1,13 +1,14 @@
1
1
  # Routine
2
2
 
3
- How a Routine document in the Private Room is written.
3
+ How a Routine document in the Private Room is written, one for each Room it serves.
4
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.
5
+ Routine, `/rooms/private/rooms/<room-handle>/routines/<name>.md`, serving the Room `<room-handle>` names: `description`; `input`, a text saying what to send, empty if nothing; and `agent`, the identifier of the one of your User's current Agents it starts. The body is the instruction, which never leaves the Private Room. Writing it needs your User's write in that Room. House writes its card, the description, input and Agent, at `/rooms/<room-handle>/house/routines/<name>.md`, where every member reads it, and refuses a name a card there already holds as `routine_name_taken`. A Routine a second Room needs is a copy under that Room's handle. A Routine Request's input is text the Agent reads, and House checks no shape.
6
6
 
7
7
  ```markdown
8
8
  ---
9
9
  description: Summarize a thread in five bullets.
10
10
  input: The thread to summarize, as a ref or pasted text.
11
+ agent: 019a0000-0000-7000-8000-000000000001
11
12
  ---
12
13
 
13
14
  Read the thread and write five bullets under summaries/.
@@ -15,7 +15,7 @@ Create it with `create_web_wizard`, for the Environment you work through or anot
15
15
 
16
16
  For a script the User may want to keep, propose a name when you create the Web Wizard. Only the User keeps a script: they tick Keep as a function on its page, may change the name, and press Keep, which runs nothing and makes the script one of their Environment functions. The document then reads kept with the function's name; keeping under a name they already use replaces that function's script. `inspect` on the Environment lists its functions, and `delete_function` deletes one. On a function's page the User can also press Run now, which runs it in a terminal they type into, so a kept script may ask them for a password there; nothing of that run reaches you.
17
17
 
18
- `run_function` runs a function on its Environment, whose Kit must be connected, and answers when the run ends. Your `input` reaches the script as JSON in the file `HOUSE_INPUT` names. The run has no terminal, so a script that asks for typing fails at once; such a step stays a Web Wizard. The answer's `ending` is `exited` with its `exit_code`, `timed_out` at the run's time limit, `not_started` with its `cause`, or `interrupted` when House lost the run; `output` is the end of what the script printed, `cut` when its start was dropped.
18
+ `run_function` runs a function on its Environment, whose Kit must be connected, and answers when the run ends. Your input reaches the script as JSON in the file `HOUSE_INPUT` names. The run has no terminal, so a script that asks for typing fails at once; such a step stays a Web Wizard. The answer's ending is exited with its exit_code, timed_out at the run's time limit, not_started with its cause, or interrupted when House lost the run; output is the end of what the script printed, cut when its start was dropped.
19
19
 
20
20
  ## As a script they run
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentshouse/skills",
3
- "version": "0.1.0-cd4855b00cef6",
3
+ "version": "0.1.0-cdd2bd42c3fbd",
4
4
  "description": "The upstream Skills agents.house serves its agents, verbatim, and the texts it writes for them: the Guide, its own Skills among the pages, and the Agent instructions",
5
5
  "license": "MIT",
6
6
  "type": "module",