jeopi-cli 16.2.13 → 16.2.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/CHANGELOG.md +21 -3
- package/README.md +1 -1
- package/dist/cli.js +3087 -3060
- package/dist/types/advisor/watchdog.d.ts +2 -2
- package/dist/types/autolearn/managed-skills.d.ts +2 -2
- package/dist/types/capability/types.d.ts +2 -2
- package/dist/types/cli/commands/migrate-legacy.d.ts +1 -0
- package/dist/types/cli/config-cli.d.ts +1 -1
- package/dist/types/cli/flag-tables.d.ts +1 -1
- package/dist/types/cli/grievances-cli.d.ts +1 -1
- package/dist/types/cli/models-cli.d.ts +1 -1
- package/dist/types/cli/update-cli.d.ts +2 -2
- package/dist/types/cli/worktree-cli.d.ts +1 -1
- package/dist/types/commit/index.d.ts +1 -1
- package/dist/types/commit/pipeline.d.ts +1 -1
- package/dist/types/commit/types.d.ts +1 -1
- package/dist/types/config/prompt-templates.d.ts +1 -1
- package/dist/types/config/settings-schema.d.ts +16 -6
- package/dist/types/config.d.ts +7 -7
- package/dist/types/discovery/helpers.d.ts +8 -8
- package/dist/types/discovery/omp-extension-roots.d.ts +2 -2
- package/dist/types/eval/py/runtime.d.ts +1 -1
- package/dist/types/extensibility/custom-tools/loader.d.ts +2 -2
- package/dist/types/extensibility/extensions/loader.d.ts +1 -1
- package/dist/types/extensibility/hooks/loader.d.ts +1 -1
- package/dist/types/extensibility/plugins/loader.d.ts +2 -2
- package/dist/types/extensibility/plugins/types.d.ts +13 -3
- package/dist/types/lsp/config.d.ts +2 -2
- package/dist/types/mcp/client.d.ts +1 -1
- package/dist/types/mcp/config-writer.d.ts +1 -1
- package/dist/types/mcp/oauth-flow.d.ts +1 -1
- package/dist/types/mcp/transports/http.d.ts +1 -1
- package/dist/types/memories/okf.d.ts +36 -0
- package/dist/types/modes/components/__tests__/assistant-agent-label.test.d.ts +1 -0
- package/dist/types/modes/components/assistant-message.d.ts +4 -0
- package/dist/types/modes/interactive-mode.d.ts +1 -1
- package/dist/types/sdk.d.ts +5 -5
- package/dist/types/session/agent-session.d.ts +3 -0
- package/dist/types/session/auth-broker-config.d.ts +4 -4
- package/dist/types/session/snapcompact-savings-journal.d.ts +1 -1
- package/dist/types/task/commands.d.ts +1 -1
- package/dist/types/task/critic-gate.d.ts +76 -0
- package/dist/types/task/critic-gate.test.d.ts +1 -0
- package/dist/types/task/discovery.d.ts +1 -1
- package/dist/types/task/executor.d.ts +1 -1
- package/dist/types/tools/acp-bridge.d.ts +2 -2
- package/dist/types/tools/browser/tab-protocol.d.ts +1 -1
- package/dist/types/tools/index.d.ts +6 -1
- package/dist/types/tools/plan-mode-guard.d.ts +8 -0
- package/dist/types/tools/report-tool-issue.d.ts +1 -1
- package/dist/types/utils/changelog.d.ts +2 -2
- package/dist/types/utils/image-loading.d.ts +4 -4
- package/dist/types/utils/image-resize.d.ts +1 -1
- package/dist/types/web/search/index.d.ts +1 -1
- package/examples/custom-tools/README.md +1 -1
- package/examples/extensions/README.md +1 -1
- package/examples/extensions/pirate.ts +1 -1
- package/examples/extensions/plan-mode.ts +1 -1
- package/examples/extensions/tools.ts +1 -1
- package/examples/hooks/README.md +1 -1
- package/examples/sdk/01-minimal.ts +1 -1
- package/examples/sdk/04-skills.ts +1 -1
- package/examples/sdk/06-extensions.ts +3 -3
- package/examples/sdk/09-api-keys-and-oauth.ts +2 -2
- package/examples/sdk/12-redis-sessions.ts +1 -1
- package/examples/sdk/13-sql-sessions.ts +1 -1
- package/examples/sdk/README.md +1 -1
- package/package.json +12 -12
- package/scripts/jeopi +1 -1
- package/src/advisor/__tests__/config.test.ts +4 -4
- package/src/advisor/watchdog.ts +8 -8
- package/src/autolearn/managed-skills.ts +4 -4
- package/src/autoresearch/storage.ts +2 -2
- package/src/capability/types.ts +2 -2
- package/src/cli/agents-cli.ts +2 -2
- package/src/cli/args.ts +3 -3
- package/src/cli/auth-broker-cli.ts +5 -5
- package/src/cli/auth-gateway-cli.ts +4 -4
- package/src/cli/claude-trace-cli.ts +1 -1
- package/src/cli/commands/migrate-legacy.ts +24 -0
- package/src/cli/config-cli.ts +20 -5
- package/src/cli/flag-tables.ts +1 -1
- package/src/cli/gallery-fixtures/misc.ts +7 -7
- package/src/cli/gallery-screenshot.ts +2 -2
- package/src/cli/grievances-cli.ts +1 -1
- package/src/cli/models-cli.ts +1 -1
- package/src/cli/plugin-cli.ts +2 -2
- package/src/cli/profile-alias.ts +8 -8
- package/src/cli/read-cli.ts +1 -1
- package/src/cli/ssh-cli.ts +2 -2
- package/src/cli/update-cli.ts +27 -27
- package/src/cli/worktree-cli.ts +3 -3
- package/src/cli.ts +5 -5
- package/src/commands/agents.ts +2 -2
- package/src/commands/auth-broker.ts +1 -1
- package/src/commands/config.ts +1 -1
- package/src/commands/dry-balance.ts +6 -6
- package/src/commands/launch.ts +2 -2
- package/src/commands/models.ts +1 -1
- package/src/commands/say.ts +1 -1
- package/src/commands/token.ts +5 -5
- package/src/commands/ttsr.ts +2 -2
- package/src/commands/worktree.ts +3 -3
- package/src/commit/agentic/prompts/system.md +1 -1
- package/src/commit/cli.ts +1 -1
- package/src/commit/index.ts +1 -1
- package/src/commit/pipeline.ts +1 -1
- package/src/commit/types.ts +1 -1
- package/src/config/mcp-schema.json +5 -5
- package/src/config/models-config-schema.ts +1 -1
- package/src/config/prompt-templates.ts +2 -2
- package/src/config/settings-schema.ts +20 -8
- package/src/config/settings.ts +1 -1
- package/src/config.ts +10 -10
- package/src/dap/session.ts +2 -2
- package/src/debug/protocol-probe.ts +1 -1
- package/src/debug/raw-sse-buffer.ts +3 -3
- package/src/debug/raw-sse.ts +2 -2
- package/src/discovery/builtin.ts +9 -9
- package/src/discovery/helpers.ts +13 -13
- package/src/discovery/omp-extension-roots.ts +4 -4
- package/src/discovery/omp-plugins.ts +2 -2
- package/src/discovery/substitute-plugin-root.ts +3 -3
- package/src/eval/py/runtime.ts +1 -1
- package/src/eval/rb/runner.rb +6 -6
- package/src/export/custom-share.ts +1 -1
- package/src/extensibility/custom-tools/loader.ts +3 -3
- package/src/extensibility/extensions/loader.ts +4 -4
- package/src/extensibility/hooks/loader.ts +1 -1
- package/src/extensibility/plugins/loader.ts +16 -10
- package/src/extensibility/plugins/manager.ts +10 -9
- package/src/extensibility/plugins/types.ts +15 -4
- package/src/internal-urls/docs-index.generated.txt +1 -1
- package/src/lsp/config.ts +4 -4
- package/src/lsp/index.ts +1 -1
- package/src/main.ts +1 -1
- package/src/mcp/client.ts +1 -1
- package/src/mcp/config-writer.ts +2 -2
- package/src/mcp/manager.ts +1 -1
- package/src/mcp/oauth-flow.ts +1 -1
- package/src/mcp/timeout.ts +2 -2
- package/src/mcp/transports/http.ts +1 -1
- package/src/memories/index.ts +82 -11
- package/src/memories/okf.ts +129 -0
- package/src/modes/components/__tests__/assistant-agent-label.test.ts +87 -0
- package/src/modes/components/assistant-message.ts +27 -0
- package/src/modes/components/extensions/extension-dashboard.ts +1 -1
- package/src/modes/controllers/mcp-command-controller.ts +2 -2
- package/src/modes/controllers/omfg-controller.ts +2 -2
- package/src/modes/controllers/ssh-command-controller.ts +2 -2
- package/src/modes/interactive-mode.ts +3 -1
- package/src/modes/setup-wizard/index.ts +1 -1
- package/src/prompts/agents/jeo.md +20 -10
- package/src/prompts/system/autolearn-guidance.md +2 -2
- package/src/prompts/system/system-prompt.md +10 -1
- package/src/prompts/tools/learn.md +1 -1
- package/src/prompts/tools/manage-skill.md +1 -1
- package/src/sdk.ts +8 -6
- package/src/secrets/index.ts +2 -2
- package/src/session/agent-session.ts +86 -6
- package/src/session/auth-broker-config.ts +6 -6
- package/src/session/snapcompact-savings-journal.ts +1 -1
- package/src/slash-commands/helpers/mcp.ts +1 -1
- package/src/system-prompt.test.ts +14 -14
- package/src/task/commands.ts +1 -1
- package/src/task/critic-gate.test.ts +181 -0
- package/src/task/critic-gate.ts +148 -0
- package/src/task/discovery.ts +5 -5
- package/src/task/executor.ts +1 -1
- package/src/task/index.ts +35 -2
- package/src/tools/acp-bridge.ts +2 -2
- package/src/tools/browser/launch.ts +1 -1
- package/src/tools/browser/tab-protocol.ts +1 -1
- package/src/tools/grep.ts +2 -2
- package/src/tools/index.ts +6 -1
- package/src/tools/plan-mode-guard.ts +16 -0
- package/src/tools/read.ts +1 -1
- package/src/tools/report-tool-issue.ts +2 -2
- package/src/utils/changelog.ts +2 -2
- package/src/utils/image-loading.ts +4 -4
- package/src/utils/image-resize.ts +5 -5
- package/src/web/search/index.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Resolve auth-broker connection configuration for the local
|
|
2
|
+
* Resolve auth-broker connection configuration for the local jeopi client.
|
|
3
3
|
*
|
|
4
4
|
* This is a thin coding-agent wrapper around the shared resolver in
|
|
5
5
|
* `jeopi-ai/auth-broker/discover` that preserves the process-lifetime
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* (including `!command` config indirection) from coding-agent's config layer.
|
|
8
8
|
*
|
|
9
9
|
* Precedence (highest first):
|
|
10
|
-
* 1. `
|
|
11
|
-
* 2. `auth.broker.url` / `auth.broker.token` in `~/.
|
|
10
|
+
* 1. `JEOPI_AUTH_BROKER_URL` / `JEOPI_AUTH_BROKER_TOKEN` env vars.
|
|
11
|
+
* 2. `auth.broker.url` / `auth.broker.token` in `~/.jeopi/agent/config.yml`
|
|
12
12
|
* (hidden from the settings UI; `!command` resolution supported).
|
|
13
|
-
* 3. Token file `~/.
|
|
13
|
+
* 3. Token file `~/.jeopi/auth-broker.token` (paired with URL from env or config).
|
|
14
14
|
*
|
|
15
15
|
* Returns null when no broker URL is configured — caller falls back to the
|
|
16
16
|
* local SQLite store.
|
|
@@ -27,7 +27,7 @@ export interface SnapcompactSavingsRecord {
|
|
|
27
27
|
toolCallId: string;
|
|
28
28
|
savedTokens: number;
|
|
29
29
|
}
|
|
30
|
-
/** `~/.
|
|
30
|
+
/** `~/.jeopi/.../snapcompact-savings.jsonl`, colocated with stats.db. */
|
|
31
31
|
export declare function snapcompactSavingsJournalPath(): string;
|
|
32
32
|
/**
|
|
33
33
|
* Appends savings to the journal, deduped by toolCallId for the recorder's
|
|
@@ -17,7 +17,7 @@ export declare function loadBundledCommands(): WorkflowCommand[];
|
|
|
17
17
|
/**
|
|
18
18
|
* Discover all available commands.
|
|
19
19
|
*
|
|
20
|
-
* Precedence (highest wins): .
|
|
20
|
+
* Precedence (highest wins): .jeopi > .pi > .claude (project before user), then bundled
|
|
21
21
|
*/
|
|
22
22
|
export declare function discoverCommands(cwd: string): Promise<WorkflowCommand[]>;
|
|
23
23
|
/**
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Critic gate — the hard, code-enforced counterpart of the prompt rule
|
|
3
|
+
* "You NEVER execute a plan whose latest critic verdict is not `okay`".
|
|
4
|
+
*
|
|
5
|
+
* When a `critic` subagent completes with a schema-validated verdict, the
|
|
6
|
+
* parent session records it here. While the latest verdict is `iterate` or
|
|
7
|
+
* `reject` the runtime — not the prompt — blocks execution:
|
|
8
|
+
*
|
|
9
|
+
* - `task` refuses to spawn non-read-only agents (read-only lanes such as
|
|
10
|
+
* `plan`, `explore`, and `critic` itself stay open so the plan can be
|
|
11
|
+
* revised and re-gated).
|
|
12
|
+
* - Working-tree mutations through `write`/`edit`/patch are rejected; the
|
|
13
|
+
* `local://` artifact sandbox stays writable for seeds, plans, and notes.
|
|
14
|
+
*
|
|
15
|
+
* The gate clears in exactly two ways: a subsequent critic verdict of `okay`,
|
|
16
|
+
* or the next user-authored prompt (the user regaining control is the only
|
|
17
|
+
* override — mirroring jeo-code's `approve` hard gate, scoped to a turn-chain
|
|
18
|
+
* instead of a state file).
|
|
19
|
+
*
|
|
20
|
+
* A strike counter bounds the iterate loop: after
|
|
21
|
+
* {@link CRITIC_GATE_MAX_STRIKES} consecutive non-okay verdicts without user
|
|
22
|
+
* input, even re-submitting to `critic` is refused — the agent must stop and
|
|
23
|
+
* report the surviving gaps instead of burning tokens on convergence-free
|
|
24
|
+
* re-planning.
|
|
25
|
+
*/
|
|
26
|
+
/** Agent name whose structured verdicts drive the gate. */
|
|
27
|
+
export declare const CRITIC_AGENT_NAME = "critic";
|
|
28
|
+
/** Consecutive non-okay verdicts allowed before the gate forces a stop-and-report. */
|
|
29
|
+
export declare const CRITIC_GATE_MAX_STRIKES = 3;
|
|
30
|
+
/** Non-okay verdicts that engage the gate. */
|
|
31
|
+
export type CriticGateVerdict = "iterate" | "reject";
|
|
32
|
+
/** Gate state held by the parent session while the latest verdict is not `okay`. */
|
|
33
|
+
export interface CriticGateState {
|
|
34
|
+
/** Latest non-okay verdict. */
|
|
35
|
+
verdict: CriticGateVerdict;
|
|
36
|
+
/** Agent id of the critic run that produced the verdict. */
|
|
37
|
+
agentId: string;
|
|
38
|
+
/** Epoch ms when the verdict was recorded. */
|
|
39
|
+
at: number;
|
|
40
|
+
/** `required_fixes` from the critic's structured output (empty for reject without fixes). */
|
|
41
|
+
requiredFixes: string[];
|
|
42
|
+
/** Consecutive non-okay verdicts since the last okay/user prompt. */
|
|
43
|
+
strikes: number;
|
|
44
|
+
}
|
|
45
|
+
/** Verdict parsed from a critic subagent's validated structured output. */
|
|
46
|
+
export interface ParsedCriticVerdict {
|
|
47
|
+
verdict: "okay" | CriticGateVerdict;
|
|
48
|
+
requiredFixes: string[];
|
|
49
|
+
summary?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Parse a critic verdict from the subagent's final output payload (the
|
|
53
|
+
* JSON-serialized, schema-validated yield data). Returns undefined when the
|
|
54
|
+
* payload is not a critic-shaped verdict — the gate then stays untouched.
|
|
55
|
+
*/
|
|
56
|
+
export declare function parseCriticVerdict(output: string): ParsedCriticVerdict | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Fold a new verdict into the gate state. `okay` clears the gate; a non-okay
|
|
59
|
+
* verdict engages it and increments the consecutive-strike counter.
|
|
60
|
+
*/
|
|
61
|
+
export declare function updateCriticGateState(previous: CriticGateState | undefined, parsed: ParsedCriticVerdict, agentId: string, now?: number): CriticGateState | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Decide whether a spawn is allowed under the current gate state. Returns the
|
|
64
|
+
* rejection message when blocked, undefined when allowed.
|
|
65
|
+
*
|
|
66
|
+
* Read-only agents (plan revision, exploration, re-gating via critic) stay
|
|
67
|
+
* allowed — except that once the strike budget is exhausted, even a fresh
|
|
68
|
+
* critic run is refused so the loop terminates at the user instead of cycling.
|
|
69
|
+
*/
|
|
70
|
+
export declare function evaluateCriticGateSpawn(state: CriticGateState | undefined, agentName: string, agentIsReadOnly: boolean): string | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Error text for a working-tree mutation attempted while the gate is engaged.
|
|
73
|
+
* The `local://` sandbox is exempt (seeds/plans/notes live there); callers
|
|
74
|
+
* check that before invoking this.
|
|
75
|
+
*/
|
|
76
|
+
export declare function criticGateWriteMessage(state: CriticGateState): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,7 +7,7 @@ export interface DiscoveryResult {
|
|
|
7
7
|
/**
|
|
8
8
|
* Discover agents from filesystem and merge with bundled agents.
|
|
9
9
|
*
|
|
10
|
-
* Precedence (highest wins): project .
|
|
10
|
+
* Precedence (highest wins): project .jeopi, user .jeopi, Claude plugin agents, then bundled
|
|
11
11
|
* @param cwd - Current working directory for project agent discovery
|
|
12
12
|
*/
|
|
13
13
|
export declare function discoverAgents(cwd: string, home?: string): Promise<DiscoveryResult>;
|
|
@@ -121,7 +121,7 @@ export interface ExecutorOptions {
|
|
|
121
121
|
preloadedExtensionPaths?: string[];
|
|
122
122
|
/**
|
|
123
123
|
* Parent's discovered custom-tool source paths. Forwarded to skip the
|
|
124
|
-
* `.
|
|
124
|
+
* `.jeopi/tools/` FS scan in the subagent; the subagent then re-binds each
|
|
125
125
|
* tool against its own `CustomToolAPI` (cwd, exec, pushPendingAction, UI).
|
|
126
126
|
*/
|
|
127
127
|
preloadedCustomToolPaths?: ToolPathWithSource[];
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* When an ACP client (e.g. Zed) advertises the `fs.writeTextFile` capability,
|
|
5
5
|
* all write-mode tools must route through it so the editor's open buffer is
|
|
6
|
-
* updated immediately. Internal artifacts ('/Users/theo/.
|
|
6
|
+
* updated immediately. Internal artifacts ('/Users/theo/.jeopi/agent/sessions/-Projects-oh-my-pi/2026-06-10T09-11-41-506Z_019eb0cd-3ec2-7000-92aa-1b82aa4d78f0/local' plan files, other scheme
|
|
7
7
|
* URLs) are always written directly to disk — those are OMP-owned and should
|
|
8
8
|
* never be pushed into the editor.
|
|
9
9
|
*/
|
|
@@ -11,7 +11,7 @@ import type { ToolSession } from ".";
|
|
|
11
11
|
/**
|
|
12
12
|
* Return `true` when an ACP client bridge write is appropriate for this path.
|
|
13
13
|
*
|
|
14
|
-
* Returns `false` for internal-URL paths (e.g. `'/Users/theo/.
|
|
14
|
+
* Returns `false` for internal-URL paths (e.g. `'/Users/theo/.jeopi/agent/sessions/-Projects-oh-my-pi/2026-06-10T09-11-41-506Z_019eb0cd-3ec2-7000-92aa-1b82aa4d78f0/local/PLAN.md'`) and for the
|
|
15
15
|
* active plan file while plan mode is enabled — both are OMP-internal artifacts
|
|
16
16
|
* that must stay off the editor's buffer.
|
|
17
17
|
*/
|
|
@@ -37,7 +37,7 @@ export interface ScreenshotResult {
|
|
|
37
37
|
export interface SessionSnapshot {
|
|
38
38
|
cwd: string;
|
|
39
39
|
browserScreenshotDir?: string;
|
|
40
|
-
/** Force non-WebP screenshot encoding (e.g. for Ollama). Unset honors `
|
|
40
|
+
/** Force non-WebP screenshot encoding (e.g. for Ollama). Unset honors `JEOPI_NO_WEBP`. */
|
|
41
41
|
excludeWebP?: boolean;
|
|
42
42
|
}
|
|
43
43
|
export type WorkerInitPayload = {
|
|
@@ -19,6 +19,7 @@ import type { ClientBridge } from "../session/client-bridge";
|
|
|
19
19
|
import type { CustomMessage } from "../session/messages";
|
|
20
20
|
import type { UsageStatistics } from "../session/session-entries";
|
|
21
21
|
import type { ToolChoiceQueue } from "../session/tool-choice-queue";
|
|
22
|
+
import type { CriticGateState } from "../task/critic-gate";
|
|
22
23
|
import type { AgentOutputManager } from "../task/output-manager";
|
|
23
24
|
import type { DiscoverableTool, DiscoverableToolSearchIndex } from "../tool-discovery/tool-index";
|
|
24
25
|
import type { EventBus } from "../utils/event-bus";
|
|
@@ -135,7 +136,7 @@ export interface ToolSession {
|
|
|
135
136
|
*/
|
|
136
137
|
extensionPaths?: string[];
|
|
137
138
|
/**
|
|
138
|
-
* Pre-discovered custom-tool source paths from `.
|
|
139
|
+
* Pre-discovered custom-tool source paths from `.jeopi/tools/`, `.claude/tools/`,
|
|
139
140
|
* plugins, etc. Forwarded to subagents so they skip the FS scan but still
|
|
140
141
|
* re-bind tools to their own session-scoped `CustomToolAPI`.
|
|
141
142
|
*/
|
|
@@ -224,6 +225,10 @@ export interface ToolSession {
|
|
|
224
225
|
getPlanModeState?: () => PlanModeState | undefined;
|
|
225
226
|
/** Path of the session's active plan reference (e.g. `local://<title>.md`); defaults to `local://PLAN.md`. */
|
|
226
227
|
getPlanReferencePath?: () => string;
|
|
228
|
+
/** Critic gate state — engaged after a non-okay `critic` verdict; cleared by an okay verdict or the next user prompt. */
|
|
229
|
+
getCriticGateState?: () => CriticGateState | undefined;
|
|
230
|
+
/** Replace the critic gate state (undefined clears the gate). */
|
|
231
|
+
setCriticGateState?: (state: CriticGateState | undefined) => void;
|
|
227
232
|
/** Goal mode state (if active or paused) */
|
|
228
233
|
getGoalModeState?: () => GoalModeState | undefined;
|
|
229
234
|
/** Goal runtime for the active agent session. */
|
|
@@ -31,3 +31,11 @@ export declare function enforcePlanModeWrite(session: ToolSession, targetPath: s
|
|
|
31
31
|
move?: string;
|
|
32
32
|
op?: "create" | "update" | "delete";
|
|
33
33
|
}): void;
|
|
34
|
+
/**
|
|
35
|
+
* Critic gate — while the session's latest critic verdict is not `okay`,
|
|
36
|
+
* working-tree mutations are rejected at the runtime level. The `local://`
|
|
37
|
+
* artifact sandbox stays writable (seeds, plans, and scratch notes live
|
|
38
|
+
* there). Runs inside {@link enforcePlanModeWrite} so every mutating tool
|
|
39
|
+
* (`write`, `edit` replace/patch/hashline) hits one choke point.
|
|
40
|
+
*/
|
|
41
|
+
export declare function enforceCriticGateWrite(session: ToolSession, targetPath: string): void;
|
|
@@ -68,7 +68,7 @@ export declare function __resetAutoQaConsentForTests(): void;
|
|
|
68
68
|
export declare function resolveAutoQaConsent(settings: Settings | undefined): Promise<boolean>;
|
|
69
69
|
/**
|
|
70
70
|
* Open (or return the cached handle for) the auto-QA SQLite database at
|
|
71
|
-
* `~/.
|
|
71
|
+
* `~/.jeopi/agent/autoqa.db`. Idempotently runs schema creation, the
|
|
72
72
|
* `pushed`-column migration, and index setup so every consumer — tool
|
|
73
73
|
* execute path, manual `jeopi grievances push`, future debug scripts —
|
|
74
74
|
* sees the same prepared schema. Returns `null` only on a hard open
|
|
@@ -24,8 +24,8 @@ export declare function compareVersions(v1: ChangelogEntry, v2: ChangelogEntry):
|
|
|
24
24
|
export declare function getNewEntries(entries: ChangelogEntry[], lastVersion: string): ChangelogEntry[];
|
|
25
25
|
export { getChangelogPath } from "../config";
|
|
26
26
|
/**
|
|
27
|
-
* Last
|
|
28
|
-
* marker file (`~/.
|
|
27
|
+
* Last jeopi version whose changelog the user has seen. Stored as a plain-text
|
|
28
|
+
* marker file (`~/.jeopi/agent/last-changelog-version`) rather than in
|
|
29
29
|
* `config.yml`, so version bumps never dirty user-tracked config files.
|
|
30
30
|
*/
|
|
31
31
|
export declare function readLastChangelogVersion(agentDir?: string): Promise<string | undefined>;
|
|
@@ -6,12 +6,12 @@ export declare const SUPPORTED_INPUT_IMAGE_MIME_TYPES: Set<string>;
|
|
|
6
6
|
* Ollama and its local-backend family decode image input through llama.cpp /
|
|
7
7
|
* `stb_image`, which is compiled without WebP support, so a WebP upload fails
|
|
8
8
|
* with an opaque HTTP 400. Detect those models so the resize pipeline encodes
|
|
9
|
-
* to PNG/JPEG instead — the automatic equivalent of `
|
|
9
|
+
* to PNG/JPEG instead — the automatic equivalent of `JEOPI_NO_WEBP=1`.
|
|
10
10
|
*/
|
|
11
11
|
export declare function modelLacksWebpSupport(model: Pick<Model, "provider" | "api" | "imageInputDecoder"> | undefined): boolean;
|
|
12
12
|
/**
|
|
13
13
|
* `true` when `model` cannot decode WebP, otherwise `undefined` so the
|
|
14
|
-
* `
|
|
14
|
+
* `JEOPI_NO_WEBP` env fallback in {@link resizeImage} still applies. Feed straight
|
|
15
15
|
* into {@link ImageResizeOptions.excludeWebP}.
|
|
16
16
|
*/
|
|
17
17
|
export declare function webpExclusionForModel(model: Pick<Model, "provider" | "api"> | undefined): true | undefined;
|
|
@@ -22,7 +22,7 @@ export interface LoadImageInputOptions {
|
|
|
22
22
|
maxBytes?: number;
|
|
23
23
|
resolvedPath?: string;
|
|
24
24
|
detectedMimeType?: string;
|
|
25
|
-
/** Force non-WebP output (e.g. for Ollama). Leave unset to honor `
|
|
25
|
+
/** Force non-WebP output (e.g. for Ollama). Leave unset to honor `JEOPI_NO_WEBP`. */
|
|
26
26
|
excludeWebP?: boolean;
|
|
27
27
|
}
|
|
28
28
|
/** Options for loading an in-memory chat image attachment as a vision-model input. */
|
|
@@ -32,7 +32,7 @@ export interface LoadImageAttachmentInputOptions {
|
|
|
32
32
|
uri: string;
|
|
33
33
|
autoResize: boolean;
|
|
34
34
|
maxBytes?: number;
|
|
35
|
-
/** Force non-WebP output (e.g. for Ollama). Leave unset to honor `
|
|
35
|
+
/** Force non-WebP output (e.g. for Ollama). Leave unset to honor `JEOPI_NO_WEBP`. */
|
|
36
36
|
excludeWebP?: boolean;
|
|
37
37
|
}
|
|
38
38
|
export interface LoadedImageInput {
|
|
@@ -29,7 +29,7 @@ export interface ResizedImage {
|
|
|
29
29
|
* 4. If still too large, walk a dimension-scale ladder × quality ladder.
|
|
30
30
|
* 5. If still too large, return the smallest variant produced.
|
|
31
31
|
*
|
|
32
|
-
* Set
|
|
32
|
+
* Set JEOPI_NO_WEBP to exclude WebP from encoding (llama.cpp STB doesn't decode it).
|
|
33
33
|
*
|
|
34
34
|
* Backed by `Bun.Image`: a chainable native pipeline that runs decode/transform/encode
|
|
35
35
|
* off the JS thread when the terminal (`.bytes()`) is awaited.
|
|
@@ -27,7 +27,7 @@ export interface SearchQueryParams extends SearchToolParams {
|
|
|
27
27
|
* Execute a web search query for CLI/testing workflows.
|
|
28
28
|
*
|
|
29
29
|
* `authStorage` may be omitted; in that case we discover one via the standard
|
|
30
|
-
* factory (`discoverAuthStorage`), which honours `
|
|
30
|
+
* factory (`discoverAuthStorage`), which honours `JEOPI_AUTH_BROKER_URL` and
|
|
31
31
|
* otherwise opens the local SQLite credential store.
|
|
32
32
|
*/
|
|
33
33
|
export declare function runSearchQuery(params: SearchQueryParams, options?: {
|
|
@@ -9,7 +9,7 @@ Example extensions for pi-coding-agent.
|
|
|
9
9
|
pi --extension examples/extensions/permission-gate.ts
|
|
10
10
|
|
|
11
11
|
# Or copy to extensions directory for auto-discovery
|
|
12
|
-
cp permission-gate.ts ~/.
|
|
12
|
+
cp permission-gate.ts ~/.jeopi/agent/extensions/
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Examples
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* modify the system prompt based on extension state.
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
* 1. Copy this file to ~/.
|
|
8
|
+
* 1. Copy this file to ~/.jeopi/agent/extensions/ (legacy: ~/.pi/agent/extensions/) or your project's .jeopi/extensions/
|
|
9
9
|
* 2. Use /pirate to toggle pirate mode
|
|
10
10
|
* 3. When enabled, the agent will respond like a pirate
|
|
11
11
|
*/
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* - Uses ID-based tracking: agent outputs [DONE:id] to mark steps complete
|
|
15
15
|
*
|
|
16
16
|
* Usage:
|
|
17
|
-
* 1. Copy this file to ~/.
|
|
17
|
+
* 1. Copy this file to ~/.jeopi/agent/extensions/ (legacy: ~/.pi/agent/extensions/) or your project's .jeopi/extensions/
|
|
18
18
|
* 2. Use /plan to toggle plan mode on/off
|
|
19
19
|
* 3. Or start in plan mode with --plan flag
|
|
20
20
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Tool selection persists across session reloads and respects branch navigation.
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
* 1. Copy this file to ~/.
|
|
8
|
+
* 1. Copy this file to ~/.jeopi/agent/extensions/ (legacy: ~/.pi/agent/extensions/) or your project's .jeopi/extensions/
|
|
9
9
|
* 2. Use /tools to open the tool selector
|
|
10
10
|
*/
|
|
11
11
|
import type { ExtensionAPI, ExtensionContext } from "jeopi-cli";
|
package/examples/hooks/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Minimal SDK Usage
|
|
3
3
|
*
|
|
4
4
|
* Uses all defaults: discovers skills, hooks, tools, context files
|
|
5
|
-
* from cwd and ~/.
|
|
5
|
+
* from cwd and ~/.jeopi/agent. Model chosen from settings or first available.
|
|
6
6
|
*/
|
|
7
7
|
import { createAgentSession } from "jeopi-cli";
|
|
8
8
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { createAgentSession, discoverSkills, SessionManager, type Skill } from "jeopi-cli";
|
|
8
8
|
|
|
9
|
-
// Discover all skills from cwd/.
|
|
9
|
+
// Discover all skills from cwd/.jeopi/skills, ~/.jeopi/agent/skills, etc.
|
|
10
10
|
const { skills: allSkills } = await discoverSkills();
|
|
11
11
|
console.log(
|
|
12
12
|
"Discovered skills:",
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* They provide a unified system for extensions, custom tools, commands, and more.
|
|
6
6
|
*
|
|
7
7
|
* Extension files are discovered from:
|
|
8
|
-
* - ~/.
|
|
9
|
-
* - <cwd>/.
|
|
8
|
+
* - ~/.jeopi/agent/extensions/ (legacy: ~/.pi/agent/extensions/)
|
|
9
|
+
* - <cwd>/.jeopi/extensions/ (legacy: <cwd>/.pi/extensions/)
|
|
10
10
|
* - Paths specified in settings.json "extensions" array
|
|
11
11
|
* - Paths passed via --extension CLI flag
|
|
12
12
|
*
|
|
@@ -17,7 +17,7 @@ import { createAgentSession, SessionManager } from "jeopi-cli";
|
|
|
17
17
|
|
|
18
18
|
// Extensions are loaded from disk, not passed inline to createAgentSession.
|
|
19
19
|
// Use the discovery mechanism:
|
|
20
|
-
// 1. Place extension files in ~/.
|
|
20
|
+
// 1. Place extension files in ~/.jeopi/agent/extensions/ or .jeopi/extensions/
|
|
21
21
|
// 2. Add paths to settings.json: { "extensions": ["./my-extension.ts"] }
|
|
22
22
|
// 3. Use --extension flag: pi --extension ./my-extension.ts
|
|
23
23
|
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
SessionManager,
|
|
13
13
|
} from "jeopi-cli";
|
|
14
14
|
|
|
15
|
-
// Default: discoverAuthStorage() uses ~/.
|
|
16
|
-
// discoverModels() loads built-in + custom models from ~/.
|
|
15
|
+
// Default: discoverAuthStorage() uses ~/.jeopi/agent/agent.db
|
|
16
|
+
// discoverModels() loads built-in + custom models from ~/.jeopi/agent/models.json
|
|
17
17
|
const authStorage = await discoverAuthStorage();
|
|
18
18
|
const modelRegistry = await discoverModels(authStorage);
|
|
19
19
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* `SessionManager.list`, …) continues to work unmodified.
|
|
11
11
|
*
|
|
12
12
|
* Tool artifacts and image blobs are out of scope: `ArtifactManager` /
|
|
13
|
-
* `BlobStore` keep writing to `~/.
|
|
13
|
+
* `BlobStore` keep writing to `~/.jeopi/agent/...`. Reach for an object store
|
|
14
14
|
* (S3, R2, GCS) if you need those off-host too.
|
|
15
15
|
*/
|
|
16
16
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* against `bun:sqlite`.
|
|
15
15
|
*
|
|
16
16
|
* Tool artifacts and image blobs are out of scope: `ArtifactManager` /
|
|
17
|
-
* `BlobStore` keep writing to `~/.
|
|
17
|
+
* `BlobStore` keep writing to `~/.jeopi/agent/...`. Reach for object storage
|
|
18
18
|
* if you need those off-host too.
|
|
19
19
|
*/
|
|
20
20
|
|
package/examples/sdk/README.md
CHANGED
|
@@ -133,7 +133,7 @@ await resolveTool.execute("call-1", {
|
|
|
133
133
|
| `authStorage` | `discoverAuthStorage()` | Credential storage |
|
|
134
134
|
| `modelRegistry` | `discoverModels(authStorage)` | Model registry |
|
|
135
135
|
| `cwd` | `process.cwd()` | Working directory |
|
|
136
|
-
| `agentDir` | `~/.
|
|
136
|
+
| `agentDir` | `~/.jeopi/agent` | Config directory |
|
|
137
137
|
| `model` | From settings/first available | Model to use |
|
|
138
138
|
| `thinkingLevel` | From settings/"off" | off, low, medium, high |
|
|
139
139
|
| `systemPrompt` | Discovered | String or `(default) => modified` |
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "jeopi-cli",
|
|
4
|
-
"version": "16.2.
|
|
4
|
+
"version": "16.2.15",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://github.com/akillness/jeopi",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -56,17 +56,17 @@
|
|
|
56
56
|
"@agentclientprotocol/sdk": "0.25.0",
|
|
57
57
|
"@babel/parser": "^7.29.7",
|
|
58
58
|
"@mozilla/readability": "^0.6.0",
|
|
59
|
-
"jeopi-hashline": "16.2.
|
|
60
|
-
"jeopi-stats": "16.2.
|
|
61
|
-
"jeopi-agent-core": "16.2.
|
|
62
|
-
"jeopi-ai": "16.2.
|
|
63
|
-
"jeopi-catalog": "16.2.
|
|
64
|
-
"jeopi-mnemopi": "16.2.
|
|
65
|
-
"jeopi-natives": "16.2.
|
|
66
|
-
"jeopi-tui": "16.2.
|
|
67
|
-
"jeopi-utils": "16.2.
|
|
68
|
-
"jeopi-wire": "16.2.
|
|
69
|
-
"jeopi-snapcompact": "16.2.
|
|
59
|
+
"jeopi-hashline": "16.2.15",
|
|
60
|
+
"jeopi-stats": "16.2.15",
|
|
61
|
+
"jeopi-agent-core": "16.2.15",
|
|
62
|
+
"jeopi-ai": "16.2.15",
|
|
63
|
+
"jeopi-catalog": "16.2.15",
|
|
64
|
+
"jeopi-mnemopi": "16.2.15",
|
|
65
|
+
"jeopi-natives": "16.2.15",
|
|
66
|
+
"jeopi-tui": "16.2.15",
|
|
67
|
+
"jeopi-utils": "16.2.15",
|
|
68
|
+
"jeopi-wire": "16.2.15",
|
|
69
|
+
"jeopi-snapcompact": "16.2.15",
|
|
70
70
|
"@opentelemetry/api": "^1.9.1",
|
|
71
71
|
"@opentelemetry/context-async-hooks": "^2.7.1",
|
|
72
72
|
"@opentelemetry/exporter-trace-otlp-proto": "^0.218.0",
|
package/scripts/jeopi
CHANGED
|
@@ -30,7 +30,7 @@ cli=$scripts_dir/../src/cli.ts
|
|
|
30
30
|
preload=$scripts_dir/omp.ts
|
|
31
31
|
timing_preload=$scripts_dir/../../utils/src/module-timer.ts
|
|
32
32
|
|
|
33
|
-
launch_dir=${OMP_DEV_LAUNCH_DIR:-${HOME}/.
|
|
33
|
+
launch_dir=${OMP_DEV_LAUNCH_DIR:-${HOME}/.jeopi/.dev-cwd}
|
|
34
34
|
mkdir -p "$launch_dir"
|
|
35
35
|
|
|
36
36
|
OMP_LAUNCH_CWD=$PWD
|
|
@@ -19,7 +19,7 @@ describe("discoverAdvisorConfigs", () => {
|
|
|
19
19
|
|
|
20
20
|
beforeEach(async () => {
|
|
21
21
|
tmp = await fsp.mkdtemp(path.join(os.tmpdir(), "omp-advisor-config-"));
|
|
22
|
-
// Empty agent dir so the user-level search path can't pick up a real ~/.
|
|
22
|
+
// Empty agent dir so the user-level search path can't pick up a real ~/.jeopi/WATCHDOG.yml.
|
|
23
23
|
agentDir = await fsp.mkdtemp(path.join(os.tmpdir(), "omp-advisor-agentdir-"));
|
|
24
24
|
});
|
|
25
25
|
|
|
@@ -136,11 +136,11 @@ describe("WATCHDOG.yml file round-trip", () => {
|
|
|
136
136
|
});
|
|
137
137
|
|
|
138
138
|
it("resolves project and user scope paths", () => {
|
|
139
|
-
expect(advisorConfigFilePath("project", { projectDir: "/repo", agentDir: "/home/.
|
|
139
|
+
expect(advisorConfigFilePath("project", { projectDir: "/repo", agentDir: "/home/.jeopi" })).toBe(
|
|
140
140
|
path.join("/repo", "WATCHDOG.yml"),
|
|
141
141
|
);
|
|
142
|
-
expect(advisorConfigFilePath("user", { projectDir: "/repo", agentDir: "/home/.
|
|
143
|
-
path.join("/home/.
|
|
142
|
+
expect(advisorConfigFilePath("user", { projectDir: "/repo", agentDir: "/home/.jeopi" })).toBe(
|
|
143
|
+
path.join("/home/.jeopi", "WATCHDOG.yml"),
|
|
144
144
|
);
|
|
145
145
|
});
|
|
146
146
|
});
|
package/src/advisor/watchdog.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as os from "node:os";
|
|
2
2
|
import * as path from "node:path";
|
|
3
|
-
import { getAgentDir, isEnoent, logger, prompt } from "jeopi-utils";
|
|
3
|
+
import { CONFIG_DIR_NAME, getAgentDir, isEnoent, logger, prompt } from "jeopi-utils";
|
|
4
4
|
import { expandAtImports } from "../discovery/at-imports";
|
|
5
5
|
import activeRepoWatchdogTemplate from "../prompts/advisor/active-repo-watchdog.md" with { type: "text" };
|
|
6
6
|
import contextFilesTemplate from "../prompts/advisor/context-files.md" with { type: "text" };
|
|
@@ -44,7 +44,7 @@ export interface ConfigCandidate {
|
|
|
44
44
|
/**
|
|
45
45
|
* Walk the watchdog/advisor config search path — the user agent dir plus every
|
|
46
46
|
* directory from `cwd` up to the repo root (or home), probing both `<F>` and
|
|
47
|
-
* `.
|
|
47
|
+
* `.jeopi/<F>` for each given filename — and return the readable candidates with
|
|
48
48
|
* their raw content, sorted user-first then project ancestor→leaf (depth
|
|
49
49
|
* descending, so the leaf directory is most specific/last). Shared by
|
|
50
50
|
* {@link discoverWatchdogFiles} and `discoverAdvisorConfigs`. Content is returned
|
|
@@ -67,7 +67,7 @@ export async function collectConfigCandidates(
|
|
|
67
67
|
|
|
68
68
|
const candidates = new Set<string>();
|
|
69
69
|
|
|
70
|
-
// 1. User level: ~/.
|
|
70
|
+
// 1. User level: ~/.jeopi/agent/<F> (or active profile agent dir)
|
|
71
71
|
if (resolvedAgentDir) {
|
|
72
72
|
for (const filename of filenames) {
|
|
73
73
|
const userPath = path.resolve(resolvedAgentDir, filename);
|
|
@@ -76,11 +76,11 @@ export async function collectConfigCandidates(
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
// 2. Project levels (both standalone and native config
|
|
79
|
+
// 2. Project levels (both standalone and native config dir): walk up from cwd to repoRoot / home
|
|
80
80
|
let current = cwd;
|
|
81
81
|
while (true) {
|
|
82
82
|
for (const filename of filenames) {
|
|
83
|
-
candidates.add(path.resolve(current,
|
|
83
|
+
candidates.add(path.resolve(current, CONFIG_DIR_NAME, filename));
|
|
84
84
|
candidates.add(path.resolve(current, filename));
|
|
85
85
|
}
|
|
86
86
|
if (current === (repoRoot ?? home)) break;
|
|
@@ -96,9 +96,9 @@ export async function collectConfigCandidates(
|
|
|
96
96
|
const parent = path.dirname(candidate);
|
|
97
97
|
const baseName = parent.split(path.sep).pop() ?? "";
|
|
98
98
|
const isUser = userPaths.has(candidate);
|
|
99
|
-
const ownerDir = baseName ===
|
|
99
|
+
const ownerDir = baseName === CONFIG_DIR_NAME ? path.dirname(parent) : parent;
|
|
100
100
|
const ownerBaseName = ownerDir.split(path.sep).pop() ?? "";
|
|
101
|
-
if (isUser || !ownerBaseName.startsWith(".") || baseName ===
|
|
101
|
+
if (isUser || !ownerBaseName.startsWith(".") || baseName === CONFIG_DIR_NAME) {
|
|
102
102
|
const relative = path.relative(cwd, ownerDir);
|
|
103
103
|
const depth = relative === "" ? 0 : relative.split(path.sep).filter(Boolean).length;
|
|
104
104
|
items.push({ path: candidate, content, level: isUser ? "user" : "project", depth });
|
|
@@ -121,7 +121,7 @@ export async function collectConfigCandidates(
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
|
-
* Discover and load WATCHDOG.md files walking up from cwd, project .
|
|
124
|
+
* Discover and load WATCHDOG.md files walking up from cwd, project .jeopi folder, and user agent dir.
|
|
125
125
|
* Returns formatted watchdog file blocks ready to be appended to the advisor system prompt.
|
|
126
126
|
*/
|
|
127
127
|
export async function discoverWatchdogFiles(cwd: string, agentDir?: string): Promise<string[]> {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Managed-skills primitives for the experimental auto-learn feature.
|
|
3
3
|
*
|
|
4
4
|
* Managed skills are auto-generated/enhanced `SKILL.md` files kept in an
|
|
5
|
-
* isolated directory (`~/.
|
|
6
|
-
* user-authored skills (`~/.
|
|
5
|
+
* isolated directory (`~/.jeopi/agent/managed-skills`) separate from
|
|
6
|
+
* user-authored skills (`~/.jeopi/agent/skills`). They are discovered and
|
|
7
7
|
* surfaced like normal skills, but every write here is confined to
|
|
8
8
|
* `getManagedSkillsDir()` — auto-management can never touch authored skills.
|
|
9
9
|
*/
|
|
@@ -14,14 +14,14 @@ import { YAML } from "bun";
|
|
|
14
14
|
import { getAgentDir, isEnoent } from "jeopi-utils";
|
|
15
15
|
|
|
16
16
|
/** Provider id stamped on discovered managed skills (distinguishes them from authored). */
|
|
17
|
-
export const MANAGED_SKILLS_PROVIDER_ID = "
|
|
17
|
+
export const MANAGED_SKILLS_PROVIDER_ID = "jeopi-managed";
|
|
18
18
|
|
|
19
19
|
/** Hard cap on a managed SKILL.md body to keep generated skills bounded. */
|
|
20
20
|
export const MAX_MANAGED_SKILL_BYTES = 64_000;
|
|
21
21
|
|
|
22
22
|
const SKILL_NAME_PATTERN = /^[a-z0-9][a-z0-9-]{0,63}$/;
|
|
23
23
|
|
|
24
|
-
/** Resolve the isolated managed-skills directory (`~/.
|
|
24
|
+
/** Resolve the isolated managed-skills directory (`~/.jeopi/agent/managed-skills`). */
|
|
25
25
|
export function getManagedSkillsDir(agentDir: string = getAgentDir()): string {
|
|
26
26
|
return path.join(agentDir, "managed-skills");
|
|
27
27
|
}
|
|
@@ -8,7 +8,7 @@ import type { ASIData, ExperimentStatus, MetricDirection, NumericMetricMap } fro
|
|
|
8
8
|
/**
|
|
9
9
|
* Encode an absolute project path into a single filesystem-safe segment.
|
|
10
10
|
*
|
|
11
|
-
* Used to key per-project autoresearch state under `~/.
|
|
11
|
+
* Used to key per-project autoresearch state under `~/.jeopi/autoresearch/`.
|
|
12
12
|
* The `--…--` wrapper is historical — existing on-disk state depends on it,
|
|
13
13
|
* so changing the format here would orphan every prior autoresearch DB.
|
|
14
14
|
* Not collision-free for pathological inputs (`/a/b` vs `/a-b`) but matches
|
|
@@ -572,7 +572,7 @@ export async function openAutoresearchStorageIfExists(cwd: string): Promise<Auto
|
|
|
572
572
|
}
|
|
573
573
|
|
|
574
574
|
async function resolveAutoresearchPaths(cwd: string): Promise<{ dbPath: string; projectDir: string }> {
|
|
575
|
-
const override = process.env.
|
|
575
|
+
const override = process.env.JEOPI_AUTORESEARCH_DB_DIR;
|
|
576
576
|
const repoRoot = (await git.repo.root(cwd)) ?? cwd;
|
|
577
577
|
const encoded = encodeProjectKey(repoRoot);
|
|
578
578
|
if (override) {
|