Skip to content

@paraharness/fs ​

Variables ​

VariableDescription
fsFrozen @paraharness/fs builder namespace (fs.*).
fsExecutorsDefault frozen RuntimeExecutorRegistrySlice instance for @paraharness/fs.

Functions ​

FunctionDescription
collectFsTelemetryCollects deduplicated filesRead and filesMutated arrays from observedEffects (fs:telemetry).
createFsAllowOnlyGuardBuilderCompiles a passive FsAllowOnlyGuardNode (fs:allow-only) for fs.allowOnly(globs).
createFsAllowWriteGlobsLeaseDeltaCreates a serializable LeaseDelta unlocking writes to globs (fs.allowWriteGlobs(globs)).
createFsBoundaryGuardBuilderCompiles a passive FsBoundaryGuardNode (fs:boundary-guard) for fs.boundaryGuard(partitionMap).
createFsCodingToolsCompiles the 5-tool workspace-jailed coding bundle (fs.codingTools(runner?)).
createFsEditToolDriverCreates the workspace-jailed ToolDriver for FsEditToolNode (fs:edit / edit_file).
createFsExecutorsCreates a fresh RuntimeExecutorRegistrySlice registering all @paraharness/fs runtime executors and drivers.
createFsGlobMatcherBuilderCompiles a passive FsGlobMatcherNode (fs:match-globs) for fs.matchGlobs(globs, mode).
createFsGlobSourceBuilderCompiles a passive FsGlobSourceNode (fs:glob-source) for fs.glob(globPattern).
createFsGlobToolDriverCreates the workspace-jailed ToolDriver for FsGlobToolNode (fs:glob / glob_files).
createFsGrepToolDriverCreates the workspace-jailed ToolDriver for FsGrepToolNode (fs:grep / grep_files).
createFsInPartitionPredicateBuilds a ScopePredicate matching a specific partition in partitionMap (fs.inPartition).
createFsJsonlLessonStoreBuilderCompiles a passive FsJsonlLessonStoreNode (fs:jsonl-lesson-store) for fs.jsonlLessonStore(options?).
createFsMaxFilesMutatedBuilderCompiles a passive FsQuotaTripwireNode (fs:quota-tripwire) for fs.maxFilesMutated(count).
createFsPartitionMapCompiles a passive FsPartitionMapNode (fs:partition-map) for fs.partitionMap(topology, mapping).
createFsProtectGuardBuilderCompiles a passive FsProtectGuardNode (fs:protect) for fs.protect(globs).
createFsReadOnlyGuardBuilderCompiles a passive FsReadOnlyGuardNode (fs:read-only) for fs.readOnly().
createFsReadOnlyToolsCompiles the 3-tool workspace-jailed read-only bundle (fs.readOnlyTools(runner?)).
createFsReadToolDriverCreates the workspace-jailed ToolDriver for FsReadToolNode (fs:read / read_file).
createFsRegexCheckBuilderCompiles a passive FsRegexCheckNode (fs:regex-check) for fs.regexCheck(id, options).
createFsRequireReadBeforeWriteGuardBuilderCompiles a passive FsRequireReadBeforeWriteGuardNode (fs:require-read-before-write) for fs.requireReadBeforeWrite().
createFsScopedWriteGuardBuilderCompiles a passive FsScopedWriteGuardNode (fs:scoped-write) for fs.scopedWrite(partitionMap).
createFsSecretLiteralsGuardBuilderCompiles a passive FsSecretLiteralsGuardNode (fs:secret-literals) for fs.secretLiterals(patterns).
createFsTelemetryBuilderCompiles a passive FsTelemetryCollectorNode (fs:telemetry) for fs.telemetry().
createFsTextSourceBuilderCompiles a passive FsTextSourceNode (fs:text-source) for fs.text(filePath).
createFsWriteGuardBuilderCompiles a passive FsWriteGuardNode (fs:write-guard) for fs.writeGuard(options).
createFsWriteToolDriverCreates the workspace-jailed ToolDriver for FsWriteToolNode (fs:write / write_file).
evaluateFsAllowOnlyGuardEvaluates an FsAllowOnlyGuardNode (fs:allow-only) against proposed tool effects (SPEC.md §4.3).
evaluateFsBoundaryGuardEvaluates an FsBoundaryGuardNode (fs:boundary-guard) against proposed tool effects (SPEC.md §4.3).
evaluateFsGlobEffectMatcherEvaluates an FsGlobMatcherNode (fs:match-globs) against a ToolEffect (SPEC.md §3.5 & §4.3).
evaluateFsProtectGuardEvaluates an FsProtectGuardNode (fs:protect) against proposed tool effects (SPEC.md §4.3).
evaluateFsQuotaTripwireEvaluates an FsQuotaTripwireNode (fs:quota-tripwire) after tool execution (SPEC.md §4.3).
evaluateFsReadOnlyGuardEvaluates an FsReadOnlyGuardNode (fs:read-only) against proposed tool effects (SPEC.md §4.3).
evaluateFsRequireReadBeforeWriteGuardEvaluates an FsRequireReadBeforeWriteGuardNode (fs:require-read-before-write) (SPEC.md §4.3).
evaluateFsScopedWriteGuardEvaluates an FsScopedWriteGuardNode (fs:scoped-write) against ctx.activePartitions (SPEC.md §4.3).
evaluateFsSecretLiteralsGuardEvaluates an FsSecretLiteralsGuardNode (fs:secret-literals) against proposedContent (SPEC.md §4.3).
evaluateFsWriteGuardEvaluates an FsWriteGuardNode (fs:write-guard) against proposed tool effects (SPEC.md §3.5 & §4.3).
executeFsGlobSourceLoads all UTF-8 files matching node.pattern in lexicographical order for an FsGlobSourceNode (fs:glob-source).
executeFsRegexCheckEvaluates an FsRegexCheckNode (fs:regex-check) strictly over mutated files matching targetGlobs (SPEC.md §4.3).
executeFsTextSourceLoads UTF-8 text and computes a SHA-256 hex digest for an FsTextSourceNode (fs:text-source).
extractFsViolatedPathsExtracts deduplicated filesystem paths in first-seen order from a PolicyViolation (fs.violatedPaths(violation)).

Classes ​

ClassDescription
FsJsonlLessonStoreCrash-safe hybrid filesystem LessonStore implementation (fs.jsonlLessonStore, SPEC.md §4.3).

Interfaces ​

InterfaceDescription
FsAdmitLessonParamsAdmission parameters for FsJsonlLessonStore.admit.
FsAllowOnlyGuardNodePassive AST node restricting filesystem writes strictly to an allowlist of globs (fs.allowOnly).
FsBoundaryGuardNodePassive AST node blocking unapproved writes to partition boundaryGlobs (fs.boundaryGuard).
FsEditToolNodePassive AST node for the workspace-jailed file editing tool (fs:edit).
FsGlobMatcherNodePassive AST node matching FsToolEffect paths against POSIX glob patterns (fs.matchGlobs).
FsGlobSourceNodePassive AST node loading multiple UTF-8 text files matching a glob pattern (fs.glob).
FsGlobToolNodePassive AST node for the workspace-jailed file globbing tool (fs:glob).
FsGrepToolNodePassive AST node for the workspace-jailed content search tool (fs:grep).
FsJsonlLessonStoreNodePassive AST node configuring a host-root content-addressed JSON/JSONL lesson store (fs.jsonlLessonStore).
FsJsonlLessonStoreOptionsConfiguration options for fs.jsonlLessonStore(options?).
FsNamespaceDeclarative builder namespace (fs.*) for @paraharness/fs sources, partition maps, guards, tools, and stores.
FsPartitionMapNodePassive AST node mapping logical TopologyNode partitions to physical filesystem globs (fs.partitionMap).
FsPartitionPathMappingMember implementation globs and public boundary surface globs mapped to a single topology partition.
FsProtectGuardNodePassive AST node protecting specific glob patterns from write mutations (fs.protect).
FsQueryCandidatesParamsQuery parameters for FsJsonlLessonStore.queryCandidates.
FsQuotaTripwireNodePassive AST node tripping when distinct mutated file paths in a session exceed maxFilesMutated (fs.maxFilesMutated).
FsReadOnlyGuardNodePassive AST node denying all filesystem write operations (fs.readOnly).
FsReadToolNodePassive AST node for the workspace-jailed file reading tool (fs:read).
FsRecordOutcomeParamsSingle lesson outcome entry for FsJsonlLessonStore.recordOutcomes.
FsRegexCheckNodePassive AST node evaluating a forbidden regex pattern across mutated files matching targetGlobs (fs.regexCheck).
FsRegexCheckOptionsConfiguration options for fs.regexCheck(id, options).
FsRequireReadBeforeWriteGuardNodePassive AST node requiring an existing file to be read in the session before it is edited or overwritten (fs.requireReadBeforeWrite).
FsScopedWriteGuardNodePassive AST node restricting writes to the actor's active partitions (fs.scopedWrite).
FsSecretLiteralsGuardNodePassive AST node scanning proposed file writes for hardcoded secret literals (fs.secretLiterals).
FsTelemetryCollectorNodePassive AST node collecting distinct read and mutated file paths from FsToolEffect records (fs.telemetry).
FsTextSourceNodePassive AST node loading UTF-8 text from a single file path (fs.text).
FsToolEffectDomain-specific ToolEffect emitted by @paraharness/fs tools and workspace diffs (SPEC.md §4.3).
FsToolEffectAttributesStructured filesystem attributes attached to an FsToolEffect descriptor.
FsWriteGuardNodePassive AST node enforcing glob-based write allow/deny rules (fs.writeGuard).
FsWriteGuardOptionsConfiguration options for fs.writeGuard(options).
FsWriteToolNodePassive AST node for the workspace-jailed file writing tool (fs:write).

References ​

violatedPaths ​

Renames and re-exports extractFsViolatedPaths

Released under the MIT License.