Skip to main content

Module coding

Module coding 

Source
Expand description

Coding-workload primitives for governed agents.

This module is an SDK layer for applications that build coding agents on top of the harness runtime. It provides root-relative workspace paths, local workspace operations, typed effect payloads, command execution, git inspection, repository search, project instruction resolution, and context gathering. It is not a CLI product, and it does not bypass the harness: production file, patch, command, git, or search side effects should be represented as EffectRequest values and executed through a Harness.

Structs§

AgentChangeTracker
Tracks files changed by the agent layer.
ApplyPatchPayload
Typed payload for applying a structured patch.
ApplyPatchTool
Model-visible adapter that requests a governed structured patch.
CliGitInspector
Git inspector implemented by invoking read-only git commands.
CodingContextBundle
Context bundle returned by a CodingContextProvider.
CodingContextInclude
Flags controlling which context sources are gathered.
CodingContextRequest
Coding context request.
CodingEffectExecutor
Effect executor that routes typed coding payloads to coding primitives.
CodingExecutorConfig
Configuration for CodingEffectExecutor.
CodingPolicyEngine
Conservative coding policy wrapper around a host policy engine.
CodingPolicyInput
Typed input produced for coding policy evaluation.
CommandExecutorCapabilities
Executor capability report.
CommandExecutorIdentity
Executor identity included in capability and execution reports.
CommandOutput
Command output.
CommandOutputLimit
Per-stream output limit.
CommandPattern
Prefix pattern used by CommandTaxonomy allowlists.
CommandPayload
Typed payload for command execution.
CommandRequest
Command execution request.
CommandTaxonomy
Command taxonomy and host-provided allowlists for coding policy.
CommandTestRunner
Test runner backed by a CommandExecutor.
ContentDigest
Stable content digest used in file version preconditions.
ContextBudget
Context budget for repository context gathering.
DefaultCodingContextProvider
Baseline context provider that combines workspace, search, git, and instruction primitives.
DefaultInstructionResolver
Default resolver that searches for AGENTS.md-style files from root to target parent directories.
DependencyMetadata
Dependency manifest metadata discovered by context gathering.
DiffRequest
Request to diff two snapshots.
FileContent
File content returned by a workspace read.
FilePatch
Patch for one file.
FileReadOptions
Options for workspace file reads.
FileVersion
File version used to detect stale writes and patch conflicts.
FileWriteResult
Result of a successful workspace write.
GitChangedFile
Changed git file.
GitChangedFilesRequest
Changed-files request.
GitDiffRequest
Git diff request.
GitHead
Current git head.
GitPayload
Typed payload for read-only git inspection.
GitStatus
Parsed git status.
GitStatusRequest
Git status request.
GitStatusTool
Model-visible adapter that requests read-only git status.
InstructionBundle
Resolved project instructions.
InstructionFile
One resolved instruction file.
InstructionFileSpec
Instruction file candidate.
InstructionRequest
Instruction resolution request.
ListFilesPayload
Typed payload for listing workspace files.
ListFilesQuery
Query for deterministic workspace listing.
ListFilesTool
Model-visible adapter that requests a governed workspace listing.
LocalCommandExecutor
Local non-PTY, one-shot command executor backed by host process spawning.
LocalWorkspace
Local filesystem implementation of Workspace.
LocalWorkspaceConfig
Local filesystem workspace configuration.
OutputText
Text output with truncation metadata.
Patch
Structured patch containing one or more file patches.
PatchConflict
Patch conflict with model-safe details.
PatchHunk
Text hunk used by the local workspace patch applier.
PatchRequest
Request to apply or dry-run a patch.
PatchResult
Result from applying or dry-running a patch.
PolicyEnforcementReport
Report describing which policies were enforced by the command executor.
ReadFilePayload
Typed payload for reading a workspace file.
ReadFileTool
Model-visible adapter that requests a governed workspace file read.
RepoSearchRequest
Repository search request.
RepoSearchResults
Repository search results.
ResolvedPath
Resolved workspace path with canonicalization metadata.
RipgrepSearcher
Repository searcher that invokes rg through a CommandExecutor.
RunCommandTool
Model-visible adapter that requests governed command execution.
SearchMatch
One repository search match.
SearchPayload
Typed payload for repository search.
SearchRepoTool
Model-visible adapter that requests governed repository search.
SnapshotRequest
Request for a lightweight workspace snapshot.
TestRunRequest
Test run request.
VerificationResult
Structured verification result.
WorkspaceDiff
Workspace diff summary.
WorkspaceEntry
Workspace entry returned by listing.
WorkspacePath
A root-relative path validated for workspace operations.
WorkspaceRoot
Canonical root directory that bounds workspace filesystem access.
WorkspaceSearcher
In-process fallback searcher based on Workspace reads.
WorkspaceSnapshot
Lightweight snapshot of file versions.
WriteFilePayload
Typed payload for writing a workspace file.
WriteFileRequest
Request to write a workspace file.

Enums§

CodingContextError
Coding context errors.
CodingError
Errors returned by typed coding payload adapters and executor routing.
CodingPolicyClass
Coding-specific operation class used by conservative policy presets.
CommandError
Command execution errors.
CommandExecutorBackend
Command executor backend family.
CommandStatus
Terminal command status.
EnvPolicy
Environment variable handling for command execution.
FileBody
File body with text and binary separated explicitly.
FileWriteContent
Content to write into a workspace file.
GitError
Git inspection errors.
GitOperation
Read-only git operation for typed git effects.
InstructionError
Instruction resolver errors.
PatchOperation
File patch operation.
PolicyCapabilityMode
How strictly policy/capability mismatches are handled.
PolicyEnforcementStatus
Structured enforcement status for a policy dimension.
PtyMode
PTY mode requested for a command.
ResolvedPathKind
Filesystem kind observed when resolving a workspace path.
SearchError
Search errors.
SearchMode
Repository search mode.
SymlinkPolicy
Symlink behavior for local workspace operations.
TestRunError
Test run errors.
TextEncoding
Encoding of text file content.
WorkspaceAccess
Requested workspace access mode.
WorkspaceError
Workspace operation errors.

Traits§

CodingContextProvider
Provides repository context outside chat memory.
CommandExecutor
Executes approved command requests.
GitInspector
Read-only git inspector.
InstructionResolver
Resolves project instruction files.
RepoSearcher
Search implementation for repositories.
TestRunner
Convenience adapter for test commands.
Workspace
Workspace abstraction for coding workloads.

Functions§

validate_command_capabilities
Validates that executor capabilities can satisfy a command policy before execution starts.
validate_policy_enforcement_report
Validates that an executor’s post-run report matches requested policy and declared capabilities.