Skip to main content

Module agent_temp

Module agent_temp 

Source
Expand description

Managed workspace-local temporary artifacts for model-driven helpers.

Initialize advertises one stable directory per Winx session under <workspace>/.winx/tmp/. The directory is intentionally not created until a file tool actually needs it, so merely inspecting a repository does not dirty its working tree. File tools enforce a small path and storage budget; Bash remains governed by its own operator-selected command policy.

Structs§

AgentTempInfo
Policy information returned by Initialize and reused by file-tool errors.
DerivedCodeMapPermit
Counters returned with an accepted derived-helper map.
DerivedCodeMapUsage
In-memory budget for syntax navigation over non-canonical helpers.
TempEdit
A resolved edit and its size change, used to validate a MultiFileEdit against the workspace-wide quota before any file is committed.
TemporaryArtifactUsage
Bounded filesystem audit attached to Bash results. It contains counts and sizes only, never helper contents.

Constants§

ACTIVE_SESSION_PRUNE_TARGET_BYTES
Stop byte reclamation once the session has comfortable headroom.
ACTIVE_SESSION_PRUNE_TARGET_FILES
Stop file-count reclamation once the session has comfortable headroom.
ACTIVE_SESSION_PRUNE_TRIGGER_BYTES
Start reclaiming old active-session helpers before the hard byte cap.
ACTIVE_SESSION_PRUNE_TRIGGER_FILES
Start reclaiming old active-session helpers before the hard file cap.
MAX_AGE
Session directories with no filesystem activity for this long are pruned when another session initializes in the same workspace.
MAX_COMPONENT_BYTES
Prevent payloads from being smuggled into a filename or directory component.
MAX_DERIVED_CODE_MAP_CALLS
Bound aggregate helper-map churn while leaving canonical CodeMap unlimited.
MAX_DERIVED_CODE_MAP_PAYLOAD_BYTES
Derived syntax maps are intentionally much smaller than canonical maps.
MAX_DERIVED_CODE_MAP_UNIQUE_FILES
A session should reuse a small working set instead of minting new carriers.
MAX_FILE_BYTES
One helper should remain small enough to inspect and remove cheaply.
MAX_RELATIVE_COMPONENTS
Depth beneath the session directory, including the target filename.
MAX_RELATIVE_PATH_BYTES
Bound the whole session-relative path independently of component count.
MAX_SESSION_BYTES
One active conversation cannot consume the whole workspace-wide budget.
MAX_SESSION_FILES
Hundreds of one-shot carriers are almost always an orchestration failure.
MAX_TOTAL_BYTES
Workspace-wide budget shared by all managed temporary sessions.

Functions§

audit_session
Measure the active managed session after a Bash action. This closes the gap left by dynamic loops, scripts, and generated filenames that static command inspection cannot project before the shell runs.
maintain_and_audit_session
Reclaim stale active-session helpers at the configured high-water mark, then return the same bounded audit used after Bash execution.
prepare_session
Return the session policy and best-effort prune expired sibling sessions and stale active-session helpers when the active session crosses a high-water mark. The active directory is not created here; FileWriteOrEdit creates it on demand through its normal parent-directory path.
reserve_derived_code_map
Reserve one syntax-navigation call over an active non-canonical helper.
session_info
Compute the stable session directory without touching the filesystem.
validate_bash_command
Reject statically visible shell writes that bypass the managed session area.
validate_batch_quota
Validate the aggregate size of a MultiFileEdit after every target has been planned and duplicate paths have been rejected.
validate_code_map_target
Enforce the session boundary for an explicit CodeMap path.
validate_edit_target
Validate one FileWriteOrEdit target. Non-temporary project files keep their existing behavior; only legacy Winx root artifacts and .winx/tmp receive this additional governance.