@agentshouse/skills 0.1.0-c392b94e25b46 → 0.1.0-c3bfb7c5bf22b

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
@@ -23,7 +23,7 @@ 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, which name no Local copy,
26
+ `agentInstructions()` returns the first prompt's lines, which name no Local copy,
27
27
  `GUIDE` every Guide page with its path, title, first line and text and
28
28
  `EARLIER_OWNER_RULES_SHA256` the earlier texts' digests.
29
29
 
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(_houseRef: string, _copies: readonly string[]): string[];
19
+ export declare function agentInstructions(): string[];
20
20
  export declare function listSkills(): readonly Skill[];
21
21
  export declare function readSkill(name: string): readonly SkillFile[];
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ export const GUIDE = readdirSync(TREE, {
35
35
  export const OWNER_RULES = GUIDE.find((page) => page.path === OWNER_RULES_PAGE).text;
36
36
  export const EARLIER_OWNER_RULES_SHA256 = JSON.parse(packaged('owner-rules-earlier.json'));
37
37
  const INSTRUCTIONS = JSON.parse(packaged('agent-instructions.json'));
38
- export function agentInstructions(_houseRef, _copies) {
38
+ export function agentInstructions() {
39
39
  return [...INSTRUCTIONS.lines];
40
40
  }
41
41
  export function listSkills() {
@@ -18,4 +18,4 @@ and returns `{ state: 'loading' }` until the topic's first value arrives, then `
18
18
  parts)`, which saves through `saveParts` and rejects with a recorded failure.
19
19
  `saveWritten(room, roomDrafts)` saves Room Drafts the App wrote, each named with the
20
20
  revision its last write returned: one another tab wrote since is refused as `stale`, and
21
- nothing is saved. React-admin and Refine Apps use `@agentshouse/mdruntime-families`.
21
+ nothing is saved.
@@ -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. Runs share a fixed number of slots on House's servers, and a run waits, its action `waiting`, until one is free.
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`, a delivered notification's `notification`, the facts of its web document, or a message's `message`, its `sender` and its request's `agent_function`, never its words, with the document that request was started for as `path` and `reference`. `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)), which reads only the documents of the `types`, folders (`folder`, `pathPrefix`) and `paths` it names and answers over them alone, so the rest of a large Room is never read: name the `types` or `pathPrefix` of its `hop` and `backlinks` too, and select its parts, since a query or `hop` or `backlinks` naming none, or selecting `backlinks` or `'all'`, is refused `invalid-query`, `saveParts(room, parts)`, `call(name, input)` for the Room acts, each by its House act name, such as `records/list` and `rooms/members/list`, 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.
8
+ - **The App API.** `house` is the page's App API over the Trigger's Room alone: `query(q)` ([Local Query](apps/local-query)), which reads only the documents of the `types`, folders (`folder`, `pathPrefix`) and `paths` it names and answers over them alone, so the rest of a large Room is never read: name the `types` or `pathPrefix` of its `hop` and `backlinks` too, and select its parts, since a query or `hop` or `backlinks` naming none, or selecting `backlinks` or `'all'`, is refused `invalid-query`, `saveParts(room, parts)`, `call(name, input)` for the Room acts, each by its House act name, such as `rooms/members/list` and `triggers/fired/list`, 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 `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 `triggers/fired/list` shows and the panel shows the Room's owner, with no notification; 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`.
@@ -14,4 +14,4 @@ How an App reads and writes its Rooms on the device, offline too.
14
14
  - A Room your User holds at the Open level locks once the browser has been offline 2 minutes, and from the moment it opens until House confirms the access. While it is locked, `rooms` lists it `locked: true`, a query that does not name it leaves it out, one naming it answers `{ pending }` with `awaits: 'unlock'`, and every other read and write naming it, `save` included, answers the code `room-locked` and keeps nothing. Draw it locked until it unlocks and keep what the User types in the page; what was saved before stays and is sent then.
15
15
  - An outside service is reached only at the origins `app.json` lists in `external_origins`, directly or through `bridge.callExternal`, sent by House's server. A call that names a Room bound to the App in a `write` slot with `room_ref` carries that Room's Service key for the origin, which the page never sees; any other call carries no key. A call through a Room that holds no key for the origin is refused `not_found` naming the `origin`: tell the person that the Room's owner or a manager enters the key under Connected on the Room's Settings page, since no App opens that page.
16
16
  - The page's own storage is a disposable cache, the Room the only durable home of the App's data; handle any code or value you do not know by its `code` ([Refusals](apps/runtime-refusals)).
17
- - React: `useObserve` and `useSave` from `@agentshouse/mdruntime/react`. react-admin and Refine: the data providers of `@agentshouse/mdruntime-families`. The whole client: [The App runtime](apps/runtime).
17
+ - React: `useObserve` and `useSave` from `@agentshouse/mdruntime/react`. The whole client: [The App runtime](apps/runtime).
@@ -4,7 +4,7 @@ What App code reaches through the runtime's client: its surfaces, its reach, obs
4
4
 
5
5
  App code reaches the MD Runtime through the remote client. The surfaces are Rooms, Query,
6
6
  Search, Observe, Types, Room Draft, Save, History, Resolve, binary files, Call,
7
- Reached, Log, the reported persistence answer, reauthorization, conversation, the chat
7
+ Reached, the reported persistence answer, reauthorization, conversation, the chat
8
8
  draft, and Presentation State. Sync Status, readiness, the Service Mode, the storage-loss
9
9
  statement, the deployment facts, the signed-in member and the count of authority changes
10
10
  are observations only.
@@ -38,9 +38,10 @@ questions, the process state, the CLI's commands and options, and `deliveryWaiti
38
38
  messages that wait in the Agent's queue, none stored or searchable. A saved message's
39
39
  `content` holds its turn's parts, tokens and state, and one its owner took out of the queue
40
40
  carries `removed: true`. `chatDraft.write` and `chatDraft.discard` keep what
41
- the App Creator composes, and `chatDraft.prepend(conversation, draft)` puts a returned
42
- message ahead of it as it stands. Sending it is a Provider Action that needs the Provider
43
- reachable and is never queued. A new conversation's chat draft is keyed `new:<Agent
41
+ the App Creator composes, `chatDraft.prepend(conversation, draft)` puts a returned
42
+ message ahead of it as it stands and `chatDraft.append(conversation, draft)` a text after it.
43
+ Sending it is a Provider Action that needs the Provider reachable and is never queued.
44
+ A new conversation's chat draft is keyed `new:<Agent
44
45
  identity>`: no conversation list removes it, a retired Agent's goes, and the first answer
45
46
  to `conversation.create({ agent_id, operation_id })` moves it to the created conversation,
46
47
  where `conversation.send(conversation)` sends it; a replay of that create moves nothing.
@@ -12,10 +12,12 @@ option and `conversation.retry(conversation, message, operation)` sends a refuse
12
12
  again. A release that declares no conversations is refused each with `action-undeclared`
13
13
  naming its act.
14
14
 
15
- `conversation.pin(figures)` and `conversation.pins()` keep the Chat's pinned figures, and
15
+ `conversation.pin(figures)` and `conversation.pins()` keep the Chat's pinned figures,
16
16
  `conversation.openTurn(conversation, turn)` and `conversation.openedTurns()` each chat's
17
- last opened turn, on this browser for House and every App alike; none of it is sent to
18
- House. Without conversations they read none and keep nothing.
17
+ last opened turn, and `conversation.dismissSuggestion(conversation, suggestion)` each
18
+ chat's suggested next prompt the User dismissed, which that conversation's
19
+ `dismissedSuggestion` shows, on this browser for House and every App alike; none of it is
20
+ sent to House. Without conversations they read none and keep nothing.
19
21
 
20
22
  `conversation.pageMetadata(appName, address)` answers the Page metadata block a message
21
23
  carries after the User's text: the App's name, the page's address and, while the page
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentshouse/skills",
3
- "version": "0.1.0-c392b94e25b46",
3
+ "version": "0.1.0-c3bfb7c5bf22b",
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",