@agentproto/runtime 5.1.0 → 5.2.1
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/catalog-models.d.ts +3 -3
- package/dist/config-schema.d.ts +2 -2
- package/dist/config-schema.mjs +64 -35
- package/dist/config-schema.mjs.map +1 -1
- package/dist/config.d.ts +25 -3
- package/dist/config.mjs +64 -35
- package/dist/config.mjs.map +1 -1
- package/dist/{context-continuity-Bn99UtVC.d.ts → context-continuity-BfNVbX5W.d.ts} +1 -1
- package/dist/index.d.ts +1620 -7265
- package/dist/index.mjs +1956 -844
- package/dist/index.mjs.map +1 -1
- package/dist/{session-config-ByfVeEQJ.d.ts → session-config-RyRL2AbD.d.ts} +1 -1
- package/dist/session-presence.mjs +64 -35
- package/dist/session-presence.mjs.map +1 -1
- package/dist/sessions-g4fw_zKx.d.ts +6231 -0
- package/dist/{spawn-defaults-wQV9AeiG.d.ts → spawn-defaults-CHvz85DD.d.ts} +1 -1
- package/dist/user-presets.d.ts +6 -99
- package/dist/user-presets.mjs +35 -4
- package/dist/user-presets.mjs.map +1 -1
- package/package.json +13 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CostBudget } from '@agentproto/auth';
|
|
2
|
-
import { C as ContextContinuityPolicy } from './context-continuity-
|
|
2
|
+
import { C as ContextContinuityPolicy } from './context-continuity-BfNVbX5W.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* SessionConfig — the unified per-session config surface, decomposed into
|
|
@@ -16,6 +16,7 @@ import '@agentproto/command-sandbox';
|
|
|
16
16
|
import '@agentproto/plugin-local-browser';
|
|
17
17
|
import '@modelcontextprotocol/sdk/types.js';
|
|
18
18
|
import '@agentproto/provider-kit';
|
|
19
|
+
import '@agentproto/llm-endpoint';
|
|
19
20
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
20
21
|
import '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
21
22
|
import 'net';
|
|
@@ -2009,6 +2010,41 @@ var init_canonical_posture = __esm({
|
|
|
2009
2010
|
})();
|
|
2010
2011
|
}
|
|
2011
2012
|
});
|
|
2013
|
+
var effortSchema, postureSchema, routeSchema, userPresetSchema;
|
|
2014
|
+
var init_user_presets = __esm({
|
|
2015
|
+
"src/user-presets.ts"() {
|
|
2016
|
+
effortSchema = z.enum(["low", "medium", "high", "xhigh", "max", "ultracode"]);
|
|
2017
|
+
postureSchema = z.union([
|
|
2018
|
+
z.enum(["default", "plan", "accept-edits", "bypass", "read-only"]),
|
|
2019
|
+
z.object({ harnessModeId: z.string().min(1) })
|
|
2020
|
+
]);
|
|
2021
|
+
routeSchema = z.object({
|
|
2022
|
+
gateway: z.string().min(1),
|
|
2023
|
+
baseUrl: z.string().url().optional()
|
|
2024
|
+
});
|
|
2025
|
+
userPresetSchema = z.object({
|
|
2026
|
+
id: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
|
|
2027
|
+
label: z.string().min(1),
|
|
2028
|
+
adapter: z.string().min(1).optional(),
|
|
2029
|
+
harness: z.string().min(1).optional(),
|
|
2030
|
+
model: z.string().min(1).optional(),
|
|
2031
|
+
route: routeSchema.optional(),
|
|
2032
|
+
access: z.object({ profileRef: z.string().min(1).optional() }).optional(),
|
|
2033
|
+
posture: postureSchema.optional(),
|
|
2034
|
+
effort: effortSchema.optional(),
|
|
2035
|
+
contextProfile: z.string().min(1).optional(),
|
|
2036
|
+
cwd: z.string().min(1).optional(),
|
|
2037
|
+
skills: z.array(z.string().min(1)).optional(),
|
|
2038
|
+
bundles: z.array(z.string().min(1)).optional(),
|
|
2039
|
+
browser: z.union([z.literal("headless"), z.literal(false)]).optional(),
|
|
2040
|
+
lastUsedAt: z.string().min(1).optional()
|
|
2041
|
+
});
|
|
2042
|
+
z.object({
|
|
2043
|
+
version: z.literal(1),
|
|
2044
|
+
presets: z.array(userPresetSchema)
|
|
2045
|
+
});
|
|
2046
|
+
}
|
|
2047
|
+
});
|
|
2012
2048
|
var harnessPresetSchema;
|
|
2013
2049
|
var init_harness_preset_store = __esm({
|
|
2014
2050
|
"src/harness-preset-store.ts"() {
|
|
@@ -2109,6 +2145,10 @@ var init_session_title = __esm({
|
|
|
2109
2145
|
"src/session-title.ts"() {
|
|
2110
2146
|
}
|
|
2111
2147
|
});
|
|
2148
|
+
var init_inference_binding = __esm({
|
|
2149
|
+
"src/inference-binding.ts"() {
|
|
2150
|
+
}
|
|
2151
|
+
});
|
|
2112
2152
|
|
|
2113
2153
|
// src/mcp-credential-deps.ts
|
|
2114
2154
|
var init_mcp_credential_deps = __esm({
|
|
@@ -2173,6 +2213,7 @@ var init_session_spawn = __esm({
|
|
|
2173
2213
|
init_catalog_models();
|
|
2174
2214
|
init_context_continuity();
|
|
2175
2215
|
init_canonical_posture();
|
|
2216
|
+
init_user_presets();
|
|
2176
2217
|
init_harness_preset_store();
|
|
2177
2218
|
init_browser_mount();
|
|
2178
2219
|
init_role();
|
|
@@ -2181,6 +2222,7 @@ var init_session_spawn = __esm({
|
|
|
2181
2222
|
init_agents_md();
|
|
2182
2223
|
init_workspace_rules();
|
|
2183
2224
|
init_session_title();
|
|
2225
|
+
init_inference_binding();
|
|
2184
2226
|
init_mcp_credential_deps();
|
|
2185
2227
|
init_sandbox_agent_session_proxy();
|
|
2186
2228
|
init_sandbox_ledger();
|
|
@@ -2344,6 +2386,16 @@ var init_agent_start_schema = __esm({
|
|
|
2344
2386
|
route: jsonTolerant(
|
|
2345
2387
|
z.object({ gateway: z.string().min(1), baseUrl: z.string().url().optional() })
|
|
2346
2388
|
).optional().describe("Billing route/gateway. Independent of `model` and `access`."),
|
|
2389
|
+
inference: jsonTolerant(
|
|
2390
|
+
z.object({
|
|
2391
|
+
endpoint: z.string().min(1).optional().describe('A registered local/LAN inference endpoint id (`agentproto llm endpoints list`), or "<id>@<device>" for a paired device\'s own shared endpoint.'),
|
|
2392
|
+
model: z.string().min(1).optional().describe('A bare model id (paired with `endpoint`), or the shorthand "<model>@<device|endpoint>" when `endpoint` is omitted.'),
|
|
2393
|
+
force: mcpBool.optional().describe("Skip the fit-check refusal on a clear miss (the check still runs and still warns)."),
|
|
2394
|
+
headroomPct: z.number().min(0).max(95).optional().describe("Headroom percentage held back from the endpoint's loaded ctx for the fit check. Default 25.")
|
|
2395
|
+
})
|
|
2396
|
+
).optional().describe(
|
|
2397
|
+
`Bind this spawn to a local/LAN inference endpoint instead of a cloud model: \`{endpoint}\`, \`{endpoint, model}\`, or the shorthand \`{model: "<model>@<device|endpoint>"}\`. Runs a fit check (the harness's known first-request size vs the endpoint's loaded ctx) BEFORE spawning and refuses with an actionable error on a clear miss (\`force\` overrides). Defaults \`adapter\`/\`harness\` to "pi" when neither is set. Mutually exclusive with \`model\`/\`route\`/\`access\` \u2014 set those directly instead of \`inference\`, never both. ${help("inference")}`
|
|
2398
|
+
),
|
|
2347
2399
|
access: jsonTolerant(z.object({ profileRef: z.string().min(1).optional() })).optional().describe("Named auth profile to bill at initial spawn; resolved from the local keychain."),
|
|
2348
2400
|
posture: z.string().optional().describe("Canonical agent posture (plan, bypass, accept-edits, read-only) or native harness mode."),
|
|
2349
2401
|
contextProfile: z.string().optional().describe("Context intake profile (for example full or lean)."),
|
|
@@ -2482,40 +2534,6 @@ var init_agent_start_schema = __esm({
|
|
|
2482
2534
|
agentStartInputSchema.omit({ wait: true });
|
|
2483
2535
|
}
|
|
2484
2536
|
});
|
|
2485
|
-
var effortSchema, postureSchema, routeSchema, userPresetSchema;
|
|
2486
|
-
var init_user_presets = __esm({
|
|
2487
|
-
"src/user-presets.ts"() {
|
|
2488
|
-
effortSchema = z.enum(["low", "medium", "high", "xhigh", "max", "ultracode"]);
|
|
2489
|
-
postureSchema = z.union([
|
|
2490
|
-
z.enum(["default", "plan", "accept-edits", "bypass", "read-only"]),
|
|
2491
|
-
z.object({ harnessModeId: z.string().min(1) })
|
|
2492
|
-
]);
|
|
2493
|
-
routeSchema = z.object({
|
|
2494
|
-
gateway: z.string().min(1),
|
|
2495
|
-
baseUrl: z.string().url().optional()
|
|
2496
|
-
});
|
|
2497
|
-
userPresetSchema = z.object({
|
|
2498
|
-
id: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
|
|
2499
|
-
label: z.string().min(1),
|
|
2500
|
-
adapter: z.string().min(1).optional(),
|
|
2501
|
-
harness: z.string().min(1).optional(),
|
|
2502
|
-
model: z.string().min(1).optional(),
|
|
2503
|
-
route: routeSchema.optional(),
|
|
2504
|
-
access: z.object({ profileRef: z.string().min(1).optional() }).optional(),
|
|
2505
|
-
posture: postureSchema.optional(),
|
|
2506
|
-
effort: effortSchema.optional(),
|
|
2507
|
-
contextProfile: z.string().min(1).optional(),
|
|
2508
|
-
cwd: z.string().min(1).optional(),
|
|
2509
|
-
skills: z.array(z.string().min(1)).optional(),
|
|
2510
|
-
bundles: z.array(z.string().min(1)).optional(),
|
|
2511
|
-
browser: z.union([z.literal("headless"), z.literal(false)]).optional()
|
|
2512
|
-
});
|
|
2513
|
-
z.object({
|
|
2514
|
-
version: z.literal(1),
|
|
2515
|
-
presets: z.array(userPresetSchema)
|
|
2516
|
-
});
|
|
2517
|
-
}
|
|
2518
|
-
});
|
|
2519
2537
|
var init_catalog_provider_models = __esm({
|
|
2520
2538
|
"src/catalog-provider-models.ts"() {
|
|
2521
2539
|
}
|
|
@@ -2818,7 +2836,8 @@ var init_config_schema = __esm({
|
|
|
2818
2836
|
featuresConfigSchema = z.object({
|
|
2819
2837
|
pty: z.boolean().optional(),
|
|
2820
2838
|
llmEndpoint: z.boolean().optional(),
|
|
2821
|
-
deviceInferenceShare: z.boolean().optional()
|
|
2839
|
+
deviceInferenceShare: z.boolean().optional(),
|
|
2840
|
+
deviceSpawnAllow: z.boolean().optional()
|
|
2822
2841
|
}).passthrough();
|
|
2823
2842
|
worktreesConfigSchema = z.object({
|
|
2824
2843
|
root: z.string().optional(),
|
|
@@ -3665,6 +3684,16 @@ var init_config_schema = __esm({
|
|
|
3665
3684
|
label: "Device inference sharing",
|
|
3666
3685
|
help: "Expose this daemon's local inference endpoint(s) to a paired HOST-scoped controller. Toggle via `agentproto devices share-inference on|off`.",
|
|
3667
3686
|
default: false
|
|
3687
|
+
},
|
|
3688
|
+
{
|
|
3689
|
+
path: "features.deviceSpawnAllow",
|
|
3690
|
+
schema: bool,
|
|
3691
|
+
apply: "restart",
|
|
3692
|
+
writable: true,
|
|
3693
|
+
section: "daemon",
|
|
3694
|
+
label: "Device spawn allow",
|
|
3695
|
+
help: 'Allow a paired HOST-scoped controller to spawn/drive agent sessions on this daemon (`agent_start({ sandbox: "device:<name>" })`). Toggle via `agentproto devices allow-spawn on|off`.',
|
|
3696
|
+
default: false
|
|
3668
3697
|
}
|
|
3669
3698
|
];
|
|
3670
3699
|
}
|