Documentation
¶
Index ¶
- Constants
- func BuildNextTaskSignals(parsedTasks []*tasks.Task) map[string]interface{}
- func BuildSubtaskSpecs(inputs []TaskSubtaskInput) []tasks.SubtaskSpec
- func BuildTaskAuthorityPayload(taskManager *tasks.TaskManager) (map[string]interface{}, error)
- func BuildToolList() []map[string]interface{}
- func ToolMetadata(name string, base map[string]interface{})
- func ValidateArtifactPath(workspaceRoot, relPath string) (string, error)
- type ArtifactEntry
- type ArtifactReadResult
- type ArtifactResult
- type IntentGate
- type TaskSubtaskInput
- type ToolInputSchema
- type ToolSpec
Constants ¶
const ( // Exposed aliases for enforcement reporting. EnforcementCodeModeCompliance = enforcementCodeModeCompliance EnforcementCodeModeTooLow = enforcementCodeModeTooLow EnforcementCodeModeNotSet = enforcementCodeModeNotSet EnforcementCodeStrictRequired = enforcementCodeStrictRequired EnforcementCodeFactEvidence = enforcementCodeFactEvidence EnforcementCodeClaimViolation = enforcementCodeClaimViolation EnforcementCodeModeUpdated = enforcementCodeModeUpdated EnforcementCodeRecallRequired = enforcementCodeRecallRequired EnforcementCodeArtifactPathEscape = enforcementCodeArtifactPathEscape )
Variables ¶
This section is empty.
Functions ¶
func BuildNextTaskSignals ¶
BuildNextTaskSignals derives observational metadata for the next unfinished task.
func BuildSubtaskSpecs ¶
func BuildSubtaskSpecs(inputs []TaskSubtaskInput) []tasks.SubtaskSpec
BuildSubtaskSpecs converts inputs into TaskManager subtask specs.
func BuildTaskAuthorityPayload ¶
func BuildTaskAuthorityPayload(taskManager *tasks.TaskManager) (map[string]interface{}, error)
BuildTaskAuthorityPayload produces the response body for memory_check_task_authority.
func BuildToolList ¶
func BuildToolList() []map[string]interface{}
BuildToolList renders the tool specifications with metadata for JSON responses.
func ToolMetadata ¶
ToolMetadata augments a tool map with intent metadata.
func ValidateArtifactPath ¶ added in v0.8.1
ValidateArtifactPath resolves and constrains a relative path to the workspace root. It rejects absolute paths, directory-traversal sequences, and any resolved path that falls outside the workspace. The returned string is the fully-resolved absolute path that is safe to write.
Types ¶
type ArtifactEntry ¶ added in v0.8.1
ArtifactEntry describes a single file discovered during a workspace listing.
func ListArtifacts ¶ added in v0.8.1
func ListArtifacts(workspaceRoot, pattern string) ([]ArtifactEntry, error)
ListArtifacts walks the workspace and returns visible files, optionally filtered by a glob pattern. Internal directories (.tinyMem, .git, node_modules) and the root-level tinyTasks.md are always excluded.
type ArtifactReadResult ¶ added in v0.8.1
type ArtifactReadResult struct {
Path string `json:"path"`
Content string `json:"content"`
Size int64 `json:"size"`
SHA256 string `json:"sha256"`
}
ArtifactReadResult is the payload returned by a successful artifact read.
func ReadArtifact ¶ added in v0.8.1
func ReadArtifact(workspaceRoot, relPath string) (ArtifactReadResult, error)
ReadArtifact reads a workspace artifact after path validation. It enforces a size ceiling and explicitly blocks TaskManager-owned files.
type ArtifactResult ¶ added in v0.8.1
type ArtifactResult struct {
Path string `json:"path"`
BytesWritten int `json:"bytes_written"`
Created bool `json:"created"`
SHA256 string `json:"sha256"`
LinkTaskID string `json:"link_task_id,omitempty"`
}
ArtifactResult is the confirmation payload returned to the caller after a successful write.
func WriteArtifact ¶ added in v0.8.1
func WriteArtifact(workspaceRoot, relPath, content string, overwrite bool, linkTaskID string) (ArtifactResult, error)
WriteArtifact performs the server-owned file write after path validation. The write is atomic: content is written to a temporary file in the target directory and then renamed into place so a crash mid-write cannot leave a partial file. Failure is explicit and fail-closed.
type IntentGate ¶
type IntentGate struct {
// contains filtered or unexported fields
}
IntentGate centralizes mode, recall, and intention checks for both MCP and Proxy transports so there is a single enforcement boundary.
func NewIntentGate ¶
func NewIntentGate(modeCtrl *execution.Controller, enforcer *enforcement.Recorder, logger *zap.Logger) *IntentGate
NewIntentGate constructs a gate that enforces the provided controller and recorder.
func (*IntentGate) EnforceMode ¶
EnforceMode applies an explicit minimum mode check without re-running intent lookup.
func (*IntentGate) EnsureIntent ¶
func (g *IntentGate) EnsureIntent(tool string, action execution.Action) (intent.Definition, error)
EnsureIntent validates the given tool/action pair against the declarative registry.
func (*IntentGate) RecordRecall ¶
func (g *IntentGate) RecordRecall()
RecordRecall marks that a recall tool was invoked.
type TaskSubtaskInput ¶
TaskSubtaskInput mirrors the JSON payload used by MCP task tools.
type ToolInputSchema ¶
type ToolInputSchema map[string]interface{}
ToolInputSchema describes the input schema for a tool.