@agentshouse/mdruntime-adapter 0.1.0-alpha.19 → 0.1.0-alpha.20

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.
Files changed (2) hide show
  1. package/AGENTS.md +25 -4
  2. package/package.json +2 -2
package/AGENTS.md CHANGED
@@ -7,7 +7,7 @@ enforcement.
7
7
  ## The MD Runtime API
8
8
 
9
9
  App code reaches the MD Runtime through the remote client. The surfaces are
10
- Rooms, Slots, Query, Observe, Types, Room Draft, Save, History, Call, Log,
10
+ Rooms, Slots, Query, Search, Observe, Types, Room Draft, Save, History, Call, Log,
11
11
  storage loss, the reported persistence answer, deployment facts, Sync Status, reauthorization,
12
12
  conversation, the chat draft, and Presentation State.
13
13
 
@@ -22,7 +22,8 @@ queued.
22
22
  Slots answers each Slot the Provider declares, in its order, with its entries
23
23
  in order, each a Room and its segment; a Room two Slots list is the same Room.
24
24
 
25
- Rooms, Slots, Query, Observe, Types, Room Draft, and Save never touch the network.
25
+ Rooms, Slots, Query, Search, Observe, Types, Room Draft, and Save never touch the
26
+ network.
26
27
  History and Call go to the Provider through the Adapter. Every member of the
27
28
  client is asynchronous. Results are detached snapshots. Nothing in this
28
29
  surface returns the authorization, performs a request the App's code
@@ -72,6 +73,26 @@ the whole result at once and again only when it changes. A query is data:
72
73
  `unknown-type`, `unknown-field` or `wrong-kind`, naming where, and never
73
74
  answers an empty result in its place.
74
75
 
76
+ ## Local Search rules
77
+
78
+ `search({ text, documents, conversations, limit })` answers once, by words, from
79
+ local state, with MiniSearch at its default configuration. There is no observed
80
+ search.
81
+
82
+ - **What is found.** A Document by its field values, its sections' headings and
83
+ text, its preamble and its Path; a message by its text. Frontmatter keys, Room
84
+ Drafts, chat drafts and growing text are never found. There are no phrases,
85
+ word forms, typo tolerance or prefix matching.
86
+ - **Narrowing.** `documents` is a Local Query filter: `rooms`, `types`, `where`,
87
+ `pathPrefix`, `hop` and `backlinks`. `conversations` names conversations. Both
88
+ apply before `limit`, which bounds each list; without it every hit returns.
89
+ - **Results.** `{ documents, messages }`, each ranked by `score`, which compares
90
+ hits of one list of one search. A Document hit names its `room`, `path` and
91
+ `type`, a message hit its `conversation` and `identity`, and `matches` maps each
92
+ matched word to the parts it matched in: `fields`, `sections`, `preamble` or
93
+ `path`, or `text`. A hit carries no position; mark the words in the text you
94
+ show. An invalid filter fails with its Local Query error.
95
+
75
96
  ## Room Draft, Save, and outcome rules
76
97
 
77
98
  The MD Runtime owns one Room Draft per Room and Path, shared by every App and
@@ -130,8 +151,8 @@ a desktop. Its strings are English only, dates and numbers follow the
130
151
  browser locale, and content is never translated. Light and dark themes come
131
152
  from CSS custom properties with the browser's preference as the default and
132
153
  an App's override respected. What an App Creator's agent adds carries none
133
- of these promises by itself. Reading and querying never wait for the
134
- network. Data lives only in the App Creator's browser and with the Provider.
154
+ of these promises by itself. Reading, querying and searching never wait for
155
+ the network. Data lives only in the App Creator's browser and with the Provider.
135
156
 
136
157
  ## App code imports only the client entry and never constructs a Runtime
137
158
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentshouse/mdruntime-adapter",
3
- "version": "0.1.0-alpha.19",
3
+ "version": "0.1.0-alpha.20",
4
4
  "description": "Agents House Adapter for the MD Runtime",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -34,6 +34,6 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@agentshouse/mdmodel": "0.1.0-alpha.14",
37
- "@agentshouse/mdruntime": "0.1.0-alpha.25"
37
+ "@agentshouse/mdruntime": "0.1.0-alpha.26"
38
38
  }
39
39
  }