@arnilo/prism-coding-agent 0.2.6 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/coding-checkpoint.d.ts +3 -0
- package/dist/coding-checkpoint.js +12 -0
- package/dist/delete.js +1 -0
- package/dist/edit.d.ts +2 -0
- package/dist/edit.js +3 -1
- package/dist/effects.js +1 -1
- package/dist/forge/index.d.ts +1 -1
- package/dist/forge/index.js +1 -1
- package/dist/git-aware-repository.js +1 -1
- package/dist/git-tools.d.ts +1 -1
- package/dist/git-tools.js +1 -1
- package/dist/glob.js +1 -0
- package/dist/index.d.ts +26 -29
- package/dist/index.js +16 -18
- package/dist/language/index.d.ts +1 -1
- package/dist/language/index.js +1 -1
- package/dist/lifecycle.d.ts +17 -1
- package/dist/lifecycle.js +2 -0
- package/dist/list.js +1 -0
- package/dist/move.js +2 -1
- package/dist/process/index.d.ts +4 -5
- package/dist/process/index.js +6 -2
- package/dist/process/recovery.d.ts +1 -1
- package/dist/process/sessions.d.ts +3 -0
- package/dist/process/sessions.js +3 -4
- package/dist/read.js +1 -0
- package/dist/repository/glob.d.ts +2 -0
- package/dist/repository/glob.js +3 -3
- package/dist/repository/list.d.ts +2 -0
- package/dist/repository/list.js +2 -2
- package/dist/repository/operations.js +4 -2
- package/dist/repository/path.d.ts +2 -0
- package/dist/repository/path.js +2 -2
- package/dist/repository/search.d.ts +2 -0
- package/dist/repository/search.js +2 -2
- package/dist/repository/walk.js +2 -2
- package/dist/repository.d.ts +6 -6
- package/dist/repository.js +6 -6
- package/dist/search.js +1 -0
- package/dist/shell.js +1 -0
- package/dist/workspace-lifecycle.d.ts +16 -0
- package/dist/workspace-lifecycle.js +2 -2
- package/dist/write.js +1 -0
- package/package.json +3 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { JsonObject } from "@arnilo/prism";
|
|
2
|
+
import type { CodingLifecycleEvent } from "./lifecycle.js";
|
|
2
3
|
export declare const CODING_CHECKPOINT_SCHEMA_VERSION: 1;
|
|
3
4
|
/** Workflow shared-state key that holds coding checkpoint metadata. */
|
|
4
5
|
export declare const CODING_STATE_KEY = "coding";
|
|
@@ -108,6 +109,8 @@ export declare function writeCodingPlanFile(input: {
|
|
|
108
109
|
readonly planPath: string;
|
|
109
110
|
readonly markdown: string;
|
|
110
111
|
readonly limits?: CodingCheckpointLimitOptions;
|
|
112
|
+
/** F5: advisory plan event (telemetry — never throws into the write path). */
|
|
113
|
+
readonly onEvent?: (event: CodingLifecycleEvent) => void;
|
|
111
114
|
}): Promise<CodingArtifactRef>;
|
|
112
115
|
export declare function readCodingPlanFile(input: {
|
|
113
116
|
readonly workspaceRoot: string;
|
|
@@ -147,6 +147,18 @@ export async function writeCodingPlanFile(input) {
|
|
|
147
147
|
await mkdir(dirname(absolute), { recursive: true });
|
|
148
148
|
const bytes = Buffer.from(input.markdown, "utf8");
|
|
149
149
|
await writeFile(absolute, bytes, { mode: 0o600 });
|
|
150
|
+
if (input.onEvent) {
|
|
151
|
+
try {
|
|
152
|
+
input.onEvent({
|
|
153
|
+
type: "plan_changed",
|
|
154
|
+
planPath: input.planPath,
|
|
155
|
+
todos: parseCodingPlanTodos(input.markdown, limits),
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
// Telemetry must never fail a successful plan write.
|
|
160
|
+
}
|
|
161
|
+
}
|
|
150
162
|
return createCodingArtifactRef({
|
|
151
163
|
kind: "plan",
|
|
152
164
|
uri: `file://${absolute}`,
|
package/dist/delete.js
CHANGED
|
@@ -34,6 +34,7 @@ export function createDeleteTool(cwd, options) {
|
|
|
34
34
|
const ops = options?.operations ?? defaultDeleteOperations;
|
|
35
35
|
return {
|
|
36
36
|
name: "delete",
|
|
37
|
+
kind: "delete",
|
|
37
38
|
effect: CODING_LOCAL_EFFECT,
|
|
38
39
|
description: "High-risk: permanently delete a single file or empty directory in the workspace. Non-empty directories are rejected unless recursive: true (opt-in per call; recursive refuses symlinked-directory traversal and enforces a per-call fan-out cap, default 10,000 entries). No trash/recycle — host undo is not automatic. Prefer edit/write when content can be fixed in place.",
|
|
39
40
|
parameters: {
|
package/dist/edit.d.ts
CHANGED
|
@@ -29,6 +29,8 @@ export interface Edit {
|
|
|
29
29
|
}
|
|
30
30
|
/** Display/result details mirrored from pi's `EditToolDetails`, surfaced via `ToolResult.metadata`. */
|
|
31
31
|
export interface EditToolDetails {
|
|
32
|
+
/** Absolute path written (F7 projection + host navigation). */
|
|
33
|
+
path: string;
|
|
32
34
|
/** Display-oriented diff of the changes made. */
|
|
33
35
|
diff: string;
|
|
34
36
|
/** Standard unified patch of the changes made. */
|
package/dist/edit.js
CHANGED
|
@@ -23,9 +23,9 @@ import { Buffer } from "node:buffer";
|
|
|
23
23
|
import { constants } from "node:fs";
|
|
24
24
|
import { access as fsAccess, stat as fsStat } from "node:fs/promises";
|
|
25
25
|
import { atomicWriteUtf8File } from "./atomic-write.js";
|
|
26
|
-
import { CODING_LOCAL_EFFECT } from "./effects.js";
|
|
27
26
|
import { readFileBounded } from "./bounded-file.js";
|
|
28
27
|
import { applyEditsToNormalizedContent, detectLineEnding, generateDiffString, generateUnifiedPatch, normalizeToLF, restoreLineEndings, stripBom, } from "./edit-diff.js";
|
|
28
|
+
import { CODING_LOCAL_EFFECT } from "./effects.js";
|
|
29
29
|
import { enforceExecutionPolicy } from "./execution-policy.js";
|
|
30
30
|
import { withFileMutationQueue } from "./file-mutation-queue.js";
|
|
31
31
|
import { DEFAULT_MAX_EDIT_FILE_BYTES, DEFAULT_MAX_EDIT_INPUT_BYTES, DEFAULT_MAX_EDITS, HARD_MAX_EDIT_FILE_BYTES, HARD_MAX_EDIT_INPUT_BYTES, HARD_MAX_EDITS, validateCodingLimit, } from "./limits.js";
|
|
@@ -96,6 +96,7 @@ export function createEditTool(cwd, options) {
|
|
|
96
96
|
const maxEdits = validateCodingLimit("maxEdits", options?.maxEdits ?? DEFAULT_MAX_EDITS, HARD_MAX_EDITS);
|
|
97
97
|
return {
|
|
98
98
|
name: "edit",
|
|
99
|
+
kind: "edit",
|
|
99
100
|
effect: CODING_LOCAL_EFFECT,
|
|
100
101
|
description: "Edit a single file using exact-then-fuzzy text replacement. Every edits[].oldText must match a unique, non-overlapping region of the original file. Exact match is tried first; if it fails, fuzzy match (unicode normalize + whitespace collapse) may still succeed silently — prefer exact oldText to avoid wrong-region edits. Duplicate/ambiguous matches fail closed and leave the file unchanged. If two changes affect the same block or nearby lines, merge them into one edit. Do not include large unchanged regions just to connect distant changes. When the host enabled requireReadBeforeWrite, read the path first or pass force=true.",
|
|
101
102
|
parameters: {
|
|
@@ -211,6 +212,7 @@ export function createEditTool(cwd, options) {
|
|
|
211
212
|
name: "edit",
|
|
212
213
|
content: [{ type: "text", text: `Successfully replaced ${edits.length} block(s) in ${prepared.path}.` }],
|
|
213
214
|
metadata: {
|
|
215
|
+
path: allowedPath,
|
|
214
216
|
diff: diffResult.diff,
|
|
215
217
|
patch,
|
|
216
218
|
firstChangedLine: diffResult.firstChangedLine,
|
package/dist/effects.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { readFile, stat } from "node:fs/promises";
|
|
2
1
|
import { Buffer } from "node:buffer";
|
|
2
|
+
import { readFile, stat } from "node:fs/promises";
|
|
3
3
|
import { HARD_MAX_WRITE_BYTES } from "./limits.js";
|
|
4
4
|
import { resolveContainedMutationPath } from "./mutation-path.js";
|
|
5
5
|
export const CODING_OBSERVATION_EFFECT = { kind: "none", idempotency: "none" };
|
package/dist/forge/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
+
export { createGitHubForge } from "./github.js";
|
|
1
2
|
export type { CreateGitHubForgeOptions, ForgeCheck, ForgeCredential, ForgeCredentialResolver, ForgeCredentialResolverSource, ForgeErrorCode, ForgeHandoffReport, ForgeIssueContext, ForgeLimits, ForgeOperations, ForgePullRequest, ResolvedForgeLimits, } from "./types.js";
|
|
2
3
|
export { ForgeError, resolveForgeLimits } from "./types.js";
|
|
3
|
-
export { createGitHubForge } from "./github.js";
|
package/dist/forge/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { lstat } from "node:fs/promises";
|
|
9
9
|
import { join, resolve } from "node:path";
|
|
10
|
-
import { createBoundGitRunner,
|
|
10
|
+
import { createBoundGitRunner, GitError, gitText } from "./git-exec.js";
|
|
11
11
|
import { DEFAULT_MAX_LS_FILES_OUTPUT_BYTES, HARD_MAX_LS_FILES_OUTPUT_BYTES, validateCodingLimit } from "./limits.js";
|
|
12
12
|
import { createLocalRepositoryOperations, RepositoryError, toRepoRelative, } from "./repository.js";
|
|
13
13
|
function isBoundGitRunner(value) {
|
package/dist/git-tools.d.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { ExecutionPolicy, ToolDefinition } from "@arnilo/prism";
|
|
8
8
|
import { type CodingCheckToolOptions, type NamedCheckDefinition } from "./checks.js";
|
|
9
|
-
import type { CodingLifecycleEvent } from "./lifecycle.js";
|
|
10
9
|
import { type ArtifactWriter, type CreateGitOperationsOptions, type GitOperations } from "./git.js";
|
|
10
|
+
import type { CodingLifecycleEvent } from "./lifecycle.js";
|
|
11
11
|
export interface GitToolsOptions {
|
|
12
12
|
readonly executionPolicy?: ExecutionPolicy;
|
|
13
13
|
readonly gitPath?: string;
|
package/dist/git-tools.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createCodingCheckTool } from "./checks.js";
|
|
2
|
-
import {
|
|
2
|
+
import { CODING_LOCAL_EFFECT, CODING_OBSERVATION_EFFECT, CODING_UNSUPPORTED_EFFECT, classifyGitApplyEffect, classifyGitBranchEffect, classifyGitWorktreeEffect, } from "./effects.js";
|
|
3
3
|
import { enforceExecutionPolicy } from "./execution-policy.js";
|
|
4
4
|
import { createGitOperations, GitError, } from "./git.js";
|
|
5
5
|
function errorResult(toolName, toolCallId, message) {
|
package/dist/glob.js
CHANGED
|
@@ -31,6 +31,7 @@ export function createGlobTool(cwd, options) {
|
|
|
31
31
|
const ops = options?.operations ?? createLocalRepositoryOperations(limits);
|
|
32
32
|
return {
|
|
33
33
|
name: "glob",
|
|
34
|
+
kind: "search",
|
|
34
35
|
effect: CODING_OBSERVATION_EFFECT,
|
|
35
36
|
description: `Find workspace files by glob pattern without shell find. Supports * (segment), ? (one char), and ** (directories). Brace expansion is rejected unless braceExpansion: true (bounded: max 128 alternatives / 4096 expanded bytes; unbalanced or nested braces are errors). Skips hidden names and excluded basenames (default: ${limits.exclude.join(", ")}) unless overridden. Does not follow symlinks. Results paginate with offset/maxResults (default ${limits.maxResults}). Depth default ${limits.maxDepth}. Prefer repo_list to enumerate directories and repo_search to find text inside files.`,
|
|
36
37
|
parameters: {
|
package/dist/index.d.ts
CHANGED
|
@@ -3,61 +3,58 @@ export type { AskUserDecisionAnswer, AskUserDecisionHandler, AskUserDecisionOpti
|
|
|
3
3
|
export { ASK_USER_DECISION_RATIONALE_COUNT, ASK_USER_DECISION_SUSPEND_REASON, ASK_USER_DECISION_TOOL_NAME, askUserDecisionResumeSchema, createAskUserDecisionResumeValidator, createAskUserDecisionTool, DEFAULT_MAX_ASK_USER_DECISION_BULLET_BYTES, DEFAULT_MAX_ASK_USER_DECISION_CUSTOM_BYTES, DEFAULT_MAX_ASK_USER_DECISION_LABEL_BYTES, DEFAULT_MAX_ASK_USER_DECISION_OPTIONS, DEFAULT_MAX_ASK_USER_DECISION_QUESTION_BYTES, HARD_MAX_ASK_USER_DECISION_BULLET_BYTES, HARD_MAX_ASK_USER_DECISION_CUSTOM_BYTES, HARD_MAX_ASK_USER_DECISION_LABEL_BYTES, HARD_MAX_ASK_USER_DECISION_OPTIONS, HARD_MAX_ASK_USER_DECISION_QUESTION_BYTES, parseAskUserDecisionArgs, resolveAskUserDecisionAnswer, resolveAskUserDecisionLimits, suspendAskUserDecision, toAskUserDecisionSuspendData, validateAskUserDecisionAgentResume, validateAskUserDecisionResume, } from "./ask-user-decision.js";
|
|
4
4
|
export type { CodingCheckToolOptions, NamedCheckDefinition } from "./checks.js";
|
|
5
5
|
export { createCodingCheckTool } from "./checks.js";
|
|
6
|
-
export type { DeleteOperations, DeleteToolOptions, MutationStat } from "./delete.js";
|
|
7
|
-
export { createDeleteTool } from "./delete.js";
|
|
8
|
-
export type { CodingLifecycleEvent, CodingLifecycleLimits, CodingLifecycleEmitter, CreateCodingLifecycleEmitterOptions, FileChangeOp, FileChangedEvent, WorktreeChangedEvent, PermissionDeniedEvent, ConfigurationChangedEvent, ResolvedCodingLifecycleLimits, } from "./lifecycle.js";
|
|
9
|
-
export { createCodingLifecycleEmitter, CodingLifecycleError, resolveCodingLifecycleLimits, } from "./lifecycle.js";
|
|
10
6
|
export type { CodingArtifactKind, CodingArtifactRef, CodingCheckpointLimitOptions, CodingCheckpointMetadata, CodingCheckSummary, CodingFingerprints, CodingHandoffSummary, CodingTaskStatus, CodingTodoItem, ResolvedCodingCheckpointLimits, } from "./coding-checkpoint.js";
|
|
11
7
|
export { assertCodingResumeAllowed, buildCodingCheckpointMetadata, CODING_CHECKPOINT_SCHEMA_VERSION, CODING_STATE_KEY, CodingCheckpointError, codingCheckpointStatePatch, codingPlanPathForTask, createCodingArtifactRef, createCodingPlanMarkdown, fingerprintJson, parseCodingPlanTodos, readCodingCheckpointFromState, readCodingPlanFile, resolveCodingCheckpointLimits, validateCodingCheckpointMetadata, verifyCodingArtifactBytes, writeCodingPlanFile, } from "./coding-checkpoint.js";
|
|
8
|
+
export type { DeleteOperations, DeleteToolOptions, MutationStat } from "./delete.js";
|
|
9
|
+
export { createDeleteTool } from "./delete.js";
|
|
10
|
+
export type { DiagnosticDelta, DiagnosticDeltaRequest, DiagnosticSeverity, NormalizeDiagnosticsOptions, NormalizedDiagnostic, RawDiagnostic, ResolvedDiagnosticsLimits, } from "./diagnostics.js";
|
|
11
|
+
export { diagnosticDelta, diagnosticIdentity, normalizeDiagnostics, resolveDiagnosticsLimits } from "./diagnostics.js";
|
|
12
12
|
export type { Edit, EditOperations, EditToolDetails, EditToolOptions } from "./edit.js";
|
|
13
13
|
export { createEditTool } from "./edit.js";
|
|
14
14
|
export type { CodingEffectReconciliation, CodingEffectReconciliationInput } from "./effects.js";
|
|
15
|
-
export {
|
|
15
|
+
export { CODING_LOCAL_EFFECT, CODING_OBSERVATION_EFFECT, CODING_UNSUPPORTED_EFFECT, classifyGitApplyEffect, classifyGitBranchEffect, classifyGitWorktreeEffect, reconcileCodingToolEffect, } from "./effects.js";
|
|
16
|
+
export type { CreateGitHubForgeOptions, ForgeCheck, ForgeCredential, ForgeCredentialResolver, ForgeCredentialResolverSource, ForgeErrorCode, ForgeHandoffReport, ForgeIssueContext, ForgeLimits, ForgeOperations, ForgePullRequest, ResolvedForgeLimits, } from "./forge/index.js";
|
|
17
|
+
export { createGitHubForge, ForgeError, resolveForgeLimits } from "./forge/index.js";
|
|
16
18
|
export type { ArtifactReference, ArtifactWriter, BoundGitRunner, CreateGitOperationsOptions, CreateGitRunnerOptions, GitExecRequest, GitExecResult, GitLimitOptions, GitOperations, GitRunner, GitStatusBranch, GitStatusEntry, GitStatusEntryKind, GitStatusResult, PrHandoff, ResolvedGitLimits, } from "./git.js";
|
|
17
19
|
export { createBoundGitRunner, createGitOperations, GitError, parsePorcelainV2, resolveGitLimits, runGitCli, SAFE_GIT_CONFIG_ARGS, SAFE_GIT_ENV, } from "./git.js";
|
|
20
|
+
export type { GitAwareRepositoryOptions } from "./git-aware-repository.js";
|
|
21
|
+
export { createGitAwareRepositoryOperations, parseGitLsFilesZ } from "./git-aware-repository.js";
|
|
18
22
|
export type { GitToolsOptions } from "./git-tools.js";
|
|
19
23
|
export { createGitApplyTool, createGitBranchTool, createGitCommitTool, createGitDiffTool, createGitPrHandoffTool, createGitStatusTool, createGitTools, createGitWorktreeTool, } from "./git-tools.js";
|
|
20
|
-
export type { CodingGoalVerifyApproval, RunCodingGoalVerifyOptions, } from "./goal-verify.js";
|
|
21
|
-
export { CODING_GOAL_VERIFY_REVISION, CODING_GOAL_VERIFY_SUSPEND_REASON, CODING_GOAL_VERIFY_WORKFLOW_ID, CodingGoalVerifyError, createCodingGoalVerifyWorkflow, runCodingGoalVerify, } from "./goal-verify.js";
|
|
22
24
|
export type { GlobToolOptions } from "./glob.js";
|
|
23
25
|
export { createGlobTool } from "./glob.js";
|
|
24
26
|
export { matchGlobPattern, validateGlobPattern } from "./glob-match.js";
|
|
27
|
+
export type { CodingGoalVerifyApproval, RunCodingGoalVerifyOptions, } from "./goal-verify.js";
|
|
28
|
+
export { CODING_GOAL_VERIFY_REVISION, CODING_GOAL_VERIFY_SUSPEND_REASON, CODING_GOAL_VERIFY_WORKFLOW_ID, CodingGoalVerifyError, createCodingGoalVerifyWorkflow, runCodingGoalVerify, } from "./goal-verify.js";
|
|
29
|
+
export type { CreateLanguageIntelligenceOptions, LanguageDiagnostic, LanguageIntelligence, LanguageIntelligenceLimits, LanguageLocation, LanguageServerSpec, LanguageSymbol, LanguageTextEdit, LanguageWorkspaceEdit, } from "./language/index.js";
|
|
30
|
+
export { applyTextEdits, createLanguageIntelligence, encodeLspFrame, LanguageIntelligenceError, LspFrameError, LspFrameReader, resolveLanguageIntelligenceLimits, } from "./language/index.js";
|
|
31
|
+
export type { CodingLifecycleEmitter, CodingLifecycleEvent, CodingLifecycleLimits, ConfigurationChangedEvent, CreateCodingLifecycleEmitterOptions, FileChangedEvent, FileChangeOp, PermissionDeniedEvent, ResolvedCodingLifecycleLimits, WorktreeChangedEvent, } from "./lifecycle.js";
|
|
32
|
+
export { CodingLifecycleError, createCodingLifecycleEmitter, resolveCodingLifecycleLimits, } from "./lifecycle.js";
|
|
25
33
|
export type { ListToolOptions } from "./list.js";
|
|
26
34
|
export { createRepoListTool } from "./list.js";
|
|
27
35
|
export type { MoveOperations, MoveToolOptions } from "./move.js";
|
|
28
36
|
export { createMoveTool } from "./move.js";
|
|
29
|
-
export type {
|
|
37
|
+
export type { CodingProcessEvent, CreateProcessSessionsOptions, ProcessExitResult, ProcessOutputChunk, ProcessPtyBackend, ProcessPtyHandle, ProcessPtyStartRequest, ProcessRecoveryBackend, ProcessRecoveryErrorCode, ProcessRecoveryLimits, ProcessRecoveryOutcome, ProcessRecoveryRecord, ProcessRecoveryRecordReport, ProcessRecoveryReport, ProcessSandboxBackend, ProcessSandboxHandle, ProcessSandboxStartRequest, ProcessSession, ProcessSessionLimits, ProcessSessionMetadata, ProcessSessionState, ProcessSessions, ProcessStartRequest, ProcessTerminalRequest, ProcessTerminalResize, ResolvedProcessRecoveryLimits, ResolvedProcessSessionLimits, } from "./process/index.js";
|
|
38
|
+
export { createProcessSessions, PROCESS_RECOVERY_CATEGORY, PROCESS_RECOVERY_LEASE_NAMESPACE, PROCESS_RECOVERY_NAMESPACE, PROCESS_RECOVERY_SCHEMA_VERSION, ProcessRecoveryError, ProcessSessionError, resolveProcessRecoveryLimits, resolveProcessSessionLimits, validateBackendRef, validateProcessRecoveryRecord, } from "./process/index.js";
|
|
39
|
+
export type { DocumentReader, DocumentReaderResult, ReadOperations, ReadTextOptions, ReadTextResult, ReadToolOptions, TransformImage, TransformImageInput, } from "./read.js";
|
|
30
40
|
export { createReadTool, DEFAULT_MAX_IMAGE_BYTES, detectSupportedImageMimeType, detectSupportedImageMimeTypeFromFile, } from "./read.js";
|
|
31
41
|
export type { ReadPathSet } from "./read-path-set.js";
|
|
32
|
-
export { createReadPathSet, createReadPathSetPersistence,
|
|
33
|
-
export type {
|
|
34
|
-
export { compileSearchPattern, createLocalRepositoryOperations, DEFAULT_REPO_EXCLUDE, IndexError, isBinaryBuffer, RepositoryError, resolveRepoPath, resolveRepositoryLimits, toRepoRelative, } from "./repository.js";
|
|
35
|
-
export { createIndexedRepositoryOperations, resolveIndexLimits } from "./repository.js";
|
|
36
|
-
export type { GitAwareRepositoryOptions } from "./git-aware-repository.js";
|
|
37
|
-
export { createGitAwareRepositoryOperations, parseGitLsFilesZ } from "./git-aware-repository.js";
|
|
38
|
-
export { createCodingWorkspaceLifecycle, resolveWorkspaceLimits, WORKSPACE_LOCK_REASON_PREFIX, WORKSPACE_NAMESPACE, WORKSPACE_SCHEMA_VERSION, WORKSPACE_STATES, WorkspaceError, } from "./workspace-lifecycle.js";
|
|
39
|
-
export type { CodingWorkspaceLifecycle, CodingWorkspaceRecord, CreateCodingWorkspaceLifecycleOptions, ResolvedWorkspaceLimits, WorkspaceCleanupPolicy, WorkspaceCreateRequest, WorkspaceErrorCode, WorkspaceLimitOptions, WorkspaceRepositoryRecord, WorkspaceRepositoryRegistration, WorkspaceRepositoryState, WorkspaceState, } from "./workspace-lifecycle.js";
|
|
40
|
-
export type { CreateLanguageIntelligenceOptions, LanguageDiagnostic, LanguageIntelligence, LanguageIntelligenceLimits, LanguageLocation, LanguageServerSpec, LanguageSymbol, LanguageTextEdit, LanguageWorkspaceEdit, } from "./language/index.js";
|
|
41
|
-
export { applyTextEdits, createLanguageIntelligence, encodeLspFrame, LanguageIntelligenceError, LspFrameError, LspFrameReader, resolveLanguageIntelligenceLimits, } from "./language/index.js";
|
|
42
|
-
export type { CreateGitHubForgeOptions, ForgeCheck, ForgeCredential, ForgeCredentialResolver, ForgeCredentialResolverSource, ForgeErrorCode, ForgeHandoffReport, ForgeIssueContext, ForgeLimits, ForgeOperations, ForgePullRequest, ResolvedForgeLimits, } from "./forge/index.js";
|
|
43
|
-
export { createGitHubForge, ForgeError, resolveForgeLimits } from "./forge/index.js";
|
|
44
|
-
export type { CodingProcessEvent, CreateProcessSessionsOptions, ProcessExitResult, ProcessOutputChunk, ProcessPtyBackend, ProcessPtyHandle, ProcessPtyStartRequest, ProcessSandboxBackend, ProcessSandboxHandle, ProcessSandboxStartRequest, ProcessSession, ProcessSessionLimits, ProcessSessionMetadata, ProcessSessions, ProcessSessionState, ProcessStartRequest, ProcessTerminalRequest, ProcessTerminalResize, ResolvedProcessSessionLimits, } from "./process/index.js";
|
|
45
|
-
export { createProcessSessions, ProcessSessionError, resolveProcessSessionLimits, } from "./process/index.js";
|
|
46
|
-
export { PROCESS_RECOVERY_CATEGORY, PROCESS_RECOVERY_LEASE_NAMESPACE, PROCESS_RECOVERY_NAMESPACE, PROCESS_RECOVERY_SCHEMA_VERSION, ProcessRecoveryError, resolveProcessRecoveryLimits, validateBackendRef, validateProcessRecoveryRecord, } from "./process/index.js";
|
|
47
|
-
export type { ProcessRecoveryBackend, ProcessRecoveryErrorCode, ProcessRecoveryLimits, ProcessRecoveryOutcome, ProcessRecoveryRecord, ProcessRecoveryRecordReport, ProcessRecoveryReport, ResolvedProcessRecoveryLimits, } from "./process/index.js";
|
|
48
|
-
export type { SearchToolOptions } from "./search.js";
|
|
49
|
-
export { CodingPatchReviewError, assertCodingPatchAccepted, createCodingPatchReviewManifest, resolveCodingReviewLimits, } from "./review.js";
|
|
42
|
+
export { createReadPathSet, createReadPathSetPersistence, DEFAULT_MAX_PERSISTED_READ_PATH_CHARS, DEFAULT_MAX_PERSISTED_READ_PATHS, READ_PATH_SET_NAMESPACE, } from "./read-path-set.js";
|
|
43
|
+
export type { IndexedRepositoryOptions, IndexFacade, IndexFileChange, IndexLimitOptions, IndexResourceDiagnostics, IndexSearchHit, IndexState, RepoEntryKind, RepoListEntry, RepoSearchMode, RepoSearchOutputMode, RepositoryGlobRequest, RepositoryGlobResult, RepositoryIndexBackend, RepositoryIndexQueryRequest, RepositoryIndexQueryResult, RepositoryIndexRemoveRequest, RepositoryIndexStatus, RepositoryIndexUpdateRequest, RepositoryLimitOptions, RepositoryListRequest, RepositoryListResult, RepositoryOperations, RepositorySearchMatch, RepositorySearchRequest, RepositorySearchResult, RepositoryWalk, RepositoryWalkEvent, RepositoryWalkLimits, ResolvedIndexLimits, ResolvedRepositoryLimits, } from "./repository.js";
|
|
44
|
+
export { compileSearchPattern, createIndexedRepositoryOperations, createLocalRepositoryOperations, DEFAULT_REPO_EXCLUDE, IndexError, isBinaryBuffer, RepositoryError, resolveIndexLimits, resolveRepoPath, resolveRepositoryLimits, toRepoRelative, } from "./repository.js";
|
|
50
45
|
export type { AssertCodingPatchAcceptedInput, AssertCodingPatchAcceptedResult, CodingPatchReview, CodingPatchReviewCheckSummary, CodingPatchReviewDiagnosticSummary, CodingPatchReviewDiffstatEntry, CodingPatchReviewErrorCode, CodingPatchReviewIdentity, CodingPatchReviewState, CodingReviewArtifactInput, CodingReviewLimits, CreateCodingPatchReviewInput, ResolvedCodingReviewLimits, ReviewDiagnosticSeverity, } from "./review.js";
|
|
51
|
-
export {
|
|
52
|
-
export type {
|
|
46
|
+
export { assertCodingPatchAccepted, CodingPatchReviewError, createCodingPatchReviewManifest, resolveCodingReviewLimits, } from "./review.js";
|
|
47
|
+
export type { SearchToolOptions } from "./search.js";
|
|
53
48
|
export { createRepoSearchTool } from "./search.js";
|
|
54
49
|
export type { BashExecOptions, BashOperations, BashSpawnContext, BashSpawnHook, ShellConfig, ShellToolOptions, } from "./shell.js";
|
|
55
50
|
export { createLocalBashOperations, createShellTool, getShellConfig, killProcessTree, waitForChildProcess, } from "./shell.js";
|
|
51
|
+
export type { CodingWorkspaceLifecycle, CodingWorkspaceRecord, CreateCodingWorkspaceLifecycleOptions, ResolvedWorkspaceLimits, WorkspaceCleanupPolicy, WorkspaceCreateRequest, WorkspaceErrorCode, WorkspaceLimitOptions, WorkspaceRepositoryRecord, WorkspaceRepositoryRegistration, WorkspaceRepositoryState, WorkspaceState, } from "./workspace-lifecycle.js";
|
|
52
|
+
export { createCodingWorkspaceLifecycle, resolveWorkspaceLimits, WORKSPACE_LOCK_REASON_PREFIX, WORKSPACE_NAMESPACE, WORKSPACE_SCHEMA_VERSION, WORKSPACE_STATES, WorkspaceError, } from "./workspace-lifecycle.js";
|
|
56
53
|
export type { WriteOperations, WriteToolOptions } from "./write.js";
|
|
57
54
|
export { createWriteTool } from "./write.js";
|
|
58
55
|
export { enforceExecutionPolicy } from "./execution-policy.js";
|
|
59
56
|
export { withFileMutationQueue } from "./file-mutation-queue.js";
|
|
60
|
-
export { DEFAULT_CHECK_TIMEOUT_MS, DEFAULT_GIT_TIMEOUT_MS, DEFAULT_MAX_BYTES, DEFAULT_MAX_CHECK_CONCURRENCY, DEFAULT_MAX_CHECK_DIAGNOSTIC_LINES, DEFAULT_MAX_CHECK_NAMES, DEFAULT_MAX_CHECK_OUTPUT_BYTES, DEFAULT_MAX_CHECK_SUMMARY_BYTES, DEFAULT_MAX_CODING_ARTIFACT_BYTES, DEFAULT_MAX_CODING_ARTIFACTS, DEFAULT_MAX_CODING_CHECKPOINT_BYTES, DEFAULT_MAX_EDIT_FILE_BYTES, DEFAULT_MAX_EDIT_INPUT_BYTES, DEFAULT_MAX_EDITS, DEFAULT_MAX_FORGE_COMMENTS_PER_REVIEW, DEFAULT_MAX_FORGE_PAGES_PER_OPERATION, DEFAULT_MAX_FORGE_PAYLOAD_BYTES, DEFAULT_MAX_FORGE_REQUEST_CONCURRENCY, DEFAULT_MAX_FORGE_REQUEST_TIMEOUT_MS, DEFAULT_MAX_GIT_CHANGED_FILES, DEFAULT_MAX_GIT_DIFF_LINES, DEFAULT_MAX_GIT_MESSAGE_BYTES, DEFAULT_MAX_GIT_OUTPUT_BYTES,
|
|
57
|
+
export { DEFAULT_CHECK_TIMEOUT_MS, DEFAULT_GIT_TIMEOUT_MS, DEFAULT_MAX_BYTES, DEFAULT_MAX_CHECK_CONCURRENCY, DEFAULT_MAX_CHECK_DIAGNOSTIC_LINES, DEFAULT_MAX_CHECK_NAMES, DEFAULT_MAX_CHECK_OUTPUT_BYTES, DEFAULT_MAX_CHECK_SUMMARY_BYTES, DEFAULT_MAX_CODING_ARTIFACT_BYTES, DEFAULT_MAX_CODING_ARTIFACTS, DEFAULT_MAX_CODING_CHECKPOINT_BYTES, DEFAULT_MAX_EDIT_FILE_BYTES, DEFAULT_MAX_EDIT_INPUT_BYTES, DEFAULT_MAX_EDITS, DEFAULT_MAX_FORGE_COMMENTS_PER_REVIEW, DEFAULT_MAX_FORGE_PAGES_PER_OPERATION, DEFAULT_MAX_FORGE_PAYLOAD_BYTES, DEFAULT_MAX_FORGE_REQUEST_CONCURRENCY, DEFAULT_MAX_FORGE_REQUEST_TIMEOUT_MS, DEFAULT_MAX_GIT_CHANGED_FILES, DEFAULT_MAX_GIT_DIFF_LINES, DEFAULT_MAX_GIT_MESSAGE_BYTES, DEFAULT_MAX_GIT_OUTPUT_BYTES, DEFAULT_MAX_GIT_PATCH_BYTES, DEFAULT_MAX_GIT_PATHS, DEFAULT_MAX_GIT_REF_BYTES, DEFAULT_MAX_GIT_WORKTREES, DEFAULT_MAX_LINES, DEFAULT_MAX_LS_FILES_OUTPUT_BYTES, DEFAULT_MAX_LSP_DIAGNOSTICS_PER_FILE, DEFAULT_MAX_LSP_MESSAGE_BYTES, DEFAULT_MAX_LSP_PENDING_REQUESTS, DEFAULT_MAX_LSP_RESULTS_PER_QUERY, DEFAULT_MAX_LSP_SERVERS, DEFAULT_MAX_LSP_TIMEOUT_MS, DEFAULT_MAX_PLAN_BYTES, DEFAULT_MAX_PR_COMMITS, DEFAULT_MAX_PR_HANDOFF_BYTES, DEFAULT_MAX_PROCESS_INPUT_BYTES, DEFAULT_MAX_PROCESS_LIFETIME_MS, DEFAULT_MAX_PROCESS_OUTPUT_CHUNK_BYTES, DEFAULT_MAX_PROCESS_SESSIONS, DEFAULT_MAX_PROCESS_TOTAL_OUTPUT_BYTES, DEFAULT_MAX_PTY_ATTACH_TIMEOUT_MS, DEFAULT_MAX_PTY_BACKEND_METADATA_BYTES, DEFAULT_MAX_REPO_CONCURRENCY, DEFAULT_MAX_REPO_DEPTH, DEFAULT_MAX_REPO_ENTRIES, DEFAULT_MAX_REPO_FILES, DEFAULT_MAX_REPO_RESULTS, DEFAULT_MAX_SEARCH_CONTEXT_LINES, DEFAULT_MAX_SEARCH_FILE_BYTES, DEFAULT_MAX_SEARCH_LINE_BYTES, DEFAULT_MAX_SEARCH_MATCHES, DEFAULT_MAX_SEARCH_PATTERN_BYTES, DEFAULT_MAX_SEARCH_SCAN_BYTES, DEFAULT_MAX_SEARCH_TIME_MS, DEFAULT_MAX_TERMINAL_COLUMNS, DEFAULT_MAX_TERMINAL_RESIZES_PER_MINUTE, DEFAULT_MAX_TERMINAL_ROWS, DEFAULT_MAX_TERMINAL_TERM_BYTES, DEFAULT_MAX_TEXT_SCAN_BYTES, DEFAULT_MAX_TODO_TEXT_BYTES, DEFAULT_MAX_TODOS, DEFAULT_MAX_TOTAL_OUTPUT_BYTES, DEFAULT_MAX_WRITE_BYTES, DEFAULT_SHELL_TIMEOUT_SECONDS, HARD_CHECK_TIMEOUT_MS, HARD_GIT_TIMEOUT_MS, HARD_MAX_BYTES, HARD_MAX_CHECK_CONCURRENCY, HARD_MAX_CHECK_DIAGNOSTIC_LINES, HARD_MAX_CHECK_NAMES, HARD_MAX_CHECK_OUTPUT_BYTES, HARD_MAX_CHECK_SUMMARY_BYTES, HARD_MAX_CODING_ARTIFACT_BYTES, HARD_MAX_CODING_ARTIFACTS, HARD_MAX_CODING_CHECKPOINT_BYTES, HARD_MAX_EDIT_FILE_BYTES, HARD_MAX_EDIT_INPUT_BYTES, HARD_MAX_EDITS, HARD_MAX_FORGE_COMMENTS_PER_REVIEW, HARD_MAX_FORGE_PAGES_PER_OPERATION, HARD_MAX_FORGE_PAYLOAD_BYTES, HARD_MAX_FORGE_REQUEST_CONCURRENCY, HARD_MAX_FORGE_REQUEST_TIMEOUT_MS, HARD_MAX_GIT_CHANGED_FILES, HARD_MAX_GIT_DIFF_LINES, HARD_MAX_GIT_MESSAGE_BYTES, HARD_MAX_GIT_OUTPUT_BYTES, HARD_MAX_GIT_PATCH_BYTES, HARD_MAX_GIT_PATHS, HARD_MAX_GIT_REF_BYTES, HARD_MAX_GIT_WORKTREES, HARD_MAX_IMAGE_BYTES, HARD_MAX_LINES, HARD_MAX_LS_FILES_OUTPUT_BYTES, HARD_MAX_LSP_DIAGNOSTICS_PER_FILE, HARD_MAX_LSP_MESSAGE_BYTES, HARD_MAX_LSP_PENDING_REQUESTS, HARD_MAX_LSP_RESULTS_PER_QUERY, HARD_MAX_LSP_SERVERS, HARD_MAX_LSP_TIMEOUT_MS, HARD_MAX_PLAN_BYTES, HARD_MAX_PR_COMMITS, HARD_MAX_PR_HANDOFF_BYTES, HARD_MAX_PROCESS_INPUT_BYTES, HARD_MAX_PROCESS_LIFETIME_MS, HARD_MAX_PROCESS_OUTPUT_CHUNK_BYTES, HARD_MAX_PROCESS_SESSIONS, HARD_MAX_PROCESS_TOTAL_OUTPUT_BYTES, HARD_MAX_PTY_ATTACH_TIMEOUT_MS, HARD_MAX_PTY_BACKEND_METADATA_BYTES, HARD_MAX_REPO_CONCURRENCY, HARD_MAX_REPO_DEPTH, HARD_MAX_REPO_ENTRIES, HARD_MAX_REPO_FILES, HARD_MAX_REPO_RESULTS, HARD_MAX_SEARCH_CONTEXT_LINES, HARD_MAX_SEARCH_FILE_BYTES, HARD_MAX_SEARCH_LINE_BYTES, HARD_MAX_SEARCH_MATCHES, HARD_MAX_SEARCH_PATTERN_BYTES, HARD_MAX_SEARCH_SCAN_BYTES, HARD_MAX_SEARCH_TIME_MS, HARD_MAX_TERMINAL_COLUMNS, HARD_MAX_TERMINAL_RESIZES_PER_MINUTE, HARD_MAX_TERMINAL_ROWS, HARD_MAX_TERMINAL_TERM_BYTES, HARD_MAX_TEXT_SCAN_BYTES, HARD_MAX_TODO_TEXT_BYTES, HARD_MAX_TODOS, HARD_MAX_TOTAL_OUTPUT_BYTES, HARD_MAX_WRITE_BYTES, HARD_SHELL_TIMEOUT_SECONDS, LSP_RESTARTS_PER_SERVER, } from "./limits.js";
|
|
61
58
|
import type { ExecutionPolicy, ToolDefinition } from "@arnilo/prism";
|
|
62
59
|
import type { DeleteToolOptions } from "./delete.js";
|
|
63
60
|
import type { EditToolOptions } from "./edit.js";
|
package/dist/index.js
CHANGED
|
@@ -7,43 +7,41 @@
|
|
|
7
7
|
export { createDirectoryArtifactWriter, createTempArtifactWriter, sha256Hex } from "./artifacts.js";
|
|
8
8
|
export { ASK_USER_DECISION_RATIONALE_COUNT, ASK_USER_DECISION_SUSPEND_REASON, ASK_USER_DECISION_TOOL_NAME, askUserDecisionResumeSchema, createAskUserDecisionResumeValidator, createAskUserDecisionTool, DEFAULT_MAX_ASK_USER_DECISION_BULLET_BYTES, DEFAULT_MAX_ASK_USER_DECISION_CUSTOM_BYTES, DEFAULT_MAX_ASK_USER_DECISION_LABEL_BYTES, DEFAULT_MAX_ASK_USER_DECISION_OPTIONS, DEFAULT_MAX_ASK_USER_DECISION_QUESTION_BYTES, HARD_MAX_ASK_USER_DECISION_BULLET_BYTES, HARD_MAX_ASK_USER_DECISION_CUSTOM_BYTES, HARD_MAX_ASK_USER_DECISION_LABEL_BYTES, HARD_MAX_ASK_USER_DECISION_OPTIONS, HARD_MAX_ASK_USER_DECISION_QUESTION_BYTES, parseAskUserDecisionArgs, resolveAskUserDecisionAnswer, resolveAskUserDecisionLimits, suspendAskUserDecision, toAskUserDecisionSuspendData, validateAskUserDecisionAgentResume, validateAskUserDecisionResume, } from "./ask-user-decision.js";
|
|
9
9
|
export { createCodingCheckTool } from "./checks.js";
|
|
10
|
-
export { createDeleteTool } from "./delete.js";
|
|
11
|
-
export { createCodingLifecycleEmitter, CodingLifecycleError, resolveCodingLifecycleLimits, } from "./lifecycle.js";
|
|
12
10
|
export { assertCodingResumeAllowed, buildCodingCheckpointMetadata, CODING_CHECKPOINT_SCHEMA_VERSION, CODING_STATE_KEY, CodingCheckpointError, codingCheckpointStatePatch, codingPlanPathForTask, createCodingArtifactRef, createCodingPlanMarkdown, fingerprintJson, parseCodingPlanTodos, readCodingCheckpointFromState, readCodingPlanFile, resolveCodingCheckpointLimits, validateCodingCheckpointMetadata, verifyCodingArtifactBytes, writeCodingPlanFile, } from "./coding-checkpoint.js";
|
|
11
|
+
export { createDeleteTool } from "./delete.js";
|
|
12
|
+
export { diagnosticDelta, diagnosticIdentity, normalizeDiagnostics, resolveDiagnosticsLimits } from "./diagnostics.js";
|
|
13
13
|
export { createEditTool } from "./edit.js";
|
|
14
|
-
export {
|
|
14
|
+
export { CODING_LOCAL_EFFECT, CODING_OBSERVATION_EFFECT, CODING_UNSUPPORTED_EFFECT, classifyGitApplyEffect, classifyGitBranchEffect, classifyGitWorktreeEffect, reconcileCodingToolEffect, } from "./effects.js";
|
|
15
|
+
export { createGitHubForge, ForgeError, resolveForgeLimits } from "./forge/index.js";
|
|
15
16
|
export { createBoundGitRunner, createGitOperations, GitError, parsePorcelainV2, resolveGitLimits, runGitCli, SAFE_GIT_CONFIG_ARGS, SAFE_GIT_ENV, } from "./git.js";
|
|
17
|
+
export { createGitAwareRepositoryOperations, parseGitLsFilesZ } from "./git-aware-repository.js";
|
|
16
18
|
export { createGitApplyTool, createGitBranchTool, createGitCommitTool, createGitDiffTool, createGitPrHandoffTool, createGitStatusTool, createGitTools, createGitWorktreeTool, } from "./git-tools.js";
|
|
17
|
-
export { CODING_GOAL_VERIFY_REVISION, CODING_GOAL_VERIFY_SUSPEND_REASON, CODING_GOAL_VERIFY_WORKFLOW_ID, CodingGoalVerifyError, createCodingGoalVerifyWorkflow, runCodingGoalVerify, } from "./goal-verify.js";
|
|
18
19
|
export { createGlobTool } from "./glob.js";
|
|
19
20
|
export { matchGlobPattern, validateGlobPattern } from "./glob-match.js";
|
|
21
|
+
export { CODING_GOAL_VERIFY_REVISION, CODING_GOAL_VERIFY_SUSPEND_REASON, CODING_GOAL_VERIFY_WORKFLOW_ID, CodingGoalVerifyError, createCodingGoalVerifyWorkflow, runCodingGoalVerify, } from "./goal-verify.js";
|
|
22
|
+
export { applyTextEdits, createLanguageIntelligence, encodeLspFrame, LanguageIntelligenceError, LspFrameError, LspFrameReader, resolveLanguageIntelligenceLimits, } from "./language/index.js";
|
|
23
|
+
export { CodingLifecycleError, createCodingLifecycleEmitter, resolveCodingLifecycleLimits, } from "./lifecycle.js";
|
|
20
24
|
export { createRepoListTool } from "./list.js";
|
|
21
25
|
export { createMoveTool } from "./move.js";
|
|
26
|
+
// durable process/ACP recovery seam (plan 026 Task 5): recover() is
|
|
27
|
+
// attach-if-attested and never fabricates an exit code; exports below
|
|
28
|
+
export { createProcessSessions, PROCESS_RECOVERY_CATEGORY, PROCESS_RECOVERY_LEASE_NAMESPACE, PROCESS_RECOVERY_NAMESPACE, PROCESS_RECOVERY_SCHEMA_VERSION, ProcessRecoveryError, ProcessSessionError, resolveProcessRecoveryLimits, resolveProcessSessionLimits, validateBackendRef, validateProcessRecoveryRecord, } from "./process/index.js";
|
|
22
29
|
export { createReadTool, DEFAULT_MAX_IMAGE_BYTES, detectSupportedImageMimeType, detectSupportedImageMimeTypeFromFile, } from "./read.js";
|
|
23
|
-
export { createReadPathSet, createReadPathSetPersistence,
|
|
24
|
-
export { compileSearchPattern, createLocalRepositoryOperations, DEFAULT_REPO_EXCLUDE, IndexError, isBinaryBuffer, RepositoryError, resolveRepoPath, resolveRepositoryLimits, toRepoRelative, } from "./repository.js";
|
|
30
|
+
export { createReadPathSet, createReadPathSetPersistence, DEFAULT_MAX_PERSISTED_READ_PATH_CHARS, DEFAULT_MAX_PERSISTED_READ_PATHS, READ_PATH_SET_NAMESPACE, } from "./read-path-set.js";
|
|
25
31
|
// host-indexed search seam (plan 026 Task 2): compose a host index with the
|
|
26
32
|
// literal fallback; indexed_literal/semantic never fall back silently
|
|
27
|
-
export { createIndexedRepositoryOperations, resolveIndexLimits } from "./repository.js";
|
|
28
|
-
export { createGitAwareRepositoryOperations, parseGitLsFilesZ } from "./git-aware-repository.js";
|
|
29
|
-
export { createCodingWorkspaceLifecycle, resolveWorkspaceLimits, WORKSPACE_LOCK_REASON_PREFIX, WORKSPACE_NAMESPACE, WORKSPACE_SCHEMA_VERSION, WORKSPACE_STATES, WorkspaceError, } from "./workspace-lifecycle.js";
|
|
30
|
-
export { applyTextEdits, createLanguageIntelligence, encodeLspFrame, LanguageIntelligenceError, LspFrameError, LspFrameReader, resolveLanguageIntelligenceLimits, } from "./language/index.js";
|
|
31
|
-
export { createGitHubForge, ForgeError, resolveForgeLimits } from "./forge/index.js";
|
|
32
|
-
export { createProcessSessions, ProcessSessionError, resolveProcessSessionLimits, } from "./process/index.js";
|
|
33
|
-
// durable process/ACP recovery seam (plan 026 Task 5): recover() is
|
|
34
|
-
// attach-if-attested and never fabricates an exit code; exports below
|
|
35
|
-
export { PROCESS_RECOVERY_CATEGORY, PROCESS_RECOVERY_LEASE_NAMESPACE, PROCESS_RECOVERY_NAMESPACE, PROCESS_RECOVERY_SCHEMA_VERSION, ProcessRecoveryError, resolveProcessRecoveryLimits, validateBackendRef, validateProcessRecoveryRecord, } from "./process/index.js";
|
|
33
|
+
export { compileSearchPattern, createIndexedRepositoryOperations, createLocalRepositoryOperations, DEFAULT_REPO_EXCLUDE, IndexError, isBinaryBuffer, RepositoryError, resolveIndexLimits, resolveRepoPath, resolveRepositoryLimits, toRepoRelative, } from "./repository.js";
|
|
36
34
|
// bounded patch review (plan 026 Task 6): createCodingPatchReviewManifest +
|
|
37
35
|
// assertCodingPatchAccepted bind decisions to digest + revision + identity
|
|
38
|
-
export {
|
|
39
|
-
export { diagnosticDelta, diagnosticIdentity, normalizeDiagnostics, resolveDiagnosticsLimits } from "./diagnostics.js";
|
|
36
|
+
export { assertCodingPatchAccepted, CodingPatchReviewError, createCodingPatchReviewManifest, resolveCodingReviewLimits, } from "./review.js";
|
|
40
37
|
export { createRepoSearchTool } from "./search.js";
|
|
41
38
|
export { createLocalBashOperations, createShellTool, getShellConfig, killProcessTree, waitForChildProcess, } from "./shell.js";
|
|
39
|
+
export { createCodingWorkspaceLifecycle, resolveWorkspaceLimits, WORKSPACE_LOCK_REASON_PREFIX, WORKSPACE_NAMESPACE, WORKSPACE_SCHEMA_VERSION, WORKSPACE_STATES, WorkspaceError, } from "./workspace-lifecycle.js";
|
|
42
40
|
export { createWriteTool } from "./write.js";
|
|
43
41
|
// --- generic primitives (re-exported for hosts that want them) ---
|
|
44
42
|
export { enforceExecutionPolicy } from "./execution-policy.js";
|
|
45
43
|
export { withFileMutationQueue } from "./file-mutation-queue.js";
|
|
46
|
-
export { DEFAULT_CHECK_TIMEOUT_MS, DEFAULT_GIT_TIMEOUT_MS, DEFAULT_MAX_BYTES, DEFAULT_MAX_CHECK_CONCURRENCY, DEFAULT_MAX_CHECK_DIAGNOSTIC_LINES, DEFAULT_MAX_CHECK_NAMES, DEFAULT_MAX_CHECK_OUTPUT_BYTES, DEFAULT_MAX_CHECK_SUMMARY_BYTES, DEFAULT_MAX_CODING_ARTIFACT_BYTES, DEFAULT_MAX_CODING_ARTIFACTS, DEFAULT_MAX_CODING_CHECKPOINT_BYTES, DEFAULT_MAX_EDIT_FILE_BYTES, DEFAULT_MAX_EDIT_INPUT_BYTES, DEFAULT_MAX_EDITS, DEFAULT_MAX_FORGE_COMMENTS_PER_REVIEW, DEFAULT_MAX_FORGE_PAGES_PER_OPERATION, DEFAULT_MAX_FORGE_PAYLOAD_BYTES, DEFAULT_MAX_FORGE_REQUEST_CONCURRENCY, DEFAULT_MAX_FORGE_REQUEST_TIMEOUT_MS, DEFAULT_MAX_GIT_CHANGED_FILES, DEFAULT_MAX_GIT_DIFF_LINES, DEFAULT_MAX_GIT_MESSAGE_BYTES, DEFAULT_MAX_GIT_OUTPUT_BYTES,
|
|
44
|
+
export { DEFAULT_CHECK_TIMEOUT_MS, DEFAULT_GIT_TIMEOUT_MS, DEFAULT_MAX_BYTES, DEFAULT_MAX_CHECK_CONCURRENCY, DEFAULT_MAX_CHECK_DIAGNOSTIC_LINES, DEFAULT_MAX_CHECK_NAMES, DEFAULT_MAX_CHECK_OUTPUT_BYTES, DEFAULT_MAX_CHECK_SUMMARY_BYTES, DEFAULT_MAX_CODING_ARTIFACT_BYTES, DEFAULT_MAX_CODING_ARTIFACTS, DEFAULT_MAX_CODING_CHECKPOINT_BYTES, DEFAULT_MAX_EDIT_FILE_BYTES, DEFAULT_MAX_EDIT_INPUT_BYTES, DEFAULT_MAX_EDITS, DEFAULT_MAX_FORGE_COMMENTS_PER_REVIEW, DEFAULT_MAX_FORGE_PAGES_PER_OPERATION, DEFAULT_MAX_FORGE_PAYLOAD_BYTES, DEFAULT_MAX_FORGE_REQUEST_CONCURRENCY, DEFAULT_MAX_FORGE_REQUEST_TIMEOUT_MS, DEFAULT_MAX_GIT_CHANGED_FILES, DEFAULT_MAX_GIT_DIFF_LINES, DEFAULT_MAX_GIT_MESSAGE_BYTES, DEFAULT_MAX_GIT_OUTPUT_BYTES, DEFAULT_MAX_GIT_PATCH_BYTES, DEFAULT_MAX_GIT_PATHS, DEFAULT_MAX_GIT_REF_BYTES, DEFAULT_MAX_GIT_WORKTREES, DEFAULT_MAX_LINES, DEFAULT_MAX_LS_FILES_OUTPUT_BYTES, DEFAULT_MAX_LSP_DIAGNOSTICS_PER_FILE, DEFAULT_MAX_LSP_MESSAGE_BYTES, DEFAULT_MAX_LSP_PENDING_REQUESTS, DEFAULT_MAX_LSP_RESULTS_PER_QUERY, DEFAULT_MAX_LSP_SERVERS, DEFAULT_MAX_LSP_TIMEOUT_MS, DEFAULT_MAX_PLAN_BYTES, DEFAULT_MAX_PR_COMMITS, DEFAULT_MAX_PR_HANDOFF_BYTES, DEFAULT_MAX_PROCESS_INPUT_BYTES, DEFAULT_MAX_PROCESS_LIFETIME_MS, DEFAULT_MAX_PROCESS_OUTPUT_CHUNK_BYTES, DEFAULT_MAX_PROCESS_SESSIONS, DEFAULT_MAX_PROCESS_TOTAL_OUTPUT_BYTES, DEFAULT_MAX_PTY_ATTACH_TIMEOUT_MS, DEFAULT_MAX_PTY_BACKEND_METADATA_BYTES, DEFAULT_MAX_REPO_CONCURRENCY, DEFAULT_MAX_REPO_DEPTH, DEFAULT_MAX_REPO_ENTRIES, DEFAULT_MAX_REPO_FILES, DEFAULT_MAX_REPO_RESULTS, DEFAULT_MAX_SEARCH_CONTEXT_LINES, DEFAULT_MAX_SEARCH_FILE_BYTES, DEFAULT_MAX_SEARCH_LINE_BYTES, DEFAULT_MAX_SEARCH_MATCHES, DEFAULT_MAX_SEARCH_PATTERN_BYTES, DEFAULT_MAX_SEARCH_SCAN_BYTES, DEFAULT_MAX_SEARCH_TIME_MS, DEFAULT_MAX_TERMINAL_COLUMNS, DEFAULT_MAX_TERMINAL_RESIZES_PER_MINUTE, DEFAULT_MAX_TERMINAL_ROWS, DEFAULT_MAX_TERMINAL_TERM_BYTES, DEFAULT_MAX_TEXT_SCAN_BYTES, DEFAULT_MAX_TODO_TEXT_BYTES, DEFAULT_MAX_TODOS, DEFAULT_MAX_TOTAL_OUTPUT_BYTES, DEFAULT_MAX_WRITE_BYTES, DEFAULT_SHELL_TIMEOUT_SECONDS, HARD_CHECK_TIMEOUT_MS, HARD_GIT_TIMEOUT_MS, HARD_MAX_BYTES, HARD_MAX_CHECK_CONCURRENCY, HARD_MAX_CHECK_DIAGNOSTIC_LINES, HARD_MAX_CHECK_NAMES, HARD_MAX_CHECK_OUTPUT_BYTES, HARD_MAX_CHECK_SUMMARY_BYTES, HARD_MAX_CODING_ARTIFACT_BYTES, HARD_MAX_CODING_ARTIFACTS, HARD_MAX_CODING_CHECKPOINT_BYTES, HARD_MAX_EDIT_FILE_BYTES, HARD_MAX_EDIT_INPUT_BYTES, HARD_MAX_EDITS, HARD_MAX_FORGE_COMMENTS_PER_REVIEW, HARD_MAX_FORGE_PAGES_PER_OPERATION, HARD_MAX_FORGE_PAYLOAD_BYTES, HARD_MAX_FORGE_REQUEST_CONCURRENCY, HARD_MAX_FORGE_REQUEST_TIMEOUT_MS, HARD_MAX_GIT_CHANGED_FILES, HARD_MAX_GIT_DIFF_LINES, HARD_MAX_GIT_MESSAGE_BYTES, HARD_MAX_GIT_OUTPUT_BYTES, HARD_MAX_GIT_PATCH_BYTES, HARD_MAX_GIT_PATHS, HARD_MAX_GIT_REF_BYTES, HARD_MAX_GIT_WORKTREES, HARD_MAX_IMAGE_BYTES, HARD_MAX_LINES, HARD_MAX_LS_FILES_OUTPUT_BYTES, HARD_MAX_LSP_DIAGNOSTICS_PER_FILE, HARD_MAX_LSP_MESSAGE_BYTES, HARD_MAX_LSP_PENDING_REQUESTS, HARD_MAX_LSP_RESULTS_PER_QUERY, HARD_MAX_LSP_SERVERS, HARD_MAX_LSP_TIMEOUT_MS, HARD_MAX_PLAN_BYTES, HARD_MAX_PR_COMMITS, HARD_MAX_PR_HANDOFF_BYTES, HARD_MAX_PROCESS_INPUT_BYTES, HARD_MAX_PROCESS_LIFETIME_MS, HARD_MAX_PROCESS_OUTPUT_CHUNK_BYTES, HARD_MAX_PROCESS_SESSIONS, HARD_MAX_PROCESS_TOTAL_OUTPUT_BYTES, HARD_MAX_PTY_ATTACH_TIMEOUT_MS, HARD_MAX_PTY_BACKEND_METADATA_BYTES, HARD_MAX_REPO_CONCURRENCY, HARD_MAX_REPO_DEPTH, HARD_MAX_REPO_ENTRIES, HARD_MAX_REPO_FILES, HARD_MAX_REPO_RESULTS, HARD_MAX_SEARCH_CONTEXT_LINES, HARD_MAX_SEARCH_FILE_BYTES, HARD_MAX_SEARCH_LINE_BYTES, HARD_MAX_SEARCH_MATCHES, HARD_MAX_SEARCH_PATTERN_BYTES, HARD_MAX_SEARCH_SCAN_BYTES, HARD_MAX_SEARCH_TIME_MS, HARD_MAX_TERMINAL_COLUMNS, HARD_MAX_TERMINAL_RESIZES_PER_MINUTE, HARD_MAX_TERMINAL_ROWS, HARD_MAX_TERMINAL_TERM_BYTES, HARD_MAX_TEXT_SCAN_BYTES, HARD_MAX_TODO_TEXT_BYTES, HARD_MAX_TODOS, HARD_MAX_TOTAL_OUTPUT_BYTES, HARD_MAX_WRITE_BYTES, HARD_SHELL_TIMEOUT_SECONDS, LSP_RESTARTS_PER_SERVER, } from "./limits.js";
|
|
47
45
|
import { createDeleteTool } from "./delete.js";
|
|
48
46
|
import { createEditTool } from "./edit.js";
|
|
49
47
|
import { createGlobTool } from "./glob.js";
|
package/dist/language/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { encodeLspFrame, LspFrameError, LspFrameReader } from "./framing.js";
|
|
2
1
|
export { LspClient } from "./client.js";
|
|
2
|
+
export { encodeLspFrame, LspFrameError, LspFrameReader } from "./framing.js";
|
|
3
3
|
export { applyTextEdits, createLanguageIntelligence, LanguageIntelligenceError, resolveLanguageIntelligenceLimits, } from "./intelligence.js";
|
|
4
4
|
export type { CreateLanguageIntelligenceOptions, LanguageDiagnostic, LanguageDiagnosticDeltaRequest, LanguageDiagnosticDeltaResult, LanguageFileDiagnostics, LanguageIntelligence, LanguageIntelligenceLimits, LanguageLocation, LanguageServerSpec, LanguageSymbol, LanguageTextEdit, LanguageWorkspaceEdit, } from "./types.js";
|
package/dist/language/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { encodeLspFrame, LspFrameError, LspFrameReader } from "./framing.js";
|
|
2
1
|
export { LspClient } from "./client.js";
|
|
2
|
+
export { encodeLspFrame, LspFrameError, LspFrameReader } from "./framing.js";
|
|
3
3
|
export { applyTextEdits, createLanguageIntelligence, LanguageIntelligenceError, resolveLanguageIntelligenceLimits, } from "./intelligence.js";
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/lifecycle.d.ts
CHANGED
|
@@ -26,7 +26,23 @@ export interface ConfigurationChangedEvent {
|
|
|
26
26
|
/** Changed config keys only; values never travel in the event. */
|
|
27
27
|
readonly keys: readonly string[];
|
|
28
28
|
}
|
|
29
|
-
export
|
|
29
|
+
export interface PlanChangedEvent {
|
|
30
|
+
readonly type: "plan_changed";
|
|
31
|
+
/** Workspace-relative plan path; doubles as the plan id on the ACP wire. */
|
|
32
|
+
readonly planPath: string;
|
|
33
|
+
/** Complete todo list at this point (same shape as `CodingTodoItem`). */
|
|
34
|
+
readonly todos: readonly {
|
|
35
|
+
readonly id: string;
|
|
36
|
+
readonly text: string;
|
|
37
|
+
readonly done: boolean;
|
|
38
|
+
}[];
|
|
39
|
+
}
|
|
40
|
+
export interface PlanRemovedEvent {
|
|
41
|
+
readonly type: "plan_removed";
|
|
42
|
+
/** Workspace-relative plan path; doubles as the plan id on the ACP wire. */
|
|
43
|
+
readonly planPath: string;
|
|
44
|
+
}
|
|
45
|
+
export type CodingLifecycleEvent = CodingProcessEvent | FileChangedEvent | WorktreeChangedEvent | PermissionDeniedEvent | ConfigurationChangedEvent | PlanChangedEvent | PlanRemovedEvent;
|
|
30
46
|
export declare const DEFAULT_LIFECYCLE_MAX_EVENT_BYTES = 16384;
|
|
31
47
|
export declare const HARD_LIFECYCLE_MAX_EVENT_BYTES = 65536;
|
|
32
48
|
export declare const DEFAULT_LIFECYCLE_MAX_PATH_BYTES = 4096;
|
package/dist/lifecycle.js
CHANGED
|
@@ -54,6 +54,8 @@ const FROZEN_EVENT_TYPES = new Set([
|
|
|
54
54
|
"worktree_changed",
|
|
55
55
|
"permission_denied",
|
|
56
56
|
"configuration_changed",
|
|
57
|
+
"plan_changed",
|
|
58
|
+
"plan_removed",
|
|
57
59
|
]);
|
|
58
60
|
export function createCodingLifecycleEmitter(options = {}) {
|
|
59
61
|
const limits = resolveCodingLifecycleLimits(options.limits);
|
package/dist/list.js
CHANGED
|
@@ -34,6 +34,7 @@ export function createRepoListTool(cwd, options) {
|
|
|
34
34
|
const ops = options?.operations ?? createLocalRepositoryOperations(limits);
|
|
35
35
|
return {
|
|
36
36
|
name: "repo_list",
|
|
37
|
+
kind: "read",
|
|
37
38
|
effect: CODING_OBSERVATION_EFFECT,
|
|
38
39
|
description: `List repository entries under the workspace with deterministic relative paths. Prefer glob when you already know a filename pattern (*.ts, **/src/**). Prefer repo_search to find text inside files. Skips hidden names and excluded basenames (default: ${limits.exclude.join(", ")}) unless overridden. Does not follow symlinks. Results paginate with offset/maxResults (default ${limits.maxResults}). Depth default ${limits.maxDepth}.`,
|
|
39
40
|
parameters: {
|
package/dist/move.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { access, constants } from "node:fs";
|
|
2
|
-
import { dirname } from "node:path";
|
|
3
2
|
import { lstat, rename, unlink } from "node:fs/promises";
|
|
3
|
+
import { dirname } from "node:path";
|
|
4
4
|
import { promisify } from "node:util";
|
|
5
5
|
import { CODING_LOCAL_EFFECT } from "./effects.js";
|
|
6
6
|
import { enforceExecutionPolicy } from "./execution-policy.js";
|
|
@@ -37,6 +37,7 @@ export function createMoveTool(cwd, options) {
|
|
|
37
37
|
const ops = options?.operations ?? defaultMoveOperations;
|
|
38
38
|
return {
|
|
39
39
|
name: "move",
|
|
40
|
+
kind: "move",
|
|
40
41
|
effect: CODING_LOCAL_EFFECT,
|
|
41
42
|
description: "High-risk: move or rename a file within the workspace. Set overwrite=true to replace an existing destination file only (directories/non-empty dest rejected). Does not create parent directories. No trash — host undo is not automatic.",
|
|
42
43
|
parameters: {
|
package/dist/process/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export {
|
|
1
|
+
export type { ProcessRecoveryBackend, ProcessRecoveryErrorCode, ProcessRecoveryLimits, ProcessRecoveryOutcome, ProcessRecoveryRecord, ProcessRecoveryRecordReport, ProcessRecoveryReport, RecoveryRecordPage, ResolvedProcessRecoveryLimits, } from "./recovery.js";
|
|
2
|
+
export { acquireRecordLease, attachWithTimeout, buildProcessRecoveryRecord, deleteProcessRecoveryRecord, isOwnershipConflict, loadProcessRecoveryRecord, loadProcessRecoveryRecords, PROCESS_RECOVERY_CATEGORY, PROCESS_RECOVERY_LEASE_NAMESPACE, PROCESS_RECOVERY_NAMESPACE, PROCESS_RECOVERY_SCHEMA_VERSION, ProcessRecoveryError, releaseRecordLease, resolveProcessRecoveryLimits, saveProcessRecoveryRecord, validateBackendRef, validateProcessRecoveryRecord, } from "./recovery.js";
|
|
3
3
|
export { createProcessSessions } from "./sessions.js";
|
|
4
|
-
export {
|
|
5
|
-
export
|
|
6
|
-
export type { ProcessRecoveryBackend, ProcessRecoveryOutcome } from "./recovery.js";
|
|
4
|
+
export type { CodingProcessEvent, CreateProcessSessionsOptions, ProcessExitResult, ProcessOutputChunk, ProcessPtyBackend, ProcessPtyHandle, ProcessPtyStartRequest, ProcessSandboxBackend, ProcessSandboxHandle, ProcessSandboxStartRequest, ProcessSession, ProcessSessionLimits, ProcessSessionMetadata, ProcessSessionState, ProcessSessions, ProcessStartRequest, ProcessTerminalRequest, ProcessTerminalResize, ResolvedProcessSessionLimits, } from "./types.js";
|
|
5
|
+
export { ProcessSessionError, resolveProcessSessionLimits } from "./types.js";
|
package/dist/process/index.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
// host-selected pty backend contract (plan 026 Task 1): explicit capabilities,
|
|
2
|
+
// bounded geometry/TERM, attach timeout, resize rate limit, backend metadata caps.
|
|
3
|
+
// durable process recovery seam (plan 026 Task 5): versioned recovery records,
|
|
4
|
+
// attach-if-attested recovery backend, ERR_PRISM_RECOVERY_* failures
|
|
5
|
+
export { acquireRecordLease, attachWithTimeout, buildProcessRecoveryRecord, deleteProcessRecoveryRecord, isOwnershipConflict, loadProcessRecoveryRecord, loadProcessRecoveryRecords, PROCESS_RECOVERY_CATEGORY, PROCESS_RECOVERY_LEASE_NAMESPACE, PROCESS_RECOVERY_NAMESPACE, PROCESS_RECOVERY_SCHEMA_VERSION, ProcessRecoveryError, releaseRecordLease, resolveProcessRecoveryLimits, saveProcessRecoveryRecord, validateBackendRef, validateProcessRecoveryRecord, } from "./recovery.js";
|
|
2
6
|
export { createProcessSessions } from "./sessions.js";
|
|
3
|
-
export {
|
|
7
|
+
export { ProcessSessionError, resolveProcessSessionLimits } from "./types.js";
|
|
4
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CheckpointStore,
|
|
1
|
+
import type { CheckpointStore, LeaseRecord, LeaseStore, OwnershipScope } from "@arnilo/prism";
|
|
2
2
|
import type { ProcessPtyHandle, ProcessSandboxHandle, ProcessSessionState } from "./types.js";
|
|
3
3
|
/** Versioned durable namespace for managed-process recovery records (separate from CodingCheckpointMetadata v1). */
|
|
4
4
|
export declare const PROCESS_RECOVERY_NAMESPACE = "prism.coding-agent.process.v1";
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Managed ProcessSession registry — native spawn or optional sandbox startProcess.
|
|
3
|
+
*/
|
|
1
4
|
import { type CreateProcessSessionsOptions, type ProcessSessions } from "./types.js";
|
|
2
5
|
export declare function createProcessSessions(options: CreateProcessSessionsOptions): ProcessSessions;
|
package/dist/process/sessions.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Managed ProcessSession registry — native spawn or optional sandbox startProcess.
|
|
3
3
|
*/
|
|
4
|
-
import { createHash, randomBytes } from "node:crypto";
|
|
5
4
|
import { spawn } from "node:child_process";
|
|
5
|
+
import { createHash, randomBytes } from "node:crypto";
|
|
6
6
|
import { isAbsolute, relative, resolve } from "node:path";
|
|
7
7
|
import { assertExecutionAllowed, ExecutionDeniedError } from "@arnilo/prism";
|
|
8
|
+
import { DEFAULT_MAX_TERMINAL_COLUMNS, DEFAULT_MAX_TERMINAL_ROWS } from "../limits.js";
|
|
8
9
|
import { OutputAccumulator } from "../output-accumulator.js";
|
|
9
10
|
import { resolveToCwd } from "../path-utils.js";
|
|
10
11
|
import { killProcessTree } from "../shell.js";
|
|
12
|
+
import { acquireRecordLease, attachWithTimeout, buildProcessRecoveryRecord, deleteProcessRecoveryRecord, loadProcessRecoveryRecord, loadProcessRecoveryRecords, PROCESS_RECOVERY_LEASE_NAMESPACE, ProcessRecoveryError, releaseRecordLease, resolveProcessRecoveryLimits, saveProcessRecoveryRecord, validateBackendRef, } from "./recovery.js";
|
|
11
13
|
import { ProcessSessionError, resolveProcessSessionLimits, } from "./types.js";
|
|
12
|
-
import { acquireRecordLease, attachWithTimeout, buildProcessRecoveryRecord, deleteProcessRecoveryRecord, loadProcessRecoveryRecord, loadProcessRecoveryRecords, PROCESS_RECOVERY_LEASE_NAMESPACE, releaseRecordLease, resolveProcessRecoveryLimits, saveProcessRecoveryRecord, validateBackendRef, } from "./recovery.js";
|
|
13
|
-
import { ProcessRecoveryError } from "./recovery.js";
|
|
14
|
-
import { DEFAULT_MAX_TERMINAL_COLUMNS, DEFAULT_MAX_TERMINAL_ROWS } from "../limits.js";
|
|
15
14
|
/** Default TERM for PTY sessions (validated <= maxTerminalTermBytes). */
|
|
16
15
|
const DEFAULT_TERM = "xterm-256color";
|
|
17
16
|
function ownershipKey(ownership, identity) {
|
package/dist/read.js
CHANGED
|
@@ -307,6 +307,7 @@ export function createReadTool(cwd, options) {
|
|
|
307
307
|
const maxScanBytes = validateCodingLimit("maxScanBytes", options?.maxScanBytes ?? DEFAULT_MAX_TEXT_SCAN_BYTES, HARD_MAX_TEXT_SCAN_BYTES);
|
|
308
308
|
return {
|
|
309
309
|
name: "read",
|
|
310
|
+
kind: "read",
|
|
310
311
|
effect: CODING_OBSERVATION_EFFECT,
|
|
311
312
|
description: `Read the contents of a file. Supports text files and images (jpg, png, gif, webp, bmp); images are returned as image content. For text files, output is truncated to ${maxLines} lines or ${maxBytes / 1024}KB (whichever is hit first). When truncated, continue with the suggested offset until complete. Prefer repo_search to find text across many files.`,
|
|
312
313
|
parameters: {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Repository glob family (0.2.5 plan 025 Task 1 split).
|
|
2
|
+
* Moved verbatim from repository.ts; public surface unchanged behind the barrel. */
|
|
1
3
|
import type { RepositoryGlobRequest, RepositoryGlobResult, ResolvedRepositoryLimits } from "./types.js";
|
|
2
4
|
import type { RepositoryWalk } from "./walk.js";
|
|
3
5
|
export declare function globLocal(request: RepositoryGlobRequest, defaults: ResolvedRepositoryLimits, walk: RepositoryWalk): Promise<RepositoryGlobResult>;
|
package/dist/repository/glob.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** Repository glob family (0.2.5 plan 025 Task 1 split).
|
|
2
2
|
* Moved verbatim from repository.ts; public surface unchanged behind the barrel. */
|
|
3
|
-
import { HARD_MAX_REPO_DEPTH, HARD_MAX_REPO_ENTRIES, HARD_MAX_REPO_RESULTS, validateCodingLimit, validateCodingLimitAllowZero, } from "../limits.js";
|
|
4
|
-
import { expandGlobBraces, matchGlobPattern, validateGlobPattern } from "../glob-match.js";
|
|
5
3
|
import { lstat } from "node:fs/promises";
|
|
6
|
-
import {
|
|
4
|
+
import { expandGlobBraces, matchGlobPattern, validateGlobPattern } from "../glob-match.js";
|
|
5
|
+
import { HARD_MAX_REPO_DEPTH, HARD_MAX_REPO_ENTRIES, HARD_MAX_REPO_RESULTS, validateCodingLimit, validateCodingLimitAllowZero, } from "../limits.js";
|
|
7
6
|
import { resolveRepoPath } from "./path.js";
|
|
7
|
+
import { RepositoryError } from "./types.js";
|
|
8
8
|
export async function globLocal(request, defaults, walk) {
|
|
9
9
|
try {
|
|
10
10
|
validateGlobPattern(request.pattern, defaults.maxPatternBytes, { braceExpansion: request.braceExpansion === true });
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Repository list family (0.2.5 plan 025 Task 1 split).
|
|
2
|
+
* Moved verbatim from repository.ts; public surface unchanged behind the barrel. */
|
|
1
3
|
import type { RepositoryListRequest, RepositoryListResult, ResolvedRepositoryLimits } from "./types.js";
|
|
2
4
|
import type { RepositoryWalk } from "./walk.js";
|
|
3
5
|
export declare function listLocal(request: RepositoryListRequest, defaults: ResolvedRepositoryLimits, walk: RepositoryWalk): Promise<RepositoryListResult>;
|
package/dist/repository/list.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** Repository list family (0.2.5 plan 025 Task 1 split).
|
|
2
2
|
* Moved verbatim from repository.ts; public surface unchanged behind the barrel. */
|
|
3
|
-
import { HARD_MAX_REPO_DEPTH, HARD_MAX_REPO_ENTRIES, HARD_MAX_REPO_RESULTS, validateCodingLimit, validateCodingLimitAllowZero, } from "../limits.js";
|
|
4
3
|
import { lstat } from "node:fs/promises";
|
|
5
|
-
import {
|
|
4
|
+
import { HARD_MAX_REPO_DEPTH, HARD_MAX_REPO_ENTRIES, HARD_MAX_REPO_RESULTS, validateCodingLimit, validateCodingLimitAllowZero, } from "../limits.js";
|
|
6
5
|
import { resolveRepoPath } from "./path.js";
|
|
6
|
+
import { RepositoryError } from "./types.js";
|
|
7
7
|
export async function listLocal(request, defaults, walk) {
|
|
8
8
|
const resolved = await resolveRepoPath(request.root, request.path);
|
|
9
9
|
const maxResults = validateCodingLimit("maxResults", request.maxResults ?? defaults.maxResults, HARD_MAX_REPO_RESULTS);
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/** Repository operations family (0.2.5 plan 025 Task 1 split).
|
|
2
|
+
* Moved verbatim from repository.ts; public surface unchanged behind the barrel. */
|
|
3
3
|
import { globLocal } from "./glob.js";
|
|
4
4
|
import { listLocal } from "./list.js";
|
|
5
5
|
import { searchLocal } from "./search.js";
|
|
6
|
+
import { resolveRepositoryLimits } from "./types.js";
|
|
7
|
+
import { walkRepository } from "./walk.js";
|
|
6
8
|
export function createLocalRepositoryOperations(limits, walk = walkRepository) {
|
|
7
9
|
const resolved = resolveRepositoryLimits(limits);
|
|
8
10
|
return {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Repository path family (0.2.5 plan 025 Task 1 split).
|
|
2
|
+
* Moved verbatim from repository.ts; public surface unchanged behind the barrel. */
|
|
1
3
|
import type { Dirent } from "node:fs";
|
|
2
4
|
import type { RepoEntryKind } from "./types.js";
|
|
3
5
|
export declare function toRepoRelative(root: string, absolutePath: string): string;
|
package/dist/repository/path.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** Repository path family (0.2.5 plan 025 Task 1 split).
|
|
2
2
|
* Moved verbatim from repository.ts; public surface unchanged behind the barrel. */
|
|
3
|
-
import { DEFAULT_BINARY_SNIFF_BYTES } from "../limits.js";
|
|
4
|
-
import { isAbsolute, relative, resolve, sep } from "node:path";
|
|
5
3
|
import { realpath } from "node:fs/promises";
|
|
4
|
+
import { isAbsolute, relative, resolve, sep } from "node:path";
|
|
5
|
+
import { DEFAULT_BINARY_SNIFF_BYTES } from "../limits.js";
|
|
6
6
|
import { resolveToCwd } from "../path-utils.js";
|
|
7
7
|
import { RepositoryError } from "./types.js";
|
|
8
8
|
export function toRepoRelative(root, absolutePath) {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Repository search family (0.2.5 plan 025 Task 1 split).
|
|
2
|
+
* Moved verbatim from repository.ts; public surface unchanged behind the barrel. */
|
|
1
3
|
import type { RepositorySearchRequest, RepositorySearchResult, ResolvedRepositoryLimits } from "./types.js";
|
|
2
4
|
import type { RepositoryWalk } from "./walk.js";
|
|
3
5
|
export declare function compileSearchPattern(query: string, caseSensitive: boolean, maxPatternBytes: number): {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** Repository search family (0.2.5 plan 025 Task 1 split).
|
|
2
2
|
* Moved verbatim from repository.ts; public surface unchanged behind the barrel. */
|
|
3
|
-
import { HARD_MAX_SEARCH_CONTEXT_LINES, HARD_MAX_SEARCH_MATCHES, validateCodingLimit, validateCodingLimitAllowZero } from "../limits.js";
|
|
4
3
|
import { lstat, open } from "node:fs/promises";
|
|
5
|
-
import {
|
|
4
|
+
import { HARD_MAX_SEARCH_CONTEXT_LINES, HARD_MAX_SEARCH_MATCHES, validateCodingLimit, validateCodingLimitAllowZero } from "../limits.js";
|
|
6
5
|
import { assertDeadline, assertNotAborted, isBinaryBuffer, resolveRepoPath } from "./path.js";
|
|
6
|
+
import { RepositoryError } from "./types.js";
|
|
7
7
|
export function compileSearchPattern(query, caseSensitive, maxPatternBytes) {
|
|
8
8
|
const patternBytes = Buffer.byteLength(query, "utf8");
|
|
9
9
|
if (patternBytes < 1)
|
package/dist/repository/walk.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { join } from "node:path";
|
|
2
1
|
import { lstat, opendir } from "node:fs/promises";
|
|
3
|
-
import {
|
|
2
|
+
import { join } from "node:path";
|
|
4
3
|
import { assertDeadline, assertNotAborted, isPathInsideRoot, kindFromDirent, shouldSkipName, toRepoRelative } from "./path.js";
|
|
4
|
+
import { RepositoryError } from "./types.js";
|
|
5
5
|
export async function* walkRepository(rootReal, startAbsolute, limits) {
|
|
6
6
|
const queue = [
|
|
7
7
|
{
|
package/dist/repository.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** Repository barrel (0.2.5 plan 025 Task 1 god-module split): re-exports the public
|
|
2
2
|
* repository surface from cohesive family modules so the import surface of
|
|
3
3
|
* `./repository.js` is unchanged (0.1.4 barrel precedent). */
|
|
4
|
-
export * from "./repository/types.js";
|
|
5
|
-
export * from "./repository/path.js";
|
|
6
|
-
export * from "./repository/walk.js";
|
|
7
|
-
export * from "./repository/list.js";
|
|
8
|
-
export * from "./repository/search.js";
|
|
9
4
|
export * from "./repository/glob.js";
|
|
10
|
-
export * from "./repository/operations.js";
|
|
11
5
|
export * from "./repository/indexed-search.js";
|
|
6
|
+
export * from "./repository/list.js";
|
|
7
|
+
export * from "./repository/operations.js";
|
|
8
|
+
export * from "./repository/path.js";
|
|
9
|
+
export * from "./repository/search.js";
|
|
10
|
+
export * from "./repository/types.js";
|
|
11
|
+
export * from "./repository/walk.js";
|
package/dist/repository.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/** Repository barrel (0.2.5 plan 025 Task 1 god-module split): re-exports the public
|
|
2
2
|
* repository surface from cohesive family modules so the import surface of
|
|
3
3
|
* `./repository.js` is unchanged (0.1.4 barrel precedent). */
|
|
4
|
-
export * from "./repository/types.js";
|
|
5
|
-
export * from "./repository/path.js";
|
|
6
|
-
export * from "./repository/walk.js";
|
|
7
|
-
export * from "./repository/list.js";
|
|
8
|
-
export * from "./repository/search.js";
|
|
9
4
|
export * from "./repository/glob.js";
|
|
10
|
-
export * from "./repository/operations.js";
|
|
11
5
|
export * from "./repository/indexed-search.js";
|
|
6
|
+
export * from "./repository/list.js";
|
|
7
|
+
export * from "./repository/operations.js";
|
|
8
|
+
export * from "./repository/path.js";
|
|
9
|
+
export * from "./repository/search.js";
|
|
10
|
+
export * from "./repository/types.js";
|
|
11
|
+
export * from "./repository/walk.js";
|
|
12
12
|
//# sourceMappingURL=repository.js.map
|
package/dist/search.js
CHANGED
|
@@ -135,6 +135,7 @@ export function createRepoSearchTool(cwd, options) {
|
|
|
135
135
|
const indexedEnabled = modes.some((m) => m !== "literal");
|
|
136
136
|
return {
|
|
137
137
|
name: "repo_search",
|
|
138
|
+
kind: "search",
|
|
138
139
|
effect: CODING_OBSERVATION_EFFECT,
|
|
139
140
|
description: indexedEnabled
|
|
140
141
|
? `Search text files under the workspace. Modes: ${modeDescriptions}. Index results are untrusted host index output and may be stale; verify before mutation. Skips binary files and excluded basenames (default: ${limits.exclude.join(", ")}). Caps matches/scanned bytes/time.`
|
package/dist/shell.js
CHANGED
|
@@ -265,6 +265,7 @@ export function createShellTool(cwd, options) {
|
|
|
265
265
|
const tempFilePrefix = options?.tempFilePrefix ?? "prism-shell";
|
|
266
266
|
return {
|
|
267
267
|
name: "shell",
|
|
268
|
+
kind: "execute",
|
|
268
269
|
effect: CODING_UNSUPPORTED_EFFECT,
|
|
269
270
|
exclusive: true,
|
|
270
271
|
description: `Execute a shell command in the current working directory. Returns combined stdout and stderr. Prefer repo_list, repo_search, glob, read, write, edit, delete, or move for those jobs — use shell only when no dedicated tool fits. Output is truncated to the last ${maxLines} lines or ${maxBytes / 1024}KB and capped at ${formatSize(maxTotalOutputBytes)} total. Truncated successful output is saved to a temp file. Timeout defaults to ${defaultTimeout} seconds.`,
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ownership-scoped multi-repository and worktree lifecycle (plan 026 Task 3).
|
|
3
|
+
*
|
|
4
|
+
* A durable coding workspace correlates task/session/run identity with host
|
|
5
|
+
* repositories and linked worktrees. The lifecycle composes existing bounded
|
|
6
|
+
* primitives only: `CheckpointStore` CAS records (versioned namespace, never
|
|
7
|
+
* `CodingCheckpointMetadata` v1), `LeaseStore` fencing, and cwd-bound
|
|
8
|
+
* `GitOperations` runners. There is no clone manager, Git library, watcher,
|
|
9
|
+
* new database schema, or second task runtime.
|
|
10
|
+
*
|
|
11
|
+
* The main worktree of every registered repository is immutable through this
|
|
12
|
+
* service: only linked worktrees created by `create` are ever locked,
|
|
13
|
+
* verified, or removed. Roots, worktree destinations, and loaded records are
|
|
14
|
+
* canonicalized and containment-checked under host-approved roots; remote
|
|
15
|
+
* identity is stored as a credential-free fingerprint, never a URL.
|
|
16
|
+
*/
|
|
1
17
|
import type { ArtifactReference, GitOperations } from "./git.js";
|
|
2
18
|
/** Separate versioned namespace: never collides with coding checkpoint v1 keys. */
|
|
3
19
|
export declare const WORKSPACE_NAMESPACE: "prism.coding-agent.workspace.v1";
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* canonicalized and containment-checked under host-approved roots; remote
|
|
15
15
|
* identity is stored as a credential-free fingerprint, never a URL.
|
|
16
16
|
*/
|
|
17
|
+
import { createHash } from "node:crypto";
|
|
17
18
|
import { access, realpath } from "node:fs/promises";
|
|
18
19
|
import { isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
19
|
-
import {
|
|
20
|
-
import { createHash } from "node:crypto";
|
|
20
|
+
import { DEFAULT_MAX_CODING_ARTIFACTS, DEFAULT_MAX_WORKSPACE_CLEANUP_OPERATIONS, DEFAULT_MAX_WORKSPACE_LEASE_TTL_MS, DEFAULT_MAX_WORKSPACE_RECORD_BYTES, DEFAULT_MAX_WORKSPACE_REPOSITORIES, DEFAULT_MAX_WORKSPACE_WORKTREES, HARD_MAX_CODING_ARTIFACTS, HARD_MAX_WORKSPACE_CLEANUP_OPERATIONS, HARD_MAX_WORKSPACE_LEASE_TTL_MS, HARD_MAX_WORKSPACE_RECORD_BYTES, HARD_MAX_WORKSPACE_REPOSITORIES, HARD_MAX_WORKSPACE_WORKTREES, validateCodingLimit, } from "./limits.js";
|
|
21
21
|
/** Separate versioned namespace: never collides with coding checkpoint v1 keys. */
|
|
22
22
|
export const WORKSPACE_NAMESPACE = "prism.coding-agent.workspace.v1";
|
|
23
23
|
export const WORKSPACE_SCHEMA_VERSION = 1;
|
package/dist/write.js
CHANGED
|
@@ -46,6 +46,7 @@ export function createWriteTool(cwd, options) {
|
|
|
46
46
|
const maxInputBytes = validateCodingLimit("maxInputBytes", options?.maxInputBytes ?? DEFAULT_MAX_WRITE_BYTES, HARD_MAX_WRITE_BYTES);
|
|
47
47
|
return {
|
|
48
48
|
name: "write",
|
|
49
|
+
kind: "edit",
|
|
49
50
|
effect: CODING_LOCAL_EFFECT,
|
|
50
51
|
description: "Create or overwrite a file (full replace). Creates parent directories. Prefer edit for targeted changes. When the host enabled requireReadBeforeWrite, read the path first or pass force=true to override.",
|
|
51
52
|
parameters: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arnilo/prism-coding-agent",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Optional coding-agent tools (shell, read, write, edit, repo_list, repo_search, glob, delete, move, opt-in Git/check/ask-user-decision, and durable plan/checkpoint helpers) package for Prism.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"diff": "^9.0.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@arnilo/prism": "0.2.
|
|
32
|
-
"@arnilo/prism-workflows": "0.2.
|
|
31
|
+
"@arnilo/prism": "0.2.8",
|
|
32
|
+
"@arnilo/prism-workflows": "0.2.8"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@arnilo/prism": "file:../..",
|