@jini-ai/agent-runtime 0.6.22 → 0.7.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 +32 -0
- package/dist/agent-protocol/acp/models.js +1 -1
- package/dist/agent-protocol/acp/session.js +1 -1
- package/dist/agent-protocol/core/json-line-stream.d.ts +10 -20
- package/dist/agent-protocol/core/json-line-stream.js +39 -27
- package/dist/agent-protocol/pi-rpc/session.js +1 -1
- package/dist/auth.js +1 -1
- package/dist/claude-stream.js +8 -19
- package/dist/core/bounded-line-stream.d.ts +17 -0
- package/dist/core/bounded-line-stream.js +49 -0
- package/dist/core/model-discovery-shared.d.ts +25 -1
- package/dist/core/model-discovery-shared.js +47 -0
- package/dist/defs/aider.d.ts +1 -0
- package/dist/defs/aider.js +1 -0
- package/dist/defs/claude.d.ts +1 -0
- package/dist/defs/claude.js +1 -0
- package/dist/defs/codex.js +6 -4
- package/dist/defs/pi.d.ts +1 -0
- package/dist/defs/pi.js +1 -0
- package/dist/defs/shared.d.ts +2 -3
- package/dist/defs/shared.js +2 -23
- package/dist/detection.d.ts +11 -2
- package/dist/detection.js +35 -5
- package/dist/diagnostics.d.ts +16 -1
- package/dist/diagnostics.js +44 -1
- package/dist/json-event-stream.js +8 -14
- package/dist/model-discovery-native.d.ts +1 -0
- package/dist/model-discovery.d.ts +6 -3
- package/dist/model-discovery.js +8 -3
- package/dist/models.js +2 -27
- package/dist/native-tool-policy.d.ts +59 -3
- package/dist/native-tool-policy.js +47 -11
- package/dist/providers/google-messages.d.ts +2 -1
- package/dist/providers/google-messages.js +10 -5
- package/dist/providers/google-schema.js +18 -0
- package/dist/providers/model-catalog.js +8 -4
- package/dist/qoder-stream.js +8 -15
- package/dist/types.d.ts +7 -1
- package/package.json +9 -9
package/dist/qoder-stream.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* wrapper objects (`system`, `assistant`, `result`) with adapter-specific
|
|
7
7
|
* fields, so keep this parser separate from Claude/Codex-compatible streams.
|
|
8
8
|
*/
|
|
9
|
+
import { createBoundedLineStream } from './core/bounded-line-stream.js';
|
|
9
10
|
import { Buffer } from 'node:buffer';
|
|
10
11
|
function isRecord(value) {
|
|
11
12
|
return Boolean(value) && typeof value === 'object';
|
|
@@ -80,7 +81,11 @@ function usageEvent(obj) {
|
|
|
80
81
|
};
|
|
81
82
|
}
|
|
82
83
|
export function createQoderStreamHandler({ onEvent }) {
|
|
83
|
-
|
|
84
|
+
const lines = createBoundedLineStream({
|
|
85
|
+
onLine: line => { const trimmed = line.trim(); if (trimmed)
|
|
86
|
+
handleLine(trimmed); },
|
|
87
|
+
onOverflow: error => onEvent({ type: 'error', message: error.message, raw: '' }),
|
|
88
|
+
});
|
|
84
89
|
let emittedThinkingStart = false;
|
|
85
90
|
function emitThinking(thinking) {
|
|
86
91
|
if (!emittedThinkingStart) {
|
|
@@ -155,22 +160,10 @@ export function createQoderStreamHandler({ onEvent }) {
|
|
|
155
160
|
}
|
|
156
161
|
}
|
|
157
162
|
function feed({ chunk }) {
|
|
158
|
-
|
|
159
|
-
let nl;
|
|
160
|
-
while ((nl = buffer.indexOf('\n')) !== -1) {
|
|
161
|
-
const line = buffer.slice(0, nl).trim();
|
|
162
|
-
buffer = buffer.slice(nl + 1);
|
|
163
|
-
if (!line)
|
|
164
|
-
continue;
|
|
165
|
-
handleLine(line);
|
|
166
|
-
}
|
|
163
|
+
lines.feed({ chunk: stringifyContent(chunk) });
|
|
167
164
|
}
|
|
168
165
|
function flush() {
|
|
169
|
-
|
|
170
|
-
buffer = '';
|
|
171
|
-
if (!rem)
|
|
172
|
-
return;
|
|
173
|
-
handleLine(rem);
|
|
166
|
+
lines.flush();
|
|
174
167
|
}
|
|
175
168
|
return { feed, flush };
|
|
176
169
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -279,7 +279,11 @@ export type RuntimeAgentDef = Partial<AgentModelDiscoveryPort> & {
|
|
|
279
279
|
/** This adapter enforces nativeToolAccess and emits normalized shell/edit tool_use events.
|
|
280
280
|
* A host requesting the policy must fail closed when this capability is absent. */
|
|
281
281
|
supportsNativeToolAccess?: boolean;
|
|
282
|
-
/**
|
|
282
|
+
/** Missing/unknown isolation needs consent. A per-run claim must identify a verified CLI version and date. */
|
|
283
|
+
mcpIsolation?: 'none' | 'no-client' | {
|
|
284
|
+
readonly perRun: string;
|
|
285
|
+
};
|
|
286
|
+
/** Native tools cannot be limited per run; the host must obtain explicit consent. */
|
|
283
287
|
fullCliAccessOnly?: boolean;
|
|
284
288
|
/** Translation key explaining this runtime’s full-access requirement to the user. */
|
|
285
289
|
fullCliAccessNote?: string;
|
|
@@ -419,6 +423,8 @@ export type RuntimeAgentDef = Partial<AgentModelDiscoveryPort> & {
|
|
|
419
423
|
readonly strategy: 'config-instructions-file';
|
|
420
424
|
readonly varName: string;
|
|
421
425
|
};
|
|
426
|
+
/** Supports a command hook supplying short child startup context. */
|
|
427
|
+
subagentStartHook?: boolean;
|
|
422
428
|
installUrl?: string;
|
|
423
429
|
docsUrl?: string;
|
|
424
430
|
supportsCustomModel?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jini-ai/agent-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Coding-agent runtime adapters: runtime registry, detection, launch, stream parsers, and the ACP/pi-rpc subprocess transport.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -119,16 +119,16 @@
|
|
|
119
119
|
},
|
|
120
120
|
"devDependencies": {
|
|
121
121
|
"@vitest/coverage-v8": "^2.1.9",
|
|
122
|
-
"@jini-ai/core": "^0.
|
|
123
|
-
"@jini-ai/integrations": "^0.
|
|
124
|
-
"@jini-ai/platform": "^0.
|
|
122
|
+
"@jini-ai/core": "^0.7.0",
|
|
123
|
+
"@jini-ai/integrations": "^0.7.0",
|
|
124
|
+
"@jini-ai/platform": "^0.7.0"
|
|
125
125
|
},
|
|
126
126
|
"dependencies": {
|
|
127
|
-
"@jini-ai/core": "^0.
|
|
128
|
-
"@jini-ai/
|
|
129
|
-
"@jini-ai/
|
|
130
|
-
"@jini-ai/
|
|
131
|
-
"@jini-ai/
|
|
127
|
+
"@jini-ai/core": "^0.7.0",
|
|
128
|
+
"@jini-ai/oauth": "^0.7.0",
|
|
129
|
+
"@jini-ai/integrations": "^0.7.0",
|
|
130
|
+
"@jini-ai/platform": "^0.7.0",
|
|
131
|
+
"@jini-ai/protocol": "^0.7.0"
|
|
132
132
|
},
|
|
133
133
|
"scripts": {
|
|
134
134
|
"build": "tsc -p tsconfig.json",
|