Repository navigation
Description
Overview
Schema fields can be text, number, boolean, date, datetime, enum, array or object. There is no way to declare a field that holds a web link, so a project cannot record its repository and a task cannot record the pull request or commits that delivered it. This issue adds a link field type: a title and a URL.
Problem Statement
A link stored as plain text loses its title and cannot be validated or rendered as something to open. A link stored as an object field has no fixed shape, so nothing checks it and every surface would have to guess. ADR-092 needs a typed link for project.repository, task.pull_request and task.commits, and users need the same type for their own schemas.
Proposed Solution
Add Link to SchemaFieldType. A link value is an object with exactly two keys, title and url, both strings; url must be an absolute URL. An Array field may use link as its item type. The type is available to user-defined schemas like any other field type.
This issue adds the type only. The core fields that use it (project.repository, task.pull_request, task.commits) are added with the core model.
Documentation
- ADR-092 §4 - the
linkfield type: its shape, validation, and use as an array item type - ADR-086 - one wire definition in
nodespace-types, generated TypeScript, closed schemas, nested stored values with snake_case keys and unknown keys refused - Naming conventions - field names, stored keys,
SchemaFieldmetadata - Data layer - how field values are stored and validated
- Updates:
architecture/data-layer.mdandcomponents/creating-node-types.md(the list of field types and the link value's shape),packages/skill/references/cli.md(how a link is written and printed)
Architecture Impact
Implements ADR-092 §4. It extends the set of schema field types and changes no existing decision.
Acceptance Criteria
-
SchemaFieldTypehas aLinkvariant, defined once innodespace-types, listed inSchemaFieldType::ALL, with TypeScript regenerated (bun run gen:types) and committed - A link value is stored as
{ "title": ..., "url": ... }; a write with a missing key, an extra key, a non-string value or aurlthat is not an absolute URL is refused with a message naming the field and the problem - An
Arrayfield with item typelinkaccepts a list of link values and validates each one -
create_schemaandupdate_schemaacceptlinkas a field type and as an array item type, for user-defined schemas - A link field cannot be marked
uniqueor used as a kanban grouping field, and the schema write that tries is refused - A Play condition can read a link's parts (
node.<field>.url,node.<field>.title), andhas(node.<field>)is false when the field is unset - The CLI sets a link with
--propertyand clears it, prints it in human output as its title and URL, and returns the object in--json;nodespace schema getshows the field as typelink - The built-in agent's write tools accept a link value for a link field and reject a bare string with the validation message
- Markdown export renders a link field as a Markdown link
- In the app, the schema form offers Link as a field type; a node's property editor shows a link as its title, opens the URL in the system browser, and edits title and URL; a list of links can be added to and removed from; table and kanban cells show the title
- The URL is opened only for
httpandhttps; any other scheme is shown as text -
references/cli.mddocuments writing and reading a link, andbun run skill:checkpasses - Docs updated as listed under Documentation
- Code passes
bun run quality:fix - Tests pass (
bun run test:changed)
Technical Specifications
Reference Files
packages/nodespace-types/src/schema.rs-SchemaFieldTypeandALLpackages/nodespace-types/src/bin/gen_ts.rs- TypeScript generationpackages/core/src/schema/mod.rs,packages/core/src/schema/extends_chain.rs- schema create and update, field validationpackages/core/src/behaviors/mod.rs,packages/core/src/services/node_service/crud.rs- property validation on writepackages/core/src/playbook/cel.rs- how a node's fields become CEL valuespackages/core/src/utils/markdown.rs- field rendering in Markdown exportpackages/core/src/ops/context_ops.rs,packages/core/src/ops/entity_types_block.rs- schema descriptors shown to agentspackages/cli/src/output.rs,packages/cli/src/commands/node.rs- property input and outputpackages/desktop-app/src/lib/types/schema-node.ts- hand-written helpers around the generated field typespackages/desktop-app/src/lib/components/schema/schema-field-leaf.svelte- the schema form's field editorpackages/desktop-app/src/lib/components/query/table-row.svelte,packages/desktop-app/src/lib/components/query/kanban-grouping.ts- field rendering in views
Implementation Details
- The stored value is a nested value: snake_case keys, no
rename_all, and unknown fields denied. - "Absolute URL" means it parses with a scheme and a host. Do not restrict the scheme at validation; restrict it where the app opens a link.
- Every
matchonSchemaFieldTypeis exhaustive, so the compiler lists the places to handle. Do not add a catch-all arm. - Open a URL through the Tauri opener the app already uses, not a new mechanism.
- Changing the field type set needs no migration: reset the database.
Related Issues
- Give each built-in tool its CLI command and return it with fetched skills; fetch one skill by name; version the skill list #3540 (also extends what schemas and tools expose to agents)
Non-Goals
- The
project.repository,task.pull_requestandtask.commitsfields - Fetching a link's title from the web, previews, or unfurling
Activity
malibio commentedon Oct 5, 2026
Frontend baseline: 317 test files passed, 5733 tests passed
Set the new version argument in the link CLI test after merging main (#…
malibio commentedon Oct 5, 2026
Query paths into a link field (from #3554, merged as #3578)
A property filter and a sort can now name a field inside a structured value with a dotted path (
repository.url), checked against the schema. The check walksobjectfields' declaredfieldsonly, because the link type did not exist when it landed. PR #3579 does not touch it, so on a link field today:{"property": "repository.url", ...}is refused with "'repository' is a link field ... with no declared fields inside it".What is needed, in
resolve_property(packages/core/src/ops/query_ops.rs): where a segment's field is alink, accept its parts (title,url) as the next and last segment. The stored value is a JSON object, so the SQL side (json_extract(properties, '$.project.repository.url')) and the app's matcher already read it; only the schema check stops it.ADR-094's "the project for a checkout is found by an ordinary query" depends on this. A test beside
a_filter_and_a_sort_reach_into_an_object_fieldwould cover it. It fits in #3579 if that is still open for changes; main also needs merging into that branch first, since #3578 changed the same area.Set the new properties argument in the link CLI test after merging ma…
Read a link field's title and url by path in query filters and sorts (#…
Match the array-shape message in the link list test after merging main (
Sort merged listings by key so clippy 1.95 passes in the merge gate (#…
Return the link path's scope in the shape main now uses (#3541)