clementine-agent 1.18.156 → 1.18.158

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 (22) hide show
  1. package/dist/cli/dashboard.d.ts +1 -0
  2. package/dist/cli/dashboard.js +56 -4
  3. package/package.json +1 -1
  4. package/scripts/postinstall.js +26 -0
  5. package/vault/00-System/skills/skill-creator/LICENSE.txt +202 -0
  6. package/vault/00-System/skills/skill-creator/SKILL.md +485 -0
  7. package/vault/00-System/skills/skill-creator/agents/analyzer.md +274 -0
  8. package/vault/00-System/skills/skill-creator/agents/comparator.md +202 -0
  9. package/vault/00-System/skills/skill-creator/agents/grader.md +223 -0
  10. package/vault/00-System/skills/skill-creator/assets/eval_review.html +146 -0
  11. package/vault/00-System/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  12. package/vault/00-System/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  13. package/vault/00-System/skills/skill-creator/references/schemas.md +430 -0
  14. package/vault/00-System/skills/skill-creator/scripts/__init__.py +0 -0
  15. package/vault/00-System/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  16. package/vault/00-System/skills/skill-creator/scripts/generate_report.py +326 -0
  17. package/vault/00-System/skills/skill-creator/scripts/improve_description.py +247 -0
  18. package/vault/00-System/skills/skill-creator/scripts/package_skill.py +136 -0
  19. package/vault/00-System/skills/skill-creator/scripts/quick_validate.py +103 -0
  20. package/vault/00-System/skills/skill-creator/scripts/run_eval.py +310 -0
  21. package/vault/00-System/skills/skill-creator/scripts/run_loop.py +328 -0
  22. package/vault/00-System/skills/skill-creator/scripts/utils.py +47 -0
@@ -12,4 +12,5 @@ export declare function killExistingDashboards(): number;
12
12
  export declare function cmdDashboard(opts: {
13
13
  port?: string;
14
14
  }): Promise<void>;
15
+ export declare function getDashboardHTML(token: string): string;
15
16
  //# sourceMappingURL=dashboard.d.ts.map
@@ -13550,7 +13550,10 @@ self.addEventListener('activate', e => {
13550
13550
  await new Promise(() => { });
13551
13551
  }
13552
13552
  // ── Inline HTML Dashboard ────────────────────────────────────────────
13553
- function getDashboardHTML(token) {
13553
+ // Exported for testability — see tests/dashboard-spa-parses.test.ts.
13554
+ // 1.18.158 added that test as a guard against the recurring "served
13555
+ // HTML inline JS doesn't parse" bug (1.18.142 + 1.18.155).
13556
+ export function getDashboardHTML(token) {
13554
13557
  const name = getAssistantName();
13555
13558
  return `<!DOCTYPE html>
13556
13559
  <html lang="en">
@@ -21380,6 +21383,15 @@ if('serviceWorker' in navigator){navigator.serviceWorker.getRegistrations().then
21380
21383
  </div>
21381
21384
  </div>
21382
21385
  <div style="display:flex;align-items:center;gap:8px;flex-shrink:0">
21386
+ <!-- 1.18.157 — Build with skill-creator. The official Anthropic
21387
+ skill-creator skill is bundled in the vault and auto-discovered.
21388
+ This button opens the chat with a prefilled prompt that matches
21389
+ its triggers. The skill walks the user through Anthropic-canonical
21390
+ skill creation conversationally — quality linting, trigger phrase
21391
+ suggestions, iteration loop, all built in. -->
21392
+ <button class="btn-secondary" onclick="askClementineWith('Help me build a new skill using skill-creator. Walk me through it conversationally.')" style="font-size:13px;padding:8px 14px;border-radius:6px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);font-weight:500;cursor:pointer;display:inline-flex;align-items:center;gap:6px" title="Walk through Anthropic's official skill-creator skill in chat — generates an Anthropic-canonical SKILL.md from a description, then iterates with you on triggers + body.">
21393
+ <span style="font-size:14px;line-height:1">✨</span> Build with skill-creator
21394
+ </button>
21383
21395
  <button class="btn-primary" onclick="openCreateSkillModal()" style="font-size:13px;padding:8px 14px;border-radius:6px;border:none;background:var(--accent);color:#fff;font-weight:500;cursor:pointer;display:inline-flex;align-items:center;gap:6px">
21384
21396
  <span style="font-size:14px;line-height:1">+</span> New skill
21385
21397
  </button>
@@ -25607,7 +25619,13 @@ function renderScheduledTaskCard(task) {
25607
25619
  // less safe path, worth flagging) or when lean mode is in effect for a
25608
25620
  // meta-job (worth showing because it explains why the prompt is small).
25609
25621
  if (task.lean === true) {
25610
- badges += '<span class="badge badge-purple" title="Lean envelope drops every auto-injected context block (memory, progress, goal, criteria, skills) and prunes the MCP catalog. Used for meta-jobs that must stay under Haiku\'s prompt cap.">Lean</span>';
25622
+ // 1.18.158 hotfix apostrophe in title= breaks JS parser. Outer
25623
+ // template literal converts \' → ', the resulting served HTML has
25624
+ // 'Haiku's' inside a single-quoted JS string, which terminates the
25625
+ // string early and crashes the entire SPA. Use HTML entity to be
25626
+ // safe across both layers (also valid inside JS strings since &#39;
25627
+ // is just text characters, no special meaning).
25628
+ badges += '<span class="badge badge-purple" title="Lean envelope — drops every auto-injected context block (memory, progress, goal, criteria, skills) and prunes the MCP catalog. Used for meta-jobs that must stay under Haiku&#39;s prompt cap.">Lean</span>';
25611
25629
  } else if (task.predictable === false) {
25612
25630
  badges += '<span class="badge badge-yellow" title="Dynamic mode — fire-time injects MEMORY.md, recent team activity, and auto-matched skills. Can drift from chat-time intent.">Reads memory</span>';
25613
25631
  }
@@ -29065,10 +29083,22 @@ async function _openSkillModal(opts) {
29065
29083
  + '<label style="display:block;font-size:12px;color:var(--text-secondary);margin-bottom:4px;font-weight:500">Display title <span style="color:var(--text-muted)">(optional, friendlier name)</span></label>'
29066
29084
  + '<input id="skill-modal-title" type="text" placeholder="e.g. Morning Briefing" style="width:100%;padding:8px 10px;font-size:13px;border:1px solid var(--border);border-radius:6px;background:var(--bg-secondary);color:var(--text-primary);margin-bottom:12px">'
29067
29085
  + '<div style="display:flex;align-items:baseline;justify-content:space-between;margin-bottom:4px">'
29068
- + '<label style="font-size:12px;color:var(--text-secondary);font-weight:500">Description <span style="color:var(--text-muted)">(what this skill does used by Claude to know when to apply it)</span></label>'
29086
+ + '<label style="font-size:12px;color:var(--text-secondary);font-weight:500">Description <span style="color:var(--text-muted)">(what this skill does + when Claude should run it)</span></label>'
29069
29087
  + '<span id="skill-modal-desc-counter" style="font-size:10px;color:var(--text-muted);font-variant-numeric:tabular-nums">0 / 1024 chars</span>'
29070
29088
  + '</div>'
29071
- + '<textarea id="skill-modal-desc" rows="2" oninput="updateSkillModalCounters()" placeholder="One paragraph: what does this skill do, when should Claude run it?" style="width:100%;padding:8px 10px;font-size:13px;border:1px solid var(--border);border-radius:6px;background:var(--bg-secondary);color:var(--text-primary);margin-bottom:12px;font-family:inherit;resize:vertical"></textarea>'
29089
+ // 1.18.157 inline guidance from Anthropic Skill Building Guide page 11.
29090
+ // The description field is the most important part of a skill (it's
29091
+ // the "first level of progressive disclosure" — the only thing always
29092
+ // loaded). Bad descriptions = skill never triggers (or triggers on
29093
+ // everything). Below the field: WHAT + WHEN format reminder + an
29094
+ // anchor link to skill-creator if they want it written for them.
29095
+ + '<div style="font-size:11px;color:var(--text-muted);margin-bottom:6px;line-height:1.5;padding:6px 10px;background:rgba(255,141,0,0.04);border-left:2px solid var(--accent);border-radius:3px">'
29096
+ + '<strong style="color:var(--text-secondary);font-weight:600">Format:</strong> '
29097
+ + '<code style="font-size:10px;background:var(--bg-secondary);padding:1px 4px;border-radius:3px">[WHAT it does] + [WHEN to use it] + [trigger phrases]</code>'
29098
+ + ' &nbsp;·&nbsp; under 1024 chars · no <code style="font-size:10px">&lt; &gt;</code> · '
29099
+ + '<a href="javascript:void(0)" onclick="askClementineWith(\\x27Use skill-creator to help me write a great Anthropic-canonical description for the skill I am building.\\x27)" style="color:var(--accent);text-decoration:none">use skill-creator</a>'
29100
+ + '</div>'
29101
+ + '<textarea id="skill-modal-desc" rows="2" oninput="updateSkillModalCounters()" placeholder="Example: Analyzes Outlook emails and drafts triage replies. Use when user asks to triage email or mentions inbox cleanup." style="width:100%;padding:8px 10px;font-size:13px;border:1px solid var(--border);border-radius:6px;background:var(--bg-secondary);color:var(--text-primary);margin-bottom:12px;font-family:inherit;resize:vertical"></textarea>'
29072
29102
  + '<label style="display:block;font-size:12px;color:var(--text-secondary);margin-bottom:4px;font-weight:500">Allowed tools <span style="color:var(--text-muted)">(comma-separated, leave blank for default)</span></label>'
29073
29103
  + '<input id="skill-modal-tools" type="text" placeholder="e.g. Read, Bash, mcp__supabase__list_tables" style="width:100%;padding:8px 10px;font-size:13px;border:1px solid var(--border);border-radius:6px;background:var(--bg-secondary);color:var(--text-primary);margin-bottom:12px">'
29074
29104
  + '<div style="display:flex;align-items:baseline;justify-content:space-between;margin-bottom:4px">'
@@ -37969,6 +37999,28 @@ async function refreshHomeDigest() {
37969
37999
  }
37970
38000
 
37971
38001
  // ── Home chat FAB + panel ────────────────────────────────────────
38002
+ // 1.18.157 — Open the chat panel with a prefilled prompt and (optionally)
38003
+ // auto-send. Used by surfaces like the Skills page "Build with skill-creator"
38004
+ // button. The chat side reads the input value so we just set + dispatch.
38005
+ function askClementineWith(prompt, opts) {
38006
+ var autoSend = opts && opts.autoSend !== false; // default true
38007
+ toggleHomeChat(true);
38008
+ setTimeout(function() {
38009
+ var input = document.getElementById('chat-input');
38010
+ if (!input) return;
38011
+ input.value = prompt;
38012
+ input.focus();
38013
+ if (autoSend) {
38014
+ // Some chat sends listen on Enter keydown; others have a button.
38015
+ // Try button first, fall back to dispatching Enter.
38016
+ var btn = document.querySelector('#home-chat-panel button[type="submit"], #home-chat-panel button.btn-send, #home-chat-send');
38017
+ if (btn) { btn.click(); return; }
38018
+ var ev = new KeyboardEvent('keydown', { key: 'Enter', code: 'Enter', bubbles: true });
38019
+ input.dispatchEvent(ev);
38020
+ }
38021
+ }, 120);
38022
+ }
38023
+
37972
38024
  function toggleHomeChat(forceOpen) {
37973
38025
  var fab = document.getElementById('home-chat-fab');
37974
38026
  var panel = document.getElementById('home-chat-panel');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clementine-agent",
3
- "version": "1.18.156",
3
+ "version": "1.18.158",
4
4
  "description": "Clementine — Personal AI Assistant (TypeScript)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -103,6 +103,32 @@ if (existsSync(srcVault)) {
103
103
  if (copied > 0) {
104
104
  console.log(`Initialized ${copied} default vault files in ${dstVault}`);
105
105
  }
106
+
107
+ // 1.18.157 — bundle Anthropic-shipped first-party skills (currently
108
+ // just `skill-creator`). Recursive copy under skills/<name>/. We DO
109
+ // overwrite on every install so users always get the latest version
110
+ // when they `npm i -g clementine-agent@latest`. Custom user skills
111
+ // are NOT touched — only the bundled-by-Anthropic ones whose name
112
+ // appears in BUNDLED_FIRST_PARTY_SKILLS.
113
+ const BUNDLED_FIRST_PARTY_SKILLS = ['skill-creator'];
114
+ const srcSkillsRoot = path.join(srcVault, 'skills');
115
+ const dstSkillsRoot = path.join(dstVault, 'skills');
116
+ if (existsSync(srcSkillsRoot)) {
117
+ mkdirSync(dstSkillsRoot, { recursive: true });
118
+ let installedSkills = 0;
119
+ for (const skillName of BUNDLED_FIRST_PARTY_SKILLS) {
120
+ const srcSkill = path.join(srcSkillsRoot, skillName);
121
+ const dstSkill = path.join(dstSkillsRoot, skillName);
122
+ if (!existsSync(srcSkill)) continue;
123
+ try {
124
+ cpSync(srcSkill, dstSkill, { recursive: true });
125
+ installedSkills++;
126
+ } catch { /* skip — keep going for other skills */ }
127
+ }
128
+ if (installedSkills > 0) {
129
+ console.log(`Bundled ${installedSkills} first-party skill(s) into ${dstSkillsRoot}`);
130
+ }
131
+ }
106
132
  }
107
133
 
108
134
  // ── Step 4: Optional local embedding model prefetch ─────────────────
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 Anthropic, PBC.
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.