@link-assistant/agent 0.18.2 → 0.19.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 +1 -1
- package/package.json +3 -2
- package/src/agent/agent.ts +1 -1
- package/src/bun/index.ts +2 -2
- package/src/cli/cmd/mcp.ts +1 -1
- package/src/cli/cmd/run.ts +1 -2
- package/src/cli/continuous-mode.js +3 -3
- package/src/cli/error.ts +1 -1
- package/src/cli/output.ts +5 -5
- package/src/command/index.ts +1 -1
- package/src/config/config.ts +345 -1116
- package/src/config/file-config.ts +1146 -0
- package/src/file/watcher.ts +3 -3
- package/src/format/index.ts +1 -1
- package/src/index.js +44 -37
- package/src/json-standard/index.ts +5 -5
- package/src/mcp/index.ts +6 -13
- package/src/project/bootstrap.ts +0 -1
- package/src/project/project.ts +0 -1
- package/src/provider/provider.ts +10 -8
- package/src/provider/retry-fetch.ts +11 -11
- package/src/session/agent.js +4 -2
- package/src/session/compaction.ts +5 -5
- package/src/session/index.ts +19 -19
- package/src/session/processor.ts +4 -4
- package/src/session/prompt.ts +5 -5
- package/src/session/retry.ts +9 -9
- package/src/session/summary.ts +8 -8
- package/src/session/system.ts +1 -1
- package/src/snapshot/index.ts +1 -1
- package/src/tool/read.ts +4 -3
- package/src/tool/registry.ts +1 -2
- package/src/tool/websearch.ts +1 -1
- package/src/util/log-lazy.ts +9 -11
- package/src/util/log.ts +9 -8
- package/src/util/verbose-fetch.ts +8 -5
- package/src/flag/flag.ts +0 -212
package/README.md
CHANGED
|
@@ -514,7 +514,7 @@ The interactive prompt will guide you through configuring local or remote MCP se
|
|
|
514
514
|
|
|
515
515
|
### No Configuration Required
|
|
516
516
|
|
|
517
|
-
- **WebSearch/CodeSearch**: Work without `LINK_ASSISTANT_AGENT_EXPERIMENTAL_EXA` environment variable
|
|
517
|
+
- **WebSearch/CodeSearch**: Work without `LINK_ASSISTANT_AGENT_EXPERIMENTAL_EXA` environment variable
|
|
518
518
|
- **Batch Tool**: Always enabled, no experimental flag needed
|
|
519
519
|
- **All Tools**: No config files, API keys handled automatically
|
|
520
520
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@link-assistant/agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "A minimal, public domain AI CLI agent compatible with OpenCode's JSON interface. Bun-only runtime.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -66,7 +66,6 @@
|
|
|
66
66
|
"@ai-sdk/openai": "^2.0.89",
|
|
67
67
|
"@ai-sdk/openai-compatible": "^1.0.32",
|
|
68
68
|
"@ai-sdk/xai": "^2.0.33",
|
|
69
|
-
"@openrouter/ai-sdk-provider": "^2.2.3",
|
|
70
69
|
"@clack/prompts": "^0.11.0",
|
|
71
70
|
"@hono/standard-validator": "^0.2.0",
|
|
72
71
|
"@hono/zod-validator": "^0.7.5",
|
|
@@ -75,6 +74,7 @@
|
|
|
75
74
|
"@octokit/rest": "^22.0.1",
|
|
76
75
|
"@openauthjs/openauth": "^0.4.3",
|
|
77
76
|
"@opencode-ai/sdk": "^1.0.78",
|
|
77
|
+
"@openrouter/ai-sdk-provider": "^2.2.3",
|
|
78
78
|
"@opentui/core": "^0.1.79",
|
|
79
79
|
"@opentui/solid": "^0.1.79",
|
|
80
80
|
"@parcel/watcher": "^2.5.1",
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
"hono-openapi": "^1.1.1",
|
|
96
96
|
"ignore": "^7.0.5",
|
|
97
97
|
"jsonc-parser": "^3.3.1",
|
|
98
|
+
"lino-arguments": "^0.2.5",
|
|
98
99
|
"lino-objects-codec": "^0.1.1",
|
|
99
100
|
"log-lazy": "^1.0.4",
|
|
100
101
|
"minimatch": "^10.1.1",
|
package/src/agent/agent.ts
CHANGED
package/src/bun/index.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Log } from '../util/log';
|
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import { NamedError } from '../util/error';
|
|
6
6
|
import { readableStreamToText } from 'bun';
|
|
7
|
-
import {
|
|
7
|
+
import { config } from '../config/config';
|
|
8
8
|
import { Lock } from '../util/lock';
|
|
9
9
|
|
|
10
10
|
export namespace BunProc {
|
|
@@ -195,7 +195,7 @@ export namespace BunProc {
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
// Check for dry-run mode
|
|
198
|
-
if (
|
|
198
|
+
if (config.dryRun) {
|
|
199
199
|
log.info(() => ({
|
|
200
200
|
message:
|
|
201
201
|
'[DRY RUN] Would install package (skipping actual installation)',
|
package/src/cli/cmd/mcp.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/
|
|
|
5
5
|
import * as prompts from '@clack/prompts';
|
|
6
6
|
import { UI } from '../ui';
|
|
7
7
|
import { Global } from '../../global';
|
|
8
|
-
import { Config } from '../../config/config';
|
|
8
|
+
import { Config } from '../../config/file-config';
|
|
9
9
|
import path from 'path';
|
|
10
10
|
import fs from 'fs/promises';
|
|
11
11
|
|
package/src/cli/cmd/run.ts
CHANGED
|
@@ -2,7 +2,6 @@ import type { Argv } from 'yargs';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { UI } from '../ui';
|
|
4
4
|
import { cmd } from './cmd';
|
|
5
|
-
import { Flag } from '../../flag/flag';
|
|
6
5
|
import { Log } from '../../util/log';
|
|
7
6
|
import { bootstrap } from '../bootstrap';
|
|
8
7
|
import { Command } from '../../command';
|
|
@@ -110,7 +109,7 @@ export const RunCommand = cmd({
|
|
|
110
109
|
},
|
|
111
110
|
handler: async (args) => {
|
|
112
111
|
// Note: verbose flag and logging are now initialized in middleware
|
|
113
|
-
// See src/index.js main() function for the middleware that sets up
|
|
112
|
+
// See src/index.js main() function for the middleware that sets up config and Log.init()
|
|
114
113
|
let message = args.message.join(' ');
|
|
115
114
|
|
|
116
115
|
const fileParts: any[] = [];
|
|
@@ -11,7 +11,7 @@ import { SessionPrompt } from '../session/prompt.ts';
|
|
|
11
11
|
import { createEventHandler } from '../json-standard/index.ts';
|
|
12
12
|
import { createContinuousStdinReader } from './input-queue.js';
|
|
13
13
|
import { Log } from '../util/log.ts';
|
|
14
|
-
import {
|
|
14
|
+
import { config } from '../config/config.ts';
|
|
15
15
|
import { createVerboseFetch } from '../util/verbose-fetch.ts';
|
|
16
16
|
import { outputStatus, outputError, outputInput } from './output.ts';
|
|
17
17
|
|
|
@@ -197,7 +197,7 @@ export async function runContinuousServerMode(
|
|
|
197
197
|
compactionModel
|
|
198
198
|
) {
|
|
199
199
|
// Check both CLI flag and environment variable for compact JSON mode
|
|
200
|
-
const compactJson = argv['compact-json'] === true ||
|
|
200
|
+
const compactJson = argv['compact-json'] === true || config.compactJson;
|
|
201
201
|
const isInteractive = argv.interactive !== false;
|
|
202
202
|
const autoMerge = argv['auto-merge-queued-messages'] !== false;
|
|
203
203
|
|
|
@@ -449,7 +449,7 @@ export async function runContinuousDirectMode(
|
|
|
449
449
|
compactionModel
|
|
450
450
|
) {
|
|
451
451
|
// Check both CLI flag and environment variable for compact JSON mode
|
|
452
|
-
const compactJson = argv['compact-json'] === true ||
|
|
452
|
+
const compactJson = argv['compact-json'] === true || config.compactJson;
|
|
453
453
|
const isInteractive = argv.interactive !== false;
|
|
454
454
|
const autoMerge = argv['auto-merge-queued-messages'] !== false;
|
|
455
455
|
|
package/src/cli/error.ts
CHANGED
package/src/cli/output.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import { EOL } from 'os';
|
|
13
|
-
import {
|
|
13
|
+
import { config } from '../config/config';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Output types for JSON messages
|
|
@@ -40,7 +40,7 @@ export interface OutputMessage {
|
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Global compact JSON setting (can be set once at startup)
|
|
43
|
-
* Initialized lazily from
|
|
43
|
+
* Initialized lazily from config.compactJson which checks LINK_ASSISTANT_AGENT_COMPACT_JSON env var
|
|
44
44
|
*/
|
|
45
45
|
let globalCompactJson: boolean | null = null;
|
|
46
46
|
|
|
@@ -49,8 +49,8 @@ let globalCompactJson: boolean | null = null;
|
|
|
49
49
|
*/
|
|
50
50
|
export function setCompactJson(compact: boolean): void {
|
|
51
51
|
globalCompactJson = compact;
|
|
52
|
-
// Also update the
|
|
53
|
-
|
|
52
|
+
// Also update the config so other modules stay in sync
|
|
53
|
+
config.compactJson = compact;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
/**
|
|
@@ -58,7 +58,7 @@ export function setCompactJson(compact: boolean): void {
|
|
|
58
58
|
*/
|
|
59
59
|
export function isCompactJson(): boolean {
|
|
60
60
|
if (globalCompactJson !== null) return globalCompactJson;
|
|
61
|
-
return
|
|
61
|
+
return config.compactJson;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/**
|
package/src/command/index.ts
CHANGED