Kernel introduction
The kernel (isofind-kernel.js) hosts the contribution registry, the command system, keybindings, layered settings and the event bus. It exposes a single facade, window.IsoFind. The other modules (workbench, workflows, dashboard, connectors) attach their own namespace to it.
Two structural constraints
| Constraint | What it means for a contributor |
| Classic script, not an ES module |
The application loads about a hundred global scripts in a meaningful order. A module would be deferred and would run after them, too late for the core to register itself at load time. |
| Multi-page navigation |
Every sidebar link destroys the document. The registry is rebuilt on each load. A contribution must be cheap to rebuild, and any panel with heavy state must serialise that state rather than keep it in memory. |
What the kernel provides
The window.IsoFind facade
Provided by the kernel
| Member | Role |
| K.contribute(type, entry) | Generic registration. Returns a disposal token. The type is not a closed list. |
| K.get(type, id) | A registry entry, or null. |
| K.list(type, filter) | The entries of a registry, filtered. |
| K.releaseSource(source) | Removes everything a source registered, whatever the type. |
| K.whenShellReady(fn) | Calls fn once the workbench is mounted, immediately if it already is. |
| K.commands | register, execute, override, get, isAvailable, list(opts) |
| K.keybindings | bind(combo, id), unbindAll(combo), list() |
| K.context | get, set, all(), onChange(fn) |
| K.events | on, emit, emitBlocking (cancellable hook) |
| K.settings | declare, get, set(id, v, layer), onChange, declared() |
| K.security | getZone, setZone, setCapabilityProvider, setActivator |
| K.resolveTitle(t) | Resolves a bilingual title, or a key from translations.js. |
| K.currentLang() | fr or en. |
| K.Disposable, K.DisposableStore | The disposal token and its aggregate. |
Added by the modules
| Member | Installed by | Available |
| K.shell | shell-dock.js | Only after shell.ready |
| K.workflows | workflow-engine.js | At load time |
| K.tools | tool-schema.js | At load time |
| K.connectors | connector-registry.js | At load time |
| K.dashboard | dashboard-registry.js | At load time |
| K.editors | editor-registry.js | At load time |
| K.notebooks | notebook-kernels.js | At load time |
| K.log(source, msg) | panel-journal.js | Test for its presence before calling |
K.shell does not exist when scripts load: the workbench installs itself on DOM ready, because it needs .app-layout. A panel that tests K.shell at load time finds it missing and disappears with no message. Always go through K.whenShellReady().
Load order
// boot.js, 'shell' group
['/static/js/kernel/isofind-kernel.js', 'shell'],
['/static/js/kernel/core-commands.js', 'shell'],
['/static/js/kernel/command-palette.js', 'shell'],
['/static/js/kernel/shell-dock.js', 'shell'],
['/static/js/kernel/panel-journal.js', 'shell'],
['/static/js/kernel/shell-layouts.js', 'shell'],
['/static/js/kernel/shell-keybindings.js', 'shell'],
['/static/js/kernel/workflow-engine.js', 'shell'],
['/static/js/kernel/workflow-tasks.js', 'shell'],
['/static/js/kernel/tool-schema.js', 'shell'],
['/static/js/kernel/connector-registry.js','shell'],
['/static/js/kernel/agent-manager.js', 'shell'],
The relative order of panels does not matter: they hook onto shell.ready, not onto their rank. On the backend, kernel_wiring.py mounts each module independently; a missing module logs a warning and leaves the rest working.
Zones and capabilities
On security the kernel carries no policy of its own: it asks the host before every dispatch. Policy stays with the host, which alone knows the PKI, the consent granted at install time and the developer mode. The kernel refuses a dispatch when the host says no, which guarantees there is no side channel.
| Zone | Context key | Effect |
| distribution |
kernel.zone |
Default. Commands declared zone: 'local' are refused. |
| local |
Developer mode. Every command is executable. |
The core (source: 'core') is exempt from the capability check, since it is the application's own code. Every other source must prove its capability against the provider installed by the host. With no provider, no capability is granted.
Command, task, panel
| Command | Task | Panel |
| May open a modal | Yes | No | Not applicable |
| Parameters | Free-form object | entrees / sorties schema | None |
| Chainable in a workflow | No | Yes | No |
| Exposed to the AI assistant | No | Yes, automatically | No |
| Visible in the palette | Yes | No | Through <id>.toggle, created for you |
| Registration | K.commands.register | K.workflows.declarerTache | K.shell.registerPanel |
Domain commands (prefix
app.*:
app.outils.isofImport,
app.donnees.importCSV...) open modals and cannot be automated. To make an operation chainable, declare it as a task. See
Workflows and tasks.
Troubleshooting
| Symptom | Cause and check |
| A panel does not appear, with no message. |
The file tests K.shell at load time and returns. Use K.whenShellReady(). |
| A command is missing from the palette. |
The when predicate, the zone, or the capability. K.commands.isAvailable(id) settles it. |
| A panel is empty after navigation. |
Its state is held in memory instead of ctx.saveState(). |
| A plugin contribution is ignored at load time. |
The identifier belongs to another source. The kernel logs a warning and returns an inert token. |
| No docks on a given page. |
The page has no .app-layout. The workbench refuses to install itself. |