skillar 0.2.1 → 0.3.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 (111) hide show
  1. package/NOTICE +280 -0
  2. package/README.md +37 -5
  3. package/dist/analysis/finding.js +8 -190
  4. package/dist/analysis/kernel.js +896 -0
  5. package/dist/analysis/tree.js +7 -154
  6. package/dist/analysis/usage.js +9 -394
  7. package/dist/api/flows.js +42 -212
  8. package/dist/api/report-kernel.js +1063 -0
  9. package/dist/api/routes.js +12 -2
  10. package/dist/catalog/fields.js +138 -146
  11. package/dist/catalog/watcher.js +7 -2
  12. package/dist/cli/init.js +45 -0
  13. package/dist/cli/main.js +76 -3
  14. package/dist/cli/private-skills.js +122 -0
  15. package/dist/cli/serve.js +15 -1
  16. package/dist/cli/sync.js +124 -0
  17. package/dist/dashboard/NOTICE +280 -0
  18. package/dist/dashboard/assets/app.js +737 -275
  19. package/dist/dashboard/assets/astryx-reset.css +407 -0
  20. package/dist/dashboard/assets/astryx.css +1077 -0
  21. package/dist/dashboard/assets/charts.css +54 -0
  22. package/dist/dashboard/assets/chunk-TPGDA2J4.js +1 -0
  23. package/dist/dashboard/assets/chunk-YLWHVDMP.js +36 -0
  24. package/dist/dashboard/assets/controls.css +207 -0
  25. package/dist/dashboard/assets/overlays.css +132 -0
  26. package/dist/dashboard/assets/p1.css +135 -0
  27. package/dist/dashboard/assets/shell.css +71 -0
  28. package/dist/dashboard/assets/skillar-theme.css +692 -0
  29. package/dist/dashboard/assets/styles.css +224 -121
  30. package/dist/dashboard/assets/tokens.css +278 -0
  31. package/dist/dashboard/assets/widgets.css +83 -0
  32. package/dist/dashboard/index.html +11 -2
  33. package/dist/dashboard/viewers/viewers.css +61 -0
  34. package/dist/ingest/attribution.js +5 -1
  35. package/dist/ingest/pipeline.js +2 -0
  36. package/dist/ingest/request-recorder.js +39 -0
  37. package/dist/mcp/dispatch.js +2 -2
  38. package/dist/mcp/http.js +43 -3
  39. package/dist/mcp/skills-extension.js +42 -15
  40. package/dist/mcp/stdio-proxy.js +24 -3
  41. package/dist/mcp/tools.js +38 -24
  42. package/dist/packs/claude-code.js +22 -11
  43. package/dist/packs/cursor.js +9 -4
  44. package/dist/packs/gemini.js +9 -4
  45. package/dist/packs/json-config.js +41 -0
  46. package/dist/packs/omo.js +15 -6
  47. package/dist/request-status.js +81 -0
  48. package/dist/search/fts.js +93 -58
  49. package/dist/search/fusion.js +49 -47
  50. package/dist/search/guidance.js +18 -6
  51. package/dist/search/index.js +291 -70
  52. package/dist/search/lexical.js +71 -63
  53. package/dist/server.js +12 -0
  54. package/dist/skills/apply.js +130 -0
  55. package/dist/skills/capture.js +54 -0
  56. package/dist/skills/cloud-plan.js +57 -0
  57. package/dist/skills/cloud.js +81 -0
  58. package/dist/skills/fs.js +133 -0
  59. package/dist/skills/package.js +734 -0
  60. package/dist/skills/plan.js +83 -0
  61. package/dist/skills/receipt.js +44 -0
  62. package/dist/skills/rollback.js +119 -0
  63. package/dist/skills/transfer.js +51 -0
  64. package/dist/store/db.js +7 -1
  65. package/dist/store/execution.js +2 -34
  66. package/dist/store/export.js +25 -4
  67. package/dist/store/migrations/007_sync.sql +49 -0
  68. package/dist/store/migrations/008_connector_commands.sql +12 -0
  69. package/dist/store/queries.js +33 -7
  70. package/dist/store/writes.js +38 -5
  71. package/dist/sync/cloud-blobs.js +175 -0
  72. package/dist/sync/cloud-commands.js +101 -0
  73. package/dist/sync/cloud-connection.js +105 -0
  74. package/dist/sync/cloud-delivery.js +114 -0
  75. package/dist/sync/cloud-documents.js +103 -0
  76. package/dist/sync/cloud-export.js +67 -0
  77. package/dist/sync/cloud-http.js +150 -0
  78. package/dist/sync/cloud-jobs.js +94 -0
  79. package/dist/sync/cloud-pending.js +143 -0
  80. package/dist/sync/cloud-prepare.js +101 -0
  81. package/dist/sync/cloud-restore.js +136 -0
  82. package/dist/sync/cloud-rollback.js +24 -0
  83. package/dist/sync/cloud-runner.js +86 -0
  84. package/dist/sync/cloud-runtime.js +293 -0
  85. package/dist/sync/cloud-schema.js +32 -0
  86. package/dist/sync/cloud-stage.js +112 -0
  87. package/dist/sync/cloud-wire.js +693 -0
  88. package/dist/sync/cloud-worker.js +57 -0
  89. package/dist/sync/cloud.js +157 -0
  90. package/dist/sync/command-apply.js +140 -0
  91. package/dist/sync/command-control.js +25 -0
  92. package/dist/sync/command-wire.js +437 -0
  93. package/dist/sync/consent.js +130 -0
  94. package/dist/sync/journal.js +43 -0
  95. package/dist/sync/outbox.js +134 -0
  96. package/dist/sync/restore-rows.js +125 -0
  97. package/dist/sync/restore.js +174 -0
  98. package/dist/sync/snapshot.js +78 -0
  99. package/dist/sync/spool-request.js +103 -0
  100. package/dist/sync/tables.js +27 -0
  101. package/dist/sync/triggers.js +34 -0
  102. package/dist/workflow/compare.js +3 -43
  103. package/docs/cloud-sync.md +94 -0
  104. package/docs/private-skills.md +75 -0
  105. package/docs/sync-p4.md +102 -0
  106. package/docs/sync-restore.md +167 -0
  107. package/package.json +18 -5
  108. package/src/store/migrations/007_sync.sql +49 -0
  109. package/src/store/migrations/008_connector_commands.sql +12 -0
  110. package/dist/dashboard/assets/chunk-5DFWNJC2.js +0 -1
  111. package/dist/dashboard/assets/chunk-S6B2HJQA.js +0 -17
package/NOTICE ADDED
@@ -0,0 +1,280 @@
1
+ Skillar third-party notices
2
+ ==========================
3
+
4
+ PR-8 viewers and P1 controls
5
+ ---------------------------
6
+ Langfuse MIT source SHA: 69181812b87169df157841fce1314ec96ecd2c5a.
7
+ References: web/src/components/ui/{textarea,Toaster,MarkdownView,MarkdownViewContent}.tsx,
8
+ web/src/components/design-system/{Avatar,Radio,Switch,Spinner,Codeblock,SyntaxHighlight,DateRangeInput,MultiSelectInput}/,
9
+ web/src/components/{DiffViewer.tsx,ui/TimePeriodSelect.tsx}.
10
+ Destinations: local/dashboard/foundation/{viewers,controls}/ and the matching
11
+ site consumers. Preact reimplementation; no Langfuse React or enterprise code
12
+ is shipped. Original Langfuse MIT permission notice below applies.
13
+
14
+ PrismJS 1.30.0: https://github.com/PrismJS/prism
15
+ Copyright (c) 2012 Lea Verou. Tokenizer and bundled language grammars only;
16
+ automatic DOM highlighting is disabled. No Prism HTML output is inserted.
17
+
18
+ Sonner 2.0.7: https://github.com/emilkowalski/sonner
19
+ Copyright (c) 2023 Emil Kowalski. Status SVG paths and loading-bar mechanism
20
+ used in controls/toast-icon.tsx; Sonner/React itself is not a product dependency.
21
+
22
+ MIT License (PrismJS and Sonner)
23
+
24
+ Permission is hereby granted, free of charge, to any person obtaining a copy
25
+ of this software and associated documentation files (the "Software"), to deal
26
+ in the Software without restriction, including without limitation the rights
27
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
28
+ copies of the Software, and to permit persons to whom the Software is
29
+ furnished to do so, subject to the following conditions:
30
+
31
+ The above copyright notice and this permission notice shall be included in
32
+ all copies or substantial portions of the Software.
33
+
34
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
37
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
38
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
39
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
40
+ THE SOFTWARE.
41
+
42
+ Lucide control icon paths (lucide-react 0.552.0)
43
+ ----------------------------------------------
44
+ Source: https://github.com/lucide-icons/lucide, icons check, x, search, copy,
45
+ chevron-down, minus, external-link and loader-circle. Reimplemented as Preact SVG paths in
46
+ local/dashboard/foundation/controls/icons.tsx; no React dependency is shipped.
47
+ Copyright (c) Lucide Contributors 2025. Portions derived from Feather:
48
+ Copyright (c) 2013-2023 Cole Bemis (MIT; permission text below also applies).
49
+
50
+ ISC License
51
+ Permission to use, copy, modify, and/or distribute this software for any
52
+ purpose with or without fee is hereby granted, provided that the above
53
+ copyright notice and this permission notice appear in all copies.
54
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
55
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
56
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
57
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
58
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
59
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
60
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
61
+
62
+ Langfuse semantic theme tokens
63
+ -----------------------------
64
+ PR-4 reimplements table anatomy from these MIT files at the pinned commit below:
65
+ web/src/components/table/{data-table,data-table-row-height-switch,
66
+ DataTableColumnVisibilityFilter,DataTablePagination,data-table-toolbar,
67
+ data-table-controls,FacetHeader,ColumnVisibilityHeader}.tsx,
68
+ web/src/components/ui/table.tsx.
69
+ Destination: local/dashboard/foundation/table/. Current public Demo v4.77.0
70
+ supplies measured paint. Native Preact tables and PR-1/PR-2 controls own behavior;
71
+ no React, TanStack, Radix or cmdk runtime is included. The rows-3 icon is a
72
+ Lucide path, under the ISC notice above.
73
+
74
+ PR-5 reimplements MIT widget anatomy at the pinned commit below:
75
+ web/src/components/ui/card.tsx,
76
+ web/src/features/widgets/chart-library/BigNumber.tsx,
77
+ web/src/components/design-system/charts/{BarChart/BarChart,LineChart/LineChart,HistogramChart/HistogramChart}.tsx,
78
+ web/src/components/design-system/internal/charts/{BarChartCore,SeriesChartCore,ChartTooltip}.tsx,
79
+ web/src/features/topics/TopicsEmptyState.tsx,
80
+ web/src/components/design-system/{Alert/Alert,Callout/Callout,StatusMessage/StatusMessage}.tsx.
81
+ Destination: local/dashboard/foundation/widgets/.
82
+ Charts retain Skillar's zero-baseline and missing-data semantics, with native
83
+ data-table alternatives and Preact keyboard interactions. Reference-only React
84
+ renderers are external evidence and are not shipped.
85
+
86
+ Shell anatomy is reimplemented from MIT files at the pinned commit below:
87
+ web/src/components/design-system/Tabs/Tabs.tsx,
88
+ web/src/components/ui/{sidebar,breadcrumb,command}.tsx,
89
+ web/src/components/layouts/page-header.tsx.
90
+ Destination: local/dashboard/foundation/shell/ and site/src/shell.css.
91
+ Preact, native dialogs and anchors own behavior. No React, Radix or cmdk
92
+ runtime is imported; owner target sizes and WAI-ARIA behavior override upstream.
93
+
94
+ PR-2 reimplements MIT overlay visual anatomy from this same commit:
95
+ web/src/components/design-system/Dialog/Dialog.tsx,
96
+ web/src/components/ui/{dialog,alert-dialog,sheet,dropdown-menu}.tsx.
97
+ Follow-up measurements also use
98
+ web/src/components/design-system/DropdownMenu/DropdownMenu.tsx and
99
+ web/src/components/design-system/ConfirmationDialogController/ConfirmationDialogController.tsx.
100
+ Confirm state anatomy also uses web/src/components/ui/ConfirmDialog.tsx and
101
+ web/src/components/design-system/Alert/Alert.tsx at the same pinned commit.
102
+ Approved unavailable-state measurements additionally use actual
103
+ web/src/components/design-system/ControlledDropdownMenu/ControlledDropdownMenu.tsx,
104
+ web/src/components/table/peek.tsx,
105
+ web/src/components/ObservabilityEntityDetailHeader/ObservabilityEntityDetailHeader.tsx,
106
+ and web/src/features/events/components/MobileFiltersSheet.tsx.
107
+ Destination: local/dashboard/foundation/overlays/, site/src/ui/ui.css and
108
+ local/dashboard/components/console-style.ts. Native dialog/popover and Preact
109
+ own behavior; no React, Radix or Floating UI code is imported.
110
+
111
+ PR-1 also reimplements the anatomy/variants of these MIT files at the same SHA:
112
+ web/src/components/design-system/{Button/Button,IconButton/IconButton,
113
+ Badge/Badge,Tag/Tag,Input/Input,SearchInput/SearchInput,SelectInput/SelectInput,
114
+ Checkbox/Checkbox,TextLink/TextLink,KeyboardShortcut/KeyboardShortcut,Spinner/Spinner}.tsx,
115
+ web/src/components/design-system/internal/InputControl/InputControl.tsx,
116
+ web/src/components/ui/{StatusBadge/StatusBadge,skeleton}.tsx.
117
+ Destination: local/dashboard/foundation/controls/. React, Radix and cmdk
118
+ implementations are not included; native Preact controls own behavior.
119
+ The unmodified pinned MIT React reference renderer is external-only and is not shipped.
120
+ Additional Tailwind palette values: red-50/100/800 and yellow-50/100/800.
121
+
122
+ Source: https://github.com/langfuse/langfuse
123
+ Commit: 69181812b87169df157841fce1314ec96ecd2c5a
124
+ Copied file: web/src/styles/globals.css (semantic colors, category colors,
125
+ type roles and radii). Destination: local/dashboard/foundation/tokens.css.
126
+ Changes: --lf- namespace, full CSS color values, light-dark() and html[data-theme]
127
+ integration, pixel metrics, no Tailwind utilities or resets. Control height
128
+ 32px desktop / 44px touch is Skillar policy, not an upstream guarantee.
129
+ No ee/, web/src/ee/, worker/src/ee/, packages/shared/src/server/ee/, React,
130
+ Radix, cmdk, logos or customer data were copied.
131
+
132
+ Copyright (c) 2023-2026 ClickHouse, Inc.
133
+ MIT Expat License
134
+
135
+ Permission is hereby granted, free of charge, to any person obtaining a copy
136
+ of this software and associated documentation files (the "Software"), to deal
137
+ in the Software without restriction, including without limitation the rights
138
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
139
+ copies of the Software, and to permit persons to whom the Software is
140
+ furnished to do so, subject to the following conditions:
141
+
142
+ The above copyright notice and this permission notice shall be included in all
143
+ copies or substantial portions of the Software.
144
+
145
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
146
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
147
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
148
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
149
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
150
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
151
+ SOFTWARE.
152
+
153
+ Tailwind CSS palette constants
154
+ -----------------------------
155
+ Source: https://github.com/tailwindlabs/tailwindcss/tree/v4.2.2
156
+ Copied file: packages/tailwindcss/theme.css (green-800, blue-800, orange-800,
157
+ gray-500, gray-400 only). These resolve the Langfuse JSON token references;
158
+ no Tailwind runtime, preflight, utilities or framework dependency is included.
159
+ Changes: values inlined into --lf-json-value-* light/dark colors.
160
+
161
+ Copyright (c) Tailwind Labs, Inc.
162
+ MIT License
163
+
164
+ Permission is hereby granted, free of charge, to any person obtaining a copy
165
+ of this software and associated documentation files (the "Software"), to deal
166
+ in the Software without restriction, including without limitation the rights
167
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
168
+ copies of the Software, and to permit persons to whom the Software is
169
+ furnished to do so, subject to the following conditions:
170
+
171
+ The above copyright notice and this permission notice shall be included in all
172
+ copies or substantial portions of the Software.
173
+
174
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
175
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
176
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
177
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
178
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
179
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
180
+ SOFTWARE.
181
+
182
+ IBM Plex Mono Regular
183
+ ---------------------
184
+ Source: https://static-jp.langfuse.com/_next/static/media/IBMPlexMono_Regular-s.p.3hmq2kbtvhp_o.woff2
185
+ Unmodified font embedded in foundation/tokens.css under the CSS family plexMono.
186
+ License source: https://github.com/IBM/plex/blob/master/LICENSE.txt
187
+
188
+ Copyright © 2017 IBM Corp. with Reserved Font Name "Plex"
189
+
190
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
191
+
192
+ This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
193
+
194
+
195
+ -----------------------------------------------------------
196
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
197
+ -----------------------------------------------------------
198
+
199
+ PREAMBLE
200
+ The goals of the Open Font License (OFL) are to stimulate worldwide
201
+ development of collaborative font projects, to support the font creation
202
+ efforts of academic and linguistic communities, and to provide a free and
203
+ open framework in which fonts may be shared and improved in partnership
204
+ with others.
205
+
206
+ The OFL allows the licensed fonts to be used, studied, modified and
207
+ redistributed freely as long as they are not sold by themselves. The
208
+ fonts, including any derivative works, can be bundled, embedded,
209
+ redistributed and/or sold with any software provided that any reserved
210
+ names are not used by derivative works. The fonts and derivatives,
211
+ however, cannot be released under any other type of license. The
212
+ requirement for fonts to remain under this license does not apply
213
+ to any document created using the fonts or their derivatives.
214
+
215
+ DEFINITIONS
216
+ "Font Software" refers to the set of files released by the Copyright
217
+ Holder(s) under this license and clearly marked as such. This may
218
+ include source files, build scripts and documentation.
219
+
220
+ "Reserved Font Name" refers to any names specified as such after the
221
+ copyright statement(s).
222
+
223
+ "Original Version" refers to the collection of Font Software components as
224
+ distributed by the Copyright Holder(s).
225
+
226
+ "Modified Version" refers to any derivative made by adding to, deleting,
227
+ or substituting -- in part or in whole -- any of the components of the
228
+ Original Version, by changing formats or by porting the Font Software to a
229
+ new environment.
230
+
231
+ "Author" refers to any designer, engineer, programmer, technical
232
+ writer or other person who contributed to the Font Software.
233
+
234
+ PERMISSION & CONDITIONS
235
+ Permission is hereby granted, free of charge, to any person obtaining
236
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
237
+ redistribute, and sell modified and unmodified copies of the Font
238
+ Software, subject to the following conditions:
239
+
240
+ 1) Neither the Font Software nor any of its individual components,
241
+ in Original or Modified Versions, may be sold by itself.
242
+
243
+ 2) Original or Modified Versions of the Font Software may be bundled,
244
+ redistributed and/or sold with any software, provided that each copy
245
+ contains the above copyright notice and this license. These can be
246
+ included either as stand-alone text files, human-readable headers or
247
+ in the appropriate machine-readable metadata fields within text or
248
+ binary files as long as those fields can be easily viewed by the user.
249
+
250
+ 3) No Modified Version of the Font Software may use the Reserved Font
251
+ Name(s) unless explicit written permission is granted by the corresponding
252
+ Copyright Holder. This restriction only applies to the primary font name as
253
+ presented to the users.
254
+
255
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
256
+ Software shall not be used to promote, endorse or advertise any
257
+ Modified Version, except to acknowledge the contribution(s) of the
258
+ Copyright Holder(s) and the Author(s) or with their explicit written
259
+ permission.
260
+
261
+ 5) The Font Software, modified or unmodified, in part or in whole,
262
+ must be distributed entirely under this license, and must not be
263
+ distributed under any other license. The requirement for fonts to
264
+ remain under this license does not apply to any document created
265
+ using the Font Software.
266
+
267
+ TERMINATION
268
+ This license becomes null and void if any of the above conditions are
269
+ not met.
270
+
271
+ DISCLAIMER
272
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
273
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
274
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
275
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
276
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
277
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
278
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
279
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
280
+ OTHER DEALINGS IN THE FONT SOFTWARE.
package/README.md CHANGED
@@ -4,13 +4,19 @@
4
4
  <p align="center">
5
5
  <a href="https://www.npmjs.com/package/skillar"><img src="https://img.shields.io/npm/v/skillar?color=c44b2b&amp;label=npm" alt="npm version"></a>
6
6
  <a href="https://github.com/changeroa/skillar/blob/main/local/package.json"><img src="https://img.shields.io/badge/Node.js-%E2%89%A524.15-333333" alt="Node.js 24.15 or newer"></a>
7
- <a href="https://github.com/changeroa/skillar/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-333333" alt="MIT license"></a>
7
+ <a href="https://github.com/changeroa/skillar/blob/main/local/LICENSE"><img src="https://img.shields.io/badge/license-MIT-333333" alt="MIT license"></a>
8
+ </p>
9
+ <p align="center">
10
+ <picture>
11
+ <source media="(prefers-color-scheme: dark)" srcset="../docs/assets/skillar-wordmark-dark.svg">
12
+ <source media="(prefers-color-scheme: light)" srcset="../docs/assets/skillar-wordmark-light.svg">
13
+ <img src="../docs/assets/skillar-wordmark-light.svg" width="500" alt="The skillar logo: a vermilion chevron followed by the skillar wordmark.">
14
+ </picture>
8
15
  </p>
9
- <p align="center"><img src="https://raw.githubusercontent.com/changeroa/skillar/main/docs/assets/gisul-workshop.png" width="960" alt="An articulated arm selects an instruction card from a cabinet and brings it to a workbench. Black ink and vermilion on warm ivory."></p>
10
16
 
11
17
  skillar is a local skill router for coding agents. One daemon on `127.0.0.1` indexes your existing `SKILL.md` folders, serves them over MCP, and records searches and reads in a local dashboard. Skill files stay in place.
12
18
 
13
- [Install](#install) · [Connect your agents](#connect-your-agents) · [Settings](#settings) · [MCP reference](#skills-over-mcp)
19
+ [Install](#install) · [Connect your agents](#connect-your-agents) · [Private skills](#private-skills) · [Settings](#settings) · [MCP reference](#skills-over-mcp)
14
20
 
15
21
  ## Install
16
22
 
@@ -38,6 +44,12 @@ The package installs `skillar` and the compatibility command `gisool`. For sourc
38
44
  | Session history | Review searches, loads, supporting reads, native-use observations, and dashboard flows. |
39
45
  | Reversible setup | Preview configuration changes, keep per-run backups, and roll back with `init`. |
40
46
 
47
+ ## Private skills
48
+
49
+ The optional web library keeps private, versioned skill packages in your account. Transfers are explicit: connecting a device or running activity sync does not publish skill directories. You can also download a package and preview, apply or roll back its local files without a daemon.
50
+
51
+ See the [private skill transfer guide](https://github.com/changeroa/skillar/blob/main/local/docs/private-skills.md) for account permissions, publication review and local recovery.
52
+
41
53
  ## Supported runtimes
42
54
 
43
55
  | Runtime | `--runtime` ID |
@@ -88,7 +100,7 @@ skillar serve # default port 8799
88
100
  skillar serve --port 8800
89
101
  ```
90
102
 
91
- Open the dashboard (sessions, per-session trace, flow, and weekday-by-hour heatmap):
103
+ Open the dashboard (skills overview, sessions list, and per-session trace):
92
104
 
93
105
  ```sh
94
106
  skillar open # opens the browser
@@ -136,6 +148,26 @@ skillar import ~/skillar-backup # merge; existing keys are kept
136
148
 
137
149
  Import never overwrites existing settings. Run `skillar init` afterwards to connect the runtimes on the new machine.
138
150
 
151
+ ### Repair historical load attribution
152
+
153
+ After an upgrade or history import, explicitly reconcile pending loads against evidence already in the database:
154
+
155
+ ```sh
156
+ skillar repair-loads --from 1800000000000 --to 1800000000100 --limit 100 --json
157
+ skillar repair-loads --from 1800000000000 --to 1800000000100 --limit 100 --after <next-event-id> --json
158
+ ```
159
+
160
+ `--from` and `--to` are required epoch milliseconds, selecting `[from,to)`. Each invocation examines at most
161
+ `--limit` pending loads (default 100, maximum 1000), ordered by timestamp and local recording order.
162
+ Optional `--session <id>...` restricts the candidate sessions; it does not force attribution to them.
163
+ The JSON result contains `examined`, `repaired`, `pending` within this batch, and `next`. Continue with
164
+ `--after` while `next` is non-null, keeping the same range and session scope. Cursors also advance past
165
+ ambiguous loads; they are event IDs for this database, not portable recording-order guarantees.
166
+
167
+ Only uniquely supported evidence repairs a load. Missing captured text and multiple candidates remain pending;
168
+ retained URI proof survives retention, and later contradictory evidence can still retract an attribution.
169
+ Re-running the command is safe. It does not ingest new events, change capture settings, or make GET reports write.
170
+
139
171
  ## Settings
140
172
 
141
173
  `~/.skillar/config.json` (created on first run, mode 0600). `SKILLAR_HOME` selects a different home; it does not move existing data. Legacy home/database selection follows the [migration guide](https://github.com/changeroa/skillar/blob/main/docs/migration-skillar.md#local-state-and-configuration).
@@ -246,6 +278,6 @@ Architecture: [daemon and storage design](https://github.com/changeroa/skillar/b
246
278
 
247
279
  ## More documentation
248
280
 
249
- [Project overview](https://github.com/changeroa/skillar/blob/main/README.md) · [Upgrade & compatibility](https://github.com/changeroa/skillar/blob/main/docs/migration-skillar.md) · [MIT license](https://github.com/changeroa/skillar/blob/main/LICENSE)
281
+ [Project overview](https://github.com/changeroa/skillar/blob/main/README.md) · [Upgrade & compatibility](https://github.com/changeroa/skillar/blob/main/docs/migration-skillar.md) · [MIT license](https://github.com/changeroa/skillar/blob/main/local/LICENSE)
250
282
 
251
283
  The former personal Cloudflare deployment is retired. The local CLI needs no hosted service; separate registry and organization deployment context is covered in the [project documentation](https://github.com/changeroa/skillar/blob/main/README.md#remote-registry-and-team-distribution).
@@ -1,190 +1,8 @@
1
- import { flowTree, sessionTree } from "./tree.js";
2
- const LABELS = ["found_top1", "found_lower", "loaded_outside_results", "native_without_search",
3
- "searched_none_used", "no_search"];
4
- const str = (value) => (typeof value === "string" && value !== "" ? value : null);
5
- const dirOf = (uri) => uri.split("/").at(-2) ?? "";
6
- function candidateOf(value) {
7
- if (typeof value !== "object" || value === null)
8
- return null;
9
- const row = value;
10
- const uri = str(row.uri);
11
- if (uri === null || typeof row.rank !== "number")
12
- return null;
13
- return { uri, name: str(row.name) ?? dirOf(uri), rank: row.rank, digest: str(row.digest) ?? "" };
14
- }
15
- function abstainedOf(value) {
16
- if (typeof value !== "object" || value === null)
17
- return null;
18
- const row = value;
19
- const reason = str(row.reason);
20
- return reason === null ? null : { reason: reason, hint: str(row.hint) ?? "" };
21
- }
22
- /** R1 of the duplicate research: candidates whose SKILL.md digest is identical are copies of one skill and share one
23
- * rank, so a distinct skill behind two copies is rank 2, not rank 3. Candidates without a digest stand alone. */
24
- function collapse(candidates) {
25
- const byDigest = new Map();
26
- const groups = [];
27
- for (const candidate of [...candidates].sort((a, b) => a.rank - b.rank || a.uri.localeCompare(b.uri))) {
28
- const known = candidate.digest === "" ? undefined : byDigest.get(candidate.digest);
29
- if (known) {
30
- known.push(candidate);
31
- continue;
32
- }
33
- const group = [candidate];
34
- if (candidate.digest !== "")
35
- byDigest.set(candidate.digest, group);
36
- groups.push(group);
37
- }
38
- return groups.map((members, i) => ({ rank: i + 1, members }));
39
- }
40
- function searchOf(event) {
41
- const raw = Array.isArray(event.data.candidates) ? event.data.candidates : [];
42
- return { query: str(event.data.query) ?? event.text ?? "", abstained: abstainedOf(event.data.abstained),
43
- groups: collapse(raw.flatMap((value) => candidateOf(value) ?? [])) };
44
- }
45
- function usedSkillOf(event, digestOf) {
46
- if (event.kind !== "load" && event.kind !== "native_skill")
47
- return null;
48
- const uri = event.skillUri ?? str(event.data.uri) ?? str(event.data.skillUri);
49
- const name = str(event.data.name) ?? (uri === null ? "" : dirOf(uri));
50
- const loadId = str(event.data.loadId);
51
- return { uri, name, via: event.kind === "load" ? "load" : "native", loadId, digest: digestOf?.({ uri, loadId }) ?? null };
52
- }
53
- const matchesUri = (candidate, used) => used.uri !== null && candidate.uri === used.uri;
54
- const matchesName = (candidate, used) => used.name !== "" && (candidate.name === used.name || dirOf(candidate.uri) === used.name);
55
- /** missedLater asks whether a search surfaced a skill at all, which todo 7 words as its uri or its name; this is
56
- * deliberately looser than the identity a rank needs. */
57
- const matches = (candidate, used) => matchesUri(candidate, used) || matchesName(candidate, used);
58
- /** A rank belongs to the skill the search actually returned: the same uri, or a candidate with the same SKILL.md
59
- * digest, which R1 defines as a copy of that skill. A shared name is never proof of identity, so a known uri the
60
- * search did not return stays unranked even when a same-named variant was a candidate. A native activation reports
61
- * only a name, so it takes a rank when every candidate carrying that name is one collapsed skill. */
62
- function rankIn(search, used) {
63
- if (search === null)
64
- return null;
65
- const byUri = search.groups.find((group) => group.members.some((member) => matchesUri(member, used)));
66
- if (byUri)
67
- return byUri.rank;
68
- const byDigest = used.digest === null ? undefined
69
- : search.groups.find((group) => group.members.some((member) => member.digest === used.digest));
70
- if (byDigest)
71
- return byDigest.rank;
72
- if (used.uri !== null)
73
- return null;
74
- const named = search.groups.filter((group) => group.members.some((member) => matchesName(member, used)));
75
- return named.length === 1 ? named[0].rank : null;
76
- }
77
- /** Label precedence: the strongest evidence of where the used skills came from wins, so a turn that used a native
78
- * skill before searching and then loaded the top hit reads as found_top1 while `nativeWithoutSearch` stays true. */
79
- function labelOf(searched, used, nativeWithoutSearch) {
80
- if (used.some((skill) => skill.rankInSearch === 1))
81
- return "found_top1";
82
- if (used.some((skill) => skill.rankInSearch !== null))
83
- return "found_lower";
84
- if (nativeWithoutSearch)
85
- return "native_without_search";
86
- if (used.length > 0)
87
- return "loaded_outside_results";
88
- return searched ? "searched_none_used" : "no_search";
89
- }
90
- /** Reads one turn in event order: a search updates what the next use can be ranked against, so a turn with several
91
- * searches ranks each load against the latest search before it. `later` holds the turns after this one in the session.
92
- */
93
- export function analyzeTurn(turn, later = [], digestOf) {
94
- const searches = [];
95
- const used = [];
96
- const abstentions = [];
97
- let latest = null;
98
- let nativeWithoutSearch = false;
99
- for (const event of turn.events) {
100
- if (event.kind === "search") {
101
- latest = searchOf(event);
102
- searches.push(latest);
103
- if (latest.abstained !== null)
104
- abstentions.push(latest.abstained);
105
- continue;
106
- }
107
- const skill = usedSkillOf(event, digestOf);
108
- if (skill === null)
109
- continue;
110
- if (skill.via === "native" && latest === null)
111
- nativeWithoutSearch = true;
112
- used.push({ uri: skill.uri, name: skill.name, via: skill.via, ts: event.ts, rankInSearch: rankIn(latest, skill) });
113
- }
114
- // One row per candidate uri; when several searches returned it, the latest search's ranks are the reported ones.
115
- const candidates = new Map();
116
- for (const search of searches) {
117
- for (const group of search.groups) {
118
- for (const member of group.members) {
119
- candidates.set(member.uri, { uri: member.uri, name: member.name, rank: group.rank, rawRank: member.rank, copies: group.members.length });
120
- }
121
- }
122
- }
123
- const surfaced = searches.flatMap((search) => search.groups.flatMap((group) => group.members));
124
- const missedLater = new Map();
125
- if (searches.length > 0) {
126
- for (const next of later) {
127
- for (const event of next.events) {
128
- const skill = usedSkillOf(event);
129
- if (skill === null || surfaced.some((candidate) => matches(candidate, skill)))
130
- continue;
131
- const key = skill.uri ?? skill.name;
132
- if (!missedLater.has(key))
133
- missedLater.set(key, { uri: skill.uri, name: skill.name, via: skill.via, turnId: next.id, ts: event.ts });
134
- }
135
- }
136
- }
137
- return { turnId: turn.id, searched: searches.length > 0, queries: searches.map((search) => search.query),
138
- candidates: [...candidates.values()].sort((a, b) => a.rank - b.rank || a.rawRank - b.rawRank || a.uri.localeCompare(b.uri)),
139
- loadedSkills: used, abstained: abstentions.length > 0, abstentions,
140
- nativeWithoutSearch, missedLater: [...missedLater.values()], label: labelOf(searches.length > 0, used, nativeWithoutSearch) };
141
- }
142
- export function aggregateFindings(turns) {
143
- const labels = Object.fromEntries(LABELS.map((label) => [label, 0]));
144
- const ranks = [];
145
- let abstainedSearches = 0;
146
- let abstainedTurns = 0;
147
- for (const turn of turns) {
148
- labels[turn.label] += 1;
149
- abstainedSearches += turn.abstentions.length;
150
- if (turn.abstained)
151
- abstainedTurns += 1;
152
- for (const skill of turn.loadedSkills)
153
- if (skill.rankInSearch !== null)
154
- ranks.push(skill.rankInSearch);
155
- }
156
- return { turns: turns.length, labels, abstainedSearches, abstainedTurns,
157
- meanRank: ranks.length === 0 ? null : ranks.reduce((sum, rank) => sum + rank, 0) / ranks.length };
158
- }
159
- export function analyzeSession(tree, digestOf) {
160
- const turns = tree.turns.map((turn, i) => analyzeTurn(turn, tree.turns.slice(i + 1), digestOf));
161
- return { sessionId: tree.id, turns, aggregate: aggregateFindings(turns) };
162
- }
163
- /** The SKILL.md digest of what a load actually read, taken from the resource list stored with that load. It is the
164
- * same digest a candidate carries, so a load of an identical copy under another uri is recognised as that skill. */
165
- export function loadedDigests(store) {
166
- return ({ uri, loadId }) => (uri === null || loadId === null
167
- ? undefined
168
- : store.getLoad(loadId)?.resources.find((resource) => resource.uri === uri)?.digest);
169
- }
170
- export function sessionFinding(store, sessionId) {
171
- const tree = sessionTree(store, sessionId);
172
- return tree ? analyzeSession(tree, loadedDigests(store)) : undefined;
173
- }
174
- export function flowFinding(store, flowOrWorkspaceId) {
175
- const flow = flowTree(store, flowOrWorkspaceId);
176
- if (!flow)
177
- return undefined;
178
- const sessions = new Map();
179
- const digestOf = loadedDigests(store);
180
- for (const tab of flow.tabs) {
181
- for (const pane of tab.panes) {
182
- for (const link of pane.sessions) {
183
- if (link.session !== null && !sessions.has(link.session.id))
184
- sessions.set(link.session.id, analyzeSession(link.session, digestOf));
185
- }
186
- }
187
- }
188
- const list = [...sessions.values()];
189
- return { id: flow.id, sessions: list, aggregate: aggregateFindings(list.flatMap((session) => session.turns)) };
190
- }
1
+ import * as kernel from "./kernel.js";
2
+ // "Found the skill?" analysis runs in the shared MIT kernel; the annotations keep the local signatures.
3
+ export const analyzeTurn = kernel.analyzeTurn;
4
+ export const aggregateFindings = kernel.aggregateFindings;
5
+ export const analyzeSession = kernel.analyzeSession;
6
+ export const loadedDigests = kernel.loadedDigests;
7
+ export const sessionFinding = kernel.sessionFinding;
8
+ export const flowFinding = kernel.flowFinding;