@agentdocumentformat/cli 0.7.2
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/LICENSE +21 -0
- package/README.md +45 -0
- package/dist/adf.mjs +162 -0
- package/dist/chunks/APEv2Parser-2CNNHMXV.mjs +22 -0
- package/dist/chunks/AiffParser-7BR4RL6G.mjs +162 -0
- package/dist/chunks/App-L5L37JI5.mjs +16747 -0
- package/dist/chunks/AsfParser-VVRSLFOM.mjs +538 -0
- package/dist/chunks/DsdiffParser-CMD4AX7A.mjs +156 -0
- package/dist/chunks/DsfParser-UOGZDS2M.mjs +94 -0
- package/dist/chunks/FlacParser-HB3T3CD4.mjs +23 -0
- package/dist/chunks/MP4Parser-66HBRUSX.mjs +973 -0
- package/dist/chunks/MatroskaParser-J3HUIMEW.mjs +579 -0
- package/dist/chunks/MpegParser-YW6LIUEW.mjs +442 -0
- package/dist/chunks/MusepackParser-PAUSXP7D.mjs +252 -0
- package/dist/chunks/OggParser-NUBV3GWC.mjs +359 -0
- package/dist/chunks/WavPackParser-WQAGT7TC.mjs +171 -0
- package/dist/chunks/WaveParser-EWLQVDX4.mjs +238 -0
- package/dist/chunks/adf-schema-JRU2BTOG.mjs +62 -0
- package/dist/chunks/build-QF5W473T.mjs +60 -0
- package/dist/chunks/chatgpt-subscription-BQGWYZXE.mjs +23 -0
- package/dist/chunks/chunk-2DIECGFL.mjs +6 -0
- package/dist/chunks/chunk-2NAP2ZF7.mjs +60 -0
- package/dist/chunks/chunk-3AT7IIP7.mjs +25696 -0
- package/dist/chunks/chunk-3GNIDM53.mjs +35 -0
- package/dist/chunks/chunk-3M4ZPOA3.mjs +1477 -0
- package/dist/chunks/chunk-4MQPTCXY.mjs +510 -0
- package/dist/chunks/chunk-5PO5PKRV.mjs +366 -0
- package/dist/chunks/chunk-5QU5VY7N.mjs +52 -0
- package/dist/chunks/chunk-5W7KES6P.mjs +436 -0
- package/dist/chunks/chunk-62NE4LG4.mjs +61 -0
- package/dist/chunks/chunk-64OKE4X3.mjs +45 -0
- package/dist/chunks/chunk-6GJ4QHRI.mjs +1278 -0
- package/dist/chunks/chunk-6VQEXLE2.mjs +144 -0
- package/dist/chunks/chunk-6XUV6EK6.mjs +41 -0
- package/dist/chunks/chunk-776TSXEP.mjs +43 -0
- package/dist/chunks/chunk-7CV2SA3H.mjs +285 -0
- package/dist/chunks/chunk-7MTRVW2U.mjs +3103 -0
- package/dist/chunks/chunk-7N2R2VCG.mjs +1434 -0
- package/dist/chunks/chunk-7T2YMTWL.mjs +374 -0
- package/dist/chunks/chunk-7XYNI52E.mjs +149 -0
- package/dist/chunks/chunk-APHX6HSV.mjs +7731 -0
- package/dist/chunks/chunk-APRU6PHC.mjs +40 -0
- package/dist/chunks/chunk-AUYKRQPJ.mjs +499 -0
- package/dist/chunks/chunk-DXWDD5XJ.mjs +136 -0
- package/dist/chunks/chunk-EWL5FG4I.mjs +39 -0
- package/dist/chunks/chunk-EYX2YLJW.mjs +117 -0
- package/dist/chunks/chunk-F5ELW46V.mjs +27 -0
- package/dist/chunks/chunk-G426FACA.mjs +49 -0
- package/dist/chunks/chunk-GEKSJHIV.mjs +2472 -0
- package/dist/chunks/chunk-HBUENVQL.mjs +570 -0
- package/dist/chunks/chunk-HPVFJYXR.mjs +112 -0
- package/dist/chunks/chunk-HWLWPXQ7.mjs +721 -0
- package/dist/chunks/chunk-I2HJYHFT.mjs +665 -0
- package/dist/chunks/chunk-I3UYSITV.mjs +68 -0
- package/dist/chunks/chunk-IC4JDZCI.mjs +3864 -0
- package/dist/chunks/chunk-IHDDCZBS.mjs +112 -0
- package/dist/chunks/chunk-IIGMZHQQ.mjs +10416 -0
- package/dist/chunks/chunk-KWFOS5WC.mjs +41 -0
- package/dist/chunks/chunk-LAZIXV2F.mjs +5290 -0
- package/dist/chunks/chunk-LFMB4PAA.mjs +10814 -0
- package/dist/chunks/chunk-M2RX3S2T.mjs +49 -0
- package/dist/chunks/chunk-M3WPIJYM.mjs +65 -0
- package/dist/chunks/chunk-NBTUWMGP.mjs +263 -0
- package/dist/chunks/chunk-NGK6PVSF.mjs +2676 -0
- package/dist/chunks/chunk-NZ7JTHEO.mjs +85 -0
- package/dist/chunks/chunk-OQN33RGQ.mjs +52 -0
- package/dist/chunks/chunk-RIX34QHC.mjs +2935 -0
- package/dist/chunks/chunk-SGUTYISF.mjs +16 -0
- package/dist/chunks/chunk-SLJ5L7PY.mjs +1473 -0
- package/dist/chunks/chunk-SLUKGXKH.mjs +68 -0
- package/dist/chunks/chunk-TMT32MXT.mjs +419 -0
- package/dist/chunks/chunk-UYY5M2PB.mjs +151 -0
- package/dist/chunks/chunk-VAUOM3IN.mjs +298 -0
- package/dist/chunks/chunk-VMHTYDH4.mjs +172 -0
- package/dist/chunks/chunk-VZS54AA5.mjs +200 -0
- package/dist/chunks/chunk-WFQUVXML.mjs +295 -0
- package/dist/chunks/chunk-X34PDRUH.mjs +809 -0
- package/dist/chunks/chunk-XNPZBLYL.mjs +33 -0
- package/dist/chunks/chunk-XX7OSWTO.mjs +157 -0
- package/dist/chunks/chunk-XYTWGHFS.mjs +600 -0
- package/dist/chunks/chunk-XYV3VCIX.mjs +336 -0
- package/dist/chunks/chunk-Y5ZLKFLE.mjs +1469 -0
- package/dist/chunks/chunk-ZJKXHM4Q.mjs +230 -0
- package/dist/chunks/cli-TCMBNZF6.mjs +1030 -0
- package/dist/chunks/commands-DTEKM4ZL.mjs +20 -0
- package/dist/chunks/daemon-ZC3FZ2P4.mjs +112449 -0
- package/dist/chunks/daemon-control-WDX7PMTC.mjs +300 -0
- package/dist/chunks/daemon-token-WRSULP7G.mjs +23 -0
- package/dist/chunks/devtools-H7CI2ZVG.mjs +85 -0
- package/dist/chunks/discord-IWDQJA7A.mjs +70588 -0
- package/dist/chunks/dist-C57KYFS2.mjs +4952 -0
- package/dist/chunks/dist-I3XBAGDL.mjs +11 -0
- package/dist/chunks/email-V4Q4VJON.mjs +58679 -0
- package/dist/chunks/environment-NX277MQG.mjs +15 -0
- package/dist/chunks/grok-subscription-4PYX7TBF.mjs +19 -0
- package/dist/chunks/layout-EPJQNFAI.mjs +22 -0
- package/dist/chunks/lib-N7FCZWKH.mjs +4038 -0
- package/dist/chunks/open-OTQDGDH5.mjs +36 -0
- package/dist/chunks/parser-JVY2PWSM.mjs +19 -0
- package/dist/chunks/pipeline-executor-BHBSJX2K.mjs +19 -0
- package/dist/chunks/react-IUIDQ5LX.mjs +11 -0
- package/dist/chunks/screen-54BUTYCW.mjs +27 -0
- package/dist/chunks/slack-3L5QTDZX.mjs +8113 -0
- package/dist/chunks/store-WR7TZJZS.mjs +32 -0
- package/dist/chunks/telegram-5ISVFBV3.mjs +14918 -0
- package/dist/chunks/terminal-O5WO7C5U.mjs +48 -0
- package/dist/chunks/theme-NORU4J74.mjs +20 -0
- package/dist/chunks/themes-F2FKU7CP.mjs +23 -0
- package/dist/chunks/token-6G3HCMNX.mjs +54 -0
- package/dist/chunks/token-util-UXYSDQIW.mjs +12 -0
- package/dist/chunks/tui-ODVYUIMT.mjs +197 -0
- package/dist/chunks/welcome-XHXFV7SH.mjs +32 -0
- package/dist/chunks/whatsapp-XSAMNGPJ.mjs +85412 -0
- package/dist/chunks/xterm-headless-YF53XWXE.mjs +3353 -0
- package/package.json +53 -0
- package/resources/wasm/coreutils.LICENSE +18 -0
- package/resources/wasm/coreutils.wasm +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
|
|
8
|
+
// src/main/tui/api/types.ts
|
|
9
|
+
var MAIN_LOOP = "main", DaemonError = class extends Error {
|
|
10
|
+
constructor(message, status, body = null) {
|
|
11
|
+
super(message);
|
|
12
|
+
this.status = status;
|
|
13
|
+
this.body = body;
|
|
14
|
+
this.name = "DaemonError";
|
|
15
|
+
}
|
|
16
|
+
status;
|
|
17
|
+
body;
|
|
18
|
+
/** True when the daemon could not be reached at all (vs. answered with an error). */
|
|
19
|
+
get unreachable() {
|
|
20
|
+
return this.status === null;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
function isCredentialsLocked(err) {
|
|
24
|
+
if (!(err instanceof DaemonError) || err.status !== 409) return !1;
|
|
25
|
+
let body = err.body;
|
|
26
|
+
return !!body && typeof body == "object" && body.code === "credentials_locked";
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
MAIN_LOOP,
|
|
31
|
+
DaemonError,
|
|
32
|
+
isCredentialsLocked
|
|
33
|
+
};
|
|
@@ -0,0 +1,157 @@
|
|
|
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
|
+
FieldDecodingError,
|
|
9
|
+
StringType
|
|
10
|
+
} from "./chunk-I2HJYHFT.mjs";
|
|
11
|
+
|
|
12
|
+
// node_modules/uint8array-extras/index.js
|
|
13
|
+
var objectToString = Object.prototype.toString, uint8ArrayStringified = "[object Uint8Array]";
|
|
14
|
+
function isType(value, typeConstructor, typeStringified) {
|
|
15
|
+
return value ? value.constructor === typeConstructor ? !0 : objectToString.call(value) === typeStringified : !1;
|
|
16
|
+
}
|
|
17
|
+
function isUint8Array(value) {
|
|
18
|
+
return isType(value, Uint8Array, uint8ArrayStringified);
|
|
19
|
+
}
|
|
20
|
+
function assertUint8Array(value) {
|
|
21
|
+
if (!isUint8Array(value))
|
|
22
|
+
throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof value}\``);
|
|
23
|
+
}
|
|
24
|
+
var cachedDecoders = {
|
|
25
|
+
utf8: new globalThis.TextDecoder("utf8")
|
|
26
|
+
};
|
|
27
|
+
var cachedEncoder = new globalThis.TextEncoder();
|
|
28
|
+
var byteToHexLookupTable = Array.from({ length: 256 }, (_, index) => index.toString(16).padStart(2, "0"));
|
|
29
|
+
function uint8ArrayToHex(array) {
|
|
30
|
+
assertUint8Array(array);
|
|
31
|
+
let hexString = "";
|
|
32
|
+
for (let index = 0; index < array.length; index++)
|
|
33
|
+
hexString += byteToHexLookupTable[array[index]];
|
|
34
|
+
return hexString;
|
|
35
|
+
}
|
|
36
|
+
function getUintBE(view) {
|
|
37
|
+
let { byteLength } = view;
|
|
38
|
+
if (byteLength === 6)
|
|
39
|
+
return view.getUint16(0) * 2 ** 32 + view.getUint32(2);
|
|
40
|
+
if (byteLength === 5)
|
|
41
|
+
return view.getUint8(0) * 2 ** 32 + view.getUint32(1);
|
|
42
|
+
if (byteLength === 4)
|
|
43
|
+
return view.getUint32(0);
|
|
44
|
+
if (byteLength === 3)
|
|
45
|
+
return view.getUint8(0) * 2 ** 16 + view.getUint16(1);
|
|
46
|
+
if (byteLength === 2)
|
|
47
|
+
return view.getUint16(0);
|
|
48
|
+
if (byteLength === 1)
|
|
49
|
+
return view.getUint8(0);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// node_modules/music-metadata/lib/common/Util.js
|
|
53
|
+
function getBit(buf, off, bit) {
|
|
54
|
+
return (buf[off] & 1 << bit) !== 0;
|
|
55
|
+
}
|
|
56
|
+
function findZero(uint8Array, encoding) {
|
|
57
|
+
let len = uint8Array.length;
|
|
58
|
+
if (encoding === "utf-16le" || encoding === "utf-16be") {
|
|
59
|
+
for (let i = 0; i + 1 < len; i += 2)
|
|
60
|
+
if (uint8Array[i] === 0 && uint8Array[i + 1] === 0)
|
|
61
|
+
return i;
|
|
62
|
+
return len;
|
|
63
|
+
}
|
|
64
|
+
for (let i = 0; i < len; i++)
|
|
65
|
+
if (uint8Array[i] === 0)
|
|
66
|
+
return i;
|
|
67
|
+
return len;
|
|
68
|
+
}
|
|
69
|
+
function trimRightNull(x) {
|
|
70
|
+
let pos0 = x.indexOf("\0");
|
|
71
|
+
return pos0 === -1 ? x : x.substring(0, pos0);
|
|
72
|
+
}
|
|
73
|
+
function swapBytes(uint8Array) {
|
|
74
|
+
let l = uint8Array.length;
|
|
75
|
+
if ((l & 1) !== 0)
|
|
76
|
+
throw new FieldDecodingError("Buffer length must be even");
|
|
77
|
+
for (let i = 0; i < l; i += 2) {
|
|
78
|
+
let a = uint8Array[i];
|
|
79
|
+
uint8Array[i] = uint8Array[i + 1], uint8Array[i + 1] = a;
|
|
80
|
+
}
|
|
81
|
+
return uint8Array;
|
|
82
|
+
}
|
|
83
|
+
function decodeString(uint8Array, encoding) {
|
|
84
|
+
if (uint8Array[0] === 255 && uint8Array[1] === 254)
|
|
85
|
+
return decodeString(uint8Array.subarray(2), encoding);
|
|
86
|
+
if (encoding === "utf-16le" && uint8Array[0] === 254 && uint8Array[1] === 255) {
|
|
87
|
+
if ((uint8Array.length & 1) !== 0)
|
|
88
|
+
throw new FieldDecodingError("Expected even number of octets for 16-bit unicode string");
|
|
89
|
+
return decodeString(swapBytes(uint8Array), encoding);
|
|
90
|
+
}
|
|
91
|
+
if (encoding === "utf-16be") {
|
|
92
|
+
if ((uint8Array.length & 1) !== 0)
|
|
93
|
+
throw new FieldDecodingError("Expected even number of octets for 16-bit unicode string");
|
|
94
|
+
return new StringType(uint8Array.length, "utf-16le").get(swapBytes(Uint8Array.from(uint8Array)), 0);
|
|
95
|
+
}
|
|
96
|
+
return new StringType(uint8Array.length, encoding).get(uint8Array, 0);
|
|
97
|
+
}
|
|
98
|
+
function stripNulls(str) {
|
|
99
|
+
return str = str.replace(/^\x00+/g, ""), str = str.replace(/\x00+$/g, ""), str;
|
|
100
|
+
}
|
|
101
|
+
function getBitAllignedNumber(source, byteOffset, bitOffset, len) {
|
|
102
|
+
let byteOff = byteOffset + ~~(bitOffset / 8), bitOff = bitOffset % 8, value = source[byteOff];
|
|
103
|
+
value &= 255 >> bitOff;
|
|
104
|
+
let bitsRead = 8 - bitOff, bitsLeft = len - bitsRead;
|
|
105
|
+
return bitsLeft < 0 ? value >>= 8 - bitOff - len : bitsLeft > 0 && (value <<= bitsLeft, value |= getBitAllignedNumber(source, byteOffset, bitOffset + bitsRead, bitsLeft)), value;
|
|
106
|
+
}
|
|
107
|
+
function isBitSet(source, byteOffset, bitOffset) {
|
|
108
|
+
return getBitAllignedNumber(source, byteOffset, bitOffset, 1) === 1;
|
|
109
|
+
}
|
|
110
|
+
function a2hex(str) {
|
|
111
|
+
let arr = [];
|
|
112
|
+
for (let i = 0, l = str.length; i < l; i++) {
|
|
113
|
+
let hex = Number(str.charCodeAt(i)).toString(16);
|
|
114
|
+
arr.push(hex.length === 1 ? `0${hex}` : hex);
|
|
115
|
+
}
|
|
116
|
+
return arr.join(" ");
|
|
117
|
+
}
|
|
118
|
+
function ratioToDb(ratio) {
|
|
119
|
+
return 10 * Math.log10(ratio);
|
|
120
|
+
}
|
|
121
|
+
function dbToRatio(dB) {
|
|
122
|
+
return 10 ** (dB / 10);
|
|
123
|
+
}
|
|
124
|
+
function toRatio(value) {
|
|
125
|
+
let ps = value.split(" ").map((p) => p.trim().toLowerCase());
|
|
126
|
+
if (ps.length >= 1) {
|
|
127
|
+
let v = Number.parseFloat(ps[0]);
|
|
128
|
+
return ps.length === 2 && ps[1] === "db" ? {
|
|
129
|
+
dB: v,
|
|
130
|
+
ratio: dbToRatio(v)
|
|
131
|
+
} : {
|
|
132
|
+
dB: ratioToDb(v),
|
|
133
|
+
ratio: v
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
function decodeUintBE(uint8Array) {
|
|
138
|
+
if (uint8Array.length === 0)
|
|
139
|
+
throw new Error("decodeUintBE: empty Uint8Array");
|
|
140
|
+
let view = new DataView(uint8Array.buffer, uint8Array.byteOffset, uint8Array.byteLength);
|
|
141
|
+
return getUintBE(view);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export {
|
|
145
|
+
uint8ArrayToHex,
|
|
146
|
+
getUintBE,
|
|
147
|
+
getBit,
|
|
148
|
+
findZero,
|
|
149
|
+
trimRightNull,
|
|
150
|
+
decodeString,
|
|
151
|
+
stripNulls,
|
|
152
|
+
getBitAllignedNumber,
|
|
153
|
+
isBitSet,
|
|
154
|
+
a2hex,
|
|
155
|
+
toRatio,
|
|
156
|
+
decodeUintBE
|
|
157
|
+
};
|