@octopi-agent/engine 0.86.38 → 0.97.15
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/config-admin/agent-presets.d.ts +70 -0
- package/dist/config-admin/agent-presets.js +243 -0
- package/dist/config-admin/discover.d.ts +30 -0
- package/dist/config-admin/discover.js +48 -0
- package/dist/config-admin/env.d.ts +22 -0
- package/dist/config-admin/env.js +41 -0
- package/dist/config-admin/index.d.ts +20 -0
- package/dist/config-admin/index.js +15 -0
- package/dist/config-admin/model-presets.d.ts +75 -0
- package/dist/config-admin/model-presets.js +249 -0
- package/dist/config-admin/name-guard.d.ts +14 -0
- package/dist/config-admin/name-guard.js +24 -0
- package/dist/config-admin/patch.d.ts +56 -0
- package/dist/config-admin/patch.js +201 -0
- package/dist/config-admin/port.d.ts +68 -0
- package/dist/config-admin/port.js +21 -0
- package/dist/config-admin/redact.d.ts +39 -0
- package/dist/config-admin/redact.js +42 -0
- package/dist/config-schema/agent.d.ts +43 -1
- package/dist/config-schema/agent.js +12 -5
- package/dist/config-schema/context.d.ts +7 -2
- package/dist/config-schema/context.js +8 -0
- package/dist/config-schema/engine.d.ts +110 -8
- package/dist/config-schema/governance.d.ts +43 -1
- package/dist/config-schema/governance.js +160 -2
- package/dist/config-schema/models.d.ts +7 -4
- package/dist/config-schema/models.js +4 -1
- package/dist/config-schema/observability.d.ts +9 -0
- package/dist/config-schema/observability.js +29 -0
- package/dist/config-schema/run.d.ts +3 -0
- package/dist/config-schema/run.js +14 -0
- package/dist/config-schema/shared.d.ts +3 -0
- package/dist/config-schema/shared.js +12 -0
- package/dist/config-schema/substrate.d.ts +1 -1
- package/dist/config.d.ts +60 -13
- package/dist/config.js +81 -78
- package/dist/harness/activation/dispatcher.d.ts +8 -2
- package/dist/harness/activation/dispatcher.js +33 -5
- package/dist/harness/activation/inbox.d.ts +87 -0
- package/dist/harness/activation/inbox.js +169 -0
- package/dist/harness/activation/runtime.d.ts +9 -8
- package/dist/harness/activation/runtime.js +100 -8
- package/dist/harness/activation/types.d.ts +19 -0
- package/dist/harness/activation/types.js +2 -0
- package/dist/harness/agent/builder.d.ts +18 -3
- package/dist/harness/agent/builder.js +42 -17
- package/dist/harness/agent/config-bridge.d.ts +5 -0
- package/dist/harness/agent/config-bridge.js +7 -1
- package/dist/harness/agent/config-integrity.d.ts +72 -0
- package/dist/harness/agent/config-integrity.js +146 -0
- package/dist/harness/agent/tool-purpose.d.ts +9 -1
- package/dist/harness/agent/tool-purpose.js +11 -2
- package/dist/harness/agent/wire-agent-builder.js +11 -3
- package/dist/harness/collaboration/autonomous-subsystem/boundary/validator.d.ts +11 -1
- package/dist/harness/collaboration/autonomous-subsystem/boundary/validator.js +11 -1
- package/dist/harness/collaboration/autonomous-subsystem/loader.d.ts +13 -0
- package/dist/harness/collaboration/autonomous-subsystem/loader.js +16 -1
- package/dist/harness/collaboration/autonomous-subsystem/runtime.d.ts +4 -0
- package/dist/harness/collaboration/autonomous-subsystem/runtime.js +3 -1
- package/dist/harness/collaboration/autonomous-subsystem/think/executor.js +3 -1
- package/dist/harness/collaboration/delegation/child-run.js +21 -5
- package/dist/harness/collaboration/delegation/notifier.js +4 -3
- package/dist/harness/collaboration/delegation/service.js +2 -3
- package/dist/harness/collaboration/delegation/wiring.js +6 -5
- package/dist/harness/collaboration/orchestration/reflector/llm-reflector.d.ts +1 -1
- package/dist/harness/collaboration/orchestration/reflector/llm-reflector.js +1 -1
- package/dist/harness/context/capabilities/compact/engine.d.ts +30 -0
- package/dist/harness/context/capabilities/compact/engine.js +198 -46
- package/dist/harness/context/capabilities/compact/handover.d.ts +78 -0
- package/dist/harness/context/capabilities/compact/handover.js +107 -0
- package/dist/harness/context/capabilities/compact/index.d.ts +3 -1
- package/dist/harness/context/capabilities/compact/index.js +2 -1
- package/dist/harness/context/capabilities/compact/types.d.ts +30 -1
- package/dist/harness/context/capabilities/summary/executor.js +2 -1
- package/dist/harness/context/capabilities/summary/policies.js +8 -5
- package/dist/harness/context/constitution/default-agents.md +11 -10
- package/dist/harness/context/default-context-engine.d.ts +34 -4
- package/dist/harness/context/default-context-engine.js +198 -53
- package/dist/harness/context/hybrid-compressor.js +6 -0
- package/dist/harness/context/layer-types.d.ts +36 -0
- package/dist/harness/context/layer-types.js +38 -0
- package/dist/harness/context/llm-summarizer.d.ts +2 -8
- package/dist/harness/context/llm-summarizer.js +69 -91
- package/dist/harness/context/message-selector.js +4 -3
- package/dist/harness/context/root-instructions.js +1 -1
- package/dist/harness/context/summarize.d.ts +2 -0
- package/dist/harness/context/summarize.js +7 -2
- package/dist/harness/context/system-prompt-assembler.js +10 -4
- package/dist/harness/context/tool-result-aging.js +2 -2
- package/dist/harness/context/truncate-compressor.js +7 -0
- package/dist/harness/context/turn-envelope.d.ts +4 -3
- package/dist/harness/context/turn-envelope.js +4 -3
- package/dist/harness/context/types.d.ts +33 -1
- package/dist/harness/extension/execution-environment/dangerous-commands.d.ts +28 -0
- package/dist/harness/extension/execution-environment/dangerous-commands.js +129 -0
- package/dist/harness/extension/execution-environment/effect-policy.d.ts +133 -4
- package/dist/harness/extension/execution-environment/effect-policy.js +263 -14
- package/dist/harness/extension/execution-environment/index.d.ts +4 -2
- package/dist/harness/extension/execution-environment/index.js +2 -1
- package/dist/harness/extension/execution-environment/isolation.js +5 -1
- package/dist/harness/extension/execution-environment/kill-switch.d.ts +34 -0
- package/dist/harness/extension/execution-environment/kill-switch.js +46 -0
- package/dist/harness/extension/execution-environment/ops-audit.d.ts +200 -0
- package/dist/harness/extension/execution-environment/ops-audit.js +338 -0
- package/dist/harness/extension/execution-environment/privileged-exec.d.ts +158 -0
- package/dist/harness/extension/execution-environment/privileged-exec.js +418 -0
- package/dist/harness/extension/execution-environment/process-info.d.ts +180 -0
- package/dist/harness/extension/execution-environment/process-info.js +466 -0
- package/dist/harness/extension/execution-environment/process-isolation.d.ts +7 -0
- package/dist/harness/extension/execution-environment/process-isolation.js +9 -0
- package/dist/harness/extension/execution-environment/sandbox.d.ts +109 -0
- package/dist/harness/extension/execution-environment/sandbox.js +264 -29
- package/dist/harness/extension/execution-environment/tool-capabilities.d.ts +1 -1
- package/dist/harness/extension/execution-environment/tool-capabilities.js +6 -0
- package/dist/harness/extension/execution-environment/types.d.ts +19 -0
- package/dist/harness/extension/plugin-ecosystem/channel-types.d.ts +5 -0
- package/dist/harness/extension/plugin-ecosystem/tools/allowlisted-run.d.ts +6 -0
- package/dist/harness/extension/plugin-ecosystem/tools/allowlisted-run.js +50 -0
- package/dist/harness/extension/plugin-ecosystem/tools/ask-user.d.ts +4 -5
- package/dist/harness/extension/plugin-ecosystem/tools/ask-user.js +5 -15
- package/dist/harness/extension/plugin-ecosystem/tools/builtin.d.ts +3 -0
- package/dist/harness/extension/plugin-ecosystem/tools/builtin.js +53 -2
- package/dist/harness/extension/plugin-ecosystem/tools/file-search.js +10 -17
- package/dist/harness/extension/plugin-ecosystem/tools/git-runner.d.ts +31 -0
- package/dist/harness/extension/plugin-ecosystem/tools/git-runner.js +104 -0
- package/dist/harness/extension/plugin-ecosystem/tools/git-status-snapshot.d.ts +111 -0
- package/dist/harness/extension/plugin-ecosystem/tools/git-status-snapshot.js +197 -0
- package/dist/harness/extension/plugin-ecosystem/tools/git-tools.d.ts +8 -8
- package/dist/harness/extension/plugin-ecosystem/tools/git-tools.js +9 -100
- package/dist/harness/extension/plugin-ecosystem/tools/index.d.ts +6 -0
- package/dist/harness/extension/plugin-ecosystem/tools/index.js +4 -0
- package/dist/harness/extension/plugin-ecosystem/tools/privileged-tool.d.ts +43 -0
- package/dist/harness/extension/plugin-ecosystem/tools/privileged-tool.js +350 -0
- package/dist/harness/extension/plugin-ecosystem/tools/process-tools.d.ts +30 -0
- package/dist/harness/extension/plugin-ecosystem/tools/process-tools.js +137 -0
- package/dist/harness/governance/human-in-the-loop/decision-cache.d.ts +54 -4
- package/dist/harness/governance/human-in-the-loop/decision-cache.js +42 -16
- package/dist/harness/governance/security/temp-path.d.ts +9 -0
- package/dist/harness/governance/security/temp-path.js +13 -2
- package/dist/harness/governance/session-acl/seed-roles.js +14 -0
- package/dist/harness/index.d.ts +4 -0
- package/dist/harness/index.js +3 -0
- package/dist/harness/knowledge/file-identity.d.ts +8 -0
- package/dist/harness/knowledge/file-identity.js +26 -1
- package/dist/harness/knowledge/fts.js +1 -2
- package/dist/harness/knowledge/grounding.js +5 -5
- package/dist/harness/knowledge/index-store.d.ts +31 -4
- package/dist/harness/knowledge/index-store.js +180 -48
- package/dist/harness/knowledge/ingest.d.ts +115 -115
- package/dist/harness/knowledge/ingest.js +150 -150
- package/dist/harness/knowledge/knowledge-serve-child.js +1 -1
- package/dist/harness/knowledge/purge.js +4 -1
- package/dist/harness/memory/backfill-coverage.js +3 -1
- package/dist/harness/memory/sqlite/keyword-search.d.ts +1 -0
- package/dist/harness/memory/sqlite/keyword-search.js +4 -3
- package/dist/harness/observability/observer/hub.js +38 -1
- package/dist/harness/observability/observer/run-snapshot.js +1 -0
- package/dist/harness/observability/observer/types.d.ts +27 -0
- package/dist/harness/run/agent/agent.d.ts +7 -0
- package/dist/harness/run/agent/agent.js +23 -1
- package/dist/harness/run/reliability/fallback-provider.d.ts +117 -5
- package/dist/harness/run/reliability/fallback-provider.js +262 -22
- package/dist/harness/run/reliability/harness-events.d.ts +24 -1
- package/dist/harness/run/reliability/model-error-policy.d.ts +32 -0
- package/dist/harness/run/reliability/model-error-policy.js +42 -0
- package/dist/harness/run/reliability/provider-wrapper.js +29 -2
- package/dist/harness/run/reliability/refusal-guard.d.ts +20 -0
- package/dist/harness/run/reliability/refusal-guard.js +102 -0
- package/dist/harness/run/reliability/run-agent.js +231 -33
- package/dist/harness/run/run-guard/default-run-guard.js +1 -1
- package/dist/harness/run/run-scope.d.ts +31 -0
- package/dist/harness/run/runner.d.ts +132 -2
- package/dist/harness/run/runner.js +679 -60
- package/dist/harness/session/attachments/llm-intent.js +2 -1
- package/dist/harness/session/history/port.js +15 -5
- package/dist/harness/session/in-memory-store.d.ts +5 -0
- package/dist/harness/session/in-memory-store.js +33 -2
- package/dist/harness/session/tasks/render.d.ts +4 -1
- package/dist/harness/session/tasks/render.js +10 -7
- package/dist/harness/session/title.js +25 -9
- package/dist/harness/shared/events/agent-event-map.d.ts +92 -0
- package/dist/harness/shared/events/agent-event-map.js +7 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +4 -3
- package/dist/integration/agent-runtime/channel-message-source.js +19 -1
- package/dist/integration/index.d.ts +2 -0
- package/dist/integration/index.js +1 -0
- package/dist/integration/observability/loop-watchdog.d.ts +56 -0
- package/dist/integration/observability/loop-watchdog.js +177 -0
- package/dist/integration/observability/metrics.d.ts +3 -0
- package/dist/integration/observability/metrics.js +18 -7
- package/dist/integration/observability/run-telemetry.d.ts +8 -0
- package/dist/integration/observability/run-telemetry.js +31 -8
- package/dist/integration/observability/trace-collector.js +26 -4
- package/dist/integration/observability/trace-events.d.ts +1 -0
- package/dist/integration/observability/trace-events.js +2 -0
- package/dist/integration/observability/trace-logger.js +27 -17
- package/dist/integration/providers/anthropic.d.ts +23 -0
- package/dist/integration/providers/anthropic.js +97 -12
- package/dist/integration/providers/fetch-timeout.d.ts +42 -0
- package/dist/integration/providers/fetch-timeout.js +51 -0
- package/dist/integration/providers/openai.d.ts +10 -0
- package/dist/integration/providers/openai.js +58 -11
- package/dist/integration/providers/provider-diagnostics.d.ts +80 -0
- package/dist/integration/providers/provider-diagnostics.js +89 -0
- package/dist/integration/providers/timeout-coherence.d.ts +52 -0
- package/dist/integration/providers/timeout-coherence.js +68 -0
- package/dist/integration/providers/wire-dump.d.ts +62 -0
- package/dist/integration/providers/wire-dump.js +111 -2
- package/dist/integration/storage/jsonl.d.ts +19 -1
- package/dist/integration/storage/jsonl.js +100 -4
- package/dist/paths.d.ts +19 -0
- package/dist/paths.js +38 -1
- package/dist/subsystems/cognition-steward/conceptualize/handler.js +1 -1
- package/dist/subsystems/memory-steward/backfill/handler.js +1 -1
- package/dist/subsystems/safety-guard/config.yaml +3 -1
- package/dist/subsystems/wisdom-steward/formation/handler.js +1 -1
- package/package.json +3 -2
|
@@ -4,25 +4,23 @@
|
|
|
4
4
|
* 通过工厂函数接收 AskUserCallback(闭包注入),与 UI 层解耦。
|
|
5
5
|
* 回调持有「等回答」的 Promise;Gateway/UI 提供答案后工具才返回。
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* 无超时(2026-10-26 拍板):需要用户确认的问题不能被时间自动跳过。
|
|
8
|
+
* 退出只有两路:会话中止(abortSignal)或 Gateway 取消(ASK_USER_CANCELLED 哨兵)。
|
|
9
|
+
* definition 不声明 timeoutMs,工具总线(runWithToolLimits)因此不设看门狗。
|
|
8
10
|
*/
|
|
9
11
|
/** Gateway cancel 哨兵(与 gateway.ASK_USER_CANCELLED 同值,避免 harness→integration 依赖) */
|
|
10
12
|
export const ASK_USER_CANCELLED = '__ask_user_cancelled__';
|
|
11
|
-
/** 默认等待用户回答的上限(与 definition.timeoutMs 对齐) */
|
|
12
|
-
const DEFAULT_ASK_TIMEOUT_MS = 300_000;
|
|
13
13
|
/**
|
|
14
14
|
* 创建 ask_user 工具
|
|
15
15
|
*
|
|
16
16
|
* @param callback - 等待用户回答的回调(通常由 Gateway 挂 pending question)
|
|
17
|
-
* @param options.timeoutMs - 等待上限;超时返回错误而不是悬挂
|
|
18
17
|
*/
|
|
19
|
-
export function createAskUserTool(callback
|
|
20
|
-
const timeoutMs = options?.timeoutMs ?? DEFAULT_ASK_TIMEOUT_MS;
|
|
18
|
+
export function createAskUserTool(callback) {
|
|
21
19
|
return {
|
|
22
20
|
definition: {
|
|
23
21
|
name: 'ask_user',
|
|
24
22
|
capabilities: [],
|
|
25
|
-
description: 'Ask the user a question and wait for their response. Use when you need clarification, confirmation, or a choice from the user. Optionally provide a list of suggested options. Do not use for things you can look up yourself.',
|
|
23
|
+
description: 'Ask the user a question and wait for their response. Use when you need clarification, confirmation, or a choice from the user. Optionally provide a list of suggested options. Do not use for things you can look up yourself. There is no timeout — the question waits until the user answers, or the run is aborted.',
|
|
26
24
|
parameters: {
|
|
27
25
|
question: {
|
|
28
26
|
type: 'string',
|
|
@@ -35,7 +33,6 @@ export function createAskUserTool(callback, options) {
|
|
|
35
33
|
items: { type: 'string', description: 'An option' },
|
|
36
34
|
},
|
|
37
35
|
},
|
|
38
|
-
timeoutMs,
|
|
39
36
|
},
|
|
40
37
|
handler: async (args, context) => {
|
|
41
38
|
const question = String(args.question ?? '').trim();
|
|
@@ -54,11 +51,8 @@ export function createAskUserTool(callback, options) {
|
|
|
54
51
|
return { answer: null, error: 'aborted before asking user' };
|
|
55
52
|
}
|
|
56
53
|
const abortSignal = context?.abortSignal;
|
|
57
|
-
let timer;
|
|
58
54
|
const answer = await new Promise((resolve, reject) => {
|
|
59
55
|
const cleanup = () => {
|
|
60
|
-
if (timer !== undefined)
|
|
61
|
-
clearTimeout(timer);
|
|
62
56
|
abortSignal?.removeEventListener('abort', onAbort);
|
|
63
57
|
};
|
|
64
58
|
const onAbort = () => {
|
|
@@ -72,10 +66,6 @@ export function createAskUserTool(callback, options) {
|
|
|
72
66
|
return;
|
|
73
67
|
}
|
|
74
68
|
}
|
|
75
|
-
timer = setTimeout(() => {
|
|
76
|
-
cleanup();
|
|
77
|
-
reject(new Error(`ask_user timed out after ${timeoutMs}ms`));
|
|
78
|
-
}, timeoutMs);
|
|
79
69
|
callback(question, options, ctx).then((value) => {
|
|
80
70
|
cleanup();
|
|
81
71
|
resolve(value);
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
* - file_search: 跨文件内容搜索
|
|
9
9
|
* - http_request: HTTP 请求
|
|
10
10
|
* - env_info: 运行环境信息
|
|
11
|
+
* - process_list: 只读进程诊断(进程表/资源/祖先链)
|
|
12
|
+
* - priv_exec: 白名单提权执行(ops P3,全等匹配 + 确认闸)
|
|
11
13
|
*
|
|
12
14
|
* 所有有状态工具(memory、task、ask_user)通过 extension-tools 按需注入。
|
|
13
15
|
*
|
|
@@ -32,6 +34,7 @@ import type { RegisteredTool } from '@octopi-agent/core/types.js';
|
|
|
32
34
|
* - exitCode: 退出码
|
|
33
35
|
* - durationMs: 执行耗时
|
|
34
36
|
* - shell: 实际使用的 shell(kind/executable)
|
|
37
|
+
* - hints: 沙箱归因提示(仅当 jail 拒绝并已归因时出现,如 setuid exec)
|
|
35
38
|
*/
|
|
36
39
|
export declare function createShellTool(options?: {
|
|
37
40
|
summary?: import('../../../context/capabilities/summary/index.js').ToolSummarySupport;
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
* - file_search: 跨文件内容搜索
|
|
9
9
|
* - http_request: HTTP 请求
|
|
10
10
|
* - env_info: 运行环境信息
|
|
11
|
+
* - process_list: 只读进程诊断(进程表/资源/祖先链)
|
|
12
|
+
* - priv_exec: 白名单提权执行(ops P3,全等匹配 + 确认闸)
|
|
11
13
|
*
|
|
12
14
|
* 所有有状态工具(memory、task、ask_user)通过 extension-tools 按需注入。
|
|
13
15
|
*
|
|
@@ -26,6 +28,8 @@ import { createGitTools } from './git-tools.js';
|
|
|
26
28
|
import { createPackageTools } from './package-tools.js';
|
|
27
29
|
import { createHttpRequestTool } from './http.js';
|
|
28
30
|
import { createEnvInfoTool } from './env-info.js';
|
|
31
|
+
import { createProcessListTool } from './process-tools.js';
|
|
32
|
+
import { createPrivExecTool } from './privileged-tool.js';
|
|
29
33
|
import { createDocumentProbeTool, createDocumentReadTool } from './document-tools.js';
|
|
30
34
|
import { isUnderSessionUndoRoot, defaultPathEnv, isPathUnderRoots, isUnderAttachmentRoot, resolvePlatformShell, resolveReadableToolPath, resolveToolPath, } from './platform.js';
|
|
31
35
|
/**
|
|
@@ -42,6 +46,7 @@ import { isUnderSessionUndoRoot, defaultPathEnv, isPathUnderRoots, isUnderAttach
|
|
|
42
46
|
* - exitCode: 退出码
|
|
43
47
|
* - durationMs: 执行耗时
|
|
44
48
|
* - shell: 实际使用的 shell(kind/executable)
|
|
49
|
+
* - hints: 沙箱归因提示(仅当 jail 拒绝并已归因时出现,如 setuid exec)
|
|
45
50
|
*/
|
|
46
51
|
export function createShellTool(options) {
|
|
47
52
|
const shell = resolvePlatformShell();
|
|
@@ -54,7 +59,7 @@ export function createShellTool(options) {
|
|
|
54
59
|
definition: {
|
|
55
60
|
name: 'shell',
|
|
56
61
|
capabilities: ['exec'],
|
|
57
|
-
description: `LAST RESORT shell. Prefer a dedicated tool when one covers the job (file_read/file_list/file_write/file_edit/file_delete/file_mkdir/file_rename/file_copy/file_stat/file_rmdir/file_search/env_info/git_status/git_diff/git_log/git_show/git_commit/git_branch/git_restore/package_edit/project_run/package_install and any task-specific tools). Use shell only when: no dedicated tool covers the operation, the dedicated tool is unavailable, or it still fails after a correct retry (wrong path/args → fix and retry the tool first). Never use shell instead of a working dedicated tool. Detected shell: ${shell.label}. ${syntaxHint}`,
|
|
62
|
+
description: `LAST RESORT shell. Prefer a dedicated tool when one covers the job (file_read/file_list/file_write/file_edit/file_delete/file_mkdir/file_rename/file_copy/file_stat/file_rmdir/file_search/env_info/process_list/git_status/git_diff/git_log/git_show/git_commit/git_branch/git_restore/package_edit/project_run/package_install and any task-specific tools). Use shell only when: no dedicated tool covers the operation, the dedicated tool is unavailable, or it still fails after a correct retry (wrong path/args → fix and retry the tool first). Never use shell instead of a working dedicated tool. Detected shell: ${shell.label}. ${syntaxHint}`,
|
|
58
63
|
parameters: {
|
|
59
64
|
command: {
|
|
60
65
|
type: 'string',
|
|
@@ -76,7 +81,7 @@ export function createShellTool(options) {
|
|
|
76
81
|
handler: async (args, context) => {
|
|
77
82
|
const command = args.command;
|
|
78
83
|
const cwd = args.cwd ?? context?.cwd ?? process.cwd();
|
|
79
|
-
await gateEffect({ kind: 'shell', command: args.command, cwd: typeof cwd === 'string' ? cwd : undefined }, {
|
|
84
|
+
const gateResult = await gateEffect({ kind: 'shell', command: args.command, cwd: typeof cwd === 'string' ? cwd : undefined }, {
|
|
80
85
|
effects: context?.effectChannel ?? 'engine',
|
|
81
86
|
confirmEffect: context?.confirmEffect,
|
|
82
87
|
shellEscape: context?.shellEscape,
|
|
@@ -122,6 +127,7 @@ export function createShellTool(options) {
|
|
|
122
127
|
allowRoots: [resolvedCwd, ...(context?.pathRoots ?? []).filter(Boolean)],
|
|
123
128
|
networkPolicy: context?.networkPolicy ?? 'deny',
|
|
124
129
|
requireJail: context?.requireJail,
|
|
130
|
+
disableJail: context?.disableJail,
|
|
125
131
|
homeWrite: context?.homeWrite,
|
|
126
132
|
noteSecurityDegraded: context?.noteSecurityDegraded,
|
|
127
133
|
signal: context?.abortSignal,
|
|
@@ -130,6 +136,43 @@ export function createShellTool(options) {
|
|
|
130
136
|
maxOutputBytes: 16 * 1024 * 1024,
|
|
131
137
|
},
|
|
132
138
|
});
|
|
139
|
+
// ops P2 §7:统一动作记录(argv/cwd/退出码/耗时/确认态/jail)——审计失败不阻断业务
|
|
140
|
+
try {
|
|
141
|
+
const { isJailBackend } = await import('../../execution-environment/process-isolation.js');
|
|
142
|
+
context?.recordOpsEvent?.({
|
|
143
|
+
event: 'ops.command.executed',
|
|
144
|
+
data: {
|
|
145
|
+
tool: 'shell',
|
|
146
|
+
argv: [resolvedShell.executable, ...resolvedShell.args, command],
|
|
147
|
+
cwd: resolvedCwd,
|
|
148
|
+
exitCode: sandboxResult.exitCode,
|
|
149
|
+
durationMs: sandboxResult.usage.elapsedMs,
|
|
150
|
+
escalated: false,
|
|
151
|
+
// 确认态取闸门实际放行结论(通道配置≠本次决策;自动放行如实记 false)
|
|
152
|
+
confirmed: gateResult.confirmed,
|
|
153
|
+
confirmSource: gateResult.confirmSource,
|
|
154
|
+
// ops P5:确认人归因(人工批准时随闸门回传;缓存命中/自动放行如实缺省)
|
|
155
|
+
...(gateResult.confirmedBy !== undefined ? { confirmedBy: gateResult.confirmedBy } : {}),
|
|
156
|
+
...(gateResult.confirmChannel !== undefined
|
|
157
|
+
? { confirmChannel: gateResult.confirmChannel }
|
|
158
|
+
: {}),
|
|
159
|
+
jail: {
|
|
160
|
+
backend: sandboxResult.isolation.backend,
|
|
161
|
+
unconfined: context?.disableJail === true || !isJailBackend(sandboxResult.isolation.backend),
|
|
162
|
+
},
|
|
163
|
+
// 注入源不明标记(§5 P2):工具调用带 session/run 归属 = 已归因
|
|
164
|
+
originAttributed: Boolean(context?.sessionId),
|
|
165
|
+
origin: {
|
|
166
|
+
sessionId: context?.sessionId,
|
|
167
|
+
agentId: context?.agentId,
|
|
168
|
+
runId: context?.runId ?? null,
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
// 审计回传失败不阻断 shell 业务结果(写失败的降级申报在 runner 侧)
|
|
175
|
+
}
|
|
133
176
|
try {
|
|
134
177
|
// §5.6:after diff 入账本 / 不可逆清单
|
|
135
178
|
try {
|
|
@@ -182,6 +225,9 @@ export function createShellTool(options) {
|
|
|
182
225
|
terminated: sandboxResult.terminated,
|
|
183
226
|
terminateReason: sandboxResult.terminateReason,
|
|
184
227
|
isolation: sandboxResult.isolation,
|
|
228
|
+
...(sandboxResult.diagnostics?.hints?.length
|
|
229
|
+
? { hints: sandboxResult.diagnostics.hints }
|
|
230
|
+
: {}),
|
|
185
231
|
shell: {
|
|
186
232
|
kind: resolvedShell.kind,
|
|
187
233
|
executable: resolvedShell.executable,
|
|
@@ -200,6 +246,9 @@ export function createShellTool(options) {
|
|
|
200
246
|
terminated: sandboxResult.terminated,
|
|
201
247
|
terminateReason: sandboxResult.terminateReason,
|
|
202
248
|
isolation: sandboxResult.isolation,
|
|
249
|
+
...(sandboxResult.diagnostics?.hints?.length
|
|
250
|
+
? { hints: sandboxResult.diagnostics.hints }
|
|
251
|
+
: {}),
|
|
203
252
|
shell: {
|
|
204
253
|
kind: resolvedShell.kind,
|
|
205
254
|
executable: resolvedShell.executable,
|
|
@@ -771,6 +820,8 @@ export function getBuiltinTools(options) {
|
|
|
771
820
|
requireBindings: options?.requireCredentialBindings,
|
|
772
821
|
}),
|
|
773
822
|
createEnvInfoTool(),
|
|
823
|
+
createProcessListTool(),
|
|
824
|
+
createPrivExecTool(),
|
|
774
825
|
createShellTool({ summary: options?.summary }),
|
|
775
826
|
];
|
|
776
827
|
}
|
|
@@ -49,26 +49,19 @@ export function createFileSearchTool(options) {
|
|
|
49
49
|
name: 'file_search',
|
|
50
50
|
capabilities: ['fs-read'],
|
|
51
51
|
description: 'Search file contents (like grep/rg) with structured results. ' +
|
|
52
|
-
'Provide `pattern` (one term) or `patterns` (any-of literals). ' +
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'In auto, `a|b` is a literal OR of trimmed branches (`.` is a literal dot, not a wildcard); ' +
|
|
56
|
-
'an empty branch (`foo|`, `|`) falls back to whole-term literal. ' +
|
|
57
|
-
'Code tokens stay literal: `arr[0]`, `useState()`, `a+b`, `C++`, `foo.bar`, `memory*`. ' +
|
|
58
|
-
'Set pattern_mode="regex" or "literal" to force. ' +
|
|
59
|
-
"Glob filters by root-relative path (always case-insensitive): '*.md' (any depth), 'src/**/*.ts', '**/memory*.md'. " +
|
|
60
|
-
"`**` crosses directories, `*` does not. " +
|
|
61
|
-
'Path: a directory to walk recursively, or a single file path to search just that file. ' +
|
|
52
|
+
'Provide `pattern` (one term) or `patterns` (any-of literals) — match semantics on those params. ' +
|
|
53
|
+
'`glob` filters by relative path (always case-insensitive; `**` crosses directories, `*` does not). ' +
|
|
54
|
+
'`path` = root dir to walk recursively, or one file to search. ' +
|
|
62
55
|
'Empty results include diagnostics.hints for how to retry. ' +
|
|
63
|
-
'Default case-insensitive content match
|
|
64
|
-
'Files
|
|
65
|
-
'Files whose first 4KB contains a NUL byte are treated as binary and skipped.',
|
|
56
|
+
'Default case-insensitive content match (`case_sensitive=true` for exact). ' +
|
|
57
|
+
'Files scanned as line streams; `max_file_bytes` skips larger files; first 4KB NUL ⇒ treated as binary.',
|
|
66
58
|
parameters: {
|
|
67
59
|
pattern: {
|
|
68
60
|
type: 'string',
|
|
69
|
-
description: 'Single search term. Auto: regex only
|
|
61
|
+
description: 'Single search term. Auto: regex only on strong signals — anchors (^…$), ' +
|
|
62
|
+
'escapes (\\d \\w \\s \\b …) or escaped metachars, `.*`/`.+`, `{n}`; ' +
|
|
70
63
|
'`a|b` = literal OR of trimmed branches (empty branch → whole-term literal); ' +
|
|
71
|
-
'everything else is literal text.',
|
|
64
|
+
'everything else is literal text (e.g. `arr[0]`, `C++`, `foo.bar`).',
|
|
72
65
|
},
|
|
73
66
|
patterns: {
|
|
74
67
|
type: 'array',
|
|
@@ -83,11 +76,11 @@ export function createFileSearchTool(options) {
|
|
|
83
76
|
glob: {
|
|
84
77
|
type: 'string',
|
|
85
78
|
description: "Path glob relative to root (case-insensitive), e.g. '*.md', 'src/**/*.ts', '**/memory*.md'. " +
|
|
86
|
-
'Matches relative path; bare `*` does not cross directories.',
|
|
79
|
+
'Matches relative path; bare name (no `/`) matches at any depth; `*` does not cross directories.',
|
|
87
80
|
},
|
|
88
81
|
pattern_mode: {
|
|
89
82
|
type: 'string',
|
|
90
|
-
description: 'How to compile pattern/patterns (default: auto)',
|
|
83
|
+
description: 'How to compile pattern/patterns (default: auto; set "regex"/"literal" to force)',
|
|
91
84
|
enum: ['auto', 'literal', 'regex'],
|
|
92
85
|
},
|
|
93
86
|
regex: {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared safe-git runner — the single hardened `git` execution path used by the
|
|
3
|
+
* git_* dedicated tools and the UI git-status snapshot.
|
|
4
|
+
*
|
|
5
|
+
* Not a shell: fixed argv allowlist (never a command string). Isolation here:
|
|
6
|
+
* nonexistent `core.hooksPath`, `--no-ext-diff`, command-line `-c` overrides
|
|
7
|
+
* (diff.external/gpg/pager/ssh), `GIT_CONFIG_GLOBAL/SYSTEM` at NUL//dev/null,
|
|
8
|
+
* and filter.* pinned to `cat`. Mutating callers add their own flags (e.g.
|
|
9
|
+
* `--no-verify`/`--no-gpg-sign` on commit, in git-tools.ts).
|
|
10
|
+
* User `-c`/alias flags are rejected. `--no-optional-locks` keeps polling
|
|
11
|
+
* readers from fighting real git operations over the index lock.
|
|
12
|
+
*/
|
|
13
|
+
import type { ToolExecutionContext } from '@octopi-agent/core/types.js';
|
|
14
|
+
import { type AllowlistedRunResult } from './allowlisted-run.js';
|
|
15
|
+
export interface RunGitOptions {
|
|
16
|
+
timeoutMs?: number;
|
|
17
|
+
/** Journal write effects via shell-journal (default true for mutating tools) */
|
|
18
|
+
journal?: boolean;
|
|
19
|
+
/** Apply the tool output gate (default true). Structured consumers pass false. */
|
|
20
|
+
applyOutputGate?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Run one fixed git argv vector through the hardened runner.
|
|
24
|
+
*
|
|
25
|
+
* @param context - tool context (optional; gates journalling/limits)
|
|
26
|
+
* @param cwd - repository directory (caller has resolved/contained it)
|
|
27
|
+
* @param args - git argv after the safety prefix
|
|
28
|
+
* @param options - timeout / journal / output-gate controls
|
|
29
|
+
* @returns capped stdout/stderr + honest isolation
|
|
30
|
+
*/
|
|
31
|
+
export declare function runGit(context: ToolExecutionContext | undefined, cwd: string, args: string[], options?: RunGitOptions): Promise<AllowlistedRunResult>;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { tmpdir } from 'node:os';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { requireExecutable, runAllowlistedArgv, } from './allowlisted-run.js';
|
|
4
|
+
/**
|
|
5
|
+
* Nonexistent hooks dir (empty core.hooksPath is version-fragile: some gits
|
|
6
|
+
* treat it as `./` and still run cwd hooks).
|
|
7
|
+
*/
|
|
8
|
+
function noHooksDir() {
|
|
9
|
+
return join(tmpdir(), 'octopi-nohooks');
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Fixed git safety prefix. Command-line `-c` outranks local `.git/config`, so
|
|
13
|
+
* these neutralize repo-config RCE vectors (diff.external, gpg.program, …).
|
|
14
|
+
* `--no-optional-locks` avoids index lock fights. Never pass user `-c`.
|
|
15
|
+
*/
|
|
16
|
+
function gitSafePrefix() {
|
|
17
|
+
const hooks = noHooksDir();
|
|
18
|
+
return [
|
|
19
|
+
'--no-optional-locks',
|
|
20
|
+
'-c', `core.hooksPath=${hooks}`,
|
|
21
|
+
'-c', 'core.fsmonitor=',
|
|
22
|
+
'-c', 'core.pager=cat',
|
|
23
|
+
'-c', 'diff.external=',
|
|
24
|
+
'-c', 'diff.tool=',
|
|
25
|
+
'-c', 'merge.tool=',
|
|
26
|
+
'-c', 'merge.prompt=false',
|
|
27
|
+
'-c', 'gpg.program=true',
|
|
28
|
+
'-c', 'commit.gpgsign=false',
|
|
29
|
+
'-c', 'core.sshCommand=',
|
|
30
|
+
'-c', 'core.askpass=',
|
|
31
|
+
'-c', 'credential.helper=',
|
|
32
|
+
'-c', 'core.attributesFile=',
|
|
33
|
+
'-c', 'core.excludesFile=',
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Isolate global/system gitconfig. Local `.git/config` is still read; dangerous
|
|
38
|
+
* keys there are overridden by the `-c` prefix above (command line wins).
|
|
39
|
+
* On Windows use `NUL`, elsewhere `/dev/null` — a missing file is also fine.
|
|
40
|
+
*/
|
|
41
|
+
function gitIsolationEnv() {
|
|
42
|
+
const nullPath = process.platform === 'win32' ? 'NUL' : '/dev/null';
|
|
43
|
+
return {
|
|
44
|
+
GIT_CONFIG_NOSYSTEM: '1',
|
|
45
|
+
GIT_CONFIG_SYSTEM: nullPath,
|
|
46
|
+
GIT_CONFIG_GLOBAL: nullPath,
|
|
47
|
+
GIT_TERMINAL_PROMPT: '0',
|
|
48
|
+
GIT_OPTIONAL_LOCKS: '0',
|
|
49
|
+
GIT_ASKPASS: '',
|
|
50
|
+
SSH_ASKPASS: '',
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Discover filter.* drivers from repo/user config and pin them to `cat`.
|
|
55
|
+
* Command-line `-c` outranks local `.git/config`, so a malicious
|
|
56
|
+
* .gitattributes cannot run clean/smudge/process during `git add` — nor while
|
|
57
|
+
* `git status` re-hashes dirty stat entries through the clean filter.
|
|
58
|
+
*/
|
|
59
|
+
async function filterNeutralizers(context, cwd) {
|
|
60
|
+
const git = requireExecutable('git');
|
|
61
|
+
const res = await runAllowlistedArgv({
|
|
62
|
+
executable: git,
|
|
63
|
+
args: [...gitSafePrefix(), 'config', '--name-only', '--get-regexp', '^filter\\.'],
|
|
64
|
+
cwd,
|
|
65
|
+
context,
|
|
66
|
+
env: gitIsolationEnv(),
|
|
67
|
+
journal: false,
|
|
68
|
+
});
|
|
69
|
+
if (res.exitCode !== 0)
|
|
70
|
+
return [];
|
|
71
|
+
const names = new Set();
|
|
72
|
+
for (const line of res.stdout.split(/\r?\n/)) {
|
|
73
|
+
const m = /^filter\.(.+)\.(clean|smudge|process)$/.exec(line.trim());
|
|
74
|
+
if (m && /^[A-Za-z0-9._-]+$/.test(m[1]))
|
|
75
|
+
names.add(m[1]);
|
|
76
|
+
}
|
|
77
|
+
const out = [];
|
|
78
|
+
for (const n of names) {
|
|
79
|
+
out.push('-c', `filter.${n}.clean=cat`, '-c', `filter.${n}.smudge=cat`, '-c', `filter.${n}.process=cat`);
|
|
80
|
+
}
|
|
81
|
+
return out;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Run one fixed git argv vector through the hardened runner.
|
|
85
|
+
*
|
|
86
|
+
* @param context - tool context (optional; gates journalling/limits)
|
|
87
|
+
* @param cwd - repository directory (caller has resolved/contained it)
|
|
88
|
+
* @param args - git argv after the safety prefix
|
|
89
|
+
* @param options - timeout / journal / output-gate controls
|
|
90
|
+
* @returns capped stdout/stderr + honest isolation
|
|
91
|
+
*/
|
|
92
|
+
export async function runGit(context, cwd, args, options) {
|
|
93
|
+
const git = requireExecutable('git');
|
|
94
|
+
return runAllowlistedArgv({
|
|
95
|
+
executable: git,
|
|
96
|
+
args: [...gitSafePrefix(), ...(await filterNeutralizers(context, cwd)), ...args],
|
|
97
|
+
cwd,
|
|
98
|
+
context,
|
|
99
|
+
env: gitIsolationEnv(),
|
|
100
|
+
timeoutMs: options?.timeoutMs ?? 60_000,
|
|
101
|
+
journal: options?.journal ?? false,
|
|
102
|
+
applyOutputGate: options?.applyOutputGate,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/** How an entry is rendered/grouped in UI surfaces. */
|
|
2
|
+
export type GitStatusGroup = 'conflicted' | 'staged' | 'unstaged' | 'untracked';
|
|
3
|
+
/** Record kind behind an entry. */
|
|
4
|
+
export type GitStatusKind = 'changed' | 'renamed' | 'copied' | 'untracked' | 'conflicted';
|
|
5
|
+
/**
|
|
6
|
+
* One display row. A partially-staged file (`1 MM …`) yields TWO rows — one in
|
|
7
|
+
* `staged`, one in `unstaged` — matching `git status` section semantics; its
|
|
8
|
+
* x/y pair is repeated on each row so the UI can show the real codes.
|
|
9
|
+
*/
|
|
10
|
+
export interface GitStatusEntry {
|
|
11
|
+
kind: GitStatusKind;
|
|
12
|
+
group: GitStatusGroup;
|
|
13
|
+
/** Staged status char ('.' = unchanged in the index). */
|
|
14
|
+
x: string;
|
|
15
|
+
/** Unstaged status char ('.' = unchanged in the worktree). */
|
|
16
|
+
y: string;
|
|
17
|
+
path: string;
|
|
18
|
+
/** Rename/copy source path (record type 2 only). */
|
|
19
|
+
origPath?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Branch header block from `# branch.*` records. */
|
|
22
|
+
export interface GitStatusBranch {
|
|
23
|
+
/** HEAD oid; null before the first commit (`(initial)`). */
|
|
24
|
+
oid: string | null;
|
|
25
|
+
/** Branch name; null when detached (`(detached)`). */
|
|
26
|
+
head: string | null;
|
|
27
|
+
detached: boolean;
|
|
28
|
+
/** True when the repo has no commits yet. */
|
|
29
|
+
initial: boolean;
|
|
30
|
+
/** Upstream ref name; null when no upstream is configured. */
|
|
31
|
+
upstream: string | null;
|
|
32
|
+
/** Commits ahead of upstream; null without upstream. */
|
|
33
|
+
ahead: number | null;
|
|
34
|
+
/** Commits behind upstream; null without upstream. */
|
|
35
|
+
behind: number | null;
|
|
36
|
+
}
|
|
37
|
+
/** Full-precision counts (computed over all rows, not just returned entries). */
|
|
38
|
+
export interface GitStatusCounts {
|
|
39
|
+
conflicted: number;
|
|
40
|
+
staged: number;
|
|
41
|
+
unstaged: number;
|
|
42
|
+
untracked: number;
|
|
43
|
+
}
|
|
44
|
+
/** Parsed body of a status snapshot (no repo resolution). */
|
|
45
|
+
export interface GitStatusSnapshotBody {
|
|
46
|
+
/** null when the stream carried no `# branch.*` headers at all. */
|
|
47
|
+
branch: GitStatusBranch | null;
|
|
48
|
+
counts: GitStatusCounts;
|
|
49
|
+
entries: GitStatusEntry[];
|
|
50
|
+
/** True when entries were capped by maxEntries; counts stay full. */
|
|
51
|
+
truncated: boolean;
|
|
52
|
+
/** Records that matched a known type but failed to parse (format drift). */
|
|
53
|
+
skippedRecords: number;
|
|
54
|
+
}
|
|
55
|
+
/** Full snapshot for one directory. */
|
|
56
|
+
export interface GitStatusSnapshot extends GitStatusSnapshotBody {
|
|
57
|
+
/** False when the directory is not inside any git work tree. */
|
|
58
|
+
isRepo: boolean;
|
|
59
|
+
/** Work-tree top level (`git rev-parse --show-toplevel`); null when not a repo. */
|
|
60
|
+
repoRoot: string | null;
|
|
61
|
+
/** ISO timestamp taken after the status read completed. */
|
|
62
|
+
generatedAt: string;
|
|
63
|
+
}
|
|
64
|
+
export interface GitStatusSnapshotOptions {
|
|
65
|
+
/** Max entries returned (counts stay full). Default 500. */
|
|
66
|
+
maxEntries?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Untracked granularity. 'normal' (default) collapses untracked directories,
|
|
69
|
+
* 'all' lists every untracked file (parity with the git_status tool).
|
|
70
|
+
*/
|
|
71
|
+
untracked?: 'normal' | 'all';
|
|
72
|
+
/**
|
|
73
|
+
* Hard-jail demand (untrusted parity with the git_* tools): a jail backend is
|
|
74
|
+
* always used when available — this flag turns jail-setup failure into a hard
|
|
75
|
+
* error instead of the supervised fallback (fail-open → fail-closed). Derive
|
|
76
|
+
* it via effect-policy's `requiresJail(resolvedPolicy)`.
|
|
77
|
+
*/
|
|
78
|
+
requireJail?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Roots visible inside the process jail (`context.pathRoots`). A jailed read
|
|
81
|
+
* only sees `cwd` without them — on bwrap (namespace binds listed roots only)
|
|
82
|
+
* a repo whose `.git` sits above `cwd` would silently look like isRepo:false.
|
|
83
|
+
* Pass the caller's allow-root set (the fence set).
|
|
84
|
+
*/
|
|
85
|
+
jailRoots?: string[];
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Parse `git status --porcelain=v2 -z [--branch]` output.
|
|
89
|
+
*
|
|
90
|
+
* Record grammar (NUL-separated): `# key value` headers; `1 XY sub mH mI mW hH
|
|
91
|
+
* hI path`; `2 XY sub mH mI mW hH hI Xscore path` + separate origPath field;
|
|
92
|
+
* `u XY sub m1 m2 m3 mW h1 h2 h3 path`; `? path`; `! path` (skipped — we never
|
|
93
|
+
* pass --ignored). Paths are raw bytes decoded as UTF-8; no quoting in -z mode.
|
|
94
|
+
*
|
|
95
|
+
* @param raw - NUL-separated porcelain v2 stream
|
|
96
|
+
* @param options - maxEntries / untracked granularity (untracked only affects readers)
|
|
97
|
+
* @returns branch block (null without headers), full counts, capped entries,
|
|
98
|
+
* skippedRecords for known-type records that failed to parse
|
|
99
|
+
*/
|
|
100
|
+
export declare function parsePorcelainV2(raw: string, options?: GitStatusSnapshotOptions): GitStatusSnapshotBody;
|
|
101
|
+
/**
|
|
102
|
+
* Read a structured git status snapshot for `cwd`.
|
|
103
|
+
*
|
|
104
|
+
* @param cwd - repository (or subdirectory) path; caller has contained it
|
|
105
|
+
* @param options - maxEntries / untracked granularity
|
|
106
|
+
* @returns isRepo=false when cwd is not inside a git work tree (a state, not an
|
|
107
|
+
* error); throws `git_status_failed: …` on real git failures, on
|
|
108
|
+
* output-cap kills (never partial-as-success), and `git_not_found: …`
|
|
109
|
+
* when git is not on PATH
|
|
110
|
+
*/
|
|
111
|
+
export declare function readGitStatusSnapshot(cwd: string, options?: GitStatusSnapshotOptions): Promise<GitStatusSnapshot>;
|