@octen.ai/cli 0.13.0 → 0.14.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/README.md +23 -6
- package/dist/api/premierSearch.d.ts +0 -1
- package/dist/api/premierSearch.js +2 -2
- package/dist/api/search.d.ts +2 -0
- package/dist/api/search.js +3 -1
- package/dist/commands/broadSearch.js +1 -0
- package/dist/commands/configureMcp.js +18 -3
- package/dist/commands/reset.js +2 -0
- package/dist/commands/search.js +1 -0
- package/dist/mcp/clients.d.ts +8 -2
- package/dist/mcp/clients.js +26 -1
- package/dist/mcp/install.d.ts +10 -5
- package/dist/mcp/install.js +1 -1
- package/dist/mcp/write.js +2 -3
- package/dist/util/detectClient.js +6 -0
- package/package.json +1 -1
- package/skills/octen-search/SKILL.md +15 -2
- package/skills/octen-web-search/SKILL.md +5 -1
package/README.md
CHANGED
|
@@ -289,9 +289,12 @@ Search the live web.
|
|
|
289
289
|
|
|
290
290
|
```sh
|
|
291
291
|
octen search "latest LLM benchmarks" -n 10 --topic news --highlight --time-range week
|
|
292
|
+
octen search "EU AI Act obligations for general-purpose models" -n 5 --result-type dynamic --highlight
|
|
292
293
|
```
|
|
293
294
|
|
|
294
|
-
Options: `-n` (result count 1–100), `--topic` (general|news), `--highlight` (+`--highlight-max-tokens`, 100–20000), `--time-range` (day|week|month|year or d|w|m|y), `--start-time`/`--end-time` (YYYY-MM-DD or ISO datetime), `--include-domains`, `--exclude-domains`, `--language` (comma-separated ISO 639-1 codes, e.g. `en,ja` — one of `ar de en es fr hi id it ja ko nl pl pt ru th tr vi zh`), `--full-content` (+`--full-content-max-tokens`, 100–100000), `--images`, `--format` (text|markdown), `--safesearch`.
|
|
295
|
+
Options: `-n` (result count 1–100), `--topic` (general|news), `--result-type` (standard|dynamic), `--highlight` (+`--highlight-max-tokens`, 100–20000), `--time-range` (day|week|month|year or d|w|m|y), `--start-time`/`--end-time` (YYYY-MM-DD or ISO datetime), `--include-domains`, `--exclude-domains`, `--language` (comma-separated ISO 639-1 codes, e.g. `en,ja` — one of `ar de en es fr hi id it ja ko nl pl pt ru th tr vi zh`), `--full-content` (+`--full-content-max-tokens`, 100–100000), `--images`, `--format` (text|markdown), `--safesearch`.
|
|
296
|
+
|
|
297
|
+
`--result-type standard` (the default) returns results as the flags specify, and with `--highlight` the `--highlight-max-tokens` cap applies as given. With `dynamic`, only the relevant results come back, so `-n` is a maximum (fewer, possibly none, can come back), and Octen may adjust the highlight length per result. In the JSON output of `octen search`, `meta.result_type` echoes the value used.
|
|
295
298
|
|
|
296
299
|
---
|
|
297
300
|
|
|
@@ -373,9 +376,10 @@ Use it for comparisons across many sources (pricing, products, vendors), surveys
|
|
|
373
376
|
|
|
374
377
|
```sh
|
|
375
378
|
octen broad-search "compare cloud GPU pricing across providers" --max-queries 5 -n 10
|
|
379
|
+
octen broad-search "compare cloud GPU pricing across providers" --max-queries 5 -n 5 --result-type dynamic --highlight
|
|
376
380
|
```
|
|
377
381
|
|
|
378
|
-
Options: `--max-queries` (decompose into up to N sub-queries, 1–30, default 5), plus all `octen search` flags (`-n/--count` per sub-query, `--topic`, `--highlight`, `--full-content`, `--time-range`, `--start-time`/`--end-time`, `--include-domains`/`--exclude-domains`, `--include-text`/`--exclude-text`, `--language`, `--images`, `--format`, `--safesearch`).
|
|
382
|
+
Options: `--max-queries` (decompose into up to N sub-queries, 1–30, default 5), plus all `octen search` flags (`-n/--count` per sub-query, `--topic`, `--result-type` (standard|dynamic, applied to every sub-query; the response does not echo it), `--highlight`, `--full-content`, `--time-range`, `--start-time`/`--end-time`, `--include-domains`/`--exclude-domains`, `--include-text`/`--exclude-text`, `--language`, `--images`, `--format`, `--safesearch`).
|
|
379
383
|
|
|
380
384
|
---
|
|
381
385
|
|
|
@@ -392,7 +396,7 @@ It posts to its own endpoint, `/search-premier`, which takes the request `/searc
|
|
|
392
396
|
|
|
393
397
|
**Use `octen search` by default.** Premier takes longer, and it is billed at its own per-call rate, which a Search Plan's unlimited searches do not cover.
|
|
394
398
|
|
|
395
|
-
Options: every `octen search` flag except `--topic
|
|
399
|
+
Options: every `octen search` flag except `--topic`. That includes `--result-type` (`standard`|`dynamic`), which works as it does on `octen search`; the two commands differ in endpoint, retrieval depth and billing, not in flags.
|
|
396
400
|
|
|
397
401
|
A token cap given without its switch is not dropped here: `--highlight-max-tokens` alone caps the highlights, and `--full-content-max-tokens` without `--full-content` exits 2, since it would return no content.
|
|
398
402
|
|
|
@@ -564,11 +568,11 @@ octen configure-mcp --claude-code --cursor
|
|
|
564
568
|
octen configure-mcp --all --pin 0.2.1
|
|
565
569
|
```
|
|
566
570
|
|
|
567
|
-
Supported clients: Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, Codex.
|
|
571
|
+
Supported clients: Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, Codex, Devin (Devin CLI and Devin Desktop).
|
|
568
572
|
|
|
569
573
|
Only clients detected as installed are configured; `--all` skips the rest, and an explicitly-named client that isn't detected is skipped unless you pass `--force`.
|
|
570
574
|
|
|
571
|
-
Options: `--all`, `--claude-code`, `--cursor`, `--claude-desktop`, `--windsurf`, `--vscode`, `--codex`, `--scope` (user|project), `--pin <version>`, `--force` (configure even if the client is not detected).
|
|
575
|
+
Options: `--all`, `--claude-code`, `--cursor`, `--claude-desktop`, `--windsurf`, `--vscode`, `--codex`, `--devin`, `--scope` (user|project), `--pin <version>`, `--force` (configure even if the client is not detected).
|
|
572
576
|
|
|
573
577
|
Run without flags to print current status for each client.
|
|
574
578
|
|
|
@@ -582,6 +586,7 @@ than a silent fall back to `user`:
|
|
|
582
586
|
| Codex | `$HOME/.codex/config.toml` | `<project>/.codex/config.toml` |
|
|
583
587
|
| Cursor | `$HOME/.cursor/mcp.json` | `<project>/.cursor/mcp.json` |
|
|
584
588
|
| VS Code | `<project>/.vscode/mcp.json` | `<project>/.vscode/mcp.json` |
|
|
589
|
+
| Devin | `$HOME/.config/devin/mcp_config.json` (`$XDG_CONFIG_HOME/devin/` when set; Windows: `%APPDATA%\devin\`) | `<project>/.devin/mcp_config.local.json` |
|
|
585
590
|
| Claude Code, Claude Desktop, Windsurf | user config only | same as user |
|
|
586
591
|
|
|
587
592
|
Codex reads a project-level `.codex/config.toml` only in a repository it has
|
|
@@ -589,6 +594,18 @@ been told to trust, so a project-scoped entry stays inert until you trust the
|
|
|
589
594
|
directory in Codex. `--scope status` and `reset --scope project` read and remove
|
|
590
595
|
from the same project file.
|
|
591
596
|
|
|
597
|
+
Devin CLI and Devin Local in Devin Desktop read the same files; Devin CLI v3000.3
|
|
598
|
+
(Devin Local 3.6) or later is required, since earlier versions read MCP servers
|
|
599
|
+
from `config.json` instead. For Devin the
|
|
600
|
+
entry points at the hosted server (`https://mcp.octen.ai/mcp` with an `x-api-key`
|
|
601
|
+
header), so it needs no local Node.js, and `--pin` does not apply. Without a key
|
|
602
|
+
it writes `${env:OCTEN_API_KEY}`, which Devin reads from its environment. The
|
|
603
|
+
project scope writes Devin's personal `.devin/mcp_config.local.json` rather than
|
|
604
|
+
the shared `.devin/mcp_config.json`, and always with `${env:OCTEN_API_KEY}` instead
|
|
605
|
+
of the key, because the file can be committed until Devin has excluded it from
|
|
606
|
+
git; export `OCTEN_API_KEY` in the shell you start Devin from. For Devin Cloud,
|
|
607
|
+
add the server in the web app instead (Customize → MCPs).
|
|
608
|
+
|
|
592
609
|
#### Codex cold start
|
|
593
610
|
|
|
594
611
|
On a machine that has never run `octen-mcp`, `npx -y octen-mcp` has to fetch
|
|
@@ -679,7 +696,7 @@ octen reset --skills --claude-code
|
|
|
679
696
|
octen reset --credentials
|
|
680
697
|
```
|
|
681
698
|
|
|
682
|
-
Options: `--all` (both surfaces, all clients), `--mcp`, `--skills`, `--credentials`, plus per-client flags: `--claude-code`, `--cursor`, `--claude-desktop`, `--windsurf`, `--vscode`, `--codex`, `--openclaw`, `--hermes`, `--scope` (user|project).
|
|
699
|
+
Options: `--all` (both surfaces, all clients), `--mcp`, `--skills`, `--credentials`, plus per-client flags: `--claude-code`, `--cursor`, `--claude-desktop`, `--windsurf`, `--vscode`, `--codex`, `--devin`, `--openclaw`, `--hermes`, `--scope` (user|project).
|
|
683
700
|
|
|
684
701
|
`--credentials` is **not** included in `--all` — `--all`'s existing meaning is "both
|
|
685
702
|
surfaces (MCP + skills) across all clients", and folding in the login credential would mean
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* shared options go through the search builder rather than a second copy of
|
|
6
6
|
* it. Kept here are the places where this command differs from `search`:
|
|
7
7
|
*
|
|
8
|
-
* - `result_type`, which the reference documents and `search` does not offer;
|
|
9
8
|
* - `topic`, which is `search`'s own and is never forwarded;
|
|
10
9
|
* - a token cap given without its switch. The search builder sends a cap only
|
|
11
10
|
* beside `--highlight` / `--full-content` and drops it otherwise. Here a
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* shared options go through the search builder rather than a second copy of
|
|
6
6
|
* it. Kept here are the places where this command differs from `search`:
|
|
7
7
|
*
|
|
8
|
-
* - `result_type`, which the reference documents and `search` does not offer;
|
|
9
8
|
* - `topic`, which is `search`'s own and is never forwarded;
|
|
10
9
|
* - a token cap given without its switch. The search builder sends a cap only
|
|
11
10
|
* beside `--highlight` / `--full-content` and drops it otherwise. Here a
|
|
@@ -24,7 +23,8 @@ export function buildPremierSearchRequest(query, o) {
|
|
|
24
23
|
if (o.fullContentMaxTokens != null && !o.fullContent)
|
|
25
24
|
throw new OctenValidationError("--full-content-max-tokens needs --full-content — full content is off unless asked for");
|
|
26
25
|
// Dropped by name, not by type: an options object built for `search` would
|
|
27
|
-
// otherwise carry its `topic` straight through.
|
|
26
|
+
// otherwise carry its `topic` straight through. `resultType` is appended
|
|
27
|
+
// after the shared options so the body's key order stays as it was.
|
|
28
28
|
const { topic: _topic, resultType, ...shared } = o;
|
|
29
29
|
// A highlight cap is a request for highlights of that length, so it is sent
|
|
30
30
|
// as one. It has to carry `enable`: the API returns no highlights at all for
|
package/dist/api/search.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RESULT_TYPE_OPTIONS } from "./constants.js";
|
|
1
2
|
export declare function validateEnum(flag: string, value: unknown, allowed: readonly string[]): void;
|
|
2
3
|
/**
|
|
3
4
|
* Normalize a time bound to an ISO 8601 datetime the API accepts.
|
|
@@ -40,6 +41,7 @@ export interface BroadSearchResponse {
|
|
|
40
41
|
}
|
|
41
42
|
export interface SearchOpts {
|
|
42
43
|
topic?: "general" | "news";
|
|
44
|
+
resultType?: (typeof RESULT_TYPE_OPTIONS)[number];
|
|
43
45
|
count?: number;
|
|
44
46
|
includeDomains?: string[];
|
|
45
47
|
excludeDomains?: string[];
|
package/dist/api/search.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LIMITS, TOPIC_OPTIONS, TIME_BASIS_OPTIONS, TIME_RANGE_OPTIONS, SAFESEARCH_OPTIONS, FORMAT_OPTIONS, } from "./constants.js";
|
|
1
|
+
import { LIMITS, RESULT_TYPE_OPTIONS, TOPIC_OPTIONS, TIME_BASIS_OPTIONS, TIME_RANGE_OPTIONS, SAFESEARCH_OPTIONS, FORMAT_OPTIONS, } from "./constants.js";
|
|
2
2
|
import { OctenValidationError } from "./errors.js";
|
|
3
3
|
export function validateEnum(flag, value, allowed) {
|
|
4
4
|
if (value != null && !allowed.includes(value))
|
|
@@ -47,6 +47,7 @@ export function buildSearchOptions(o) {
|
|
|
47
47
|
assertRange("highlight-max-tokens", o.highlightMaxTokens, LIMITS.highlightMaxTokens);
|
|
48
48
|
assertRange("full-content-max-tokens", o.fullContentMaxTokens, LIMITS.fullContentMaxTokens);
|
|
49
49
|
validateEnum("--topic", o.topic, TOPIC_OPTIONS);
|
|
50
|
+
validateEnum("--result-type", o.resultType, RESULT_TYPE_OPTIONS);
|
|
50
51
|
validateEnum("--time-basis", o.timeBasis, TIME_BASIS_OPTIONS);
|
|
51
52
|
validateEnum("--time-range", o.timeRange, TIME_RANGE_OPTIONS);
|
|
52
53
|
validateEnum("--safesearch", o.safesearch, SAFESEARCH_OPTIONS);
|
|
@@ -55,6 +56,7 @@ export function buildSearchOptions(o) {
|
|
|
55
56
|
const put = (k, v) => { if (v != null)
|
|
56
57
|
opts[k] = v; };
|
|
57
58
|
put("topic", o.topic);
|
|
59
|
+
put("result_type", o.resultType);
|
|
58
60
|
put("count", o.count);
|
|
59
61
|
put("include_domains", o.includeDomains);
|
|
60
62
|
put("exclude_domains", o.excludeDomains);
|
|
@@ -10,6 +10,7 @@ export function registerBroadSearch(program) {
|
|
|
10
10
|
.description("Broad multi-angle web search — expands the query into sub-queries searched concurrently. Best for comparisons, surveys/research, and multi-angle questions; pass the query as-is and raise --max-queries for broader coverage (use `search` for a single focused query)")
|
|
11
11
|
.option("--max-queries <n>", "decompose into up to N sub-queries (1-30; default 5, raise toward 30 for surveys/research)", parseIntOpt("--max-queries"))
|
|
12
12
|
.option("--topic <t>", "general|news")
|
|
13
|
+
.option("--result-type <t>", "standard|dynamic")
|
|
13
14
|
.option("-n, --count <n>", "results per sub-query 1-100", parseIntOpt("--count"))
|
|
14
15
|
.option("--include-domains <list>", "comma list", parseCsvOpt("--include-domains"))
|
|
15
16
|
.option("--exclude-domains <list>", "comma list", parseCsvOpt("--exclude-domains"))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import os from "node:os";
|
|
2
2
|
import pc from "picocolors";
|
|
3
|
-
import { MCP_CLIENTS } from "../mcp/clients.js";
|
|
3
|
+
import { HOSTED_MCP_URL, MCP_CLIENTS } from "../mcp/clients.js";
|
|
4
4
|
import { installMcp } from "../mcp/install.js";
|
|
5
5
|
import { mcpStatus } from "../mcp/detect.js";
|
|
6
6
|
import { resolveApiKey } from "../config/resolve.js";
|
|
@@ -20,6 +20,7 @@ export function registerConfigureMcp(program, internal = {}) {
|
|
|
20
20
|
.option("--windsurf", "configure Windsurf")
|
|
21
21
|
.option("--vscode", "configure VS Code")
|
|
22
22
|
.option("--codex", "configure Codex")
|
|
23
|
+
.option("--devin", "configure Devin (CLI and Devin Desktop)")
|
|
23
24
|
.option("--scope <s>", "config scope: user | project (default: user)", parseScopeOpt("--scope"), "user")
|
|
24
25
|
.option("--pin <ver>", "pin octen-mcp to a specific version, e.g. 0.2.1")
|
|
25
26
|
.option("--force", "configure even if the client is not detected")
|
|
@@ -45,6 +46,7 @@ export function registerConfigureMcp(program, internal = {}) {
|
|
|
45
46
|
windsurf: "windsurf",
|
|
46
47
|
vscode: "vscode",
|
|
47
48
|
codex: "codex",
|
|
49
|
+
devin: "devin",
|
|
48
50
|
};
|
|
49
51
|
const anySelected = opts.all ||
|
|
50
52
|
opts.claudeCode ||
|
|
@@ -52,7 +54,8 @@ export function registerConfigureMcp(program, internal = {}) {
|
|
|
52
54
|
opts.claudeDesktop ||
|
|
53
55
|
opts.windsurf ||
|
|
54
56
|
opts.vscode ||
|
|
55
|
-
opts.codex
|
|
57
|
+
opts.codex ||
|
|
58
|
+
opts.devin;
|
|
56
59
|
if (!anySelected) {
|
|
57
60
|
// STATUS MODE: print status for each client
|
|
58
61
|
for (const client of MCP_CLIENTS) {
|
|
@@ -89,6 +92,12 @@ export function registerConfigureMcp(program, internal = {}) {
|
|
|
89
92
|
args: ["-y", pin ? `octen-mcp@${pin}` : "octen-mcp"],
|
|
90
93
|
env: { OCTEN_API_KEY: key },
|
|
91
94
|
};
|
|
95
|
+
// Hosted clients reach mcp.octen.ai directly. Devin expands ${env:VAR}, not ${VAR}, in headers.
|
|
96
|
+
// A project file can be committed, so it never gets the key itself.
|
|
97
|
+
const envRef = (c) => c.hosted && (keyMissing || scope === "project");
|
|
98
|
+
const entryFor = (c) => c.hosted
|
|
99
|
+
? { url: HOSTED_MCP_URL, headers: { "x-api-key": envRef(c) ? "${env:OCTEN_API_KEY}" : key } }
|
|
100
|
+
: entry;
|
|
92
101
|
// Determine which clients to act on, gated by detection.
|
|
93
102
|
let selected;
|
|
94
103
|
if (opts.all) {
|
|
@@ -121,10 +130,13 @@ export function registerConfigureMcp(program, internal = {}) {
|
|
|
121
130
|
process.stdout.write("no installed clients to configure\n");
|
|
122
131
|
return;
|
|
123
132
|
}
|
|
133
|
+
if (pin && selected.some((c) => c.hosted)) {
|
|
134
|
+
process.stderr.write(`note: --pin does not apply to ${selected.filter((c) => c.hosted).map((c) => c.label).join(", ")}, which use the hosted server\n`);
|
|
135
|
+
}
|
|
124
136
|
let anyFailed = false;
|
|
125
137
|
for (const client of selected) {
|
|
126
138
|
try {
|
|
127
|
-
const result = installMcp(client, scope,
|
|
139
|
+
const result = installMcp(client, scope, entryFor(client), home, cwd, installOpts);
|
|
128
140
|
if (result.method === "claude-cli") {
|
|
129
141
|
process.stdout.write(`${client.label}: configured via claude CLI\n`);
|
|
130
142
|
}
|
|
@@ -144,5 +156,8 @@ export function registerConfigureMcp(program, internal = {}) {
|
|
|
144
156
|
if (keyMissing) {
|
|
145
157
|
process.stderr.write("warning: no API key found — set OCTEN_API_KEY in each client's environment\n");
|
|
146
158
|
}
|
|
159
|
+
else if (scope === "project" && selected.some((c) => c.hosted)) {
|
|
160
|
+
process.stderr.write(`note: ${selected.filter((c) => c.hosted).map((c) => c.label).join(", ")} project config references \${env:OCTEN_API_KEY} instead of the key; export OCTEN_API_KEY in the shell you start it from\n`);
|
|
161
|
+
}
|
|
147
162
|
});
|
|
148
163
|
}
|
package/dist/commands/reset.js
CHANGED
|
@@ -15,6 +15,7 @@ const CLIENT_FLAG_MAP = {
|
|
|
15
15
|
windsurf: "windsurf",
|
|
16
16
|
vscode: "vscode",
|
|
17
17
|
codex: "codex",
|
|
18
|
+
devin: "devin",
|
|
18
19
|
openclaw: "openclaw",
|
|
19
20
|
hermes: "hermes",
|
|
20
21
|
};
|
|
@@ -32,6 +33,7 @@ export function registerReset(program, internal = {}) {
|
|
|
32
33
|
.option("--windsurf", "target Windsurf")
|
|
33
34
|
.option("--vscode", "target VS Code")
|
|
34
35
|
.option("--codex", "target Codex")
|
|
36
|
+
.option("--devin", "target Devin")
|
|
35
37
|
.option("--openclaw", "target OpenClaw")
|
|
36
38
|
.option("--hermes", "target Hermes")
|
|
37
39
|
.option("--scope <s>", "config scope: user | project (default: user)", parseScopeOpt("--scope"), "user")
|
package/dist/commands/search.js
CHANGED
|
@@ -21,6 +21,7 @@ export function registerSearch(program) {
|
|
|
21
21
|
.option("--full-content").option("--full-content-max-tokens <n>", "max tokens per result", parseIntOpt("--full-content-max-tokens"))
|
|
22
22
|
.option("--images");
|
|
23
23
|
cmd.option("--topic <t>", "general|news");
|
|
24
|
+
cmd.option("--result-type <t>", "standard|dynamic");
|
|
24
25
|
cmd.action(async (queryArg, opts, command) => {
|
|
25
26
|
const g = command.optsWithGlobals();
|
|
26
27
|
const client = makeClient(g);
|
package/dist/mcp/clients.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
export type McpFormat = "json-mcpServers" | "json-servers" | "toml" | "claude-code";
|
|
2
|
+
/** Octen's hosted MCP server, for clients configured with it instead of a local npx server. */
|
|
3
|
+
export declare const HOSTED_MCP_URL = "https://mcp.octen.ai/mcp";
|
|
2
4
|
export interface McpClient {
|
|
3
|
-
id: "claude-code" | "claude-desktop" | "cursor" | "windsurf" | "vscode" | "codex";
|
|
5
|
+
id: "claude-code" | "claude-desktop" | "cursor" | "windsurf" | "vscode" | "codex" | "devin";
|
|
4
6
|
label: string;
|
|
5
7
|
format: McpFormat;
|
|
6
8
|
supportsProject: boolean;
|
|
7
|
-
|
|
9
|
+
/** Configure the hosted server (url + x-api-key header) rather than `npx octen-mcp`. */
|
|
10
|
+
hosted?: boolean;
|
|
11
|
+
pathFor(scope: "user" | "project", home: string, cwd: string, platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv): string;
|
|
8
12
|
}
|
|
13
|
+
/** Devin's user config directory: %APPDATA%\devin on Windows, else $XDG_CONFIG_HOME/devin or ~/.config/devin. */
|
|
14
|
+
export declare function devinConfigDir(home: string, platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv): string;
|
|
9
15
|
export declare const MCP_CLIENTS: McpClient[];
|
package/dist/mcp/clients.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import { join } from "node:path";
|
|
1
|
+
import { isAbsolute, join, win32 } from "node:path";
|
|
2
|
+
/** Octen's hosted MCP server, for clients configured with it instead of a local npx server. */
|
|
3
|
+
export const HOSTED_MCP_URL = "https://mcp.octen.ai/mcp";
|
|
4
|
+
/** Devin's user config directory: %APPDATA%\devin on Windows, else $XDG_CONFIG_HOME/devin or ~/.config/devin. */
|
|
5
|
+
export function devinConfigDir(home, platform = process.platform, env = process.env) {
|
|
6
|
+
if (platform === "win32")
|
|
7
|
+
return win32.join(env.APPDATA ?? win32.join(home, "AppData", "Roaming"), "devin");
|
|
8
|
+
const xdg = env.XDG_CONFIG_HOME;
|
|
9
|
+
return xdg && isAbsolute(xdg) ? join(xdg, "devin") : join(home, ".config/devin");
|
|
10
|
+
}
|
|
2
11
|
export const MCP_CLIENTS = [
|
|
3
12
|
{
|
|
4
13
|
id: "claude-code",
|
|
@@ -59,4 +68,20 @@ export const MCP_CLIENTS = [
|
|
|
59
68
|
: join(home, ".codex/config.toml");
|
|
60
69
|
},
|
|
61
70
|
},
|
|
71
|
+
{
|
|
72
|
+
id: "devin",
|
|
73
|
+
label: "Devin",
|
|
74
|
+
format: "json-mcpServers",
|
|
75
|
+
// Devin CLI and Devin Local (in Devin Desktop) read the same files:
|
|
76
|
+
// https://docs.devin.ai/cli/extensibility/mcp/configuration
|
|
77
|
+
// Project scope uses the personal local file; configure-mcp puts only an env reference there.
|
|
78
|
+
supportsProject: true,
|
|
79
|
+
hosted: true,
|
|
80
|
+
pathFor(scope, home, cwd, platform, env) {
|
|
81
|
+
if (scope === "project")
|
|
82
|
+
return join(cwd, ".devin/mcp_config.local.json");
|
|
83
|
+
const dir = devinConfigDir(home, platform, env);
|
|
84
|
+
return (platform ?? process.platform) === "win32" ? win32.join(dir, "mcp_config.json") : join(dir, "mcp_config.json");
|
|
85
|
+
},
|
|
86
|
+
},
|
|
62
87
|
];
|
package/dist/mcp/install.d.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import type { McpClient } from "./clients.js";
|
|
2
|
+
export type StdioEntry = {
|
|
3
|
+
command: string;
|
|
4
|
+
args: string[];
|
|
5
|
+
env: Record<string, string>;
|
|
6
|
+
};
|
|
7
|
+
export type HostedEntry = {
|
|
8
|
+
url: string;
|
|
9
|
+
headers: Record<string, string>;
|
|
10
|
+
};
|
|
2
11
|
export interface InstallOpts {
|
|
3
12
|
/** Override claude-CLI availability detection for testing */
|
|
4
13
|
hasClaudeCli?: boolean;
|
|
@@ -12,9 +21,5 @@ export interface RemoveResult {
|
|
|
12
21
|
removed: boolean;
|
|
13
22
|
method: "claude-cli" | "file";
|
|
14
23
|
}
|
|
15
|
-
export declare function installMcp(client: McpClient, scope: "user" | "project", entry:
|
|
16
|
-
command: string;
|
|
17
|
-
args: string[];
|
|
18
|
-
env: Record<string, string>;
|
|
19
|
-
}, home: string, cwd: string, opts?: InstallOpts): InstallResult;
|
|
24
|
+
export declare function installMcp(client: McpClient, scope: "user" | "project", entry: StdioEntry | HostedEntry, home: string, cwd: string, opts?: InstallOpts): InstallResult;
|
|
20
25
|
export declare function removeMcp(client: McpClient, scope: "user" | "project", home: string, cwd: string, opts?: InstallOpts): RemoveResult;
|
package/dist/mcp/install.js
CHANGED
|
@@ -12,7 +12,7 @@ function claudeAvailable(override) {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
export function installMcp(client, scope, entry, home, cwd, opts = {}) {
|
|
15
|
-
if (client.id === "claude-code") {
|
|
15
|
+
if (client.id === "claude-code" && "command" in entry) {
|
|
16
16
|
const apiKey = entry.env["OCTEN_API_KEY"] ?? "";
|
|
17
17
|
// A real key must never reach another process's argv: `ps -ww` and
|
|
18
18
|
// /proc/<pid>/cmdline expose it to every local user for the child's
|
package/dist/mcp/write.js
CHANGED
|
@@ -9,9 +9,8 @@ import { writeSecretFile } from "../util/secretFile.js";
|
|
|
9
9
|
* becomes a secret-bearing file.
|
|
10
10
|
*/
|
|
11
11
|
function carriesLiteralSecret(entry) {
|
|
12
|
-
const env = entry
|
|
13
|
-
|
|
14
|
-
return typeof value === "string" && value !== "" && !value.startsWith("${");
|
|
12
|
+
const { env, headers } = entry;
|
|
13
|
+
return [env?.["OCTEN_API_KEY"], headers?.["x-api-key"]].some((value) => typeof value === "string" && value !== "" && !value.startsWith("${"));
|
|
15
14
|
}
|
|
16
15
|
function assertNever(x) {
|
|
17
16
|
throw new Error(`unhandled McpFormat: ${String(x)}`);
|
|
@@ -2,6 +2,7 @@ import { execFileSync } from "node:child_process";
|
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
|
+
import { devinConfigDir } from "../mcp/clients.js";
|
|
5
6
|
/** Returns true if `bin` is resolvable on PATH (via `which`). */
|
|
6
7
|
function binOnPath(bin) {
|
|
7
8
|
try {
|
|
@@ -55,6 +56,11 @@ export function isClientInstalled(id, opts) {
|
|
|
55
56
|
existsSync(join(home, ".codeium/windsurf")));
|
|
56
57
|
case "vscode":
|
|
57
58
|
return binOnPath("code") || appExists("Visual Studio Code");
|
|
59
|
+
case "devin":
|
|
60
|
+
// Only files Devin creates; configure-mcp --force itself writes mcp_config.json there.
|
|
61
|
+
return (binOnPath("devin") ||
|
|
62
|
+
existsSync(join(devinConfigDir(home), "config.json")) ||
|
|
63
|
+
existsSync(join(home, ".local/share/devin")));
|
|
58
64
|
default:
|
|
59
65
|
// Unknown id — don't block.
|
|
60
66
|
return true;
|
package/package.json
CHANGED
|
@@ -94,6 +94,18 @@ curl -s -X POST "https://api.octen.ai/search" \
|
|
|
94
94
|
}'
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
+
### With Dynamic Results
|
|
98
|
+
```bash
|
|
99
|
+
curl -s -X POST "https://api.octen.ai/search" \
|
|
100
|
+
-H "Content-Type: application/json" \
|
|
101
|
+
-H "X-Api-Key: ${OCTEN_API_KEY}" \
|
|
102
|
+
-d '{
|
|
103
|
+
"query": "EU AI Act enforcement timeline",
|
|
104
|
+
"count": 10,
|
|
105
|
+
"result_type": "dynamic"
|
|
106
|
+
}'
|
|
107
|
+
```
|
|
108
|
+
|
|
97
109
|
## Endpoint
|
|
98
110
|
|
|
99
111
|
```http
|
|
@@ -165,6 +177,7 @@ POST https://api.octen.ai/search
|
|
|
165
177
|
| `meta.usage.full_content_tokens` | integer | Total tokens returned in full_content |
|
|
166
178
|
| `meta.latency` | number | Response time in milliseconds |
|
|
167
179
|
| `meta.warning` | string? | Warning message, if any |
|
|
180
|
+
| `meta.result_type` | string | The result type used for this request |
|
|
168
181
|
|
|
169
182
|
### JSON Example
|
|
170
183
|
|
|
@@ -274,7 +287,7 @@ curl -s -X POST "https://api.octen.ai/broad-search" \
|
|
|
274
287
|
-d '{
|
|
275
288
|
"query": "compare cloud GPU pricing across major providers",
|
|
276
289
|
"max_queries": 5,
|
|
277
|
-
"search_options": {"count": 10, "highlight": {"enable": true}}
|
|
290
|
+
"search_options": {"count": 10, "result_type": "dynamic", "highlight": {"enable": true}}
|
|
278
291
|
}'
|
|
279
292
|
```
|
|
280
293
|
|
|
@@ -284,7 +297,7 @@ curl -s -X POST "https://api.octen.ai/broad-search" \
|
|
|
284
297
|
|--|--|--|--|--|
|
|
285
298
|
| `query` | string | **Yes** | - | Original search query (max 500 chars) |
|
|
286
299
|
| `max_queries` | integer | No | `5` | Upper bound on the number of sub-queries generated (1–30); raise toward 30 for surveys/research, lower for a tighter search |
|
|
287
|
-
| `search_options` | object | No | - | Options applied to **each** sub-query — same fields and defaults as the [Parameters](#parameters) table above (`count`, `include_domains`, `language`, time filters, `highlight`, `full_content`, `include_images`, …) |
|
|
300
|
+
| `search_options` | object | No | - | Options applied to **each** sub-query — same fields and defaults as the [Parameters](#parameters) table above (`count`, `result_type`, `include_domains`, `language`, time filters, `highlight`, `full_content`, `include_images`, …) |
|
|
288
301
|
|
|
289
302
|
### Response
|
|
290
303
|
|
|
@@ -57,7 +57,7 @@ or call the HTTP API directly with `curl` — the sibling skills **octen-search*
|
|
|
57
57
|
| The user wants… | Tool | Key point |
|
|
58
58
|
|--|--|--|
|
|
59
59
|
| One fact, one entity, one document — a single focused lookup | `search` | Fast real-time search. Default choice. |
|
|
60
|
-
| A `search` that came back thin or off-target — or a document already known to be hard to find: a niche report, a filing, a page buried deep in a site | `premier_search` | Takes
|
|
60
|
+
| A `search` that came back thin or off-target — or a document already known to be hard to find: a niche report, a filing, a page buried deep in a site | `premier_search` | Takes the same parameters as `search`, with deeper retrieval and reranking. Slower and billed separately: **try `search` first** for an ordinary lookup. |
|
|
61
61
|
| Recent events / headlines — a single news lookup | `news_search` | Its own endpoint. Returns articles **and** `subjects`: the coverage grouped into storylines with summaries. |
|
|
62
62
|
| A company or a person — what they do, who runs it, financials, recent announcements, or two compared | `business_search` | Returns structured cards, not pages to read. Far cheaper than `search` plus reading the results. |
|
|
63
63
|
| Multiple distinct parts or entities one search can't cover: comparisons across many sources, surveys, "what are the options for X", a question that decomposes into 3+ sub-questions | `broad_search` | Fans out; **~Nx cost + latency** — see below. |
|
|
@@ -78,6 +78,10 @@ or call the HTTP API directly with `curl` — the sibling skills **octen-search*
|
|
|
78
78
|
> documents Search Premier, and **octen-design-search** documents Design Search.
|
|
79
79
|
> That path needs an `OCTEN_API_KEY`; without one, say the tool is unavailable
|
|
80
80
|
> rather than substituting a different tool and presenting it as the same thing.
|
|
81
|
+
>
|
|
82
|
+
> `result_type` (`standard` or `dynamic`) on `search` and `broad_search` exists
|
|
83
|
+
> from **octen-mcp 0.8.1**; the hosted endpoint has it. On an older server only
|
|
84
|
+
> `premier_search` takes it.
|
|
81
85
|
|
|
82
86
|
### When to prefer `search` over `broad_search`
|
|
83
87
|
|