UriPack: uriwebrtc
Thin Markpact — capabilities from uriwebrtc/uriwebrtc/manifest.yaml.
Handlers: existing python:// refs (code in uriwebrtc/, not duplicated here).
Generated by urisys/scripts/generate_pack_markpacts.py.
```yaml markpact:pack
apiVersion: urisys.io/v1
kind: UriPack
metadata:
id: uriwebrtc
version: ‘1’
language: python
description: WebRTC session — HTTP signaling inbox (node) and DataChannel URI envelopes;
browser P2P via ifURI /api/webrtc/signal.
schemes:
- webrtc
capabilities:
- id: webrtc-session-start
uri: webrtc://local/session/{session}/command/start
kind: command
operation: webrtc.session.start
handler: python://uriwebrtc.handlers:session_start
side_effects: true
approval: required
- id: webrtc-data-send
uri: webrtc://local/session/{session}/data/command/send
kind: command
operation: webrtc.data.send
handler: python://uriwebrtc.handlers:data_send
side_effects: true
approval: required
- id: webrtc-signal-post
uri: webrtc://local/session/{session}/signal/command/post
kind: command
operation: webrtc.signal.post
handler: python://uriwebrtc.handlers:signal_post
side_effects: true
approval: required
- id: webrtc-signal-inbox
uri: webrtc://local/session/{session}/signal/query/inbox
kind: query
operation: webrtc.signal.inbox
handler: python://uriwebrtc.handlers:signal_inbox
side_effects: false
approval: not_required
policy:
default: deny_mutations_without_approval
runtime:
default_environment: real
supports:
- mock
- local
- docker
expose:
- pack
- service
- flow
- interface
- adapter
```
```yaml markpact:run
scheme: webrtc
default: flow
modes:
- pack
- service
- flow
- interface
- adapter
service:
port_hint: 8789
path: /uri/call
flow:
ids:
- webrtc-smoke
uses: []
adapter:
call: POST /uri/call
events: GET /events
```
```yaml markpact:tests
tests:
- id: webrtc.signal.inbox_query
uri: webrtc://local/session/default/signal/query/inbox
context:
approved: true
dry_run: true
environment: mock
expect:
ok: true
operation: webrtc.signal.inbox
- id: webrtc.session.start_command
uri: webrtc://local/session/default/command/start
context:
approved: true
dry_run: true
environment: mock
expect:
ok: true
operation: webrtc.session.start
payload: {}
```
```yaml markpact:flow id=webrtc-smoke
flow:
id: webrtc-smoke
description: Smoke webrtc:// routes (generated from manifest).
defaults:
approved: true
dry_run: true
do:
- webrtc://local/session/default/command/start: {}
- webrtc://local/session/default/data/command/send: {}
- webrtc://local/session/default/signal/command/post: {}
```
```markdown markpact:docs
Unpack → .markpact/
cd uriwebrtc
export TELLMESH_ROOT=/home/tom/github/tellmesh
PACK=markpacts/uriwebrtc.markpact.md
urisys markpact run "$PACK" --as flow --approve --dry-run
urisys markpact run "$PACK" --as pack
urisys markpact run "$PACK" --as service --port 8789
urisys markpact run "$PACK" --as interface
urisys markpact run "$PACK" --as adapter
- Source manifest:
uriwebrtc/uriwebrtc/manifest.yaml
- Requires:
pip install -e uriwebrtc or TELLMESH_ROOT for python:// handlers
```