@pollis-inc/app 0.0.0-stage → 0.1.1

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.
@@ -0,0 +1,148 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://pollis.com/schemas/pollis-app/0.1.0/pollis-app.schema.json",
4
+ "title": "Pollis App manifest (pollis-app.json)",
5
+ "description": "What a Pollis App asks for. An admin can narrow it when approving the App, never widen it; the runtime enforces the manifest intersected with the admin's grants. Pairs with the WIT package pollis:app@0.1.0.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["name", "version"],
9
+ "properties": {
10
+ "$schema": {
11
+ "type": "string",
12
+ "description": "Editor hint; ignored."
13
+ },
14
+ "name": {
15
+ "type": "string",
16
+ "pattern": "^[a-z0-9][a-z0-9-]{0,63}$",
17
+ "description": "Lowercase letters, digits and '-', 1 to 64 characters."
18
+ },
19
+ "version": {
20
+ "type": "string",
21
+ "minLength": 1,
22
+ "description": "The App's own version, shown to admins."
23
+ },
24
+ "description": {
25
+ "type": "string",
26
+ "default": ""
27
+ },
28
+ "triggers": {
29
+ "type": "array",
30
+ "uniqueItems": true,
31
+ "default": [],
32
+ "description": "What can wake the App. Each maps to one exported handler.",
33
+ "items": {
34
+ "enum": ["messages", "mentions", "commands", "schedule", "requests", "webhook"]
35
+ }
36
+ },
37
+ "read": {
38
+ "type": "object",
39
+ "additionalProperties": false,
40
+ "default": {},
41
+ "properties": {
42
+ "channels": {
43
+ "type": "array",
44
+ "uniqueItems": true,
45
+ "default": [],
46
+ "description": "\"#name\" for one channel by name, or \"*\" for whichever channels the admin grants.",
47
+ "items": { "type": "string", "pattern": "^(\\*|#?[^\\s*#][^\\s*]*)$" }
48
+ },
49
+ "history": {
50
+ "type": "integer",
51
+ "minimum": 0,
52
+ "default": 0,
53
+ "description": "Days of history query-messages may reach back. 0: none."
54
+ },
55
+ "events": {
56
+ "type": "array",
57
+ "uniqueItems": true,
58
+ "default": ["created"],
59
+ "description": "Message event kinds the App may see.",
60
+ "items": { "enum": ["created", "edited"] }
61
+ }
62
+ }
63
+ },
64
+ "actions": {
65
+ "type": "array",
66
+ "uniqueItems": true,
67
+ "default": [],
68
+ "description": "What the App may do in the group. There are no moderation actions.",
69
+ "items": {
70
+ "enum": ["post", "reply", "react", "edit_own", "delete_own", "transfer_history"]
71
+ }
72
+ },
73
+ "state": {
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "default": {},
77
+ "properties": {
78
+ "quota": {
79
+ "type": "integer",
80
+ "minimum": 0,
81
+ "default": 0,
82
+ "description": "Bytes of keys plus values in the installation's sealed key-value state. 0: no state."
83
+ }
84
+ }
85
+ },
86
+ "schedules": {
87
+ "type": "array",
88
+ "description": "When the `schedule` trigger fires; required with it and refused without it. Each fires at every Unix time k * every + offset (UTC seconds).",
89
+ "items": {
90
+ "type": "object",
91
+ "additionalProperties": false,
92
+ "required": ["name", "every"],
93
+ "properties": {
94
+ "name": { "type": "string", "pattern": "^[a-z0-9-]{1,32}$", "description": "Passed to on-schedule." },
95
+ "every": { "type": "integer", "minimum": 60, "maximum": 604800, "description": "Period in seconds." },
96
+ "offset": { "type": "integer", "minimum": 0, "default": 0, "description": "Seconds after each period boundary; less than every." }
97
+ }
98
+ }
99
+ },
100
+ "egress": {
101
+ "type": "array",
102
+ "uniqueItems": true,
103
+ "default": [],
104
+ "description": "Exact host names the App may reach over HTTPS. No wildcards, IP literals, ports or schemes. Empty: the App cannot send data outside the group.",
105
+ "items": {
106
+ "type": "string",
107
+ "pattern": "^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]([a-z0-9-]{0,61}[a-z0-9])?$"
108
+ }
109
+ },
110
+ "commands": {
111
+ "type": "array",
112
+ "default": [],
113
+ "maxItems": 25,
114
+ "description": "Slash commands members can pick in the composer (#2018). A command is an ordinary message starting with /name; the runtime hands it to on-command only if it is declared here and the App takes the commands trigger. With request: true it is delivered to the bot as a sealed request (on-request) and never posted in the channel. Names are unique. The commands trigger needs at least one command that is not a request, and a command needs its trigger (commands, or requests for a request command).",
115
+ "items": {
116
+ "type": "object",
117
+ "additionalProperties": false,
118
+ "required": ["name", "description"],
119
+ "properties": {
120
+ "name": {
121
+ "type": "string",
122
+ "pattern": "^[a-z][a-z0-9_-]{0,31}$",
123
+ "description": "Typed after the slash. Lowercase letters, digits, '-' and '_', starting with a letter, 1 to 32 characters."
124
+ },
125
+ "description": {
126
+ "type": "string",
127
+ "minLength": 1,
128
+ "maxLength": 100,
129
+ "pattern": "^[^\\n]*\\S[^\\n]*$",
130
+ "description": "One line shown beside the name in the composer."
131
+ },
132
+ "arg_hint": {
133
+ "type": "string",
134
+ "minLength": 1,
135
+ "maxLength": 60,
136
+ "pattern": "^[^\\n]*\\S[^\\n]*$",
137
+ "description": "What to type after the name, shown greyed (\"<title>\"). Leave it out for a command without arguments."
138
+ },
139
+ "request": {
140
+ "type": "boolean",
141
+ "default": false,
142
+ "description": "Deliver as a sealed request to the bot (on-request; needs the requests trigger) instead of posting in the channel (on-command; needs the commands trigger)."
143
+ }
144
+ }
145
+ }
146
+ }
147
+ }
148
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.