Skip to main content

Crate onetaskgraph_plugin_api

Crate onetaskgraph_plugin_api 

Source
Expand description

The contract every onetaskgraph source is written against.

This crate holds exactly what a plugin author needs in order to implement a source, and nothing else: the two traits, the work types, the query and paging types, the capability declaration, and the error enum. The engine that drives sources lives in onetaskgraph-core, and no plugin crate may depend on it: deny.toml permits that crate exactly one wrapper, the binary, failing the required deny job, and scripts/check-plugin-isolation.sh reads the real cargo metadata graph inside just check.

Keeping this crate still is the point. Every change here rebuilds and re-tests every plugin, which is exactly the cost the split exists to avoid paying on an ordinary engine change. When a new type could plausibly sit on either side, it belongs in onetaskgraph-core unless a trait signature names it.

Structs§

Capabilities
One source’s declared abilities.
Comment
One comment on a task, as its source holds it.
CommentBody
What a comment says: anything at all, except nothing.
Cursor
A plugin-defined resume token. The engine stores and returns one; it never interprets one.
DependencyEdge
A dependency between two work items.
DependencyEndpoint
One endpoint of a dependency edge.
Document
One piece of information that lives in a project and is not work.
DocumentQuery
A filter over a source’s documents.
Health
Whether a source is answering right now.
ItemWrite
One create-or-update of a work item at a destination.
Label
A tag a source attaches to work.
LabelFilter
Label membership, by name rather than by id.
MetadataKey
One caller-owned metadata key: <namespace>.<name>, at least two non-empty segments separated by dots, whose first segment is not MetadataKey::RESERVED_NAMESPACE.
Metered
What one source’s requests have spent against one budget, split by where each figure came from.
Metering
Everything one source has sent to its backend since it was built, and what that spent against each budget the backend meters it by.
NativeId
A source’s own opaque identifier for one item.
NewComment
One comment to add to a task.
Page
One page of results, and where to pick up.
PageRequest
One step of a walk through a result set.
Project
A grouping of tasks, shaped like a Task without a parent of its own.
ProjectQuery
A filter over a source’s projects.
Repository
A repository identified by its normalized origin, without a URL scheme or .git suffix.
SourceName
The name a configuration document gives one configured source.
Status
A source’s status, kept in both normalised and original form.
Task
One unit of work as a source reports it.
TaskQuery
A filter over a source’s tasks.
TaskRef
One task named by another task’s Task::delivers or Task::delivered_by.
TextQuery
A free-text search and the fields it searches.

Enums§

DependencyKind
What a DependencyEdge means.
DependencySupport
How far a source can walk its own dependency edges.
Direction
Which way a dependency query walks the graph.
ItemKind
The kind of work item named by a dependency endpoint.
Location
Where an entity is, in the one form a consumer can act on without knowing the backend.
MetadataRecord
Which kind of record a narrow metadata write names.
ProjectFilter
Which project a task must belong to.
SourceError
Why a source could not answer.
StatusCategory
The normalised status vocabulary shared across every source.
Support
Whether a source applies one predicate itself.
TextFields
Which fields a TextQuery searches.
WriteSupport
Whether a source can be written through at all.

Constants§

SOURCE_NAME_PATTERN
The pattern every SourceName matches.

Traits§

SecretResolver
How a plugin reads the credential its configuration names.
SourcePlugin
The factory that turns one configuration block into a live TaskSource.
TaskSource
One configured source, as the engine drives it.

Functions§

commentless
The refusal a source with no comments answers a comment call with.
documentless
The refusal a source with no documents answers a document read with.
unwritable
The refusal a source with no write side answers a write with.
unwritable_field
The refusal a source answers a narrow write of one field of a task with, when it cannot write that field on its own.
unwritable_metadata
The refusal a source answers a narrow metadata write with when it cannot make one on its own.