-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
446 lines (446 loc) · 13.8 KB
/
package.json
File metadata and controls
446 lines (446 loc) · 13.8 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
{
"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": [
"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/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",
"vscode-languageclient": "^9.0.1",
"vscode-languageserver": "^9.0.1",
"vscode-languageserver-textdocument": "^1.0.12"
},
"contributes": {
"languages": [
{
"id": "sac",
"aliases": [
"SaC",
"sac"
],
"extensions": [
".sac"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "sac",
"scopeName": "source.sac",
"path": "./syntaxes/sac.tmLanguage.json"
},
{
"scopeName": "sac.injection",
"path": "./syntaxes/sac.tmLanguage.json",
"injectTo": [
"source.c"
]
}
],
"fileIcons": [
{
"extensions": [
"sac"
],
"icon": "./icons/logo.png"
}
],
"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"
}
],
"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.features.formatter.enable": {
"type": "boolean",
"default": true,
"description": "Enable formatter feature module registration."
},
"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.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.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.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."
}
}
}
}
}