@agentdocumentformat/cli 0.7.7 → 0.8.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 (102) hide show
  1. package/README.md +1 -1
  2. package/dist/adf.mjs +59 -8
  3. package/dist/chunks/{APEv2Parser-2CNNHMXV.mjs → APEv2Parser-WIXRJLHB.mjs} +2 -2
  4. package/dist/chunks/{AiffParser-7BR4RL6G.mjs → AiffParser-ZC4QFOVJ.mjs} +5 -5
  5. package/dist/chunks/{App-5KXVPMBV.mjs → App-A5GUFCFJ.mjs} +279 -291
  6. package/dist/chunks/{DsdiffParser-CMD4AX7A.mjs → DsdiffParser-UAPAJHFX.mjs} +5 -5
  7. package/dist/chunks/{DsfParser-UOGZDS2M.mjs → DsfParser-NNYZK2QX.mjs} +6 -6
  8. package/dist/chunks/{FlacParser-HB3T3CD4.mjs → FlacParser-MW2W4LO3.mjs} +6 -6
  9. package/dist/chunks/{MP4Parser-66HBRUSX.mjs → MP4Parser-Z57SYOOQ.mjs} +4 -4
  10. package/dist/chunks/{MpegParser-YW6LIUEW.mjs → MpegParser-XIIPAZVM.mjs} +7 -7
  11. package/dist/chunks/{MusepackParser-PAUSXP7D.mjs → MusepackParser-QWNDEYHJ.mjs} +6 -6
  12. package/dist/chunks/{OggParser-NUBV3GWC.mjs → OggParser-WRX53F77.mjs} +9 -9
  13. package/dist/chunks/{WavPackParser-WQAGT7TC.mjs → WavPackParser-MJ7WCSJ5.mjs} +2 -2
  14. package/dist/chunks/{WaveParser-EWLQVDX4.mjs → WaveParser-RAVLHZ5S.mjs} +7 -7
  15. package/dist/chunks/{adf-schema-US4NFHMR.mjs → adf-schema-YJSGLMA4.mjs} +2 -2
  16. package/dist/chunks/auth-manager-AJ32FZWS.mjs +19 -0
  17. package/dist/chunks/auth-manager-C5OBEQK2.mjs +18 -0
  18. package/dist/chunks/auth-manager-TBNKCJ45.mjs +17 -0
  19. package/dist/chunks/{chatgpt-subscription-E4MXTIAT.mjs → chatgpt-subscription-MMGNW5KJ.mjs} +5 -2
  20. package/dist/chunks/chunk-3UGZFWIF.mjs +26 -0
  21. package/dist/chunks/{chunk-5PO5PKRV.mjs → chunk-4OGZFUKA.mjs} +126 -67
  22. package/dist/chunks/{chunk-VN7UH7I5.mjs → chunk-6XQZGYMK.mjs} +246 -67
  23. package/dist/chunks/{chunk-XNPZBLYL.mjs → chunk-75DC5EWN.mjs} +13 -2
  24. package/dist/chunks/chunk-AZYOXXVL.mjs +865 -0
  25. package/dist/chunks/{chunk-6VQEXLE2.mjs → chunk-BHY7QDCM.mjs} +41 -3
  26. package/dist/chunks/chunk-C2S64Y6F.mjs +203 -0
  27. package/dist/chunks/chunk-C4GA5SI4.mjs +12799 -0
  28. package/dist/chunks/chunk-DDTTSKGG.mjs +2443 -0
  29. package/dist/chunks/{chunk-VAUOM3IN.mjs → chunk-DLWCKKIO.mjs} +1 -1
  30. package/dist/chunks/{chunk-HPVFJYXR.mjs → chunk-ESP3VNMX.mjs} +1 -1
  31. package/dist/chunks/{chunk-QPLEAE6V.mjs → chunk-G6NBFYG5.mjs} +152 -824
  32. package/dist/chunks/{chunk-KXEF4F4E.mjs → chunk-GAZO6UMI.mjs} +1 -1
  33. package/dist/chunks/{chunk-XYTWGHFS.mjs → chunk-H3XLRWVE.mjs} +1 -1
  34. package/dist/chunks/{chunk-7T2YMTWL.mjs → chunk-H4C65MTP.mjs} +4 -4
  35. package/dist/chunks/chunk-HBOFZRUS.mjs +738 -0
  36. package/dist/chunks/chunk-JVPZIMXW.mjs +976 -0
  37. package/dist/chunks/{chunk-XYV3VCIX.mjs → chunk-JZFONJSL.mjs} +79 -20
  38. package/dist/chunks/chunk-KDDVQKCG.mjs +65 -0
  39. package/dist/chunks/chunk-KRPKWOMB.mjs +290 -0
  40. package/dist/chunks/{chunk-4N4ASPH6.mjs → chunk-LCMANRYY.mjs} +4 -254
  41. package/dist/chunks/{chunk-TPRZQ7Z4.mjs → chunk-LGL6ML37.mjs} +4 -4
  42. package/dist/chunks/chunk-LKFHERRV.mjs +145 -0
  43. package/dist/chunks/chunk-LTX74NU6.mjs +29 -0
  44. package/dist/chunks/chunk-M2F7C2UJ.mjs +425 -0
  45. package/dist/chunks/{chunk-62NE4LG4.mjs → chunk-MQAMI5BF.mjs} +5 -5
  46. package/dist/chunks/chunk-MZRXFWPQ.mjs +278 -0
  47. package/dist/chunks/{chunk-PRMGZZM5.mjs → chunk-NZLEPJ5M.mjs} +2 -0
  48. package/dist/chunks/{chunk-CD3ATSXE.mjs → chunk-NZO5O4VN.mjs} +1 -1
  49. package/dist/chunks/{chunk-I3UYSITV.mjs → chunk-O7XKQ6CH.mjs} +1 -1
  50. package/dist/chunks/chunk-P3RG5LQA.mjs +244 -0
  51. package/dist/chunks/chunk-PAK5JCO2.mjs +48 -0
  52. package/dist/chunks/chunk-PC63YFB7.mjs +34 -0
  53. package/dist/chunks/{daemon-control-HKFVSQTQ.mjs → chunk-PRPTKMQW.mjs} +67 -26
  54. package/dist/chunks/{chunk-LFMB4PAA.mjs → chunk-TKXIH27X.mjs} +974 -113
  55. package/dist/chunks/{chunk-5W7KES6P.mjs → chunk-UZPDETEU.mjs} +1 -1
  56. package/dist/chunks/chunk-V2T6NZX2.mjs +517 -0
  57. package/dist/chunks/chunk-V3MM6PCH.mjs +366 -0
  58. package/dist/chunks/chunk-WJGPNHGX.mjs +67 -0
  59. package/dist/chunks/chunk-WVTPPOKK.mjs +290 -0
  60. package/dist/chunks/{chunk-J74STFKE.mjs → chunk-WX6QCUWI.mjs} +272 -51
  61. package/dist/chunks/{chunk-Y5ZLKFLE.mjs → chunk-XNNJQCZP.mjs} +196 -165
  62. package/dist/chunks/{chunk-HDBPBORT.mjs → chunk-XT2BJUFC.mjs} +15 -6
  63. package/dist/chunks/chunk-YRMKSHW3.mjs +9076 -0
  64. package/dist/chunks/{chunk-BNXUAOO4.mjs → chunk-ZGXUOAWZ.mjs} +3186 -959
  65. package/dist/chunks/chunk-ZPB3HYM7.mjs +45 -0
  66. package/dist/chunks/claude-subscription-33BMZB6I.mjs +29 -0
  67. package/dist/chunks/{cli-AFHQ2XTN.mjs → cli-I47IFDHJ.mjs} +797 -56
  68. package/dist/chunks/{commands-XNJMCD5L.mjs → commands-E4EQUHE5.mjs} +5 -2
  69. package/dist/chunks/{daemon-CHZHTLGR.mjs → daemon-FQ5BV3AP.mjs} +84550 -70518
  70. package/dist/chunks/daemon-control-L3CLG63P.mjs +59 -0
  71. package/dist/chunks/{daemon-token-WRSULP7G.mjs → daemon-token-L5QKTHU5.mjs} +3 -1
  72. package/dist/chunks/{discord-DSP4HUWI.mjs → discord-IR62565M.mjs} +3 -52
  73. package/dist/chunks/{email-BRG7KUO2.mjs → email-KHHTJBDW.mjs} +4 -2
  74. package/dist/chunks/{environment-NX277MQG.mjs → environment-R47X44GM.mjs} +1 -1
  75. package/dist/chunks/{grok-subscription-4PYX7TBF.mjs → grok-subscription-E74FS5EG.mjs} +5 -2
  76. package/dist/chunks/{lib-N7FCZWKH.mjs → lib-L27L5PXM.mjs} +22 -22
  77. package/dist/chunks/{open-VAU7PXT6.mjs → open-TLGS2Z3Q.mjs} +4 -4
  78. package/dist/chunks/{parser-JVY2PWSM.mjs → parser-7GARNT5L.mjs} +1 -1
  79. package/dist/chunks/{pipeline-executor-U6IMCCP3.mjs → pipeline-executor-FD4FBWQA.mjs} +8 -5
  80. package/dist/chunks/prompt-RRHZX4YT.mjs +13 -0
  81. package/dist/chunks/remote-access-cli-XXAPQWH6.mjs +268 -0
  82. package/dist/chunks/remote-hello-UFWUBDQI.mjs +37 -0
  83. package/dist/chunks/sdk-5FD2ZP7N.mjs +28422 -0
  84. package/dist/chunks/{slack-OCNNF4DX.mjs → slack-IYC5RAB5.mjs} +3 -4
  85. package/dist/chunks/{store-HUVDJPYN.mjs → store-ZRN2WCFB.mjs} +6 -3
  86. package/dist/chunks/tailscale-WLJATFMB.mjs +25 -0
  87. package/dist/chunks/{theme-SFE3JMA2.mjs → theme-HLBDTF6F.mjs} +1 -1
  88. package/dist/chunks/{themes-YLXLOIJF.mjs → themes-BQ72P446.mjs} +2 -2
  89. package/dist/chunks/{token-6G3HCMNX.mjs → token-6D22WECM.mjs} +20 -16
  90. package/dist/chunks/{token-util-UXYSDQIW.mjs → token-util-YF3ZWBZ4.mjs} +1 -2
  91. package/dist/chunks/{tui-4ZWZKD4C.mjs → tui-SPSPDADM.mjs} +17 -14
  92. package/dist/chunks/{welcome-XHXFV7SH.mjs → welcome-J5JZZAM5.mjs} +1 -1
  93. package/dist/chunks/{whatsapp-AVKT3CTJ.mjs → whatsapp-YJFFVN4Q.mjs} +8 -8
  94. package/package.json +1 -1
  95. package/dist/chunks/chunk-GKKCMXIZ.mjs +0 -94
  96. package/dist/chunks/chunk-IHDDCZBS.mjs +0 -112
  97. package/dist/chunks/chunk-KWFOS5WC.mjs +0 -41
  98. package/dist/chunks/chunk-UEZR2CNS.mjs +0 -65
  99. package/dist/chunks/chunk-VMHTYDH4.mjs +0 -172
  100. package/dist/chunks/chunk-ZROSGV65.mjs +0 -3112
  101. package/dist/chunks/{chunk-NBTUWMGP.mjs → chunk-2MTE22CR.mjs} +3 -3
  102. package/dist/chunks/{telegram-YI2OHNTD.mjs → telegram-JYY2VDTI.mjs} +4 -4
@@ -1,172 +0,0 @@
1
- import { createRequire as __adfCreateRequire } from 'node:module';
2
- import { fileURLToPath as __adfFileURLToPath } from 'node:url';
3
- import { dirname as __adfDirname } from 'node:path';
4
- const require = __adfCreateRequire(import.meta.url);
5
- const __filename = __adfFileURLToPath(import.meta.url);
6
- const __dirname = __adfDirname(__filename);
7
- import {
8
- __export
9
- } from "./chunk-M2RX3S2T.mjs";
10
-
11
- // src/shared/utils/mcp-config.ts
12
- var mcp_config_exports = {};
13
- __export(mcp_config_exports, {
14
- MCP_EXECUTABLE_IDENTITY_FIELDS: () => MCP_EXECUTABLE_IDENTITY_FIELDS,
15
- buildEnvSchemaFromKeys: () => buildEnvSchemaFromKeys,
16
- buildHeaderEnvSchemaFromEntries: () => buildHeaderEnvSchemaFromEntries,
17
- buildMcpServerConfigFromRegistration: () => buildMcpServerConfigFromRegistration,
18
- deriveRegistrationTestPlan: () => deriveRegistrationTestPlan,
19
- getMcpRegistrationEnvKeys: () => getMcpRegistrationEnvKeys,
20
- isRegistrationAgentVisible: () => isRegistrationAgentVisible,
21
- isSensitiveMcpHeader: () => isSensitiveMcpHeader,
22
- mcpCredentialNamespace: () => mcpCredentialNamespace,
23
- mcpCredentialRef: () => mcpCredentialRef,
24
- pinServerConfigToRegistration: () => pinServerConfigToRegistration,
25
- reconcileHostApprovedRegistrations: () => reconcileHostApprovedRegistrations,
26
- registrationSourceIdentity: () => registrationSourceIdentity,
27
- sameExecutableIdentity: () => sameExecutableIdentity,
28
- suggestedAgentVisible: () => suggestedAgentVisible
29
- });
30
- function sourcePackage(source) {
31
- let s = source;
32
- return s.npm_package ?? s.npmPackage ?? s.pypi_package ?? s.pypiPackage;
33
- }
34
- function mcpCredentialNamespace(source) {
35
- return sourcePackage(source) ?? source.name;
36
- }
37
- function mcpCredentialRef(source, key) {
38
- return `mcp:${mcpCredentialNamespace(source)}:${key}`;
39
- }
40
- function isSensitiveMcpHeader(header) {
41
- let normalized = header.trim().toLowerCase();
42
- return normalized === "authorization" || normalized === "proxy-authorization" || normalized === "x-api-key" || normalized === "api-key" || normalized === "apikey" || normalized === "x-auth-token" || normalized === "x-access-token" || normalized.includes("token") || normalized.includes("secret") || normalized.includes("credential");
43
- }
44
- function buildEnvSchemaFromKeys(source, keys, scope, requiredKeys = keys) {
45
- let required = new Set(requiredKeys);
46
- return [...new Set(keys.filter(Boolean))].map((key) => ({
47
- key,
48
- scope,
49
- required: required.has(key) || void 0,
50
- credential_ref: scope === "app" ? mcpCredentialRef(source, key) : void 0
51
- }));
52
- }
53
- function buildHeaderEnvSchemaFromEntries(source, entries, appScoped = !0) {
54
- return entries.filter((entry) => entry.header && entry.env).map((entry) => ({
55
- header: entry.header,
56
- env: entry.env,
57
- required: !0,
58
- credential_ref: appScoped ? mcpCredentialRef(source, entry.env) : void 0
59
- }));
60
- }
61
- function getMcpRegistrationEnvKeys(registration) {
62
- return [.../* @__PURE__ */ new Set([
63
- ...(registration.env ?? []).map((entry) => entry.key).filter(Boolean),
64
- ...registration.bearerTokenEnvVar ? [registration.bearerTokenEnvVar] : [],
65
- ...(registration.headerEnv ?? []).map((entry) => entry.value).filter(Boolean)
66
- ])];
67
- }
68
- function buildMcpServerConfigFromRegistration(registration) {
69
- let isHttp = registration.type === "http" || !!registration.url, serverCfg = {
70
- name: registration.name,
71
- transport: isHttp ? "http" : "stdio"
72
- };
73
- if (isHttp) {
74
- serverCfg.url = registration.url, serverCfg.source = registration.url ? `http:${registration.url}` : "http";
75
- let staticHeaders = {};
76
- for (let { key, value } of registration.headers ?? [])
77
- key && value && !isSensitiveMcpHeader(key) && (staticHeaders[key] = value);
78
- Object.keys(staticHeaders).length && (serverCfg.headers = staticHeaders), registration.headerEnv?.length && (serverCfg.header_env = buildHeaderEnvSchemaFromEntries(
79
- registration,
80
- registration.headerEnv.map(({ key, value }) => ({ header: key, env: value })),
81
- (registration.credentialStorage ?? "app") !== "agent"
82
- )), registration.oauth ? serverCfg.oauth = !0 : registration.bearerTokenEnvVar && (serverCfg.bearer_token_env_var = registration.bearerTokenEnvVar);
83
- } else registration.npmPackage ? (serverCfg.source = `npm:${registration.npmPackage}`, serverCfg.npm_package = registration.npmPackage) : registration.pypiPackage ? (serverCfg.source = `uvx:${registration.pypiPackage}`, serverCfg.pypi_package = registration.pypiPackage) : (serverCfg.source = "custom", serverCfg.command = registration.command, serverCfg.args = registration.args);
84
- isHttp || (registration.command && (serverCfg.command = registration.command), registration.args?.length && (serverCfg.args = registration.args));
85
- let envKeys = getMcpRegistrationEnvKeys(registration);
86
- if (envKeys.length) {
87
- let scope = (registration.credentialStorage ?? "app") === "agent" ? "agent" : "app";
88
- scope === "agent" && (serverCfg.env_keys = envKeys), serverCfg.env_schema = buildEnvSchemaFromKeys(registration, envKeys, scope);
89
- }
90
- return registration.toolCallTimeout && (serverCfg.tool_call_timeout_ms = registration.toolCallTimeout * 1e3), !isHttp && registration.runLocation && (serverCfg.run_location = registration.runLocation), registration.credentialFiles?.length && (serverCfg.credential_files = registration.credentialFiles.map((f) => ({
91
- path: f.path,
92
- ...f.required !== void 0 ? { required: f.required } : {},
93
- ...f.writeBack !== void 0 ? { write_back: f.writeBack } : {}
94
- }))), serverCfg;
95
- }
96
- function pinServerConfigToRegistration(connCfg, registration) {
97
- let canonical = buildMcpServerConfigFromRegistration(registration), agentEnvSchema = (connCfg.env_schema ?? []).filter((e) => e.scope === "agent"), mergedEnvSchema = [
98
- ...canonical.env_schema ?? [],
99
- ...agentEnvSchema.filter(
100
- (a) => !(canonical.env_schema ?? []).some((c) => c.key === a.key && c.scope === a.scope)
101
- )
102
- ];
103
- return {
104
- ...canonical,
105
- // Agent-owned state kept from the .adf copy:
106
- env: connCfg.env,
107
- env_keys: connCfg.env_keys,
108
- available_tools: connCfg.available_tools,
109
- restricted: connCfg.restricted,
110
- ...mergedEnvSchema.length ? { env_schema: mergedEnvSchema } : {}
111
- };
112
- }
113
- function suggestedAgentVisible(reg) {
114
- return reg.type === "http" || !!reg.url ? !0 : reg.runLocation !== "host";
115
- }
116
- function isRegistrationAgentVisible(reg) {
117
- return reg.agentVisible ?? suggestedAgentVisible(reg);
118
- }
119
- var MCP_EXECUTABLE_IDENTITY_FIELDS = ["type", "url", "command", "args", "npmPackage", "pypiPackage"];
120
- function sameExecutableIdentity(a, b) {
121
- let argsA = a.args ?? [], argsB = b.args ?? [];
122
- return a.type === b.type && a.url === b.url && a.command === b.command && a.npmPackage === b.npmPackage && a.pypiPackage === b.pypiPackage && argsA.length === argsB.length && argsA.every((arg, i) => arg === argsB[i]);
123
- }
124
- function deriveRegistrationTestPlan(reg, opts) {
125
- if (reg.type === "http" || !!reg.url) {
126
- let notes2 = reg.oauth ? ["Interactive OAuth sign-in runs in a browser during this test."] : [];
127
- return { location: "remote http", authMode: reg.oauth ? "run" : "none", materializeFiles: !1, notes: notes2 };
128
- }
129
- if (reg.runLocation === "host") {
130
- if (!opts?.hostAccessEnabled) {
131
- let notes2 = ["Host access is disabled app-wide \u2014 this test ran in the shared container. Enable host access in Settings \u2192 Compute to test on the host."];
132
- return reg.auth && notes2.push("Authorization for containerized servers happens per-agent when an agent attaches this server."), { location: "shared container", authMode: reg.auth ? "skip" : "none", materializeFiles: !1, notes: notes2 };
133
- }
134
- return {
135
- location: "host",
136
- authMode: reg.auth ? "run" : "none",
137
- materializeFiles: !0,
138
- notes: []
139
- };
140
- }
141
- let notes = [];
142
- return reg.auth && notes.push("Authorization for containerized servers happens per-agent when an agent attaches this server."), reg.credentialFiles?.length && notes.push("Credential files for containerized servers are captured per-agent at attach; this test verifies the package launches and lists tools."), { location: "shared container", authMode: reg.auth ? "skip" : "none", materializeFiles: !1, notes };
143
- }
144
- function registrationSourceIdentity(reg) {
145
- return reg.type === "http" || reg.url ? reg.url ? `http:${reg.url}` : "http" : reg.npmPackage ? `npm:${reg.npmPackage}` : reg.pypiPackage ? `uvx:${reg.pypiPackage}` : "custom";
146
- }
147
- function reconcileHostApprovedRegistrations(prev, next, approved, approvedSources) {
148
- let result = [...approved], sources = { ...approvedSources ?? {} }, prevByName = new Map(prev.filter((r) => r.name).map((r) => [r.name, r])), nextByName = new Map(next.filter((r) => r.name).map((r) => [r.name, r])), add = (name, reg) => {
149
- result.includes(name) || result.push(name), sources[name] = registrationSourceIdentity(reg);
150
- }, remove = (name) => {
151
- let i = result.indexOf(name);
152
- i >= 0 && result.splice(i, 1), delete sources[name];
153
- };
154
- for (let [name, reg] of nextByName) {
155
- let wasHost = prevByName.get(name)?.runLocation === "host", isHost = reg.runLocation === "host" && reg.type !== "http";
156
- isHost && !wasHost ? add(name, reg) : !isHost && wasHost ? remove(name) : isHost && wasHost && result.includes(name) && (sources[name] = registrationSourceIdentity(reg));
157
- }
158
- for (let [name, reg] of prevByName)
159
- !nextByName.has(name) && reg.runLocation === "host" && remove(name);
160
- return { approved: result, sources };
161
- }
162
-
163
- export {
164
- mcpCredentialRef,
165
- isSensitiveMcpHeader,
166
- buildEnvSchemaFromKeys,
167
- buildHeaderEnvSchemaFromEntries,
168
- buildMcpServerConfigFromRegistration,
169
- pinServerConfigToRegistration,
170
- isRegistrationAgentVisible,
171
- mcp_config_exports
172
- };