@happyvertical/smrt-chat 0.42.6 → 0.43.0
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/AGENTS.md +7 -0
- package/README.md +19 -0
- package/dist/chunks/data-surface-bridge-BJomMxjS.js +740 -0
- package/dist/chunks/data-surface-bridge-BJomMxjS.js.map +1 -0
- package/dist/data-surface-bridge.d.ts +186 -0
- package/dist/data-surface-bridge.d.ts.map +1 -0
- package/dist/data-surface-bridge.js +2 -0
- package/dist/data-surface-normalizer.d.ts +11 -0
- package/dist/data-surface-normalizer.d.ts.map +1 -0
- package/dist/data-surface-tools.d.ts +9 -0
- package/dist/data-surface-tools.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +106 -22
- package/dist/smrt-knowledge.json +7 -5
- package/package.json +19 -11
package/AGENTS.md
CHANGED
|
@@ -44,6 +44,13 @@ Facade: `sendMessage()` (authors as the actor with `role: 'user'`; room-membersh
|
|
|
44
44
|
|
|
45
45
|
`allowedTools` is a JSON array controlled by the consuming app. Fail-closed: an empty/unparseable whitelist permits NO tools. The internal `sendAgentReply(service, params)` function enforces the whitelist before emitting any `tool`/`tool_call` message; a caller cannot supply a `senderProfileId`/`role` to post as the agent, and the function is not reachable from the package index.
|
|
46
46
|
|
|
47
|
+
Principal-bound data discovery and reads are available as `PrincipalTool[]` via
|
|
48
|
+
`createDataSurfaceTools()` (re-exported by the chat package). Pass the tools as
|
|
49
|
+
`extraTools` to the persona conversation/tool loop. They use the same
|
|
50
|
+
fail-closed `allowedTools` offer/execution gates; RBAC, tenant, redaction,
|
|
51
|
+
bounded query results, and audit authority remain in the authenticated
|
|
52
|
+
`PrincipalRun` supplied by `@happyvertical/smrt-agents`.
|
|
53
|
+
|
|
47
54
|
## Conversational Harness (L3, #1891)
|
|
48
55
|
|
|
49
56
|
The "chat with your learning agent" surface — the real agentic runtime for `AgentSession` (the only shipping chat runtime before this was a single-shot completion). This is the new **acyclic `chat → personas` / `chat → agents` / `chat → users` edge**; keep it that way (personas/agents/users never depend back on chat).
|
package/README.md
CHANGED
|
@@ -8,6 +8,25 @@ Chat rooms, DMs, threads, and agent conversations for the s-m-r-t framework. Sup
|
|
|
8
8
|
pnpm add @happyvertical/smrt-chat
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## Data-surface bridge security
|
|
12
|
+
|
|
13
|
+
The `./data-surface-bridge` entry point is the server half of the browser data-
|
|
14
|
+
surface protocol. Supply a transport adapter whose `subscribe` callback
|
|
15
|
+
provides peer metadata derived from authenticated connection state (such as a
|
|
16
|
+
bound WebSocket session or origin-checked `postMessage` peer). Never copy
|
|
17
|
+
`sessionId` or `source` from an untrusted message into that metadata, and route
|
|
18
|
+
`send` only to the authenticated peer.
|
|
19
|
+
|
|
20
|
+
The bridge validates and bounds every command, acknowledgement, and event
|
|
21
|
+
before it crosses the server boundary, using the shared identifier limit from
|
|
22
|
+
`@happyvertical/smrt-ui/data-surface`. `authorize` remains the application’s
|
|
23
|
+
responsibility and must fail closed. Commands are scoped to the configured
|
|
24
|
+
session/source, expire by TTL, and are idempotent by command ID plus command
|
|
25
|
+
signature; replay retention is bounded and capacity exhaustion returns an
|
|
26
|
+
explicit `replay_capacity_exceeded` outcome. Invalid, stale, disconnected, or
|
|
27
|
+
transport-failed work resolves with a protocol failure reason rather than
|
|
28
|
+
trusting browser data or throwing raw transport errors.
|
|
29
|
+
|
|
11
30
|
## Usage
|
|
12
31
|
|
|
13
32
|
### Local dev server
|