@agentshouse/app-bridge 0.1.0-cf2e2ca943fbc → 0.1.0-cf6672d6a6842
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 +18 -13
- package/dist/calls.d.ts +969 -0
- package/dist/calls.js +1 -0
- package/dist/index.d.ts +160 -0
- package/dist/index.js +1 -0
- package/dist/mdmodel/blocks.d.ts +10 -0
- package/dist/mdmodel/condition.d.ts +161 -0
- package/dist/mdmodel/definition.d.ts +80 -0
- package/dist/mdmodel/divide.d.ts +2 -0
- package/dist/mdmodel/document.d.ts +15 -0
- package/dist/mdmodel/fields.d.ts +5 -0
- package/dist/mdmodel/index.d.ts +19 -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/references.d.ts +3 -0
- package/dist/mdmodel/types.d.ts +166 -0
- package/dist/mdmodel/validate.d.ts +10 -0
- package/dist/mdmodel/version.d.ts +1 -0
- package/dist/mdmodel/yaml.d.ts +55 -0
- package/dist/mdruntime/adapter.d.ts +508 -0
- package/dist/mdruntime/binary.d.ts +22 -0
- package/dist/mdruntime/change-set.d.ts +37 -0
- package/dist/mdruntime/change.d.ts +119 -0
- package/dist/mdruntime/client.d.ts +87 -0
- package/dist/mdruntime/collection.d.ts +39 -0
- package/dist/mdruntime/connection.d.ts +148 -0
- package/dist/mdruntime/conversation.d.ts +116 -0
- package/dist/mdruntime/durability.d.ts +14 -0
- package/dist/mdruntime/failure.d.ts +12 -0
- package/dist/mdruntime/file.d.ts +19 -0
- package/dist/mdruntime/model.d.ts +57 -0
- package/dist/mdruntime/observation.d.ts +31 -0
- package/dist/mdruntime/open.d.ts +1 -0
- package/dist/mdruntime/outcome.d.ts +71 -0
- package/dist/mdruntime/overlay.d.ts +27 -0
- package/dist/mdruntime/query.d.ts +274 -0
- package/dist/mdruntime/reach.d.ts +48 -0
- package/dist/mdruntime/readiness.d.ts +52 -0
- package/dist/mdruntime/recovery.d.ts +24 -0
- package/dist/mdruntime/replica.d.ts +50 -0
- package/dist/mdruntime/room-draft.d.ts +157 -0
- package/dist/mdruntime/rows.d.ts +38 -0
- package/dist/mdruntime/save.d.ts +101 -0
- package/dist/mdruntime/search.d.ts +104 -0
- package/dist/mdruntime/seed.d.ts +15 -0
- package/dist/mdruntime/shared.d.ts +18 -0
- package/dist/mdruntime/status.d.ts +26 -0
- package/dist/mdruntime/store.d.ts +176 -0
- package/dist/mdruntime/transfer.d.ts +9 -0
- package/dist/mdruntime/turn.d.ts +8 -0
- package/dist/mdruntime/wire.d.ts +226 -0
- package/dist/{client/src/test-host.d.ts → test-host.d.ts} +7 -8
- package/dist/test-host.js +200 -0
- package/docs/families.md +82 -39
- package/package.json +6 -9
- 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,22 +1,25 @@
|
|
|
1
1
|
# @agentshouse/app-bridge
|
|
2
2
|
|
|
3
|
-
The
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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 eleven families: navigation,
|
|
7
|
+
ceremonies, installation, notifications, status, Site image reads, App release
|
|
8
|
+
code, external calls, App messages and App and Site screenshot reads.
|
|
8
9
|
[docs/families.md](docs/families.md) describes each and the test host.
|
|
9
10
|
|
|
10
|
-
The
|
|
11
|
+
The bridge carries no credential handling and no Runtime family. House builds
|
|
11
12
|
the MD Runtime client into the page beside the bridge, and `bridge.runtime`
|
|
12
13
|
resolves to that client, so the App imports and constructs none.
|
|
13
14
|
|
|
15
|
+
House's `find_command` "App" is the guide to building an App or a Site.
|
|
16
|
+
|
|
14
17
|
## Use
|
|
15
18
|
|
|
16
19
|
```js
|
|
17
|
-
import {
|
|
20
|
+
import { houseBridge } from '@agentshouse/app-bridge';
|
|
18
21
|
|
|
19
|
-
const bridge =
|
|
22
|
+
const bridge = houseBridge();
|
|
20
23
|
const md = await bridge.runtime;
|
|
21
24
|
|
|
22
25
|
bridge.onAddress((address) => render(address));
|
|
@@ -32,22 +35,24 @@ async function manageSecurity(securityPath) {
|
|
|
32
35
|
try {
|
|
33
36
|
await bridge.ceremony(securityPath);
|
|
34
37
|
} catch (refusal) {
|
|
35
|
-
report(refusal);
|
|
38
|
+
if (refusal.name === 'HouseCeremonyRefused') report(refusal.path);
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
41
|
```
|
|
39
42
|
|
|
40
|
-
`bridge.runtime` resolves to the `MdRuntimeClient` of
|
|
41
|
-
|
|
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, such as `call('member.list', { room_ref })`: `HouseMethods` names each
|
|
46
|
+
with its `params`, `HouseParams<Name>`, and its `result`, `HouseResult<Name>`.
|
|
42
47
|
|
|
43
48
|
## Test without a House
|
|
44
49
|
|
|
45
50
|
```js
|
|
46
|
-
import {
|
|
51
|
+
import { houseBridge } from '@agentshouse/app-bridge';
|
|
47
52
|
import { createHouseBridgeTestHost } from '@agentshouse/app-bridge/test-host';
|
|
48
53
|
|
|
49
54
|
const host = createHouseBridgeTestHost({ address: '/rooms/atlas' });
|
|
50
|
-
const bridge =
|
|
55
|
+
const bridge = houseBridge();
|
|
51
56
|
|
|
52
57
|
bridge.push('/rooms/atlas/members');
|
|
53
58
|
host.open('/rooms/atlas');
|