-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
611 lines (611 loc) · 18.6 KB
/
package.json
File metadata and controls
611 lines (611 loc) · 18.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
{
"name": "sac-language-support",
"publisher": "SacBase",
"author": {
"name": "Luuk Kablan",
"email": "luuk@kablan.nl",
"url": "https://kablan.nl"
},
"displayName": "SaC (Single Assignment C) Language Support",
"description": "VS Code extension providing language support and improved developer workflow for SaC (Single Assignment C), including syntax highlighting and compiler diagnostics.",
"version": "0.0.1",
"repository": {
"url": "https://github.com/SacBase/vscode"
},
"license": "MIT",
"bugs": {
"email": "luuk@kablan.nl",
"url": "https://github.com/SacBase/vscode/issues"
},
"keywords": [
"sac",
"single-assignment c",
"sac highlight",
"sac syntax"
],
"icon": "./icons/logo.png",
"galleryBanner": {
"color": "#ffc02e",
"theme": "dark"
},
"categories": [
"Programming Languages",
"Language Packs",
"Snippets",
"Themes",
"Formatters",
"AI",
"Chat"
],
"main": "./out/extension.js",
"activationEvents": [
"onLanguage:sac",
"onLanguage:sac-format",
"onLanguage:sac-config",
"onChatParticipant:sac-language-support.sac"
],
"engines": {
"vscode": "^1.115.0",
"node": ">=24.14.0 <25"
},
"packageManager": "npm@11.9.0",
"scripts": {
"vscode:prepublish": "npm run bundle",
"clean:out": "node -e \"require('fs').rmSync('out', { recursive: true, force: true })\"",
"build:copilot:mcp": "esbuild src/copilot/mcp/sac2c-mcp.ts --bundle --platform=node --target=node20 --format=cjs --outfile=src/copilot/mcp/sac2c-mcp.js",
"bundle": "npm run clean:out && esbuild src/extension.ts src/lsp-server/server.ts --bundle --platform=node --target=node20 --format=cjs --outdir=out --outbase=src --sourcemap --external:vscode --tsconfig=tsconfig.json",
"compile": "tsc -p ./ && tsc-alias -p tsconfig.json && npm run build:copilot:mcp",
"watch": "concurrently -k \"tsc -watch -p ./\" \"tsc-alias -p tsconfig.json -w\" \"esbuild src/copilot/mcp/sac2c-mcp.ts --bundle --platform=node --target=node20 --format=cjs --outfile=src/copilot/mcp/sac2c-mcp.js --watch\"",
"package": "vsce package",
"lint": "eslint \"src/**/*.ts\"",
"lint:fix": "npm run lint -- --fix",
"format": "prettier --write \"**/*.{ts,js,json,md,yml,yaml}\"",
"format:check": "prettier --check \"**/*.{ts,js,json,md,yml,yaml}\""
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^8.44.1",
"@typescript-eslint/parser": "^8.44.1",
"@types/node": "^25.5.2",
"@types/vscode": "^1.115.0",
"@vscode/vsce": "^3.7.1",
"concurrently": "^9.1.2",
"eslint": "^10.2.0",
"eslint-config-prettier": "^10.1.8",
"esbuild": "^0.25.3",
"prettier": "^3.6.2",
"tsc-alias": "^1.8.16",
"typescript": "^6.0.2",
"uuid": ">=14.0.0",
"vscode-languageclient": "^9.0.1",
"vscode-languageserver": "^9.0.1",
"vscode-languageserver-textdocument": "^1.0.12"
},
"contributes": {
"languages": [
{
"id": "sac",
"aliases": [
"SaC",
"sac",
"Single-assignment C"
],
"extensions": [
".sac"
],
"configuration": "./language-configuration.json"
},
{
"id": "sac-format",
"aliases": [
"SaC Format",
"sac-format",
"Single-assignment C Format Config"
],
"filenames": [
".sac-format"
]
},
{
"id": "sac-config",
"aliases": [
"SaC Config",
"sac-config",
"SaC Project Config"
],
"filenames": [
".sac-config"
]
}
],
"grammars": [
{
"language": "sac",
"scopeName": "source.sac",
"path": "./syntaxes/sac.tmLanguage.json"
},
{
"scopeName": "sac.injection",
"path": "./syntaxes/sac.tmLanguage.json",
"injectTo": [
"source.c"
]
},
{
"language": "sac-format",
"scopeName": "source.sac-format",
"path": "./syntaxes/sac-format.tmLanguage.json"
},
{
"language": "sac-config",
"scopeName": "source.sac-config",
"path": "./syntaxes/sac-config.tmLanguage.json"
},
{
"scopeName": "markdown.fenced_code.block.sac",
"path": "./syntaxes/sac-markdown-injection.tmLanguage.json",
"injectTo": [
"text.html.markdown"
],
"embeddedLanguages": {
"meta.embedded.block.sac": "sac"
}
}
],
"snippets": [
{
"language": "sac",
"path": "./snippets/sac.code-snippets"
}
],
"iconThemes": [
{
"id": "sac-icon-theme",
"label": "SaC Icon Theme",
"path": "./icons/sac-icon-theme.json"
}
],
"themes": [
{
"label": "SaC Default",
"uiTheme": "vs-dark",
"path": "./themes/sac-color-theme-default.json"
},
{
"label": "SaC Warm",
"uiTheme": "vs-dark",
"path": "./themes/sac-color-theme-warm.json"
},
{
"label": "SaC Cool",
"uiTheme": "vs-dark",
"path": "./themes/sac-color-theme-cool.json"
},
{
"label": "SaC Vibrant",
"uiTheme": "vs-dark",
"path": "./themes/sac-color-theme-vibrant.json"
}
],
"commands": [
{
"command": "sac.runActiveFile",
"title": "SaC: Run Active File (sac2c)",
"category": "SaC"
},
{
"command": "sac.generateFormatConfig",
"title": "SaC: Generate Default .sac-format File",
"category": "SaC"
},
{
"command": "sac.generateCompilerConfig",
"title": "SaC: Generate Default .sac-config File",
"category": "SaC"
},
{
"command": "sac.runSelectedFile",
"title": "Run Selected File(s)",
"category": "SaC"
},
{
"command": "sac.runSelectedFileInTerminal",
"title": "Run Selected File(s) in New Terminal",
"category": "SaC"
},
{
"command": "sac.compileSelectedFile",
"title": "Compile Selected File(s)",
"category": "SaC"
}
],
"keybindings": [
{
"command": "sac.runActiveFile",
"key": "f5",
"when": "editorTextFocus && editorLangId == sac"
},
{
"command": "sac.runActiveFile",
"key": "ctrl+f5",
"mac": "cmd+f5",
"when": "editorTextFocus && editorLangId == sac"
}
],
"menus": {
"explorer/context": [
{
"submenu": "sac/explorer/context",
"group": "1_modification",
"when": "resourceLangId == sac"
},
{
"submenu": "sac/explorer/context",
"group": "9_zzz_open",
"when": "resourceIsFolder || !resource"
}
],
"sac/explorer/context": [
{
"command": "sac.generateFormatConfig",
"group": "sac@0",
"when": "resourceIsFolder || !resource"
},
{
"command": "sac.runSelectedFile",
"group": "sac@1",
"when": "resourceLangId == sac"
},
{
"command": "sac.runSelectedFileInTerminal",
"group": "sac@2",
"when": "resourceLangId == sac"
},
{
"command": "sac.compileSelectedFile",
"group": "sac@3",
"when": "resourceLangId == sac"
}
]
},
"submenus": [
{
"id": "sac/explorer/context",
"label": "SaC"
}
],
"chatParticipants": [
{
"id": "sac-language-support.sac",
"name": "sac",
"fullName": "SaC Assistant",
"description": "Ask for SaC diagnostics, formatting, and overloading guidance",
"isSticky": true,
"commands": [
{
"name": "sac-diagnose",
"description": "Explain SaC compiler diagnostics and next fixes"
},
{
"name": "sac-format",
"description": "Apply SaC formatting conventions"
},
{
"name": "sac-overload",
"description": "Design or review SaC overload changes"
}
]
}
],
"chatInstructions": [
{
"path": "./src/copilot/instructions/sac-formatting.instructions.md"
}
],
"chatPromptFiles": [
{
"path": "./src/copilot/prompts/sac.prompt.md"
}
],
"chatSkills": [
{
"path": "./src/copilot/skills/sac2c-build-assistant/SKILL.md"
},
{
"path": "./src/copilot/skills/sac-style-guide/SKILL.md"
},
{
"path": "./src/copilot/skills/sac-overloading-guide/SKILL.md"
},
{
"path": "./src/copilot/skills/sac-diagnostics-playbook/SKILL.md"
}
],
"chatAgents": [
{
"path": "./src/copilot/agents/sac-compiler/AGENT.md"
}
],
"languageModelChatProviders": [
{
"id": "sac-language-support.sac2c-local",
"displayName": "SaC Compiler (Local)",
"vendor": "SacBase",
"description": "Local sac2c compiler invocation via MCP",
"features": [
"sac-language-support.sac"
]
}
],
"mcpServers": [
{
"id": "sac2c-local",
"displayName": "SaC Compiler MCP",
"command": "node",
"args": [
"./src/copilot/mcp/sac2c-mcp.js"
],
"description": "MCP server for local sac2c compiler invocation"
}
],
"configuration": {
"title": "SaC",
"properties": {
"sac.languageServer.enable": {
"type": "boolean",
"default": true,
"description": "Enable the SaC language server."
},
"sac.features.languageServer.enable": {
"type": "boolean",
"default": true,
"description": "Enable language server feature module. Overrides sac.languageServer.enable when set."
},
"sac.navigation.backend": {
"type": "string",
"enum": [
"navjson",
"symbols"
],
"default": "symbols",
"description": "Select compiler navigation backend. navjson uses cursor-targeted JSON queries; symbols uses -symbols dump output."
},
"sac.features.formatter.enable": {
"type": "boolean",
"default": true,
"description": "Enable formatter feature module registration."
},
"sac.features.fallback.enable": {
"type": "boolean",
"default": true,
"description": "Enable local fallback hover and navigation providers when language server does not return a result."
},
"sac.features.chatParticipant.enable": {
"type": "boolean",
"default": true,
"description": "Enable @sac chat participant feature module."
},
"sac.features.outline.enable": {
"type": "boolean",
"default": true,
"description": "Enable local Outline symbol provider for SaC files."
},
"sac.features.commands.enable": {
"type": "boolean",
"default": true,
"description": "Enable SaC command feature module registration."
},
"sac.format.enable": {
"type": "boolean",
"default": true,
"description": "Enable SaC document and range formatter."
},
"sac.format.onSave": {
"type": "boolean",
"default": false,
"description": "Format SaC file on save using extension formatter."
},
"sac.format.indentSize": {
"type": "number",
"default": 4,
"minimum": 2,
"description": "Indent size used by SaC formatter."
},
"sac.format.normalizeGuards": {
"type": "boolean",
"default": true,
"description": "Normalize guard prefixes to '| ' and ', ' with consistent spacing."
},
"sac.format.expandInlineWithLoops": {
"type": "boolean",
"default": true,
"description": "Expand inline with-loop bodies to multiline style when formatting."
},
"sac.format.expandInlineComprehensions": {
"type": "boolean",
"default": true,
"description": "Expand inline tensor comprehensions to multiline style when formatting."
},
"sac.format.splitInlineGuards": {
"type": "boolean",
"default": true,
"description": "Split inline function guards/conditions onto separate lines when formatting."
},
"sac.format.assertions": {
"type": "boolean",
"default": true,
"deprecationMessage": "Use sac.format.splitInlineGuards instead.",
"description": "Deprecated alias for sac.format.splitInlineGuards."
},
"sac.diagnostics.mode": {
"type": "string",
"enum": [
"onSave",
"onType",
"manual"
],
"default": "onSave",
"description": "When to run diagnostics through sac2c."
},
"sac.diagnostics.debounceMs": {
"type": "number",
"default": 500,
"minimum": 100,
"description": "Debounce used for onType diagnostics mode."
},
"sac.diagnostics.presentation": {
"type": "string",
"enum": [
"expanded",
"smart",
"hybrid"
],
"default": "smart",
"description": "Controls diagnostic rendering style: all raw entries (expanded), one actionable entry per chain (smart), or smart plus local context entries (hybrid)."
},
"sac.diagnostics.includeRelatedInformation": {
"type": "boolean",
"default": true,
"description": "Attach compiler origin and stack-like context as related information in hover/Problems details."
},
"sac.diagnostics.includeStackInMessage": {
"type": "boolean",
"default": true,
"description": "Include short origin and call-stack hints directly inside diagnostic messages."
},
"sac.diagnostics.maxStackFrames": {
"type": "number",
"default": 5,
"minimum": 0,
"description": "Maximum number of context frames used in smart/hybrid diagnostics."
},
"sac.diagnostics.workspaceScan.enabled": {
"type": "boolean",
"default": true,
"description": "Enable automatic workspace-wide diagnostics scanning for .sac files."
},
"sac.diagnostics.workspaceScan.onInitialize": {
"type": "boolean",
"default": true,
"description": "Run workspace-wide diagnostics scan when the language server initializes."
},
"sac.diagnostics.workspaceScan.onConfigurationChange": {
"type": "boolean",
"default": true,
"description": "Run workspace-wide diagnostics scan after configuration changes."
},
"sac.diagnostics.workspaceScan.excludeDirectories": {
"type": "array",
"default": [
".git",
"node_modules",
"out",
".vscode-test"
],
"items": {
"type": "string"
},
"description": "Directory names to skip during recursive workspace diagnostics scan."
},
"sac.compiler.channel": {
"type": "string",
"enum": [
"stable",
"develop",
"system"
],
"default": "system",
"description": "Which sac2c channel to prefer: bundled stable, bundled develop, or system PATH."
},
"sac.compiler.path": {
"type": "string",
"default": "",
"description": "Absolute path to sac2c executable. If set, this overrides channel resolution."
},
"sac.compiler.executionBackend": {
"type": "string",
"enum": [
"local",
"wsl",
"docker"
],
"default": "local",
"description": "How to execute sac2c: local process, through WSL, or in Docker."
},
"sac.compiler.wsl.distribution": {
"type": "string",
"default": "",
"description": "Optional WSL distribution name used when executionBackend is 'wsl'."
},
"sac.compiler.docker.image": {
"type": "string",
"default": "",
"description": "Docker image that contains sac2c. Required when executionBackend is 'docker'."
},
"sac.compiler.docker.runArgs": {
"type": "array",
"default": [],
"items": {
"type": "string"
},
"description": "Additional docker run arguments when executionBackend is 'docker'."
},
"sac.compiler.extraArgs": {
"type": "array",
"default": [],
"items": {
"type": "string"
},
"description": "Additional command-line arguments passed to sac2c when running diagnostics."
},
"sac.compiler.outputBase": {
"type": "string",
"enum": [
"file-name",
"a"
],
"default": "file-name",
"description": "Base name used for sac2c output files. file-name uses the source filename without extension; a keeps the classic a.out style."
},
"sac.compiler.messaging.enabled": {
"type": "boolean",
"default": true,
"description": "Enable compiler messaging format arguments for deterministic diagnostics parsing."
},
"sac.compiler.messaging.args": {
"type": "array",
"default": [
"-cti-no-color",
"-cti-no-source",
"-cti-no-hint",
"-cti-no-explain",
"-cti-message-length",
"0",
"-cti-primary-header-format",
"%s: ",
"-cti-continuation-header-format",
"%.0s"
],
"items": {
"type": "string"
},
"description": "Arguments used to request stable GNU-style diagnostics output from sac2c."
},
"sac.compiler.fallbackToSystem": {
"type": "boolean",
"default": true,
"description": "If bundled channel binary is missing, fallback to sac2c from PATH."
},
"sac.compiler.trace": {
"type": "string",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off",
"description": "Trace communication between VS Code and the SaC language server."
}
}
}
}
}