@gakr-gakr/nostr 0.1.0 → 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.
Files changed (46) hide show
  1. package/autobot.plugin.json +185 -2
  2. package/dist/api.js +522 -0
  3. package/dist/channel-D8oS2TBs.js +1467 -0
  4. package/dist/channel-plugin-api.js +2 -0
  5. package/dist/config-schema-CDJh2g33.js +63 -0
  6. package/dist/default-relays-DLwdWOTu.js +4 -0
  7. package/dist/inbound-direct-dm-runtime-CUjrfnim.js +2 -0
  8. package/dist/index.js +81 -0
  9. package/dist/runtime-api.js +2 -0
  10. package/dist/setup-api.js +2 -0
  11. package/dist/setup-entry.js +11 -0
  12. package/dist/setup-plugin-api.js +166 -0
  13. package/dist/setup-surface-CZj5KM37.js +337 -0
  14. package/dist/test-api.js +2 -0
  15. package/package.json +17 -4
  16. package/api.ts +0 -10
  17. package/channel-plugin-api.ts +0 -1
  18. package/index.ts +0 -95
  19. package/runtime-api.ts +0 -6
  20. package/setup-api.ts +0 -1
  21. package/setup-entry.ts +0 -9
  22. package/setup-plugin-api.ts +0 -3
  23. package/src/channel-api.ts +0 -11
  24. package/src/channel.setup.ts +0 -234
  25. package/src/channel.ts +0 -215
  26. package/src/config-schema.ts +0 -98
  27. package/src/default-relays.ts +0 -1
  28. package/src/gateway.ts +0 -321
  29. package/src/inbound-direct-dm-runtime.ts +0 -1
  30. package/src/metrics.ts +0 -458
  31. package/src/nostr-bus.ts +0 -789
  32. package/src/nostr-key-utils.ts +0 -94
  33. package/src/nostr-profile-core.ts +0 -134
  34. package/src/nostr-profile-http-runtime.ts +0 -6
  35. package/src/nostr-profile-http.ts +0 -583
  36. package/src/nostr-profile-import.ts +0 -262
  37. package/src/nostr-profile-url-safety.ts +0 -21
  38. package/src/nostr-profile.ts +0 -144
  39. package/src/nostr-state-store.ts +0 -206
  40. package/src/runtime.ts +0 -9
  41. package/src/seen-tracker.ts +0 -289
  42. package/src/session-route.ts +0 -25
  43. package/src/setup-surface.ts +0 -267
  44. package/src/types.ts +0 -117
  45. package/test-api.ts +0 -1
  46. package/tsconfig.json +0 -16
@@ -3,13 +3,196 @@
3
3
  "activation": {
4
4
  "onStartup": false
5
5
  },
6
- "channels": ["nostr"],
6
+ "channels": [
7
+ "nostr"
8
+ ],
7
9
  "channelEnvVars": {
8
- "nostr": ["NOSTR_PRIVATE_KEY"]
10
+ "nostr": [
11
+ "NOSTR_PRIVATE_KEY"
12
+ ]
9
13
  },
10
14
  "configSchema": {
11
15
  "type": "object",
12
16
  "additionalProperties": false,
13
17
  "properties": {}
18
+ },
19
+ "channelConfigs": {
20
+ "nostr": {
21
+ "schema": {
22
+ "$schema": "http://json-schema.org/draft-07/schema#",
23
+ "type": "object",
24
+ "properties": {
25
+ "name": {
26
+ "type": "string"
27
+ },
28
+ "defaultAccount": {
29
+ "type": "string"
30
+ },
31
+ "enabled": {
32
+ "type": "boolean"
33
+ },
34
+ "markdown": {
35
+ "type": "object",
36
+ "properties": {
37
+ "tables": {
38
+ "type": "string",
39
+ "enum": [
40
+ "off",
41
+ "bullets",
42
+ "code",
43
+ "block"
44
+ ]
45
+ }
46
+ },
47
+ "additionalProperties": false
48
+ },
49
+ "privateKey": {
50
+ "anyOf": [
51
+ {
52
+ "type": "string"
53
+ },
54
+ {
55
+ "oneOf": [
56
+ {
57
+ "type": "object",
58
+ "properties": {
59
+ "source": {
60
+ "type": "string",
61
+ "const": "env"
62
+ },
63
+ "provider": {
64
+ "type": "string",
65
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
66
+ },
67
+ "id": {
68
+ "type": "string",
69
+ "pattern": "^[A-Z][A-Z0-9_]{0,127}$"
70
+ }
71
+ },
72
+ "required": [
73
+ "source",
74
+ "provider",
75
+ "id"
76
+ ],
77
+ "additionalProperties": false
78
+ },
79
+ {
80
+ "type": "object",
81
+ "properties": {
82
+ "source": {
83
+ "type": "string",
84
+ "const": "file"
85
+ },
86
+ "provider": {
87
+ "type": "string",
88
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
89
+ },
90
+ "id": {
91
+ "type": "string"
92
+ }
93
+ },
94
+ "required": [
95
+ "source",
96
+ "provider",
97
+ "id"
98
+ ],
99
+ "additionalProperties": false
100
+ },
101
+ {
102
+ "type": "object",
103
+ "properties": {
104
+ "source": {
105
+ "type": "string",
106
+ "const": "exec"
107
+ },
108
+ "provider": {
109
+ "type": "string",
110
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
111
+ },
112
+ "id": {
113
+ "type": "string"
114
+ }
115
+ },
116
+ "required": [
117
+ "source",
118
+ "provider",
119
+ "id"
120
+ ],
121
+ "additionalProperties": false
122
+ }
123
+ ]
124
+ }
125
+ ]
126
+ },
127
+ "relays": {
128
+ "type": "array",
129
+ "items": {
130
+ "type": "string"
131
+ }
132
+ },
133
+ "dmPolicy": {
134
+ "type": "string",
135
+ "enum": [
136
+ "pairing",
137
+ "allowlist",
138
+ "open",
139
+ "disabled"
140
+ ]
141
+ },
142
+ "allowFrom": {
143
+ "type": "array",
144
+ "items": {
145
+ "anyOf": [
146
+ {
147
+ "type": "string"
148
+ },
149
+ {
150
+ "type": "number"
151
+ }
152
+ ]
153
+ }
154
+ },
155
+ "profile": {
156
+ "type": "object",
157
+ "properties": {
158
+ "name": {
159
+ "type": "string",
160
+ "maxLength": 256
161
+ },
162
+ "displayName": {
163
+ "type": "string",
164
+ "maxLength": 256
165
+ },
166
+ "about": {
167
+ "type": "string",
168
+ "maxLength": 2000
169
+ },
170
+ "picture": {
171
+ "type": "string",
172
+ "format": "uri"
173
+ },
174
+ "banner": {
175
+ "type": "string",
176
+ "format": "uri"
177
+ },
178
+ "website": {
179
+ "type": "string",
180
+ "format": "uri"
181
+ },
182
+ "nip05": {
183
+ "type": "string"
184
+ },
185
+ "lud16": {
186
+ "type": "string"
187
+ }
188
+ },
189
+ "additionalProperties": false
190
+ }
191
+ },
192
+ "additionalProperties": false
193
+ },
194
+ "label": "Nostr",
195
+ "description": "Decentralized protocol; encrypted DMs via NIP-04."
196
+ }
14
197
  }
15
198
  }