@agentdocumentformat/cli 0.7.8 → 0.8.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/README.md +1 -1
- package/dist/adf.mjs +59 -8
- package/dist/chunks/{APEv2Parser-2CNNHMXV.mjs → APEv2Parser-WIXRJLHB.mjs} +2 -2
- package/dist/chunks/{AiffParser-7BR4RL6G.mjs → AiffParser-ZC4QFOVJ.mjs} +5 -5
- package/dist/chunks/{App-7RIIOHJJ.mjs → App-4AZZJNN2.mjs} +917 -826
- package/dist/chunks/{DsdiffParser-CMD4AX7A.mjs → DsdiffParser-UAPAJHFX.mjs} +5 -5
- package/dist/chunks/{DsfParser-UOGZDS2M.mjs → DsfParser-NNYZK2QX.mjs} +6 -6
- package/dist/chunks/{FlacParser-HB3T3CD4.mjs → FlacParser-MW2W4LO3.mjs} +6 -6
- package/dist/chunks/{MP4Parser-66HBRUSX.mjs → MP4Parser-Z57SYOOQ.mjs} +4 -4
- package/dist/chunks/{MpegParser-YW6LIUEW.mjs → MpegParser-XIIPAZVM.mjs} +7 -7
- package/dist/chunks/{MusepackParser-PAUSXP7D.mjs → MusepackParser-QWNDEYHJ.mjs} +6 -6
- package/dist/chunks/{OggParser-NUBV3GWC.mjs → OggParser-WRX53F77.mjs} +9 -9
- package/dist/chunks/{WavPackParser-WQAGT7TC.mjs → WavPackParser-MJ7WCSJ5.mjs} +2 -2
- package/dist/chunks/{WaveParser-EWLQVDX4.mjs → WaveParser-RAVLHZ5S.mjs} +7 -7
- package/dist/chunks/{adf-schema-US4NFHMR.mjs → adf-schema-AIPBQTR2.mjs} +9 -3
- package/dist/chunks/auth-manager-AJ32FZWS.mjs +19 -0
- package/dist/chunks/auth-manager-C5OBEQK2.mjs +18 -0
- package/dist/chunks/auth-manager-TBNKCJ45.mjs +17 -0
- package/dist/chunks/{chatgpt-subscription-E4MXTIAT.mjs → chatgpt-subscription-MMGNW5KJ.mjs} +5 -2
- package/dist/chunks/chunk-2Z7X3UUR.mjs +678 -0
- package/dist/chunks/chunk-3UGZFWIF.mjs +26 -0
- package/dist/chunks/{chunk-XNPZBLYL.mjs → chunk-75DC5EWN.mjs} +13 -2
- package/dist/chunks/{chunk-5PO5PKRV.mjs → chunk-7JZXMDDF.mjs} +158 -67
- package/dist/chunks/chunk-AEAJDCVK.mjs +517 -0
- package/dist/chunks/{chunk-6VQEXLE2.mjs → chunk-BHY7QDCM.mjs} +41 -3
- package/dist/chunks/{chunk-CD3ATSXE.mjs → chunk-BR3AD5QZ.mjs} +8 -2
- package/dist/chunks/chunk-BS3USVEA.mjs +301 -0
- package/dist/chunks/chunk-C2S64Y6F.mjs +203 -0
- package/dist/chunks/chunk-D7A77SNL.mjs +976 -0
- package/dist/chunks/chunk-DDTTSKGG.mjs +2443 -0
- package/dist/chunks/{chunk-VAUOM3IN.mjs → chunk-DLWCKKIO.mjs} +1 -1
- package/dist/chunks/{chunk-G6PH7RPW.mjs → chunk-E7LC6SHP.mjs} +3 -3
- package/dist/chunks/{chunk-ZESQMP66.mjs → chunk-F3WSCAJD.mjs} +3 -3
- package/dist/chunks/{chunk-KXEF4F4E.mjs → chunk-GAZO6UMI.mjs} +1 -1
- package/dist/chunks/{chunk-XYTWGHFS.mjs → chunk-H3XLRWVE.mjs} +1 -1
- package/dist/chunks/{chunk-7T2YMTWL.mjs → chunk-H4C65MTP.mjs} +4 -4
- package/dist/chunks/chunk-HBOFZRUS.mjs +738 -0
- package/dist/chunks/{chunk-VN7UH7I5.mjs → chunk-IMVMSU3A.mjs} +251 -68
- package/dist/chunks/{chunk-XYV3VCIX.mjs → chunk-JZFONJSL.mjs} +79 -20
- package/dist/chunks/chunk-KCIRFUZH.mjs +12799 -0
- package/dist/chunks/chunk-KDDVQKCG.mjs +65 -0
- package/dist/chunks/chunk-KRPKWOMB.mjs +290 -0
- package/dist/chunks/chunk-LKFHERRV.mjs +145 -0
- package/dist/chunks/chunk-LTX74NU6.mjs +29 -0
- package/dist/chunks/{chunk-HSBV6YFU.mjs → chunk-LVF2DRBR.mjs} +634 -99
- package/dist/chunks/chunk-M2F7C2UJ.mjs +425 -0
- package/dist/chunks/{chunk-62NE4LG4.mjs → chunk-MQAMI5BF.mjs} +5 -5
- package/dist/chunks/chunk-MZRXFWPQ.mjs +278 -0
- package/dist/chunks/{chunk-PRMGZZM5.mjs → chunk-NZLEPJ5M.mjs} +2 -0
- package/dist/chunks/{chunk-I3UYSITV.mjs → chunk-O7XKQ6CH.mjs} +1 -1
- package/dist/chunks/chunk-P3RG5LQA.mjs +244 -0
- package/dist/chunks/chunk-PAK5JCO2.mjs +48 -0
- package/dist/chunks/chunk-PC63YFB7.mjs +34 -0
- package/dist/chunks/{daemon-control-HKFVSQTQ.mjs → chunk-RHBGCOS3.mjs} +67 -26
- package/dist/chunks/{chunk-J74STFKE.mjs → chunk-RJDOVMM4.mjs} +362 -58
- package/dist/chunks/{chunk-QPLEAE6V.mjs → chunk-SOSPQPEN.mjs} +167 -650
- package/dist/chunks/{chunk-LFMB4PAA.mjs → chunk-TKXIH27X.mjs} +974 -113
- package/dist/chunks/{chunk-5W7KES6P.mjs → chunk-UZPDETEU.mjs} +1 -1
- package/dist/chunks/chunk-V3MM6PCH.mjs +366 -0
- package/dist/chunks/chunk-VENQBMOA.mjs +62 -0
- package/dist/chunks/chunk-WJGPNHGX.mjs +67 -0
- package/dist/chunks/{chunk-Y5ZLKFLE.mjs → chunk-XNNJQCZP.mjs} +196 -165
- package/dist/chunks/{chunk-HDBPBORT.mjs → chunk-YRBFIDLB.mjs} +46 -10
- package/dist/chunks/{chunk-BNXUAOO4.mjs → chunk-ZGXUOAWZ.mjs} +3186 -959
- package/dist/chunks/chunk-ZPB3HYM7.mjs +45 -0
- package/dist/chunks/claude-subscription-EB4LAAVV.mjs +29 -0
- package/dist/chunks/{cli-NMFIAR7Z.mjs → cli-PCVFB6B4.mjs} +797 -56
- package/dist/chunks/{commands-KPJWFRUE.mjs → commands-KOMPXJZS.mjs} +4 -3
- package/dist/chunks/{daemon-YDIK3AAM.mjs → daemon-BVDB565V.mjs} +83142 -64424
- package/dist/chunks/daemon-control-MKN7G5M3.mjs +59 -0
- package/dist/chunks/{daemon-token-WRSULP7G.mjs → daemon-token-L5QKTHU5.mjs} +3 -1
- package/dist/chunks/{discord-DSP4HUWI.mjs → discord-IR62565M.mjs} +3 -52
- package/dist/chunks/{email-BRG7KUO2.mjs → email-KHHTJBDW.mjs} +4 -2
- package/dist/chunks/{grok-subscription-4PYX7TBF.mjs → grok-subscription-E74FS5EG.mjs} +5 -2
- package/dist/chunks/{layout-EPJQNFAI.mjs → layout-ECWGJF6M.mjs} +2 -2
- package/dist/chunks/{lib-N7FCZWKH.mjs → lib-L27L5PXM.mjs} +22 -22
- package/dist/chunks/{open-VAU7PXT6.mjs → open-3OR6WT4T.mjs} +6 -6
- package/dist/chunks/{parser-JVY2PWSM.mjs → parser-7GARNT5L.mjs} +1 -1
- package/dist/chunks/{pipeline-executor-O77NTGLP.mjs → pipeline-executor-DRYEEFDR.mjs} +6 -5
- package/dist/chunks/prompt-RRHZX4YT.mjs +13 -0
- package/dist/chunks/remote-access-cli-GLEEP7DI.mjs +268 -0
- package/dist/chunks/remote-hello-UFWUBDQI.mjs +37 -0
- package/dist/chunks/sdk-OJOAF4DP.mjs +30014 -0
- package/dist/chunks/{slack-OCNNF4DX.mjs → slack-IYC5RAB5.mjs} +3 -4
- package/dist/chunks/{store-HUVDJPYN.mjs → store-55CQSAOX.mjs} +7 -3
- package/dist/chunks/tailscale-WLJATFMB.mjs +25 -0
- package/dist/chunks/{theme-SFE3JMA2.mjs → theme-HLBDTF6F.mjs} +1 -1
- package/dist/chunks/{themes-YLXLOIJF.mjs → themes-BQ72P446.mjs} +2 -2
- package/dist/chunks/{token-6G3HCMNX.mjs → token-6D22WECM.mjs} +20 -16
- package/dist/chunks/{token-util-UXYSDQIW.mjs → token-util-YF3ZWBZ4.mjs} +1 -2
- package/dist/chunks/{tui-UQJLK7XI.mjs → tui-RAUVFOYY.mjs} +21 -18
- package/dist/chunks/{welcome-XHXFV7SH.mjs → welcome-J5JZZAM5.mjs} +1 -1
- package/dist/chunks/{whatsapp-AJMRQBT7.mjs → whatsapp-YJFFVN4Q.mjs} +9 -9
- package/package.json +1 -1
- package/dist/chunks/chunk-GKKCMXIZ.mjs +0 -94
- package/dist/chunks/chunk-IHDDCZBS.mjs +0 -112
- package/dist/chunks/chunk-KWFOS5WC.mjs +0 -41
- package/dist/chunks/chunk-UEZR2CNS.mjs +0 -65
- package/dist/chunks/chunk-VMHTYDH4.mjs +0 -172
- package/dist/chunks/chunk-Y2QA53AN.mjs +0 -259
- package/dist/chunks/{chunk-NBTUWMGP.mjs → chunk-2MTE22CR.mjs} +3 -3
- package/dist/chunks/{chunk-APRU6PHC.mjs → chunk-JZ7AQNPM.mjs} +3 -3
- package/dist/chunks/{telegram-2EFGKIVK.mjs → telegram-JYY2VDTI.mjs} +5 -5
|
@@ -5,15 +5,21 @@ const require = __adfCreateRequire(import.meta.url);
|
|
|
5
5
|
const __filename = __adfFileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __adfDirname(__filename);
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
COMMAND_NAME_PATTERN,
|
|
9
|
+
RESERVED_COMMAND_NAMES,
|
|
10
|
+
validateAgentCommands
|
|
11
|
+
} from "./chunk-VENQBMOA.mjs";
|
|
10
12
|
import {
|
|
11
13
|
AGENT_STATES,
|
|
12
14
|
LOOP_PROHIBITED_TOOLS,
|
|
13
15
|
MESSAGING_MODES,
|
|
14
16
|
RESERVED_AGENT_PATH_SEGMENTS,
|
|
15
|
-
START_IN_STATES
|
|
16
|
-
|
|
17
|
+
START_IN_STATES,
|
|
18
|
+
hasLoopGoal
|
|
19
|
+
} from "./chunk-BR3AD5QZ.mjs";
|
|
20
|
+
import {
|
|
21
|
+
external_exports
|
|
22
|
+
} from "./chunk-ZJKXHM4Q.mjs";
|
|
17
23
|
|
|
18
24
|
// src/shared/types/umbilical-events.ts
|
|
19
25
|
var UMBILICAL_EVENT_TYPES = [
|
|
@@ -375,7 +381,8 @@ var StreamBindEndpointSchema = external_exports.union([
|
|
|
375
381
|
provider: external_exports.string().min(1),
|
|
376
382
|
model_id: external_exports.string().default(""),
|
|
377
383
|
temperature: external_exports.number().min(0).max(2).nullable().default(0.7),
|
|
378
|
-
|
|
384
|
+
/** Output cap per response. Unset, null or 0: the model's own limit. */
|
|
385
|
+
max_tokens: external_exports.number().int().nonnegative().nullable().optional(),
|
|
379
386
|
top_p: external_exports.number().min(0).max(1).nullable().optional(),
|
|
380
387
|
/** @deprecated folded into `reasoning.max_tokens` on config load. */
|
|
381
388
|
thinking_budget: external_exports.number().int().positive().nullable().optional(),
|
|
@@ -397,13 +404,18 @@ var StreamBindEndpointSchema = external_exports.union([
|
|
|
397
404
|
}).optional(),
|
|
398
405
|
params: external_exports.array(external_exports.object({ key: external_exports.string(), value: external_exports.string() })).optional(),
|
|
399
406
|
provider_params: external_exports.record(external_exports.unknown()).optional()
|
|
400
|
-
}), PROHIBITED_LOOP_TOOL_NAMES = LOOP_PROHIBITED_TOOLS, LOOP_NAME_PATTERN = /^[a-z0-9][a-z0-9_-]{0,31}$/, LOOP_NAME_RULE = 'loop name must be 1-32 characters of lowercase letters, digits, "_" or "-", starting with a letter or digit', LOOP_GOAL_MAX_CHARS = 4e3, LOOP_TOOLS_MAX = 64
|
|
407
|
+
}), PROHIBITED_LOOP_TOOL_NAMES = LOOP_PROHIBITED_TOOLS, LOOP_NAME_PATTERN = /^[a-z0-9][a-z0-9_-]{0,31}$/, LOOP_NAME_RULE = 'loop name must be 1-32 characters of lowercase letters, digits, "_" or "-", starting with a letter or digit', LOOP_GOAL_MAX_CHARS = 4e3, LOOP_TOOLS_MAX = 64;
|
|
408
|
+
var LoopConfigSchema = external_exports.object({
|
|
401
409
|
name: external_exports.string().regex(LOOP_NAME_PATTERN, { message: LOOP_NAME_RULE }).refine((n) => n !== "main", {
|
|
402
410
|
message: "'main' is the implicit host loop and cannot be declared as an inner loop"
|
|
403
411
|
}),
|
|
404
|
-
|
|
412
|
+
// Optional and may be empty: the derived preamble alone is a usable
|
|
413
|
+
// instruction set, and a blank loop takes its work from whoever addresses it.
|
|
414
|
+
goal: external_exports.string().max(LOOP_GOAL_MAX_CHARS).optional().describe("Appended to the loop's instructions. Optional; required (non-empty) when autostart is true."),
|
|
405
415
|
enabled: external_exports.boolean(),
|
|
406
|
-
|
|
416
|
+
// The goal rule is restated here because zodToJsonSchema drops the
|
|
417
|
+
// superRefine below that enforces it.
|
|
418
|
+
autostart: external_exports.boolean().optional().describe("Run a first turn on the goal at create and whenever the agent starts, instead of waiting to be addressed. Requires a non-empty goal."),
|
|
407
419
|
autonomous: external_exports.boolean().optional().describe("Keep turning after text-only responses until the loop calls sys_set_state. Per-loop; not inherited from the host. Default false."),
|
|
408
420
|
model: ModelConfigSchema.optional().describe(
|
|
409
421
|
"Overrides the parent's model for this loop only. Absent = inherit. `provider` may name a different configured provider than the parent's (e.g. a grok-subscription loop under a chatgpt-subscription host); credentials are resolved by that provider id. A loop whose provider cannot be built does not start."
|
|
@@ -416,6 +428,11 @@ var StreamBindEndpointSchema = external_exports.union([
|
|
|
416
428
|
),
|
|
417
429
|
tools: external_exports.array(external_exports.string().min(1)).max(LOOP_TOOLS_MAX).optional().describe("Absolute allow-list, intersected with host-enabled tools at derive time. Nothing is implicit \u2014 loop_send/loop_list must be listed to be granted.")
|
|
418
430
|
}).superRefine((loop, ctx) => {
|
|
431
|
+
loop.autostart === !0 && !hasLoopGoal(loop) && ctx.addIssue({
|
|
432
|
+
code: external_exports.ZodIssueCode.custom,
|
|
433
|
+
message: `loop "${loop.name}" has autostart on but no goal; add a goal or turn autostart off`,
|
|
434
|
+
path: ["autostart"]
|
|
435
|
+
});
|
|
419
436
|
for (let tool of loop.tools ?? [])
|
|
420
437
|
PROHIBITED_LOOP_TOOL_NAMES.includes(tool) && ctx.addIssue({
|
|
421
438
|
code: external_exports.ZodIssueCode.custom,
|
|
@@ -450,6 +467,15 @@ var StreamBindEndpointSchema = external_exports.union([
|
|
|
450
467
|
});
|
|
451
468
|
} else hook.loops !== void 0 && ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: 'loops is only allowed when pre_llm_hook.scope is "loops"', path: ["loops"] });
|
|
452
469
|
hook.scope !== "loops" && hook.include_main !== void 0 && ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: 'include_main is only allowed when pre_llm_hook.scope is "loops"', path: ["include_main"] });
|
|
470
|
+
}), AgentCommandSchema = external_exports.object({
|
|
471
|
+
name: external_exports.string().regex(COMMAND_NAME_PATTERN).describe(`Typed after the slash. 1\u201332 lowercase letters, digits, hyphens; starts with a letter. Not one of: ${RESERVED_COMMAND_NAMES.join(", ")}. Unique in commands.`),
|
|
472
|
+
description: external_exports.string().min(1).max(200),
|
|
473
|
+
usage: external_exports.string().max(100).optional(),
|
|
474
|
+
lambda: external_exports.string().min(1).describe('"path/file.ts:functionName". The function receives one object: { command, args, argv, invoker, loop, authorized, id }.'),
|
|
475
|
+
locked: external_exports.boolean().optional()
|
|
476
|
+
}), AgentCommandsSchema = external_exports.array(AgentCommandSchema).max(64).superRefine((commands, ctx) => {
|
|
477
|
+
for (let issue of validateAgentCommands(commands))
|
|
478
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: [issue.index, issue.field], message: issue.message });
|
|
453
479
|
}), AgentConfigSchema = external_exports.object({
|
|
454
480
|
adf_version: external_exports.literal("0.2"),
|
|
455
481
|
id: external_exports.string().min(1),
|
|
@@ -465,11 +491,19 @@ var StreamBindEndpointSchema = external_exports.union([
|
|
|
465
491
|
autonomous: external_exports.boolean().default(!1),
|
|
466
492
|
autostart: external_exports.boolean().optional(),
|
|
467
493
|
model: ModelConfigSchema,
|
|
468
|
-
|
|
494
|
+
// Empty is valid: new agents and templates start with no instructions.
|
|
495
|
+
instructions: external_exports.string(),
|
|
469
496
|
include_base_prompt: external_exports.boolean().optional(),
|
|
470
497
|
bare_prompt: external_exports.boolean().optional(),
|
|
471
498
|
context: external_exports.object({
|
|
472
499
|
compact_threshold: external_exports.number().int().positive().nullable().optional(),
|
|
500
|
+
// Request media limit (ADF spec §13.1). Same bounds as compact_threshold:
|
|
501
|
+
// positive, no upper limit.
|
|
502
|
+
max_request_media_files: external_exports.number().int().positive().nullable().optional().describe("Most referenced files one request carries. Absent or null: 20. Past it the oldest are left out, down to half."),
|
|
503
|
+
max_request_media_mb: external_exports.number().int().positive().nullable().optional().describe("Most MiB of referenced files one request carries. Absent or null: 20. Past it the oldest are left out, down to half."),
|
|
504
|
+
compaction_model: ModelConfigSchema.nullable().optional().describe(
|
|
505
|
+
"Model that writes the compaction summary. Absent = the agent's own model. `provider` may name any configured provider; credentials are resolved by that provider id. If it cannot be built, the compaction fails (history kept, compaction_failed logged) \u2014 it never falls back to the agent's model."
|
|
506
|
+
),
|
|
473
507
|
audit: external_exports.object({
|
|
474
508
|
loop: external_exports.boolean().default(!0),
|
|
475
509
|
inbox: external_exports.boolean().default(!1),
|
|
@@ -580,6 +614,7 @@ var StreamBindEndpointSchema = external_exports.union([
|
|
|
580
614
|
logging: LoggingConfigSchema.optional(),
|
|
581
615
|
adapters: external_exports.record(AdapterInstanceConfigSchema).optional(),
|
|
582
616
|
serving: ServingConfigSchema.optional(),
|
|
617
|
+
commands: AgentCommandsSchema.optional(),
|
|
583
618
|
ws_connections: external_exports.array(WsConnectionConfigSchema).optional(),
|
|
584
619
|
stream_bind: StreamBindConfigSchema.optional(),
|
|
585
620
|
stream_bindings: external_exports.array(StreamBindingDeclarationSchema).optional(),
|
|
@@ -717,10 +752,11 @@ export {
|
|
|
717
752
|
LOOP_NAME_RULE,
|
|
718
753
|
LOOP_GOAL_MAX_CHARS,
|
|
719
754
|
LOOP_TOOLS_MAX,
|
|
720
|
-
MAX_SIDE_LOOPS,
|
|
721
755
|
LoopConfigSchema,
|
|
722
756
|
LoopsConfigSchema,
|
|
723
757
|
PreLlmHookConfigSchema,
|
|
758
|
+
AgentCommandSchema,
|
|
759
|
+
AgentCommandsSchema,
|
|
724
760
|
AgentConfigSchema,
|
|
725
761
|
TimerScheduleSchema
|
|
726
762
|
};
|