@pragma-sh/constants 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/src/index.ts ADDED
@@ -0,0 +1,174 @@
1
+ import values from "../values.json";
2
+ import type { Constants } from "./generated/constants";
3
+
4
+ export type {
5
+ Constants,
6
+ AppInfo,
7
+ WindowDefaults,
8
+ EditorLaunchers,
9
+ EditorLauncher,
10
+ Scripts,
11
+ Agents,
12
+ Gateway,
13
+ Protocol,
14
+ ProtocolRpcMethod,
15
+ ProtocolEventKind,
16
+ ProtocolErrorCode,
17
+ ControlMethod,
18
+ AutomationScope,
19
+ AutomationTrust,
20
+ AutomationTriggerKind,
21
+ AutomationStatus,
22
+ AutomationInfo,
23
+ AutomationRootRegistration,
24
+ AutomationWorktreeRoot,
25
+ AutomationPendingPayload,
26
+ AutomationsChangedPayload,
27
+ ProjectScriptsConfig,
28
+ RunScriptDefinition,
29
+ RunScriptEntry,
30
+ RunScriptNode,
31
+ RunScriptSplit,
32
+ RunScriptHorizontalSplit,
33
+ RunScriptVerticalSplit,
34
+ ScriptRunStatus,
35
+ SplitTabLeaf,
36
+ SplitHorizontal,
37
+ SplitVertical,
38
+ SplitSplit,
39
+ SplitNode,
40
+ Project,
41
+ Worktree,
42
+ WorktreeStatus,
43
+ AgentStatus,
44
+ AgentReportKind,
45
+ AgentAttentionKind,
46
+ AgentMessageKind,
47
+ AgentMessageRole,
48
+ AgentToolCallStatus,
49
+ AgentFileChangeKind,
50
+ AgentToolCall,
51
+ AgentFileChange,
52
+ AgentMessage,
53
+ QuestionOption,
54
+ AgentQuestion,
55
+ AgentReportPayload,
56
+ AgentDecision,
57
+ AgentAnswer,
58
+ AgentInput,
59
+ AgentInterrupt,
60
+ Tab,
61
+ TabKind,
62
+ DirEntry,
63
+ DiffSide,
64
+ ChangeStatus,
65
+ ChangedFile,
66
+ WorktreeChanges,
67
+ WorktreeCommit,
68
+ WorktreeCommitList,
69
+ FileDiff,
70
+ FileChange,
71
+ FileChangeKind,
72
+ FileContents,
73
+ FileChunk,
74
+ FileReadLimits,
75
+ Scratchpads,
76
+ ScratchpadSummary,
77
+ ScratchpadFile,
78
+ WhiteboardDefaults,
79
+ ExcalidrawScene,
80
+ Whiteboard,
81
+ WhiteboardCreateInput,
82
+ WhiteboardEditInput,
83
+ WhiteboardListInput,
84
+ WhiteboardIdInput,
85
+ WhiteboardViewResult,
86
+ FanoutDefaults,
87
+ Fanout,
88
+ FanoutMember,
89
+ FanoutStatus,
90
+ FanoutMemberStatus,
91
+ FanoutFinalizeStage,
92
+ FanoutFailure,
93
+ FanoutFailureCode,
94
+ FanoutMemberSelector,
95
+ FanoutParentSpec,
96
+ FanoutExistingParent,
97
+ FanoutNewParent,
98
+ FanoutCreateRequest,
99
+ FanoutRef,
100
+ FanoutReadRequest,
101
+ FanoutReadTarget,
102
+ FanoutReadResult,
103
+ FanoutSendTarget,
104
+ FanoutSendRequest,
105
+ FanoutSendResult,
106
+ FanoutDeliveryState,
107
+ FanoutDeliveryReceipt,
108
+ FanoutMemberRequest,
109
+ FanoutResult,
110
+ FanoutPickResult,
111
+ FanoutSubscriptionPayload,
112
+ PaletteSearchMatch,
113
+ PaletteSearchResponse,
114
+ OpenPort,
115
+ ProjectIcon,
116
+ KanbanPromptStatus,
117
+ KanbanCompletedAction,
118
+ KanbanSchedulingMode,
119
+ KanbanPromptCard,
120
+ BoardDraftCreatePayload,
121
+ GitHub,
122
+ GitHubUser,
123
+ GitHubAuthMethod,
124
+ GitHubAuthStatus,
125
+ GitHubSettings,
126
+ PrSignature,
127
+ BranchSyncStatus,
128
+ GitHubRepoRef,
129
+ KeybindingChord,
130
+ PlatformChord,
131
+ Keybindings,
132
+ KeybindingsConfig,
133
+ KeybindingsFiles,
134
+ AgentStatusDefaults,
135
+ AgentStatusSettings,
136
+ TerminalBackend,
137
+ TerminalDefaults,
138
+ TerminalSettings,
139
+ ShellProfile,
140
+ WslDistro,
141
+ WslDistroList,
142
+ SettingsScope,
143
+ AgentSound,
144
+ AgentSoundList,
145
+ Tunnel,
146
+ PairingPayload,
147
+ Updates,
148
+ OtherSettings,
149
+ UpdateApplyMode,
150
+ UpdatePlatform,
151
+ AgentReasoning,
152
+ AgentModelEntry,
153
+ AgentFeature,
154
+ AgentIcon,
155
+ AgentLaunchCommand,
156
+ AgentLaunchConfig,
157
+ AgentStartupInput,
158
+ CatalogAgent,
159
+ AgentCatalog,
160
+ WorkspaceSnapshot,
161
+ AgentSessionLaunchPayload,
162
+ NewWorktreeSpec,
163
+ } from "./generated/constants";
164
+
165
+ /**
166
+ * Shared application constants.
167
+ *
168
+ * The values live in `values.json` and are validated against `schema.json`.
169
+ * The same JSON is consumed by the Rust backend (see `src/lib.rs`), so this is
170
+ * the single source of truth across both languages.
171
+ */
172
+ export const constants = values as Constants;
173
+
174
+ export default constants;
package/values.json ADDED
@@ -0,0 +1,361 @@
1
+ {
2
+ "daemon": {
3
+ "protocolVersion": "0.1.0",
4
+ "socketFile": "daemon.sock",
5
+ "lockFile": "server.lock",
6
+ "logFile": "server.log"
7
+ },
8
+ "gateway": {
9
+ "apiVersion": "0.0.0",
10
+ "discoveryFile": "gateway.json",
11
+ "tokenFile": "gateway-token",
12
+ "devicesFile": "gateway-devices.json",
13
+ "tokenHeader": "authorization",
14
+ "deviceHeaders": {
15
+ "id": "x-pragma-device-id",
16
+ "name": "x-pragma-device-name",
17
+ "platform": "x-pragma-device-platform",
18
+ "appVersion": "x-pragma-app-version"
19
+ },
20
+ "push": {
21
+ "sendUrl": "https://exp.host/--/api/v2/push/send",
22
+ "batchSize": 100,
23
+ "presenceTtlMs": 90000,
24
+ "tokenPrefixes": [
25
+ "ExponentPushToken[",
26
+ "ExpoPushToken["
27
+ ]
28
+ },
29
+ "web": {
30
+ "enabled": false,
31
+ "basePath": "/web",
32
+ "manifestFile": "manifest.json",
33
+ "resourceDir": "web"
34
+ }
35
+ },
36
+ "platform": {
37
+ "defaultBackend": "native",
38
+ "shells": {
39
+ "macos": "/bin/zsh",
40
+ "linux": "/bin/sh",
41
+ "windows": [
42
+ "pwsh.exe",
43
+ "powershell.exe"
44
+ ]
45
+ },
46
+ "wsl": {
47
+ "launcher": "wsl.exe",
48
+ "listArgs": [
49
+ "--list",
50
+ "--verbose"
51
+ ],
52
+ "serverBinary": "pragma-server"
53
+ }
54
+ },
55
+ "tunnel": {
56
+ "defaultCommand": "ngrok http {port} --log stdout --log-format json",
57
+ "defaultUrlPattern": "(https://[^\\s\"]+)"
58
+ },
59
+ "plugins": {
60
+ "configFileName": ".pragma/config.json",
61
+ "storageScopes": [
62
+ "global",
63
+ "project"
64
+ ]
65
+ },
66
+ "theme": {
67
+ "fileName": ".pragma/theme.json",
68
+ "modes": [
69
+ "light",
70
+ "dark"
71
+ ]
72
+ },
73
+ "keybindings": {
74
+ "configFileName": ".pragma/keybindings.json"
75
+ },
76
+ "bench": {
77
+ "hookGlobal": "__PRAGMA_BENCH__",
78
+ "runnerGlobal": "__PRAGMA_BENCH_RUNNER__",
79
+ "markerPrefix": "PRAGMABENCH",
80
+ "tabTitle": "pragma-bench"
81
+ },
82
+ "agentStatus": {
83
+ "soundsDirName": ".pragma/assets/sounds",
84
+ "maxSoundSeconds": 5,
85
+ "maxSoundBytes": 5242880,
86
+ "soundExtensions": [
87
+ "mp3",
88
+ "wav",
89
+ "ogg",
90
+ "oga",
91
+ "m4a",
92
+ "aac",
93
+ "flac",
94
+ "webm"
95
+ ],
96
+ "notificationsEnabled": true,
97
+ "notificationText": {
98
+ "doneTitle": "{agent} finished",
99
+ "attentionTitle": "{agent} needs attention",
100
+ "questionTitle": "{agent} is waiting for an answer",
101
+ "commandTitle": "{agent} wants to run a command",
102
+ "locationSeparator": " / ",
103
+ "tabSuffix": " · tab \"{tab}\"",
104
+ "unknownLocation": "Open Pragma to continue."
105
+ }
106
+ },
107
+ "terminalDefaults": {
108
+ "hiddenDistros": [
109
+ "docker-desktop",
110
+ "docker-desktop-data"
111
+ ],
112
+ "rememberLastShell": false,
113
+ "maxDroppedFileBytes": 10485760,
114
+ "droppedFilesDirName": "pragma-dropped-files",
115
+ "droppedFilesMaxAgeMs": 86400000
116
+ },
117
+ "tabs": {
118
+ "defaultTitles": {
119
+ "fallback": "Shell",
120
+ "browser": "New tab",
121
+ "log": "Server Logs",
122
+ "scratchpad": "Scratchpad",
123
+ "whiteboard": "Whiteboard",
124
+ "prReview": "PR Review",
125
+ "pluginWebview": "Plugin"
126
+ }
127
+ },
128
+ "files": {
129
+ "chunkBytes": 4194304,
130
+ "maxBinaryBytes": 268435456
131
+ },
132
+ "fanout": {
133
+ "stateFile": "fanouts.json",
134
+ "branchPrefix": "fanout",
135
+ "minMembers": 2,
136
+ "defaultJobs": 4,
137
+ "deliveryTimeoutMs": 15000,
138
+ "envFanoutId": "PRAGMA_FANOUT_ID",
139
+ "envMemberId": "PRAGMA_FANOUT_MEMBER_ID"
140
+ },
141
+ "scratchpads": {
142
+ "directory": ".pragma/scratchpads",
143
+ "extension": "mdx",
144
+ "frontmatterKey": "pragmaScratchpad",
145
+ "version": 1
146
+ },
147
+ "whiteboards": {
148
+ "databaseFile": "whiteboards.db",
149
+ "defaultTitle": "Whiteboard",
150
+ "maxTitleChars": 200,
151
+ "maxSceneBytes": 8388608,
152
+ "maxRenderDimension": 4096
153
+ },
154
+ "protocol": {
155
+ "rpcMethods": [
156
+ "git",
157
+ "filesystem",
158
+ "database",
159
+ "kanban",
160
+ "worktrees",
161
+ "projects",
162
+ "tabs",
163
+ "settings",
164
+ "github",
165
+ "ai",
166
+ "exec",
167
+ "automations",
168
+ "plugins",
169
+ "tunnel",
170
+ "scratchpads",
171
+ "whiteboards",
172
+ "wsl",
173
+ "fanouts"
174
+ ],
175
+ "events": [
176
+ "agentStatus",
177
+ "worktreeChanged",
178
+ "kanbanChanged",
179
+ "tabsChanged",
180
+ "fileChanged",
181
+ "echoMode",
182
+ "automationPending",
183
+ "automationsChanged",
184
+ "workspace",
185
+ "fanouts"
186
+ ],
187
+ "errors": [
188
+ "invalidPayload",
189
+ "unsupportedMethod",
190
+ "notFound",
191
+ "staleWrite",
192
+ "permissionDenied",
193
+ "internal"
194
+ ]
195
+ },
196
+ "scripts": {
197
+ "maxConcurrentCommands": 4,
198
+ "configPath": ".pragma/scripts.json",
199
+ "migrationSources": [
200
+ {
201
+ "id": "superset",
202
+ "label": "Superset",
203
+ "configPaths": [
204
+ ".superset/config.json"
205
+ ]
206
+ },
207
+ {
208
+ "id": "emdash",
209
+ "label": "Emdash",
210
+ "configPaths": [
211
+ ".emdash.json"
212
+ ]
213
+ },
214
+ {
215
+ "id": "orca",
216
+ "label": "Orca",
217
+ "configPaths": [
218
+ "orca.yaml",
219
+ "orca.yml",
220
+ ".orca/config.json"
221
+ ]
222
+ }
223
+ ],
224
+ "migrationCommitMessage": "chore(config): add pragma-app.sh config"
225
+ },
226
+ "agents": {
227
+ "startDelayMs": 500,
228
+ "altScreenExtraWaitMs": 15000,
229
+ "altScreenSettleMs": 500
230
+ },
231
+ "github": {
232
+ "oauthClientId": "Ov23li1WfY05SeQNp5tk",
233
+ "scopes": [
234
+ "repo"
235
+ ],
236
+ "deviceCodeUrl": "https://github.com/login/device/code",
237
+ "deviceVerifyUrl": "https://github.com/login/device",
238
+ "accessTokenUrl": "https://github.com/login/oauth/access_token",
239
+ "apiBaseUrl": "https://api.github.com",
240
+ "homepageUrl": "https://github.com/pragma-sh/pragma",
241
+ "prSignature": {
242
+ "enabled": true,
243
+ "startMarker": "<!-- pragma:pr-signature -->",
244
+ "endMarker": "<!-- /pragma:pr-signature -->",
245
+ "linkLabel": "Open worktree in Pragma",
246
+ "openUrl": "https://pragma-app.sh/open"
247
+ }
248
+ },
249
+ "app": {
250
+ "name": "Pragma",
251
+ "identifier": "com.pragma.app",
252
+ "version": "0.1.0"
253
+ },
254
+ "onboarding": {
255
+ "mediaBaseUrl": "https://pragma-app.sh/media",
256
+ "skill": {
257
+ "id": "pragma",
258
+ "targets": [
259
+ {
260
+ "id": "all-agents",
261
+ "directory": ".agents/skills",
262
+ "label": "All agents"
263
+ },
264
+ {
265
+ "id": "claude-code",
266
+ "directory": ".claude/skills",
267
+ "label": "Claude Code"
268
+ }
269
+ ]
270
+ }
271
+ },
272
+ "updates": {
273
+ "checkUrl": "https://pragma-app.sh/api/updates",
274
+ "devCheckUrl": "http://localhost:3000/api/updates",
275
+ "pollIntervalMs": 300000,
276
+ "autoDownload": true,
277
+ "manifestFile": "release.json",
278
+ "uiDirName": "ui",
279
+ "buttonLabel": "Install Update",
280
+ "changelogLabel": "View changelog",
281
+ "restartWarningTitle": "This update restarts the app server",
282
+ "restartWarningBody": "Open terminal sessions will stop. Save anything you need before installing.",
283
+ "applyModes": [
284
+ "reload",
285
+ "restart"
286
+ ],
287
+ "platforms": [
288
+ "darwin-aarch64",
289
+ "darwin-x86_64",
290
+ "linux-x86_64-deb",
291
+ "linux-x86_64-rpm",
292
+ "linux-x86_64-appimage",
293
+ "linux-aarch64-deb",
294
+ "linux-aarch64-rpm",
295
+ "linux-aarch64-appimage",
296
+ "windows-x86_64"
297
+ ]
298
+ },
299
+ "window": {
300
+ "defaultWidth": 1024,
301
+ "defaultHeight": 768,
302
+ "minWidth": 640,
303
+ "minHeight": 480,
304
+ "titlebarHeight": 38,
305
+ "trafficLightInset": 12
306
+ },
307
+ "editorLaunchers": {
308
+ "defaultEditorId": "system",
309
+ "options": [
310
+ {
311
+ "id": "system",
312
+ "name": "File Explorer",
313
+ "brandIcon": "lucide:folder-open",
314
+ "brandColor": "#38bdf8",
315
+ "cliCommand": null
316
+ },
317
+ {
318
+ "id": "vscode",
319
+ "name": "VS Code",
320
+ "brandIcon": "simple-icons:visualstudiocode",
321
+ "brandColor": "#007acc",
322
+ "cliCommand": "code"
323
+ },
324
+ {
325
+ "id": "cursor",
326
+ "name": "Cursor",
327
+ "brandIcon": "simple-icons:cursor",
328
+ "brandColor": "#ffffff",
329
+ "cliCommand": "cursor"
330
+ },
331
+ {
332
+ "id": "windsurf",
333
+ "name": "Windsurf",
334
+ "brandIcon": "simple-icons:windsurf",
335
+ "brandColor": "#00c7be",
336
+ "cliCommand": "windsurf"
337
+ },
338
+ {
339
+ "id": "zed",
340
+ "name": "Zed",
341
+ "brandIcon": "simple-icons:zedindustries",
342
+ "brandColor": "#084ccf",
343
+ "cliCommand": "zed"
344
+ },
345
+ {
346
+ "id": "sublime-text",
347
+ "name": "Sublime Text",
348
+ "brandIcon": "simple-icons:sublimetext",
349
+ "brandColor": "#ff9800",
350
+ "cliCommand": "subl"
351
+ },
352
+ {
353
+ "id": "intellij-idea",
354
+ "name": "IntelliJ IDEA",
355
+ "brandIcon": "simple-icons:intellijidea",
356
+ "brandColor": "#ff2d8f",
357
+ "cliCommand": "idea"
358
+ }
359
+ ]
360
+ }
361
+ }