@alisio/plugin-subagents 0.1.0-alpha.5 → 0.1.0-alpha.7
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/config.d.ts +1 -0
- package/dist/config.js +5 -0
- package/dist/index.js +2 -1
- package/dist/manager.js +1 -0
- package/dist/version.d.ts +8 -0
- package/dist/version.js +28 -0
- package/package.json +3 -3
package/dist/config.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare const subagentsConfigSchema: z.ZodObject<{
|
|
|
9
9
|
maxTurns: z.ZodDefault<z.ZodNumber>;
|
|
10
10
|
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
11
11
|
maxTokensPerChild: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
maxOutputTokensPerChild: z.ZodDefault<z.ZodNumber>;
|
|
12
13
|
parallelWrites: z.ZodDefault<z.ZodEnum<{
|
|
13
14
|
ask: "ask";
|
|
14
15
|
serial: "serial";
|
package/dist/config.js
CHANGED
|
@@ -18,6 +18,11 @@ export const subagentsConfigSchema = z
|
|
|
18
18
|
timeoutMs: z.number().int().min(1_000).default(600_000),
|
|
19
19
|
/** Per-child cumulative token budget; default follows the core proportional budget. */
|
|
20
20
|
maxTokensPerChild: z.number().int().positive().optional(),
|
|
21
|
+
/**
|
|
22
|
+
* Per-child per-call output token budget. Children forward this (never the global agent-loop
|
|
23
|
+
* default) so reasoning-heavy models are not starved; 4096 would be spent on reasoning alone.
|
|
24
|
+
*/
|
|
25
|
+
maxOutputTokensPerChild: z.number().int().positive().default(16_384),
|
|
21
26
|
/** Parallel write-capable children in a git repository. */
|
|
22
27
|
parallelWrites: z.enum(["ask", "worktree", "serial", "shared"]).default("ask"),
|
|
23
28
|
waitMaxMs: z.number().int().min(100).default(600_000),
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { subagentsConfigSchema } from "./config.js";
|
|
|
8
8
|
import { discoverAgents } from "./definitions.js";
|
|
9
9
|
import * as gitOps from "./git.js";
|
|
10
10
|
import { SubagentManager } from "./manager.js";
|
|
11
|
+
import { loadVersion } from "./version.js";
|
|
11
12
|
export { BUILTIN_AGENTS, discoverAgents, parseAgentDefinition } from "./definitions.js";
|
|
12
13
|
export { SubagentManager } from "./manager.js";
|
|
13
14
|
const schema = (properties, required) => ({
|
|
@@ -33,7 +34,7 @@ export function createSubagentsPlugin(rawOptions, context) {
|
|
|
33
34
|
id: "subagents",
|
|
34
35
|
name: "Subagents",
|
|
35
36
|
description: "Delegation to specialized agents in isolated child sessions",
|
|
36
|
-
version:
|
|
37
|
+
version: loadVersion(import.meta.url),
|
|
37
38
|
apiVersion: 1,
|
|
38
39
|
async setup(api) {
|
|
39
40
|
const found = await discoverAgents({
|
package/dist/manager.js
CHANGED
|
@@ -284,6 +284,7 @@ export class SubagentManager {
|
|
|
284
284
|
maxTurns: agent.maxTurns ?? this.config.maxTurns,
|
|
285
285
|
timeoutMs: this.config.timeoutMs,
|
|
286
286
|
...(this.config.maxTokensPerChild ? { maxTokens: this.config.maxTokensPerChild } : {}),
|
|
287
|
+
maxOutputTokens: this.config.maxOutputTokensPerChild,
|
|
287
288
|
});
|
|
288
289
|
const task = {
|
|
289
290
|
id: info.id,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads this plugin package's version at runtime so plugin metadata, user-agent defaults and CLI
|
|
3
|
+
* reports stay in sync with the published package without a build-time constant to update.
|
|
4
|
+
* The manifest is resolved relative to the module (`src/version.ts` → `../package.json` in the
|
|
5
|
+
* source tree; `dist/version.js` → `../package.json` of the installed package). Standalone
|
|
6
|
+
* binaries inject the version at build time via ALISIO_PACKAGE_VERSION (scripts/binary-build.ts).
|
|
7
|
+
*/
|
|
8
|
+
export declare function loadVersion(fromHere: string): string;
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
/**
|
|
5
|
+
* Fallback used when neither the build-time injection nor the package manifest is readable
|
|
6
|
+
* (e.g. an unpackaged embed). Keep it a development marker, never a publish literal, so it
|
|
7
|
+
* cannot silently desync from the published package.
|
|
8
|
+
*/
|
|
9
|
+
const FALLBACK = "dev";
|
|
10
|
+
/**
|
|
11
|
+
* Reads this plugin package's version at runtime so plugin metadata, user-agent defaults and CLI
|
|
12
|
+
* reports stay in sync with the published package without a build-time constant to update.
|
|
13
|
+
* The manifest is resolved relative to the module (`src/version.ts` → `../package.json` in the
|
|
14
|
+
* source tree; `dist/version.js` → `../package.json` of the installed package). Standalone
|
|
15
|
+
* binaries inject the version at build time via ALISIO_PACKAGE_VERSION (scripts/binary-build.ts).
|
|
16
|
+
*/
|
|
17
|
+
export function loadVersion(fromHere) {
|
|
18
|
+
if (process.env.ALISIO_PACKAGE_VERSION)
|
|
19
|
+
return process.env.ALISIO_PACKAGE_VERSION;
|
|
20
|
+
try {
|
|
21
|
+
const manifest = join(dirname(fileURLToPath(fromHere)), "..", "package.json");
|
|
22
|
+
const parsed = JSON.parse(readFileSync(manifest, "utf8"));
|
|
23
|
+
return typeof parsed.version === "string" && parsed.version ? parsed.version : FALLBACK;
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return FALLBACK;
|
|
27
|
+
}
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alisio/plugin-subagents",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.7",
|
|
4
4
|
"description": "Subagents for Alisio: delegate tasks to specialized agents in separate child sessions with narrowed permissions, parallel execution, git worktree isolation and a live agent tree. Built-in, disableable plugin.",
|
|
5
5
|
"author": "Gustavo Gutiérrez",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"zod": "4.6.5"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@alisio/sdk": "^0.1.0-alpha.
|
|
49
|
+
"@alisio/sdk": "^0.1.0-alpha.6"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@alisio/sdk": "0.1.0-alpha.
|
|
52
|
+
"@alisio/sdk": "0.1.0-alpha.6"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public",
|