@jini-ai/agent-runtime 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-protocol/acp/models.d.ts +11 -0
- package/dist/agent-protocol/acp/models.js +12 -3
- package/dist/capabilities.d.ts +1 -8
- package/dist/capabilities.js +8 -1
- package/dist/claude-code-models.d.ts +13 -1
- package/dist/claude-code-models.js +14 -16
- package/dist/claude-segment-usage.d.ts +26 -0
- package/dist/claude-segment-usage.js +63 -0
- package/dist/claude-stream.d.ts +6 -0
- package/dist/claude-stream.js +19 -4
- package/dist/defs/claude.d.ts +2 -0
- package/dist/defs/claude.js +10 -2
- package/dist/defs/codebuddy.js +1 -1
- package/dist/defs/cursor-agent.js +1 -1
- package/dist/defs/opencode.js +1 -1
- package/dist/detection.d.ts +28 -4
- package/dist/detection.js +81 -42
- package/dist/diagnostics.d.ts +6 -1
- package/dist/diagnostics.js +2 -2
- package/dist/executables.d.ts +15 -9
- package/dist/executables.js +72 -64
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/invocation.d.ts +24 -2
- package/dist/invocation.js +18 -6
- package/dist/launch.d.ts +2 -1
- package/dist/launch.js +2 -2
- package/dist/model-discovery-adapters.d.ts +5 -0
- package/dist/model-discovery-adapters.js +62 -49
- package/dist/model-discovery.js +2 -2
- package/dist/models.d.ts +9 -4
- package/dist/models.js +11 -11
- package/dist/probe-scheduler.d.ts +19 -0
- package/dist/probe-scheduler.js +30 -0
- package/dist/runtime-state.d.ts +41 -0
- package/dist/runtime-state.js +31 -0
- package/dist/types.d.ts +4 -0
- package/package.json +13 -8
- package/dist/defs/gemini.d.ts +0 -24
- package/dist/defs/gemini.js +0 -81
package/dist/defs/gemini.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module defs/gemini
|
|
3
|
-
*
|
|
4
|
-
* Google's Gemini CLI (`gemini`, npm `@google/gemini-cli`). Checked against an installed
|
|
5
|
-
* `gemini` 0.58.0 (`gemini --help` and the bundled headless code path) and the upstream headless
|
|
6
|
-
* docs (<https://geminicli.com/docs/cli/headless>):
|
|
7
|
-
*
|
|
8
|
-
* - Headless mode starts whenever stdin is not a TTY; the whole piped stdin becomes the prompt
|
|
9
|
-
* (`-p` is only needed to pass the prompt in argv, and would be "appended to input on stdin").
|
|
10
|
-
* So the prompt goes over stdin, like the Qwen Code fork, which avoids Windows `spawn
|
|
11
|
-
* ENAMETOOLONG` on large composed prompts.
|
|
12
|
-
* - `--output-format stream-json` emits the JSONL `init` / `message` / `tool_use` /
|
|
13
|
-
* `tool_result` / `error` / `result` events that `json-event-stream.ts`'s `gemini` parser
|
|
14
|
-
* already reads.
|
|
15
|
-
* - `--approval-mode yolo` auto-approves every tool (the `--yolo` alias does the same).
|
|
16
|
-
* - Since folder trust landed, a headless run in an untrusted directory exits with "Gemini CLI
|
|
17
|
-
* is not running in a trusted directory. To proceed, either use `--skip-trust`, …". The host
|
|
18
|
-
* already chose the run's cwd, so the def trusts it for this session only. Older builds
|
|
19
|
-
* reject unknown flags, so `--skip-trust` is gated on the `--help` capability probe.
|
|
20
|
-
* - `--include-directories` (repeatable) widens the workspace to dirs outside the cwd.
|
|
21
|
-
*
|
|
22
|
-
* Auth: since 2026-06-18 Google no longer serves Gemini CLI's "Login with Google" for free /
|
|
23
|
-
* Google AI Pro / Ultra individual accounts (the run dies with `IneligibleTierError: This client
|
|
24
|
-
* is no longer supported for Gemini Code Assist for individuals`). A Gemini API key, Vertex AI,
|
|
25
|
-
* or a Gemini Code Assist license still works. There is no side-effect-free auth-status
|
|
26
|
-
* subcommand, so no `authProbe`; `auth.ts#classifyAgentAuthFailure` turns the failure text into
|
|
27
|
-
* setup guidance instead.
|
|
28
|
-
*/
|
|
29
|
-
import { DEFAULT_MODEL_OPTION } from './shared.js';
|
|
30
|
-
import { agentCapabilities } from '../capabilities.js';
|
|
31
|
-
const SKIP_TRUST_FLAG = '--skip-trust';
|
|
32
|
-
export const geminiAgentDef = {
|
|
33
|
-
id: 'gemini',
|
|
34
|
-
name: 'Gemini CLI',
|
|
35
|
-
bin: 'gemini',
|
|
36
|
-
versionArgs: ['--version'],
|
|
37
|
-
// A cold `gemini --version` took 4.7 s on the dev machine (warm ~2 s), past the 3 s default.
|
|
38
|
-
versionProbeTimeoutMs: 10_000,
|
|
39
|
-
helpArgs: ['--help'],
|
|
40
|
-
capabilityFlags: {
|
|
41
|
-
[SKIP_TRUST_FLAG]: 'skipTrust',
|
|
42
|
-
},
|
|
43
|
-
// No `models` subcommand. `auto` and the concrete ids below are the ones the installed
|
|
44
|
-
// 0.58.0 bundle and the upstream model docs name; any other id can still be typed in.
|
|
45
|
-
fallbackModels: [
|
|
46
|
-
DEFAULT_MODEL_OPTION,
|
|
47
|
-
{ id: 'auto', label: 'auto' },
|
|
48
|
-
{ id: 'gemini-3.1-pro-preview', label: 'gemini-3.1-pro-preview' },
|
|
49
|
-
{ id: 'gemini-3.5-flash', label: 'gemini-3.5-flash' },
|
|
50
|
-
{ id: 'gemini-3-pro-preview', label: 'gemini-3-pro-preview' },
|
|
51
|
-
{ id: 'gemini-3-flash-preview', label: 'gemini-3-flash-preview' },
|
|
52
|
-
{ id: 'gemini-2.5-pro', label: 'gemini-2.5-pro' },
|
|
53
|
-
{ id: 'gemini-2.5-flash', label: 'gemini-2.5-flash' },
|
|
54
|
-
],
|
|
55
|
-
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }, { extraAllowedDirs = [], options = {} } = {}) => {
|
|
56
|
-
const args = ['--output-format', 'stream-json'];
|
|
57
|
-
if (agentCapabilities.get('gemini')?.skipTrust) {
|
|
58
|
-
args.push(SKIP_TRUST_FLAG);
|
|
59
|
-
}
|
|
60
|
-
// See `RuntimeBuildOptions.permissionMode`'s doc: bypass is the default (unchanged
|
|
61
|
-
// behavior) unless a caller explicitly opts into a restricted run.
|
|
62
|
-
if (options.permissionMode !== 'restricted') {
|
|
63
|
-
args.push('--approval-mode', 'yolo');
|
|
64
|
-
}
|
|
65
|
-
if (options.model && options.model !== 'default') {
|
|
66
|
-
args.push('--model', options.model);
|
|
67
|
-
}
|
|
68
|
-
const dirs = (extraAllowedDirs || []).filter((d) => typeof d === 'string' && d.length > 0);
|
|
69
|
-
for (const d of dirs)
|
|
70
|
-
args.push('--include-directories', d);
|
|
71
|
-
return args;
|
|
72
|
-
},
|
|
73
|
-
promptViaStdin: true,
|
|
74
|
-
streamFormat: 'json-event-stream',
|
|
75
|
-
eventParser: 'gemini',
|
|
76
|
-
// No `externalMcpInjection` yet: Gemini CLI reads `mcpServers` from `settings.json` (user,
|
|
77
|
-
// project `.gemini/settings.json`, or a system file named by
|
|
78
|
-
// `GEMINI_CLI_SYSTEM_SETTINGS_PATH`), with no per-run `--mcp-config` flag. A run-scoped
|
|
79
|
-
// system-settings file is the likely strategy, but it is not wired or verified live.
|
|
80
|
-
};
|
|
81
|
-
//# sourceMappingURL=gemini.js.map
|