Vector¶
Operating and routing guidance for an AI coding agent working on a
Kinetis application that installs kinetis/vector, the optional
schema-driven admin package. This is not a human tutorial: a developer
wants the Vector manual instead.
Read Agent Workflow first; this page adds what Vector needs on
top of it.
Confirm the package is installed¶
Call orbitron_inspect where Orbitron is registered, or read the
project’s own composer.lock, and confirm that kinetis/vector is
installed. When it is not, nothing on this page applies. This page is
no reason to install Vector: install it only when the task or the user
asks for an admin.
Where the guidance comes from¶
This page is kinetis://docs/vector, read with kinetis_read_doc like
every page Agent Workflow routes through. The Vector manual it
links to is published on the web, not served as kinetis://docs/*
resources. Both describe main, so either can describe a newer Vector
than the one installed.
The installed package is the authority for the exact contract:
Read
kinetis/vector’s owncomposer.jsonwithorbitron_read_package_sourcefor its requirements, itsKinetis\Vector\autoload root undersrc/, andextra.kinetis.Read its
README.mdfor the installed version’s setup and feature summary.Settle a signature, a default, a config key or a failure code in
src/withorbitron_search_package_source_treewhen the file is unknown,orbitron_search_package_sourcewhen it is known, and a window around the reported line withorbitron_read_package_source.orbitron_list_package_sourcelists a directory when the layout is what you need. The descriptor’s JSON schema isresources/schema/descriptor.schema.json.
Without Orbitron, read the same files under the project’s own
vendor/kinetis/vector.
@kinetis/vector-ui, the npm package a standalone admin is built from,
is JavaScript that neither documentation server nor Orbitron’s
installed-source tools reach. Read its package.json, the lockfile and
its source with your own file-reading tools.
Workflow¶
Confirm the installed version of
kinetis/vectorand of every Kinetis package the task touches.Route the task through the list below to the manual page that covers it, and read that section.
Read the installed source for anything version-sensitive.
Make the smallest change. A resource, dashboard, settings group, policy or action is ordinary application code, discovered from its attribute where it has one; there is no registry to edit.
Run the verification checklist below, then review the change against Agent Correctness Review.
Task routing¶
Install and migrations.
vendor/bin/kinetis vector:installpublishes Vector’s migrations and the hosted UI bundle a released package ships, and is idempotent: run it again after every upgrade, thenmigrate.--connection=<name>puts Vector’s tables on a named connection, read at runtime fromVECTOR_DB_CONNECTION. Getting started, Databases.Resources, fields, forms, lists, records, actions, dashboards, settings and audit. A
#[Resource]class extendingVectorResourcedeclaresfields(),actions()andwidgets(); a#[Dashboard]class extendingVectorDashboardand a#[Settings]class extendingSettingsGroupadd dashboards and settings groups. All of them compile into the descriptor. Resources, Fields, Forms, Lists, Records, Actions, Dashboards and widgets, Settings, Audit trail and impersonation.Authentication, authorization and field concealment. The application’s authentication middleware joins the
vectormiddleware group and registersKinetis\Http\CurrentUserInterface; Vector’sVectorAccessMiddlewarethen asks the application’sVectorAccessInterfacewhether that user may enter the admin at all. What an admitted user sees is the resource’spolicy()class (aResourcePolicyInterface), itsscope()for rows, and the policy’sviewField()for fields. Authentication, Authorization, Field visibility.The REST API and the MCP tools. Every route is under
/vector. The MCP tools —vector_resources,vector_describe,vector_query,vector_get,vector_create,vector_update,vector_delete,vector_run_actionandvector_widget— call the same services and policies under the caller’s identity. Over HTTP (POST /mcp) the authentication middleware joins themcpgroup as well asvector. REST API, MCP tools, Serving them, Model Context Protocol (MCP).Files, imports and exports. Uploads are checked by their bytes, never their name, and stored privately under a generated key. Export is CSV or Excel (XLSX), and every XLSX export runs as a job; import is CSV only, and always a job. Files and images, Export and import, Excel exports, Imports.
Jobs: queued or inline, terminal state, reaping. Actions that declare
queued(), exports above the resource’sexportLimit(), every XLSX export and every import run on the application’s queue as the admin who started them; everything else runs in the request. Background jobs, Delivery, Stalled jobs, How an action runs.Hosted or standalone UI, and the customization tiers. Standalone is a Nuxt application extending
@kinetis/vector-uion its own origin, signing in with a bearer token; hosted is the bundle the PHP application serves at/vector/uibehind its session. Customization has three tiers: descriptor and settings, runtime extensions, and the application’s own build. Deployment, Customizing the UI.Database, queue and storage topology. An entity on a named connection, Vector’s own tables on another (
VECTOR_DB_CONNECTION), Vector’s jobs on a named queue (VECTOR_QUEUE) or queue connection (VECTOR_QUEUE_CONNECTION), and uploads on a named storage connection (VECTOR_STORAGE_CONNECTION). Databases, Where the jobs go, Configuration.Exact shapes and bounds. Every route, envelope and error is in the REST API, every environment key in Configuration, and every enforced bound in Limits.
Correctness boundaries¶
Definitions are compiled and request-neutral. The descriptor is compiled by
kinetis build(or at boot, in development) from every resource, settings group and dashboard, and is immutable. A resource’s definition methods return the same data for every request; what varies per request belongs in its request-time hooks. The descriptor, Request-time hooks, Caching & AOT Compilation.Identity and policy stay request-scoped.
CurrentUserInterfaceis what the application’s authentication middleware registers for each request, and policies, hooks, actions and widgets are built by the request container. TheVectorAccessInterfaceimplementation is bound on the application scope and answers for every request, so it holds no request state. A job carries only the actor’s id, andActorResolverInterfacerebuilds the user in the worker. Request scope, Appendix: Container Lifecycle.Vector’s own database connection is explicit.
VECTOR_DB_CONNECTIONnames it,defaultwhen unset; it is never inferred from an administered entity’s connection. Vector’s own tables.Relations and transactions do not span databases. The ORM refuses a relation across two connections at build time, and each connection commits on its own: Vector’s own rows (action log, audit, jobs) commit on its connection after the entity changes they describe. Entities on several connections, ORM, Database.
A queued job is not finished work. A queued action, export or import answers only that the job was pushed. Its row moves through
queued,running, and thendoneorfailed; a job is pushed for one attempt and claims its row with one conditional write, so a duplicate delivery does not run twice. Delivery, Queue.The actor and the terminal state have to be proven. Without
kinetis/queueand anActorResolverInterfacebinding, queued actions and imports answer403and large exports are refused. A worker that dies mid-job leaves the rowrunning; once it has reported no progress for the configured minutes it is answered asstalled, andvector:jobs:reap, run by a scheduler, marks itfailed. Stalled jobs.Uploads, export formats and the queue are optional capabilities. The descriptor’s
capabilities(uploads,exportFormats,queue) report what this deployment has configured; a change that needs one does not assume it. Requirements, Storage.Hosted and standalone authentication, and the CSP, are deployment concerns. Standalone sends
Authorization: Bearer …from another origin and needs CORS; hosted sends the session cookie withX-CSRF-Tokenand needs a login page (VECTOR_LOGIN_URL). One middleware may accept both. The hosted shell runs under the application’s ownSECURITY_CSPwith its nonce, or underVECTOR_SHELL_CSPfor that page alone. Deployment, Content Security Policy, One API, both modes.
Verification checklist¶
Boot and compile. The application boots, or
kinetis buildcompiles, with every resource, action, widget, dashboard and settings group the change touches;vendor/bin/kinetis vector:listprints what compiled. A deliberate definition mistake fails naming the class and field. Checked at build.Authorization and concealment. A restricted user gets the same refusal through REST and MCP, and a field
viewField()hides is absent everywhere: the descriptor, records, the audit trail, exports and MCP results, with a filter, sort, grouping, column or written value naming it refused as unknown. Field visibility, Authorization.The real backend. A claim about the database, queue or storage is checked against the connection, queue or filesystem Vector actually uses: “Read installed source to settle a fact” in Agent Correctness Review.
Settlement. Queued work is followed to its terminal state —
done,failed, or stalled and then reaped asfailed— never the push alone.Request isolation. No identity, impersonation or record selection is read back on a later request or in a resident Fiber: “Request state leakage” in Agent Correctness Review.
The UI mode. Hosted or standalone is exercised only when the change touches UI behavior.
See also¶
Agent Workflow — the version boundary and the installed-source tools this page builds on.
Agent Correctness Review — the review checklist the boundaries above draw from.
Application Recipes — the framework recipes Vector’s database, queue, storage and MCP wiring sit on.
Orbitron — the project-local harness that serves this page.
Database, ORM, Queue, Storage, Authorization, Model Context Protocol (MCP), Caching & AOT Compilation, Appendix: Container Lifecycle — the Kinetis foundations Vector runs on.
The Vector manual, the user guide every route above links into.