synabun 2.4.5 → 2.4.6
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.
- package/CHANGELOG.md +25 -0
- package/README.md +1 -1
- package/docs/whatsapp.md +17 -1
- package/hooks/claude-code/session-start.mjs +21 -18
- package/lib/claude-global-config.js +214 -0
- package/lib/client-config-repair.js +17 -3
- package/mcp-server/dist/index.d.ts.map +1 -1
- package/mcp-server/dist/index.js +6 -1
- package/mcp-server/dist/index.js.map +1 -1
- package/mcp-server/dist/services/tool-catalog.js +1 -1
- package/mcp-server/dist/services/tool-catalog.js.map +1 -1
- package/mcp-server/dist/tools/agents.d.ts +2 -0
- package/mcp-server/dist/tools/agents.d.ts.map +1 -1
- package/mcp-server/dist/tools/agents.js +11 -5
- package/mcp-server/dist/tools/agents.js.map +1 -1
- package/mcp-server/dist/tools/skill-tools.d.ts +24 -5
- package/mcp-server/dist/tools/skill-tools.d.ts.map +1 -1
- package/mcp-server/dist/tools/skill-tools.js +88 -8
- package/mcp-server/dist/tools/skill-tools.js.map +1 -1
- package/mcp-server/dist/tools/tool-groups.d.ts.map +1 -1
- package/mcp-server/dist/tools/tool-groups.js +19 -4
- package/mcp-server/dist/tools/tool-groups.js.map +1 -1
- package/mcp-server/package-lock.json +2 -2
- package/mcp-server/package.json +1 -1
- package/mcp-server/src/index.ts +6 -1
- package/mcp-server/src/services/tool-catalog.ts +1 -1
- package/mcp-server/src/tools/agents.ts +11 -5
- package/mcp-server/src/tools/skill-tools.ts +82 -9
- package/mcp-server/src/tools/tool-groups.ts +19 -4
- package/neural-interface/i18n/en.json +135 -10
- package/neural-interface/i18n/pt-BR.json +135 -10
- package/neural-interface/lib/antigravity/panel-bridge.js +7 -3
- package/neural-interface/lib/assistant-dispatch.js +15 -1
- package/neural-interface/lib/assistant-runtime.js +79 -8
- package/neural-interface/lib/assistant-user-context.js +7 -3
- package/neural-interface/lib/claude-agent-bridge.js +13 -2
- package/neural-interface/lib/codex-thread-history.js +144 -7
- package/neural-interface/lib/codex-worker-app-server.js +84 -30
- package/neural-interface/lib/db.js +26 -0
- package/neural-interface/lib/greeting/sources.js +7 -3
- package/neural-interface/lib/jsonl-lines.js +10 -11
- package/neural-interface/lib/line-buffer.js +88 -0
- package/neural-interface/lib/loop-stall.js +15 -1
- package/neural-interface/lib/memory-list-read.js +105 -0
- package/neural-interface/lib/memory-timers.js +4 -1
- package/neural-interface/lib/native-loop-runtime.js +7 -3
- package/neural-interface/lib/provider-panel-api-key-auth.js +33 -6
- package/neural-interface/lib/skills/api-v2.js +18 -3
- package/neural-interface/lib/skills/bundle.js +2 -2
- package/neural-interface/lib/skills/deploy.js +169 -34
- package/neural-interface/lib/skills/digest.js +57 -3
- package/neural-interface/lib/skills/health.js +55 -1
- package/neural-interface/lib/skills/known-bridge-digests.json +12 -0
- package/neural-interface/lib/skills/runtime-checks.js +7 -4
- package/neural-interface/lib/skills/scan-shell.js +56 -7
- package/neural-interface/lib/skills/scan.js +13 -12
- package/neural-interface/lib/skills/service.js +7 -2
- package/neural-interface/lib/skills/telemetry.js +2 -2
- package/neural-interface/lib/teams/README.md +12 -5
- package/neural-interface/lib/teams/api.js +15 -4
- package/neural-interface/lib/teams/index.js +2 -0
- package/neural-interface/lib/teams/landing.js +195 -75
- package/neural-interface/lib/teams/scheduler.js +31 -32
- package/neural-interface/lib/terminal-token-redaction.js +228 -58
- package/neural-interface/lib/terminal-tokens.js +18 -0
- package/neural-interface/lib/whatsapp/brain.js +21 -0
- package/neural-interface/lib/whatsapp/bridge.js +40 -4
- package/neural-interface/package-lock.json +2 -2
- package/neural-interface/package.json +1 -1
- package/neural-interface/public/index.html +117 -37
- package/neural-interface/public/shared/agents/studio/ax-api.js +11 -0
- package/neural-interface/public/shared/agents/studio/ax-create-view.js +1 -1
- package/neural-interface/public/shared/agents/studio/ax-icons.js +1 -0
- package/neural-interface/public/shared/agents/studio/ax-library-view.js +3 -2
- package/neural-interface/public/shared/agents/studio/ax-main.js +127 -41
- package/neural-interface/public/shared/agents/studio/ax-review-view.js +3 -2
- package/neural-interface/public/shared/agents/studio/ax-teams-view.js +137 -39
- package/neural-interface/public/shared/agents/studio/ax-teams.js +219 -4
- package/neural-interface/public/shared/agents/studio/ax-ui.js +31 -0
- package/neural-interface/public/shared/agents/studio/ax-views.js +67 -69
- package/neural-interface/public/shared/agents/studio/ax-work-answer.js +86 -0
- package/neural-interface/public/shared/agents/studio/ax-work-view.js +305 -0
- package/neural-interface/public/shared/agents/studio/ax-work.css +74 -0
- package/neural-interface/public/shared/agents/studio/ax-work.js +300 -0
- package/neural-interface/public/shared/cdx/cdx-deferred.js +90 -0
- package/neural-interface/public/shared/cdx/cdx-render.js +18 -7
- package/neural-interface/public/shared/cdx/cdx-tabs.js +2 -1
- package/neural-interface/public/shared/loading-diagnostic-entry.js +16 -1
- package/neural-interface/public/shared/skills/studio/sx-operations-view.js +5 -0
- package/neural-interface/public/shared/skills/studio/sx-plan.js +42 -3
- package/neural-interface/public/shared/skills/studio/sx-publish-view.js +20 -4
- package/neural-interface/server.js +316 -252
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -1
- package/skills/skill-forge/SKILL.md +7 -3
|
@@ -19,8 +19,10 @@ export const BLOCK_CODES = Object.freeze(['no_root', 'shared_root_off', 'root_re
|
|
|
19
19
|
export const REFRESH_KINDS = Object.freeze(['automatic', 'reload-skills', 'new-session', 'panel-reload', 'terminal-only']);
|
|
20
20
|
// Why a runtime could not be asked on Verify (lib/skills/runtime-checks.js probe, deploy.js verify): each has its words.
|
|
21
21
|
export const PROBE_CODES = Object.freeze(['not-installed', 'not-running', 'no-answer', 'no-list', 'terminal-only']);
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
// 'not-checked': a runtime whose settings SynaBun does not read (Antigravity, reason `not-read`); never "could not
|
|
23
|
+
// be read", so the plan says nothing about it (sx-install.js lists only disabled and unknown-with-a-reason).
|
|
24
|
+
export const ELIGIBILITY_STATES = Object.freeze(['enabled', 'disabled', 'unknown', 'not-checked']);
|
|
25
|
+
export const ELIGIBILITY_REASONS = Object.freeze(['codex-config', 'claude-override', 'claude-deny', 'opencode-permission', 'unreadable', 'invalid-json', 'not-read']);
|
|
24
26
|
export const RESULT_STATES = Object.freeze(['committed', 'skipped', 'needs-confirmation', 'failed']);
|
|
25
27
|
|
|
26
28
|
const list = (v) => (Array.isArray(v) ? v : []);
|
|
@@ -137,20 +139,57 @@ export function resultModel(result) {
|
|
|
137
139
|
}));
|
|
138
140
|
}
|
|
139
141
|
|
|
140
|
-
|
|
142
|
+
// Per runtime of an installation (lib/skills/deploy.js eligibilityByRuntime): 'not-checked' is a runtime whose
|
|
143
|
+
// settings SynaBun does not read (Antigravity), never "could not be read".
|
|
144
|
+
export const RUNTIME_ELIGIBILITY_STATES = ELIGIBILITY_STATES;
|
|
145
|
+
// Whether a runtime was or can be asked (deploy.js probeStates): Codex and OpenCode have a listing; Claude Code and
|
|
146
|
+
// Antigravity never can be asked.
|
|
147
|
+
export const PROBE_STATES = Object.freeze(['found', 'not-found', 'no-answer', 'not-probed', 'cannot-probe']);
|
|
148
|
+
const PROBEABLE_RUNTIMES = ['codex', 'opencode'];
|
|
149
|
+
|
|
150
|
+
/** Per runtime, what asking it said or why it was not asked; a record from before reads the same way. */
|
|
151
|
+
function probeFacts(runtimes, discovered) {
|
|
152
|
+
const d = discovered && typeof discovered === 'object' ? discovered : {};
|
|
153
|
+
return runtimes.map((runtime) => {
|
|
154
|
+
const v = d[runtime];
|
|
155
|
+
const answer = v && typeof v === 'object' ? v.discovered : (typeof v === 'boolean' ? v : undefined);
|
|
156
|
+
const code = PROBE_CODES.includes(v?.code) ? v.code : null;
|
|
157
|
+
if (answer === true) return { runtime, state: 'found', code: null };
|
|
158
|
+
if (answer === false) return { runtime, state: 'not-found', code: null };
|
|
159
|
+
if (!PROBEABLE_RUNTIMES.includes(runtime) || code === 'no-list') return { runtime, state: 'cannot-probe', code: 'no-list' };
|
|
160
|
+
if (code === 'terminal-only') return { runtime, state: 'cannot-probe', code };
|
|
161
|
+
if (v && typeof v === 'object') return { runtime, state: 'no-answer', code };
|
|
162
|
+
return { runtime, state: 'not-probed', code: null };
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* What a verify (or the check SynaBun runs right after an install) found, fact by fact; nothing is claimed that the
|
|
168
|
+
* service did not establish ("loaded" never is). Takes an installation record or a skill view's installation row
|
|
169
|
+
* (`affectedRuntimes`, `state`). `checked`: whether a check ever ran (a record from before the automatic check
|
|
170
|
+
* that nobody verified has not).
|
|
171
|
+
*/
|
|
141
172
|
export function verifyFacts(installation) {
|
|
142
173
|
const s = installation?.state || {};
|
|
143
174
|
const written = s.writtenCheck || (s.written === true ? 'verified' : s.written === false ? 'changed' : 'unknown');
|
|
144
175
|
const discovered = s.discovered && typeof s.discovered === 'object'
|
|
145
176
|
? Object.entries(s.discovered).map(([runtime, v]) => ({ runtime, discovered: v?.discovered ?? (typeof v === 'boolean' ? v : null), error: v?.error || null, code: PROBE_CODES.includes(v?.code) ? v.code : null }))
|
|
146
177
|
: [];
|
|
178
|
+
const runtimes = list(installation?.destination?.affectedRuntimes).length ? list(installation.destination.affectedRuntimes) : list(installation?.affectedRuntimes);
|
|
179
|
+
const byRuntime = s.eligibilityByRuntime && typeof s.eligibilityByRuntime === 'object' ? s.eligibilityByRuntime : {};
|
|
180
|
+
const reasons = s.eligibilityReasons && typeof s.eligibilityReasons === 'object' ? s.eligibilityReasons : {};
|
|
147
181
|
return {
|
|
148
182
|
written,
|
|
149
183
|
discoverable: s.discoverable === true ? 'yes' : s.discoverable === false ? 'no' : 'unknown',
|
|
150
184
|
eligibility: ['enabled', 'disabled'].includes(s.eligibility) ? s.eligibility : 'unknown',
|
|
185
|
+
eligibilityByRuntime: Object.entries(byRuntime).map(([runtime, v]) => ({ runtime, state: RUNTIME_ELIGIBILITY_STATES.includes(v) ? v : 'unknown', reason: reasons[runtime] || null })),
|
|
186
|
+
notChecked: Array.isArray(s.eligibilityNotChecked) ? s.eligibilityNotChecked.slice() : Object.keys(byRuntime).filter((r) => byRuntime[r] === 'not-checked'),
|
|
151
187
|
discovered,
|
|
188
|
+
probes: probeFacts(runtimes, s.discovered),
|
|
152
189
|
checks: list(s.checks).map((c) => ({ runtime: c.runtime || null, ok: !!c.ok, message: String(c.message ?? '') })),
|
|
153
190
|
checkedAt: s.checkedAt || null,
|
|
191
|
+
checked: s.staticCheck?.state === 'ok' || s.discoverable === true || s.discoverable === false,
|
|
192
|
+
checkError: s.staticCheck?.state === 'error' ? String(s.staticCheck.error || '') : null,
|
|
154
193
|
};
|
|
155
194
|
}
|
|
156
195
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
import { scanStatus, scanText, scanFindingText } from './sx-scan.js';
|
|
22
22
|
import { studioErrorText } from './sx-errors.js';
|
|
23
23
|
import { dropdownHTML, wireDropdowns } from '../../cc-dropdown.js';
|
|
24
|
-
import { html, raw, setHTML, ICONS, relativeTime, listText } from './sx-dom.js';
|
|
24
|
+
import { html, raw, attr, setHTML, ICONS, relativeTime, listText } from './sx-dom.js';
|
|
25
25
|
import { installTargets, targetState, wholeTarget, sameAsk } from './sx-subject.js';
|
|
26
26
|
import { verifyFacts, needsConfirmation, newPublishState, clearPlan, choosePublishRevision, planModel } from './sx-plan.js';
|
|
27
27
|
import { defaultSelection, scopeOf, simplePicker, moveScope, defaultRevisionId, plainLabel, planLines, installButton, installStatus, whereOf } from './sx-install.js';
|
|
@@ -326,7 +326,9 @@ function outcomeHTML(ctx, results) {
|
|
|
326
326
|
function installRowHTML(ctx, ws, i, revisionId, owner) {
|
|
327
327
|
const { t } = ctx;
|
|
328
328
|
const current = revisionId ? i.sourceRevisionId === revisionId : !i.updateAvailable;
|
|
329
|
-
|
|
329
|
+
// What Verify just found, else what SynaBun's own check after the install stored (a server from before sends no state).
|
|
330
|
+
const stored = i.state ? verifyFacts(i) : null;
|
|
331
|
+
const facts = ws.pub.verify[i.installationId] || (stored && (stored.checked || stored.checkError !== null) ? stored : null);
|
|
330
332
|
return html`<li class="sx-install-row">
|
|
331
333
|
<span class="sx-install-where">${targetWords(ctx, whereOf(i))}</span>
|
|
332
334
|
<span class="sx-mono sx-dim sx-path" title="${i.destination || ''}">${shortPath(i.destination || '')}</span>
|
|
@@ -343,12 +345,26 @@ function factsHTML(t, f) {
|
|
|
343
345
|
return html`<ul class="sx-facts sx-install-facts">
|
|
344
346
|
<li>${t(`skillsStudio.publish.fact.written.${f.written === 'verified' ? 'ok' : f.written === 'missing' ? 'missing' : f.written === 'changed' ? 'changed' : 'unknown'}`)}</li>
|
|
345
347
|
<li>${t(`skillsStudio.publish.fact.discoverable.${f.discoverable}`)}</li>
|
|
346
|
-
|
|
347
|
-
|
|
348
|
+
${(f.eligibilityByRuntime || []).length
|
|
349
|
+
? f.eligibilityByRuntime.map((e) => html`<li${attr('class', e.state === 'disabled' ? 'sx-warn-text' : null)}>${t(`skillsStudio.publish.fact.eligibilityRuntime.${e.state}`, { runtime: t(`skillsStudio.runtime.${e.runtime}`) })}</li>`)
|
|
350
|
+
: html`<li>${t(`skillsStudio.publish.fact.eligibility.${f.eligibility}`)}</li>`}
|
|
351
|
+
${(f.probes || []).length ? f.probes.map((p) => html`<li>${probeLine(t, p)}</li>`)
|
|
352
|
+
: f.discovered.map((d) => html`<li>${t(`skillsStudio.publish.fact.discovered.${d.discovered === true ? 'yes' : d.discovered === false ? 'no' : d.code || 'unknown'}`, { runtime: t(`skillsStudio.runtime.${d.runtime}`) })}</li>`)}
|
|
353
|
+
${f.checkError !== null && f.checkError !== undefined ? html`<li class="sx-warn-text">${t('skillsStudio.publish.fact.checkFailed', { error: f.checkError })}</li>` : ''}
|
|
348
354
|
${f.checks.filter((c) => !c.ok).map((c) => html`<li class="sx-warn-text">${c.message}</li>`)}
|
|
349
355
|
</ul>`;
|
|
350
356
|
}
|
|
351
357
|
|
|
358
|
+
/** One runtime: what asking it said, "cannot be asked" (no listing: Claude Code, Antigravity), or "not asked yet". */
|
|
359
|
+
function probeLine(t, p) {
|
|
360
|
+
const runtime = t(`skillsStudio.runtime.${p.runtime}`);
|
|
361
|
+
if (p.state === 'found') return t('skillsStudio.publish.fact.discovered.yes', { runtime });
|
|
362
|
+
if (p.state === 'not-found') return t('skillsStudio.publish.fact.discovered.no', { runtime });
|
|
363
|
+
if (p.state === 'cannot-probe') return t(p.code === 'terminal-only' ? 'skillsStudio.publish.fact.discovered.terminal-only' : 'skillsStudio.publish.fact.probe.cannot-probe', { runtime });
|
|
364
|
+
if (p.state === 'not-probed') return t('skillsStudio.publish.fact.probe.not-probed', { runtime });
|
|
365
|
+
return t(`skillsStudio.publish.fact.discovered.${p.code || 'unknown'}`, { runtime });
|
|
366
|
+
}
|
|
367
|
+
|
|
352
368
|
/** The foot of the tab: what is picked, and the one button. */
|
|
353
369
|
function barHTML(ctx, ws, picker, revisionId, rev) {
|
|
354
370
|
const { t } = ctx;
|