@agentshouse/skills 0.1.0-c408aca84f8d3 → 0.1.0-c4e515a7252cb
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 +3 -3
- package/agent-instructions.json +2 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -9
- package/guide/apps/functions.md +1 -1
- package/guide/reference/routine.md +1 -1
- package/guide/reference/triggers.md +1 -1
- package/guide/sites/build.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,9 +23,9 @@ for (const { name } of listSkills()) console.log(name, readSkill(name).length);
|
|
|
23
23
|
console.log(OWNER_RULES);
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
`agentInstructions(houseRef, copies)` returns the first prompt's lines,
|
|
27
|
-
with its path, title, first line and text and
|
|
28
|
-
digests.
|
|
26
|
+
`agentInstructions(houseRef, copies)` returns the first prompt's lines, which name no Local copy,
|
|
27
|
+
`GUIDE` every Guide page with its path, title, first line and text and
|
|
28
|
+
`EARLIER_OWNER_RULES_SHA256` the earlier texts' digests.
|
|
29
29
|
|
|
30
30
|
The skills come from [mattpocock/skills](https://github.com/mattpocock/skills); thank you, Matt
|
|
31
31
|
Pocock.
|
package/agent-instructions.json
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
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.",
|
|
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 the Guide from `index` with `house open_guide`. Never start a server.",
|
|
6
6
|
"Optional per-Room instructions: `/rooms/private/rooms/<handle>/AGENTS.md`.",
|
|
7
|
-
"For another Agent's help, `send_routine_request
|
|
8
|
-
]
|
|
9
|
-
"copies": "House Local copies; before work run `house fetch` and rebase onto `<house-ref>`; after it commit, then `house push`:"
|
|
7
|
+
"For another Agent's help, `send_routine_request` naming one of the Room's Routine cards under `house/routines/`, or the Agent and what you ask; its mail comes back into this conversation."
|
|
8
|
+
]
|
|
10
9
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,6 @@ export declare const GUIDE_ROOT = "index";
|
|
|
16
16
|
export declare const GUIDE: readonly GuidePage[];
|
|
17
17
|
export declare const OWNER_RULES: string;
|
|
18
18
|
export declare const EARLIER_OWNER_RULES_SHA256: readonly string[];
|
|
19
|
-
export declare function agentInstructions(
|
|
19
|
+
export declare function agentInstructions(_houseRef: string, _copies: readonly string[]): string[];
|
|
20
20
|
export declare function listSkills(): readonly Skill[];
|
|
21
21
|
export declare function readSkill(name: string): readonly SkillFile[];
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,6 @@ import { fileURLToPath } from 'node:url';
|
|
|
4
4
|
const PACKAGE = fileURLToPath(new URL('..', import.meta.url));
|
|
5
5
|
const SET = join(PACKAGE, 'set');
|
|
6
6
|
const ENTRY = 'SKILL.md';
|
|
7
|
-
const REF_PLACEHOLDER = '<house-ref>';
|
|
8
7
|
const TREE = join(PACKAGE, 'guide');
|
|
9
8
|
const PAGE = '.md';
|
|
10
9
|
const FRONTMATTER = /^---\n[\s\S]*?\n---\n\n?/u;
|
|
@@ -34,14 +33,8 @@ export const GUIDE = readdirSync(TREE, {
|
|
|
34
33
|
export const OWNER_RULES = GUIDE.find((page) => page.path === OWNER_RULES_PAGE).text;
|
|
35
34
|
export const EARLIER_OWNER_RULES_SHA256 = JSON.parse(packaged('owner-rules-earlier.json'));
|
|
36
35
|
const INSTRUCTIONS = JSON.parse(packaged('agent-instructions.json'));
|
|
37
|
-
export function agentInstructions(
|
|
38
|
-
|
|
39
|
-
return [...INSTRUCTIONS.lines];
|
|
40
|
-
return [
|
|
41
|
-
...INSTRUCTIONS.lines,
|
|
42
|
-
INSTRUCTIONS.copies.replaceAll(REF_PLACEHOLDER, houseRef),
|
|
43
|
-
...copies,
|
|
44
|
-
];
|
|
36
|
+
export function agentInstructions(_houseRef, _copies) {
|
|
37
|
+
return [...INSTRUCTIONS.lines];
|
|
45
38
|
}
|
|
46
39
|
export function listSkills() {
|
|
47
40
|
return readdirSync(SET, { withFileTypes: true })
|
package/guide/apps/functions.md
CHANGED
|
@@ -5,7 +5,7 @@ How an App declares a function that House runs on its servers when a Trigger fir
|
|
|
5
5
|
- **Declare.** `app.json` lists `functions`, each `{"name": "assign lead", "entry": "functions/assign.js"}` ([App manifest](reference/app-manifest)). The entry is one ES module whose default export is the function and which imports nothing, so your build bundles each function, with all it imports, into `dist/`, such as `esbuild src/assign.ts --bundle --format=esm --outfile=dist/functions/assign.js`. A publish is refused whole for an entry that is missing, imports, has no default export or is over <function-size>, for a name used twice, and for more than <release-functions> functions.
|
|
6
6
|
- **Run.** A Trigger's `function` action names the App and one of its functions ([Triggers](reference/triggers)). House runs the App's latest release when the Event's turn comes, one Event of a Trigger after another, so a run reads what the run before it wrote.
|
|
7
7
|
- **The event.** `export default async (event, house) => {}` receives `kind`, the condition's `on`, with `room`, `trigger`, `id`, `moment` and what matched: `path` and `reference`, a document change's `transition`, an arriving item's `item` with its `headers` and raw `body` text, a dated document's `document`, or a delivered notification's `notification`, the facts of its web document. `Date` reads `moment`. The return value is ignored, so write what you keep into the Room.
|
|
8
|
-
- **The App API.** `house` is the page's App API over the Trigger's Room alone: `query(q)` ([Local Query](apps/local-query)), `saveParts(room, parts)`, `call(name, input)` for the Room acts such as `
|
|
8
|
+
- **The App API.** `house` is the page's App API over the Trigger's Room alone: `query(q)` ([Local Query](apps/local-query)), `saveParts(room, parts)`, `call(name, input)` for the Room acts, each by its House act name, such as `records/read` and `rooms/members`, and `callExternal(request)`. `query` and `callExternal` reject a refusal with its `code` for the function to catch, while `call` answers it as a result whose `kind` is `rejected` and `saveParts` as `outcome: 'refused'`, as on the page, so check what they answer. Its writes are the App's, by `App <App> (function <function>)`, fire Triggers, its own included, and count against the Room owner's Write limit.
|
|
9
9
|
- **Reach.** A run holds no `fetch`, timer, file, `console` or `Intl`: keep times as ISO instants, or convert a local time by its UTC offset yourself. `callExternal` takes the request `bridge.callExternal` takes and is the one way out, to an origin the release's `external_origins` lists; naming its Room, `room_ref: event.room`, carries that Room's Service key, which the function never sees, or is refused `service_key_not_found` naming the `origin`. Its calls count against the Room owner's `external_calls` limit.
|
|
10
10
|
- **Never repeated.** A run that started is never run again, even when it failed after a call reached the service. Send `event.id` as the service's idempotency key where it takes one, and name what you write by what the event carries, so a second delivery of the same thing finds it.
|
|
11
11
|
- **Failure and limits.** A throw settles the run `failed` with `function_failed` and its text, which `list_trigger_events` shows and House tells the Room's owner; the next Event still runs. A run ends `failed` at <function-time>, at <function-memory> or past <function-calls> external calls: `time_cap_reached`, `memory_cap_reached` or `external_call_cap_reached`.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
How a Routine document in the Private Room is written, one for each Room it serves.
|
|
4
4
|
|
|
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.
|
|
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. Anyone who writes that Room asks it with `send_routine_request` naming the card, and may instead name the `agent` with their own words; either starts at once. A Routine Request's input is text the Agent reads, and House checks no shape. Mail your conversation sends with `send_mail` and a request it sent reaches the conversation that request started, and that conversation's mail comes back to yours.
|
|
6
6
|
|
|
7
7
|
```markdown
|
|
8
8
|
---
|
|
@@ -12,4 +12,4 @@ In your Private Room alone, a `function` action naming no `app` runs one of your
|
|
|
12
12
|
|
|
13
13
|
A Trigger acts on at most <trigger-events-per-hour> Events in each UTC hour, counting the Events of every version of it but those kept skipped or failed; `list_trigger_events` shows each Event past that number `missed: "skipped"` with `code: "cap_reached"`, which starts nothing, and its creator is told once per version. A Trigger whose own actions make what it fires on stops there, so narrow its condition.
|
|
14
14
|
|
|
15
|
-
A `routine` action
|
|
15
|
+
A `routine` action starts a [Routine](reference/routine) of the Trigger's Room by its card `house/routines/<name>.md`: `{kind: "routine", card: "<name>", payload: "<input>"}`. No such card is refused `routine_not_found`; a retired Routine's Events show `routine_retired`.
|
package/guide/sites/build.md
CHANGED
|
@@ -10,7 +10,7 @@ Build it as [Build an App](apps/build) says, with what follows. Anything private
|
|
|
10
10
|
- A Site is public: anyone opens it, nobody signs in, and every visitor reads its bound Rooms, which must be your User's own and never the Private Room.
|
|
11
11
|
- Everything it shows lives as documents in its Room; put its demo data there, never in code.
|
|
12
12
|
- A visitor's edits stay in their browser and never reach House: write them with `save` as an App does.
|
|
13
|
-
- To receive messages from visitors, name an Intake Room with `set_site_intake_room` and send each with `runtime.call('
|
|
13
|
+
- To receive messages from visitors, name an Intake Room with `set_site_intake_room` and send each with `runtime.call('site/submission', { content })`, online only.
|
|
14
14
|
- `describe_site` sets the title and description search engines show.
|
|
15
15
|
- With `google_analytics_id` set by `describe_site`, House measures a visitor only after they accept. While `bridge.onStatus` reports `analytics.measures`, ask them on the Site unless `analytics.choice` holds their answer, report it with `bridge.analyticsConsent('accept')` or `bridge.analyticsConsent('decline')`, and keep a way on every page to decline later, which reloads the page unmeasured.
|
|
16
16
|
- See it yourself: open its url, which needs no sign-in.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentshouse/skills",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-c4e515a7252cb",
|
|
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",
|