@agentshouse/app-bridge 0.1.0-c357a960443ec → 0.1.0-c366b4a3a09aa

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 (75) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +21 -18
  3. package/dist/calls.d.ts +725 -0
  4. package/dist/calls.js +1 -0
  5. package/dist/index.d.ts +182 -0
  6. package/dist/index.js +1 -0
  7. package/dist/mdmodel/blocks.d.ts +10 -0
  8. package/dist/mdmodel/condition.d.ts +162 -0
  9. package/dist/mdmodel/definition.d.ts +81 -0
  10. package/dist/mdmodel/divide.d.ts +2 -0
  11. package/dist/mdmodel/document.d.ts +15 -0
  12. package/dist/mdmodel/fields.d.ts +5 -0
  13. package/dist/mdmodel/index.d.ts +20 -0
  14. package/dist/mdmodel/links.d.ts +28 -0
  15. package/dist/mdmodel/paths.d.ts +25 -0
  16. package/dist/mdmodel/profile.d.ts +5 -0
  17. package/dist/mdmodel/project.d.ts +21 -0
  18. package/dist/mdmodel/references.d.ts +3 -0
  19. package/dist/mdmodel/types.d.ts +167 -0
  20. package/dist/mdmodel/validate.d.ts +31 -0
  21. package/dist/mdmodel/version.d.ts +1 -0
  22. package/dist/mdmodel/yaml.d.ts +55 -0
  23. package/dist/mdruntime/adapter.d.ts +531 -0
  24. package/dist/mdruntime/binary.d.ts +17 -0
  25. package/dist/mdruntime/chain.d.ts +10 -0
  26. package/dist/mdruntime/change-set.d.ts +27 -0
  27. package/dist/mdruntime/change.d.ts +118 -0
  28. package/dist/mdruntime/client.d.ts +90 -0
  29. package/dist/mdruntime/collection.d.ts +30 -0
  30. package/dist/mdruntime/compile.d.ts +15 -0
  31. package/dist/mdruntime/connection.d.ts +154 -0
  32. package/dist/mdruntime/conversation.d.ts +118 -0
  33. package/dist/mdruntime/durability.d.ts +12 -0
  34. package/dist/mdruntime/failure.d.ts +12 -0
  35. package/dist/mdruntime/fulltext.d.ts +26 -0
  36. package/dist/mdruntime/identity.d.ts +6 -0
  37. package/dist/mdruntime/media.d.ts +7 -0
  38. package/dist/mdruntime/messages.d.ts +27 -0
  39. package/dist/mdruntime/model.d.ts +63 -0
  40. package/dist/mdruntime/observation.d.ts +44 -0
  41. package/dist/mdruntime/open.d.ts +1 -0
  42. package/dist/mdruntime/opened.d.ts +21 -0
  43. package/dist/mdruntime/outcome.d.ts +87 -0
  44. package/dist/mdruntime/overlay.d.ts +24 -0
  45. package/dist/mdruntime/query.d.ts +283 -0
  46. package/dist/mdruntime/reach.d.ts +53 -0
  47. package/dist/mdruntime/readiness.d.ts +62 -0
  48. package/dist/mdruntime/recovery.d.ts +25 -0
  49. package/dist/mdruntime/replica.d.ts +68 -0
  50. package/dist/mdruntime/room-draft.d.ts +173 -0
  51. package/dist/mdruntime/save.d.ts +102 -0
  52. package/dist/mdruntime/search.d.ts +72 -0
  53. package/dist/mdruntime/seed.d.ts +15 -0
  54. package/dist/mdruntime/shared.d.ts +15 -0
  55. package/dist/mdruntime/status.d.ts +31 -0
  56. package/dist/mdruntime/store.d.ts +166 -0
  57. package/dist/mdruntime/stored.d.ts +134 -0
  58. package/dist/mdruntime/tables.d.ts +351 -0
  59. package/dist/mdruntime/transfer.d.ts +9 -0
  60. package/dist/mdruntime/wire.d.ts +238 -0
  61. package/dist/{client/src/test-host.d.ts → test-host.d.ts} +13 -8
  62. package/dist/test-host.js +216 -0
  63. package/docs/families.md +108 -42
  64. package/package.json +15 -9
  65. package/dist/client/src/bridge.d.ts +0 -41
  66. package/dist/client/src/bridge.js +0 -300
  67. package/dist/client/src/index.d.ts +0 -3
  68. package/dist/client/src/index.js +0 -2
  69. package/dist/client/src/test-host.js +0 -180
  70. package/dist/client/src/wire.d.ts +0 -89
  71. package/dist/client/src/wire.js +0 -1
  72. package/dist/src/apps/remainder.d.ts +0 -2
  73. package/dist/src/apps/remainder.js +0 -16
  74. package/dist/src/apps/tab.d.ts +0 -6
  75. package/dist/src/apps/tab.js +0 -27
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Anton (trof3039)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,24 +1,26 @@
1
1
  # @agentshouse/app-bridge
2
2
 
3
- The renderer-side client of the agents.house App bridge. An App served by House
4
- receives one message port before its own scripts run; this package is that
5
- port's one listener. It carries eleven families: navigation, ceremonies,
6
- installation, notifications, status, Site image reads, App release code,
7
- external calls, App messages and App and Site screenshot reads.
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 twelve families: navigation,
7
+ ceremonies, installation, notifications, status, Site image reads, App release
8
+ code, external calls, App messages, App and Site screenshot reads and the Chat.
8
9
  [docs/families.md](docs/families.md) describes each and the test host.
9
10
 
10
- The package carries no credential handling and no Runtime family. It surfaces
11
- the dedicated Runtime port the worker transfers over the bridge as a plain
12
- message port, which the App hands to the MD Runtime client entry.
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.
14
+
15
+ House's guide to building an App is its Guide's `apps/` pages, which `open_guide` opens.
13
16
 
14
17
  ## Use
15
18
 
16
19
  ```js
17
- import { connectHouseBridge } from '@agentshouse/app-bridge';
18
- import { connectMdRuntime } from '@agentshouse/mdruntime/client';
20
+ import { houseBridge } from '@agentshouse/app-bridge';
19
21
 
20
- const bridge = connectHouseBridge();
21
- const md = connectMdRuntime(await bridge.runtime);
22
+ const bridge = houseBridge();
23
+ const md = await bridge.runtime;
22
24
 
23
25
  bridge.onAddress((address) => render(address));
24
26
  bridge.onStatus((status) => showSync(status.sync));
@@ -33,23 +35,24 @@ async function manageSecurity(securityPath) {
33
35
  try {
34
36
  await bridge.ceremony(securityPath);
35
37
  } catch (refusal) {
36
- report(refusal);
38
+ if (refusal.name === 'HouseCeremonyRefused') report(refusal.path);
37
39
  }
38
40
  }
39
41
  ```
40
42
 
41
- `bridge.runtime` resolves with a structural `HouseMessagePort`. A consumer whose
42
- Runtime client entry asks for the DOM `MessagePort` type passes it through
43
- directly at run time and casts at the type level.
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>`.
44
47
 
45
48
  ## Test without a House
46
49
 
47
50
  ```js
48
- import { connectHouseBridge } from '@agentshouse/app-bridge';
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 = connectHouseBridge(host.port);
55
+ const bridge = houseBridge();
53
56
 
54
57
  bridge.push('/rooms/atlas/members');
55
58
  host.open('/rooms/atlas');