graphlin 0.1.3 → 0.2.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 (106) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/README.md +12 -3
  4. package/docs/decision-service.md +393 -0
  5. package/docs/extension-authoring.md +553 -0
  6. package/docs/model-api.md +293 -0
  7. package/docs/usage.md +472 -0
  8. package/docs/visualizer-views.md +240 -0
  9. package/node_modules/@vscode/tree-sitter-wasm/LICENSE +21 -0
  10. package/node_modules/@vscode/tree-sitter-wasm/README.md +36 -0
  11. package/node_modules/@vscode/tree-sitter-wasm/SECURITY.md +41 -0
  12. package/node_modules/@vscode/tree-sitter-wasm/cgmanifest.json +16 -0
  13. package/node_modules/@vscode/tree-sitter-wasm/package.json +42 -0
  14. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-bash.wasm +0 -0
  15. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-c-sharp.wasm +0 -0
  16. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-cpp.wasm +0 -0
  17. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-css.wasm +0 -0
  18. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-go.wasm +0 -0
  19. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-ini.wasm +0 -0
  20. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-java.wasm +0 -0
  21. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-javascript.wasm +0 -0
  22. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-php.wasm +0 -0
  23. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-powershell.wasm +0 -0
  24. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-python.wasm +0 -0
  25. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-regex.wasm +0 -0
  26. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-ruby.wasm +0 -0
  27. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-rust.wasm +0 -0
  28. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-tsx.wasm +0 -0
  29. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter-typescript.wasm +0 -0
  30. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter.js +4075 -0
  31. package/node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter.wasm +0 -0
  32. package/node_modules/@vscode/tree-sitter-wasm/wasm/web-tree-sitter.d.ts +1027 -0
  33. package/package.json +78 -9
  34. package/plugin.json +4 -2
  35. package/runtime/architecture/analysis.mjs +344 -0
  36. package/runtime/architecture/controller.mjs +209 -0
  37. package/runtime/architecture/evidence.mjs +108 -0
  38. package/runtime/architecture/profile.mjs +56 -0
  39. package/runtime/core/evidence.mjs +43 -9
  40. package/runtime/core/graph.mjs +11 -6
  41. package/runtime/core/privacy.mjs +1 -0
  42. package/runtime/daemon/auth.mjs +7 -3
  43. package/runtime/daemon/diagnostics.mjs +1 -1
  44. package/runtime/daemon/extension-api.mjs +203 -0
  45. package/runtime/daemon/lineage.mjs +70 -0
  46. package/runtime/daemon/manager.mjs +9 -6
  47. package/runtime/daemon/model-api.mjs +728 -0
  48. package/runtime/daemon/model-persistence.mjs +220 -0
  49. package/runtime/daemon/server.mjs +81 -14
  50. package/runtime/daemon/settings.mjs +11 -3
  51. package/runtime/decisions/broker.mjs +349 -0
  52. package/runtime/decisions/contracts.mjs +179 -0
  53. package/runtime/decisions/evaluation.mjs +305 -0
  54. package/runtime/decisions/faults.mjs +32 -0
  55. package/runtime/decisions/index.mjs +818 -0
  56. package/runtime/decisions/profiles.mjs +93 -0
  57. package/runtime/decisions/questions.mjs +268 -0
  58. package/runtime/discovery/index.mjs +2 -0
  59. package/runtime/discovery/inventory.mjs +160 -0
  60. package/runtime/discovery/parser.mjs +40 -0
  61. package/runtime/discovery/structure.mjs +232 -0
  62. package/runtime/extensions/contracts.mjs +59 -0
  63. package/runtime/extensions/frame.mjs +64 -0
  64. package/runtime/extensions/index.mjs +9 -0
  65. package/runtime/extensions/manifest.mjs +95 -0
  66. package/runtime/extensions/packages.mjs +222 -0
  67. package/runtime/extensions/profiles.mjs +36 -0
  68. package/runtime/extensions/projection.mjs +130 -0
  69. package/runtime/extensions/registry.mjs +285 -0
  70. package/runtime/extensions/scene.mjs +105 -0
  71. package/runtime/extensions/sdk.d.ts +205 -0
  72. package/runtime/extensions/sdk.mjs +88 -0
  73. package/runtime/jev/index.mjs +13 -777
  74. package/runtime/jev/provider.mjs +101 -0
  75. package/runtime/jev/questions.mjs +16 -258
  76. package/runtime/jev/wire.mjs +17 -25
  77. package/runtime/model/changes.mjs +42 -0
  78. package/runtime/model/history.mjs +124 -0
  79. package/runtime/model/index.mjs +2 -0
  80. package/runtime/model/project-model.mjs +1020 -0
  81. package/runtime/model/records.mjs +240 -0
  82. package/runtime/pipeline.mjs +267 -55
  83. package/runtime/platform.mjs +254 -0
  84. package/runtime/visualizers/blocks.mjs +5 -0
  85. package/runtime/visualizers/c4.mjs +154 -0
  86. package/runtime/visualizers/changes.mjs +24 -0
  87. package/runtime/visualizers/code.mjs +5 -0
  88. package/runtime/visualizers/index.mjs +23 -0
  89. package/runtime/visualizers/structure.mjs +120 -0
  90. package/runtime/visualizers/timeline.mjs +66 -0
  91. package/runtime/web/app.js +225 -63
  92. package/runtime/web/extension-frame.js +128 -0
  93. package/runtime/web/index.html +38 -1
  94. package/runtime/web/model-client.js +162 -0
  95. package/runtime/web/platform.js +445 -0
  96. package/runtime/web/scene.js +111 -0
  97. package/runtime/web/style.css +51 -0
  98. package/schemas/graph.schema.json +4 -1
  99. package/scripts/arguments.mjs +5 -1
  100. package/scripts/build-packages.mjs +6 -2
  101. package/scripts/control.mjs +1 -1
  102. package/scripts/daemon.mjs +2 -1
  103. package/scripts/extensions.mjs +44 -0
  104. package/scripts/graphlin.mjs +23 -3
  105. package/scripts/onboarding.mjs +10 -3
  106. package/scripts/validate-packages.mjs +54 -8
@@ -0,0 +1,240 @@
1
+ # Viewer views
2
+
3
+ Graphlin keeps a source model separate from the drawing. The compact view picker
4
+ selects **Code**, **Blocks**, **C4**, **Changes**, **Activity timeline**, or an
5
+ installed visualizer. Details, History, and the legacy Activity panel remain
6
+ hidden until opened. The existing sketch renderer and eight palettes remain
7
+ available.
8
+
9
+ ## Reference views
10
+
11
+ | View | What it shows |
12
+ | --- | --- |
13
+ | Code | Canonical declarations and supported relationships, using the existing sketch shapes and layouts |
14
+ | Blocks | Filesystem scopes and parsed containment, with expandable parent frames |
15
+ | C4 | Context, applications/datastores, components, and code; supported current interpretations determine architectural boundaries |
16
+ | Changes | Discoveries, creations, modifications, removals, and invalidations against an explicitly selected checkpoint |
17
+ | Activity timeline | Ordered tool/agent observations, attributed lanes, terminal outcomes, and attempts whose outcome is unresolved |
18
+
19
+ Folders do not establish applications, processes, or deployment boundaries.
20
+ Without a supported interpretation at the selected C4 level, source scopes
21
+ remain usable and the view reports that their responsibilities are unknown.
22
+ Missing interpretation does not trigger a classifier call from the browser.
23
+ The Blocks view does not invent responsibility labels.
24
+
25
+ **Discover architecture** in C4 asks the local service to discover application
26
+ and component boundaries from current project evidence. It needs the project's
27
+ existing source-transmission consent and a configured classification service;
28
+ it does not request an extension grant or change consent. The status line
29
+ explains missing consent, a missing key, unavailable source, paused
30
+ classification, partial coverage, or a failed analysis.
31
+ Automatic discovery and incremental rechecks are scheduled by the local service.
32
+
33
+ The browser reads discovery status every two seconds while C4 is open at Live.
34
+ Changing views or entering replay aborts pending status requests and stops
35
+ polling; replay disables the discovery button. Only an explicit button click
36
+ posts a discovery request. Opening C4, switching levels, filtering, and arranging
37
+ do not start analysis from the browser. New supported boundaries arrive through
38
+ the model stream and update the active drawing automatically.
39
+
40
+ **Set baseline now** creates a named checkpoint through the authenticated host
41
+ API, including the selected session. It is disabled during replay. Selecting a
42
+ retained checkpoint uses the core comparison implementation.
43
+ First observation is discovery unless the core records supported creation or a
44
+ compatible complete enumeration proves prior absence. Missing retained records
45
+ are not treated as deleted. Source edits do not establish runtime success.
46
+
47
+ The timeline works with zero entities and zero relations. Correlation uses
48
+ recorded tool/agent identifiers; an unpaired attempt stays unresolved. Selecting
49
+ an observation inspects its linked entity, or explains that no source entity is
50
+ linked. It never claims private reasoning capture.
51
+
52
+ ## Navigation
53
+
54
+ Search and source-kind filters apply together. Matching declarations keep their
55
+ ancestor frames, and searches expand the path to a match. Escape clears the
56
+ search while retaining type choices. Filtering arranges and fits the result.
57
+ The inspector's **Open source scope** action and the breadcrumb buttons request
58
+ a bounded source scope. C4 interpretation groups can expand to their supported
59
+ source members.
60
+
61
+ Application groups start expanded one level, with component groups collapsed
62
+ and independently expandable. Built-in architecture records use canonical
63
+ source anchors. A current, accepted, supported, source-backed
64
+ `graphlin.architecture` interpretation of kind `architecture_membership` links
65
+ exactly two distinct anchors. The renderer identifies their roles from one
66
+ application and one component interpretation, independently of pair order.
67
+ Missing, stale, or ambiguous links do not create a visual parent.
68
+
69
+ Expanding a component reveals the parsed source subtree beneath its anchor.
70
+ These descendants are a bounded display projection; the viewer does not
71
+ rewrite the model into large unions of membership IDs or evidence references.
72
+ Other extension interpretations retain containment by a unique strict subset
73
+ of recorded members. Equal memberships and multiple possible parent applications
74
+ remain unnested. Source scopes without supported boundaries remain unknown.
75
+
76
+ Collapsed connections aggregate by source scope, target scope, relation type,
77
+ and validity. Calls and writes remain separate. Internal connections do not
78
+ become self-arrows. Each aggregate retains its relation IDs and count for the
79
+ host evidence inspector. Scene limits affect presentation, never discovery.
80
+ The coverage line reports truncation and available inventory/inspection counts.
81
+
82
+ Selection maps to canonical entities. Switching views preserves that entity
83
+ when represented, otherwise its nearest represented ancestor/group. Each view
84
+ retains its camera, layout, shape overrides, and theme. **Follow agent** reveals
85
+ newly arriving or newly active entities through containment; turning it off
86
+ keeps the camera in place. Fit and Arrange remain explicit user actions.
87
+
88
+ **Position** selects Live or a retained model checkpoint. Model replay uses
89
+ recorded snapshots and makes no inference calls. The older History scrubber
90
+ remains available when using the legacy API; model views use Position instead.
91
+ Custom views disable graph layout/zoom controls that they do not implement.
92
+
93
+ ## Browser modules and lifecycle
94
+
95
+ `runtime/visualizers/` contains pure source-to-scene projectors, a common
96
+ containment/aggregation projector, and the first-party custom timeline.
97
+ `createBuiltin()` and `createExtensionFrame()` expose `update(input)` and
98
+ `dispose()` to the viewer host. Updates return a validated scene or bounded
99
+ custom status. The timeline mounts DOM through this same lifecycle and has no
100
+ dependency on the graph renderer.
101
+
102
+ `runtime/web/model-client.js` owns authenticated model snapshot/stream access.
103
+ `runtime/web/platform.js` owns view choice, per-view settings, checkpoints,
104
+ grants, cancellation, and scope. `runtime/web/scene.js` supplies containment
105
+ geometry, filtering, and canonical mappings. `runtime/web/app.js` retains
106
+ authentication, evidence inspection, diagnostics, sketch rendering, and the
107
+ legacy fallback.
108
+ Legacy source references accept both `jev_interpretation` and
109
+ `decision_interpretation`; alternate providers use the generic Decision
110
+ interpretation label while existing Jev labels remain compatible.
111
+
112
+ Browser-safe scene and message validation is imported from the SDK contract
113
+ modules rather than reimplemented by each built-in. Shared scenes contain
114
+ finite primitives, never extension-supplied HTML or SVG. Nested frames use a
115
+ title band, padded containment, and separated sibling rectangles.
116
+
117
+ ## API integration
118
+
119
+ All requests use the existing host session cookie and same-origin credentials.
120
+ No launch token is forwarded to a visualizer.
121
+
122
+ | Route | Use |
123
+ | --- | --- |
124
+ | `GET /api/model/v1/snapshot` | Paged schema 2 model; optional `scope`, `session`, `checkpoint` |
125
+ | `GET /api/model/v1/entities`, `/relations`, `/interpretations`, `/activity`, `/sessions`, `/history` | Revision-bound cursor pages; history supplies checkpoints |
126
+ | `GET /api/model/v1/events` | Snapshot envelopes with the same pages/cursors; optional scope/session |
127
+ | `POST /api/model/v1/checkpoints` | Explicit host action with `label` and optional `sessionId` |
128
+ | `GET /api/architecture` | Built-in architecture discovery status and bounded progress counts |
129
+ | `POST /api/architecture/discover` | Explicit Discover architecture action with `{}`; asynchronous `202` status response |
130
+ | `GET /api/extensions` | Catalog with manifest, digest, current grant, and declared profile descriptors |
131
+ | `POST /api/extensions/grant` | `{id, digest, fields, history, approved, profiles}` |
132
+ | `POST /api/extensions/analysis` | Explicit Run analysis action with `{id, digest, profileId, entityIds, revision}` |
133
+ | `GET /api/extensions/data/<id>` | Daemon policy/grant-projected model, with the same scope/session/checkpoint options |
134
+ | `GET /api/extensions/frame/<id>?nonce=...` | Daemon-generated document with response-level sandbox/CSP |
135
+
136
+ The client hydrates pages at one project/revision/model sequence and transport
137
+ epoch. It restarts stale cursors rather than mixing revisions. Transport sequence
138
+ and epoch govern SSE ordering independently of the model's observation sequence;
139
+ coalesced snapshots may skip transport positions. Scope/replay changes cancel
140
+ obsolete work. Selecting a checkpoint closes the live model subscription.
141
+
142
+ Hydration retains at most 2,048 entities, 4,096 relations, 512 interpretations,
143
+ 2,048 activities, 100 sessions, and 100 checkpoints, within a 6 MiB budget.
144
+ The API's individual response limit remains 512 KiB. Coverage records retained
145
+ and total counts when these bounds truncate a scope. Opening a narrower source
146
+ scope requests that scope from the daemon; the browser does not need an
147
+ unbounded full-project model.
148
+
149
+ An absent model endpoint leaves the legacy `/api/state` and `/api/events` code
150
+ map usable. Capture/status, diagnostics, exports, and authentication keep their
151
+ existing routes. The model endpoint never replaces the host evidence policy.
152
+
153
+ ## Installed visualizers
154
+
155
+ Installation alone does not grant data. The host shows explicit field and
156
+ history choices, and approval is bound to the project and installed digest.
157
+ Before approval, no projected-data request or model delivery is made.
158
+ Raw source, excerpts, prompts, transcripts, credentials, and unrestricted source
159
+ retrieval are not offered as grant fields.
160
+
161
+ An approved extension receives **only** the response from its daemon-projected
162
+ data endpoint. The host never forwards its own raw model as a fallback.
163
+ Catalog/grants are rechecked before each delivery, including history.
164
+ An independent two-second poll checks the mounted extension's grant and digest
165
+ even during replay. Unmounting cancels that poll.
166
+ Revocation, denied access, digest replacement, or frame navigation clears the
167
+ controlled view and disposes its port/frame. It cannot recall data already
168
+ copied by third-party code.
169
+
170
+ The iframe uses `sandbox="allow-scripts"` with no same-origin permission.
171
+ Both the host response policy and the HTML meta policy permit same-origin
172
+ frames. The browser check caught and fixed the missing HTML `frame-src 'self'`
173
+ directive; frame mounting now passes in the actual headless browser.
174
+ One bootstrap is sent to its exact window with a fresh nonce and a dedicated
175
+ MessageChannel. Readiness must echo that nonce before data is sent. The opaque
176
+ origin requires `*` for the bootstrap target origin; the exact frame window,
177
+ one-use nonce, and port supply the binding.
178
+
179
+ Typed project/result messages carry instance, project, revision, view epoch,
180
+ request ID, and API version. Late responses are ignored; scene mappings are
181
+ checked against the delivered projection. Payload size, message rate, readiness,
182
+ and update deadlines are bounded. Invalid output or navigation disposes the
183
+ frame; the host falls back to Code after extension failure. First-party projector failure keeps the
184
+ last accepted drawing. Policy/grant failures always clear affected content.
185
+ Selection and inspection requests require a declared request capability, an
186
+ active matching grant, and access to the mapped data field.
187
+
188
+ Declared analysis profiles have separate approval checkboxes. **Run analysis**
189
+ uses the selected canonical entity, or at most 256 entities in the current scope,
190
+ at the current revision. Mount, layout, theme, filtering, and replay do not call
191
+ analysis. Replay disables the action. The approval text explains that a profile
192
+ may send locally filtered evidence to the configured service and requires the
193
+ project's existing source-transmission consent; visualizer approval does not
194
+ enable that consent. The daemon rechecks the grant, profile, revision, candidates,
195
+ and source policy.
196
+
197
+ The first-party timeline is trusted bundled code using the custom lifecycle.
198
+ Third-party custom renderers use the opaque frame and bounded custom status;
199
+ they do not receive first-party inspector privileges. Iframes are not a promise
200
+ of hard CPU isolation or universal prevention of disclosure.
201
+
202
+ ## Verification
203
+
204
+ `node --test tests/web/*.test.mjs` exercises both the existing viewer and model
205
+ views, including source-kind filters, group bounds, aggregation, C4 abstention,
206
+ checkpoint comparisons, custom activity, follow behavior, obsolete responses,
207
+ readiness, invalid scenes, and navigation teardown.
208
+ Focused tests also exercise actual model API paging beyond 200 records, bounded
209
+ hydration, transport epochs, and session-filtered checkpoint creation/replay.
210
+
211
+ `node tests/web/platform-browser-fixture.mjs` starts a disposable loopback-only
212
+ fixture for browser review. It supplies generated models and an installed
213
+ fixture visualizer; it does not run capture, inspect a user's project, read a
214
+ key, or persist user state. Its API is a test fixture, not an authentication
215
+ test or a replacement for the daemon's integration/isolation tests.
216
+
217
+ `node tests/web/platform-daemon-fixture.mjs` starts the actual daemon against a
218
+ generated source project and installed custom extension under a disposable
219
+ temporary directory. It uses a random loopback port and disables source
220
+ transmission. Its `change` and `revoke` input commands support manual browser
221
+ checks; stopping it removes its own fixture state.
222
+
223
+ `node tests/web/platform-browser-check.mjs` runs the actual fixture in a separate
224
+ headless Playwright browser with a temporary profile. Set
225
+ `GRAPHLIN_BROWSER_DEPENDENCIES` to a directory whose `node_modules` includes
226
+ Playwright, optionally `GRAPHLIN_BROWSER_EXECUTABLE` to a Chrome executable, and
227
+ `GRAPHLIN_BROWSER_ARTIFACTS` for screenshots and the verification report.
228
+ This explicit check covers the reference views, narrow-screen keyboard use,
229
+ real sandbox frame mounting, profile approval/run, selection, and grant
230
+ revocation during replay. It does not access existing user browser profiles,
231
+ projects, or daemon instances, and is not a privacy certification.
232
+
233
+ `node tests/web/architecture-browser-check.mjs` uses the same browser environment
234
+ variables to check architecture discovery through the actual daemon. It creates
235
+ temporary source files and uses literal answers from a local fake provider with
236
+ the normal decision service. Boundary records are never seeded. The check covers
237
+ automatic scanning, the authenticated discovery button, an incremental source
238
+ edit delivered through the model stream, nested frame bounds, keyboard controls,
239
+ and replay. Screenshots and a JSON report go to `GRAPHLIN_BROWSER_ARTIFACTS`.
240
+ The generated application's source is parsed but never executed.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
@@ -0,0 +1,36 @@
1
+ # Pre-built Tree-Sitter wasm files
2
+
3
+ This repository contains scripts and build pipelines for building the Tree-Sitter and Tree-Sitter grammar WebAssembly files used by VS Code.
4
+
5
+ ## Contributing
6
+
7
+ This project welcomes contributions and suggestions. Most contributions require you to agree to a
8
+ Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
9
+ the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
10
+
11
+ When you submit a pull request, a CLA bot will automatically determine whether you need to provide
12
+ a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
13
+ provided by the bot. You will only need to do this once across all repos using our CLA.
14
+
15
+ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
16
+ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
17
+ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
18
+
19
+ ### Build steps
20
+
21
+ > Note: If you're using Windows, you'll need to use WSL. Ensure Docker integration for WSL is enabled before attempting to build. Without this integration, the build process may encounter errors.
22
+
23
+ First, install all of the dependencies using `npm install`, use the `--force` flag if needed. You will also need to install [emscripten](https://emscripten.org/docs/getting_started/downloads.html).
24
+
25
+ Then, build the the wasm files using `npm run build-wasm`, which will do the following:
26
+ - Clone the tree-sitter repository
27
+ - Build the tree-sitter WebAssembly bindings
28
+ - Build the tree-sitter grammars listed in https://github.com/microsoft/vscode-tree-sitter-wasm/blob/alexr00/0.0.1/build/main.ts
29
+
30
+ ## Trademarks
31
+
32
+ This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
33
+ trademarks or logos is subject to and must follow
34
+ [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
35
+ Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
36
+ Any use of third-party trademarks or logos are subject to those third-party's policies.
@@ -0,0 +1,41 @@
1
+ <!-- BEGIN MICROSOFT SECURITY.MD V0.0.9 BLOCK -->
2
+
3
+ ## Security
4
+
5
+ Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin).
6
+
7
+ If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/security.md/definition), please report it to us as described below.
8
+
9
+ ## Reporting Security Issues
10
+
11
+ **Please do not report security vulnerabilities through public GitHub issues.**
12
+
13
+ Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/security.md/msrc/create-report).
14
+
15
+ If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp).
16
+
17
+ You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
18
+
19
+ Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20
+
21
+ * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22
+ * Full paths of source file(s) related to the manifestation of the issue
23
+ * The location of the affected source code (tag/branch/commit or direct URL)
24
+ * Any special configuration required to reproduce the issue
25
+ * Step-by-step instructions to reproduce the issue
26
+ * Proof-of-concept or exploit code (if possible)
27
+ * Impact of the issue, including how an attacker might exploit the issue
28
+
29
+ This information will help us triage your report more quickly.
30
+
31
+ If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/security.md/msrc/bounty) page for more details about our active programs.
32
+
33
+ ## Preferred Languages
34
+
35
+ We prefer all communications to be in English.
36
+
37
+ ## Policy
38
+
39
+ Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/security.md/cvd).
40
+
41
+ <!-- END MICROSOFT SECURITY.MD BLOCK -->
@@ -0,0 +1,16 @@
1
+ {
2
+ "registrations": [
3
+ {
4
+ "component": {
5
+ "type": "git",
6
+ "git": {
7
+ "name": "tree-sitter",
8
+ "repositoryUrl": "https://github.com/tree-sitter/tree-sitter",
9
+ "commitHash": "fc15f621334a262039ffaded5937e2844f88da61"
10
+ }
11
+ },
12
+ "license": "MIT",
13
+ "version": "0.25.1"
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@vscode/tree-sitter-wasm",
3
+ "version": "0.3.1",
4
+ "description": "Pre-built WASM files for Tree-Sitter and Tree-Sitter languages that VS Code uses",
5
+ "scripts": {
6
+ "build-wasm": "ts-node ./build/main.ts",
7
+ "install-emsdk": "sudo rm -rf /opt/dev/emsdk && sudo ./build/setup-emsdk.sh"
8
+ },
9
+ "author": "Visual Studio Code Team",
10
+ "license": "MIT",
11
+ "files": [
12
+ "wasm",
13
+ "LICENSE",
14
+ "README.md",
15
+ "SECURITY.md",
16
+ "cgmanifest.json"
17
+ ],
18
+ "main": "wasm/tree-sitter.js",
19
+ "types": "wasm/web-tree-sitter.d.ts",
20
+ "devDependencies": {
21
+ "@types/node": "^20.14.6",
22
+ "tree-sitter-bash": "^0.25.0",
23
+ "tree-sitter-cli": "^0.25.10",
24
+ "tree-sitter-css": "^0.25.0",
25
+ "tree-sitter-go": "^0.25.0",
26
+ "tree-sitter-java": "^0.23.5",
27
+ "tree-sitter-javascript": "^0.25.0",
28
+ "tree-sitter-php": "0.24.2",
29
+ "tree-sitter-python": "^0.25.0",
30
+ "tree-sitter-regex": "^0.25.0",
31
+ "tree-sitter-ruby": "^0.23.1",
32
+ "tree-sitter-typescript": "^0.23.2",
33
+ "ts-node": "^10.9.2"
34
+ },
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "https://github.com/Microsoft/vscode-tree-sitter-wasm.git"
38
+ },
39
+ "bugs": {
40
+ "url": "https://github.com/Microsoft/vscode-tree-sitter-wasm/issues"
41
+ }
42
+ }