@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.
Files changed (39) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/agent-protocol/acp/models.js +1 -1
  3. package/dist/agent-protocol/acp/session.js +1 -1
  4. package/dist/agent-protocol/core/json-line-stream.d.ts +10 -20
  5. package/dist/agent-protocol/core/json-line-stream.js +39 -27
  6. package/dist/agent-protocol/pi-rpc/session.js +1 -1
  7. package/dist/auth.js +1 -1
  8. package/dist/claude-stream.js +8 -19
  9. package/dist/core/bounded-line-stream.d.ts +17 -0
  10. package/dist/core/bounded-line-stream.js +49 -0
  11. package/dist/core/model-discovery-shared.d.ts +25 -1
  12. package/dist/core/model-discovery-shared.js +47 -0
  13. package/dist/defs/aider.d.ts +1 -0
  14. package/dist/defs/aider.js +1 -0
  15. package/dist/defs/claude.d.ts +1 -0
  16. package/dist/defs/claude.js +1 -0
  17. package/dist/defs/codex.js +6 -4
  18. package/dist/defs/pi.d.ts +1 -0
  19. package/dist/defs/pi.js +1 -0
  20. package/dist/defs/shared.d.ts +2 -3
  21. package/dist/defs/shared.js +2 -23
  22. package/dist/detection.d.ts +11 -2
  23. package/dist/detection.js +35 -5
  24. package/dist/diagnostics.d.ts +16 -1
  25. package/dist/diagnostics.js +44 -1
  26. package/dist/json-event-stream.js +8 -14
  27. package/dist/model-discovery-native.d.ts +1 -0
  28. package/dist/model-discovery.d.ts +6 -3
  29. package/dist/model-discovery.js +8 -3
  30. package/dist/models.js +2 -27
  31. package/dist/native-tool-policy.d.ts +59 -3
  32. package/dist/native-tool-policy.js +47 -11
  33. package/dist/providers/google-messages.d.ts +2 -1
  34. package/dist/providers/google-messages.js +10 -5
  35. package/dist/providers/google-schema.js +18 -0
  36. package/dist/providers/model-catalog.js +8 -4
  37. package/dist/qoder-stream.js +8 -15
  38. package/dist/types.d.ts +7 -1
  39. package/package.json +9 -9
@@ -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
- let buffer = '';
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
- buffer += stringifyContent(chunk);
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
- const rem = buffer.trim();
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
- /** Native tools cannot be limited per run; always use full access for authorized assistant users. */
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.6.22",
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.6.13",
123
- "@jini-ai/integrations": "^0.6.19",
124
- "@jini-ai/platform": "^0.6.22"
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.6.22",
128
- "@jini-ai/protocol": "^0.6.19",
129
- "@jini-ai/platform": "^0.6.22",
130
- "@jini-ai/integrations": "^0.6.19",
131
- "@jini-ai/oauth": "^0.6.19"
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",