mirror of
https://github.com/got-feedBack/feedBack.git
synced 2026-09-13 16:30:09 +00:00
rename: slopsmith -> feedBack, byron -> got-feedBack
Renames across the entire codebase: - slopsmith/Slopsmith/SLOPSMITH/SlopSmith -> feedBack/FeedBack/FEEDBACK/FeedBack - byron/Byron/Byrongamatos -> got-feedBack/got-feedBack/got-feedBack - /home/byron/ -> /opt/got-feedBack/ - byron@ougsoft.com -> hi@got-feedBack.org - github.com/byrongamatos/ -> github.com/got-feedback/ - com.byron. -> com.got-feedback. - SLOPSMITH_ env vars -> FEEDBACK_ with backward-compat fallback - Protocol/storage strings migrated with read-old/write-new pattern - window.slopsmith JS API -> window.feedBack (canonical) + backward-compat alias Refs: #rename-slopsmith
This commit is contained in:
committed by
byrongamatos
parent
fdbab2a9e1
commit
d3037b903e
@@ -2,13 +2,13 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
window.slopsmith = window.slopsmith || {};
|
||||
const capabilities = window.slopsmith.capabilities;
|
||||
window.feedBack = window.feedBack || {};
|
||||
const capabilities = window.feedBack.capabilities;
|
||||
if (!capabilities || capabilities.version !== 1) return;
|
||||
if (window.slopsmith.audioEffects && window.slopsmith.audioEffects.version === 1) return;
|
||||
if (window.feedBack.audioEffects && window.feedBack.audioEffects.version === 1) return;
|
||||
|
||||
const SCHEMA = 'slopsmith.audio_effects.diagnostics.v1';
|
||||
const PLAN_SCHEMA = 'slopsmith.audio_effects.chain_plan.v1';
|
||||
const SCHEMA = 'feedBack.audio_effects.diagnostics.v1';
|
||||
const PLAN_SCHEMA = 'feedBack.audio_effects.chain_plan.v1';
|
||||
const OWNER_ID = 'core.audio.effects';
|
||||
const DEFAULT_ROUTE_KEY = 'desktop-main';
|
||||
const DEFAULT_TIMEOUT_MS = 2000;
|
||||
@@ -354,7 +354,7 @@
|
||||
|
||||
function _emit(event, detail) {
|
||||
try {
|
||||
if (window.slopsmith && typeof window.slopsmith.emit === 'function') window.slopsmith.emit(event, detail);
|
||||
if (window.feedBack && typeof window.feedBack.emit === 'function') window.feedBack.emit(event, detail);
|
||||
} catch (_) { /* best effort */ }
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@
|
||||
}
|
||||
|
||||
function _desktopExecutor() {
|
||||
const desktop = window.slopsmithDesktop && window.slopsmithDesktop.audioEffects;
|
||||
const desktop = window.feedBackDesktop && window.feedBackDesktop.audioEffects;
|
||||
if (!desktop || typeof desktop.loadChainPlan !== 'function') return null;
|
||||
const handlers = { loadChainPlan: desktop.loadChainPlan.bind(desktop) };
|
||||
if (typeof desktop.releaseRoute === 'function') handlers.releaseRoute = desktop.releaseRoute.bind(desktop);
|
||||
@@ -388,9 +388,9 @@
|
||||
if (typeof desktop.setRouteGain === 'function') handlers.setRouteGain = desktop.setRouteGain.bind(desktop);
|
||||
return {
|
||||
executorId: 'desktop-native',
|
||||
pluginId: 'slopsmith-desktop',
|
||||
pluginId: 'feedBack-desktop',
|
||||
routeKey: DEFAULT_ROUTE_KEY,
|
||||
label: 'Slopsmith Desktop native audio',
|
||||
label: 'FeedBack Desktop native audio',
|
||||
enabled: true,
|
||||
availability: 'available',
|
||||
sourceMode: 'native',
|
||||
@@ -1382,7 +1382,7 @@
|
||||
const shims = [
|
||||
{ shimId: 'audio-effects.legacy-tone-controls', capability: 'audio-effects', source: OWNER_ID, legacySurface: 'legacy tone/effect controls', reason: 'Legacy tone controls are attributed until providers use native audio-effects route operations.' },
|
||||
{ shimId: 'audio-effects.legacy-nam-routing', capability: 'audio-effects', source: OWNER_ID, legacySurface: 'NAM tone native-preset route interception', reason: 'Legacy NAM/Rig Builder route interception remains a migration bridge until providers resolve chain plans natively.' },
|
||||
{ shimId: 'audio-effects.legacy-native-load', capability: 'audio-effects', source: OWNER_ID, legacySurface: 'window.slopsmithDesktop.audio.loadPreset', reason: 'Direct Desktop native preset loading is attributed until providers route physical loads through compatible audio-effects executors.' },
|
||||
{ shimId: 'audio-effects.legacy-native-load', capability: 'audio-effects', source: OWNER_ID, legacySurface: 'window.feedBackDesktop.audio.loadPreset', reason: 'Direct Desktop native preset loading is attributed until providers route physical loads through compatible audio-effects executors.' },
|
||||
{ shimId: 'audio-effects.legacy-tone-db', capability: 'audio-effects', source: OWNER_ID, legacySurface: 'nam_tone.db tone_mappings', reason: 'Legacy NAM tone database mapping access is attributed until providers use the core audio-effects mapping index exclusively.' },
|
||||
{ shimId: 'audio-effects.legacy-midi-amp', capability: 'audio-effects', source: OWNER_ID, legacySurface: 'MIDI amp/external effect handoff', reason: 'Legacy external effect handoffs are attributed until provider route operations land.' },
|
||||
];
|
||||
@@ -1390,7 +1390,7 @@
|
||||
}
|
||||
|
||||
function _contributeDiagnostics() {
|
||||
const diagnostics = window.slopsmith && window.slopsmith.diagnostics;
|
||||
const diagnostics = window.feedBack && window.feedBack.diagnostics;
|
||||
if (diagnostics && typeof diagnostics.contribute === 'function') {
|
||||
try { diagnostics.contribute('audio-effects', snapshot()); }
|
||||
catch (_) { /* diagnostics must not break playback */ }
|
||||
@@ -1429,7 +1429,7 @@
|
||||
getDiagnostics: snapshot,
|
||||
};
|
||||
|
||||
window.slopsmith.audioEffects = api;
|
||||
window.feedBack.audioEffects = api;
|
||||
_registerDomain();
|
||||
_registerBridgeMetadata();
|
||||
_contributeDiagnostics();
|
||||
|
||||
@@ -2,21 +2,21 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
window.slopsmith = window.slopsmith || {};
|
||||
const capabilities = window.slopsmith.capabilities;
|
||||
window.feedBack = window.feedBack || {};
|
||||
const capabilities = window.feedBack.capabilities;
|
||||
if (!capabilities || capabilities.version !== 1) return;
|
||||
if (window.slopsmith.audioSession && window.slopsmith.audioSession.version === 1) return;
|
||||
if (window.feedBack.audioSession && window.feedBack.audioSession.version === 1) return;
|
||||
|
||||
const SCHEMA = 'slopsmith.audio_session.diagnostics.v1';
|
||||
const SCHEMA = 'feedBack.audio_session.diagnostics.v1';
|
||||
const DOMAINS = Object.freeze(['audio-mix', 'audio-input', 'audio-monitoring', 'stems']);
|
||||
const MAX_OUTCOMES = 100;
|
||||
const MAX_DOMAIN_ITEMS = 50;
|
||||
const FADER_OPERATION_TIMEOUT_MS = 2000;
|
||||
const INPUT_OPERATION_TIMEOUT_MS = 2000;
|
||||
const MONITORING_OPERATION_TIMEOUT_MS = 2000;
|
||||
const SELECTED_INPUT_STORAGE_KEY = 'slopsmith.audioInput.selectedLogicalSourceKey';
|
||||
const SELECTED_MONITORING_PROVIDER_STORAGE_KEY = 'slopsmith.audioMonitoring.selectedLogicalMonitoringKey';
|
||||
const DIRECT_MONITOR_STORAGE_KEY = 'slopsmith.audioMonitoring.directMonitorPreference';
|
||||
const SELECTED_INPUT_STORAGE_KEY = 'feedBack.audioInput.selectedLogicalSourceKey';
|
||||
const SELECTED_MONITORING_PROVIDER_STORAGE_KEY = 'feedBack.audioMonitoring.selectedLogicalMonitoringKey';
|
||||
const DIRECT_MONITOR_STORAGE_KEY = 'feedBack.audioMonitoring.directMonitorPreference';
|
||||
const OWNER_ID = 'core.audio.session';
|
||||
const REQUIRED_MIX_KINDS = Object.freeze(['song', 'plugin', 'stem', 'monitoring', 'preview']);
|
||||
const MIX_KINDS = new Set([...REQUIRED_MIX_KINDS, 'analyser', 'other']);
|
||||
@@ -2912,19 +2912,19 @@
|
||||
function _registerBridgeMetadata() {
|
||||
if (typeof capabilities.registerCompatibilityShim !== 'function') return;
|
||||
const shims = [
|
||||
{ shimId: 'audio-mix.fader-registry', capability: 'audio-mix', source: OWNER_ID, legacySurface: 'window.slopsmith.audio.registerFader', reason: 'Legacy mixer faders are attributed as audio-mix participants.' },
|
||||
{ shimId: 'audio-mix.fader-registry', capability: 'audio-mix', source: OWNER_ID, legacySurface: 'window.feedBack.audio.registerFader', reason: 'Legacy mixer faders are attributed as audio-mix participants.' },
|
||||
{ shimId: 'audio-mix.song-volume', capability: 'audio-mix', source: OWNER_ID, legacySurface: 'applySongVolume', reason: 'Legacy song volume writes are attributed as audio-mix route/fader bridge hits.' },
|
||||
{ shimId: 'audio-mix.analyser', capability: 'audio-mix', source: OWNER_ID, legacySurface: '3D Highway analyser fallback', reason: 'Legacy analyser taps are attributed until renderers request analyser providers through audio-mix.' },
|
||||
{ shimId: 'audio-input.legacy-source', capability: 'audio-input', source: OWNER_ID, legacySurface: 'plugin/browser input source handoff', reason: 'Legacy input source handoffs are attributed while note-detection input providers migrate to audio-input.' },
|
||||
{ shimId: 'audio-monitoring.audio-barrier', capability: 'audio-monitoring', source: OWNER_ID, legacySurface: 'window.slopsmithAudioBarrier', reason: 'Legacy audio startup barriers are attributed as monitoring readiness bridges.' },
|
||||
{ shimId: 'stems.master-volume', capability: 'stems', source: OWNER_ID, legacySurface: 'window.slopsmith.stems.setMasterVolume', reason: 'Legacy Stems master volume calls are attributed while native owner operations are staged.' },
|
||||
{ shimId: 'audio-monitoring.audio-barrier', capability: 'audio-monitoring', source: OWNER_ID, legacySurface: 'window.feedBackAudioBarrier', reason: 'Legacy audio startup barriers are attributed as monitoring readiness bridges.' },
|
||||
{ shimId: 'stems.master-volume', capability: 'stems', source: OWNER_ID, legacySurface: 'window.feedBack.stems.setMasterVolume', reason: 'Legacy Stems master volume calls are attributed while native owner operations are staged.' },
|
||||
{ shimId: 'stems.private-state', capability: 'stems', source: OWNER_ID, legacySurface: 'plugin-specific Stems/NAM ducking handshake', reason: 'Existing stem automation requesters are tracked until they migrate to native claims.' },
|
||||
];
|
||||
for (const shim of shims) capabilities.registerCompatibilityShim({ ...shim, status: 'active' });
|
||||
}
|
||||
|
||||
function _contributeDiagnostics() {
|
||||
const diagnostics = window.slopsmith && window.slopsmith.diagnostics;
|
||||
const diagnostics = window.feedBack && window.feedBack.diagnostics;
|
||||
if (diagnostics && typeof diagnostics.contribute === 'function') {
|
||||
try { diagnostics.contribute('audio-session', snapshot()); }
|
||||
catch (_) { /* diagnostics must not break playback */ }
|
||||
@@ -2968,7 +2968,7 @@
|
||||
getDiagnostics: snapshot,
|
||||
};
|
||||
|
||||
window.slopsmith.audioSession = api;
|
||||
window.feedBack.audioSession = api;
|
||||
_registerDomains();
|
||||
_registerBridgeMetadata();
|
||||
_contributeDiagnostics();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* owner is registered in the capability runtime so the Capability Inspector and
|
||||
* diagnostics can see it (design/05; docs/capability-roadmap.md domain #9).
|
||||
*
|
||||
* Public API: window.slopsmith.libraryCardActions
|
||||
* Public API: window.feedBack.libraryCardActions
|
||||
* register(spec) -> unregister() spec: { id, pluginId, label, icon?,
|
||||
* placement?('menu'|'inline'|'overlay'), order?, destructive?,
|
||||
* applies?(song)->bool, enabled?(song)->bool, run(song, ctx) }
|
||||
@@ -20,9 +20,9 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
const w = (typeof window !== 'undefined') ? window : {};
|
||||
w.slopsmith = w.slopsmith || {};
|
||||
if (w.slopsmith.libraryCardActions && w.slopsmith.libraryCardActions.version === 1) return;
|
||||
const capabilities = w.slopsmith.capabilities;
|
||||
w.feedBack = w.feedBack || {};
|
||||
if (w.feedBack.libraryCardActions && w.feedBack.libraryCardActions.version === 1) return;
|
||||
const capabilities = w.feedBack.capabilities;
|
||||
const DOMAIN = 'ui.library-card-injection';
|
||||
const PLACEMENTS = ['menu', 'inline', 'overlay'];
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
|
||||
function snapshot() {
|
||||
return {
|
||||
schema: 'slopsmith.library_card_actions.v1',
|
||||
schema: 'feedBack.library_card_actions.v1',
|
||||
actions: Array.from(actions.values()).map((a) => ({ id: a.id, pluginId: a.pluginId, placement: a.placement, order: a.order, destructive: a.destructive })),
|
||||
};
|
||||
}
|
||||
@@ -148,5 +148,5 @@
|
||||
|
||||
const api = { version: 1, register, unregister, list, run, snapshot };
|
||||
if (typeof module !== 'undefined' && module.exports) module.exports = api; // node tests
|
||||
w.slopsmith.libraryCardActions = api;
|
||||
w.feedBack.libraryCardActions = api;
|
||||
})();
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
window.slopsmith = window.slopsmith || {};
|
||||
const capabilities = window.slopsmith.capabilities;
|
||||
window.feedBack = window.feedBack || {};
|
||||
const capabilities = window.feedBack.capabilities;
|
||||
if (!capabilities || capabilities.version !== 1) return;
|
||||
if (window.slopsmith.libraryProviders && window.slopsmith.libraryProviders.version === 1) return;
|
||||
if (window.feedBack.libraryProviders && window.feedBack.libraryProviders.version === 1) return;
|
||||
|
||||
const PROVIDER_KEY = 'slopsmith.libProvider';
|
||||
const PROVIDER_KEY = 'feedBack.libProvider';
|
||||
const LOCAL_PROVIDER = Object.freeze({
|
||||
id: 'local',
|
||||
label: 'My Library',
|
||||
@@ -302,17 +302,17 @@
|
||||
};
|
||||
|
||||
function _contributeDiagnostics() {
|
||||
const diagnostics = window.slopsmith && window.slopsmith.diagnostics;
|
||||
const diagnostics = window.feedBack && window.feedBack.diagnostics;
|
||||
if (diagnostics && typeof diagnostics.contribute === 'function') {
|
||||
try {
|
||||
diagnostics.contribute('library-capability', {
|
||||
schema: 'slopsmith.library_capability.v1',
|
||||
schema: 'feedBack.library_capability.v1',
|
||||
..._snapshot(),
|
||||
});
|
||||
} catch (_) { /* diagnostics must not break the library */ }
|
||||
}
|
||||
}
|
||||
|
||||
window.slopsmith.libraryProviders = providerApi;
|
||||
window.feedBack.libraryProviders = providerApi;
|
||||
_contributeDiagnostics();
|
||||
})();
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
window.slopsmith = window.slopsmith || {};
|
||||
const capabilities = window.slopsmith.capabilities;
|
||||
window.feedBack = window.feedBack || {};
|
||||
const capabilities = window.feedBack.capabilities;
|
||||
if (!capabilities || capabilities.version !== 1) return;
|
||||
if (window.slopsmith.midiInput && window.slopsmith.midiInput.version === 1) return;
|
||||
if (window.feedBack.midiInput && window.feedBack.midiInput.version === 1) return;
|
||||
|
||||
const STORAGE_KEY = 'slopsmith.midiInput.selectedLogicalSourceKey';
|
||||
const STORAGE_KEY = 'feedBack.midiInput.selectedLogicalSourceKey';
|
||||
|
||||
// providerId → { id, label, participantId, handlers:{ enumerate, open, close } }
|
||||
// handlers are LIVE functions supplied in-page via the public global; they
|
||||
@@ -101,7 +101,7 @@
|
||||
}
|
||||
|
||||
function _contributeDiagnostics() {
|
||||
const diagnostics = window.slopsmith && window.slopsmith.diagnostics;
|
||||
const diagnostics = window.feedBack && window.feedBack.diagnostics;
|
||||
if (!diagnostics || typeof diagnostics.contribute !== 'function') return;
|
||||
try {
|
||||
const snap = _snapshot();
|
||||
@@ -113,7 +113,7 @@
|
||||
sources: snap.sources.map(({ label: _l, ...safe }) => safe),
|
||||
};
|
||||
diagnostics.contribute('midi-input-capability', {
|
||||
schema: 'slopsmith.midi_input.diagnostics.v1',
|
||||
schema: 'feedBack.midi_input.diagnostics.v1',
|
||||
...redacted,
|
||||
});
|
||||
} catch (_) { /* diagnostics must not break input */ }
|
||||
@@ -358,7 +358,7 @@
|
||||
// ── public global (live surface for in-page consumers) ──────────────────
|
||||
// Providers register live handlers here; consumers (input_setup, piano,
|
||||
// drums) get a live session handle for the "play a note" check.
|
||||
window.slopsmith.midiInput = {
|
||||
window.feedBack.midiInput = {
|
||||
version: 1,
|
||||
snapshot: _snapshot,
|
||||
listSources: () => _sourceListShape(),
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
window.slopsmith = window.slopsmith || {};
|
||||
const capabilities = window.slopsmith.capabilities;
|
||||
window.feedBack = window.feedBack || {};
|
||||
const capabilities = window.feedBack.capabilities;
|
||||
if (!capabilities || capabilities.version !== 1) return;
|
||||
if (window.slopsmith.noteDetection && window.slopsmith.noteDetection.version === 1) return;
|
||||
if (window.feedBack.noteDetection && window.feedBack.noteDetection.version === 1) return;
|
||||
|
||||
// providerId → { id, label, kind, primitives } — kind is 'midi' (exact
|
||||
// verdicts from a digital instrument), 'engine' (desktop JUCE verifier),
|
||||
@@ -79,7 +79,7 @@
|
||||
}
|
||||
|
||||
function _contributeDiagnostics() {
|
||||
const diagnostics = window.slopsmith && window.slopsmith.diagnostics;
|
||||
const diagnostics = window.feedBack && window.feedBack.diagnostics;
|
||||
if (diagnostics && typeof diagnostics.contribute === 'function') {
|
||||
try {
|
||||
const snap = _snapshot();
|
||||
@@ -91,7 +91,7 @@
|
||||
providers: snap.providers.map(({ label: _label, ...safe }) => safe),
|
||||
};
|
||||
diagnostics.contribute('note-detection-capability', {
|
||||
schema: 'slopsmith.note_detection_capability.v1',
|
||||
schema: 'feedBack.note_detection_capability.v1',
|
||||
...redacted,
|
||||
});
|
||||
} catch (_) { /* diagnostics must not break detection */ }
|
||||
@@ -329,7 +329,7 @@
|
||||
return true;
|
||||
}
|
||||
if (!_wrapLegacyNoteStateProvider()) {
|
||||
const sm = window.slopsmith;
|
||||
const sm = window.feedBack;
|
||||
if (typeof sm.on === 'function') {
|
||||
try { sm.on('song:loaded', () => { _wrapLegacyNoteStateProvider(); }); }
|
||||
catch (_) { /* best-effort */ }
|
||||
@@ -339,7 +339,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
window.slopsmith.noteDetection = {
|
||||
window.feedBack.noteDetection = {
|
||||
version: 1,
|
||||
snapshot: _snapshot,
|
||||
reportHit: (detail) => _reportResult('hit', detail),
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
window.slopsmith = window.slopsmith || {};
|
||||
const capabilities = window.slopsmith.capabilities;
|
||||
window.feedBack = window.feedBack || {};
|
||||
const capabilities = window.feedBack.capabilities;
|
||||
if (!capabilities || capabilities.version !== 1) return;
|
||||
if (window.slopsmith.playback && window.slopsmith.playback.version === 1) return;
|
||||
if (window.feedBack.playback && window.feedBack.playback.version === 1) return;
|
||||
|
||||
const SCHEMA = 'slopsmith.playback.diagnostics.v1';
|
||||
const SCHEMA = 'feedBack.playback.diagnostics.v1';
|
||||
const OWNER_ID = 'core.playback';
|
||||
const MAX_CURRENT_OUTCOMES = 50;
|
||||
const MAX_CURRENT_EVENTS = 50;
|
||||
@@ -659,12 +659,12 @@
|
||||
}
|
||||
|
||||
function _flushDiagnostics() {
|
||||
const diagnostics = window.slopsmith && window.slopsmith.diagnostics;
|
||||
const diagnostics = window.feedBack && window.feedBack.diagnostics;
|
||||
if (diagnostics && typeof diagnostics.contribute === 'function') {
|
||||
try { diagnostics.contribute('playback', snapshot({ exportMode: 'exported' })); }
|
||||
catch (_) { /* diagnostics must never break playback */ }
|
||||
}
|
||||
try { window.dispatchEvent(new CustomEvent('slopsmith:playback:changed', { detail: { timestamp: _now() } })); }
|
||||
try { window.dispatchEvent(new CustomEvent('feedBack:playback:changed', { detail: { timestamp: _now() } })); }
|
||||
catch (_) { /* support UI refresh is best effort */ }
|
||||
}
|
||||
|
||||
@@ -1062,7 +1062,7 @@
|
||||
}
|
||||
|
||||
function _installLegacyEventBridge() {
|
||||
if (!window.slopsmith || typeof window.slopsmith.on !== 'function') return;
|
||||
if (!window.feedBack || typeof window.feedBack.on !== 'function') return;
|
||||
const map = {
|
||||
'song:loading': 'loading',
|
||||
'song:loaded': 'ready',
|
||||
@@ -1076,7 +1076,7 @@
|
||||
'loop:restart': 'loop-restarted',
|
||||
};
|
||||
for (const [legacy, playbackEvent] of Object.entries(map)) {
|
||||
window.slopsmith.on(legacy, event => {
|
||||
window.feedBack.on(legacy, event => {
|
||||
// Skip echoes of our own command: while a command handler is
|
||||
// driving the transport adapter, the song:* events it produces
|
||||
// are not genuine legacy-surface usage and would duplicate the
|
||||
@@ -1141,7 +1141,7 @@
|
||||
inspect: () => snapshot({ exportMode: 'exported' }),
|
||||
};
|
||||
|
||||
window.slopsmith.playback = api;
|
||||
window.feedBack.playback = api;
|
||||
_installLegacyEventBridge();
|
||||
_contributeDiagnostics();
|
||||
})();
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
window.slopsmith = window.slopsmith || {};
|
||||
const capabilities = window.slopsmith.capabilities;
|
||||
window.feedBack = window.feedBack || {};
|
||||
const capabilities = window.feedBack.capabilities;
|
||||
if (!capabilities || capabilities.version !== 1) return;
|
||||
if (window.slopsmith.tunings && window.slopsmith.tunings.version === 1) return;
|
||||
if (window.feedBack.tunings && window.feedBack.tunings.version === 1) return;
|
||||
|
||||
capabilities.registerOwner('tuning', {
|
||||
description: 'Provides merged guitar/bass tunings from core defaults and plugin contributors.',
|
||||
@@ -42,7 +42,7 @@
|
||||
},
|
||||
});
|
||||
|
||||
window.slopsmith.tunings = Object.freeze({
|
||||
window.feedBack.tunings = Object.freeze({
|
||||
version: 1,
|
||||
get: function () {
|
||||
return fetch('/api/tunings').then(function (r) { return r.json(); });
|
||||
|
||||
@@ -6,19 +6,19 @@
|
||||
// fallback are attributed in redaction-safe diagnostics.
|
||||
//
|
||||
// Legacy bridge: today's plugins keep working unchanged. Discovery still
|
||||
// happens through `type: "visualization"` manifests and `window.slopsmithViz_*`
|
||||
// happens through `type: "visualization"` manifests and `window.feedBackViz_*`
|
||||
// factory globals — both are registered here as compatibility shims and their
|
||||
// hits accounted, per the promotion checklist in docs/capability-roadmap.md.
|
||||
// app.js calls the small runtime API on `window.slopsmith.vizDomain` at its
|
||||
// app.js calls the small runtime API on `window.feedBack.vizDomain` at its
|
||||
// existing integration points (picker population, renderer install); this
|
||||
// module owns everything else.
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
window.slopsmith = window.slopsmith || {};
|
||||
const capabilities = window.slopsmith.capabilities;
|
||||
window.feedBack = window.feedBack || {};
|
||||
const capabilities = window.feedBack.capabilities;
|
||||
if (!capabilities || capabilities.version !== 1) return;
|
||||
if (window.slopsmith.vizDomain && window.slopsmith.vizDomain.version === 1) return;
|
||||
if (window.feedBack.vizDomain && window.feedBack.vizDomain.version === 1) return;
|
||||
|
||||
// providerId → { id, label, contextType, claims } in picker (= directory)
|
||||
// order, which is the auto-match precedence order.
|
||||
@@ -35,7 +35,7 @@
|
||||
function _degraded(reason, payload = {}) { return { outcome: 'degraded', reason, payload }; }
|
||||
|
||||
function _factoryFor(providerId) {
|
||||
const factory = window['slopsmithViz_' + providerId];
|
||||
const factory = window['feedBackViz_' + providerId];
|
||||
return typeof factory === 'function' ? factory : null;
|
||||
}
|
||||
|
||||
@@ -57,11 +57,11 @@
|
||||
}
|
||||
|
||||
function _contributeDiagnostics() {
|
||||
const diagnostics = window.slopsmith && window.slopsmith.diagnostics;
|
||||
const diagnostics = window.feedBack && window.feedBack.diagnostics;
|
||||
if (diagnostics && typeof diagnostics.contribute === 'function') {
|
||||
try {
|
||||
diagnostics.contribute('visualization-capability', {
|
||||
schema: 'slopsmith.visualization_capability.v1',
|
||||
schema: 'feedBack.visualization_capability.v1',
|
||||
..._snapshot(),
|
||||
});
|
||||
} catch (_) { /* diagnostics must not break rendering */ }
|
||||
@@ -145,7 +145,7 @@
|
||||
return _deepFreeze(settings);
|
||||
}
|
||||
|
||||
// Per-instance control descriptors (slopsmith#849) come from the generic
|
||||
// Per-instance control descriptors (feedBack#849) come from the generic
|
||||
// capability participant model: a provider declares them in its manifest
|
||||
// (capabilities.visualization.settings), core registers + normalizes them,
|
||||
// and we read them back here by pluginId. This keeps inspect('visualization')
|
||||
@@ -187,7 +187,7 @@
|
||||
// registered capability participant (not an app.js side channel). A
|
||||
// consuming host (splitscreen) renders these generically and applies
|
||||
// values via the renderer instance's applySetting(key, value)
|
||||
// (slopsmith#849). Deep-cloned + frozen so a list-providers consumer
|
||||
// (feedBack#849). Deep-cloned + frozen so a list-providers consumer
|
||||
// can't mutate internal provider state through the shallow snapshot
|
||||
// clone. Absent until a provider declares them in its manifest.
|
||||
const declaredSettings = settingsById.get(id);
|
||||
@@ -200,8 +200,8 @@
|
||||
if (typeof capabilities.registerCompatibilityShim === 'function') {
|
||||
capabilities.registerCompatibilityShim({
|
||||
capability: 'visualization',
|
||||
shimId: 'visualization:window.slopsmithViz_*',
|
||||
legacySurface: 'window.slopsmithViz_* factory globals',
|
||||
shimId: 'visualization:window.feedBackViz_*',
|
||||
legacySurface: 'window.feedBackViz_* factory globals',
|
||||
source: 'core.visualization',
|
||||
ownerPluginId: 'core.visualization',
|
||||
reason: 'Renderer factories are discovered via window globals until plugins declare visualization capabilities in their manifests.',
|
||||
@@ -270,7 +270,7 @@
|
||||
// Mirror the legacy event bus into domain events so observers can rely on
|
||||
// `visualization:*` without knowing the window bus names. Guarded: the
|
||||
// bus may not exist in minimal/test environments.
|
||||
const sm = window.slopsmith;
|
||||
const sm = window.feedBack;
|
||||
if (typeof sm.on === 'function') {
|
||||
try {
|
||||
sm.on('viz:renderer:ready', () => _emit('renderer-ready', { providerId: activeProviderId }));
|
||||
@@ -328,7 +328,7 @@
|
||||
},
|
||||
});
|
||||
|
||||
window.slopsmith.vizDomain = {
|
||||
window.feedBack.vizDomain = {
|
||||
version: 1,
|
||||
snapshot: _snapshot,
|
||||
refreshProviders,
|
||||
|
||||
Reference in New Issue
Block a user