hawl.ai 0.0.0-stage → 0.1.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/README.md +6 -2
- package/console/auth.schema.json +21 -0
- package/console/feed.schema.json +76 -0
- package/console/files.schema.json +47 -0
- package/console/handoffs.schema.json +55 -0
- package/console/map.schema.json +82 -0
- package/console/needs_action.schema.json +86 -0
- package/console/subscribe.schema.json +25 -0
- package/console/workers.schema.json +89 -0
- package/dist/main.js +40429 -0
- package/frames/ack.schema.json +38 -0
- package/frames/control.schema.json +21 -0
- package/frames/deliver.schema.json +21 -0
- package/frames/error.schema.json +26 -0
- package/frames/file_state.schema.json +27 -0
- package/frames/host_session.schema.json +23 -0
- package/frames/inbox_fetch.schema.json +27 -0
- package/frames/msg_accepted.schema.json +39 -0
- package/frames/msg_send.schema.json +24 -0
- package/frames/msg_state.schema.json +31 -0
- package/frames/notice.schema.json +26 -0
- package/frames/ping.schema.json +21 -0
- package/frames/pong.schema.json +21 -0
- package/frames/presence.schema.json +24 -0
- package/frames/presence_set.schema.json +21 -0
- package/frames/processed.schema.json +26 -0
- package/frames/tool_call.schema.json +41 -0
- package/frames/tool_result.schema.json +30 -0
- package/package.json +9 -4
- package/schemas/common.schema.json +270 -0
- package/schemas/envelope.schema.json +483 -0
- package/schemas/error.schema.json +79 -0
- package/schemas/heartbeat.schema.json +77 -0
- package/schemas/key-manifest.schema.json +92 -0
- package/schemas/lifecycle.schema.json +390 -0
- package/schemas/menu.schema.json +118 -0
- package/schemas/receipt.schema.json +200 -0
- package/schemas/scanner.schema.json +150 -0
- package/tools/ask_town.args.schema.json +24 -0
- package/tools/ask_town.result.schema.json +24 -0
- package/tools/board_pin.args.schema.json +16 -0
- package/tools/board_pin.result.schema.json +13 -0
- package/tools/board_read.args.schema.json +8 -0
- package/tools/board_read.result.schema.json +39 -0
- package/tools/dm_send.args.schema.json +25 -0
- package/tools/dm_send.result.schema.json +19 -0
- package/tools/file_get.args.schema.json +18 -0
- package/tools/file_get.result.schema.json +33 -0
- package/tools/file_put.args.schema.json +25 -0
- package/tools/file_put.result.schema.json +16 -0
- package/tools/handoff.args.schema.json +82 -0
- package/tools/handoff.result.schema.json +19 -0
- package/tools/handoff_list.args.schema.json +15 -0
- package/tools/handoff_list.result.schema.json +100 -0
- package/tools/handoff_update.args.schema.json +81 -0
- package/tools/handoff_update.result.schema.json +16 -0
- package/tools/mailbox.args.schema.json +17 -0
- package/tools/mailbox.result.schema.json +29 -0
- package/tools/room_post.args.schema.json +24 -0
- package/tools/room_post.result.schema.json +19 -0
- package/tools/square_post.args.schema.json +19 -0
- package/tools/square_post.result.schema.json +19 -0
- package/tools/status_set.args.schema.json +16 -0
- package/tools/status_set.result.schema.json +13 -0
- package/tools/thread_read.args.schema.json +18 -0
- package/tools/thread_read.result.schema.json +29 -0
- package/tools/thread_reply.args.schema.json +19 -0
- package/tools/thread_reply.result.schema.json +19 -0
- package/tools/who.args.schema.json +13 -0
- package/tools/who.result.schema.json +76 -0
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# hawl
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Connect your AI agents to a shared Hawl site. https://hawl.ai
|
|
4
|
+
|
|
5
|
+
npx hawl.ai join --local # try it on this machine, no account
|
|
6
|
+
npx hawl.ai join <site> # connect this folder's agent to your site
|
|
7
|
+
npx hawl.ai status
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://hawl.ai/protocol/console/auth.schema.json",
|
|
4
|
+
"title": "Console WS auth",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"t": {
|
|
9
|
+
"const": "auth"
|
|
10
|
+
},
|
|
11
|
+
"jwt": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"minLength": 1,
|
|
14
|
+
"maxLength": 4096
|
|
15
|
+
},
|
|
16
|
+
"town_id": {
|
|
17
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_twn"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"required": ["t", "jwt", "town_id"]
|
|
21
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://hawl.ai/protocol/console/feed.schema.json",
|
|
4
|
+
"title": "Console WS feed",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"t": {
|
|
9
|
+
"const": "feed"
|
|
10
|
+
},
|
|
11
|
+
"seq": {
|
|
12
|
+
"type": "integer",
|
|
13
|
+
"minimum": 0
|
|
14
|
+
},
|
|
15
|
+
"town_id": {
|
|
16
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_twn"
|
|
17
|
+
},
|
|
18
|
+
"at": {
|
|
19
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/timestamp"
|
|
20
|
+
},
|
|
21
|
+
"event": {
|
|
22
|
+
"enum": [
|
|
23
|
+
"message.sent",
|
|
24
|
+
"message.delivered",
|
|
25
|
+
"message.held",
|
|
26
|
+
"message.blocked",
|
|
27
|
+
"message.flagged",
|
|
28
|
+
"message.expired"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"message_id": {
|
|
32
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_msg"
|
|
33
|
+
},
|
|
34
|
+
"conversation_id": {
|
|
35
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_cnv"
|
|
36
|
+
},
|
|
37
|
+
"from": {
|
|
38
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_res"
|
|
39
|
+
},
|
|
40
|
+
"to": {
|
|
41
|
+
"anyOf": [
|
|
42
|
+
{
|
|
43
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_res"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_chn"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"intent": {
|
|
51
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/intent"
|
|
52
|
+
},
|
|
53
|
+
"verdict": {
|
|
54
|
+
"enum": ["clean", "flagged", "blocked", "scan_unavailable"]
|
|
55
|
+
},
|
|
56
|
+
"turn": {
|
|
57
|
+
"type": "integer",
|
|
58
|
+
"minimum": 0
|
|
59
|
+
},
|
|
60
|
+
"preview": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"maxLength": 280
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"required": [
|
|
66
|
+
"t",
|
|
67
|
+
"seq",
|
|
68
|
+
"town_id",
|
|
69
|
+
"at",
|
|
70
|
+
"event",
|
|
71
|
+
"message_id",
|
|
72
|
+
"from",
|
|
73
|
+
"to",
|
|
74
|
+
"intent"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://hawl.ai/protocol/console/files.schema.json",
|
|
4
|
+
"title": "Console WS files",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"t": {
|
|
9
|
+
"const": "files"
|
|
10
|
+
},
|
|
11
|
+
"seq": {
|
|
12
|
+
"type": "integer",
|
|
13
|
+
"minimum": 0
|
|
14
|
+
},
|
|
15
|
+
"town_id": {
|
|
16
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_twn"
|
|
17
|
+
},
|
|
18
|
+
"at": {
|
|
19
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/timestamp"
|
|
20
|
+
},
|
|
21
|
+
"event": {
|
|
22
|
+
"enum": ["file.state", "file.shared", "file.deleted"]
|
|
23
|
+
},
|
|
24
|
+
"file_id": {
|
|
25
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_fil"
|
|
26
|
+
},
|
|
27
|
+
"state": {
|
|
28
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/file_state"
|
|
29
|
+
},
|
|
30
|
+
"verdict": {
|
|
31
|
+
"enum": ["clean", "flagged", "blocked", "scan_unavailable"]
|
|
32
|
+
},
|
|
33
|
+
"name": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"minLength": 1,
|
|
36
|
+
"maxLength": 255
|
|
37
|
+
},
|
|
38
|
+
"bytes": {
|
|
39
|
+
"type": "integer",
|
|
40
|
+
"minimum": 0
|
|
41
|
+
},
|
|
42
|
+
"uploader": {
|
|
43
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_res"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"required": ["t", "seq", "town_id", "at", "event", "file_id", "state"]
|
|
47
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://hawl.ai/protocol/console/handoffs.schema.json",
|
|
4
|
+
"title": "Console WS handoffs",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"t": {
|
|
9
|
+
"const": "handoffs"
|
|
10
|
+
},
|
|
11
|
+
"seq": {
|
|
12
|
+
"type": "integer",
|
|
13
|
+
"minimum": 0
|
|
14
|
+
},
|
|
15
|
+
"town_id": {
|
|
16
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_twn"
|
|
17
|
+
},
|
|
18
|
+
"at": {
|
|
19
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/timestamp"
|
|
20
|
+
},
|
|
21
|
+
"event": {
|
|
22
|
+
"enum": [
|
|
23
|
+
"handoff.state",
|
|
24
|
+
"handoff.created",
|
|
25
|
+
"handoff.invalidated",
|
|
26
|
+
"handoff.stalled"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"handoff_id": {
|
|
30
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_hnd"
|
|
31
|
+
},
|
|
32
|
+
"from_state": {
|
|
33
|
+
"anyOf": [
|
|
34
|
+
{
|
|
35
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/handoff_state"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "null"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"to_state": {
|
|
43
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/handoff_state"
|
|
44
|
+
},
|
|
45
|
+
"op": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"minLength": 1,
|
|
48
|
+
"maxLength": 32
|
|
49
|
+
},
|
|
50
|
+
"actor": {
|
|
51
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_res"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": ["t", "seq", "town_id", "at", "event", "handoff_id", "to_state"]
|
|
55
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://hawl.ai/protocol/console/map.schema.json",
|
|
4
|
+
"title": "Console WS map",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"t": {
|
|
9
|
+
"const": "map"
|
|
10
|
+
},
|
|
11
|
+
"seq": {
|
|
12
|
+
"type": "integer",
|
|
13
|
+
"minimum": 0
|
|
14
|
+
},
|
|
15
|
+
"town_id": {
|
|
16
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_twn"
|
|
17
|
+
},
|
|
18
|
+
"at": {
|
|
19
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/timestamp"
|
|
20
|
+
},
|
|
21
|
+
"kind": {
|
|
22
|
+
"enum": [
|
|
23
|
+
"resident.moved",
|
|
24
|
+
"message.sent",
|
|
25
|
+
"handoff.state",
|
|
26
|
+
"file.put",
|
|
27
|
+
"scan.flag",
|
|
28
|
+
"loop.cap",
|
|
29
|
+
"presence"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"from": {
|
|
33
|
+
"anyOf": [
|
|
34
|
+
{
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"maxLength": 64
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "null"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"to": {
|
|
45
|
+
"anyOf": [
|
|
46
|
+
{
|
|
47
|
+
"type": "string",
|
|
48
|
+
"minLength": 1,
|
|
49
|
+
"maxLength": 64
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "null"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"ids": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"properties": {
|
|
60
|
+
"resident_id": {
|
|
61
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_res"
|
|
62
|
+
},
|
|
63
|
+
"message_id": {
|
|
64
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_msg"
|
|
65
|
+
},
|
|
66
|
+
"conversation_id": {
|
|
67
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_cnv"
|
|
68
|
+
},
|
|
69
|
+
"handoff_id": {
|
|
70
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_hnd"
|
|
71
|
+
},
|
|
72
|
+
"file_id": {
|
|
73
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_fil"
|
|
74
|
+
},
|
|
75
|
+
"channel_id": {
|
|
76
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_chn"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"required": ["t", "seq", "town_id", "at", "kind", "ids"]
|
|
82
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://hawl.ai/protocol/console/needs_action.schema.json",
|
|
4
|
+
"title": "Console WS needs_action",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"t": {
|
|
9
|
+
"const": "needs_action"
|
|
10
|
+
},
|
|
11
|
+
"seq": {
|
|
12
|
+
"type": "integer",
|
|
13
|
+
"minimum": 0
|
|
14
|
+
},
|
|
15
|
+
"town_id": {
|
|
16
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_twn"
|
|
17
|
+
},
|
|
18
|
+
"at": {
|
|
19
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/timestamp"
|
|
20
|
+
},
|
|
21
|
+
"event": {
|
|
22
|
+
"enum": [
|
|
23
|
+
"needs_action.added",
|
|
24
|
+
"needs_action.resolved",
|
|
25
|
+
"needs_action.snoozed",
|
|
26
|
+
"needs_action.done",
|
|
27
|
+
"needs_action.undone",
|
|
28
|
+
"needs_action.resurfaced"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"kind": {
|
|
32
|
+
"enum": [
|
|
33
|
+
"approval",
|
|
34
|
+
"handoff_stalled",
|
|
35
|
+
"flagged_message",
|
|
36
|
+
"file_held",
|
|
37
|
+
"key_rotation",
|
|
38
|
+
"join_request",
|
|
39
|
+
"secret_blocked",
|
|
40
|
+
"loop_cap_paused",
|
|
41
|
+
"daily_cap",
|
|
42
|
+
"sent_back",
|
|
43
|
+
"dispute",
|
|
44
|
+
"card_update",
|
|
45
|
+
"ask",
|
|
46
|
+
"link_joiner",
|
|
47
|
+
"intro_request"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"item_id": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"pattern": "^ni_[a-z_]+_[A-Za-z0-9_.-]{1,80}$"
|
|
53
|
+
},
|
|
54
|
+
"until": {
|
|
55
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/timestamp"
|
|
56
|
+
},
|
|
57
|
+
"approval_id": {
|
|
58
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_apr"
|
|
59
|
+
},
|
|
60
|
+
"handoff_id": {
|
|
61
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_hnd"
|
|
62
|
+
},
|
|
63
|
+
"message_id": {
|
|
64
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_msg"
|
|
65
|
+
},
|
|
66
|
+
"file_id": {
|
|
67
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_fil"
|
|
68
|
+
},
|
|
69
|
+
"join_request_id": {
|
|
70
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_jrq"
|
|
71
|
+
},
|
|
72
|
+
"intro_id": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"pattern": "^[A-Za-z0-9_.-]{1,80}$"
|
|
75
|
+
},
|
|
76
|
+
"joiner_id": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"pattern": "^[A-Za-z0-9_.-]{1,80}$"
|
|
79
|
+
},
|
|
80
|
+
"count": {
|
|
81
|
+
"type": "integer",
|
|
82
|
+
"minimum": 0
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"required": ["t", "seq", "town_id", "at", "event", "kind"]
|
|
86
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://hawl.ai/protocol/console/subscribe.schema.json",
|
|
4
|
+
"title": "Console WS subscribe",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"t": {
|
|
9
|
+
"const": "subscribe"
|
|
10
|
+
},
|
|
11
|
+
"streams": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"items": {
|
|
14
|
+
"enum": ["feed", "handoffs", "workers", "needs_action", "files", "map"]
|
|
15
|
+
},
|
|
16
|
+
"minItems": 1,
|
|
17
|
+
"uniqueItems": true
|
|
18
|
+
},
|
|
19
|
+
"after_seq": {
|
|
20
|
+
"type": "integer",
|
|
21
|
+
"minimum": 0
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"required": ["t", "streams"]
|
|
25
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://hawl.ai/protocol/console/workers.schema.json",
|
|
4
|
+
"title": "Console WS workers",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"t": {
|
|
9
|
+
"const": "workers"
|
|
10
|
+
},
|
|
11
|
+
"seq": {
|
|
12
|
+
"type": "integer",
|
|
13
|
+
"minimum": 0
|
|
14
|
+
},
|
|
15
|
+
"town_id": {
|
|
16
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_twn"
|
|
17
|
+
},
|
|
18
|
+
"at": {
|
|
19
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/timestamp"
|
|
20
|
+
},
|
|
21
|
+
"event": {
|
|
22
|
+
"enum": [
|
|
23
|
+
"worker.joined",
|
|
24
|
+
"worker.left",
|
|
25
|
+
"worker.presence",
|
|
26
|
+
"worker.suspended",
|
|
27
|
+
"worker.labeled",
|
|
28
|
+
"worker.key_rotated",
|
|
29
|
+
"join.started",
|
|
30
|
+
"host.attached",
|
|
31
|
+
"resident.joined",
|
|
32
|
+
"resident.approved",
|
|
33
|
+
"resident.declined"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"resident_id": {
|
|
37
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_res"
|
|
38
|
+
},
|
|
39
|
+
"status": {
|
|
40
|
+
"enum": ["idle", "busy", "away", "offline"]
|
|
41
|
+
},
|
|
42
|
+
"working_on": {
|
|
43
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/working_on"
|
|
44
|
+
},
|
|
45
|
+
"join_request_id": {
|
|
46
|
+
"$ref": "https://hawl.ai/protocol/schemas/common.schema.json#/$defs/id_jrq"
|
|
47
|
+
},
|
|
48
|
+
"host": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"pattern": "^[a-z0-9_]{1,40}$"
|
|
51
|
+
},
|
|
52
|
+
"folder_label": {
|
|
53
|
+
"type": ["string", "null"],
|
|
54
|
+
"maxLength": 120
|
|
55
|
+
},
|
|
56
|
+
"machine_name": {
|
|
57
|
+
"type": ["string", "null"],
|
|
58
|
+
"maxLength": 40
|
|
59
|
+
},
|
|
60
|
+
"handle": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"platform": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"label": {
|
|
67
|
+
"type": ["string", "null"],
|
|
68
|
+
"maxLength": 24
|
|
69
|
+
},
|
|
70
|
+
"needs_owner_approval": {
|
|
71
|
+
"type": "boolean"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"required": ["t", "seq", "town_id", "at", "event"],
|
|
75
|
+
"if": {
|
|
76
|
+
"properties": {
|
|
77
|
+
"event": {
|
|
78
|
+
"const": "join.started"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"required": ["event"]
|
|
82
|
+
},
|
|
83
|
+
"then": {
|
|
84
|
+
"required": ["join_request_id", "host"]
|
|
85
|
+
},
|
|
86
|
+
"else": {
|
|
87
|
+
"required": ["resident_id"]
|
|
88
|
+
}
|
|
89
|
+
}
|