Repository navigation
Telo v0.123.0
Packages
| Package | Version |
|---|---|
@telorun/cli |
0.123.0 |
@telorun/analyzer |
0.123.0 |
@telorun/cel |
0.123.0 |
@telorun/ide-support |
0.123.0 |
@telorun/k8s-runner |
0.22.0 |
@telorun/kernel |
0.123.0 |
@telorun/language-server |
0.123.0 |
@telorun/message-format |
0.123.0 |
@telorun/runner-core |
0.21.0 |
@telorun/sdk |
0.123.0 |
@telorun/templating |
0.123.0 |
Minor
telo check follows a child application's source and holds what a resource hands it to the child's declarations. A new annotation, x-telo-application-source: { variables?, secrets?, ports?, needs? }, marks the top-level string field naming the application a resource runs, each key a JSON Pointer to the map feeding that block of the child. The loader resolves the source as it resolves an import and loads the child's graph (LoadedGraph.applicationSources); the analysis then reports, at the field, IMPORT_UNRESOLVED / INVALID_IMPORT_SOURCE / INVALID_IMPORT_TARGET for a source that cannot be obtained or is not a Telo.Application, APPLICATION_INPUT_UNDECLARED for a map key the child does not declare, SCHEMA_VIOLATION for a literal its declaration refuses (an expression is typed against it — for a resource declared at the top level only: an expression handed to a child declared in a with: scope or inline in a step is not type-checked against the child's declarations, while its literals are), and for a need REFERENCE_KIND_MISMATCH (a !ref to anything but a need or fulfilment of the child's type), NEED_FORWARD_INCOMPATIBLE (a need stating less than the child's) and the field-map refusals. A resource is judged wherever it is declared — at the top level, in a with: scope, or inline in a step. A durable directory forwarded whole to two child applications, or to a child application and a library import, is NEED_DIRECTORY_FORWARDED_TWICE. The child declarations reach the analysis beside the flattened set, as AnalysisOptions.applicationSources (collectApplicationSources(graph)), and the loader recognises an annotated kind by resolving each resource's kind through the declaring file's imports. A malformed annotation is APPLICATION_SOURCE_ANNOTATION_INVALID. The kernel's load runs the same analysis, so such a run is refused before anything starts, and its analysis cache covers every child file. — cli, analyzer, kernel, language-server
telo runner serves the durable workspace session (breaking). A session is a directory under the state root, sessions/<sessionId>/ with workspace/ (the application's files, its seeded telo-workspace.yaml and its .telo module cache) and agent/, all 0700, kept by id across suspends and runner restarts; the session store is sessions.sqlite in the same state root. The state root is --state-dir, then RUNNER_STATE_DIR (which now names the whole state directory rather than the store's alone), then the per-user application-state directory — $XDG_STATE_HOME/telo/runner (~/.local/state/telo/runner when unset) on Linux, ~/Library/Application Support/telo/runner on macOS, %LOCALAPPDATA%\telo\state\runner on Windows — instead of the system temp directory, so sessions survive a reboot; with none resolvable or writable (no HOME) the runner refuses to start (exit 2), naming --state-dir and RUNNER_STATE_DIR. The -o json result's stateDir is the root in use. Nothing runs until Run: each Run spawns the argv the runner core builds (telo run --watch --no-input --inspect … --no-open <entry>) of the running executable, or of the release an application names, in the session workspace as its own process group, with the run's env over the runner's own; Stop sends SIGTERM to the group and SIGKILL after the grace, and the run's exit code or signal is reported as the app's ending. Suspend ends the runs and keeps the directory; deleting the session or retention removes it. At boot every stored session that was running is suspended — a local run never outlives the runner — and the sweep removes only the session directories the store does not know, replacing the per-PID directories and their sweep. The runner offers no co-resident agent, so features.agents is absent. --watch-sessions and features.watch are removed, with one-shot run sessions and the bundle upload; the command's -o json result no longer carries watch. — cli
The desktop app now starts its local runner with a state root under the app's local data directory (runner/) instead of the system temp directory, so a workspace's local session, its files and its module cache survive an editor restart.
telo run --watch no longer holds the application open between edits (breaking). Each reload runs as a plain telo run would: an application that finishes — a script with no server — runs to completion, its resources are torn down, Kernel.Stopped carries its exit code on the --debug / --inspect stream and the session prints [watch] finished with exit code <n>; waiting for changes, then waits for the next change, kept alive by its file watchers and the --inspect endpoint. The next edit starts a new generation. A server is unchanged: it keeps serving until a change restarts it or the session is stopped. — cli
Runners gain a durable session store and renamed session settings. RUNNER_SESSION_STORE selects sqlite (default, Node's built-in SQLite in sessions.sqlite under RUNNER_STATE_DIR) or postgres (RUNNER_SESSION_STORE_URL); it keeps each session's owner, workspace name, agent, app set, config, status and times, never env or tokens, with one session per owner and workspace, plus the DPoP jtis seen, under a versioned schema whose migrations carry records forward. The k8s and docker runners open it at boot and refuse to start with SQLite and no RUNNER_STATE_DIR. Session settings are renamed: RUNNER_WATCH_MAX_SESSIONS → RUNNER_MAX_SESSIONS (default 8, running sessions), RUNNER_WATCH_IDLE_SECONDS → RUNNER_SESSION_IDLE_SECONDS, RUNNER_WATCH_MAX_TTL_SECONDS → RUNNER_SESSION_MAX_RUNNING_SECONDS, RUNNER_WATCH_SUSPENDED_TTL_SECONDS → RUNNER_SESSION_RETENTION_SECONDS (default 30 days), RUNNER_WATCH_RELOAD_LIMIT → RUNNER_SESSION_RELOAD_LIMIT; RUNNER_WATCH_SESSIONS (every session is now a workspace session, so there is nothing to switch on), RUNNER_WORKSPACE_CHECKPOINT_SECONDS, RUNNER_EXIT_TTL_MS, RUNNER_MAX_TTL_SECONDS and RUNNER_APP_MAX_TTL_SECONDS are removed, and a runner started with any of them set refuses to boot, naming the replacement. The k8s runner reads RUNNER_SESSION_STORAGE_SIZE (default 5Gi) and RUNNER_SESSION_STORAGE_CLASS, and its chart's watch.* values become sessions.idleSeconds / maxRunningSeconds / retentionSeconds / reloadLimit, with runner.maxSessions defaulting to 8 and limits.maxTtlSeconds gone. — k8s-runner, runner-core
The k8s runner serves the durable workspace session (breaking). Each session gets a PersistentVolumeClaim of its own, telo-session-<id> (RUNNER_SESSION_STORAGE_SIZE, RUNNER_SESSION_STORAGE_CLASS; chart sessionStorage.size / .storageClass), owned by no pod: workspace/ is mounted at /workspace (its .telo module cache included) and agent/ at /var/lib/telo-agent-state for the co-resident agent, whose TELO_HOST_STATE_DIR points there. Suspend deletes the pod and keeps the claim, resume and app-set or agent changes mount it again, and deleting the session or retention deletes both. Every app-<name> container is idle until Run, running the session supervisor at /opt/telo-runner/supervisor (copied out of the runner's own image by a supervisor init container), with no TTY, no stdin and no session env — only TELO_SUPERVISOR_LISTEN (0.0.0.0:<9330 + position>) and a per-container TELO_SUPERVISOR_TOKEN; each app's supervisor port and debug port (9230 + position) are reserved, and an app declaring one is refused 400 port_conflict (or rejected on reload). A container that ends, or a supervisor that restarted, fails the session naming the container. At boot the runner adopts each running session's pod — reading every supervisor token and the agent's token back from the pod spec, reconnecting, and reporting live runs as running — suspends a session whose pod is gone, stale or of another supervisor protocol generation (resume rebuilds it), and its orphan sweep spares every known session's claim. New required RUNNER_SUPERVISOR_IMAGE (the chart sets it to the runner's image); RUNNER_SELF_URL, RUNNER_INIT_IMAGE and the chart's session.initImage are gone and refused, with one-shot run pods, catalog app pods, the bundle fetch and the pods/attach permission. RUNNER_MAX_CPU / _MEMORY / _EPHEMERAL_STORAGE size each app container and the workspace container, RUNNER_APP_MAX_* the agent's (chart limits.agent.*). The chart adds the runner's own claim telo-k8s-runner-state at RUNNER_STATE_DIR for the SQLite store, sessionStore.kind / .url / .existingSecret for Postgres, identity.audience / .issuers, and PersistentVolumeClaim RBAC. The image gains a static musl session supervisor, cross-built per architecture. — k8s-runner
App supervisors are driven through runner-core's SupervisedApp, and the test cluster's supervisors are runner-core's FakeSupervisor.
A child application's own needs can be supplied by name. ctx.runtime.run(source, { inputs: { needs } }) takes the fields of each of the child's root needs:, keyed by need name, and the child answers a need supplied that way before its environment (env:-bound name or TELO_NEED_…) and before the host values (TELO_HOST_STATE_DIR, the address templates); a supply: root type is accepted. The child refuses at load a need name it does not declare (ERR_MANIFEST_VALIDATION_FAILED, naming the needs it declares), a field its type does not declare or whose value it refuses, a required field left out (ERR_NEED_PARTIALLY_SUPPLIED), and a durable directory it cannot use (ERR_NEED_DIRECTORY_UNUSABLE, naming the calling resource). The controller protocol's Runtime.Run.inputs gains needs, which is protocol generation telo-7. — kernel, sdk
A runner session is now a durable workspace, and its contract is rewritten around that (breaking). POST /v1/sessions takes { workspace, agent?, apps, config? } — no bundle, no env, no mode — creates an empty session whose apps sit idle until POST /v1/sessions/:id/apps/:app/run ({ env, io, cols?, rows? }, 409 run_active while one is live) and …/stop, and answers 409 session_exists with the existing id for an owner's second session on one workspace. New routes: PUT …/agent, POST …/suspend, POST …/io-tickets; telo versions are judged on create and PUT …/apps. A create with no identity answers a resume secret once and keeps only its SHA-256; every session route takes it as Authorization: Bearer (401 session_auth_required without it, 404 for a session it does not own), and /io takes only a single-use 30 s ?ticket= (closes 4401 without one, 4403 for a used, expired or foreign one). Every record change goes to the session store first; at boot every stored session is loaded, a running one adopted or suspended, and the orphan sweep spares known sessions; sessions suspend when idle or past RUNNER_SESSION_MAX_RUNNING_SECONDS, failed ones keep their storage and resume, and retention deletes suspended ones with their storage. Each app reports an app event (ready, running with its runId, ready with how a run ended), run triggers are run / watch / manual, reachability is reported only while an app runs, and the agent's token is minted per workload creation. Removed: one-shot run sessions, POST /v1/apps/:name/sessions and the capabilities apps list (with its RunnerAppDescriptor type), features.watch, the exited status, the workspace checkpoint (and the workspace app's /workspace/snapshot route), stopAllSessions and watch.enabled. The RunnerBackend seam becomes create / adopt / destroy / reapOrphans({ known, live }) over a BackendWorkload (runApp, stopApp, per-run stdin and resize, setApps, setAgent, suspend, detach), with buildServer now taking the session store. A runner configured with RUNNER_IDENTITY_AUDIENCE (its canonical https base URL) and RUNNER_IDENTITY_ISSUERS (comma-separated https issuers) — boot refuses either alone, an http one, and an audience with a query, fragment or trailing slash — also accepts DPoP-bound identities: Authorization: DPoP <access token> plus a DPoP proof, the token an RFC 9068 JWT from a configured issuer (keys through RFC 8414 / OIDC discovery) for the audience with a cnf.jkt, the proof bound to that key, the request method and <audience><path>, within 120 s, with ath and a jti never seen before (kept in the session store across restarts). It advertises RFC 9728 metadata as identity on /v1/capabilities and at /.well-known/oauth-protected-resource, and every 401 carries WWW-Authenticate: DPoP … resource_metadata="…". Refusals are 401 invalid_token / invalid_dpop_proof, and an unreachable issuer 503 identity_provider_unavailable while resume secrets keep working. An identity's create is owned by (iss, sub) with no secret; GET /v1/sessions (?workspace=) lists an identity's sessions (403 identity_required for a resume secret); POST /v1/sessions/:id/owner with { resumeSecret } adopts a resume-secret session for the identity (404 for a wrong secret, 409 session_exists when the identity already has one for that workspace). — runner-core
New: the session supervisor, the main process every app container runs — a static Linux executable built from the package's supervisor/ crate (build:supervisor, --target x86_64-unknown-linux-musl / aarch64-unknown-linux-musl), not shipped on npm. It listens on TELO_SUPERVISOR_LISTEN at GET /v1/supervisor for one WebSocket carrying Authorization: Bearer <TELO_SUPERVISOR_TOKEN> (4401 without it, 4403 for another; both variables are removed from its environment before anything runs), and speaks protocol generation 1 (specs/supervisor-protocol.md): the runner's hello { generation, lastSeq } answered with the supervisor's hello { generation, instance, state, runId? } and a replay of its output ring above lastSeq; run / stop / resize and stdin frames in; started / exited / failed / refused and [seq][stream][payload] output frames out, idempotent by runId. A run is its own process group on a fresh pty or on pipes, stopped with SIGTERM then SIGKILL after graceMs, and a dropped connection stops nothing. SupervisorClient is the runner's half: it reconnects and is replayed from its last seq, and reports a generation mismatch, a refused token, a superseded connection and a restarted supervisor as distinct terminations. The codec (encodeRunnerMessage, decodeSupervisorMessage, decodeOutputFrame, SUPERVISOR_GENERATION, SUPERVISOR_CLOSE) is exported beside it.
RunnerBackend.reservedPorts?(apps) lets a backend name the ports its workload binds beside an app set ({ app, port, protocol, purpose }); an app declaring one is refused 400 port_conflict on POST /v1/sessions and PUT …/apps, naming what binds it.
A runner now supervises telo 0.123.0 and later (MIN_SUPERVISABLE_TELO, forward-declared until that release is published): it is the release whose telo run --watch lets a one-shot application's generation end, so its run is reported completed with its exit code; an app pinned to an older release is refused 400 telo_version_unavailable when the app set is created or replaced. RUNNER_STATE_DIR names a runner's whole state directory: loadCoreConfig's stateDir, a host's own resolved state root, now wins over it rather than standing in for it, so the store cannot land apart from the host's session directories.
SupervisedApp is the container backends' one adapter over SupervisorClient, exported beside it: it reports an app slot in /v1 terms (started as running, exited / failed as ready with the run's ending), says on the app's output how many output frames were lost, reports nothing before report(), and names what the supervisor runs in by the label the backend passes; isGenerationMismatch recognises a supervisor of another protocol generation. A new @telorun/runner-core/test-support entry exports FakeSupervisor, a session supervisor that runs no program, for runners' tests; runner-core runs the protocol vectors against it.
A session record write that fails is retried (100 ms, 500 ms, 2 s); one that still fails moves the session to failed with the store's error as its message — runs ended, workload removed, storage kept, resumable — and the request that caused it is answered 500 session_store_failed (buildServer's optional storeRetryDelaysMs sets the waits). A runner shutting down no longer removes the containers its sessions started through their engine, nor ends a session's engine: the session store (schema version 2, migrated in place with every row carried forward) keeps each session's containers and the SHA-256 of every engine token a live run may hold, so a session the restarted runner adopts keeps its containers and its runs' token, and one it does not adopt is suspended, which removes them. SessionContainers.releaseAll is replaced by shutdown, and SessionRecord gains containerEngine.
A debug frame larger than 1 MiB is relayed to clients as a stand-in naming its event, timestamp and size instead of the frame itself, so an application whose invocations carry large payloads no longer exhausts the runner's memory.
Patch
telo check now refuses two manifests it used to pass and the runtime refused at boot. A resource whose kind is spelled with the name of a module only a dependency imports (kind: SQLite.Connection in an application that imports a library which imports SQLite) is UNDEFINED_KIND, naming the alias to add or, when the module is imported under another alias, the spelling to write; and an alias that resolves is the only module its kind is looked up in. A read of an undeclared resource in a field with no CEL context of its own (file: !cel "resources.dbFile" on a connection) is CEL_UNKNOWN_FIELD, as it already was inside step bodies; a template's forward views, which nothing publishes, are no longer offered in that message's list of available names. A member read the type checker refuses is reported once, where a step body reported it twice. telo module manifest oci://host/repo with no version reads the newest published version instead of asking for a latest tag no module publishes. — cli, analyzer, templating
telo release reads an image module's Dockerfile.dockerignore (or .dockerignore) as Docker does: every pattern is anchored at the module root, and a pattern naming a directory leaves out everything beneath it. The digest deciding whether such a module bumps now covers exactly the files the image build receives, so a file outside the image — a Helm chart a release stamps after recording .changes/ledger.yaml, a tests/ directory — no longer moves it. This ends the version-modules pull request that republished apps/hub after every release with nothing changed. An ignore line using a character class ([a-z]) or an escape is refused, naming the file and line, rather than read differently from Docker. — cli
An expression in an import's field-by-field needs: supply reads the importing module's variables / secrets again. When the import's own variables: map held a !cel value, the supplied values were typed as the module's declarations, so reading any other declared variable was refused with CEL_UNKNOWN_FIELD ("scratch" is not declared here (declared: workspaceDir)) by telo check and at the kernel's load alike. Only a Telo.Application / Telo.Library document now declares those blocks; on any other document a variables: / secrets: field is values handed to something else. — analyzer
Changelogs: cli · analyzer · cel · ide-support · k8s-runner · kernel · language-server · message-format · runner-core · sdk · templating