open-multi-agent-kit 0.92.0 → 0.93.0
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 +15 -0
- package/README.md +2 -2
- package/dist/core/agent-session.d.ts +29 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +81 -14
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +5 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +5 -7
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +12 -3
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +28 -15
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/extensions/builtin/command-safety-gate.d.ts +8 -0
- package/dist/core/extensions/builtin/command-safety-gate.d.ts.map +1 -1
- package/dist/core/extensions/builtin/command-safety-gate.js +23 -0
- package/dist/core/extensions/builtin/command-safety-gate.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +4 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +2 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/keybindings.d.ts +5 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +5 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-resolver.d.ts +41 -3
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +17 -9
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/provider-resilience.d.ts.map +1 -1
- package/dist/core/provider-resilience.js +3 -1
- package/dist/core/provider-resilience.js.map +1 -1
- package/dist/core/reasoning-router-v4-weights.d.ts.map +1 -1
- package/dist/core/reasoning-router-v4-weights.js +9 -3
- package/dist/core/reasoning-router-v4-weights.js.map +1 -1
- package/dist/core/reasoning-router-v4.d.ts.map +1 -1
- package/dist/core/reasoning-router-v4.js +94 -24
- package/dist/core/reasoning-router-v4.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +11 -5
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/session-file-compaction.d.ts.map +1 -1
- package/dist/core/session-file-compaction.js +39 -5
- package/dist/core/session-file-compaction.js.map +1 -1
- package/dist/core/session-termination.d.ts.map +1 -1
- package/dist/core/session-termination.js +1 -1
- package/dist/core/session-termination.js.map +1 -1
- package/dist/core/settings-manager.d.ts +3 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +8 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +2 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +38 -11
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-box.d.ts +27 -0
- package/dist/modes/interactive/components/control-panel-box.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel-box.js +60 -8
- package/dist/modes/interactive/components/control-panel-box.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-layout.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel-layout.js +100 -45
- package/dist/modes/interactive/components/control-panel-layout.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-runtime-status.d.ts +9 -0
- package/dist/modes/interactive/components/control-panel-runtime-status.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel-runtime-status.js +10 -8
- package/dist/modes/interactive/components/control-panel-runtime-status.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-sparkles.d.ts +5 -0
- package/dist/modes/interactive/components/control-panel-sparkles.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel-sparkles.js +14 -9
- package/dist/modes/interactive/components/control-panel-sparkles.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +10 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +3 -3
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/status-sidebar.d.ts +49 -0
- package/dist/modes/interactive/components/status-sidebar.d.ts.map +1 -0
- package/dist/modes/interactive/components/status-sidebar.js +253 -0
- package/dist/modes/interactive/components/status-sidebar.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +9 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +94 -20
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/omk-neon-control.json +13 -13
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +1 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +19 -8
- package/dist/utils/clipboard.js.map +1 -1
- package/docs/compaction.md +7 -0
- package/docs/docs.json +4 -0
- package/docs/environment-variables.md +90 -0
- package/docs/index.md +1 -0
- package/docs/rpc.md +5 -2
- package/docs/settings.md +1 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/agents.test.ts +86 -0
- package/examples/extensions/subagent/agents.ts +18 -4
- package/examples/extensions/subagent/capabilities.ts +15 -1
- package/examples/extensions/subagent/domain-profiles.ts +272 -0
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +15 -15
- package/package.json +10 -7
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Environment Variables
|
|
2
|
+
|
|
3
|
+
OMK uses environment variables in three ways:
|
|
4
|
+
|
|
5
|
+
- Variables such as `OMK_OFFLINE` configure the OMK process.
|
|
6
|
+
- OMK sets `OMK_CODING_AGENT` so child processes can detect that they run inside OMK.
|
|
7
|
+
- Commands run by the LLM-callable bash tool receive `PI_*` variables describing the current session.
|
|
8
|
+
|
|
9
|
+
Provider API-key variables are documented separately in [Providers](providers.md).
|
|
10
|
+
|
|
11
|
+
## Process Marker
|
|
12
|
+
|
|
13
|
+
The CLI and RPC entry points set `OMK_CODING_AGENT=true`. Child processes inherit it and can use it to detect that they run inside OMK. It is not session-specific and is not set automatically when OMK is embedded through the SDK.
|
|
14
|
+
|
|
15
|
+
## Bash Tool Session Environment
|
|
16
|
+
|
|
17
|
+
Commands run by the bash tool receive the current session state (the `PI_*` names are kept for upstream Pi compatibility):
|
|
18
|
+
|
|
19
|
+
| Variable | Description |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| `PI_SESSION_ID` | Current session ID |
|
|
22
|
+
| `PI_SESSION_FILE` | Absolute path to the current session JSONL file; unset for ephemeral sessions |
|
|
23
|
+
| `PI_PROVIDER` | Currently selected model provider |
|
|
24
|
+
| `PI_MODEL` | Currently selected model ID |
|
|
25
|
+
| `PI_REASONING_LEVEL` | Current effective reasoning level: `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, or `max` |
|
|
26
|
+
|
|
27
|
+
The values are resolved when each command starts. Switching models or changing the reasoning level therefore affects the next bash command without restarting OMK. `PI_PROVIDER` and `PI_MODEL` identify the selected OMK model, not a different upstream model that a router may choose internally.
|
|
28
|
+
|
|
29
|
+
Inherited parent-process values for these variables are always stripped first, so a nested OMK session never exposes stale parent-session metadata.
|
|
30
|
+
|
|
31
|
+
When asked which model or provider is running, inspect these variables instead of inferring the answer from the system prompt:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
printf '%s/%s\n' "$PI_PROVIDER" "$PI_MODEL"
|
|
35
|
+
printf 'reasoning=%s session=%s\n' "$PI_REASONING_LEVEL" "$PI_SESSION_ID"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The session file can be inspected directly when the session is persistent:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
if [ -n "$PI_SESSION_FILE" ]; then
|
|
42
|
+
tail -n 1 "$PI_SESSION_FILE"
|
|
43
|
+
fi
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
These variables are injected into the LLM-callable bash tool. They are not injected into user-entered `!` or `!!` commands.
|
|
47
|
+
|
|
48
|
+
### Custom Bash Tools
|
|
49
|
+
|
|
50
|
+
Bash tools created with `createBashTool()` expose the session environment by default. Injection happens before `spawnHook`, so a hook receives the variables in `ctx.env`:
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
const bashTool = createBashTool(cwd, {
|
|
54
|
+
spawnHook: (ctx) => ({
|
|
55
|
+
...ctx,
|
|
56
|
+
env: { ...ctx.env, CI: "1" },
|
|
57
|
+
}),
|
|
58
|
+
});
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Disable session metadata independently of the spawn hook:
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
const bashTool = createBashTool(cwd, {
|
|
65
|
+
exposeSessionEnvironment: false,
|
|
66
|
+
spawnHook: (ctx) => ctx,
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
When disabled, OMK removes inherited values for these variables so nested OMK processes do not expose stale parent-session metadata.
|
|
71
|
+
|
|
72
|
+
## OMK Process Configuration
|
|
73
|
+
|
|
74
|
+
These variables are read by OMK itself:
|
|
75
|
+
|
|
76
|
+
| Variable | Description |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| `OMK_CODING_AGENT_DIR` | Override the config directory; default is `~/.omk/agent` |
|
|
79
|
+
| `OMK_CODING_AGENT_SESSION_DIR` | Override session storage; overridden by `--session-dir` |
|
|
80
|
+
| `OMK_PACKAGE_DIR` | Override the package directory, useful for Nix/Guix store paths |
|
|
81
|
+
| `OMK_OFFLINE` | Disable startup network operations, including update checks and install/update telemetry |
|
|
82
|
+
| `OMK_SKIP_VERSION_CHECK` | Disable the latest-version request |
|
|
83
|
+
| `OMK_TELEMETRY` | Override install/update telemetry and provider attribution headers: `1`/`true`/`yes` or `0`/`false`/`no` |
|
|
84
|
+
| `OMK_SHARE_VIEWER_URL` | Override the base URL used by `/share` |
|
|
85
|
+
| `OMK_HARDWARE_CURSOR` | Set to `1` to show the hardware cursor; see [Terminal setup](terminal-setup.md) |
|
|
86
|
+
| `OMK_CONTEXT_GOVERNOR` | Configure the context-budget governor; see `context-budget-*` sources |
|
|
87
|
+
| `VISUAL`, `EDITOR` | External editor fallback when `externalEditor` is unset |
|
|
88
|
+
| `HTTP_PROXY`, `HTTPS_PROXY` | Proxy outbound HTTP requests |
|
|
89
|
+
|
|
90
|
+
Provider credentials such as `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, and cloud-provider configuration are listed in [Providers](providers.md).
|
package/docs/index.md
CHANGED
|
@@ -37,6 +37,7 @@ For the full first-run flow, see [Quickstart](quickstart.md).
|
|
|
37
37
|
- [Providers](providers.md) - subscription and API-key setup for built-in providers.
|
|
38
38
|
- [Containerization](containerization.md) - sandbox omk with OpenShell, Gondolin, or Docker.
|
|
39
39
|
- [Settings](settings.md) - global and project settings.
|
|
40
|
+
- [Environment Variables](environment-variables.md) - process configuration and bash-tool session environment.
|
|
40
41
|
- [Keybindings](keybindings.md) - default shortcuts and custom keybindings.
|
|
41
42
|
- [Sessions](sessions.md) - session management, branching, and tree navigation.
|
|
42
43
|
- [Compaction](compaction.md) - context compaction and branch summarization.
|
package/docs/rpc.md
CHANGED
|
@@ -424,12 +424,14 @@ Response:
|
|
|
424
424
|
|
|
425
425
|
#### bash
|
|
426
426
|
|
|
427
|
-
Execute a shell command and add output to conversation context.
|
|
427
|
+
Execute a shell command and add output to conversation context. Output streams as `bash_execution_update` events while the command runs; the response contains the final result.
|
|
428
428
|
|
|
429
429
|
```json
|
|
430
|
-
{"type": "bash", "command": "ls -la"}
|
|
430
|
+
{"id": "req-1", "type": "bash", "command": "ls -la"}
|
|
431
431
|
```
|
|
432
432
|
|
|
433
|
+
Include an `id` to associate streamed `bash_execution_update` events with this command.
|
|
434
|
+
|
|
433
435
|
Response:
|
|
434
436
|
```json
|
|
435
437
|
{
|
|
@@ -753,6 +755,7 @@ Events are streamed to stdout as JSON lines during agent operation. Events do NO
|
|
|
753
755
|
| `message_start` | Message begins |
|
|
754
756
|
| `message_update` | Streaming update (text/thinking/toolcall deltas) |
|
|
755
757
|
| `message_end` | Message completes |
|
|
758
|
+
| `bash_execution_update` | Direct RPC bash command output chunk (includes originating command `id`) |
|
|
756
759
|
| `tool_execution_start` | Tool begins execution |
|
|
757
760
|
| `tool_execution_update` | Tool execution progress (streaming output) |
|
|
758
761
|
| `tool_execution_end` | Tool completes |
|
package/docs/settings.md
CHANGED
|
@@ -77,6 +77,7 @@ Advisory-only hint source for the v4 auto thinking-level resolver. Read from the
|
|
|
77
77
|
| `editorPaddingX` | number | `0` | Horizontal padding for input editor (0-3) |
|
|
78
78
|
| `autocompleteMaxVisible` | number | `5` | Max visible items in autocomplete dropdown (3-20) |
|
|
79
79
|
| `showHardwareCursor` | boolean | `false` | Show the terminal cursor while TUI positions it for IME support |
|
|
80
|
+
| `pinStatusSidebar` | boolean | `false` | Pin the bottom status bar as a responsive right rail (opencode-style): width scales with the terminal (~26%, 34–48 cols), the MCP roster grows on taller terminals, and the content column shrinks to match so the prompt is never covered. Toggle anytime with `Ctrl+Q`. Also enabled by `OMK_PIN_STATUS_SIDEBAR=1` |
|
|
80
81
|
|
|
81
82
|
### Telemetry and update checks
|
|
82
83
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omk-extension-custom-provider-anthropic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.93.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omk-extension-custom-provider-anthropic",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.93.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "0.52.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omk-extension-gondolin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.93.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omk-extension-gondolin",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.93.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@earendil-works/gondolin": "0.12.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omk-extension-sandbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.93.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omk-extension-sandbox",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.93.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sandbox-runtime": "0.0.26"
|
|
12
12
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for `parseEnforceFlag` coercion in agents discovery.
|
|
3
|
+
*
|
|
4
|
+
* Regression: 2026-07-26 — YAML boolean `enforceCapabilities: true` was
|
|
5
|
+
* silently ignored because the parser only accepted the string "true". These
|
|
6
|
+
* tests pin coercion behavior for boolean/number/string/garbage inputs via
|
|
7
|
+
* real `discoverAgents` against a temp agents dir (no I/O mocks, no LLM).
|
|
8
|
+
*/
|
|
9
|
+
import * as fs from "node:fs";
|
|
10
|
+
import * as os from "node:os";
|
|
11
|
+
import * as path from "node:path";
|
|
12
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
13
|
+
import { discoverAgents } from "./agents.ts";
|
|
14
|
+
|
|
15
|
+
const tmpDirs: string[] = [];
|
|
16
|
+
|
|
17
|
+
function agent(name: string, fm: string): string {
|
|
18
|
+
return `---\nname: ${name}\ndescription: test agent\ntools: read\n${fm}\n---\nbody\n`;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// discoverAgents(cwd, scope) resolves the user dir from OMK_CODING_AGENT_DIR.
|
|
22
|
+
// Point it at our temp dir via env so no real agent tree is touched.
|
|
23
|
+
function withAgentDir(dir: string, fn: () => ReturnType<typeof discoverAgents>) {
|
|
24
|
+
const prev = process.env.OMK_CODING_AGENT_DIR;
|
|
25
|
+
process.env.OMK_CODING_AGENT_DIR = path.dirname(dir); // parent contains "agents"
|
|
26
|
+
try {
|
|
27
|
+
return fn();
|
|
28
|
+
} finally {
|
|
29
|
+
if (prev === undefined) delete process.env.OMK_CODING_AGENT_DIR;
|
|
30
|
+
else process.env.OMK_CODING_AGENT_DIR = prev;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
afterEach(() => {
|
|
35
|
+
for (const dir of tmpDirs.splice(0)) fs.rmSync(dir, { recursive: true, force: true });
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
describe("parseEnforceFlag coercion (via discoverAgents)", () => {
|
|
39
|
+
const cases: Array<[string, string, boolean | undefined]> = [
|
|
40
|
+
["yaml-bool-true", "enforceCapabilities: true", true],
|
|
41
|
+
["yaml-bool-false", "enforceCapabilities: false", false],
|
|
42
|
+
["num-1", "enforceCapabilities: 1", true],
|
|
43
|
+
["num-0", "enforceCapabilities: 0", false],
|
|
44
|
+
["str-yes", "enforceCapabilities: yes", true],
|
|
45
|
+
["str-on", "enforceCapabilities: on", true],
|
|
46
|
+
["str-no", "enforceCapabilities: no", false],
|
|
47
|
+
["str-off", "enforceCapabilities: off", false],
|
|
48
|
+
["str-quoted-true", 'enforceCapabilities: "true"', true],
|
|
49
|
+
["str-quoted-false", 'enforceCapabilities: "false"', false],
|
|
50
|
+
["str-True-spaced", "enforceCapabilities: ' True '", true],
|
|
51
|
+
["garbage-num-2", "enforceCapabilities: 2", undefined],
|
|
52
|
+
["garbage-word", "enforceCapabilities: treu", undefined],
|
|
53
|
+
["garbage-empty", 'enforceCapabilities: ""', undefined],
|
|
54
|
+
["absent-key", "", undefined],
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
for (const [id, fm, expected] of cases) {
|
|
58
|
+
it(`${id} → ${String(expected)}`, () => {
|
|
59
|
+
const parent = fs.mkdtempSync(path.join(os.tmpdir(), "omk-agent-dir-"));
|
|
60
|
+
tmpDirs.push(parent);
|
|
61
|
+
const agentsDir = path.join(parent, "agents");
|
|
62
|
+
fs.mkdirSync(agentsDir);
|
|
63
|
+
fs.writeFileSync(path.join(agentsDir, `${id}.md`), agent(id, fm), "utf-8");
|
|
64
|
+
|
|
65
|
+
const result = withAgentDir(agentsDir, () => discoverAgents(process.cwd(), "user"));
|
|
66
|
+
const found = result.agents.find((a) => a.name === id);
|
|
67
|
+
expect(found, `agent ${id} discovered`).toBeDefined();
|
|
68
|
+
expect(found?.enforceCapabilities).toBe(expected);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
it("fail-closed: garbage input never enables enforcement", () => {
|
|
73
|
+
const parent = fs.mkdtempSync(path.join(os.tmpdir(), "omk-agent-dir-"));
|
|
74
|
+
tmpDirs.push(parent);
|
|
75
|
+
const agentsDir = path.join(parent, "agents");
|
|
76
|
+
fs.mkdirSync(agentsDir);
|
|
77
|
+
for (const bad of ["treu", "2", '" "', "[true]", "~"]) {
|
|
78
|
+
const name = `bad-${bad.replace(/[^a-z0-9]/gi, "")}`;
|
|
79
|
+
fs.writeFileSync(path.join(agentsDir, `${name}.md`), agent(name, `enforceCapabilities: ${bad}`), "utf-8");
|
|
80
|
+
}
|
|
81
|
+
const result = withAgentDir(agentsDir, () => discoverAgents(process.cwd(), "user"));
|
|
82
|
+
for (const a of result.agents) {
|
|
83
|
+
expect(a.enforceCapabilities, `${a.name} must not enable on garbage`).not.toBe(true);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
});
|
|
@@ -29,6 +29,23 @@ export interface AgentDiscoveryResult {
|
|
|
29
29
|
projectAgentsDir: string | null;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
/** Coerce frontmatter enforceCapabilities (boolean | string | unknown) to boolean|undefined. */
|
|
33
|
+
function parseEnforceFlag(value: unknown): boolean | undefined {
|
|
34
|
+
if (typeof value === "boolean") return value;
|
|
35
|
+
if (typeof value === "number") {
|
|
36
|
+
if (value === 1) return true;
|
|
37
|
+
if (value === 0) return false;
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
if (typeof value === "string") {
|
|
41
|
+
const v = value.trim().toLowerCase();
|
|
42
|
+
if (v === "true" || v === "1" || v === "yes" || v === "on") return true;
|
|
43
|
+
if (v === "false" || v === "0" || v === "no" || v === "off") return false;
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
|
|
32
49
|
function loadAgentsFromDir(dir: string, source: "user" | "project"): AgentConfig[] {
|
|
33
50
|
const agents: AgentConfig[] = [];
|
|
34
51
|
|
|
@@ -67,10 +84,7 @@ function loadAgentsFromDir(dir: string, source: "user" | "project"): AgentConfig
|
|
|
67
84
|
.filter(Boolean);
|
|
68
85
|
|
|
69
86
|
const capabilities = parseCapabilities(frontmatter);
|
|
70
|
-
const enforceCapabilities =
|
|
71
|
-
typeof frontmatter.enforceCapabilities === "string"
|
|
72
|
-
? frontmatter.enforceCapabilities.trim().toLowerCase() === "true"
|
|
73
|
-
: undefined;
|
|
87
|
+
const enforceCapabilities = parseEnforceFlag(frontmatter.enforceCapabilities);
|
|
74
88
|
|
|
75
89
|
agents.push({
|
|
76
90
|
name: frontmatter.name,
|
|
@@ -69,16 +69,19 @@ export const VALID_HOOKS: readonly string[] = [
|
|
|
69
69
|
];
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
|
-
* Compiled-in MCP server set —
|
|
72
|
+
* Compiled-in MCP server set — live OMK MCP ids (mcp.json + known optional servers) sourced from the MCP
|
|
73
73
|
* configuration. This list MUST be updated if the runtime MCP set changes.
|
|
74
74
|
*/
|
|
75
75
|
export const VALID_MCP: readonly string[] = [
|
|
76
76
|
"adaptorch",
|
|
77
|
+
"adaptorch-mcp",
|
|
78
|
+
"blender-mcp",
|
|
77
79
|
"chrome-devtools",
|
|
78
80
|
"context7",
|
|
79
81
|
"fetch",
|
|
80
82
|
"filesystem",
|
|
81
83
|
"firecrawl",
|
|
84
|
+
"ghidra",
|
|
82
85
|
"github",
|
|
83
86
|
"lean-ctx",
|
|
84
87
|
"memory",
|
|
@@ -88,6 +91,7 @@ export const VALID_MCP: readonly string[] = [
|
|
|
88
91
|
"serena",
|
|
89
92
|
"supermemory",
|
|
90
93
|
"understand-anything",
|
|
94
|
+
"unity-mcp",
|
|
91
95
|
"zai-reader",
|
|
92
96
|
"zai-vision",
|
|
93
97
|
"zai-zread",
|
|
@@ -180,6 +184,16 @@ function addSkillsFromRoot(root: string, skills: Map<string, string>): void {
|
|
|
180
184
|
entries.sort();
|
|
181
185
|
for (const rel of entries) {
|
|
182
186
|
if (path.basename(rel) !== SKILL_FILE_NAME) continue;
|
|
187
|
+
// Skip archived/corpus trees — they collide with real skill names (e.g. code-review).
|
|
188
|
+
const relPosix = rel.split(path.sep).join("/");
|
|
189
|
+
if (
|
|
190
|
+
relPosix.includes("system-prompts-leaks/") ||
|
|
191
|
+
relPosix.includes("/corpus/") ||
|
|
192
|
+
relPosix.includes("node_modules/") ||
|
|
193
|
+
relPosix.includes("/.git/")
|
|
194
|
+
) {
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
183
197
|
const abs = path.resolve(root, rel);
|
|
184
198
|
let stat: fs.Stats;
|
|
185
199
|
try {
|
|
@@ -23,6 +23,278 @@ export interface DomainProfile {
|
|
|
23
23
|
|
|
24
24
|
/** All domain profiles, ordered so that more specific domains precede general ones. */
|
|
25
25
|
export const DOMAIN_PROFILES: readonly DomainProfile[] = [
|
|
26
|
+
// ── OMK-native elite domains (prepended — name-weighted, high specificity) ──
|
|
27
|
+
|
|
28
|
+
{
|
|
29
|
+
id: "omk-core-eng",
|
|
30
|
+
label: "OMK Core Engineering Lanes",
|
|
31
|
+
keywords: [
|
|
32
|
+
/omk-?coder/i,
|
|
33
|
+
/omk-?explorer/i,
|
|
34
|
+
/omk-?reviewer/i,
|
|
35
|
+
/omk-?tester/i,
|
|
36
|
+
/omk-?architect/i,
|
|
37
|
+
/omk-?qa\b/i,
|
|
38
|
+
/omk-?diffsurgeon/i,
|
|
39
|
+
/omk-?vision-?debugger/i,
|
|
40
|
+
/diff.?surgeon/i,
|
|
41
|
+
/vision.?debugger/i,
|
|
42
|
+
/\bcodemod\b/i,
|
|
43
|
+
/\btypecheck\b/i,
|
|
44
|
+
],
|
|
45
|
+
skillPool: [
|
|
46
|
+
"programming",
|
|
47
|
+
"debugging",
|
|
48
|
+
"ponytail",
|
|
49
|
+
"ast-grep",
|
|
50
|
+
"lsp",
|
|
51
|
+
"refactor",
|
|
52
|
+
"review-work",
|
|
53
|
+
"code-review",
|
|
54
|
+
"tdd-workflow",
|
|
55
|
+
"git-master",
|
|
56
|
+
"gstack",
|
|
57
|
+
"remove-ai-slops",
|
|
58
|
+
"ponytail-review",
|
|
59
|
+
"ponytail-audit",
|
|
60
|
+
"visual-qa",
|
|
61
|
+
"frontend",
|
|
62
|
+
"understand-anything",
|
|
63
|
+
"headroom",
|
|
64
|
+
"ulw-plan",
|
|
65
|
+
"python-testing",
|
|
66
|
+
"golang-testing",
|
|
67
|
+
"rust-testing",
|
|
68
|
+
],
|
|
69
|
+
defaultMcp: [
|
|
70
|
+
"filesystem",
|
|
71
|
+
"context7",
|
|
72
|
+
"memory",
|
|
73
|
+
"understand-anything",
|
|
74
|
+
"lean-ctx",
|
|
75
|
+
"chrome-devtools",
|
|
76
|
+
"playwright",
|
|
77
|
+
"zai-vision",
|
|
78
|
+
],
|
|
79
|
+
defaultHooks: [
|
|
80
|
+
"session-context",
|
|
81
|
+
"post-format",
|
|
82
|
+
"typecheck-after-edit",
|
|
83
|
+
"eslint-after-edit",
|
|
84
|
+
"stop-verify",
|
|
85
|
+
"branch-diff-snapshot",
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
{
|
|
90
|
+
id: "omk-orchestration",
|
|
91
|
+
label: "OMK Orchestration & Lanes",
|
|
92
|
+
keywords: [
|
|
93
|
+
/omk-?conductor/i,
|
|
94
|
+
/omk-?router/i,
|
|
95
|
+
/omk-?planner/i,
|
|
96
|
+
/omk-?aggregator/i,
|
|
97
|
+
/omk-?integrator/i,
|
|
98
|
+
/omk-?loopback/i,
|
|
99
|
+
/omk-?worktree/i,
|
|
100
|
+
/\bconductor\b/i,
|
|
101
|
+
/\blane.?grant/i,
|
|
102
|
+
/omk-?ontology/i,
|
|
103
|
+
/\bsubagent/i,
|
|
104
|
+
/\borchestrat/i,
|
|
105
|
+
],
|
|
106
|
+
skillPool: [
|
|
107
|
+
"adaptorch-route",
|
|
108
|
+
"adaptorch",
|
|
109
|
+
"omk-plan",
|
|
110
|
+
"ulw-plan",
|
|
111
|
+
"understand-anything",
|
|
112
|
+
"headroom",
|
|
113
|
+
"omk-loop",
|
|
114
|
+
"omk-agent-ops",
|
|
115
|
+
"omk-engineering",
|
|
116
|
+
"gstack",
|
|
117
|
+
"git-master",
|
|
118
|
+
],
|
|
119
|
+
defaultMcp: ["adaptorch", "memory", "understand-anything"],
|
|
120
|
+
defaultHooks: ["session-context", "precompact-checkpoint", "subagent-stop-audit"],
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: "omk-godmode-research",
|
|
124
|
+
label: "OMK Max-Capability Research",
|
|
125
|
+
keywords: [
|
|
126
|
+
/omk-?godmode/i,
|
|
127
|
+
/omk-?godmod/i,
|
|
128
|
+
/\bgodmode\b/i,
|
|
129
|
+
/offensive-?jailbreak/i,
|
|
130
|
+
/full.?spectrum/i,
|
|
131
|
+
/max-?capability/i,
|
|
132
|
+
],
|
|
133
|
+
skillPool: [
|
|
134
|
+
"omk-godmod",
|
|
135
|
+
"offensive-jailbreak",
|
|
136
|
+
"reverse-skill",
|
|
137
|
+
"programming",
|
|
138
|
+
"insane-search",
|
|
139
|
+
"debugging",
|
|
140
|
+
"security-review",
|
|
141
|
+
"omk-crawling",
|
|
142
|
+
],
|
|
143
|
+
defaultMcp: ["filesystem", "memory", "fetch", "firecrawl", "ghidra", "playwright"],
|
|
144
|
+
defaultHooks: ["session-context", "subagent-stop-audit"],
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
id: "omk-reverse",
|
|
148
|
+
label: "OMK Reverse Engineering",
|
|
149
|
+
keywords: [
|
|
150
|
+
/omk-?re\b/i,
|
|
151
|
+
/reverse-?skill/i,
|
|
152
|
+
/reverse.?engineer/i,
|
|
153
|
+
/\bdecompile/i,
|
|
154
|
+
/\bghidra\b/i,
|
|
155
|
+
/\bjadx\b/i,
|
|
156
|
+
/\bctf\b/i,
|
|
157
|
+
/\bapk\b/i,
|
|
158
|
+
],
|
|
159
|
+
skillPool: ["reverse-skill", "security-review", "programming", "insane-search", "debugging", "omk-crawling"],
|
|
160
|
+
defaultMcp: ["filesystem", "memory", "ghidra", "chrome-devtools", "playwright"],
|
|
161
|
+
defaultHooks: ["session-context", "subagent-stop-audit"],
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
id: "omk-crawl-search",
|
|
165
|
+
label: "OMK Crawl & Hard-Web Fetch",
|
|
166
|
+
keywords: [
|
|
167
|
+
/omk-?crawler/i,
|
|
168
|
+
/omk-?crawling/i,
|
|
169
|
+
/insane-?search/i,
|
|
170
|
+
/\bwaf\b/i,
|
|
171
|
+
/blocked.?url/i,
|
|
172
|
+
/web.?fetch/i,
|
|
173
|
+
/hard.?web/i,
|
|
174
|
+
],
|
|
175
|
+
skillPool: ["insane-search", "omk-crawling", "adaptorch", "headroom", "gstack"],
|
|
176
|
+
defaultMcp: ["fetch", "firecrawl", "playwright", "chrome-devtools", "memory"],
|
|
177
|
+
defaultHooks: ["session-context"],
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: "omk-minimalism",
|
|
181
|
+
label: "OMK Ponytail Minimalism",
|
|
182
|
+
keywords: [
|
|
183
|
+
/omk-?ponytail/i,
|
|
184
|
+
/\bponytail\b/i,
|
|
185
|
+
/\byagni\b/i,
|
|
186
|
+
/over-?engineer/i,
|
|
187
|
+
/slopcutter/i,
|
|
188
|
+
/remove-?ai-?slop/i,
|
|
189
|
+
/\bminimalism\b/i,
|
|
190
|
+
],
|
|
191
|
+
skillPool: [
|
|
192
|
+
"ponytail",
|
|
193
|
+
"ponytail-review",
|
|
194
|
+
"ponytail-audit",
|
|
195
|
+
"remove-ai-slops",
|
|
196
|
+
"refactor",
|
|
197
|
+
"programming",
|
|
198
|
+
"docs-write-concisely",
|
|
199
|
+
"polish",
|
|
200
|
+
],
|
|
201
|
+
defaultMcp: ["filesystem", "context7", "memory"],
|
|
202
|
+
defaultHooks: ["post-format", "typecheck-after-edit"],
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: "omk-debug-perf",
|
|
206
|
+
label: "OMK Debug & Performance",
|
|
207
|
+
keywords: [
|
|
208
|
+
/omk-?debugger/i,
|
|
209
|
+
/omk-?perf/i,
|
|
210
|
+
/omk-?tdd/i,
|
|
211
|
+
/omk-?sre/i,
|
|
212
|
+
/root-?cause/i,
|
|
213
|
+
/\bheisenbug\b/i,
|
|
214
|
+
/\bflaky\b/i,
|
|
215
|
+
/\bincident\b/i,
|
|
216
|
+
/\bbenchmark\b/i,
|
|
217
|
+
/\bhotspot\b/i,
|
|
218
|
+
],
|
|
219
|
+
skillPool: [
|
|
220
|
+
"debugging",
|
|
221
|
+
"tdd-workflow",
|
|
222
|
+
"programming",
|
|
223
|
+
"ast-grep",
|
|
224
|
+
"lsp",
|
|
225
|
+
"python-testing",
|
|
226
|
+
"golang-testing",
|
|
227
|
+
"rust-testing",
|
|
228
|
+
"refactor",
|
|
229
|
+
"ponytail",
|
|
230
|
+
"omk-loop",
|
|
231
|
+
"omk-agent-ops",
|
|
232
|
+
"gstack",
|
|
233
|
+
],
|
|
234
|
+
defaultMcp: ["filesystem", "context7", "memory", "github"],
|
|
235
|
+
defaultHooks: ["typecheck-after-edit", "post-format", "session-context"],
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
id: "omk-ship",
|
|
239
|
+
label: "OMK Release & Gstack Ship",
|
|
240
|
+
keywords: [
|
|
241
|
+
/omk-?release/i,
|
|
242
|
+
/omk-?gstack/i,
|
|
243
|
+
/\bgstack\b/i,
|
|
244
|
+
/\bchangelog\b/i,
|
|
245
|
+
/\bsemver\b/i,
|
|
246
|
+
/\bcut.?release\b/i,
|
|
247
|
+
/\bland.?pr\b/i,
|
|
248
|
+
/worktree/i,
|
|
249
|
+
],
|
|
250
|
+
skillPool: [
|
|
251
|
+
"gstack",
|
|
252
|
+
"git-master",
|
|
253
|
+
"review-work",
|
|
254
|
+
"programming",
|
|
255
|
+
"omk-agent-ops",
|
|
256
|
+
"docs-update-docs",
|
|
257
|
+
"omk-loop",
|
|
258
|
+
],
|
|
259
|
+
defaultMcp: ["filesystem", "memory", "github"],
|
|
260
|
+
defaultHooks: [
|
|
261
|
+
"release-check-before-stop",
|
|
262
|
+
"npm-audit-summary",
|
|
263
|
+
"branch-diff-snapshot",
|
|
264
|
+
"protect-secrets",
|
|
265
|
+
"stop-verify",
|
|
266
|
+
"worktree-create-guard",
|
|
267
|
+
],
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
id: "omk-docs-ui",
|
|
271
|
+
label: "OMK Docs & Frontend",
|
|
272
|
+
keywords: [
|
|
273
|
+
/omk-?docs/i,
|
|
274
|
+
/omk-?frontend/i,
|
|
275
|
+
/docs-write-concisely/i,
|
|
276
|
+
/docs-update-docs/i,
|
|
277
|
+
/\breadme\b/i,
|
|
278
|
+
/tech.?writing/i,
|
|
279
|
+
/visual-?qa/i,
|
|
280
|
+
/\ba11y\b/i,
|
|
281
|
+
],
|
|
282
|
+
skillPool: [
|
|
283
|
+
"docs-write-concisely",
|
|
284
|
+
"docs-update-docs",
|
|
285
|
+
"remove-ai-slops",
|
|
286
|
+
"polish",
|
|
287
|
+
"frontend",
|
|
288
|
+
"frontend-patterns",
|
|
289
|
+
"visual-qa",
|
|
290
|
+
"programming",
|
|
291
|
+
"ponytail",
|
|
292
|
+
"headroom",
|
|
293
|
+
],
|
|
294
|
+
defaultMcp: ["filesystem", "memory", "context7", "chrome-devtools", "playwright", "zai-vision"],
|
|
295
|
+
defaultHooks: ["post-format", "typecheck-after-edit", "eslint-after-edit", "session-context"],
|
|
296
|
+
},
|
|
297
|
+
|
|
26
298
|
{
|
|
27
299
|
id: "frontend-web",
|
|
28
300
|
label: "Frontend & Web",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omk-extension-with-deps",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.93.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omk-extension-with-deps",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.93.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ms": "2.1.3"
|
|
12
12
|
},
|