@agentshouse/app-bridge 0.1.0-c9852bb62597e → 0.1.0-ca054287ceeed
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 +20 -17
- package/dist/index.d.ts +1017 -0
- package/dist/index.js +1 -0
- package/dist/mdmodel/blocks.d.ts +10 -0
- package/dist/mdmodel/definition.d.ts +81 -0
- package/dist/mdmodel/divide.d.ts +2 -0
- package/dist/mdmodel/document.d.ts +15 -0
- package/dist/mdmodel/event.d.ts +77 -0
- package/dist/mdmodel/facts.d.ts +14 -0
- package/dist/mdmodel/fields.d.ts +5 -0
- package/dist/mdmodel/index.d.ts +32 -0
- package/dist/mdmodel/kinds.d.ts +18 -0
- package/dist/mdmodel/links.d.ts +28 -0
- package/dist/mdmodel/paths.d.ts +25 -0
- package/dist/mdmodel/profile.d.ts +5 -0
- package/dist/mdmodel/project.d.ts +21 -0
- package/dist/mdmodel/query/language.d.ts +222 -0
- package/dist/mdmodel/query/match.d.ts +13 -0
- package/dist/mdmodel/query/rows.d.ts +31 -0
- package/dist/mdmodel/query/sql.d.ts +38 -0
- package/dist/mdmodel/references.d.ts +3 -0
- package/dist/mdmodel/reserved.d.ts +4 -0
- package/dist/mdmodel/types.d.ts +174 -0
- package/dist/mdmodel/validate.d.ts +32 -0
- package/dist/mdmodel/version.d.ts +1 -0
- package/dist/mdmodel/yaml.d.ts +55 -0
- package/dist/mdruntime/adapter.d.ts +546 -0
- package/dist/mdruntime/binary.d.ts +17 -0
- package/dist/mdruntime/chain.d.ts +11 -0
- package/dist/mdruntime/change-set.d.ts +27 -0
- package/dist/mdruntime/change.d.ts +118 -0
- package/dist/mdruntime/client.d.ts +94 -0
- package/dist/mdruntime/collection.d.ts +28 -0
- package/dist/mdruntime/compile.d.ts +10 -0
- package/dist/mdruntime/connection.d.ts +154 -0
- package/dist/mdruntime/conversation.d.ts +119 -0
- package/dist/mdruntime/durability.d.ts +17 -0
- package/dist/mdruntime/failure.d.ts +12 -0
- package/dist/mdruntime/identity.d.ts +5 -0
- package/dist/mdruntime/media.d.ts +7 -0
- package/dist/mdruntime/messages.d.ts +27 -0
- package/dist/mdruntime/model.d.ts +57 -0
- package/dist/mdruntime/observation.d.ts +44 -0
- package/dist/mdruntime/open.d.ts +1 -0
- package/dist/mdruntime/opened.d.ts +21 -0
- package/dist/mdruntime/outcome.d.ts +84 -0
- package/dist/mdruntime/overlay.d.ts +24 -0
- package/dist/mdruntime/query.d.ts +78 -0
- package/dist/mdruntime/reach.d.ts +53 -0
- package/dist/mdruntime/readiness.d.ts +49 -0
- package/dist/mdruntime/recovery.d.ts +25 -0
- package/dist/mdruntime/replica.d.ts +70 -0
- package/dist/mdruntime/room-draft.d.ts +174 -0
- package/dist/mdruntime/save.d.ts +102 -0
- package/dist/mdruntime/search.d.ts +21 -0
- package/dist/mdruntime/seed.d.ts +15 -0
- package/dist/mdruntime/status.d.ts +27 -0
- package/dist/mdruntime/store.d.ts +151 -0
- package/dist/mdruntime/stored.d.ts +128 -0
- package/dist/mdruntime/tables.d.ts +326 -0
- package/dist/mdruntime/wire.d.ts +243 -0
- package/dist/{client/src/test-host.d.ts → test-host.d.ts} +10 -8
- package/dist/test-host.js +191 -0
- package/docs/families.md +99 -42
- package/package.json +12 -10
- package/dist/client/src/bridge.d.ts +0 -38
- package/dist/client/src/bridge.js +0 -320
- package/dist/client/src/index.d.ts +0 -3
- package/dist/client/src/index.js +0 -2
- package/dist/client/src/test-host.js +0 -185
- package/dist/client/src/wire.d.ts +0 -215
- package/dist/client/src/wire.js +0 -1
- package/dist/src/apps/remainder.d.ts +0 -2
- package/dist/src/apps/remainder.js +0 -16
- package/dist/src/apps/tab.d.ts +0 -6
- package/dist/src/apps/tab.js +0 -27
package/README.md
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
# @agentshouse/app-bridge
|
|
2
2
|
|
|
3
|
-
The
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
The types of the agents.house App bridge, an accessor and an in-page test host.
|
|
4
|
+
House builds the bridge object in every App it serves and hands it to the page
|
|
5
|
+
before the App's own scripts run; `houseBridge()` returns that object, so an App
|
|
6
|
+
carries no bridge code of its own. It carries thirteen families: navigation,
|
|
7
|
+
ceremonies, installation, notifications, Telegram, status, Site image reads, App
|
|
8
|
+
release code, external calls, App messages, App and Site screenshot reads and the
|
|
9
|
+
Chat. [docs/families.md](docs/families.md) describes each and the test host.
|
|
9
10
|
|
|
10
|
-
The
|
|
11
|
-
the MD Runtime client into the page beside the bridge
|
|
12
|
-
|
|
11
|
+
The bridge carries no credential handling and no Runtime family. House builds
|
|
12
|
+
the MD Runtime client into the page beside the bridge and serves it the Chat, so
|
|
13
|
+
the App imports, constructs and bundles neither: `bridge.runtime` resolves to the client.
|
|
13
14
|
|
|
14
|
-
House's
|
|
15
|
+
House's guide to building an App is its Guide's `apps/` pages, which `open_guide` opens.
|
|
15
16
|
|
|
16
17
|
## Use
|
|
17
18
|
|
|
18
19
|
```js
|
|
19
|
-
import {
|
|
20
|
+
import { houseBridge } from '@agentshouse/app-bridge';
|
|
20
21
|
|
|
21
|
-
const bridge =
|
|
22
|
+
const bridge = houseBridge();
|
|
22
23
|
const md = await bridge.runtime;
|
|
23
24
|
|
|
24
25
|
bridge.onAddress((address) => render(address));
|
|
@@ -34,22 +35,24 @@ async function manageSecurity(securityPath) {
|
|
|
34
35
|
try {
|
|
35
36
|
await bridge.ceremony(securityPath);
|
|
36
37
|
} catch (refusal) {
|
|
37
|
-
report(refusal);
|
|
38
|
+
if (refusal.name === 'HouseCeremonyRefused') report(refusal.path);
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
```
|
|
41
42
|
|
|
42
|
-
`bridge.runtime` resolves to the `MdRuntimeClient` of
|
|
43
|
-
|
|
43
|
+
`bridge.runtime` resolves to the `MdRuntimeClient` of `@agentshouse/mdruntime/client`,
|
|
44
|
+
whose README describes its members. Its `call(method, params)` is a remote procedure call
|
|
45
|
+
to a House act by its name, such as `call('rooms/members', { room_ref })`: `HouseMethods`
|
|
46
|
+
names each with House's own input, `HouseParams<Name>`, and answer, `HouseResult<Name>`.
|
|
44
47
|
|
|
45
48
|
## Test without a House
|
|
46
49
|
|
|
47
50
|
```js
|
|
48
|
-
import {
|
|
51
|
+
import { houseBridge } from '@agentshouse/app-bridge';
|
|
49
52
|
import { createHouseBridgeTestHost } from '@agentshouse/app-bridge/test-host';
|
|
50
53
|
|
|
51
54
|
const host = createHouseBridgeTestHost({ address: '/rooms/atlas' });
|
|
52
|
-
const bridge =
|
|
55
|
+
const bridge = houseBridge();
|
|
53
56
|
|
|
54
57
|
bridge.push('/rooms/atlas/members');
|
|
55
58
|
host.open('/rooms/atlas');
|