@codexhost/cli-win32-arm64 0.12.1 → 0.13.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.
- package/README.md +1 -1
- package/THIRD_PARTY_NOTICES.txt +8 -0
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +232 -21
- package/app/console-web.js +5434 -1092
- package/app/desktop-controller.mjs +252 -41
- package/app/host-runtime.mjs +5318 -1448
- package/app/plugins/antigravity/manifest.json +18 -1
- package/app/plugins/antigravity/plugin.mjs +276 -42
- package/app/plugins/claude-code/manifest.json +28 -0
- package/app/plugins/claude-code/plugin.mjs +1049 -359
- package/app/plugins/codebuddy/manifest.json +17 -0
- package/app/plugins/codebuddy/plugin.mjs +5931 -5358
- package/app/plugins/codex-usage/manifest.json +9 -0
- package/app/plugins/codex-usage/plugin.mjs +16703 -0
- package/app/plugins/cursor-cli/manifest.json +17 -0
- package/app/plugins/cursor-cli/plugin.mjs +351 -77
- package/app/plugins/deepseek-harness/assets/icon.svg +1 -0
- package/app/plugins/deepseek-harness/manifest.json +35 -2
- package/app/plugins/deepseek-harness/plugin.mjs +798 -242
- package/app/plugins/enabled.json +2 -1
- package/app/plugins/grok/manifest.json +21 -1
- package/app/plugins/grok/plugin.mjs +884 -259
- package/app/plugins/hermes/assets/icon.png +0 -0
- package/app/plugins/hermes/manifest.json +30 -2
- package/app/plugins/hermes/plugin.mjs +278 -33
- package/app/plugins/kimi-code/assets/icon.svg +5 -0
- package/app/plugins/kimi-code/manifest.json +25 -2
- package/app/plugins/kimi-code/plugin.mjs +555 -36
- package/app/plugins/kiro-cli/assets/kiro-agent.svg +11 -0
- package/app/plugins/kiro-cli/manifest.json +18 -1
- package/app/plugins/kiro-cli/plugin.mjs +284 -22
- package/app/plugins/omp/manifest.json +21 -1
- package/app/plugins/omp/plugin.mjs +2737 -1956
- package/app/plugins/opencode/manifest.json +18 -1
- package/app/plugins/opencode/plugin.mjs +694 -147
- package/app/plugins/pi/manifest.json +32 -0
- package/app/plugins/pi/plugin.mjs +2809 -2254
- package/app/plugins/qoder/manifest.json +18 -1
- package/app/plugins/qoder/plugin.mjs +585 -81
- package/app/plugins/qoder-cn/manifest.json +18 -1
- package/app/plugins/qoder-cn/plugin.mjs +585 -81
- package/app/plugins/workbuddy/manifest.json +18 -0
- package/app/plugins/workbuddy/plugin.mjs +6317 -5746
- package/app/plugins/zcode/manifest.json +19 -1
- package/app/plugins/zcode/plugin.mjs +1066 -260
- package/app/renderer-extension.js +1999 -1686
- package/bin/codexhost.exe +0 -0
- package/libexec/codexhost-node-repl.exe +0 -0
- package/libexec/codexhost-shim.exe +0 -0
- package/libexec/codexhost-updater.exe +0 -0
- package/licenses/Cordis-LICENSE.txt +21 -0
- package/licenses/Cosmokit-LICENSE.txt +21 -0
- package/package.json +1 -1
- package/app/plugins/kiro-cli/assets/icon.svg +0 -5
|
@@ -777,10 +777,10 @@ function mergeDefs(...defs) {
|
|
|
777
777
|
function cloneDef(schema) {
|
|
778
778
|
return mergeDefs(schema._zod.def);
|
|
779
779
|
}
|
|
780
|
-
function getElementAtPath(obj,
|
|
781
|
-
if (!
|
|
780
|
+
function getElementAtPath(obj, path19) {
|
|
781
|
+
if (!path19)
|
|
782
782
|
return obj;
|
|
783
|
-
return
|
|
783
|
+
return path19.reduce((acc, key) => acc?.[key], obj);
|
|
784
784
|
}
|
|
785
785
|
function promiseAllObject(promisesObj) {
|
|
786
786
|
const keys = Object.keys(promisesObj);
|
|
@@ -1189,11 +1189,11 @@ function explicitlyAborted(x2, startIndex = 0) {
|
|
|
1189
1189
|
}
|
|
1190
1190
|
return false;
|
|
1191
1191
|
}
|
|
1192
|
-
function prefixIssues(
|
|
1192
|
+
function prefixIssues(path19, issues) {
|
|
1193
1193
|
return issues.map((iss) => {
|
|
1194
1194
|
var _a4;
|
|
1195
1195
|
(_a4 = iss).path ?? (_a4.path = []);
|
|
1196
|
-
iss.path.unshift(
|
|
1196
|
+
iss.path.unshift(path19);
|
|
1197
1197
|
return iss;
|
|
1198
1198
|
});
|
|
1199
1199
|
}
|
|
@@ -1340,16 +1340,16 @@ function flattenError(error52, mapper = (issue2) => issue2.message) {
|
|
|
1340
1340
|
}
|
|
1341
1341
|
function formatError(error52, mapper = (issue2) => issue2.message) {
|
|
1342
1342
|
const fieldErrors = { _errors: [] };
|
|
1343
|
-
const processError = (error53,
|
|
1343
|
+
const processError = (error53, path19 = []) => {
|
|
1344
1344
|
for (const issue2 of error53.issues) {
|
|
1345
1345
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1346
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
1346
|
+
issue2.errors.map((issues) => processError({ issues }, [...path19, ...issue2.path]));
|
|
1347
1347
|
} else if (issue2.code === "invalid_key") {
|
|
1348
|
-
processError({ issues: issue2.issues }, [...
|
|
1348
|
+
processError({ issues: issue2.issues }, [...path19, ...issue2.path]);
|
|
1349
1349
|
} else if (issue2.code === "invalid_element") {
|
|
1350
|
-
processError({ issues: issue2.issues }, [...
|
|
1350
|
+
processError({ issues: issue2.issues }, [...path19, ...issue2.path]);
|
|
1351
1351
|
} else {
|
|
1352
|
-
const fullpath = [...
|
|
1352
|
+
const fullpath = [...path19, ...issue2.path];
|
|
1353
1353
|
if (fullpath.length === 0) {
|
|
1354
1354
|
fieldErrors._errors.push(mapper(issue2));
|
|
1355
1355
|
} else {
|
|
@@ -1376,17 +1376,17 @@ function formatError(error52, mapper = (issue2) => issue2.message) {
|
|
|
1376
1376
|
}
|
|
1377
1377
|
function treeifyError(error52, mapper = (issue2) => issue2.message) {
|
|
1378
1378
|
const result = { errors: [] };
|
|
1379
|
-
const processError = (error53,
|
|
1379
|
+
const processError = (error53, path19 = []) => {
|
|
1380
1380
|
var _a4, _b2;
|
|
1381
1381
|
for (const issue2 of error53.issues) {
|
|
1382
1382
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1383
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
1383
|
+
issue2.errors.map((issues) => processError({ issues }, [...path19, ...issue2.path]));
|
|
1384
1384
|
} else if (issue2.code === "invalid_key") {
|
|
1385
|
-
processError({ issues: issue2.issues }, [...
|
|
1385
|
+
processError({ issues: issue2.issues }, [...path19, ...issue2.path]);
|
|
1386
1386
|
} else if (issue2.code === "invalid_element") {
|
|
1387
|
-
processError({ issues: issue2.issues }, [...
|
|
1387
|
+
processError({ issues: issue2.issues }, [...path19, ...issue2.path]);
|
|
1388
1388
|
} else {
|
|
1389
|
-
const fullpath = [...
|
|
1389
|
+
const fullpath = [...path19, ...issue2.path];
|
|
1390
1390
|
if (fullpath.length === 0) {
|
|
1391
1391
|
result.errors.push(mapper(issue2));
|
|
1392
1392
|
continue;
|
|
@@ -1418,8 +1418,8 @@ function treeifyError(error52, mapper = (issue2) => issue2.message) {
|
|
|
1418
1418
|
}
|
|
1419
1419
|
function toDotPath(_path) {
|
|
1420
1420
|
const segs = [];
|
|
1421
|
-
const
|
|
1422
|
-
for (const seg of
|
|
1421
|
+
const path19 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
1422
|
+
for (const seg of path19) {
|
|
1423
1423
|
if (typeof seg === "number")
|
|
1424
1424
|
segs.push(`[${seg}]`);
|
|
1425
1425
|
else if (typeof seg === "symbol")
|
|
@@ -4647,8 +4647,8 @@ function az_default() {
|
|
|
4647
4647
|
}
|
|
4648
4648
|
|
|
4649
4649
|
// ../../../node_modules/zod/v4/locales/be.js
|
|
4650
|
-
function getBelarusianPlural(
|
|
4651
|
-
const absCount = Math.abs(
|
|
4650
|
+
function getBelarusianPlural(count3, one, few, many) {
|
|
4651
|
+
const absCount = Math.abs(count3);
|
|
4652
4652
|
const lastDigit = absCount % 10;
|
|
4653
4653
|
const lastTwoDigits = absCount % 100;
|
|
4654
4654
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -6726,8 +6726,8 @@ function hu_default() {
|
|
|
6726
6726
|
}
|
|
6727
6727
|
|
|
6728
6728
|
// ../../../node_modules/zod/v4/locales/hy.js
|
|
6729
|
-
function getArmenianPlural(
|
|
6730
|
-
return Math.abs(
|
|
6729
|
+
function getArmenianPlural(count3, one, many) {
|
|
6730
|
+
return Math.abs(count3) === 1 ? one : many;
|
|
6731
6731
|
}
|
|
6732
6732
|
function withDefiniteArticle(word) {
|
|
6733
6733
|
if (!word)
|
|
@@ -7649,8 +7649,8 @@ function ko_default() {
|
|
|
7649
7649
|
}
|
|
7650
7650
|
|
|
7651
7651
|
// ../../../node_modules/zod/v4/locales/lt.js
|
|
7652
|
-
var capitalizeFirstCharacter = (
|
|
7653
|
-
return
|
|
7652
|
+
var capitalizeFirstCharacter = (text2) => {
|
|
7653
|
+
return text2.charAt(0).toUpperCase() + text2.slice(1);
|
|
7654
7654
|
};
|
|
7655
7655
|
function getUnitTypeFromNumber(number4) {
|
|
7656
7656
|
const abs = Math.abs(number4);
|
|
@@ -8855,8 +8855,8 @@ function ro_default() {
|
|
|
8855
8855
|
}
|
|
8856
8856
|
|
|
8857
8857
|
// ../../../node_modules/zod/v4/locales/ru.js
|
|
8858
|
-
function getRussianPlural(
|
|
8859
|
-
const absCount = Math.abs(
|
|
8858
|
+
function getRussianPlural(count3, one, few, many) {
|
|
8859
|
+
const absCount = Math.abs(count3);
|
|
8860
8860
|
const lastDigit = absCount % 10;
|
|
8861
8861
|
const lastTwoDigits = absCount % 100;
|
|
8862
8862
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -14111,13 +14111,13 @@ function resolveRef(ref, ctx) {
|
|
|
14111
14111
|
if (!ref.startsWith("#")) {
|
|
14112
14112
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
14113
14113
|
}
|
|
14114
|
-
const
|
|
14115
|
-
if (
|
|
14114
|
+
const path19 = ref.slice(1).split("/").filter(Boolean);
|
|
14115
|
+
if (path19.length === 0) {
|
|
14116
14116
|
return ctx.rootSchema;
|
|
14117
14117
|
}
|
|
14118
14118
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
14119
|
-
if (
|
|
14120
|
-
const key =
|
|
14119
|
+
if (path19[0] === defsKey) {
|
|
14120
|
+
const key = path19[1];
|
|
14121
14121
|
if (!key || !ctx.defs[key]) {
|
|
14122
14122
|
throw new Error(`Reference not found: ${ref}`);
|
|
14123
14123
|
}
|
|
@@ -14525,6 +14525,15 @@ function date4(params) {
|
|
|
14525
14525
|
// ../../../node_modules/zod/v4/classic/external.js
|
|
14526
14526
|
config(en_default());
|
|
14527
14527
|
|
|
14528
|
+
// ../../shared-contracts/dist/delegation-read.js
|
|
14529
|
+
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
14530
|
+
var delegationReadParamsSchema = external_exports.strictObject({
|
|
14531
|
+
threadId: external_exports.string().min(1).max(1024),
|
|
14532
|
+
view: external_exports.enum(["result", "messages"]),
|
|
14533
|
+
cursor: external_exports.string().min(1).max(8192).optional(),
|
|
14534
|
+
limit: external_exports.number().int().min(1).max(100).optional()
|
|
14535
|
+
});
|
|
14536
|
+
|
|
14528
14537
|
// ../../shared-contracts/dist/credential-imports.js
|
|
14529
14538
|
var credentialSourceSchema = external_exports.object({
|
|
14530
14539
|
id: external_exports.string().min(1).max(256),
|
|
@@ -14595,6 +14604,153 @@ var harnessDisplaySetSchema = external_exports.strictObject({
|
|
|
14595
14604
|
initializeOnly: external_exports.boolean().optional()
|
|
14596
14605
|
});
|
|
14597
14606
|
|
|
14607
|
+
// ../../shared-contracts/dist/model-price-overrides.js
|
|
14608
|
+
var usdPerMillionTokens = external_exports.number().finite().nonnegative();
|
|
14609
|
+
var modelPriceOverrideSchema = external_exports.strictObject({
|
|
14610
|
+
input: usdPerMillionTokens,
|
|
14611
|
+
output: usdPerMillionTokens,
|
|
14612
|
+
cacheRead: usdPerMillionTokens.optional(),
|
|
14613
|
+
cacheWrite: usdPerMillionTokens.optional(),
|
|
14614
|
+
cacheWrite1h: usdPerMillionTokens.optional()
|
|
14615
|
+
});
|
|
14616
|
+
var modelPriceKeySchema = external_exports.string().max(512).refine((key) => key.trim() === key && key.length > 0, "Model ID is required");
|
|
14617
|
+
var modelPriceOverridesSchema = external_exports.strictObject({
|
|
14618
|
+
/** Absolute path of the Host's `pricing.json`. */
|
|
14619
|
+
path: external_exports.string(),
|
|
14620
|
+
entries: external_exports.array(external_exports.strictObject({ key: external_exports.string(), price: modelPriceOverrideSchema })),
|
|
14621
|
+
/** Why the existing file is unusable; the Host then ignores it and refuses to overwrite it. */
|
|
14622
|
+
error: external_exports.string().nullable()
|
|
14623
|
+
});
|
|
14624
|
+
var modelPriceOverridesGetSchema = external_exports.strictObject({});
|
|
14625
|
+
var modelPriceOverridesSetSchema = external_exports.strictObject({
|
|
14626
|
+
key: modelPriceKeySchema,
|
|
14627
|
+
price: modelPriceOverrideSchema.nullable(),
|
|
14628
|
+
previousKey: modelPriceKeySchema.optional()
|
|
14629
|
+
});
|
|
14630
|
+
var modelPriceDefaultParamsSchema = external_exports.strictObject({
|
|
14631
|
+
model: modelPriceKeySchema
|
|
14632
|
+
});
|
|
14633
|
+
var modelPriceSuggestionSchema = external_exports.strictObject({
|
|
14634
|
+
/** Verified from catalog canonical links, not inferred from names or equal prices. */
|
|
14635
|
+
official: external_exports.boolean().optional(),
|
|
14636
|
+
canonicalModelId: external_exports.string().min(1).optional(),
|
|
14637
|
+
provider: external_exports.string().min(1).max(512),
|
|
14638
|
+
model: external_exports.string().min(1).max(512),
|
|
14639
|
+
price: modelPriceOverrideSchema
|
|
14640
|
+
});
|
|
14641
|
+
var modelPriceDefaultResultSchema = external_exports.strictObject({
|
|
14642
|
+
price: modelPriceOverrideSchema.nullable(),
|
|
14643
|
+
/** Local catalog suggestions only; never used automatically for pricing. */
|
|
14644
|
+
suggestions: external_exports.array(modelPriceSuggestionSchema).max(6).optional()
|
|
14645
|
+
});
|
|
14646
|
+
|
|
14647
|
+
// ../../shared-contracts/dist/usage-statistics.js
|
|
14648
|
+
var USAGE_STATISTICS_RANGES = ["today", "7d", "30d", "90d", "all"];
|
|
14649
|
+
var count = external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
|
|
14650
|
+
var localDate = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/u);
|
|
14651
|
+
var harness = external_exports.string().min(1).max(128);
|
|
14652
|
+
var model = external_exports.string().min(1).max(512);
|
|
14653
|
+
var project = external_exports.string().min(1).max(4096);
|
|
14654
|
+
var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
14655
|
+
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
14656
|
+
harness: harness.optional(),
|
|
14657
|
+
model: model.nullable().optional(),
|
|
14658
|
+
project: project.nullable().optional(),
|
|
14659
|
+
/** One local date inside the range. */
|
|
14660
|
+
date: localDate.optional()
|
|
14661
|
+
});
|
|
14662
|
+
var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
14663
|
+
requests: count,
|
|
14664
|
+
inputTokens: count,
|
|
14665
|
+
cachedInputTokens: count,
|
|
14666
|
+
cacheWriteInputTokens: count,
|
|
14667
|
+
cacheKnownInputTokens: count,
|
|
14668
|
+
outputTokens: count,
|
|
14669
|
+
reasoningOutputTokens: count,
|
|
14670
|
+
/** USD at the public price, summed over the priced requests only. */
|
|
14671
|
+
costUsd: external_exports.number().finite().min(0),
|
|
14672
|
+
/** Requests without a price (or the cache data the price needs); not in `costUsd`. */
|
|
14673
|
+
unpricedRequests: count,
|
|
14674
|
+
/**
|
|
14675
|
+
* Requests whose storage gave no token counts: counted as requests, with neither tokens nor
|
|
14676
|
+
* cost, and not as unpriced.
|
|
14677
|
+
*/
|
|
14678
|
+
unmeteredRequests: count
|
|
14679
|
+
});
|
|
14680
|
+
var totals = usageStatisticsTotalsSchema.shape;
|
|
14681
|
+
var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
14682
|
+
harness,
|
|
14683
|
+
sessionId: external_exports.string().min(1).max(512),
|
|
14684
|
+
project: project.nullable(),
|
|
14685
|
+
/** Models the session used, most requests first. */
|
|
14686
|
+
models: external_exports.array(model).max(16),
|
|
14687
|
+
firstAtMs: count,
|
|
14688
|
+
lastAtMs: count,
|
|
14689
|
+
...totals
|
|
14690
|
+
});
|
|
14691
|
+
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
14692
|
+
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
14693
|
+
/** First local date of the range; null for all time. */
|
|
14694
|
+
from: localDate.nullable(),
|
|
14695
|
+
to: localDate,
|
|
14696
|
+
/** The filters these figures apply, echoed so a late answer to older filters is recognised. */
|
|
14697
|
+
filters: external_exports.strictObject({
|
|
14698
|
+
harness: harness.nullable(),
|
|
14699
|
+
model: model.nullable(),
|
|
14700
|
+
unknownModel: external_exports.boolean(),
|
|
14701
|
+
project: project.nullable(),
|
|
14702
|
+
unknownProject: external_exports.boolean(),
|
|
14703
|
+
date: localDate.nullable()
|
|
14704
|
+
}),
|
|
14705
|
+
/** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
|
|
14706
|
+
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count, read: count }),
|
|
14707
|
+
/** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
|
|
14708
|
+
failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
|
|
14709
|
+
/** Every value seen in the range, ignoring the filters, to choose filters from. */
|
|
14710
|
+
options: external_exports.strictObject({
|
|
14711
|
+
harnesses: external_exports.array(harness).max(256),
|
|
14712
|
+
models: external_exports.array(model.nullable()).max(4096),
|
|
14713
|
+
projects: external_exports.array(project.nullable()).max(4096)
|
|
14714
|
+
}),
|
|
14715
|
+
/** Current display metadata, scoped by Harness. Never a pricing or filter identity.
|
|
14716
|
+
* Optional for older Hosts; missing/conflicting labels fall back to the native model ID.
|
|
14717
|
+
*/
|
|
14718
|
+
modelLabels: external_exports.array(external_exports.strictObject({ harness, model, label: model })).max(4096).optional(),
|
|
14719
|
+
/** Native credits, all filters applied, never combined across Harnesses or treated as USD.
|
|
14720
|
+
* Only groups with at least one reported value appear; reportedRequests exposes partial data.
|
|
14721
|
+
*/
|
|
14722
|
+
credits: external_exports.array(external_exports.strictObject({
|
|
14723
|
+
harness,
|
|
14724
|
+
model: model.nullable(),
|
|
14725
|
+
credits: external_exports.number().finite().min(0),
|
|
14726
|
+
reportedRequests: count,
|
|
14727
|
+
requests: count
|
|
14728
|
+
})).max(4096).optional(),
|
|
14729
|
+
/** All filters applied. */
|
|
14730
|
+
totals: usageStatisticsTotalsSchema,
|
|
14731
|
+
/** Each date and Harness of the range: every filter except the day. */
|
|
14732
|
+
daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
|
|
14733
|
+
/** Local weekday (0 = Sunday) and hour, all filters applied. */
|
|
14734
|
+
hourly: external_exports.array(external_exports.strictObject({
|
|
14735
|
+
weekday: external_exports.number().int().min(0).max(6),
|
|
14736
|
+
hour: external_exports.number().int().min(0).max(23),
|
|
14737
|
+
...totals
|
|
14738
|
+
})).max(168),
|
|
14739
|
+
byHarness: external_exports.array(external_exports.strictObject({ harness, ...totals })).max(256),
|
|
14740
|
+
byModel: external_exports.array(external_exports.strictObject({
|
|
14741
|
+
model: model.nullable(),
|
|
14742
|
+
...totals,
|
|
14743
|
+
/** Requests priced by what the Harness recorded they cost, not by a price list. */
|
|
14744
|
+
harnessPricedRequests: count
|
|
14745
|
+
})).max(4096),
|
|
14746
|
+
byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
|
|
14747
|
+
/**
|
|
14748
|
+
* The sessions that spent the most, by cost and by tokens without cache, all filters applied;
|
|
14749
|
+
* requests without a native session are not listed here but count everywhere else.
|
|
14750
|
+
*/
|
|
14751
|
+
sessions: external_exports.array(usageStatisticsSessionSchema).max(100)
|
|
14752
|
+
});
|
|
14753
|
+
|
|
14598
14754
|
// ../../shared-contracts/dist/ids.js
|
|
14599
14755
|
var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
|
|
14600
14756
|
message: "Identifier must not be empty or whitespace"
|
|
@@ -14642,6 +14798,10 @@ var CONSOLE_HOST_METHODS = Object.freeze([
|
|
|
14642
14798
|
"codexhost/account/list",
|
|
14643
14799
|
"codexhost/account/refresh",
|
|
14644
14800
|
"codexhost/account/usage/inspect",
|
|
14801
|
+
"codexhost/usage/model-prices/get",
|
|
14802
|
+
"codexhost/usage/model-prices/set",
|
|
14803
|
+
"codexhost/usage/model-prices/default",
|
|
14804
|
+
"codexhost/usage/statistics/get",
|
|
14645
14805
|
"codexhost/update/check",
|
|
14646
14806
|
"codexhost/update/start",
|
|
14647
14807
|
"codexhost/update/status"
|
|
@@ -14706,6 +14866,7 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
14706
14866
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14707
14867
|
outputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14708
14868
|
outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
14869
|
+
apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
14709
14870
|
reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14710
14871
|
totalTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14711
14872
|
totalCostUsd: finiteNonNegativeNumberSchema.optional(),
|
|
@@ -14717,7 +14878,11 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
14717
14878
|
planFiveHourUsedPercent: cacheHitRatePercentSchema.optional(),
|
|
14718
14879
|
planFiveHourResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
|
|
14719
14880
|
planSevenDayUsedPercent: cacheHitRatePercentSchema.optional(),
|
|
14720
|
-
planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional()
|
|
14881
|
+
planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
|
|
14882
|
+
sessionCacheHitRatePercent: cacheHitRatePercentSchema.optional(),
|
|
14883
|
+
timeToFirstOutputMs: nonNegativeSafeIntegerSchema.optional(),
|
|
14884
|
+
costSource: external_exports.enum(["publicPrice", "native"]).optional(),
|
|
14885
|
+
unpricedModels: external_exports.array(external_exports.string().min(1)).min(1).optional()
|
|
14721
14886
|
}).strict().superRefine((usage, context) => {
|
|
14722
14887
|
if (Object.keys(usage).length === 0) {
|
|
14723
14888
|
context.addIssue({ code: "custom", message: "Thread Usage must contain a reliable field" });
|
|
@@ -14738,6 +14903,20 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
14738
14903
|
path: ["contextWindowTokens"]
|
|
14739
14904
|
});
|
|
14740
14905
|
}
|
|
14906
|
+
if (usage.costSource !== void 0 && usage.totalCostUsd === void 0) {
|
|
14907
|
+
context.addIssue({
|
|
14908
|
+
code: "custom",
|
|
14909
|
+
message: "Thread Usage costSource must be provided with totalCostUsd",
|
|
14910
|
+
path: ["costSource"]
|
|
14911
|
+
});
|
|
14912
|
+
}
|
|
14913
|
+
if (usage.unpricedModels !== void 0 && usage.costSource !== "publicPrice") {
|
|
14914
|
+
context.addIssue({
|
|
14915
|
+
code: "custom",
|
|
14916
|
+
message: "Thread Usage unpricedModels must be provided with a publicPrice cost",
|
|
14917
|
+
path: ["unpricedModels"]
|
|
14918
|
+
});
|
|
14919
|
+
}
|
|
14741
14920
|
if (usage.planFiveHourResetsAtUnix !== void 0 && usage.planFiveHourUsedPercent === void 0) {
|
|
14742
14921
|
context.addIssue({
|
|
14743
14922
|
code: "custom",
|
|
@@ -14992,27 +15171,27 @@ var harnessModelCatalogSchema = external_exports.object({
|
|
|
14992
15171
|
}).strict().superRefine((catalog, context) => {
|
|
14993
15172
|
const refs = /* @__PURE__ */ new Set();
|
|
14994
15173
|
const thinkingIds = new Set(catalog.thinkingOptions.map(({ id }) => id));
|
|
14995
|
-
for (const [index,
|
|
14996
|
-
if (refs.has(
|
|
15174
|
+
for (const [index, model2] of catalog.models.entries()) {
|
|
15175
|
+
if (refs.has(model2.ref.id)) {
|
|
14997
15176
|
context.addIssue({
|
|
14998
15177
|
code: "custom",
|
|
14999
15178
|
message: "Model Catalog refs must be unique",
|
|
15000
15179
|
path: ["models", index, "ref", "id"]
|
|
15001
15180
|
});
|
|
15002
15181
|
}
|
|
15003
|
-
refs.add(
|
|
15004
|
-
if (
|
|
15005
|
-
if (refs.has(
|
|
15182
|
+
refs.add(model2.ref.id);
|
|
15183
|
+
if (model2.fastModel) {
|
|
15184
|
+
if (refs.has(model2.fastModel.id) || catalog.models.some((entry) => entry.ref.id === model2.fastModel?.id)) {
|
|
15006
15185
|
context.addIssue({
|
|
15007
15186
|
code: "custom",
|
|
15008
15187
|
message: "Fast Model refs must be distinct and unique",
|
|
15009
15188
|
path: ["models", index, "fastModel"]
|
|
15010
15189
|
});
|
|
15011
15190
|
}
|
|
15012
|
-
refs.add(
|
|
15191
|
+
refs.add(model2.fastModel.id);
|
|
15013
15192
|
}
|
|
15014
15193
|
const supportedThinkingIds = /* @__PURE__ */ new Set();
|
|
15015
|
-
for (const [optionIndex, optionId] of (
|
|
15194
|
+
for (const [optionIndex, optionId] of (model2.supportedThinkingOptionIds ?? []).entries()) {
|
|
15016
15195
|
if (supportedThinkingIds.has(optionId)) {
|
|
15017
15196
|
context.addIssue({
|
|
15018
15197
|
code: "custom",
|
|
@@ -15206,13 +15385,40 @@ var HARNESS_PLUGIN_LIMIT = 128;
|
|
|
15206
15385
|
var harnessPluginIdSchema = external_exports.string().min(1).max(128).regex(/^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/u).refine((id) => id !== "codex", "The official Codex identity is reserved").pipe(harnessIdSchema);
|
|
15207
15386
|
var relativeResourceSchema = external_exports.string().min(1).max(512).refine((value) => !/[\\\u0000:#?]/u.test(value) && !value.startsWith("/") && !value.split("/").some((part) => part === ".." || part === ""), "Plugin resources must be relative paths inside the plugin");
|
|
15208
15387
|
var documentationUrlSchema = external_exports.url().refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Plugin documentation links must be credential-free HTTPS URLs");
|
|
15388
|
+
var localizedTextSchema = external_exports.object({ en: external_exports.string().max(4096), "zh-CN": external_exports.string().max(4096).optional() }).strict();
|
|
15389
|
+
var harnessInstallationGuideSchema = external_exports.object({
|
|
15390
|
+
commands: external_exports.array(external_exports.object({ terminal: external_exports.string().max(256), command: external_exports.string().max(4096) }).strict()).max(8),
|
|
15391
|
+
before: localizedTextSchema.optional(),
|
|
15392
|
+
after: localizedTextSchema.optional(),
|
|
15393
|
+
downloads: external_exports.array(external_exports.object({ label: external_exports.string().max(128), url: documentationUrlSchema }).strict()).max(8).optional()
|
|
15394
|
+
}).strict();
|
|
15209
15395
|
var pluginPresentationShape = {
|
|
15210
15396
|
id: harnessPluginIdSchema,
|
|
15211
15397
|
name: external_exports.string().trim().min(1).max(128),
|
|
15212
15398
|
version: external_exports.string().min(1).max(128),
|
|
15399
|
+
/** Capability-only plugin; omitted for existing session-capable plugins. */
|
|
15400
|
+
kind: external_exports.literal("usage").optional(),
|
|
15401
|
+
/** Original image styling or bounded vector paths; never arbitrary CSS/SVG markup. */
|
|
15402
|
+
iconStyle: external_exports.object({
|
|
15403
|
+
vector: external_exports.object({
|
|
15404
|
+
viewBox: external_exports.string().max(128).regex(/^-?\d+(?:\.\d+)?(?: +-?\d+(?:\.\d+)?){3}$/u),
|
|
15405
|
+
color: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu),
|
|
15406
|
+
paths: external_exports.array(external_exports.object({
|
|
15407
|
+
d: external_exports.string().min(1).max(32768).regex(/^[MmLlHhVvCcSsQqTtAaZz\d.,+eE\s-]+$/u),
|
|
15408
|
+
fillRule: external_exports.enum(["evenodd", "nonzero"]).optional(),
|
|
15409
|
+
fill: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu).optional()
|
|
15410
|
+
}).strict()).min(1).max(32)
|
|
15411
|
+
}).strict().optional(),
|
|
15412
|
+
background: external_exports.string().regex(/^#[a-f0-9]{6}$/iu).optional(),
|
|
15413
|
+
borderRadius: external_exports.number().min(0).max(50).optional(),
|
|
15414
|
+
paddingRatio: external_exports.number().min(0).max(0.25).optional()
|
|
15415
|
+
}).strict().optional(),
|
|
15416
|
+
installation: harnessInstallationGuideSchema.optional(),
|
|
15417
|
+
notice: localizedTextSchema.optional(),
|
|
15213
15418
|
/** The factory accepts a persisted local entrypoint through its construction context. */
|
|
15214
15419
|
launchCommand: external_exports.literal(true).optional(),
|
|
15215
15420
|
links: external_exports.object({
|
|
15421
|
+
website: documentationUrlSchema.optional(),
|
|
15216
15422
|
documentation: documentationUrlSchema.optional(),
|
|
15217
15423
|
installation: documentationUrlSchema.optional()
|
|
15218
15424
|
}).strict().optional()
|
|
@@ -15631,6 +15837,11 @@ var codexSshDraftSchema = external_exports.strictObject({
|
|
|
15631
15837
|
});
|
|
15632
15838
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
15633
15839
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
15840
|
+
external_exports.strictObject({
|
|
15841
|
+
action: external_exports.literal("read-thread"),
|
|
15842
|
+
hostId: hostId.refine((id) => id !== "local"),
|
|
15843
|
+
input: delegationReadParamsSchema
|
|
15844
|
+
}),
|
|
15634
15845
|
external_exports.strictObject({
|
|
15635
15846
|
action: external_exports.literal("save"),
|
|
15636
15847
|
draft: codexSshDraftSchema,
|
|
@@ -15762,7 +15973,6 @@ var tokenFields = [
|
|
|
15762
15973
|
"cachedInputTokens",
|
|
15763
15974
|
"cacheWriteInputTokens",
|
|
15764
15975
|
"outputTokens",
|
|
15765
|
-
"outputTokensPerSecond",
|
|
15766
15976
|
"reasoningOutputTokens",
|
|
15767
15977
|
"totalTokens",
|
|
15768
15978
|
"contextWindowTokens",
|
|
@@ -15770,10 +15980,12 @@ var tokenFields = [
|
|
|
15770
15980
|
];
|
|
15771
15981
|
var safeIntegerFields = [
|
|
15772
15982
|
"planFiveHourResetsAtUnix",
|
|
15773
|
-
"planSevenDayResetsAtUnix"
|
|
15983
|
+
"planSevenDayResetsAtUnix",
|
|
15984
|
+
"timeToFirstOutputMs"
|
|
15774
15985
|
];
|
|
15775
15986
|
var percentFields = [
|
|
15776
15987
|
"cacheHitRatePercent",
|
|
15988
|
+
"sessionCacheHitRatePercent",
|
|
15777
15989
|
"planFiveHourUsedPercent",
|
|
15778
15990
|
"planSevenDayUsedPercent"
|
|
15779
15991
|
];
|
|
@@ -15781,9 +15993,14 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
15781
15993
|
...tokenFields,
|
|
15782
15994
|
...safeIntegerFields,
|
|
15783
15995
|
...percentFields,
|
|
15996
|
+
"sessionCacheUsage",
|
|
15784
15997
|
"totalCostUsd",
|
|
15785
15998
|
"totalCredits",
|
|
15786
|
-
"contextUsagePercent"
|
|
15999
|
+
"contextUsagePercent",
|
|
16000
|
+
"outputTokensPerSecond",
|
|
16001
|
+
"apiOutputTokensPerSecond",
|
|
16002
|
+
"costSource",
|
|
16003
|
+
"unpricedModels"
|
|
15787
16004
|
]);
|
|
15788
16005
|
function isRecord(value) {
|
|
15789
16006
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -15799,7 +16016,11 @@ function parseHostUsage(value) {
|
|
|
15799
16016
|
throw new Error(`Harness Usage contains unknown field '${key}'`);
|
|
15800
16017
|
}
|
|
15801
16018
|
}
|
|
15802
|
-
for (const field of [
|
|
16019
|
+
for (const field of [
|
|
16020
|
+
"totalCredits",
|
|
16021
|
+
"contextUsagePercent",
|
|
16022
|
+
"apiOutputTokensPerSecond"
|
|
16023
|
+
]) {
|
|
15803
16024
|
const candidate = value[field];
|
|
15804
16025
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
|
|
15805
16026
|
throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
|
|
@@ -15829,6 +16050,12 @@ function parseHostUsage(value) {
|
|
|
15829
16050
|
throw new Error(`Harness Usage '${field}' must be between 0 and 100`);
|
|
15830
16051
|
}
|
|
15831
16052
|
}
|
|
16053
|
+
if (value.sessionCacheUsage !== void 0) {
|
|
16054
|
+
const totals2 = value.sessionCacheUsage;
|
|
16055
|
+
if (!isRecord(totals2) || Object.keys(totals2).some((key) => key !== "inputTokens" && key !== "cachedInputTokens") || typeof totals2.inputTokens !== "number" || !Number.isSafeInteger(totals2.inputTokens) || totals2.inputTokens < 0 || typeof totals2.cachedInputTokens !== "number" || !Number.isSafeInteger(totals2.cachedInputTokens) || totals2.cachedInputTokens < 0 || totals2.cachedInputTokens > totals2.inputTokens) {
|
|
16056
|
+
throw new Error("Harness Usage 'sessionCacheUsage' must contain complete bounded token totals");
|
|
16057
|
+
}
|
|
16058
|
+
}
|
|
15832
16059
|
const hasContextUsed = value.contextUsedTokens !== void 0;
|
|
15833
16060
|
const hasContextWindow = value.contextWindowTokens !== void 0;
|
|
15834
16061
|
if (hasContextUsed !== hasContextWindow) {
|
|
@@ -15843,8 +16070,90 @@ function parseHostUsage(value) {
|
|
|
15843
16070
|
if (value.planSevenDayResetsAtUnix !== void 0 && value.planSevenDayUsedPercent === void 0) {
|
|
15844
16071
|
throw new Error("Harness Usage 'planSevenDayResetsAtUnix' must be provided with 'planSevenDayUsedPercent'");
|
|
15845
16072
|
}
|
|
16073
|
+
if (value.costSource !== void 0) {
|
|
16074
|
+
if (value.costSource !== "publicPrice" && value.costSource !== "native") {
|
|
16075
|
+
throw new Error("Harness Usage 'costSource' must be 'publicPrice' or 'native'");
|
|
16076
|
+
}
|
|
16077
|
+
if (value.totalCostUsd === void 0) {
|
|
16078
|
+
throw new Error("Harness Usage 'costSource' must be provided with 'totalCostUsd'");
|
|
16079
|
+
}
|
|
16080
|
+
}
|
|
16081
|
+
if (value.unpricedModels !== void 0) {
|
|
16082
|
+
const models = value.unpricedModels;
|
|
16083
|
+
if (!Array.isArray(models) || models.length === 0 || !models.every((model2) => typeof model2 === "string" && model2.length > 0)) {
|
|
16084
|
+
throw new Error("Harness Usage 'unpricedModels' must be a non-empty list of Model IDs");
|
|
16085
|
+
}
|
|
16086
|
+
if (value.costSource !== "publicPrice") {
|
|
16087
|
+
throw new Error("Harness Usage 'unpricedModels' must be provided with a 'publicPrice' cost");
|
|
16088
|
+
}
|
|
16089
|
+
return { ...value, unpricedModels: [...models] };
|
|
16090
|
+
}
|
|
15846
16091
|
return { ...value };
|
|
15847
16092
|
}
|
|
16093
|
+
var requestTokenFields = [
|
|
16094
|
+
"inputTokens",
|
|
16095
|
+
"cachedInputTokens",
|
|
16096
|
+
"cacheWriteInputTokens",
|
|
16097
|
+
"cacheWrite1hInputTokens",
|
|
16098
|
+
"outputTokens",
|
|
16099
|
+
"reasoningOutputTokens",
|
|
16100
|
+
"startedAtMs",
|
|
16101
|
+
"completedAtMs"
|
|
16102
|
+
];
|
|
16103
|
+
var requestFields = /* @__PURE__ */ new Set([
|
|
16104
|
+
...requestTokenFields,
|
|
16105
|
+
"requestId",
|
|
16106
|
+
"historical",
|
|
16107
|
+
"model",
|
|
16108
|
+
"provider"
|
|
16109
|
+
]);
|
|
16110
|
+
function parseHostUsageRequest(value) {
|
|
16111
|
+
if (!isRecord(value))
|
|
16112
|
+
throw new Error("Harness Usage request must be an object");
|
|
16113
|
+
for (const key of Object.keys(value)) {
|
|
16114
|
+
if (!requestFields.has(key)) {
|
|
16115
|
+
throw new Error(`Harness Usage request contains unknown field '${key}'`);
|
|
16116
|
+
}
|
|
16117
|
+
}
|
|
16118
|
+
if (typeof value.requestId !== "string" || value.requestId.length === 0) {
|
|
16119
|
+
throw new Error("Harness Usage request 'requestId' must be a non-empty string");
|
|
16120
|
+
}
|
|
16121
|
+
for (const field of ["model", "provider"]) {
|
|
16122
|
+
const candidate = value[field];
|
|
16123
|
+
if (candidate !== void 0 && (typeof candidate !== "string" || candidate.length === 0)) {
|
|
16124
|
+
throw new Error(`Harness Usage request '${field}' must be a non-empty string`);
|
|
16125
|
+
}
|
|
16126
|
+
}
|
|
16127
|
+
if (value.historical !== void 0 && typeof value.historical !== "boolean") {
|
|
16128
|
+
throw new Error("Harness Usage request 'historical' must be a boolean");
|
|
16129
|
+
}
|
|
16130
|
+
for (const field of requestTokenFields) {
|
|
16131
|
+
const candidate = value[field];
|
|
16132
|
+
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16133
|
+
throw new Error(`Harness Usage request '${field}' must be a non-negative safe integer`);
|
|
16134
|
+
}
|
|
16135
|
+
}
|
|
16136
|
+
if (value.inputTokens === void 0 || value.outputTokens === void 0) {
|
|
16137
|
+
throw new Error("Harness Usage request must contain 'inputTokens' and 'outputTokens'");
|
|
16138
|
+
}
|
|
16139
|
+
const request = value;
|
|
16140
|
+
if ((request.cachedInputTokens ?? 0) + (request.cacheWriteInputTokens ?? 0) > request.inputTokens) {
|
|
16141
|
+
throw new Error("Harness Usage request cache Tokens must not exceed 'inputTokens'");
|
|
16142
|
+
}
|
|
16143
|
+
if ((request.reasoningOutputTokens ?? 0) > request.outputTokens) {
|
|
16144
|
+
throw new Error("Harness Usage request 'reasoningOutputTokens' must not exceed 'outputTokens'");
|
|
16145
|
+
}
|
|
16146
|
+
if (request.cacheWrite1hInputTokens !== void 0 && request.cacheWrite1hInputTokens > (request.cacheWriteInputTokens ?? -1)) {
|
|
16147
|
+
throw new Error("Harness Usage request 'cacheWrite1hInputTokens' must not exceed 'cacheWriteInputTokens'");
|
|
16148
|
+
}
|
|
16149
|
+
if (request.startedAtMs === void 0 !== (request.completedAtMs === void 0)) {
|
|
16150
|
+
throw new Error("Harness Usage request timing fields must be provided together");
|
|
16151
|
+
}
|
|
16152
|
+
if (request.startedAtMs !== void 0 && request.completedAtMs !== void 0 && request.completedAtMs < request.startedAtMs) {
|
|
16153
|
+
throw new Error("Harness Usage request 'completedAtMs' must not precede 'startedAtMs'");
|
|
16154
|
+
}
|
|
16155
|
+
return { ...request };
|
|
16156
|
+
}
|
|
15848
16157
|
|
|
15849
16158
|
// ../../harness-adapter/dist/live-command-catalog.js
|
|
15850
16159
|
var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
|
|
@@ -15927,8 +16236,8 @@ function liveHarnessCommandPrompt(catalog, idPrefix, commandId, argumentText) {
|
|
|
15927
16236
|
const descriptor = catalog.commands.find(({ id }) => id === commandId);
|
|
15928
16237
|
if (!descriptor)
|
|
15929
16238
|
return null;
|
|
15930
|
-
const
|
|
15931
|
-
return
|
|
16239
|
+
const text2 = typeof argumentText === "string" ? argumentText.trim() : "";
|
|
16240
|
+
return text2 ? `${descriptor.invocation} ${text2}` : descriptor.invocation;
|
|
15932
16241
|
}
|
|
15933
16242
|
function mergeLiveHarnessCommands(builtIns, idPrefix, live, exclusions = {}) {
|
|
15934
16243
|
if (!live)
|
|
@@ -16253,6 +16562,8 @@ var harnessSessionStateSchema = external_exports.custom((value) => {
|
|
|
16253
16562
|
var eventKeys = /* @__PURE__ */ new Map([
|
|
16254
16563
|
["session.state.changed", /* @__PURE__ */ new Set(["type", "state"])],
|
|
16255
16564
|
["session.usage.changed", /* @__PURE__ */ new Set(["type", "usage", "observedForTurnId"])],
|
|
16565
|
+
["usage.request", /* @__PURE__ */ new Set(["type", "request"])],
|
|
16566
|
+
["usage.history", /* @__PURE__ */ new Set(["type", "complete"])],
|
|
16256
16567
|
["subagent.state.changed", /* @__PURE__ */ new Set(["type", "nativeSubagentId", "status", "resultSummary"])],
|
|
16257
16568
|
["subagent.transcript.changed", /* @__PURE__ */ new Set(["type", "nativeSubagentId"])],
|
|
16258
16569
|
["turn.started", /* @__PURE__ */ new Set(["type", "turnId"])],
|
|
@@ -16301,6 +16612,8 @@ var harnessOutputSchema = external_exports.custom((value) => {
|
|
|
16301
16612
|
return harnessSessionStateSchema.safeParse(event.state).success;
|
|
16302
16613
|
if (event.type === "session.faulted")
|
|
16303
16614
|
return harnessErrorSchema.safeParse(event.error).success;
|
|
16615
|
+
if (event.type === "usage.history")
|
|
16616
|
+
return typeof event.complete === "boolean";
|
|
16304
16617
|
return true;
|
|
16305
16618
|
}
|
|
16306
16619
|
if (output.kind === "interaction") {
|
|
@@ -17041,9 +17354,221 @@ var BrokeredHarnessAdapter = class {
|
|
|
17041
17354
|
}
|
|
17042
17355
|
};
|
|
17043
17356
|
|
|
17357
|
+
// dist/claude-usage.js
|
|
17358
|
+
var SYNTHETIC_MODEL = "<synthetic>";
|
|
17359
|
+
function isRecord2(value) {
|
|
17360
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
17361
|
+
}
|
|
17362
|
+
function count2(value) {
|
|
17363
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value >= 0 ? value : null;
|
|
17364
|
+
}
|
|
17365
|
+
function isClaudeModelRequest(model2) {
|
|
17366
|
+
return typeof model2 === "string" && model2.length > 0 && model2 !== SYNTHETIC_MODEL;
|
|
17367
|
+
}
|
|
17368
|
+
function claudeUsageRecord(requestId, model2, usage, extra = {}) {
|
|
17369
|
+
if (!isRecord2(usage))
|
|
17370
|
+
return { kind: "missing" };
|
|
17371
|
+
const input = count2(usage.input_tokens);
|
|
17372
|
+
const output = count2(usage.output_tokens);
|
|
17373
|
+
const cacheRead = count2(usage.cache_read_input_tokens ?? 0);
|
|
17374
|
+
const cacheWrite = count2(usage.cache_creation_input_tokens ?? 0);
|
|
17375
|
+
if (input === null || output === null || cacheRead === null || cacheWrite === null) {
|
|
17376
|
+
return { kind: "missing" };
|
|
17377
|
+
}
|
|
17378
|
+
const split = isRecord2(usage.cache_creation) ? usage.cache_creation : null;
|
|
17379
|
+
const oneHour = split ? count2(split.ephemeral_1h_input_tokens) : null;
|
|
17380
|
+
const details = isRecord2(usage.output_tokens_details) ? usage.output_tokens_details : null;
|
|
17381
|
+
const thinking = details ? count2(details.thinking_tokens) : null;
|
|
17382
|
+
const timed = extra.startedAtMs !== void 0 && extra.startedAtMs !== null && extra.completedAtMs !== void 0;
|
|
17383
|
+
try {
|
|
17384
|
+
return {
|
|
17385
|
+
kind: "request",
|
|
17386
|
+
request: parseHostUsageRequest({
|
|
17387
|
+
requestId,
|
|
17388
|
+
...extra.historical ? { historical: true } : {},
|
|
17389
|
+
model: model2,
|
|
17390
|
+
// Claude Code's providers (first-party, Bedrock, Vertex, gateways) differ in model IDs,
|
|
17391
|
+
// not in list prices; the model ID alone resolves the price.
|
|
17392
|
+
inputTokens: input + cacheRead + cacheWrite,
|
|
17393
|
+
cachedInputTokens: cacheRead,
|
|
17394
|
+
cacheWriteInputTokens: cacheWrite,
|
|
17395
|
+
// Mirrors Claude Code's own pricing: one-hour writes are capped by the total writes.
|
|
17396
|
+
...oneHour !== null ? { cacheWrite1hInputTokens: Math.min(oneHour, cacheWrite) } : {},
|
|
17397
|
+
outputTokens: output,
|
|
17398
|
+
...thinking !== null && thinking <= output ? { reasoningOutputTokens: thinking } : {},
|
|
17399
|
+
...timed ? { startedAtMs: extra.startedAtMs, completedAtMs: extra.completedAtMs } : {}
|
|
17400
|
+
})
|
|
17401
|
+
};
|
|
17402
|
+
} catch {
|
|
17403
|
+
return { kind: "missing" };
|
|
17404
|
+
}
|
|
17405
|
+
}
|
|
17406
|
+
function claudeUsageHistory(entries) {
|
|
17407
|
+
const usages = /* @__PURE__ */ new Map();
|
|
17408
|
+
let complete = true;
|
|
17409
|
+
for (const entry of entries) {
|
|
17410
|
+
if (!isRecord2(entry) || entry.type !== "assistant" || entry.isSidechain === true)
|
|
17411
|
+
continue;
|
|
17412
|
+
const message = entry.message;
|
|
17413
|
+
if (!isRecord2(message) || !isClaudeModelRequest(message.model))
|
|
17414
|
+
continue;
|
|
17415
|
+
if (typeof message.id !== "string" || message.id.length === 0) {
|
|
17416
|
+
complete = false;
|
|
17417
|
+
continue;
|
|
17418
|
+
}
|
|
17419
|
+
usages.set(message.id, { model: message.model, usage: message.usage });
|
|
17420
|
+
}
|
|
17421
|
+
const requests = [];
|
|
17422
|
+
for (const [id, { model: model2, usage }] of usages) {
|
|
17423
|
+
const record2 = claudeUsageRecord(id, model2, usage, { historical: true });
|
|
17424
|
+
if (record2.kind === "request")
|
|
17425
|
+
requests.push(record2.request);
|
|
17426
|
+
else
|
|
17427
|
+
complete = false;
|
|
17428
|
+
}
|
|
17429
|
+
return { requests, complete };
|
|
17430
|
+
}
|
|
17431
|
+
|
|
17432
|
+
// dist/claude-usage-statistics.js
|
|
17433
|
+
import os2 from "node:os";
|
|
17434
|
+
import path3 from "node:path";
|
|
17435
|
+
|
|
17436
|
+
// ../../harness-adapter/dist/usage-statistics.js
|
|
17437
|
+
import { createReadStream } from "node:fs";
|
|
17438
|
+
import { lstat as lstat2, opendir } from "node:fs/promises";
|
|
17439
|
+
import path2 from "node:path";
|
|
17440
|
+
import { createInterface } from "node:readline";
|
|
17441
|
+
var MAX_SESSION_ID_LENGTH = 512;
|
|
17442
|
+
var MAX_CWD_LENGTH = 4096;
|
|
17443
|
+
function sessionIdOk(value) {
|
|
17444
|
+
return typeof value === "string" && value.length > 0 && value.length <= MAX_SESSION_ID_LENGTH;
|
|
17445
|
+
}
|
|
17446
|
+
function cwdOk(value) {
|
|
17447
|
+
return typeof value === "string" && value.length > 0 && value.length <= MAX_CWD_LENGTH && !value.includes("\0") && (value.startsWith("/") || /^[A-Za-z]:[\\/]/u.test(value) || value.startsWith("\\\\"));
|
|
17448
|
+
}
|
|
17449
|
+
function withUsageSession(entry, session) {
|
|
17450
|
+
const sessionId = sessionIdOk(session.sessionId) ? session.sessionId : void 0;
|
|
17451
|
+
const cwd = cwdOk(session.cwd) ? session.cwd : void 0;
|
|
17452
|
+
if (sessionId === void 0 && cwd === void 0)
|
|
17453
|
+
return entry;
|
|
17454
|
+
return {
|
|
17455
|
+
...entry,
|
|
17456
|
+
...sessionId !== void 0 ? { sessionId } : {},
|
|
17457
|
+
...cwd !== void 0 ? { cwd } : {}
|
|
17458
|
+
};
|
|
17459
|
+
}
|
|
17460
|
+
function usageEntryFromRequest(request, occurredAtMs) {
|
|
17461
|
+
if (!Number.isSafeInteger(occurredAtMs) || occurredAtMs <= 0)
|
|
17462
|
+
return null;
|
|
17463
|
+
return {
|
|
17464
|
+
id: request.requestId,
|
|
17465
|
+
occurredAtMs,
|
|
17466
|
+
...request.model !== void 0 ? { model: request.model } : {},
|
|
17467
|
+
inputTokens: request.inputTokens,
|
|
17468
|
+
...request.cachedInputTokens !== void 0 ? { cachedInputTokens: request.cachedInputTokens } : {},
|
|
17469
|
+
...request.cacheWriteInputTokens !== void 0 ? { cacheWriteInputTokens: request.cacheWriteInputTokens } : {},
|
|
17470
|
+
...request.cacheWrite1hInputTokens !== void 0 ? { cacheWrite1hInputTokens: request.cacheWrite1hInputTokens } : {},
|
|
17471
|
+
outputTokens: request.outputTokens,
|
|
17472
|
+
...request.reasoningOutputTokens !== void 0 ? { reasoningOutputTokens: request.reasoningOutputTokens } : {}
|
|
17473
|
+
};
|
|
17474
|
+
}
|
|
17475
|
+
async function jsonlUsageSources(root, maxDepth, signal) {
|
|
17476
|
+
const sources = [];
|
|
17477
|
+
const visit = async (directory, depth) => {
|
|
17478
|
+
signal.throwIfAborted();
|
|
17479
|
+
const entries = await opendir(directory).catch((error52) => {
|
|
17480
|
+
if (error52.code === "ENOENT")
|
|
17481
|
+
return null;
|
|
17482
|
+
throw error52;
|
|
17483
|
+
});
|
|
17484
|
+
if (!entries)
|
|
17485
|
+
return;
|
|
17486
|
+
for await (const entry of entries) {
|
|
17487
|
+
signal.throwIfAborted();
|
|
17488
|
+
const file2 = path2.join(directory, entry.name);
|
|
17489
|
+
if (entry.isDirectory()) {
|
|
17490
|
+
if (depth < maxDepth)
|
|
17491
|
+
await visit(file2, depth + 1);
|
|
17492
|
+
} else if (entry.isFile() && entry.name.endsWith(".jsonl")) {
|
|
17493
|
+
const info = await lstat2(file2).catch(() => null);
|
|
17494
|
+
if (info?.isFile() && info.size > 0) {
|
|
17495
|
+
sources.push({ id: file2, fingerprint: `${info.ino}:${info.size}:${info.mtimeMs}` });
|
|
17496
|
+
}
|
|
17497
|
+
}
|
|
17498
|
+
}
|
|
17499
|
+
};
|
|
17500
|
+
await visit(root, 0);
|
|
17501
|
+
return sources;
|
|
17502
|
+
}
|
|
17503
|
+
async function* jsonlRecords(file2, marker, signal) {
|
|
17504
|
+
const lines = createInterface({
|
|
17505
|
+
input: createReadStream(file2, { encoding: "utf8", signal }),
|
|
17506
|
+
crlfDelay: Infinity
|
|
17507
|
+
});
|
|
17508
|
+
for await (const line of lines) {
|
|
17509
|
+
if (!line.includes(marker))
|
|
17510
|
+
continue;
|
|
17511
|
+
let value;
|
|
17512
|
+
try {
|
|
17513
|
+
value = JSON.parse(line);
|
|
17514
|
+
} catch {
|
|
17515
|
+
continue;
|
|
17516
|
+
}
|
|
17517
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
17518
|
+
yield value;
|
|
17519
|
+
}
|
|
17520
|
+
}
|
|
17521
|
+
}
|
|
17522
|
+
function nativeTimeMs(value) {
|
|
17523
|
+
const time3 = typeof value === "number" ? value : typeof value === "string" ? Date.parse(value) : Number.NaN;
|
|
17524
|
+
return Number.isFinite(time3) && time3 > 0 ? Math.floor(time3) : null;
|
|
17525
|
+
}
|
|
17526
|
+
|
|
17527
|
+
// dist/claude-usage-statistics.js
|
|
17528
|
+
function isRecord3(value) {
|
|
17529
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
17530
|
+
}
|
|
17531
|
+
function claudeProjectsDirectory(environment) {
|
|
17532
|
+
return path3.join(path3.resolve(environment.CLAUDE_CONFIG_DIR ?? path3.join(os2.homedir(), ".claude")), "projects");
|
|
17533
|
+
}
|
|
17534
|
+
async function readClaudeUsage(file2, signal) {
|
|
17535
|
+
const messages = /* @__PURE__ */ new Map();
|
|
17536
|
+
let sessionId;
|
|
17537
|
+
let cwd;
|
|
17538
|
+
for await (const line of jsonlRecords(file2, '"assistant"', signal)) {
|
|
17539
|
+
if (line.type !== "assistant" || !isRecord3(line.message))
|
|
17540
|
+
continue;
|
|
17541
|
+
sessionId ??= line.sessionId;
|
|
17542
|
+
cwd ??= line.cwd;
|
|
17543
|
+
const { id, model: model2, usage } = line.message;
|
|
17544
|
+
if (typeof id !== "string" || id.length === 0 || !isClaudeModelRequest(model2))
|
|
17545
|
+
continue;
|
|
17546
|
+
const at2 = messages.get(id)?.at ?? nativeTimeMs(line.timestamp);
|
|
17547
|
+
messages.set(id, { model: model2, usage, at: at2 });
|
|
17548
|
+
}
|
|
17549
|
+
const entries = [];
|
|
17550
|
+
for (const [id, { model: model2, usage, at: at2 }] of messages) {
|
|
17551
|
+
const record2 = claudeUsageRecord(id, model2, usage);
|
|
17552
|
+
const entry = record2.kind === "request" && at2 !== null && usageEntryFromRequest(record2.request, at2);
|
|
17553
|
+
if (entry)
|
|
17554
|
+
entries.push(withUsageSession(entry, { sessionId: text(sessionId), cwd: text(cwd) }));
|
|
17555
|
+
}
|
|
17556
|
+
return entries;
|
|
17557
|
+
}
|
|
17558
|
+
function text(value) {
|
|
17559
|
+
return typeof value === "string" ? value : void 0;
|
|
17560
|
+
}
|
|
17561
|
+
function createClaudeUsageStatistics(environment) {
|
|
17562
|
+
return Object.freeze({
|
|
17563
|
+
// projects/<project>/<id>.jsonl, <id>/subagents/*.jsonl, <id>/subagents/workflows/wf_*/*.jsonl
|
|
17564
|
+
listSources: (signal) => jsonlUsageSources(claudeProjectsDirectory(environment), 4, signal),
|
|
17565
|
+
readSource: (id, signal) => readClaudeUsage(id, signal)
|
|
17566
|
+
});
|
|
17567
|
+
}
|
|
17568
|
+
|
|
17044
17569
|
// dist/claude-code-adapter.js
|
|
17045
17570
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
17046
|
-
import
|
|
17571
|
+
import path16 from "node:path";
|
|
17047
17572
|
|
|
17048
17573
|
// ../../../node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs
|
|
17049
17574
|
import { createRequire as DW } from "node:module";
|
|
@@ -17635,6 +18160,12 @@ var E0 = v(function(Dot, Ore) {
|
|
|
17635
18160
|
Ore.exports = { "application/1d-interleaved-parityfec": { source: "iana" }, "application/3gpdash-qoe-report+xml": { source: "iana", charset: "UTF-8", compressible: true }, "application/3gpp-ims+xml": { source: "iana", compressible: true }, "application/3gpphal+json": { source: "iana", compressible: true }, "application/3gpphalforms+json": { source: "iana", compressible: true }, "application/a2l": { source: "iana" }, "application/ace+cbor": { source: "iana" }, "application/activemessage": { source: "iana" }, "application/activity+json": { source: "iana", compressible: true }, "application/alto-costmap+json": { source: "iana", compressible: true }, "application/alto-costmapfilter+json": { source: "iana", compressible: true }, "application/alto-directory+json": { source: "iana", compressible: true }, "application/alto-endpointcost+json": { source: "iana", compressible: true }, "application/alto-endpointcostparams+json": { source: "iana", compressible: true }, "application/alto-endpointprop+json": { source: "iana", compressible: true }, "application/alto-endpointpropparams+json": { source: "iana", compressible: true }, "application/alto-error+json": { source: "iana", compressible: true }, "application/alto-networkmap+json": { source: "iana", compressible: true }, "application/alto-networkmapfilter+json": { source: "iana", compressible: true }, "application/alto-updatestreamcontrol+json": { source: "iana", compressible: true }, "application/alto-updatestreamparams+json": { source: "iana", compressible: true }, "application/aml": { source: "iana" }, "application/andrew-inset": { source: "iana", extensions: ["ez"] }, "application/applefile": { source: "iana" }, "application/applixware": { source: "apache", extensions: ["aw"] }, "application/at+jwt": { source: "iana" }, "application/atf": { source: "iana" }, "application/atfx": { source: "iana" }, "application/atom+xml": { source: "iana", compressible: true, extensions: ["atom"] }, "application/atomcat+xml": { source: "iana", compressible: true, extensions: ["atomcat"] }, "application/atomdeleted+xml": { source: "iana", compressible: true, extensions: ["atomdeleted"] }, "application/atomicmail": { source: "iana" }, "application/atomsvc+xml": { source: "iana", compressible: true, extensions: ["atomsvc"] }, "application/atsc-dwd+xml": { source: "iana", compressible: true, extensions: ["dwd"] }, "application/atsc-dynamic-event-message": { source: "iana" }, "application/atsc-held+xml": { source: "iana", compressible: true, extensions: ["held"] }, "application/atsc-rdt+json": { source: "iana", compressible: true }, "application/atsc-rsat+xml": { source: "iana", compressible: true, extensions: ["rsat"] }, "application/atxml": { source: "iana" }, "application/auth-policy+xml": { source: "iana", compressible: true }, "application/bacnet-xdd+zip": { source: "iana", compressible: false }, "application/batch-smtp": { source: "iana" }, "application/bdoc": { compressible: false, extensions: ["bdoc"] }, "application/beep+xml": { source: "iana", charset: "UTF-8", compressible: true }, "application/calendar+json": { source: "iana", compressible: true }, "application/calendar+xml": { source: "iana", compressible: true, extensions: ["xcs"] }, "application/call-completion": { source: "iana" }, "application/cals-1840": { source: "iana" }, "application/captive+json": { source: "iana", compressible: true }, "application/cbor": { source: "iana" }, "application/cbor-seq": { source: "iana" }, "application/cccex": { source: "iana" }, "application/ccmp+xml": { source: "iana", compressible: true }, "application/ccxml+xml": { source: "iana", compressible: true, extensions: ["ccxml"] }, "application/cdfx+xml": { source: "iana", compressible: true, extensions: ["cdfx"] }, "application/cdmi-capability": { source: "iana", extensions: ["cdmia"] }, "application/cdmi-container": { source: "iana", extensions: ["cdmic"] }, "application/cdmi-domain": { source: "iana", extensions: ["cdmid"] }, "application/cdmi-object": { source: "iana", extensions: ["cdmio"] }, "application/cdmi-queue": { source: "iana", extensions: ["cdmiq"] }, "application/cdni": { source: "iana" }, "application/cea": { source: "iana" }, "application/cea-2018+xml": { source: "iana", compressible: true }, "application/cellml+xml": { source: "iana", compressible: true }, "application/cfw": { source: "iana" }, "application/city+json": { source: "iana", compressible: true }, "application/clr": { source: "iana" }, "application/clue+xml": { source: "iana", compressible: true }, "application/clue_info+xml": { source: "iana", compressible: true }, "application/cms": { source: "iana" }, "application/cnrp+xml": { source: "iana", compressible: true }, "application/coap-group+json": { source: "iana", compressible: true }, "application/coap-payload": { source: "iana" }, "application/commonground": { source: "iana" }, "application/conference-info+xml": { source: "iana", compressible: true }, "application/cose": { source: "iana" }, "application/cose-key": { source: "iana" }, "application/cose-key-set": { source: "iana" }, "application/cpl+xml": { source: "iana", compressible: true, extensions: ["cpl"] }, "application/csrattrs": { source: "iana" }, "application/csta+xml": { source: "iana", compressible: true }, "application/cstadata+xml": { source: "iana", compressible: true }, "application/csvm+json": { source: "iana", compressible: true }, "application/cu-seeme": { source: "apache", extensions: ["cu"] }, "application/cwt": { source: "iana" }, "application/cybercash": { source: "iana" }, "application/dart": { compressible: true }, "application/dash+xml": { source: "iana", compressible: true, extensions: ["mpd"] }, "application/dash-patch+xml": { source: "iana", compressible: true, extensions: ["mpp"] }, "application/dashdelta": { source: "iana" }, "application/davmount+xml": { source: "iana", compressible: true, extensions: ["davmount"] }, "application/dca-rft": { source: "iana" }, "application/dcd": { source: "iana" }, "application/dec-dx": { source: "iana" }, "application/dialog-info+xml": { source: "iana", compressible: true }, "application/dicom": { source: "iana" }, "application/dicom+json": { source: "iana", compressible: true }, "application/dicom+xml": { source: "iana", compressible: true }, "application/dii": { source: "iana" }, "application/dit": { source: "iana" }, "application/dns": { source: "iana" }, "application/dns+json": { source: "iana", compressible: true }, "application/dns-message": { source: "iana" }, "application/docbook+xml": { source: "apache", compressible: true, extensions: ["dbk"] }, "application/dots+cbor": { source: "iana" }, "application/dskpp+xml": { source: "iana", compressible: true }, "application/dssc+der": { source: "iana", extensions: ["dssc"] }, "application/dssc+xml": { source: "iana", compressible: true, extensions: ["xdssc"] }, "application/dvcs": { source: "iana" }, "application/ecmascript": { source: "iana", compressible: true, extensions: ["es", "ecma"] }, "application/edi-consent": { source: "iana" }, "application/edi-x12": { source: "iana", compressible: false }, "application/edifact": { source: "iana", compressible: false }, "application/efi": { source: "iana" }, "application/elm+json": { source: "iana", charset: "UTF-8", compressible: true }, "application/elm+xml": { source: "iana", compressible: true }, "application/emergencycalldata.cap+xml": { source: "iana", charset: "UTF-8", compressible: true }, "application/emergencycalldata.comment+xml": { source: "iana", compressible: true }, "application/emergencycalldata.control+xml": { source: "iana", compressible: true }, "application/emergencycalldata.deviceinfo+xml": { source: "iana", compressible: true }, "application/emergencycalldata.ecall.msd": { source: "iana" }, "application/emergencycalldata.providerinfo+xml": { source: "iana", compressible: true }, "application/emergencycalldata.serviceinfo+xml": { source: "iana", compressible: true }, "application/emergencycalldata.subscriberinfo+xml": { source: "iana", compressible: true }, "application/emergencycalldata.veds+xml": { source: "iana", compressible: true }, "application/emma+xml": { source: "iana", compressible: true, extensions: ["emma"] }, "application/emotionml+xml": { source: "iana", compressible: true, extensions: ["emotionml"] }, "application/encaprtp": { source: "iana" }, "application/epp+xml": { source: "iana", compressible: true }, "application/epub+zip": { source: "iana", compressible: false, extensions: ["epub"] }, "application/eshop": { source: "iana" }, "application/exi": { source: "iana", extensions: ["exi"] }, "application/expect-ct-report+json": { source: "iana", compressible: true }, "application/express": { source: "iana", extensions: ["exp"] }, "application/fastinfoset": { source: "iana" }, "application/fastsoap": { source: "iana" }, "application/fdt+xml": { source: "iana", compressible: true, extensions: ["fdt"] }, "application/fhir+json": { source: "iana", charset: "UTF-8", compressible: true }, "application/fhir+xml": { source: "iana", charset: "UTF-8", compressible: true }, "application/fido.trusted-apps+json": { compressible: true }, "application/fits": { source: "iana" }, "application/flexfec": { source: "iana" }, "application/font-sfnt": { source: "iana" }, "application/font-tdpfr": { source: "iana", extensions: ["pfr"] }, "application/font-woff": { source: "iana", compressible: false }, "application/framework-attributes+xml": { source: "iana", compressible: true }, "application/geo+json": { source: "iana", compressible: true, extensions: ["geojson"] }, "application/geo+json-seq": { source: "iana" }, "application/geopackage+sqlite3": { source: "iana" }, "application/geoxacml+xml": { source: "iana", compressible: true }, "application/gltf-buffer": { source: "iana" }, "application/gml+xml": { source: "iana", compressible: true, extensions: ["gml"] }, "application/gpx+xml": { source: "apache", compressible: true, extensions: ["gpx"] }, "application/gxf": { source: "apache", extensions: ["gxf"] }, "application/gzip": { source: "iana", compressible: false, extensions: ["gz"] }, "application/h224": { source: "iana" }, "application/held+xml": { source: "iana", compressible: true }, "application/hjson": { extensions: ["hjson"] }, "application/http": { source: "iana" }, "application/hyperstudio": { source: "iana", extensions: ["stk"] }, "application/ibe-key-request+xml": { source: "iana", compressible: true }, "application/ibe-pkg-reply+xml": { source: "iana", compressible: true }, "application/ibe-pp-data": { source: "iana" }, "application/iges": { source: "iana" }, "application/im-iscomposing+xml": { source: "iana", charset: "UTF-8", compressible: true }, "application/index": { source: "iana" }, "application/index.cmd": { source: "iana" }, "application/index.obj": { source: "iana" }, "application/index.response": { source: "iana" }, "application/index.vnd": { source: "iana" }, "application/inkml+xml": { source: "iana", compressible: true, extensions: ["ink", "inkml"] }, "application/iotp": { source: "iana" }, "application/ipfix": { source: "iana", extensions: ["ipfix"] }, "application/ipp": { source: "iana" }, "application/isup": { source: "iana" }, "application/its+xml": { source: "iana", compressible: true, extensions: ["its"] }, "application/java-archive": { source: "apache", compressible: false, extensions: ["jar", "war", "ear"] }, "application/java-serialized-object": { source: "apache", compressible: false, extensions: ["ser"] }, "application/java-vm": { source: "apache", compressible: false, extensions: ["class"] }, "application/javascript": { source: "iana", charset: "UTF-8", compressible: true, extensions: ["js", "mjs"] }, "application/jf2feed+json": { source: "iana", compressible: true }, "application/jose": { source: "iana" }, "application/jose+json": { source: "iana", compressible: true }, "application/jrd+json": { source: "iana", compressible: true }, "application/jscalendar+json": { source: "iana", compressible: true }, "application/json": { source: "iana", charset: "UTF-8", compressible: true, extensions: ["json", "map"] }, "application/json-patch+json": { source: "iana", compressible: true }, "application/json-seq": { source: "iana" }, "application/json5": { extensions: ["json5"] }, "application/jsonml+json": { source: "apache", compressible: true, extensions: ["jsonml"] }, "application/jwk+json": { source: "iana", compressible: true }, "application/jwk-set+json": { source: "iana", compressible: true }, "application/jwt": { source: "iana" }, "application/kpml-request+xml": { source: "iana", compressible: true }, "application/kpml-response+xml": { source: "iana", compressible: true }, "application/ld+json": { source: "iana", compressible: true, extensions: ["jsonld"] }, "application/lgr+xml": { source: "iana", compressible: true, extensions: ["lgr"] }, "application/link-format": { source: "iana" }, "application/load-control+xml": { source: "iana", compressible: true }, "application/lost+xml": { source: "iana", compressible: true, extensions: ["lostxml"] }, "application/lostsync+xml": { source: "iana", compressible: true }, "application/lpf+zip": { source: "iana", compressible: false }, "application/lxf": { source: "iana" }, "application/mac-binhex40": { source: "iana", extensions: ["hqx"] }, "application/mac-compactpro": { source: "apache", extensions: ["cpt"] }, "application/macwriteii": { source: "iana" }, "application/mads+xml": { source: "iana", compressible: true, extensions: ["mads"] }, "application/manifest+json": { source: "iana", charset: "UTF-8", compressible: true, extensions: ["webmanifest"] }, "application/marc": { source: "iana", extensions: ["mrc"] }, "application/marcxml+xml": { source: "iana", compressible: true, extensions: ["mrcx"] }, "application/mathematica": { source: "iana", extensions: ["ma", "nb", "mb"] }, "application/mathml+xml": { source: "iana", compressible: true, extensions: ["mathml"] }, "application/mathml-content+xml": { source: "iana", compressible: true }, "application/mathml-presentation+xml": { source: "iana", compressible: true }, "application/mbms-associated-procedure-description+xml": { source: "iana", compressible: true }, "application/mbms-deregister+xml": { source: "iana", compressible: true }, "application/mbms-envelope+xml": { source: "iana", compressible: true }, "application/mbms-msk+xml": { source: "iana", compressible: true }, "application/mbms-msk-response+xml": { source: "iana", compressible: true }, "application/mbms-protection-description+xml": { source: "iana", compressible: true }, "application/mbms-reception-report+xml": { source: "iana", compressible: true }, "application/mbms-register+xml": { source: "iana", compressible: true }, "application/mbms-register-response+xml": { source: "iana", compressible: true }, "application/mbms-schedule+xml": { source: "iana", compressible: true }, "application/mbms-user-service-description+xml": { source: "iana", compressible: true }, "application/mbox": { source: "iana", extensions: ["mbox"] }, "application/media-policy-dataset+xml": { source: "iana", compressible: true, extensions: ["mpf"] }, "application/media_control+xml": { source: "iana", compressible: true }, "application/mediaservercontrol+xml": { source: "iana", compressible: true, extensions: ["mscml"] }, "application/merge-patch+json": { source: "iana", compressible: true }, "application/metalink+xml": { source: "apache", compressible: true, extensions: ["metalink"] }, "application/metalink4+xml": { source: "iana", compressible: true, extensions: ["meta4"] }, "application/mets+xml": { source: "iana", compressible: true, extensions: ["mets"] }, "application/mf4": { source: "iana" }, "application/mikey": { source: "iana" }, "application/mipc": { source: "iana" }, "application/missing-blocks+cbor-seq": { source: "iana" }, "application/mmt-aei+xml": { source: "iana", compressible: true, extensions: ["maei"] }, "application/mmt-usd+xml": { source: "iana", compressible: true, extensions: ["musd"] }, "application/mods+xml": { source: "iana", compressible: true, extensions: ["mods"] }, "application/moss-keys": { source: "iana" }, "application/moss-signature": { source: "iana" }, "application/mosskey-data": { source: "iana" }, "application/mosskey-request": { source: "iana" }, "application/mp21": { source: "iana", extensions: ["m21", "mp21"] }, "application/mp4": { source: "iana", extensions: ["mp4s", "m4p"] }, "application/mpeg4-generic": { source: "iana" }, "application/mpeg4-iod": { source: "iana" }, "application/mpeg4-iod-xmt": { source: "iana" }, "application/mrb-consumer+xml": { source: "iana", compressible: true }, "application/mrb-publish+xml": { source: "iana", compressible: true }, "application/msc-ivr+xml": { source: "iana", charset: "UTF-8", compressible: true }, "application/msc-mixer+xml": { source: "iana", charset: "UTF-8", compressible: true }, "application/msword": { source: "iana", compressible: false, extensions: ["doc", "dot"] }, "application/mud+json": { source: "iana", compressible: true }, "application/multipart-core": { source: "iana" }, "application/mxf": { source: "iana", extensions: ["mxf"] }, "application/n-quads": { source: "iana", extensions: ["nq"] }, "application/n-triples": { source: "iana", extensions: ["nt"] }, "application/nasdata": { source: "iana" }, "application/news-checkgroups": { source: "iana", charset: "US-ASCII" }, "application/news-groupinfo": { source: "iana", charset: "US-ASCII" }, "application/news-transmission": { source: "iana" }, "application/nlsml+xml": { source: "iana", compressible: true }, "application/node": { source: "iana", extensions: ["cjs"] }, "application/nss": { source: "iana" }, "application/oauth-authz-req+jwt": { source: "iana" }, "application/oblivious-dns-message": { source: "iana" }, "application/ocsp-request": { source: "iana" }, "application/ocsp-response": { source: "iana" }, "application/octet-stream": { source: "iana", compressible: false, extensions: ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"] }, "application/oda": { source: "iana", extensions: ["oda"] }, "application/odm+xml": { source: "iana", compressible: true }, "application/odx": { source: "iana" }, "application/oebps-package+xml": { source: "iana", compressible: true, extensions: ["opf"] }, "application/ogg": { source: "iana", compressible: false, extensions: ["ogx"] }, "application/omdoc+xml": { source: "apache", compressible: true, extensions: ["omdoc"] }, "application/onenote": { source: "apache", extensions: ["onetoc", "onetoc2", "onetmp", "onepkg"] }, "application/opc-nodeset+xml": { source: "iana", compressible: true }, "application/oscore": { source: "iana" }, "application/oxps": { source: "iana", extensions: ["oxps"] }, "application/p21": { source: "iana" }, "application/p21+zip": { source: "iana", compressible: false }, "application/p2p-overlay+xml": { source: "iana", compressible: true, extensions: ["relo"] }, "application/parityfec": { source: "iana" }, "application/passport": { source: "iana" }, "application/patch-ops-error+xml": { source: "iana", compressible: true, extensions: ["xer"] }, "application/pdf": { source: "iana", compressible: false, extensions: ["pdf"] }, "application/pdx": { source: "iana" }, "application/pem-certificate-chain": { source: "iana" }, "application/pgp-encrypted": { source: "iana", compressible: false, extensions: ["pgp"] }, "application/pgp-keys": { source: "iana", extensions: ["asc"] }, "application/pgp-signature": { source: "iana", extensions: ["asc", "sig"] }, "application/pics-rules": { source: "apache", extensions: ["prf"] }, "application/pidf+xml": { source: "iana", charset: "UTF-8", compressible: true }, "application/pidf-diff+xml": { source: "iana", charset: "UTF-8", compressible: true }, "application/pkcs10": { source: "iana", extensions: ["p10"] }, "application/pkcs12": { source: "iana" }, "application/pkcs7-mime": { source: "iana", extensions: ["p7m", "p7c"] }, "application/pkcs7-signature": { source: "iana", extensions: ["p7s"] }, "application/pkcs8": { source: "iana", extensions: ["p8"] }, "application/pkcs8-encrypted": { source: "iana" }, "application/pkix-attr-cert": { source: "iana", extensions: ["ac"] }, "application/pkix-cert": { source: "iana", extensions: ["cer"] }, "application/pkix-crl": { source: "iana", extensions: ["crl"] }, "application/pkix-pkipath": { source: "iana", extensions: ["pkipath"] }, "application/pkixcmp": { source: "iana", extensions: ["pki"] }, "application/pls+xml": { source: "iana", compressible: true, extensions: ["pls"] }, "application/poc-settings+xml": { source: "iana", charset: "UTF-8", compressible: true }, "application/postscript": { source: "iana", compressible: true, extensions: ["ai", "eps", "ps"] }, "application/ppsp-tracker+json": { source: "iana", compressible: true }, "application/problem+json": { source: "iana", compressible: true }, "application/problem+xml": { source: "iana", compressible: true }, "application/provenance+xml": { source: "iana", compressible: true, extensions: ["provx"] }, "application/prs.alvestrand.titrax-sheet": { source: "iana" }, "application/prs.cww": { source: "iana", extensions: ["cww"] }, "application/prs.cyn": { source: "iana", charset: "7-BIT" }, "application/prs.hpub+zip": { source: "iana", compressible: false }, "application/prs.nprend": { source: "iana" }, "application/prs.plucker": { source: "iana" }, "application/prs.rdf-xml-crypt": { source: "iana" }, "application/prs.xsf+xml": { source: "iana", compressible: true }, "application/pskc+xml": { source: "iana", compressible: true, extensions: ["pskcxml"] }, "application/pvd+json": { source: "iana", compressible: true }, "application/qsig": { source: "iana" }, "application/raml+yaml": { compressible: true, extensions: ["raml"] }, "application/raptorfec": { source: "iana" }, "application/rdap+json": { source: "iana", compressible: true }, "application/rdf+xml": { source: "iana", compressible: true, extensions: ["rdf", "owl"] }, "application/reginfo+xml": { source: "iana", compressible: true, extensions: ["rif"] }, "application/relax-ng-compact-syntax": { source: "iana", extensions: ["rnc"] }, "application/remote-printing": { source: "iana" }, "application/reputon+json": { source: "iana", compressible: true }, "application/resource-lists+xml": { source: "iana", compressible: true, extensions: ["rl"] }, "application/resource-lists-diff+xml": { source: "iana", compressible: true, extensions: ["rld"] }, "application/rfc+xml": { source: "iana", compressible: true }, "application/riscos": { source: "iana" }, "application/rlmi+xml": { source: "iana", compressible: true }, "application/rls-services+xml": { source: "iana", compressible: true, extensions: ["rs"] }, "application/route-apd+xml": { source: "iana", compressible: true, extensions: ["rapd"] }, "application/route-s-tsid+xml": { source: "iana", compressible: true, extensions: ["sls"] }, "application/route-usd+xml": { source: "iana", compressible: true, extensions: ["rusd"] }, "application/rpki-ghostbusters": { source: "iana", extensions: ["gbr"] }, "application/rpki-manifest": { source: "iana", extensions: ["mft"] }, "application/rpki-publication": { source: "iana" }, "application/rpki-roa": { source: "iana", extensions: ["roa"] }, "application/rpki-updown": { source: "iana" }, "application/rsd+xml": { source: "apache", compressible: true, extensions: ["rsd"] }, "application/rss+xml": { source: "apache", compressible: true, extensions: ["rss"] }, "application/rtf": { source: "iana", compressible: true, extensions: ["rtf"] }, "application/rtploopback": { source: "iana" }, "application/rtx": { source: "iana" }, "application/samlassertion+xml": { source: "iana", compressible: true }, "application/samlmetadata+xml": { source: "iana", compressible: true }, "application/sarif+json": { source: "iana", compressible: true }, "application/sarif-external-properties+json": { source: "iana", compressible: true }, "application/sbe": { source: "iana" }, "application/sbml+xml": { source: "iana", compressible: true, extensions: ["sbml"] }, "application/scaip+xml": { source: "iana", compressible: true }, "application/scim+json": { source: "iana", compressible: true }, "application/scvp-cv-request": { source: "iana", extensions: ["scq"] }, "application/scvp-cv-response": { source: "iana", extensions: ["scs"] }, "application/scvp-vp-request": { source: "iana", extensions: ["spq"] }, "application/scvp-vp-response": { source: "iana", extensions: ["spp"] }, "application/sdp": { source: "iana", extensions: ["sdp"] }, "application/secevent+jwt": { source: "iana" }, "application/senml+cbor": { source: "iana" }, "application/senml+json": { source: "iana", compressible: true }, "application/senml+xml": { source: "iana", compressible: true, extensions: ["senmlx"] }, "application/senml-etch+cbor": { source: "iana" }, "application/senml-etch+json": { source: "iana", compressible: true }, "application/senml-exi": { source: "iana" }, "application/sensml+cbor": { source: "iana" }, "application/sensml+json": { source: "iana", compressible: true }, "application/sensml+xml": { source: "iana", compressible: true, extensions: ["sensmlx"] }, "application/sensml-exi": { source: "iana" }, "application/sep+xml": { source: "iana", compressible: true }, "application/sep-exi": { source: "iana" }, "application/session-info": { source: "iana" }, "application/set-payment": { source: "iana" }, "application/set-payment-initiation": { source: "iana", extensions: ["setpay"] }, "application/set-registration": { source: "iana" }, "application/set-registration-initiation": { source: "iana", extensions: ["setreg"] }, "application/sgml": { source: "iana" }, "application/sgml-open-catalog": { source: "iana" }, "application/shf+xml": { source: "iana", compressible: true, extensions: ["shf"] }, "application/sieve": { source: "iana", extensions: ["siv", "sieve"] }, "application/simple-filter+xml": { source: "iana", compressible: true }, "application/simple-message-summary": { source: "iana" }, "application/simplesymbolcontainer": { source: "iana" }, "application/sipc": { source: "iana" }, "application/slate": { source: "iana" }, "application/smil": { source: "iana" }, "application/smil+xml": { source: "iana", compressible: true, extensions: ["smi", "smil"] }, "application/smpte336m": { source: "iana" }, "application/soap+fastinfoset": { source: "iana" }, "application/soap+xml": { source: "iana", compressible: true }, "application/sparql-query": { source: "iana", extensions: ["rq"] }, "application/sparql-results+xml": { source: "iana", compressible: true, extensions: ["srx"] }, "application/spdx+json": { source: "iana", compressible: true }, "application/spirits-event+xml": { source: "iana", compressible: true }, "application/sql": { source: "iana" }, "application/srgs": { source: "iana", extensions: ["gram"] }, "application/srgs+xml": { source: "iana", compressible: true, extensions: ["grxml"] }, "application/sru+xml": { source: "iana", compressible: true, extensions: ["sru"] }, "application/ssdl+xml": { source: "apache", compressible: true, extensions: ["ssdl"] }, "application/ssml+xml": { source: "iana", compressible: true, extensions: ["ssml"] }, "application/stix+json": { source: "iana", compressible: true }, "application/swid+xml": { source: "iana", compressible: true, extensions: ["swidtag"] }, "application/tamp-apex-update": { source: "iana" }, "application/tamp-apex-update-confirm": { source: "iana" }, "application/tamp-community-update": { source: "iana" }, "application/tamp-community-update-confirm": { source: "iana" }, "application/tamp-error": { source: "iana" }, "application/tamp-sequence-adjust": { source: "iana" }, "application/tamp-sequence-adjust-confirm": { source: "iana" }, "application/tamp-status-query": { source: "iana" }, "application/tamp-status-response": { source: "iana" }, "application/tamp-update": { source: "iana" }, "application/tamp-update-confirm": { source: "iana" }, "application/tar": { compressible: true }, "application/taxii+json": { source: "iana", compressible: true }, "application/td+json": { source: "iana", compressible: true }, "application/tei+xml": { source: "iana", compressible: true, extensions: ["tei", "teicorpus"] }, "application/tetra_isi": { source: "iana" }, "application/thraud+xml": { source: "iana", compressible: true, extensions: ["tfi"] }, "application/timestamp-query": { source: "iana" }, "application/timestamp-reply": { source: "iana" }, "application/timestamped-data": { source: "iana", extensions: ["tsd"] }, "application/tlsrpt+gzip": { source: "iana" }, "application/tlsrpt+json": { source: "iana", compressible: true }, "application/tnauthlist": { source: "iana" }, "application/token-introspection+jwt": { source: "iana" }, "application/toml": { compressible: true, extensions: ["toml"] }, "application/trickle-ice-sdpfrag": { source: "iana" }, "application/trig": { source: "iana", extensions: ["trig"] }, "application/ttml+xml": { source: "iana", compressible: true, extensions: ["ttml"] }, "application/tve-trigger": { source: "iana" }, "application/tzif": { source: "iana" }, "application/tzif-leap": { source: "iana" }, "application/ubjson": { compressible: false, extensions: ["ubj"] }, "application/ulpfec": { source: "iana" }, "application/urc-grpsheet+xml": { source: "iana", compressible: true }, "application/urc-ressheet+xml": { source: "iana", compressible: true, extensions: ["rsheet"] }, "application/urc-targetdesc+xml": { source: "iana", compressible: true, extensions: ["td"] }, "application/urc-uisocketdesc+xml": { source: "iana", compressible: true }, "application/vcard+json": { source: "iana", compressible: true }, "application/vcard+xml": { source: "iana", compressible: true }, "application/vemmi": { source: "iana" }, "application/vividence.scriptfile": { source: "apache" }, "application/vnd.1000minds.decision-model+xml": { source: "iana", compressible: true, extensions: ["1km"] }, "application/vnd.3gpp-prose+xml": { source: "iana", compressible: true }, "application/vnd.3gpp-prose-pc3ch+xml": { source: "iana", compressible: true }, "application/vnd.3gpp-v2x-local-service-information": { source: "iana" }, "application/vnd.3gpp.5gnas": { source: "iana" }, "application/vnd.3gpp.access-transfer-events+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.bsf+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.gmop+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.gtpc": { source: "iana" }, "application/vnd.3gpp.interworking-data": { source: "iana" }, "application/vnd.3gpp.lpp": { source: "iana" }, "application/vnd.3gpp.mc-signalling-ear": { source: "iana" }, "application/vnd.3gpp.mcdata-affiliation-command+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcdata-info+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcdata-payload": { source: "iana" }, "application/vnd.3gpp.mcdata-service-config+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcdata-signalling": { source: "iana" }, "application/vnd.3gpp.mcdata-ue-config+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcdata-user-profile+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcptt-affiliation-command+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcptt-floor-request+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcptt-info+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcptt-location-info+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcptt-service-config+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcptt-signed+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcptt-ue-config+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcptt-ue-init-config+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcptt-user-profile+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcvideo-affiliation-command+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcvideo-affiliation-info+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcvideo-info+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcvideo-location-info+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcvideo-service-config+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcvideo-transmission-request+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcvideo-ue-config+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mcvideo-user-profile+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.mid-call+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.ngap": { source: "iana" }, "application/vnd.3gpp.pfcp": { source: "iana" }, "application/vnd.3gpp.pic-bw-large": { source: "iana", extensions: ["plb"] }, "application/vnd.3gpp.pic-bw-small": { source: "iana", extensions: ["psb"] }, "application/vnd.3gpp.pic-bw-var": { source: "iana", extensions: ["pvb"] }, "application/vnd.3gpp.s1ap": { source: "iana" }, "application/vnd.3gpp.sms": { source: "iana" }, "application/vnd.3gpp.sms+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.srvcc-ext+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.srvcc-info+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.state-and-event-info+xml": { source: "iana", compressible: true }, "application/vnd.3gpp.ussd+xml": { source: "iana", compressible: true }, "application/vnd.3gpp2.bcmcsinfo+xml": { source: "iana", compressible: true }, "application/vnd.3gpp2.sms": { source: "iana" }, "application/vnd.3gpp2.tcap": { source: "iana", extensions: ["tcap"] }, "application/vnd.3lightssoftware.imagescal": { source: "iana" }, "application/vnd.3m.post-it-notes": { source: "iana", extensions: ["pwn"] }, "application/vnd.accpac.simply.aso": { source: "iana", extensions: ["aso"] }, "application/vnd.accpac.simply.imp": { source: "iana", extensions: ["imp"] }, "application/vnd.acucobol": { source: "iana", extensions: ["acu"] }, "application/vnd.acucorp": { source: "iana", extensions: ["atc", "acutc"] }, "application/vnd.adobe.air-application-installer-package+zip": { source: "apache", compressible: false, extensions: ["air"] }, "application/vnd.adobe.flash.movie": { source: "iana" }, "application/vnd.adobe.formscentral.fcdt": { source: "iana", extensions: ["fcdt"] }, "application/vnd.adobe.fxp": { source: "iana", extensions: ["fxp", "fxpl"] }, "application/vnd.adobe.partial-upload": { source: "iana" }, "application/vnd.adobe.xdp+xml": { source: "iana", compressible: true, extensions: ["xdp"] }, "application/vnd.adobe.xfdf": { source: "iana", extensions: ["xfdf"] }, "application/vnd.aether.imp": { source: "iana" }, "application/vnd.afpc.afplinedata": { source: "iana" }, "application/vnd.afpc.afplinedata-pagedef": { source: "iana" }, "application/vnd.afpc.cmoca-cmresource": { source: "iana" }, "application/vnd.afpc.foca-charset": { source: "iana" }, "application/vnd.afpc.foca-codedfont": { source: "iana" }, "application/vnd.afpc.foca-codepage": { source: "iana" }, "application/vnd.afpc.modca": { source: "iana" }, "application/vnd.afpc.modca-cmtable": { source: "iana" }, "application/vnd.afpc.modca-formdef": { source: "iana" }, "application/vnd.afpc.modca-mediummap": { source: "iana" }, "application/vnd.afpc.modca-objectcontainer": { source: "iana" }, "application/vnd.afpc.modca-overlay": { source: "iana" }, "application/vnd.afpc.modca-pagesegment": { source: "iana" }, "application/vnd.age": { source: "iana", extensions: ["age"] }, "application/vnd.ah-barcode": { source: "iana" }, "application/vnd.ahead.space": { source: "iana", extensions: ["ahead"] }, "application/vnd.airzip.filesecure.azf": { source: "iana", extensions: ["azf"] }, "application/vnd.airzip.filesecure.azs": { source: "iana", extensions: ["azs"] }, "application/vnd.amadeus+json": { source: "iana", compressible: true }, "application/vnd.amazon.ebook": { source: "apache", extensions: ["azw"] }, "application/vnd.amazon.mobi8-ebook": { source: "iana" }, "application/vnd.americandynamics.acc": { source: "iana", extensions: ["acc"] }, "application/vnd.amiga.ami": { source: "iana", extensions: ["ami"] }, "application/vnd.amundsen.maze+xml": { source: "iana", compressible: true }, "application/vnd.android.ota": { source: "iana" }, "application/vnd.android.package-archive": { source: "apache", compressible: false, extensions: ["apk"] }, "application/vnd.anki": { source: "iana" }, "application/vnd.anser-web-certificate-issue-initiation": { source: "iana", extensions: ["cii"] }, "application/vnd.anser-web-funds-transfer-initiation": { source: "apache", extensions: ["fti"] }, "application/vnd.antix.game-component": { source: "iana", extensions: ["atx"] }, "application/vnd.apache.arrow.file": { source: "iana" }, "application/vnd.apache.arrow.stream": { source: "iana" }, "application/vnd.apache.thrift.binary": { source: "iana" }, "application/vnd.apache.thrift.compact": { source: "iana" }, "application/vnd.apache.thrift.json": { source: "iana" }, "application/vnd.api+json": { source: "iana", compressible: true }, "application/vnd.aplextor.warrp+json": { source: "iana", compressible: true }, "application/vnd.apothekende.reservation+json": { source: "iana", compressible: true }, "application/vnd.apple.installer+xml": { source: "iana", compressible: true, extensions: ["mpkg"] }, "application/vnd.apple.keynote": { source: "iana", extensions: ["key"] }, "application/vnd.apple.mpegurl": { source: "iana", extensions: ["m3u8"] }, "application/vnd.apple.numbers": { source: "iana", extensions: ["numbers"] }, "application/vnd.apple.pages": { source: "iana", extensions: ["pages"] }, "application/vnd.apple.pkpass": { compressible: false, extensions: ["pkpass"] }, "application/vnd.arastra.swi": { source: "iana" }, "application/vnd.aristanetworks.swi": { source: "iana", extensions: ["swi"] }, "application/vnd.artisan+json": { source: "iana", compressible: true }, "application/vnd.artsquare": { source: "iana" }, "application/vnd.astraea-software.iota": { source: "iana", extensions: ["iota"] }, "application/vnd.audiograph": { source: "iana", extensions: ["aep"] }, "application/vnd.autopackage": { source: "iana" }, "application/vnd.avalon+json": { source: "iana", compressible: true }, "application/vnd.avistar+xml": { source: "iana", compressible: true }, "application/vnd.balsamiq.bmml+xml": { source: "iana", compressible: true, extensions: ["bmml"] }, "application/vnd.balsamiq.bmpr": { source: "iana" }, "application/vnd.banana-accounting": { source: "iana" }, "application/vnd.bbf.usp.error": { source: "iana" }, "application/vnd.bbf.usp.msg": { source: "iana" }, "application/vnd.bbf.usp.msg+json": { source: "iana", compressible: true }, "application/vnd.bekitzur-stech+json": { source: "iana", compressible: true }, "application/vnd.bint.med-content": { source: "iana" }, "application/vnd.biopax.rdf+xml": { source: "iana", compressible: true }, "application/vnd.blink-idb-value-wrapper": { source: "iana" }, "application/vnd.blueice.multipass": { source: "iana", extensions: ["mpm"] }, "application/vnd.bluetooth.ep.oob": { source: "iana" }, "application/vnd.bluetooth.le.oob": { source: "iana" }, "application/vnd.bmi": { source: "iana", extensions: ["bmi"] }, "application/vnd.bpf": { source: "iana" }, "application/vnd.bpf3": { source: "iana" }, "application/vnd.businessobjects": { source: "iana", extensions: ["rep"] }, "application/vnd.byu.uapi+json": { source: "iana", compressible: true }, "application/vnd.cab-jscript": { source: "iana" }, "application/vnd.canon-cpdl": { source: "iana" }, "application/vnd.canon-lips": { source: "iana" }, "application/vnd.capasystems-pg+json": { source: "iana", compressible: true }, "application/vnd.cendio.thinlinc.clientconf": { source: "iana" }, "application/vnd.century-systems.tcp_stream": { source: "iana" }, "application/vnd.chemdraw+xml": { source: "iana", compressible: true, extensions: ["cdxml"] }, "application/vnd.chess-pgn": { source: "iana" }, "application/vnd.chipnuts.karaoke-mmd": { source: "iana", extensions: ["mmd"] }, "application/vnd.ciedi": { source: "iana" }, "application/vnd.cinderella": { source: "iana", extensions: ["cdy"] }, "application/vnd.cirpack.isdn-ext": { source: "iana" }, "application/vnd.citationstyles.style+xml": { source: "iana", compressible: true, extensions: ["csl"] }, "application/vnd.claymore": { source: "iana", extensions: ["cla"] }, "application/vnd.cloanto.rp9": { source: "iana", extensions: ["rp9"] }, "application/vnd.clonk.c4group": { source: "iana", extensions: ["c4g", "c4d", "c4f", "c4p", "c4u"] }, "application/vnd.cluetrust.cartomobile-config": { source: "iana", extensions: ["c11amc"] }, "application/vnd.cluetrust.cartomobile-config-pkg": { source: "iana", extensions: ["c11amz"] }, "application/vnd.coffeescript": { source: "iana" }, "application/vnd.collabio.xodocuments.document": { source: "iana" }, "application/vnd.collabio.xodocuments.document-template": { source: "iana" }, "application/vnd.collabio.xodocuments.presentation": { source: "iana" }, "application/vnd.collabio.xodocuments.presentation-template": { source: "iana" }, "application/vnd.collabio.xodocuments.spreadsheet": { source: "iana" }, "application/vnd.collabio.xodocuments.spreadsheet-template": { source: "iana" }, "application/vnd.collection+json": { source: "iana", compressible: true }, "application/vnd.collection.doc+json": { source: "iana", compressible: true }, "application/vnd.collection.next+json": { source: "iana", compressible: true }, "application/vnd.comicbook+zip": { source: "iana", compressible: false }, "application/vnd.comicbook-rar": { source: "iana" }, "application/vnd.commerce-battelle": { source: "iana" }, "application/vnd.commonspace": { source: "iana", extensions: ["csp"] }, "application/vnd.contact.cmsg": { source: "iana", extensions: ["cdbcmsg"] }, "application/vnd.coreos.ignition+json": { source: "iana", compressible: true }, "application/vnd.cosmocaller": { source: "iana", extensions: ["cmc"] }, "application/vnd.crick.clicker": { source: "iana", extensions: ["clkx"] }, "application/vnd.crick.clicker.keyboard": { source: "iana", extensions: ["clkk"] }, "application/vnd.crick.clicker.palette": { source: "iana", extensions: ["clkp"] }, "application/vnd.crick.clicker.template": { source: "iana", extensions: ["clkt"] }, "application/vnd.crick.clicker.wordbank": { source: "iana", extensions: ["clkw"] }, "application/vnd.criticaltools.wbs+xml": { source: "iana", compressible: true, extensions: ["wbs"] }, "application/vnd.cryptii.pipe+json": { source: "iana", compressible: true }, "application/vnd.crypto-shade-file": { source: "iana" }, "application/vnd.cryptomator.encrypted": { source: "iana" }, "application/vnd.cryptomator.vault": { source: "iana" }, "application/vnd.ctc-posml": { source: "iana", extensions: ["pml"] }, "application/vnd.ctct.ws+xml": { source: "iana", compressible: true }, "application/vnd.cups-pdf": { source: "iana" }, "application/vnd.cups-postscript": { source: "iana" }, "application/vnd.cups-ppd": { source: "iana", extensions: ["ppd"] }, "application/vnd.cups-raster": { source: "iana" }, "application/vnd.cups-raw": { source: "iana" }, "application/vnd.curl": { source: "iana" }, "application/vnd.curl.car": { source: "apache", extensions: ["car"] }, "application/vnd.curl.pcurl": { source: "apache", extensions: ["pcurl"] }, "application/vnd.cyan.dean.root+xml": { source: "iana", compressible: true }, "application/vnd.cybank": { source: "iana" }, "application/vnd.cyclonedx+json": { source: "iana", compressible: true }, "application/vnd.cyclonedx+xml": { source: "iana", compressible: true }, "application/vnd.d2l.coursepackage1p0+zip": { source: "iana", compressible: false }, "application/vnd.d3m-dataset": { source: "iana" }, "application/vnd.d3m-problem": { source: "iana" }, "application/vnd.dart": { source: "iana", compressible: true, extensions: ["dart"] }, "application/vnd.data-vision.rdz": { source: "iana", extensions: ["rdz"] }, "application/vnd.datapackage+json": { source: "iana", compressible: true }, "application/vnd.dataresource+json": { source: "iana", compressible: true }, "application/vnd.dbf": { source: "iana", extensions: ["dbf"] }, "application/vnd.debian.binary-package": { source: "iana" }, "application/vnd.dece.data": { source: "iana", extensions: ["uvf", "uvvf", "uvd", "uvvd"] }, "application/vnd.dece.ttml+xml": { source: "iana", compressible: true, extensions: ["uvt", "uvvt"] }, "application/vnd.dece.unspecified": { source: "iana", extensions: ["uvx", "uvvx"] }, "application/vnd.dece.zip": { source: "iana", extensions: ["uvz", "uvvz"] }, "application/vnd.denovo.fcselayout-link": { source: "iana", extensions: ["fe_launch"] }, "application/vnd.desmume.movie": { source: "iana" }, "application/vnd.dir-bi.plate-dl-nosuffix": { source: "iana" }, "application/vnd.dm.delegation+xml": { source: "iana", compressible: true }, "application/vnd.dna": { source: "iana", extensions: ["dna"] }, "application/vnd.document+json": { source: "iana", compressible: true }, "application/vnd.dolby.mlp": { source: "apache", extensions: ["mlp"] }, "application/vnd.dolby.mobile.1": { source: "iana" }, "application/vnd.dolby.mobile.2": { source: "iana" }, "application/vnd.doremir.scorecloud-binary-document": { source: "iana" }, "application/vnd.dpgraph": { source: "iana", extensions: ["dpg"] }, "application/vnd.dreamfactory": { source: "iana", extensions: ["dfac"] }, "application/vnd.drive+json": { source: "iana", compressible: true }, "application/vnd.ds-keypoint": { source: "apache", extensions: ["kpxx"] }, "application/vnd.dtg.local": { source: "iana" }, "application/vnd.dtg.local.flash": { source: "iana" }, "application/vnd.dtg.local.html": { source: "iana" }, "application/vnd.dvb.ait": { source: "iana", extensions: ["ait"] }, "application/vnd.dvb.dvbisl+xml": { source: "iana", compressible: true }, "application/vnd.dvb.dvbj": { source: "iana" }, "application/vnd.dvb.esgcontainer": { source: "iana" }, "application/vnd.dvb.ipdcdftnotifaccess": { source: "iana" }, "application/vnd.dvb.ipdcesgaccess": { source: "iana" }, "application/vnd.dvb.ipdcesgaccess2": { source: "iana" }, "application/vnd.dvb.ipdcesgpdd": { source: "iana" }, "application/vnd.dvb.ipdcroaming": { source: "iana" }, "application/vnd.dvb.iptv.alfec-base": { source: "iana" }, "application/vnd.dvb.iptv.alfec-enhancement": { source: "iana" }, "application/vnd.dvb.notif-aggregate-root+xml": { source: "iana", compressible: true }, "application/vnd.dvb.notif-container+xml": { source: "iana", compressible: true }, "application/vnd.dvb.notif-generic+xml": { source: "iana", compressible: true }, "application/vnd.dvb.notif-ia-msglist+xml": { source: "iana", compressible: true }, "application/vnd.dvb.notif-ia-registration-request+xml": { source: "iana", compressible: true }, "application/vnd.dvb.notif-ia-registration-response+xml": { source: "iana", compressible: true }, "application/vnd.dvb.notif-init+xml": { source: "iana", compressible: true }, "application/vnd.dvb.pfr": { source: "iana" }, "application/vnd.dvb.service": { source: "iana", extensions: ["svc"] }, "application/vnd.dxr": { source: "iana" }, "application/vnd.dynageo": { source: "iana", extensions: ["geo"] }, "application/vnd.dzr": { source: "iana" }, "application/vnd.easykaraoke.cdgdownload": { source: "iana" }, "application/vnd.ecdis-update": { source: "iana" }, "application/vnd.ecip.rlp": { source: "iana" }, "application/vnd.eclipse.ditto+json": { source: "iana", compressible: true }, "application/vnd.ecowin.chart": { source: "iana", extensions: ["mag"] }, "application/vnd.ecowin.filerequest": { source: "iana" }, "application/vnd.ecowin.fileupdate": { source: "iana" }, "application/vnd.ecowin.series": { source: "iana" }, "application/vnd.ecowin.seriesrequest": { source: "iana" }, "application/vnd.ecowin.seriesupdate": { source: "iana" }, "application/vnd.efi.img": { source: "iana" }, "application/vnd.efi.iso": { source: "iana" }, "application/vnd.emclient.accessrequest+xml": { source: "iana", compressible: true }, "application/vnd.enliven": { source: "iana", extensions: ["nml"] }, "application/vnd.enphase.envoy": { source: "iana" }, "application/vnd.eprints.data+xml": { source: "iana", compressible: true }, "application/vnd.epson.esf": { source: "iana", extensions: ["esf"] }, "application/vnd.epson.msf": { source: "iana", extensions: ["msf"] }, "application/vnd.epson.quickanime": { source: "iana", extensions: ["qam"] }, "application/vnd.epson.salt": { source: "iana", extensions: ["slt"] }, "application/vnd.epson.ssf": { source: "iana", extensions: ["ssf"] }, "application/vnd.ericsson.quickcall": { source: "iana" }, "application/vnd.espass-espass+zip": { source: "iana", compressible: false }, "application/vnd.eszigno3+xml": { source: "iana", compressible: true, extensions: ["es3", "et3"] }, "application/vnd.etsi.aoc+xml": { source: "iana", compressible: true }, "application/vnd.etsi.asic-e+zip": { source: "iana", compressible: false }, "application/vnd.etsi.asic-s+zip": { source: "iana", compressible: false }, "application/vnd.etsi.cug+xml": { source: "iana", compressible: true }, "application/vnd.etsi.iptvcommand+xml": { source: "iana", compressible: true }, "application/vnd.etsi.iptvdiscovery+xml": { source: "iana", compressible: true }, "application/vnd.etsi.iptvprofile+xml": { source: "iana", compressible: true }, "application/vnd.etsi.iptvsad-bc+xml": { source: "iana", compressible: true }, "application/vnd.etsi.iptvsad-cod+xml": { source: "iana", compressible: true }, "application/vnd.etsi.iptvsad-npvr+xml": { source: "iana", compressible: true }, "application/vnd.etsi.iptvservice+xml": { source: "iana", compressible: true }, "application/vnd.etsi.iptvsync+xml": { source: "iana", compressible: true }, "application/vnd.etsi.iptvueprofile+xml": { source: "iana", compressible: true }, "application/vnd.etsi.mcid+xml": { source: "iana", compressible: true }, "application/vnd.etsi.mheg5": { source: "iana" }, "application/vnd.etsi.overload-control-policy-dataset+xml": { source: "iana", compressible: true }, "application/vnd.etsi.pstn+xml": { source: "iana", compressible: true }, "application/vnd.etsi.sci+xml": { source: "iana", compressible: true }, "application/vnd.etsi.simservs+xml": { source: "iana", compressible: true }, "application/vnd.etsi.timestamp-token": { source: "iana" }, "application/vnd.etsi.tsl+xml": { source: "iana", compressible: true }, "application/vnd.etsi.tsl.der": { source: "iana" }, "application/vnd.eu.kasparian.car+json": { source: "iana", compressible: true }, "application/vnd.eudora.data": { source: "iana" }, "application/vnd.evolv.ecig.profile": { source: "iana" }, "application/vnd.evolv.ecig.settings": { source: "iana" }, "application/vnd.evolv.ecig.theme": { source: "iana" }, "application/vnd.exstream-empower+zip": { source: "iana", compressible: false }, "application/vnd.exstream-package": { source: "iana" }, "application/vnd.ezpix-album": { source: "iana", extensions: ["ez2"] }, "application/vnd.ezpix-package": { source: "iana", extensions: ["ez3"] }, "application/vnd.f-secure.mobile": { source: "iana" }, "application/vnd.familysearch.gedcom+zip": { source: "iana", compressible: false }, "application/vnd.fastcopy-disk-image": { source: "iana" }, "application/vnd.fdf": { source: "iana", extensions: ["fdf"] }, "application/vnd.fdsn.mseed": { source: "iana", extensions: ["mseed"] }, "application/vnd.fdsn.seed": { source: "iana", extensions: ["seed", "dataless"] }, "application/vnd.ffsns": { source: "iana" }, "application/vnd.ficlab.flb+zip": { source: "iana", compressible: false }, "application/vnd.filmit.zfc": { source: "iana" }, "application/vnd.fints": { source: "iana" }, "application/vnd.firemonkeys.cloudcell": { source: "iana" }, "application/vnd.flographit": { source: "iana", extensions: ["gph"] }, "application/vnd.fluxtime.clip": { source: "iana", extensions: ["ftc"] }, "application/vnd.font-fontforge-sfd": { source: "iana" }, "application/vnd.framemaker": { source: "iana", extensions: ["fm", "frame", "maker", "book"] }, "application/vnd.frogans.fnc": { source: "iana", extensions: ["fnc"] }, "application/vnd.frogans.ltf": { source: "iana", extensions: ["ltf"] }, "application/vnd.fsc.weblaunch": { source: "iana", extensions: ["fsc"] }, "application/vnd.fujifilm.fb.docuworks": { source: "iana" }, "application/vnd.fujifilm.fb.docuworks.binder": { source: "iana" }, "application/vnd.fujifilm.fb.docuworks.container": { source: "iana" }, "application/vnd.fujifilm.fb.jfi+xml": { source: "iana", compressible: true }, "application/vnd.fujitsu.oasys": { source: "iana", extensions: ["oas"] }, "application/vnd.fujitsu.oasys2": { source: "iana", extensions: ["oa2"] }, "application/vnd.fujitsu.oasys3": { source: "iana", extensions: ["oa3"] }, "application/vnd.fujitsu.oasysgp": { source: "iana", extensions: ["fg5"] }, "application/vnd.fujitsu.oasysprs": { source: "iana", extensions: ["bh2"] }, "application/vnd.fujixerox.art-ex": { source: "iana" }, "application/vnd.fujixerox.art4": { source: "iana" }, "application/vnd.fujixerox.ddd": { source: "iana", extensions: ["ddd"] }, "application/vnd.fujixerox.docuworks": { source: "iana", extensions: ["xdw"] }, "application/vnd.fujixerox.docuworks.binder": { source: "iana", extensions: ["xbd"] }, "application/vnd.fujixerox.docuworks.container": { source: "iana" }, "application/vnd.fujixerox.hbpl": { source: "iana" }, "application/vnd.fut-misnet": { source: "iana" }, "application/vnd.futoin+cbor": { source: "iana" }, "application/vnd.futoin+json": { source: "iana", compressible: true }, "application/vnd.fuzzysheet": { source: "iana", extensions: ["fzs"] }, "application/vnd.genomatix.tuxedo": { source: "iana", extensions: ["txd"] }, "application/vnd.gentics.grd+json": { source: "iana", compressible: true }, "application/vnd.geo+json": { source: "iana", compressible: true }, "application/vnd.geocube+xml": { source: "iana", compressible: true }, "application/vnd.geogebra.file": { source: "iana", extensions: ["ggb"] }, "application/vnd.geogebra.slides": { source: "iana" }, "application/vnd.geogebra.tool": { source: "iana", extensions: ["ggt"] }, "application/vnd.geometry-explorer": { source: "iana", extensions: ["gex", "gre"] }, "application/vnd.geonext": { source: "iana", extensions: ["gxt"] }, "application/vnd.geoplan": { source: "iana", extensions: ["g2w"] }, "application/vnd.geospace": { source: "iana", extensions: ["g3w"] }, "application/vnd.gerber": { source: "iana" }, "application/vnd.globalplatform.card-content-mgt": { source: "iana" }, "application/vnd.globalplatform.card-content-mgt-response": { source: "iana" }, "application/vnd.gmx": { source: "iana", extensions: ["gmx"] }, "application/vnd.google-apps.document": { compressible: false, extensions: ["gdoc"] }, "application/vnd.google-apps.presentation": { compressible: false, extensions: ["gslides"] }, "application/vnd.google-apps.spreadsheet": { compressible: false, extensions: ["gsheet"] }, "application/vnd.google-earth.kml+xml": { source: "iana", compressible: true, extensions: ["kml"] }, "application/vnd.google-earth.kmz": { source: "iana", compressible: false, extensions: ["kmz"] }, "application/vnd.gov.sk.e-form+xml": { source: "iana", compressible: true }, "application/vnd.gov.sk.e-form+zip": { source: "iana", compressible: false }, "application/vnd.gov.sk.xmldatacontainer+xml": { source: "iana", compressible: true }, "application/vnd.grafeq": { source: "iana", extensions: ["gqf", "gqs"] }, "application/vnd.gridmp": { source: "iana" }, "application/vnd.groove-account": { source: "iana", extensions: ["gac"] }, "application/vnd.groove-help": { source: "iana", extensions: ["ghf"] }, "application/vnd.groove-identity-message": { source: "iana", extensions: ["gim"] }, "application/vnd.groove-injector": { source: "iana", extensions: ["grv"] }, "application/vnd.groove-tool-message": { source: "iana", extensions: ["gtm"] }, "application/vnd.groove-tool-template": { source: "iana", extensions: ["tpl"] }, "application/vnd.groove-vcard": { source: "iana", extensions: ["vcg"] }, "application/vnd.hal+json": { source: "iana", compressible: true }, "application/vnd.hal+xml": { source: "iana", compressible: true, extensions: ["hal"] }, "application/vnd.handheld-entertainment+xml": { source: "iana", compressible: true, extensions: ["zmm"] }, "application/vnd.hbci": { source: "iana", extensions: ["hbci"] }, "application/vnd.hc+json": { source: "iana", compressible: true }, "application/vnd.hcl-bireports": { source: "iana" }, "application/vnd.hdt": { source: "iana" }, "application/vnd.heroku+json": { source: "iana", compressible: true }, "application/vnd.hhe.lesson-player": { source: "iana", extensions: ["les"] }, "application/vnd.hl7cda+xml": { source: "iana", charset: "UTF-8", compressible: true }, "application/vnd.hl7v2+xml": { source: "iana", charset: "UTF-8", compressible: true }, "application/vnd.hp-hpgl": { source: "iana", extensions: ["hpgl"] }, "application/vnd.hp-hpid": { source: "iana", extensions: ["hpid"] }, "application/vnd.hp-hps": { source: "iana", extensions: ["hps"] }, "application/vnd.hp-jlyt": { source: "iana", extensions: ["jlt"] }, "application/vnd.hp-pcl": { source: "iana", extensions: ["pcl"] }, "application/vnd.hp-pclxl": { source: "iana", extensions: ["pclxl"] }, "application/vnd.httphone": { source: "iana" }, "application/vnd.hydrostatix.sof-data": { source: "iana", extensions: ["sfd-hdstx"] }, "application/vnd.hyper+json": { source: "iana", compressible: true }, "application/vnd.hyper-item+json": { source: "iana", compressible: true }, "application/vnd.hyperdrive+json": { source: "iana", compressible: true }, "application/vnd.hzn-3d-crossword": { source: "iana" }, "application/vnd.ibm.afplinedata": { source: "iana" }, "application/vnd.ibm.electronic-media": { source: "iana" }, "application/vnd.ibm.minipay": { source: "iana", extensions: ["mpy"] }, "application/vnd.ibm.modcap": { source: "iana", extensions: ["afp", "listafp", "list3820"] }, "application/vnd.ibm.rights-management": { source: "iana", extensions: ["irm"] }, "application/vnd.ibm.secure-container": { source: "iana", extensions: ["sc"] }, "application/vnd.iccprofile": { source: "iana", extensions: ["icc", "icm"] }, "application/vnd.ieee.1905": { source: "iana" }, "application/vnd.igloader": { source: "iana", extensions: ["igl"] }, "application/vnd.imagemeter.folder+zip": { source: "iana", compressible: false }, "application/vnd.imagemeter.image+zip": { source: "iana", compressible: false }, "application/vnd.immervision-ivp": { source: "iana", extensions: ["ivp"] }, "application/vnd.immervision-ivu": { source: "iana", extensions: ["ivu"] }, "application/vnd.ims.imsccv1p1": { source: "iana" }, "application/vnd.ims.imsccv1p2": { source: "iana" }, "application/vnd.ims.imsccv1p3": { source: "iana" }, "application/vnd.ims.lis.v2.result+json": { source: "iana", compressible: true }, "application/vnd.ims.lti.v2.toolconsumerprofile+json": { source: "iana", compressible: true }, "application/vnd.ims.lti.v2.toolproxy+json": { source: "iana", compressible: true }, "application/vnd.ims.lti.v2.toolproxy.id+json": { source: "iana", compressible: true }, "application/vnd.ims.lti.v2.toolsettings+json": { source: "iana", compressible: true }, "application/vnd.ims.lti.v2.toolsettings.simple+json": { source: "iana", compressible: true }, "application/vnd.informedcontrol.rms+xml": { source: "iana", compressible: true }, "application/vnd.informix-visionary": { source: "iana" }, "application/vnd.infotech.project": { source: "iana" }, "application/vnd.infotech.project+xml": { source: "iana", compressible: true }, "application/vnd.innopath.wamp.notification": { source: "iana" }, "application/vnd.insors.igm": { source: "iana", extensions: ["igm"] }, "application/vnd.intercon.formnet": { source: "iana", extensions: ["xpw", "xpx"] }, "application/vnd.intergeo": { source: "iana", extensions: ["i2g"] }, "application/vnd.intertrust.digibox": { source: "iana" }, "application/vnd.intertrust.nncp": { source: "iana" }, "application/vnd.intu.qbo": { source: "iana", extensions: ["qbo"] }, "application/vnd.intu.qfx": { source: "iana", extensions: ["qfx"] }, "application/vnd.iptc.g2.catalogitem+xml": { source: "iana", compressible: true }, "application/vnd.iptc.g2.conceptitem+xml": { source: "iana", compressible: true }, "application/vnd.iptc.g2.knowledgeitem+xml": { source: "iana", compressible: true }, "application/vnd.iptc.g2.newsitem+xml": { source: "iana", compressible: true }, "application/vnd.iptc.g2.newsmessage+xml": { source: "iana", compressible: true }, "application/vnd.iptc.g2.packageitem+xml": { source: "iana", compressible: true }, "application/vnd.iptc.g2.planningitem+xml": { source: "iana", compressible: true }, "application/vnd.ipunplugged.rcprofile": { source: "iana", extensions: ["rcprofile"] }, "application/vnd.irepository.package+xml": { source: "iana", compressible: true, extensions: ["irp"] }, "application/vnd.is-xpr": { source: "iana", extensions: ["xpr"] }, "application/vnd.isac.fcs": { source: "iana", extensions: ["fcs"] }, "application/vnd.iso11783-10+zip": { source: "iana", compressible: false }, "application/vnd.jam": { source: "iana", extensions: ["jam"] }, "application/vnd.japannet-directory-service": { source: "iana" }, "application/vnd.japannet-jpnstore-wakeup": { source: "iana" }, "application/vnd.japannet-payment-wakeup": { source: "iana" }, "application/vnd.japannet-registration": { source: "iana" }, "application/vnd.japannet-registration-wakeup": { source: "iana" }, "application/vnd.japannet-setstore-wakeup": { source: "iana" }, "application/vnd.japannet-verification": { source: "iana" }, "application/vnd.japannet-verification-wakeup": { source: "iana" }, "application/vnd.jcp.javame.midlet-rms": { source: "iana", extensions: ["rms"] }, "application/vnd.jisp": { source: "iana", extensions: ["jisp"] }, "application/vnd.joost.joda-archive": { source: "iana", extensions: ["joda"] }, "application/vnd.jsk.isdn-ngn": { source: "iana" }, "application/vnd.kahootz": { source: "iana", extensions: ["ktz", "ktr"] }, "application/vnd.kde.karbon": { source: "iana", extensions: ["karbon"] }, "application/vnd.kde.kchart": { source: "iana", extensions: ["chrt"] }, "application/vnd.kde.kformula": { source: "iana", extensions: ["kfo"] }, "application/vnd.kde.kivio": { source: "iana", extensions: ["flw"] }, "application/vnd.kde.kontour": { source: "iana", extensions: ["kon"] }, "application/vnd.kde.kpresenter": { source: "iana", extensions: ["kpr", "kpt"] }, "application/vnd.kde.kspread": { source: "iana", extensions: ["ksp"] }, "application/vnd.kde.kword": { source: "iana", extensions: ["kwd", "kwt"] }, "application/vnd.kenameaapp": { source: "iana", extensions: ["htke"] }, "application/vnd.kidspiration": { source: "iana", extensions: ["kia"] }, "application/vnd.kinar": { source: "iana", extensions: ["kne", "knp"] }, "application/vnd.koan": { source: "iana", extensions: ["skp", "skd", "skt", "skm"] }, "application/vnd.kodak-descriptor": { source: "iana", extensions: ["sse"] }, "application/vnd.las": { source: "iana" }, "application/vnd.las.las+json": { source: "iana", compressible: true }, "application/vnd.las.las+xml": { source: "iana", compressible: true, extensions: ["lasxml"] }, "application/vnd.laszip": { source: "iana" }, "application/vnd.leap+json": { source: "iana", compressible: true }, "application/vnd.liberty-request+xml": { source: "iana", compressible: true }, "application/vnd.llamagraphics.life-balance.desktop": { source: "iana", extensions: ["lbd"] }, "application/vnd.llamagraphics.life-balance.exchange+xml": { source: "iana", compressible: true, extensions: ["lbe"] }, "application/vnd.logipipe.circuit+zip": { source: "iana", compressible: false }, "application/vnd.loom": { source: "iana" }, "application/vnd.lotus-1-2-3": { source: "iana", extensions: ["123"] }, "application/vnd.lotus-approach": { source: "iana", extensions: ["apr"] }, "application/vnd.lotus-freelance": { source: "iana", extensions: ["pre"] }, "application/vnd.lotus-notes": { source: "iana", extensions: ["nsf"] }, "application/vnd.lotus-organizer": { source: "iana", extensions: ["org"] }, "application/vnd.lotus-screencam": { source: "iana", extensions: ["scm"] }, "application/vnd.lotus-wordpro": { source: "iana", extensions: ["lwp"] }, "application/vnd.macports.portpkg": { source: "iana", extensions: ["portpkg"] }, "application/vnd.mapbox-vector-tile": { source: "iana", extensions: ["mvt"] }, "application/vnd.marlin.drm.actiontoken+xml": { source: "iana", compressible: true }, "application/vnd.marlin.drm.conftoken+xml": { source: "iana", compressible: true }, "application/vnd.marlin.drm.license+xml": { source: "iana", compressible: true }, "application/vnd.marlin.drm.mdcf": { source: "iana" }, "application/vnd.mason+json": { source: "iana", compressible: true }, "application/vnd.maxar.archive.3tz+zip": { source: "iana", compressible: false }, "application/vnd.maxmind.maxmind-db": { source: "iana" }, "application/vnd.mcd": { source: "iana", extensions: ["mcd"] }, "application/vnd.medcalcdata": { source: "iana", extensions: ["mc1"] }, "application/vnd.mediastation.cdkey": { source: "iana", extensions: ["cdkey"] }, "application/vnd.meridian-slingshot": { source: "iana" }, "application/vnd.mfer": { source: "iana", extensions: ["mwf"] }, "application/vnd.mfmp": { source: "iana", extensions: ["mfm"] }, "application/vnd.micro+json": { source: "iana", compressible: true }, "application/vnd.micrografx.flo": { source: "iana", extensions: ["flo"] }, "application/vnd.micrografx.igx": { source: "iana", extensions: ["igx"] }, "application/vnd.microsoft.portable-executable": { source: "iana" }, "application/vnd.microsoft.windows.thumbnail-cache": { source: "iana" }, "application/vnd.miele+json": { source: "iana", compressible: true }, "application/vnd.mif": { source: "iana", extensions: ["mif"] }, "application/vnd.minisoft-hp3000-save": { source: "iana" }, "application/vnd.mitsubishi.misty-guard.trustweb": { source: "iana" }, "application/vnd.mobius.daf": { source: "iana", extensions: ["daf"] }, "application/vnd.mobius.dis": { source: "iana", extensions: ["dis"] }, "application/vnd.mobius.mbk": { source: "iana", extensions: ["mbk"] }, "application/vnd.mobius.mqy": { source: "iana", extensions: ["mqy"] }, "application/vnd.mobius.msl": { source: "iana", extensions: ["msl"] }, "application/vnd.mobius.plc": { source: "iana", extensions: ["plc"] }, "application/vnd.mobius.txf": { source: "iana", extensions: ["txf"] }, "application/vnd.mophun.application": { source: "iana", extensions: ["mpn"] }, "application/vnd.mophun.certificate": { source: "iana", extensions: ["mpc"] }, "application/vnd.motorola.flexsuite": { source: "iana" }, "application/vnd.motorola.flexsuite.adsi": { source: "iana" }, "application/vnd.motorola.flexsuite.fis": { source: "iana" }, "application/vnd.motorola.flexsuite.gotap": { source: "iana" }, "application/vnd.motorola.flexsuite.kmr": { source: "iana" }, "application/vnd.motorola.flexsuite.ttc": { source: "iana" }, "application/vnd.motorola.flexsuite.wem": { source: "iana" }, "application/vnd.motorola.iprm": { source: "iana" }, "application/vnd.mozilla.xul+xml": { source: "iana", compressible: true, extensions: ["xul"] }, "application/vnd.ms-3mfdocument": { source: "iana" }, "application/vnd.ms-artgalry": { source: "iana", extensions: ["cil"] }, "application/vnd.ms-asf": { source: "iana" }, "application/vnd.ms-cab-compressed": { source: "iana", extensions: ["cab"] }, "application/vnd.ms-color.iccprofile": { source: "apache" }, "application/vnd.ms-excel": { source: "iana", compressible: false, extensions: ["xls", "xlm", "xla", "xlc", "xlt", "xlw"] }, "application/vnd.ms-excel.addin.macroenabled.12": { source: "iana", extensions: ["xlam"] }, "application/vnd.ms-excel.sheet.binary.macroenabled.12": { source: "iana", extensions: ["xlsb"] }, "application/vnd.ms-excel.sheet.macroenabled.12": { source: "iana", extensions: ["xlsm"] }, "application/vnd.ms-excel.template.macroenabled.12": { source: "iana", extensions: ["xltm"] }, "application/vnd.ms-fontobject": { source: "iana", compressible: true, extensions: ["eot"] }, "application/vnd.ms-htmlhelp": { source: "iana", extensions: ["chm"] }, "application/vnd.ms-ims": { source: "iana", extensions: ["ims"] }, "application/vnd.ms-lrm": { source: "iana", extensions: ["lrm"] }, "application/vnd.ms-office.activex+xml": { source: "iana", compressible: true }, "application/vnd.ms-officetheme": { source: "iana", extensions: ["thmx"] }, "application/vnd.ms-opentype": { source: "apache", compressible: true }, "application/vnd.ms-outlook": { compressible: false, extensions: ["msg"] }, "application/vnd.ms-package.obfuscated-opentype": { source: "apache" }, "application/vnd.ms-pki.seccat": { source: "apache", extensions: ["cat"] }, "application/vnd.ms-pki.stl": { source: "apache", extensions: ["stl"] }, "application/vnd.ms-playready.initiator+xml": { source: "iana", compressible: true }, "application/vnd.ms-powerpoint": { source: "iana", compressible: false, extensions: ["ppt", "pps", "pot"] }, "application/vnd.ms-powerpoint.addin.macroenabled.12": { source: "iana", extensions: ["ppam"] }, "application/vnd.ms-powerpoint.presentation.macroenabled.12": { source: "iana", extensions: ["pptm"] }, "application/vnd.ms-powerpoint.slide.macroenabled.12": { source: "iana", extensions: ["sldm"] }, "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { source: "iana", extensions: ["ppsm"] }, "application/vnd.ms-powerpoint.template.macroenabled.12": { source: "iana", extensions: ["potm"] }, "application/vnd.ms-printdevicecapabilities+xml": { source: "iana", compressible: true }, "application/vnd.ms-printing.printticket+xml": { source: "apache", compressible: true }, "application/vnd.ms-printschematicket+xml": { source: "iana", compressible: true }, "application/vnd.ms-project": { source: "iana", extensions: ["mpp", "mpt"] }, "application/vnd.ms-tnef": { source: "iana" }, "application/vnd.ms-windows.devicepairing": { source: "iana" }, "application/vnd.ms-windows.nwprinting.oob": { source: "iana" }, "application/vnd.ms-windows.printerpairing": { source: "iana" }, "application/vnd.ms-windows.wsd.oob": { source: "iana" }, "application/vnd.ms-wmdrm.lic-chlg-req": { source: "iana" }, "application/vnd.ms-wmdrm.lic-resp": { source: "iana" }, "application/vnd.ms-wmdrm.meter-chlg-req": { source: "iana" }, "application/vnd.ms-wmdrm.meter-resp": { source: "iana" }, "application/vnd.ms-word.document.macroenabled.12": { source: "iana", extensions: ["docm"] }, "application/vnd.ms-word.template.macroenabled.12": { source: "iana", extensions: ["dotm"] }, "application/vnd.ms-works": { source: "iana", extensions: ["wps", "wks", "wcm", "wdb"] }, "application/vnd.ms-wpl": { source: "iana", extensions: ["wpl"] }, "application/vnd.ms-xpsdocument": { source: "iana", compressible: false, extensions: ["xps"] }, "application/vnd.msa-disk-image": { source: "iana" }, "application/vnd.mseq": { source: "iana", extensions: ["mseq"] }, "application/vnd.msign": { source: "iana" }, "application/vnd.multiad.creator": { source: "iana" }, "application/vnd.multiad.creator.cif": { source: "iana" }, "application/vnd.music-niff": { source: "iana" }, "application/vnd.musician": { source: "iana", extensions: ["mus"] }, "application/vnd.muvee.style": { source: "iana", extensions: ["msty"] }, "application/vnd.mynfc": { source: "iana", extensions: ["taglet"] }, "application/vnd.nacamar.ybrid+json": { source: "iana", compressible: true }, "application/vnd.ncd.control": { source: "iana" }, "application/vnd.ncd.reference": { source: "iana" }, "application/vnd.nearst.inv+json": { source: "iana", compressible: true }, "application/vnd.nebumind.line": { source: "iana" }, "application/vnd.nervana": { source: "iana" }, "application/vnd.netfpx": { source: "iana" }, "application/vnd.neurolanguage.nlu": { source: "iana", extensions: ["nlu"] }, "application/vnd.nimn": { source: "iana" }, "application/vnd.nintendo.nitro.rom": { source: "iana" }, "application/vnd.nintendo.snes.rom": { source: "iana" }, "application/vnd.nitf": { source: "iana", extensions: ["ntf", "nitf"] }, "application/vnd.noblenet-directory": { source: "iana", extensions: ["nnd"] }, "application/vnd.noblenet-sealer": { source: "iana", extensions: ["nns"] }, "application/vnd.noblenet-web": { source: "iana", extensions: ["nnw"] }, "application/vnd.nokia.catalogs": { source: "iana" }, "application/vnd.nokia.conml+wbxml": { source: "iana" }, "application/vnd.nokia.conml+xml": { source: "iana", compressible: true }, "application/vnd.nokia.iptv.config+xml": { source: "iana", compressible: true }, "application/vnd.nokia.isds-radio-presets": { source: "iana" }, "application/vnd.nokia.landmark+wbxml": { source: "iana" }, "application/vnd.nokia.landmark+xml": { source: "iana", compressible: true }, "application/vnd.nokia.landmarkcollection+xml": { source: "iana", compressible: true }, "application/vnd.nokia.n-gage.ac+xml": { source: "iana", compressible: true, extensions: ["ac"] }, "application/vnd.nokia.n-gage.data": { source: "iana", extensions: ["ngdat"] }, "application/vnd.nokia.n-gage.symbian.install": { source: "iana", extensions: ["n-gage"] }, "application/vnd.nokia.ncd": { source: "iana" }, "application/vnd.nokia.pcd+wbxml": { source: "iana" }, "application/vnd.nokia.pcd+xml": { source: "iana", compressible: true }, "application/vnd.nokia.radio-preset": { source: "iana", extensions: ["rpst"] }, "application/vnd.nokia.radio-presets": { source: "iana", extensions: ["rpss"] }, "application/vnd.novadigm.edm": { source: "iana", extensions: ["edm"] }, "application/vnd.novadigm.edx": { source: "iana", extensions: ["edx"] }, "application/vnd.novadigm.ext": { source: "iana", extensions: ["ext"] }, "application/vnd.ntt-local.content-share": { source: "iana" }, "application/vnd.ntt-local.file-transfer": { source: "iana" }, "application/vnd.ntt-local.ogw_remote-access": { source: "iana" }, "application/vnd.ntt-local.sip-ta_remote": { source: "iana" }, "application/vnd.ntt-local.sip-ta_tcp_stream": { source: "iana" }, "application/vnd.oasis.opendocument.chart": { source: "iana", extensions: ["odc"] }, "application/vnd.oasis.opendocument.chart-template": { source: "iana", extensions: ["otc"] }, "application/vnd.oasis.opendocument.database": { source: "iana", extensions: ["odb"] }, "application/vnd.oasis.opendocument.formula": { source: "iana", extensions: ["odf"] }, "application/vnd.oasis.opendocument.formula-template": { source: "iana", extensions: ["odft"] }, "application/vnd.oasis.opendocument.graphics": { source: "iana", compressible: false, extensions: ["odg"] }, "application/vnd.oasis.opendocument.graphics-template": { source: "iana", extensions: ["otg"] }, "application/vnd.oasis.opendocument.image": { source: "iana", extensions: ["odi"] }, "application/vnd.oasis.opendocument.image-template": { source: "iana", extensions: ["oti"] }, "application/vnd.oasis.opendocument.presentation": { source: "iana", compressible: false, extensions: ["odp"] }, "application/vnd.oasis.opendocument.presentation-template": { source: "iana", extensions: ["otp"] }, "application/vnd.oasis.opendocument.spreadsheet": { source: "iana", compressible: false, extensions: ["ods"] }, "application/vnd.oasis.opendocument.spreadsheet-template": { source: "iana", extensions: ["ots"] }, "application/vnd.oasis.opendocument.text": { source: "iana", compressible: false, extensions: ["odt"] }, "application/vnd.oasis.opendocument.text-master": { source: "iana", extensions: ["odm"] }, "application/vnd.oasis.opendocument.text-template": { source: "iana", extensions: ["ott"] }, "application/vnd.oasis.opendocument.text-web": { source: "iana", extensions: ["oth"] }, "application/vnd.obn": { source: "iana" }, "application/vnd.ocf+cbor": { source: "iana" }, "application/vnd.oci.image.manifest.v1+json": { source: "iana", compressible: true }, "application/vnd.oftn.l10n+json": { source: "iana", compressible: true }, "application/vnd.oipf.contentaccessdownload+xml": { source: "iana", compressible: true }, "application/vnd.oipf.contentaccessstreaming+xml": { source: "iana", compressible: true }, "application/vnd.oipf.cspg-hexbinary": { source: "iana" }, "application/vnd.oipf.dae.svg+xml": { source: "iana", compressible: true }, "application/vnd.oipf.dae.xhtml+xml": { source: "iana", compressible: true }, "application/vnd.oipf.mippvcontrolmessage+xml": { source: "iana", compressible: true }, "application/vnd.oipf.pae.gem": { source: "iana" }, "application/vnd.oipf.spdiscovery+xml": { source: "iana", compressible: true }, "application/vnd.oipf.spdlist+xml": { source: "iana", compressible: true }, "application/vnd.oipf.ueprofile+xml": { source: "iana", compressible: true }, "application/vnd.oipf.userprofile+xml": { source: "iana", compressible: true }, "application/vnd.olpc-sugar": { source: "iana", extensions: ["xo"] }, "application/vnd.oma-scws-config": { source: "iana" }, "application/vnd.oma-scws-http-request": { source: "iana" }, "application/vnd.oma-scws-http-response": { source: "iana" }, "application/vnd.oma.bcast.associated-procedure-parameter+xml": { source: "iana", compressible: true }, "application/vnd.oma.bcast.drm-trigger+xml": { source: "iana", compressible: true }, "application/vnd.oma.bcast.imd+xml": { source: "iana", compressible: true }, "application/vnd.oma.bcast.ltkm": { source: "iana" }, "application/vnd.oma.bcast.notification+xml": { source: "iana", compressible: true }, "application/vnd.oma.bcast.provisioningtrigger": { source: "iana" }, "application/vnd.oma.bcast.sgboot": { source: "iana" }, "application/vnd.oma.bcast.sgdd+xml": { source: "iana", compressible: true }, "application/vnd.oma.bcast.sgdu": { source: "iana" }, "application/vnd.oma.bcast.simple-symbol-container": { source: "iana" }, "application/vnd.oma.bcast.smartcard-trigger+xml": { source: "iana", compressible: true }, "application/vnd.oma.bcast.sprov+xml": { source: "iana", compressible: true }, "application/vnd.oma.bcast.stkm": { source: "iana" }, "application/vnd.oma.cab-address-book+xml": { source: "iana", compressible: true }, "application/vnd.oma.cab-feature-handler+xml": { source: "iana", compressible: true }, "application/vnd.oma.cab-pcc+xml": { source: "iana", compressible: true }, "application/vnd.oma.cab-subs-invite+xml": { source: "iana", compressible: true }, "application/vnd.oma.cab-user-prefs+xml": { source: "iana", compressible: true }, "application/vnd.oma.dcd": { source: "iana" }, "application/vnd.oma.dcdc": { source: "iana" }, "application/vnd.oma.dd2+xml": { source: "iana", compressible: true, extensions: ["dd2"] }, "application/vnd.oma.drm.risd+xml": { source: "iana", compressible: true }, "application/vnd.oma.group-usage-list+xml": { source: "iana", compressible: true }, "application/vnd.oma.lwm2m+cbor": { source: "iana" }, "application/vnd.oma.lwm2m+json": { source: "iana", compressible: true }, "application/vnd.oma.lwm2m+tlv": { source: "iana" }, "application/vnd.oma.pal+xml": { source: "iana", compressible: true }, "application/vnd.oma.poc.detailed-progress-report+xml": { source: "iana", compressible: true }, "application/vnd.oma.poc.final-report+xml": { source: "iana", compressible: true }, "application/vnd.oma.poc.groups+xml": { source: "iana", compressible: true }, "application/vnd.oma.poc.invocation-descriptor+xml": { source: "iana", compressible: true }, "application/vnd.oma.poc.optimized-progress-report+xml": { source: "iana", compressible: true }, "application/vnd.oma.push": { source: "iana" }, "application/vnd.oma.scidm.messages+xml": { source: "iana", compressible: true }, "application/vnd.oma.xcap-directory+xml": { source: "iana", compressible: true }, "application/vnd.omads-email+xml": { source: "iana", charset: "UTF-8", compressible: true }, "application/vnd.omads-file+xml": { source: "iana", charset: "UTF-8", compressible: true }, "application/vnd.omads-folder+xml": { source: "iana", charset: "UTF-8", compressible: true }, "application/vnd.omaloc-supl-init": { source: "iana" }, "application/vnd.onepager": { source: "iana" }, "application/vnd.onepagertamp": { source: "iana" }, "application/vnd.onepagertamx": { source: "iana" }, "application/vnd.onepagertat": { source: "iana" }, "application/vnd.onepagertatp": { source: "iana" }, "application/vnd.onepagertatx": { source: "iana" }, "application/vnd.openblox.game+xml": { source: "iana", compressible: true, extensions: ["obgx"] }, "application/vnd.openblox.game-binary": { source: "iana" }, "application/vnd.openeye.oeb": { source: "iana" }, "application/vnd.openofficeorg.extension": { source: "apache", extensions: ["oxt"] }, "application/vnd.openstreetmap.data+xml": { source: "iana", compressible: true, extensions: ["osm"] }, "application/vnd.opentimestamps.ots": { source: "iana" }, "application/vnd.openxmlformats-officedocument.custom-properties+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.drawing+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.extended-properties+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.presentationml.presentation": { source: "iana", compressible: false, extensions: ["pptx"] }, "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.presentationml.slide": { source: "iana", extensions: ["sldx"] }, "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { source: "iana", extensions: ["ppsx"] }, "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.presentationml.template": { source: "iana", extensions: ["potx"] }, "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { source: "iana", compressible: false, extensions: ["xlsx"] }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { source: "iana", extensions: ["xltx"] }, "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.theme+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.themeoverride+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.vmldrawing": { source: "iana" }, "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { source: "iana", compressible: false, extensions: ["docx"] }, "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { source: "iana", extensions: ["dotx"] }, "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-package.core-properties+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { source: "iana", compressible: true }, "application/vnd.openxmlformats-package.relationships+xml": { source: "iana", compressible: true }, "application/vnd.oracle.resource+json": { source: "iana", compressible: true }, "application/vnd.orange.indata": { source: "iana" }, "application/vnd.osa.netdeploy": { source: "iana" }, "application/vnd.osgeo.mapguide.package": { source: "iana", extensions: ["mgp"] }, "application/vnd.osgi.bundle": { source: "iana" }, "application/vnd.osgi.dp": { source: "iana", extensions: ["dp"] }, "application/vnd.osgi.subsystem": { source: "iana", extensions: ["esa"] }, "application/vnd.otps.ct-kip+xml": { source: "iana", compressible: true }, "application/vnd.oxli.countgraph": { source: "iana" }, "application/vnd.pagerduty+json": { source: "iana", compressible: true }, "application/vnd.palm": { source: "iana", extensions: ["pdb", "pqa", "oprc"] }, "application/vnd.panoply": { source: "iana" }, "application/vnd.paos.xml": { source: "iana" }, "application/vnd.patentdive": { source: "iana" }, "application/vnd.patientecommsdoc": { source: "iana" }, "application/vnd.pawaafile": { source: "iana", extensions: ["paw"] }, "application/vnd.pcos": { source: "iana" }, "application/vnd.pg.format": { source: "iana", extensions: ["str"] }, "application/vnd.pg.osasli": { source: "iana", extensions: ["ei6"] }, "application/vnd.piaccess.application-licence": { source: "iana" }, "application/vnd.picsel": { source: "iana", extensions: ["efif"] }, "application/vnd.pmi.widget": { source: "iana", extensions: ["wg"] }, "application/vnd.poc.group-advertisement+xml": { source: "iana", compressible: true }, "application/vnd.pocketlearn": { source: "iana", extensions: ["plf"] }, "application/vnd.powerbuilder6": { source: "iana", extensions: ["pbd"] }, "application/vnd.powerbuilder6-s": { source: "iana" }, "application/vnd.powerbuilder7": { source: "iana" }, "application/vnd.powerbuilder7-s": { source: "iana" }, "application/vnd.powerbuilder75": { source: "iana" }, "application/vnd.powerbuilder75-s": { source: "iana" }, "application/vnd.preminet": { source: "iana" }, "application/vnd.previewsystems.box": { source: "iana", extensions: ["box"] }, "application/vnd.proteus.magazine": { source: "iana", extensions: ["mgz"] }, "application/vnd.psfs": { source: "iana" }, "application/vnd.publishare-delta-tree": { source: "iana", extensions: ["qps"] }, "application/vnd.pvi.ptid1": { source: "iana", extensions: ["ptid"] }, "application/vnd.pwg-multiplexed": { source: "iana" }, "application/vnd.pwg-xhtml-print+xml": { source: "iana", compressible: true }, "application/vnd.qualcomm.brew-app-res": { source: "iana" }, "application/vnd.quarantainenet": { source: "iana" }, "application/vnd.quark.quarkxpress": { source: "iana", extensions: ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"] }, "application/vnd.quobject-quoxdocument": { source: "iana" }, "application/vnd.radisys.moml+xml": { source: "iana", compressible: true }, "application/vnd.radisys.msml+xml": { source: "iana", compressible: true }, "application/vnd.radisys.msml-audit+xml": { source: "iana", compressible: true }, "application/vnd.radisys.msml-audit-conf+xml": { source: "iana", compressible: true }, "application/vnd.radisys.msml-audit-conn+xml": { source: "iana", compressible: true }, "application/vnd.radisys.msml-audit-dialog+xml": { source: "iana", compressible: true }, "application/vnd.radisys.msml-audit-stream+xml": { source: "iana", compressible: true }, "application/vnd.radisys.msml-conf+xml": { source: "iana", compressible: true }, "application/vnd.radisys.msml-dialog+xml": { source: "iana", compressible: true }, "application/vnd.radisys.msml-dialog-base+xml": { source: "iana", compressible: true }, "application/vnd.radisys.msml-dialog-fax-detect+xml": { source: "iana", compressible: true }, "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { source: "iana", compressible: true }, "application/vnd.radisys.msml-dialog-group+xml": { source: "iana", compressible: true }, "application/vnd.radisys.msml-dialog-speech+xml": { source: "iana", compressible: true }, "application/vnd.radisys.msml-dialog-transform+xml": { source: "iana", compressible: true }, "application/vnd.rainstor.data": { source: "iana" }, "application/vnd.rapid": { source: "iana" }, "application/vnd.rar": { source: "iana", extensions: ["rar"] }, "application/vnd.realvnc.bed": { source: "iana", extensions: ["bed"] }, "application/vnd.recordare.musicxml": { source: "iana", extensions: ["mxl"] }, "application/vnd.recordare.musicxml+xml": { source: "iana", compressible: true, extensions: ["musicxml"] }, "application/vnd.renlearn.rlprint": { source: "iana" }, "application/vnd.resilient.logic": { source: "iana" }, "application/vnd.restful+json": { source: "iana", compressible: true }, "application/vnd.rig.cryptonote": { source: "iana", extensions: ["cryptonote"] }, "application/vnd.rim.cod": { source: "apache", extensions: ["cod"] }, "application/vnd.rn-realmedia": { source: "apache", extensions: ["rm"] }, "application/vnd.rn-realmedia-vbr": { source: "apache", extensions: ["rmvb"] }, "application/vnd.route66.link66+xml": { source: "iana", compressible: true, extensions: ["link66"] }, "application/vnd.rs-274x": { source: "iana" }, "application/vnd.ruckus.download": { source: "iana" }, "application/vnd.s3sms": { source: "iana" }, "application/vnd.sailingtracker.track": { source: "iana", extensions: ["st"] }, "application/vnd.sar": { source: "iana" }, "application/vnd.sbm.cid": { source: "iana" }, "application/vnd.sbm.mid2": { source: "iana" }, "application/vnd.scribus": { source: "iana" }, "application/vnd.sealed.3df": { source: "iana" }, "application/vnd.sealed.csf": { source: "iana" }, "application/vnd.sealed.doc": { source: "iana" }, "application/vnd.sealed.eml": { source: "iana" }, "application/vnd.sealed.mht": { source: "iana" }, "application/vnd.sealed.net": { source: "iana" }, "application/vnd.sealed.ppt": { source: "iana" }, "application/vnd.sealed.tiff": { source: "iana" }, "application/vnd.sealed.xls": { source: "iana" }, "application/vnd.sealedmedia.softseal.html": { source: "iana" }, "application/vnd.sealedmedia.softseal.pdf": { source: "iana" }, "application/vnd.seemail": { source: "iana", extensions: ["see"] }, "application/vnd.seis+json": { source: "iana", compressible: true }, "application/vnd.sema": { source: "iana", extensions: ["sema"] }, "application/vnd.semd": { source: "iana", extensions: ["semd"] }, "application/vnd.semf": { source: "iana", extensions: ["semf"] }, "application/vnd.shade-save-file": { source: "iana" }, "application/vnd.shana.informed.formdata": { source: "iana", extensions: ["ifm"] }, "application/vnd.shana.informed.formtemplate": { source: "iana", extensions: ["itp"] }, "application/vnd.shana.informed.interchange": { source: "iana", extensions: ["iif"] }, "application/vnd.shana.informed.package": { source: "iana", extensions: ["ipk"] }, "application/vnd.shootproof+json": { source: "iana", compressible: true }, "application/vnd.shopkick+json": { source: "iana", compressible: true }, "application/vnd.shp": { source: "iana" }, "application/vnd.shx": { source: "iana" }, "application/vnd.sigrok.session": { source: "iana" }, "application/vnd.simtech-mindmapper": { source: "iana", extensions: ["twd", "twds"] }, "application/vnd.siren+json": { source: "iana", compressible: true }, "application/vnd.smaf": { source: "iana", extensions: ["mmf"] }, "application/vnd.smart.notebook": { source: "iana" }, "application/vnd.smart.teacher": { source: "iana", extensions: ["teacher"] }, "application/vnd.snesdev-page-table": { source: "iana" }, "application/vnd.software602.filler.form+xml": { source: "iana", compressible: true, extensions: ["fo"] }, "application/vnd.software602.filler.form-xml-zip": { source: "iana" }, "application/vnd.solent.sdkm+xml": { source: "iana", compressible: true, extensions: ["sdkm", "sdkd"] }, "application/vnd.spotfire.dxp": { source: "iana", extensions: ["dxp"] }, "application/vnd.spotfire.sfs": { source: "iana", extensions: ["sfs"] }, "application/vnd.sqlite3": { source: "iana" }, "application/vnd.sss-cod": { source: "iana" }, "application/vnd.sss-dtf": { source: "iana" }, "application/vnd.sss-ntf": { source: "iana" }, "application/vnd.stardivision.calc": { source: "apache", extensions: ["sdc"] }, "application/vnd.stardivision.draw": { source: "apache", extensions: ["sda"] }, "application/vnd.stardivision.impress": { source: "apache", extensions: ["sdd"] }, "application/vnd.stardivision.math": { source: "apache", extensions: ["smf"] }, "application/vnd.stardivision.writer": { source: "apache", extensions: ["sdw", "vor"] }, "application/vnd.stardivision.writer-global": { source: "apache", extensions: ["sgl"] }, "application/vnd.stepmania.package": { source: "iana", extensions: ["smzip"] }, "application/vnd.stepmania.stepchart": { source: "iana", extensions: ["sm"] }, "application/vnd.street-stream": { source: "iana" }, "application/vnd.sun.wadl+xml": { source: "iana", compressible: true, extensions: ["wadl"] }, "application/vnd.sun.xml.calc": { source: "apache", extensions: ["sxc"] }, "application/vnd.sun.xml.calc.template": { source: "apache", extensions: ["stc"] }, "application/vnd.sun.xml.draw": { source: "apache", extensions: ["sxd"] }, "application/vnd.sun.xml.draw.template": { source: "apache", extensions: ["std"] }, "application/vnd.sun.xml.impress": { source: "apache", extensions: ["sxi"] }, "application/vnd.sun.xml.impress.template": { source: "apache", extensions: ["sti"] }, "application/vnd.sun.xml.math": { source: "apache", extensions: ["sxm"] }, "application/vnd.sun.xml.writer": { source: "apache", extensions: ["sxw"] }, "application/vnd.sun.xml.writer.global": { source: "apache", extensions: ["sxg"] }, "application/vnd.sun.xml.writer.template": { source: "apache", extensions: ["stw"] }, "application/vnd.sus-calendar": { source: "iana", extensions: ["sus", "susp"] }, "application/vnd.svd": { source: "iana", extensions: ["svd"] }, "application/vnd.swiftview-ics": { source: "iana" }, "application/vnd.sycle+xml": { source: "iana", compressible: true }, "application/vnd.syft+json": { source: "iana", compressible: true }, "application/vnd.symbian.install": { source: "apache", extensions: ["sis", "sisx"] }, "application/vnd.syncml+xml": { source: "iana", charset: "UTF-8", compressible: true, extensions: ["xsm"] }, "application/vnd.syncml.dm+wbxml": { source: "iana", charset: "UTF-8", extensions: ["bdm"] }, "application/vnd.syncml.dm+xml": { source: "iana", charset: "UTF-8", compressible: true, extensions: ["xdm"] }, "application/vnd.syncml.dm.notification": { source: "iana" }, "application/vnd.syncml.dmddf+wbxml": { source: "iana" }, "application/vnd.syncml.dmddf+xml": { source: "iana", charset: "UTF-8", compressible: true, extensions: ["ddf"] }, "application/vnd.syncml.dmtnds+wbxml": { source: "iana" }, "application/vnd.syncml.dmtnds+xml": { source: "iana", charset: "UTF-8", compressible: true }, "application/vnd.syncml.ds.notification": { source: "iana" }, "application/vnd.tableschema+json": { source: "iana", compressible: true }, "application/vnd.tao.intent-module-archive": { source: "iana", extensions: ["tao"] }, "application/vnd.tcpdump.pcap": { source: "iana", extensions: ["pcap", "cap", "dmp"] }, "application/vnd.think-cell.ppttc+json": { source: "iana", compressible: true }, "application/vnd.tmd.mediaflex.api+xml": { source: "iana", compressible: true }, "application/vnd.tml": { source: "iana" }, "application/vnd.tmobile-livetv": { source: "iana", extensions: ["tmo"] }, "application/vnd.tri.onesource": { source: "iana" }, "application/vnd.trid.tpt": { source: "iana", extensions: ["tpt"] }, "application/vnd.triscape.mxs": { source: "iana", extensions: ["mxs"] }, "application/vnd.trueapp": { source: "iana", extensions: ["tra"] }, "application/vnd.truedoc": { source: "iana" }, "application/vnd.ubisoft.webplayer": { source: "iana" }, "application/vnd.ufdl": { source: "iana", extensions: ["ufd", "ufdl"] }, "application/vnd.uiq.theme": { source: "iana", extensions: ["utz"] }, "application/vnd.umajin": { source: "iana", extensions: ["umj"] }, "application/vnd.unity": { source: "iana", extensions: ["unityweb"] }, "application/vnd.uoml+xml": { source: "iana", compressible: true, extensions: ["uoml"] }, "application/vnd.uplanet.alert": { source: "iana" }, "application/vnd.uplanet.alert-wbxml": { source: "iana" }, "application/vnd.uplanet.bearer-choice": { source: "iana" }, "application/vnd.uplanet.bearer-choice-wbxml": { source: "iana" }, "application/vnd.uplanet.cacheop": { source: "iana" }, "application/vnd.uplanet.cacheop-wbxml": { source: "iana" }, "application/vnd.uplanet.channel": { source: "iana" }, "application/vnd.uplanet.channel-wbxml": { source: "iana" }, "application/vnd.uplanet.list": { source: "iana" }, "application/vnd.uplanet.list-wbxml": { source: "iana" }, "application/vnd.uplanet.listcmd": { source: "iana" }, "application/vnd.uplanet.listcmd-wbxml": { source: "iana" }, "application/vnd.uplanet.signal": { source: "iana" }, "application/vnd.uri-map": { source: "iana" }, "application/vnd.valve.source.material": { source: "iana" }, "application/vnd.vcx": { source: "iana", extensions: ["vcx"] }, "application/vnd.vd-study": { source: "iana" }, "application/vnd.vectorworks": { source: "iana" }, "application/vnd.vel+json": { source: "iana", compressible: true }, "application/vnd.verimatrix.vcas": { source: "iana" }, "application/vnd.veritone.aion+json": { source: "iana", compressible: true }, "application/vnd.veryant.thin": { source: "iana" }, "application/vnd.ves.encrypted": { source: "iana" }, "application/vnd.vidsoft.vidconference": { source: "iana" }, "application/vnd.visio": { source: "iana", extensions: ["vsd", "vst", "vss", "vsw"] }, "application/vnd.visionary": { source: "iana", extensions: ["vis"] }, "application/vnd.vividence.scriptfile": { source: "iana" }, "application/vnd.vsf": { source: "iana", extensions: ["vsf"] }, "application/vnd.wap.sic": { source: "iana" }, "application/vnd.wap.slc": { source: "iana" }, "application/vnd.wap.wbxml": { source: "iana", charset: "UTF-8", extensions: ["wbxml"] }, "application/vnd.wap.wmlc": { source: "iana", extensions: ["wmlc"] }, "application/vnd.wap.wmlscriptc": { source: "iana", extensions: ["wmlsc"] }, "application/vnd.webturbo": { source: "iana", extensions: ["wtb"] }, "application/vnd.wfa.dpp": { source: "iana" }, "application/vnd.wfa.p2p": { source: "iana" }, "application/vnd.wfa.wsc": { source: "iana" }, "application/vnd.windows.devicepairing": { source: "iana" }, "application/vnd.wmc": { source: "iana" }, "application/vnd.wmf.bootstrap": { source: "iana" }, "application/vnd.wolfram.mathematica": { source: "iana" }, "application/vnd.wolfram.mathematica.package": { source: "iana" }, "application/vnd.wolfram.player": { source: "iana", extensions: ["nbp"] }, "application/vnd.wordperfect": { source: "iana", extensions: ["wpd"] }, "application/vnd.wqd": { source: "iana", extensions: ["wqd"] }, "application/vnd.wrq-hp3000-labelled": { source: "iana" }, "application/vnd.wt.stf": { source: "iana", extensions: ["stf"] }, "application/vnd.wv.csp+wbxml": { source: "iana" }, "application/vnd.wv.csp+xml": { source: "iana", compressible: true }, "application/vnd.wv.ssp+xml": { source: "iana", compressible: true }, "application/vnd.xacml+json": { source: "iana", compressible: true }, "application/vnd.xara": { source: "iana", extensions: ["xar"] }, "application/vnd.xfdl": { source: "iana", extensions: ["xfdl"] }, "application/vnd.xfdl.webform": { source: "iana" }, "application/vnd.xmi+xml": { source: "iana", compressible: true }, "application/vnd.xmpie.cpkg": { source: "iana" }, "application/vnd.xmpie.dpkg": { source: "iana" }, "application/vnd.xmpie.plan": { source: "iana" }, "application/vnd.xmpie.ppkg": { source: "iana" }, "application/vnd.xmpie.xlim": { source: "iana" }, "application/vnd.yamaha.hv-dic": { source: "iana", extensions: ["hvd"] }, "application/vnd.yamaha.hv-script": { source: "iana", extensions: ["hvs"] }, "application/vnd.yamaha.hv-voice": { source: "iana", extensions: ["hvp"] }, "application/vnd.yamaha.openscoreformat": { source: "iana", extensions: ["osf"] }, "application/vnd.yamaha.openscoreformat.osfpvg+xml": { source: "iana", compressible: true, extensions: ["osfpvg"] }, "application/vnd.yamaha.remote-setup": { source: "iana" }, "application/vnd.yamaha.smaf-audio": { source: "iana", extensions: ["saf"] }, "application/vnd.yamaha.smaf-phrase": { source: "iana", extensions: ["spf"] }, "application/vnd.yamaha.through-ngn": { source: "iana" }, "application/vnd.yamaha.tunnel-udpencap": { source: "iana" }, "application/vnd.yaoweme": { source: "iana" }, "application/vnd.yellowriver-custom-menu": { source: "iana", extensions: ["cmp"] }, "application/vnd.youtube.yt": { source: "iana" }, "application/vnd.zul": { source: "iana", extensions: ["zir", "zirz"] }, "application/vnd.zzazz.deck+xml": { source: "iana", compressible: true, extensions: ["zaz"] }, "application/voicexml+xml": { source: "iana", compressible: true, extensions: ["vxml"] }, "application/voucher-cms+json": { source: "iana", compressible: true }, "application/vq-rtcpxr": { source: "iana" }, "application/wasm": { source: "iana", compressible: true, extensions: ["wasm"] }, "application/watcherinfo+xml": { source: "iana", compressible: true, extensions: ["wif"] }, "application/webpush-options+json": { source: "iana", compressible: true }, "application/whoispp-query": { source: "iana" }, "application/whoispp-response": { source: "iana" }, "application/widget": { source: "iana", extensions: ["wgt"] }, "application/winhlp": { source: "apache", extensions: ["hlp"] }, "application/wita": { source: "iana" }, "application/wordperfect5.1": { source: "iana" }, "application/wsdl+xml": { source: "iana", compressible: true, extensions: ["wsdl"] }, "application/wspolicy+xml": { source: "iana", compressible: true, extensions: ["wspolicy"] }, "application/x-7z-compressed": { source: "apache", compressible: false, extensions: ["7z"] }, "application/x-abiword": { source: "apache", extensions: ["abw"] }, "application/x-ace-compressed": { source: "apache", extensions: ["ace"] }, "application/x-amf": { source: "apache" }, "application/x-apple-diskimage": { source: "apache", extensions: ["dmg"] }, "application/x-arj": { compressible: false, extensions: ["arj"] }, "application/x-authorware-bin": { source: "apache", extensions: ["aab", "x32", "u32", "vox"] }, "application/x-authorware-map": { source: "apache", extensions: ["aam"] }, "application/x-authorware-seg": { source: "apache", extensions: ["aas"] }, "application/x-bcpio": { source: "apache", extensions: ["bcpio"] }, "application/x-bdoc": { compressible: false, extensions: ["bdoc"] }, "application/x-bittorrent": { source: "apache", extensions: ["torrent"] }, "application/x-blorb": { source: "apache", extensions: ["blb", "blorb"] }, "application/x-bzip": { source: "apache", compressible: false, extensions: ["bz"] }, "application/x-bzip2": { source: "apache", compressible: false, extensions: ["bz2", "boz"] }, "application/x-cbr": { source: "apache", extensions: ["cbr", "cba", "cbt", "cbz", "cb7"] }, "application/x-cdlink": { source: "apache", extensions: ["vcd"] }, "application/x-cfs-compressed": { source: "apache", extensions: ["cfs"] }, "application/x-chat": { source: "apache", extensions: ["chat"] }, "application/x-chess-pgn": { source: "apache", extensions: ["pgn"] }, "application/x-chrome-extension": { extensions: ["crx"] }, "application/x-cocoa": { source: "nginx", extensions: ["cco"] }, "application/x-compress": { source: "apache" }, "application/x-conference": { source: "apache", extensions: ["nsc"] }, "application/x-cpio": { source: "apache", extensions: ["cpio"] }, "application/x-csh": { source: "apache", extensions: ["csh"] }, "application/x-deb": { compressible: false }, "application/x-debian-package": { source: "apache", extensions: ["deb", "udeb"] }, "application/x-dgc-compressed": { source: "apache", extensions: ["dgc"] }, "application/x-director": { source: "apache", extensions: ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"] }, "application/x-doom": { source: "apache", extensions: ["wad"] }, "application/x-dtbncx+xml": { source: "apache", compressible: true, extensions: ["ncx"] }, "application/x-dtbook+xml": { source: "apache", compressible: true, extensions: ["dtb"] }, "application/x-dtbresource+xml": { source: "apache", compressible: true, extensions: ["res"] }, "application/x-dvi": { source: "apache", compressible: false, extensions: ["dvi"] }, "application/x-envoy": { source: "apache", extensions: ["evy"] }, "application/x-eva": { source: "apache", extensions: ["eva"] }, "application/x-font-bdf": { source: "apache", extensions: ["bdf"] }, "application/x-font-dos": { source: "apache" }, "application/x-font-framemaker": { source: "apache" }, "application/x-font-ghostscript": { source: "apache", extensions: ["gsf"] }, "application/x-font-libgrx": { source: "apache" }, "application/x-font-linux-psf": { source: "apache", extensions: ["psf"] }, "application/x-font-pcf": { source: "apache", extensions: ["pcf"] }, "application/x-font-snf": { source: "apache", extensions: ["snf"] }, "application/x-font-speedo": { source: "apache" }, "application/x-font-sunos-news": { source: "apache" }, "application/x-font-type1": { source: "apache", extensions: ["pfa", "pfb", "pfm", "afm"] }, "application/x-font-vfont": { source: "apache" }, "application/x-freearc": { source: "apache", extensions: ["arc"] }, "application/x-futuresplash": { source: "apache", extensions: ["spl"] }, "application/x-gca-compressed": { source: "apache", extensions: ["gca"] }, "application/x-glulx": { source: "apache", extensions: ["ulx"] }, "application/x-gnumeric": { source: "apache", extensions: ["gnumeric"] }, "application/x-gramps-xml": { source: "apache", extensions: ["gramps"] }, "application/x-gtar": { source: "apache", extensions: ["gtar"] }, "application/x-gzip": { source: "apache" }, "application/x-hdf": { source: "apache", extensions: ["hdf"] }, "application/x-httpd-php": { compressible: true, extensions: ["php"] }, "application/x-install-instructions": { source: "apache", extensions: ["install"] }, "application/x-iso9660-image": { source: "apache", extensions: ["iso"] }, "application/x-iwork-keynote-sffkey": { extensions: ["key"] }, "application/x-iwork-numbers-sffnumbers": { extensions: ["numbers"] }, "application/x-iwork-pages-sffpages": { extensions: ["pages"] }, "application/x-java-archive-diff": { source: "nginx", extensions: ["jardiff"] }, "application/x-java-jnlp-file": { source: "apache", compressible: false, extensions: ["jnlp"] }, "application/x-javascript": { compressible: true }, "application/x-keepass2": { extensions: ["kdbx"] }, "application/x-latex": { source: "apache", compressible: false, extensions: ["latex"] }, "application/x-lua-bytecode": { extensions: ["luac"] }, "application/x-lzh-compressed": { source: "apache", extensions: ["lzh", "lha"] }, "application/x-makeself": { source: "nginx", extensions: ["run"] }, "application/x-mie": { source: "apache", extensions: ["mie"] }, "application/x-mobipocket-ebook": { source: "apache", extensions: ["prc", "mobi"] }, "application/x-mpegurl": { compressible: false }, "application/x-ms-application": { source: "apache", extensions: ["application"] }, "application/x-ms-shortcut": { source: "apache", extensions: ["lnk"] }, "application/x-ms-wmd": { source: "apache", extensions: ["wmd"] }, "application/x-ms-wmz": { source: "apache", extensions: ["wmz"] }, "application/x-ms-xbap": { source: "apache", extensions: ["xbap"] }, "application/x-msaccess": { source: "apache", extensions: ["mdb"] }, "application/x-msbinder": { source: "apache", extensions: ["obd"] }, "application/x-mscardfile": { source: "apache", extensions: ["crd"] }, "application/x-msclip": { source: "apache", extensions: ["clp"] }, "application/x-msdos-program": { extensions: ["exe"] }, "application/x-msdownload": { source: "apache", extensions: ["exe", "dll", "com", "bat", "msi"] }, "application/x-msmediaview": { source: "apache", extensions: ["mvb", "m13", "m14"] }, "application/x-msmetafile": { source: "apache", extensions: ["wmf", "wmz", "emf", "emz"] }, "application/x-msmoney": { source: "apache", extensions: ["mny"] }, "application/x-mspublisher": { source: "apache", extensions: ["pub"] }, "application/x-msschedule": { source: "apache", extensions: ["scd"] }, "application/x-msterminal": { source: "apache", extensions: ["trm"] }, "application/x-mswrite": { source: "apache", extensions: ["wri"] }, "application/x-netcdf": { source: "apache", extensions: ["nc", "cdf"] }, "application/x-ns-proxy-autoconfig": { compressible: true, extensions: ["pac"] }, "application/x-nzb": { source: "apache", extensions: ["nzb"] }, "application/x-perl": { source: "nginx", extensions: ["pl", "pm"] }, "application/x-pilot": { source: "nginx", extensions: ["prc", "pdb"] }, "application/x-pkcs12": { source: "apache", compressible: false, extensions: ["p12", "pfx"] }, "application/x-pkcs7-certificates": { source: "apache", extensions: ["p7b", "spc"] }, "application/x-pkcs7-certreqresp": { source: "apache", extensions: ["p7r"] }, "application/x-pki-message": { source: "iana" }, "application/x-rar-compressed": { source: "apache", compressible: false, extensions: ["rar"] }, "application/x-redhat-package-manager": { source: "nginx", extensions: ["rpm"] }, "application/x-research-info-systems": { source: "apache", extensions: ["ris"] }, "application/x-sea": { source: "nginx", extensions: ["sea"] }, "application/x-sh": { source: "apache", compressible: true, extensions: ["sh"] }, "application/x-shar": { source: "apache", extensions: ["shar"] }, "application/x-shockwave-flash": { source: "apache", compressible: false, extensions: ["swf"] }, "application/x-silverlight-app": { source: "apache", extensions: ["xap"] }, "application/x-sql": { source: "apache", extensions: ["sql"] }, "application/x-stuffit": { source: "apache", compressible: false, extensions: ["sit"] }, "application/x-stuffitx": { source: "apache", extensions: ["sitx"] }, "application/x-subrip": { source: "apache", extensions: ["srt"] }, "application/x-sv4cpio": { source: "apache", extensions: ["sv4cpio"] }, "application/x-sv4crc": { source: "apache", extensions: ["sv4crc"] }, "application/x-t3vm-image": { source: "apache", extensions: ["t3"] }, "application/x-tads": { source: "apache", extensions: ["gam"] }, "application/x-tar": { source: "apache", compressible: true, extensions: ["tar"] }, "application/x-tcl": { source: "apache", extensions: ["tcl", "tk"] }, "application/x-tex": { source: "apache", extensions: ["tex"] }, "application/x-tex-tfm": { source: "apache", extensions: ["tfm"] }, "application/x-texinfo": { source: "apache", extensions: ["texinfo", "texi"] }, "application/x-tgif": { source: "apache", extensions: ["obj"] }, "application/x-ustar": { source: "apache", extensions: ["ustar"] }, "application/x-virtualbox-hdd": { compressible: true, extensions: ["hdd"] }, "application/x-virtualbox-ova": { compressible: true, extensions: ["ova"] }, "application/x-virtualbox-ovf": { compressible: true, extensions: ["ovf"] }, "application/x-virtualbox-vbox": { compressible: true, extensions: ["vbox"] }, "application/x-virtualbox-vbox-extpack": { compressible: false, extensions: ["vbox-extpack"] }, "application/x-virtualbox-vdi": { compressible: true, extensions: ["vdi"] }, "application/x-virtualbox-vhd": { compressible: true, extensions: ["vhd"] }, "application/x-virtualbox-vmdk": { compressible: true, extensions: ["vmdk"] }, "application/x-wais-source": { source: "apache", extensions: ["src"] }, "application/x-web-app-manifest+json": { compressible: true, extensions: ["webapp"] }, "application/x-www-form-urlencoded": { source: "iana", compressible: true }, "application/x-x509-ca-cert": { source: "iana", extensions: ["der", "crt", "pem"] }, "application/x-x509-ca-ra-cert": { source: "iana" }, "application/x-x509-next-ca-cert": { source: "iana" }, "application/x-xfig": { source: "apache", extensions: ["fig"] }, "application/x-xliff+xml": { source: "apache", compressible: true, extensions: ["xlf"] }, "application/x-xpinstall": { source: "apache", compressible: false, extensions: ["xpi"] }, "application/x-xz": { source: "apache", extensions: ["xz"] }, "application/x-zmachine": { source: "apache", extensions: ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"] }, "application/x400-bp": { source: "iana" }, "application/xacml+xml": { source: "iana", compressible: true }, "application/xaml+xml": { source: "apache", compressible: true, extensions: ["xaml"] }, "application/xcap-att+xml": { source: "iana", compressible: true, extensions: ["xav"] }, "application/xcap-caps+xml": { source: "iana", compressible: true, extensions: ["xca"] }, "application/xcap-diff+xml": { source: "iana", compressible: true, extensions: ["xdf"] }, "application/xcap-el+xml": { source: "iana", compressible: true, extensions: ["xel"] }, "application/xcap-error+xml": { source: "iana", compressible: true }, "application/xcap-ns+xml": { source: "iana", compressible: true, extensions: ["xns"] }, "application/xcon-conference-info+xml": { source: "iana", compressible: true }, "application/xcon-conference-info-diff+xml": { source: "iana", compressible: true }, "application/xenc+xml": { source: "iana", compressible: true, extensions: ["xenc"] }, "application/xhtml+xml": { source: "iana", compressible: true, extensions: ["xhtml", "xht"] }, "application/xhtml-voice+xml": { source: "apache", compressible: true }, "application/xliff+xml": { source: "iana", compressible: true, extensions: ["xlf"] }, "application/xml": { source: "iana", compressible: true, extensions: ["xml", "xsl", "xsd", "rng"] }, "application/xml-dtd": { source: "iana", compressible: true, extensions: ["dtd"] }, "application/xml-external-parsed-entity": { source: "iana" }, "application/xml-patch+xml": { source: "iana", compressible: true }, "application/xmpp+xml": { source: "iana", compressible: true }, "application/xop+xml": { source: "iana", compressible: true, extensions: ["xop"] }, "application/xproc+xml": { source: "apache", compressible: true, extensions: ["xpl"] }, "application/xslt+xml": { source: "iana", compressible: true, extensions: ["xsl", "xslt"] }, "application/xspf+xml": { source: "apache", compressible: true, extensions: ["xspf"] }, "application/xv+xml": { source: "iana", compressible: true, extensions: ["mxml", "xhvml", "xvml", "xvm"] }, "application/yang": { source: "iana", extensions: ["yang"] }, "application/yang-data+json": { source: "iana", compressible: true }, "application/yang-data+xml": { source: "iana", compressible: true }, "application/yang-patch+json": { source: "iana", compressible: true }, "application/yang-patch+xml": { source: "iana", compressible: true }, "application/yin+xml": { source: "iana", compressible: true, extensions: ["yin"] }, "application/zip": { source: "iana", compressible: false, extensions: ["zip"] }, "application/zlib": { source: "iana" }, "application/zstd": { source: "iana" }, "audio/1d-interleaved-parityfec": { source: "iana" }, "audio/32kadpcm": { source: "iana" }, "audio/3gpp": { source: "iana", compressible: false, extensions: ["3gpp"] }, "audio/3gpp2": { source: "iana" }, "audio/aac": { source: "iana" }, "audio/ac3": { source: "iana" }, "audio/adpcm": { source: "apache", extensions: ["adp"] }, "audio/amr": { source: "iana", extensions: ["amr"] }, "audio/amr-wb": { source: "iana" }, "audio/amr-wb+": { source: "iana" }, "audio/aptx": { source: "iana" }, "audio/asc": { source: "iana" }, "audio/atrac-advanced-lossless": { source: "iana" }, "audio/atrac-x": { source: "iana" }, "audio/atrac3": { source: "iana" }, "audio/basic": { source: "iana", compressible: false, extensions: ["au", "snd"] }, "audio/bv16": { source: "iana" }, "audio/bv32": { source: "iana" }, "audio/clearmode": { source: "iana" }, "audio/cn": { source: "iana" }, "audio/dat12": { source: "iana" }, "audio/dls": { source: "iana" }, "audio/dsr-es201108": { source: "iana" }, "audio/dsr-es202050": { source: "iana" }, "audio/dsr-es202211": { source: "iana" }, "audio/dsr-es202212": { source: "iana" }, "audio/dv": { source: "iana" }, "audio/dvi4": { source: "iana" }, "audio/eac3": { source: "iana" }, "audio/encaprtp": { source: "iana" }, "audio/evrc": { source: "iana" }, "audio/evrc-qcp": { source: "iana" }, "audio/evrc0": { source: "iana" }, "audio/evrc1": { source: "iana" }, "audio/evrcb": { source: "iana" }, "audio/evrcb0": { source: "iana" }, "audio/evrcb1": { source: "iana" }, "audio/evrcnw": { source: "iana" }, "audio/evrcnw0": { source: "iana" }, "audio/evrcnw1": { source: "iana" }, "audio/evrcwb": { source: "iana" }, "audio/evrcwb0": { source: "iana" }, "audio/evrcwb1": { source: "iana" }, "audio/evs": { source: "iana" }, "audio/flexfec": { source: "iana" }, "audio/fwdred": { source: "iana" }, "audio/g711-0": { source: "iana" }, "audio/g719": { source: "iana" }, "audio/g722": { source: "iana" }, "audio/g7221": { source: "iana" }, "audio/g723": { source: "iana" }, "audio/g726-16": { source: "iana" }, "audio/g726-24": { source: "iana" }, "audio/g726-32": { source: "iana" }, "audio/g726-40": { source: "iana" }, "audio/g728": { source: "iana" }, "audio/g729": { source: "iana" }, "audio/g7291": { source: "iana" }, "audio/g729d": { source: "iana" }, "audio/g729e": { source: "iana" }, "audio/gsm": { source: "iana" }, "audio/gsm-efr": { source: "iana" }, "audio/gsm-hr-08": { source: "iana" }, "audio/ilbc": { source: "iana" }, "audio/ip-mr_v2.5": { source: "iana" }, "audio/isac": { source: "apache" }, "audio/l16": { source: "iana" }, "audio/l20": { source: "iana" }, "audio/l24": { source: "iana", compressible: false }, "audio/l8": { source: "iana" }, "audio/lpc": { source: "iana" }, "audio/melp": { source: "iana" }, "audio/melp1200": { source: "iana" }, "audio/melp2400": { source: "iana" }, "audio/melp600": { source: "iana" }, "audio/mhas": { source: "iana" }, "audio/midi": { source: "apache", extensions: ["mid", "midi", "kar", "rmi"] }, "audio/mobile-xmf": { source: "iana", extensions: ["mxmf"] }, "audio/mp3": { compressible: false, extensions: ["mp3"] }, "audio/mp4": { source: "iana", compressible: false, extensions: ["m4a", "mp4a"] }, "audio/mp4a-latm": { source: "iana" }, "audio/mpa": { source: "iana" }, "audio/mpa-robust": { source: "iana" }, "audio/mpeg": { source: "iana", compressible: false, extensions: ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"] }, "audio/mpeg4-generic": { source: "iana" }, "audio/musepack": { source: "apache" }, "audio/ogg": { source: "iana", compressible: false, extensions: ["oga", "ogg", "spx", "opus"] }, "audio/opus": { source: "iana" }, "audio/parityfec": { source: "iana" }, "audio/pcma": { source: "iana" }, "audio/pcma-wb": { source: "iana" }, "audio/pcmu": { source: "iana" }, "audio/pcmu-wb": { source: "iana" }, "audio/prs.sid": { source: "iana" }, "audio/qcelp": { source: "iana" }, "audio/raptorfec": { source: "iana" }, "audio/red": { source: "iana" }, "audio/rtp-enc-aescm128": { source: "iana" }, "audio/rtp-midi": { source: "iana" }, "audio/rtploopback": { source: "iana" }, "audio/rtx": { source: "iana" }, "audio/s3m": { source: "apache", extensions: ["s3m"] }, "audio/scip": { source: "iana" }, "audio/silk": { source: "apache", extensions: ["sil"] }, "audio/smv": { source: "iana" }, "audio/smv-qcp": { source: "iana" }, "audio/smv0": { source: "iana" }, "audio/sofa": { source: "iana" }, "audio/sp-midi": { source: "iana" }, "audio/speex": { source: "iana" }, "audio/t140c": { source: "iana" }, "audio/t38": { source: "iana" }, "audio/telephone-event": { source: "iana" }, "audio/tetra_acelp": { source: "iana" }, "audio/tetra_acelp_bb": { source: "iana" }, "audio/tone": { source: "iana" }, "audio/tsvcis": { source: "iana" }, "audio/uemclip": { source: "iana" }, "audio/ulpfec": { source: "iana" }, "audio/usac": { source: "iana" }, "audio/vdvi": { source: "iana" }, "audio/vmr-wb": { source: "iana" }, "audio/vnd.3gpp.iufp": { source: "iana" }, "audio/vnd.4sb": { source: "iana" }, "audio/vnd.audiokoz": { source: "iana" }, "audio/vnd.celp": { source: "iana" }, "audio/vnd.cisco.nse": { source: "iana" }, "audio/vnd.cmles.radio-events": { source: "iana" }, "audio/vnd.cns.anp1": { source: "iana" }, "audio/vnd.cns.inf1": { source: "iana" }, "audio/vnd.dece.audio": { source: "iana", extensions: ["uva", "uvva"] }, "audio/vnd.digital-winds": { source: "iana", extensions: ["eol"] }, "audio/vnd.dlna.adts": { source: "iana" }, "audio/vnd.dolby.heaac.1": { source: "iana" }, "audio/vnd.dolby.heaac.2": { source: "iana" }, "audio/vnd.dolby.mlp": { source: "iana" }, "audio/vnd.dolby.mps": { source: "iana" }, "audio/vnd.dolby.pl2": { source: "iana" }, "audio/vnd.dolby.pl2x": { source: "iana" }, "audio/vnd.dolby.pl2z": { source: "iana" }, "audio/vnd.dolby.pulse.1": { source: "iana" }, "audio/vnd.dra": { source: "iana", extensions: ["dra"] }, "audio/vnd.dts": { source: "iana", extensions: ["dts"] }, "audio/vnd.dts.hd": { source: "iana", extensions: ["dtshd"] }, "audio/vnd.dts.uhd": { source: "iana" }, "audio/vnd.dvb.file": { source: "iana" }, "audio/vnd.everad.plj": { source: "iana" }, "audio/vnd.hns.audio": { source: "iana" }, "audio/vnd.lucent.voice": { source: "iana", extensions: ["lvp"] }, "audio/vnd.ms-playready.media.pya": { source: "iana", extensions: ["pya"] }, "audio/vnd.nokia.mobile-xmf": { source: "iana" }, "audio/vnd.nortel.vbk": { source: "iana" }, "audio/vnd.nuera.ecelp4800": { source: "iana", extensions: ["ecelp4800"] }, "audio/vnd.nuera.ecelp7470": { source: "iana", extensions: ["ecelp7470"] }, "audio/vnd.nuera.ecelp9600": { source: "iana", extensions: ["ecelp9600"] }, "audio/vnd.octel.sbc": { source: "iana" }, "audio/vnd.presonus.multitrack": { source: "iana" }, "audio/vnd.qcelp": { source: "iana" }, "audio/vnd.rhetorex.32kadpcm": { source: "iana" }, "audio/vnd.rip": { source: "iana", extensions: ["rip"] }, "audio/vnd.rn-realaudio": { compressible: false }, "audio/vnd.sealedmedia.softseal.mpeg": { source: "iana" }, "audio/vnd.vmx.cvsd": { source: "iana" }, "audio/vnd.wave": { compressible: false }, "audio/vorbis": { source: "iana", compressible: false }, "audio/vorbis-config": { source: "iana" }, "audio/wav": { compressible: false, extensions: ["wav"] }, "audio/wave": { compressible: false, extensions: ["wav"] }, "audio/webm": { source: "apache", compressible: false, extensions: ["weba"] }, "audio/x-aac": { source: "apache", compressible: false, extensions: ["aac"] }, "audio/x-aiff": { source: "apache", extensions: ["aif", "aiff", "aifc"] }, "audio/x-caf": { source: "apache", compressible: false, extensions: ["caf"] }, "audio/x-flac": { source: "apache", extensions: ["flac"] }, "audio/x-m4a": { source: "nginx", extensions: ["m4a"] }, "audio/x-matroska": { source: "apache", extensions: ["mka"] }, "audio/x-mpegurl": { source: "apache", extensions: ["m3u"] }, "audio/x-ms-wax": { source: "apache", extensions: ["wax"] }, "audio/x-ms-wma": { source: "apache", extensions: ["wma"] }, "audio/x-pn-realaudio": { source: "apache", extensions: ["ram", "ra"] }, "audio/x-pn-realaudio-plugin": { source: "apache", extensions: ["rmp"] }, "audio/x-realaudio": { source: "nginx", extensions: ["ra"] }, "audio/x-tta": { source: "apache" }, "audio/x-wav": { source: "apache", extensions: ["wav"] }, "audio/xm": { source: "apache", extensions: ["xm"] }, "chemical/x-cdx": { source: "apache", extensions: ["cdx"] }, "chemical/x-cif": { source: "apache", extensions: ["cif"] }, "chemical/x-cmdf": { source: "apache", extensions: ["cmdf"] }, "chemical/x-cml": { source: "apache", extensions: ["cml"] }, "chemical/x-csml": { source: "apache", extensions: ["csml"] }, "chemical/x-pdb": { source: "apache" }, "chemical/x-xyz": { source: "apache", extensions: ["xyz"] }, "font/collection": { source: "iana", extensions: ["ttc"] }, "font/otf": { source: "iana", compressible: true, extensions: ["otf"] }, "font/sfnt": { source: "iana" }, "font/ttf": { source: "iana", compressible: true, extensions: ["ttf"] }, "font/woff": { source: "iana", extensions: ["woff"] }, "font/woff2": { source: "iana", extensions: ["woff2"] }, "image/aces": { source: "iana", extensions: ["exr"] }, "image/apng": { compressible: false, extensions: ["apng"] }, "image/avci": { source: "iana", extensions: ["avci"] }, "image/avcs": { source: "iana", extensions: ["avcs"] }, "image/avif": { source: "iana", compressible: false, extensions: ["avif"] }, "image/bmp": { source: "iana", compressible: true, extensions: ["bmp"] }, "image/cgm": { source: "iana", extensions: ["cgm"] }, "image/dicom-rle": { source: "iana", extensions: ["drle"] }, "image/emf": { source: "iana", extensions: ["emf"] }, "image/fits": { source: "iana", extensions: ["fits"] }, "image/g3fax": { source: "iana", extensions: ["g3"] }, "image/gif": { source: "iana", compressible: false, extensions: ["gif"] }, "image/heic": { source: "iana", extensions: ["heic"] }, "image/heic-sequence": { source: "iana", extensions: ["heics"] }, "image/heif": { source: "iana", extensions: ["heif"] }, "image/heif-sequence": { source: "iana", extensions: ["heifs"] }, "image/hej2k": { source: "iana", extensions: ["hej2"] }, "image/hsj2": { source: "iana", extensions: ["hsj2"] }, "image/ief": { source: "iana", extensions: ["ief"] }, "image/jls": { source: "iana", extensions: ["jls"] }, "image/jp2": { source: "iana", compressible: false, extensions: ["jp2", "jpg2"] }, "image/jpeg": { source: "iana", compressible: false, extensions: ["jpeg", "jpg", "jpe"] }, "image/jph": { source: "iana", extensions: ["jph"] }, "image/jphc": { source: "iana", extensions: ["jhc"] }, "image/jpm": { source: "iana", compressible: false, extensions: ["jpm"] }, "image/jpx": { source: "iana", compressible: false, extensions: ["jpx", "jpf"] }, "image/jxr": { source: "iana", extensions: ["jxr"] }, "image/jxra": { source: "iana", extensions: ["jxra"] }, "image/jxrs": { source: "iana", extensions: ["jxrs"] }, "image/jxs": { source: "iana", extensions: ["jxs"] }, "image/jxsc": { source: "iana", extensions: ["jxsc"] }, "image/jxsi": { source: "iana", extensions: ["jxsi"] }, "image/jxss": { source: "iana", extensions: ["jxss"] }, "image/ktx": { source: "iana", extensions: ["ktx"] }, "image/ktx2": { source: "iana", extensions: ["ktx2"] }, "image/naplps": { source: "iana" }, "image/pjpeg": { compressible: false }, "image/png": { source: "iana", compressible: false, extensions: ["png"] }, "image/prs.btif": { source: "iana", extensions: ["btif"] }, "image/prs.pti": { source: "iana", extensions: ["pti"] }, "image/pwg-raster": { source: "iana" }, "image/sgi": { source: "apache", extensions: ["sgi"] }, "image/svg+xml": { source: "iana", compressible: true, extensions: ["svg", "svgz"] }, "image/t38": { source: "iana", extensions: ["t38"] }, "image/tiff": { source: "iana", compressible: false, extensions: ["tif", "tiff"] }, "image/tiff-fx": { source: "iana", extensions: ["tfx"] }, "image/vnd.adobe.photoshop": { source: "iana", compressible: true, extensions: ["psd"] }, "image/vnd.airzip.accelerator.azv": { source: "iana", extensions: ["azv"] }, "image/vnd.cns.inf2": { source: "iana" }, "image/vnd.dece.graphic": { source: "iana", extensions: ["uvi", "uvvi", "uvg", "uvvg"] }, "image/vnd.djvu": { source: "iana", extensions: ["djvu", "djv"] }, "image/vnd.dvb.subtitle": { source: "iana", extensions: ["sub"] }, "image/vnd.dwg": { source: "iana", extensions: ["dwg"] }, "image/vnd.dxf": { source: "iana", extensions: ["dxf"] }, "image/vnd.fastbidsheet": { source: "iana", extensions: ["fbs"] }, "image/vnd.fpx": { source: "iana", extensions: ["fpx"] }, "image/vnd.fst": { source: "iana", extensions: ["fst"] }, "image/vnd.fujixerox.edmics-mmr": { source: "iana", extensions: ["mmr"] }, "image/vnd.fujixerox.edmics-rlc": { source: "iana", extensions: ["rlc"] }, "image/vnd.globalgraphics.pgb": { source: "iana" }, "image/vnd.microsoft.icon": { source: "iana", compressible: true, extensions: ["ico"] }, "image/vnd.mix": { source: "iana" }, "image/vnd.mozilla.apng": { source: "iana" }, "image/vnd.ms-dds": { compressible: true, extensions: ["dds"] }, "image/vnd.ms-modi": { source: "iana", extensions: ["mdi"] }, "image/vnd.ms-photo": { source: "apache", extensions: ["wdp"] }, "image/vnd.net-fpx": { source: "iana", extensions: ["npx"] }, "image/vnd.pco.b16": { source: "iana", extensions: ["b16"] }, "image/vnd.radiance": { source: "iana" }, "image/vnd.sealed.png": { source: "iana" }, "image/vnd.sealedmedia.softseal.gif": { source: "iana" }, "image/vnd.sealedmedia.softseal.jpg": { source: "iana" }, "image/vnd.svf": { source: "iana" }, "image/vnd.tencent.tap": { source: "iana", extensions: ["tap"] }, "image/vnd.valve.source.texture": { source: "iana", extensions: ["vtf"] }, "image/vnd.wap.wbmp": { source: "iana", extensions: ["wbmp"] }, "image/vnd.xiff": { source: "iana", extensions: ["xif"] }, "image/vnd.zbrush.pcx": { source: "iana", extensions: ["pcx"] }, "image/webp": { source: "apache", extensions: ["webp"] }, "image/wmf": { source: "iana", extensions: ["wmf"] }, "image/x-3ds": { source: "apache", extensions: ["3ds"] }, "image/x-cmu-raster": { source: "apache", extensions: ["ras"] }, "image/x-cmx": { source: "apache", extensions: ["cmx"] }, "image/x-freehand": { source: "apache", extensions: ["fh", "fhc", "fh4", "fh5", "fh7"] }, "image/x-icon": { source: "apache", compressible: true, extensions: ["ico"] }, "image/x-jng": { source: "nginx", extensions: ["jng"] }, "image/x-mrsid-image": { source: "apache", extensions: ["sid"] }, "image/x-ms-bmp": { source: "nginx", compressible: true, extensions: ["bmp"] }, "image/x-pcx": { source: "apache", extensions: ["pcx"] }, "image/x-pict": { source: "apache", extensions: ["pic", "pct"] }, "image/x-portable-anymap": { source: "apache", extensions: ["pnm"] }, "image/x-portable-bitmap": { source: "apache", extensions: ["pbm"] }, "image/x-portable-graymap": { source: "apache", extensions: ["pgm"] }, "image/x-portable-pixmap": { source: "apache", extensions: ["ppm"] }, "image/x-rgb": { source: "apache", extensions: ["rgb"] }, "image/x-tga": { source: "apache", extensions: ["tga"] }, "image/x-xbitmap": { source: "apache", extensions: ["xbm"] }, "image/x-xcf": { compressible: false }, "image/x-xpixmap": { source: "apache", extensions: ["xpm"] }, "image/x-xwindowdump": { source: "apache", extensions: ["xwd"] }, "message/cpim": { source: "iana" }, "message/delivery-status": { source: "iana" }, "message/disposition-notification": { source: "iana", extensions: ["disposition-notification"] }, "message/external-body": { source: "iana" }, "message/feedback-report": { source: "iana" }, "message/global": { source: "iana", extensions: ["u8msg"] }, "message/global-delivery-status": { source: "iana", extensions: ["u8dsn"] }, "message/global-disposition-notification": { source: "iana", extensions: ["u8mdn"] }, "message/global-headers": { source: "iana", extensions: ["u8hdr"] }, "message/http": { source: "iana", compressible: false }, "message/imdn+xml": { source: "iana", compressible: true }, "message/news": { source: "iana" }, "message/partial": { source: "iana", compressible: false }, "message/rfc822": { source: "iana", compressible: true, extensions: ["eml", "mime"] }, "message/s-http": { source: "iana" }, "message/sip": { source: "iana" }, "message/sipfrag": { source: "iana" }, "message/tracking-status": { source: "iana" }, "message/vnd.si.simp": { source: "iana" }, "message/vnd.wfa.wsc": { source: "iana", extensions: ["wsc"] }, "model/3mf": { source: "iana", extensions: ["3mf"] }, "model/e57": { source: "iana" }, "model/gltf+json": { source: "iana", compressible: true, extensions: ["gltf"] }, "model/gltf-binary": { source: "iana", compressible: true, extensions: ["glb"] }, "model/iges": { source: "iana", compressible: false, extensions: ["igs", "iges"] }, "model/mesh": { source: "iana", compressible: false, extensions: ["msh", "mesh", "silo"] }, "model/mtl": { source: "iana", extensions: ["mtl"] }, "model/obj": { source: "iana", extensions: ["obj"] }, "model/step": { source: "iana" }, "model/step+xml": { source: "iana", compressible: true, extensions: ["stpx"] }, "model/step+zip": { source: "iana", compressible: false, extensions: ["stpz"] }, "model/step-xml+zip": { source: "iana", compressible: false, extensions: ["stpxz"] }, "model/stl": { source: "iana", extensions: ["stl"] }, "model/vnd.collada+xml": { source: "iana", compressible: true, extensions: ["dae"] }, "model/vnd.dwf": { source: "iana", extensions: ["dwf"] }, "model/vnd.flatland.3dml": { source: "iana" }, "model/vnd.gdl": { source: "iana", extensions: ["gdl"] }, "model/vnd.gs-gdl": { source: "apache" }, "model/vnd.gs.gdl": { source: "iana" }, "model/vnd.gtw": { source: "iana", extensions: ["gtw"] }, "model/vnd.moml+xml": { source: "iana", compressible: true }, "model/vnd.mts": { source: "iana", extensions: ["mts"] }, "model/vnd.opengex": { source: "iana", extensions: ["ogex"] }, "model/vnd.parasolid.transmit.binary": { source: "iana", extensions: ["x_b"] }, "model/vnd.parasolid.transmit.text": { source: "iana", extensions: ["x_t"] }, "model/vnd.pytha.pyox": { source: "iana" }, "model/vnd.rosette.annotated-data-model": { source: "iana" }, "model/vnd.sap.vds": { source: "iana", extensions: ["vds"] }, "model/vnd.usdz+zip": { source: "iana", compressible: false, extensions: ["usdz"] }, "model/vnd.valve.source.compiled-map": { source: "iana", extensions: ["bsp"] }, "model/vnd.vtu": { source: "iana", extensions: ["vtu"] }, "model/vrml": { source: "iana", compressible: false, extensions: ["wrl", "vrml"] }, "model/x3d+binary": { source: "apache", compressible: false, extensions: ["x3db", "x3dbz"] }, "model/x3d+fastinfoset": { source: "iana", extensions: ["x3db"] }, "model/x3d+vrml": { source: "apache", compressible: false, extensions: ["x3dv", "x3dvz"] }, "model/x3d+xml": { source: "iana", compressible: true, extensions: ["x3d", "x3dz"] }, "model/x3d-vrml": { source: "iana", extensions: ["x3dv"] }, "multipart/alternative": { source: "iana", compressible: false }, "multipart/appledouble": { source: "iana" }, "multipart/byteranges": { source: "iana" }, "multipart/digest": { source: "iana" }, "multipart/encrypted": { source: "iana", compressible: false }, "multipart/form-data": { source: "iana", compressible: false }, "multipart/header-set": { source: "iana" }, "multipart/mixed": { source: "iana" }, "multipart/multilingual": { source: "iana" }, "multipart/parallel": { source: "iana" }, "multipart/related": { source: "iana", compressible: false }, "multipart/report": { source: "iana" }, "multipart/signed": { source: "iana", compressible: false }, "multipart/vnd.bint.med-plus": { source: "iana" }, "multipart/voice-message": { source: "iana" }, "multipart/x-mixed-replace": { source: "iana" }, "text/1d-interleaved-parityfec": { source: "iana" }, "text/cache-manifest": { source: "iana", compressible: true, extensions: ["appcache", "manifest"] }, "text/calendar": { source: "iana", extensions: ["ics", "ifb"] }, "text/calender": { compressible: true }, "text/cmd": { compressible: true }, "text/coffeescript": { extensions: ["coffee", "litcoffee"] }, "text/cql": { source: "iana" }, "text/cql-expression": { source: "iana" }, "text/cql-identifier": { source: "iana" }, "text/css": { source: "iana", charset: "UTF-8", compressible: true, extensions: ["css"] }, "text/csv": { source: "iana", compressible: true, extensions: ["csv"] }, "text/csv-schema": { source: "iana" }, "text/directory": { source: "iana" }, "text/dns": { source: "iana" }, "text/ecmascript": { source: "iana" }, "text/encaprtp": { source: "iana" }, "text/enriched": { source: "iana" }, "text/fhirpath": { source: "iana" }, "text/flexfec": { source: "iana" }, "text/fwdred": { source: "iana" }, "text/gff3": { source: "iana" }, "text/grammar-ref-list": { source: "iana" }, "text/html": { source: "iana", compressible: true, extensions: ["html", "htm", "shtml"] }, "text/jade": { extensions: ["jade"] }, "text/javascript": { source: "iana", compressible: true }, "text/jcr-cnd": { source: "iana" }, "text/jsx": { compressible: true, extensions: ["jsx"] }, "text/less": { compressible: true, extensions: ["less"] }, "text/markdown": { source: "iana", compressible: true, extensions: ["markdown", "md"] }, "text/mathml": { source: "nginx", extensions: ["mml"] }, "text/mdx": { compressible: true, extensions: ["mdx"] }, "text/mizar": { source: "iana" }, "text/n3": { source: "iana", charset: "UTF-8", compressible: true, extensions: ["n3"] }, "text/parameters": { source: "iana", charset: "UTF-8" }, "text/parityfec": { source: "iana" }, "text/plain": { source: "iana", compressible: true, extensions: ["txt", "text", "conf", "def", "list", "log", "in", "ini"] }, "text/provenance-notation": { source: "iana", charset: "UTF-8" }, "text/prs.fallenstein.rst": { source: "iana" }, "text/prs.lines.tag": { source: "iana", extensions: ["dsc"] }, "text/prs.prop.logic": { source: "iana" }, "text/raptorfec": { source: "iana" }, "text/red": { source: "iana" }, "text/rfc822-headers": { source: "iana" }, "text/richtext": { source: "iana", compressible: true, extensions: ["rtx"] }, "text/rtf": { source: "iana", compressible: true, extensions: ["rtf"] }, "text/rtp-enc-aescm128": { source: "iana" }, "text/rtploopback": { source: "iana" }, "text/rtx": { source: "iana" }, "text/sgml": { source: "iana", extensions: ["sgml", "sgm"] }, "text/shaclc": { source: "iana" }, "text/shex": { source: "iana", extensions: ["shex"] }, "text/slim": { extensions: ["slim", "slm"] }, "text/spdx": { source: "iana", extensions: ["spdx"] }, "text/strings": { source: "iana" }, "text/stylus": { extensions: ["stylus", "styl"] }, "text/t140": { source: "iana" }, "text/tab-separated-values": { source: "iana", compressible: true, extensions: ["tsv"] }, "text/troff": { source: "iana", extensions: ["t", "tr", "roff", "man", "me", "ms"] }, "text/turtle": { source: "iana", charset: "UTF-8", extensions: ["ttl"] }, "text/ulpfec": { source: "iana" }, "text/uri-list": { source: "iana", compressible: true, extensions: ["uri", "uris", "urls"] }, "text/vcard": { source: "iana", compressible: true, extensions: ["vcard"] }, "text/vnd.a": { source: "iana" }, "text/vnd.abc": { source: "iana" }, "text/vnd.ascii-art": { source: "iana" }, "text/vnd.curl": { source: "iana", extensions: ["curl"] }, "text/vnd.curl.dcurl": { source: "apache", extensions: ["dcurl"] }, "text/vnd.curl.mcurl": { source: "apache", extensions: ["mcurl"] }, "text/vnd.curl.scurl": { source: "apache", extensions: ["scurl"] }, "text/vnd.debian.copyright": { source: "iana", charset: "UTF-8" }, "text/vnd.dmclientscript": { source: "iana" }, "text/vnd.dvb.subtitle": { source: "iana", extensions: ["sub"] }, "text/vnd.esmertec.theme-descriptor": { source: "iana", charset: "UTF-8" }, "text/vnd.familysearch.gedcom": { source: "iana", extensions: ["ged"] }, "text/vnd.ficlab.flt": { source: "iana" }, "text/vnd.fly": { source: "iana", extensions: ["fly"] }, "text/vnd.fmi.flexstor": { source: "iana", extensions: ["flx"] }, "text/vnd.gml": { source: "iana" }, "text/vnd.graphviz": { source: "iana", extensions: ["gv"] }, "text/vnd.hans": { source: "iana" }, "text/vnd.hgl": { source: "iana" }, "text/vnd.in3d.3dml": { source: "iana", extensions: ["3dml"] }, "text/vnd.in3d.spot": { source: "iana", extensions: ["spot"] }, "text/vnd.iptc.newsml": { source: "iana" }, "text/vnd.iptc.nitf": { source: "iana" }, "text/vnd.latex-z": { source: "iana" }, "text/vnd.motorola.reflex": { source: "iana" }, "text/vnd.ms-mediapackage": { source: "iana" }, "text/vnd.net2phone.commcenter.command": { source: "iana" }, "text/vnd.radisys.msml-basic-layout": { source: "iana" }, "text/vnd.senx.warpscript": { source: "iana" }, "text/vnd.si.uricatalogue": { source: "iana" }, "text/vnd.sosi": { source: "iana" }, "text/vnd.sun.j2me.app-descriptor": { source: "iana", charset: "UTF-8", extensions: ["jad"] }, "text/vnd.trolltech.linguist": { source: "iana", charset: "UTF-8" }, "text/vnd.wap.si": { source: "iana" }, "text/vnd.wap.sl": { source: "iana" }, "text/vnd.wap.wml": { source: "iana", extensions: ["wml"] }, "text/vnd.wap.wmlscript": { source: "iana", extensions: ["wmls"] }, "text/vtt": { source: "iana", charset: "UTF-8", compressible: true, extensions: ["vtt"] }, "text/x-asm": { source: "apache", extensions: ["s", "asm"] }, "text/x-c": { source: "apache", extensions: ["c", "cc", "cxx", "cpp", "h", "hh", "dic"] }, "text/x-component": { source: "nginx", extensions: ["htc"] }, "text/x-fortran": { source: "apache", extensions: ["f", "for", "f77", "f90"] }, "text/x-gwt-rpc": { compressible: true }, "text/x-handlebars-template": { extensions: ["hbs"] }, "text/x-java-source": { source: "apache", extensions: ["java"] }, "text/x-jquery-tmpl": { compressible: true }, "text/x-lua": { extensions: ["lua"] }, "text/x-markdown": { compressible: true, extensions: ["mkd"] }, "text/x-nfo": { source: "apache", extensions: ["nfo"] }, "text/x-opml": { source: "apache", extensions: ["opml"] }, "text/x-org": { compressible: true, extensions: ["org"] }, "text/x-pascal": { source: "apache", extensions: ["p", "pas"] }, "text/x-processing": { compressible: true, extensions: ["pde"] }, "text/x-sass": { extensions: ["sass"] }, "text/x-scss": { extensions: ["scss"] }, "text/x-setext": { source: "apache", extensions: ["etx"] }, "text/x-sfv": { source: "apache", extensions: ["sfv"] }, "text/x-suse-ymp": { compressible: true, extensions: ["ymp"] }, "text/x-uuencode": { source: "apache", extensions: ["uu"] }, "text/x-vcalendar": { source: "apache", extensions: ["vcs"] }, "text/x-vcard": { source: "apache", extensions: ["vcf"] }, "text/xml": { source: "iana", compressible: true, extensions: ["xml"] }, "text/xml-external-parsed-entity": { source: "iana" }, "text/yaml": { compressible: true, extensions: ["yaml", "yml"] }, "video/1d-interleaved-parityfec": { source: "iana" }, "video/3gpp": { source: "iana", extensions: ["3gp", "3gpp"] }, "video/3gpp-tt": { source: "iana" }, "video/3gpp2": { source: "iana", extensions: ["3g2"] }, "video/av1": { source: "iana" }, "video/bmpeg": { source: "iana" }, "video/bt656": { source: "iana" }, "video/celb": { source: "iana" }, "video/dv": { source: "iana" }, "video/encaprtp": { source: "iana" }, "video/ffv1": { source: "iana" }, "video/flexfec": { source: "iana" }, "video/h261": { source: "iana", extensions: ["h261"] }, "video/h263": { source: "iana", extensions: ["h263"] }, "video/h263-1998": { source: "iana" }, "video/h263-2000": { source: "iana" }, "video/h264": { source: "iana", extensions: ["h264"] }, "video/h264-rcdo": { source: "iana" }, "video/h264-svc": { source: "iana" }, "video/h265": { source: "iana" }, "video/iso.segment": { source: "iana", extensions: ["m4s"] }, "video/jpeg": { source: "iana", extensions: ["jpgv"] }, "video/jpeg2000": { source: "iana" }, "video/jpm": { source: "apache", extensions: ["jpm", "jpgm"] }, "video/jxsv": { source: "iana" }, "video/mj2": { source: "iana", extensions: ["mj2", "mjp2"] }, "video/mp1s": { source: "iana" }, "video/mp2p": { source: "iana" }, "video/mp2t": { source: "iana", extensions: ["ts"] }, "video/mp4": { source: "iana", compressible: false, extensions: ["mp4", "mp4v", "mpg4"] }, "video/mp4v-es": { source: "iana" }, "video/mpeg": { source: "iana", compressible: false, extensions: ["mpeg", "mpg", "mpe", "m1v", "m2v"] }, "video/mpeg4-generic": { source: "iana" }, "video/mpv": { source: "iana" }, "video/nv": { source: "iana" }, "video/ogg": { source: "iana", compressible: false, extensions: ["ogv"] }, "video/parityfec": { source: "iana" }, "video/pointer": { source: "iana" }, "video/quicktime": { source: "iana", compressible: false, extensions: ["qt", "mov"] }, "video/raptorfec": { source: "iana" }, "video/raw": { source: "iana" }, "video/rtp-enc-aescm128": { source: "iana" }, "video/rtploopback": { source: "iana" }, "video/rtx": { source: "iana" }, "video/scip": { source: "iana" }, "video/smpte291": { source: "iana" }, "video/smpte292m": { source: "iana" }, "video/ulpfec": { source: "iana" }, "video/vc1": { source: "iana" }, "video/vc2": { source: "iana" }, "video/vnd.cctv": { source: "iana" }, "video/vnd.dece.hd": { source: "iana", extensions: ["uvh", "uvvh"] }, "video/vnd.dece.mobile": { source: "iana", extensions: ["uvm", "uvvm"] }, "video/vnd.dece.mp4": { source: "iana" }, "video/vnd.dece.pd": { source: "iana", extensions: ["uvp", "uvvp"] }, "video/vnd.dece.sd": { source: "iana", extensions: ["uvs", "uvvs"] }, "video/vnd.dece.video": { source: "iana", extensions: ["uvv", "uvvv"] }, "video/vnd.directv.mpeg": { source: "iana" }, "video/vnd.directv.mpeg-tts": { source: "iana" }, "video/vnd.dlna.mpeg-tts": { source: "iana" }, "video/vnd.dvb.file": { source: "iana", extensions: ["dvb"] }, "video/vnd.fvt": { source: "iana", extensions: ["fvt"] }, "video/vnd.hns.video": { source: "iana" }, "video/vnd.iptvforum.1dparityfec-1010": { source: "iana" }, "video/vnd.iptvforum.1dparityfec-2005": { source: "iana" }, "video/vnd.iptvforum.2dparityfec-1010": { source: "iana" }, "video/vnd.iptvforum.2dparityfec-2005": { source: "iana" }, "video/vnd.iptvforum.ttsavc": { source: "iana" }, "video/vnd.iptvforum.ttsmpeg2": { source: "iana" }, "video/vnd.motorola.video": { source: "iana" }, "video/vnd.motorola.videop": { source: "iana" }, "video/vnd.mpegurl": { source: "iana", extensions: ["mxu", "m4u"] }, "video/vnd.ms-playready.media.pyv": { source: "iana", extensions: ["pyv"] }, "video/vnd.nokia.interleaved-multimedia": { source: "iana" }, "video/vnd.nokia.mp4vr": { source: "iana" }, "video/vnd.nokia.videovoip": { source: "iana" }, "video/vnd.objectvideo": { source: "iana" }, "video/vnd.radgamettools.bink": { source: "iana" }, "video/vnd.radgamettools.smacker": { source: "iana" }, "video/vnd.sealed.mpeg1": { source: "iana" }, "video/vnd.sealed.mpeg4": { source: "iana" }, "video/vnd.sealed.swf": { source: "iana" }, "video/vnd.sealedmedia.softseal.mov": { source: "iana" }, "video/vnd.uvvu.mp4": { source: "iana", extensions: ["uvu", "uvvu"] }, "video/vnd.vivo": { source: "iana", extensions: ["viv"] }, "video/vnd.youtube.yt": { source: "iana" }, "video/vp8": { source: "iana" }, "video/vp9": { source: "iana" }, "video/webm": { source: "apache", compressible: false, extensions: ["webm"] }, "video/x-f4v": { source: "apache", extensions: ["f4v"] }, "video/x-fli": { source: "apache", extensions: ["fli"] }, "video/x-flv": { source: "apache", compressible: false, extensions: ["flv"] }, "video/x-m4v": { source: "apache", extensions: ["m4v"] }, "video/x-matroska": { source: "apache", compressible: false, extensions: ["mkv", "mk3d", "mks"] }, "video/x-mng": { source: "apache", extensions: ["mng"] }, "video/x-ms-asf": { source: "apache", extensions: ["asf", "asx"] }, "video/x-ms-vob": { source: "apache", extensions: ["vob"] }, "video/x-ms-wm": { source: "apache", extensions: ["wm"] }, "video/x-ms-wmv": { source: "apache", compressible: false, extensions: ["wmv"] }, "video/x-ms-wmx": { source: "apache", extensions: ["wmx"] }, "video/x-ms-wvx": { source: "apache", extensions: ["wvx"] }, "video/x-msvideo": { source: "apache", extensions: ["avi"] }, "video/x-sgi-movie": { source: "apache", extensions: ["movie"] }, "video/x-smv": { source: "apache", extensions: ["smv"] }, "x-conference/x-cooltalk": { source: "apache", extensions: ["ice"] }, "x-shader/x-fragment": { compressible: true }, "x-shader/x-vertex": { compressible: true } };
|
|
17636
18161
|
});
|
|
17637
18162
|
var O0 = v(function(Nre) {
|
|
18163
|
+
/*!
|
|
18164
|
+
* mime-types
|
|
18165
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
18166
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
18167
|
+
* MIT Licensed
|
|
18168
|
+
*/
|
|
17638
18169
|
var dh = E0(), Cre = be("path").extname, w0 = /^\s*([^;\s]*)(?:;|\s|$)/, Rre = /^text\//i;
|
|
17639
18170
|
Nre.charset = T0;
|
|
17640
18171
|
Nre.charsets = { lookup: T0 };
|
|
@@ -20948,8 +21479,8 @@ var qU = v(function(BU) {
|
|
|
20948
21479
|
BU._globalThis = void 0;
|
|
20949
21480
|
BU._globalThis = typeof globalThis === "object" ? globalThis : global;
|
|
20950
21481
|
});
|
|
20951
|
-
var GU = v(function(
|
|
20952
|
-
var Axe =
|
|
21482
|
+
var GU = v(function(os8) {
|
|
21483
|
+
var Axe = os8 && os8.__createBinding || (Object.create ? function(e, t, r, n) {
|
|
20953
21484
|
if (n === void 0) n = r;
|
|
20954
21485
|
Object.defineProperty(e, n, { enumerable: true, get: function() {
|
|
20955
21486
|
return t[r];
|
|
@@ -20957,11 +21488,11 @@ var GU = v(function(os7) {
|
|
|
20957
21488
|
} : function(e, t, r, n) {
|
|
20958
21489
|
if (n === void 0) n = r;
|
|
20959
21490
|
e[n] = t[r];
|
|
20960
|
-
}), kxe =
|
|
21491
|
+
}), kxe = os8 && os8.__exportStar || function(e, t) {
|
|
20961
21492
|
for (var r in e) if (r !== "default" && !Object.prototype.hasOwnProperty.call(t, r)) Axe(t, e, r);
|
|
20962
21493
|
};
|
|
20963
|
-
Object.defineProperty(
|
|
20964
|
-
kxe(qU(),
|
|
21494
|
+
Object.defineProperty(os8, "__esModule", { value: true });
|
|
21495
|
+
kxe(qU(), os8);
|
|
20965
21496
|
});
|
|
20966
21497
|
var WU = v(function(is) {
|
|
20967
21498
|
var Oxe = is && is.__createBinding || (Object.create ? function(e, t, r, n) {
|
|
@@ -42735,11 +43266,11 @@ var ClaudeBackgroundOccupancy = class {
|
|
|
42735
43266
|
};
|
|
42736
43267
|
|
|
42737
43268
|
// dist/claude-session-import.js
|
|
42738
|
-
import { createReadStream } from "node:fs";
|
|
42739
|
-
import { opendir, realpath, stat } from "node:fs/promises";
|
|
42740
|
-
import
|
|
42741
|
-
import
|
|
42742
|
-
import { createInterface } from "node:readline";
|
|
43269
|
+
import { createReadStream as createReadStream2 } from "node:fs";
|
|
43270
|
+
import { opendir as opendir2, realpath, stat } from "node:fs/promises";
|
|
43271
|
+
import os3 from "node:os";
|
|
43272
|
+
import path4 from "node:path";
|
|
43273
|
+
import { createInterface as createInterface2 } from "node:readline";
|
|
42743
43274
|
|
|
42744
43275
|
// ../../harness-adapter/dist/session-import.js
|
|
42745
43276
|
var SessionImportChangedError = class extends Error {
|
|
@@ -42838,26 +43369,26 @@ var SessionImportScope = class {
|
|
|
42838
43369
|
var CLAUDE_SESSION_IMPORT_TITLE_MAX_LENGTH = 120;
|
|
42839
43370
|
var CLAUDE_INTERNAL_USER_TEXT = /^<(?:local-command-|command-)/u;
|
|
42840
43371
|
var CLAUDE_SESSION_CHANGED = "Claude Code Session changed during discovery; refresh and retry";
|
|
42841
|
-
function
|
|
43372
|
+
function isRecord4(value) {
|
|
42842
43373
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
42843
43374
|
}
|
|
42844
43375
|
function cleanText(value) {
|
|
42845
43376
|
return sessionImportTitle(value, CLAUDE_SESSION_IMPORT_TITLE_MAX_LENGTH);
|
|
42846
43377
|
}
|
|
42847
43378
|
function userText(message) {
|
|
42848
|
-
if (!
|
|
43379
|
+
if (!isRecord4(message) || message.role !== "user")
|
|
42849
43380
|
return null;
|
|
42850
43381
|
const { content } = message;
|
|
42851
|
-
const
|
|
42852
|
-
return
|
|
43382
|
+
const text2 = typeof content === "string" ? cleanText(content) : Array.isArray(content) ? cleanText(content.filter((block) => isRecord4(block) && block.type === "text" && typeof block.text === "string").map((block) => String(block.text)).join(" ")) : null;
|
|
43383
|
+
return text2 && !CLAUDE_INTERNAL_USER_TEXT.test(text2) ? text2 : null;
|
|
42853
43384
|
}
|
|
42854
|
-
function
|
|
42855
|
-
const home = (process.platform === "win32" ? environment.USERPROFILE : environment.HOME) ||
|
|
42856
|
-
return
|
|
43385
|
+
function claudeProjectsDirectory2(environment) {
|
|
43386
|
+
const home = (process.platform === "win32" ? environment.USERPROFILE : environment.HOME) || os3.homedir();
|
|
43387
|
+
return path4.join(path4.resolve(environment.CLAUDE_CONFIG_DIR ?? path4.join(home, ".claude")), "projects");
|
|
42857
43388
|
}
|
|
42858
43389
|
async function sessionFiles(directory, signal) {
|
|
42859
43390
|
signal.throwIfAborted();
|
|
42860
|
-
const projects = await
|
|
43391
|
+
const projects = await opendir2(directory).catch((error52) => {
|
|
42861
43392
|
if (isMissingFileError(error52))
|
|
42862
43393
|
return null;
|
|
42863
43394
|
throw error52;
|
|
@@ -42865,11 +43396,11 @@ async function sessionFiles(directory, signal) {
|
|
|
42865
43396
|
if (!projects)
|
|
42866
43397
|
return [];
|
|
42867
43398
|
const files = [];
|
|
42868
|
-
for await (const
|
|
43399
|
+
for await (const project2 of projects) {
|
|
42869
43400
|
signal.throwIfAborted();
|
|
42870
|
-
if (!
|
|
43401
|
+
if (!project2.isDirectory())
|
|
42871
43402
|
continue;
|
|
42872
|
-
const entries = await
|
|
43403
|
+
const entries = await opendir2(path4.join(directory, project2.name)).catch((error52) => {
|
|
42873
43404
|
if (isMissingFileError(error52))
|
|
42874
43405
|
return null;
|
|
42875
43406
|
throw error52;
|
|
@@ -42879,21 +43410,21 @@ async function sessionFiles(directory, signal) {
|
|
|
42879
43410
|
for await (const entry of entries) {
|
|
42880
43411
|
signal.throwIfAborted();
|
|
42881
43412
|
if (entry.isFile() && entry.name.endsWith(".jsonl")) {
|
|
42882
|
-
files.push(
|
|
43413
|
+
files.push(path4.join(directory, project2.name, entry.name));
|
|
42883
43414
|
}
|
|
42884
43415
|
}
|
|
42885
43416
|
}
|
|
42886
43417
|
return files;
|
|
42887
43418
|
}
|
|
42888
43419
|
async function readCandidate(file2, signal) {
|
|
42889
|
-
const nativeSessionId =
|
|
43420
|
+
const nativeSessionId = path4.basename(file2, ".jsonl");
|
|
42890
43421
|
if (!external_exports.uuid().safeParse(nativeSessionId).success)
|
|
42891
43422
|
return null;
|
|
42892
43423
|
const before = await stat(file2);
|
|
42893
43424
|
if (!before.isFile() || before.size === 0)
|
|
42894
43425
|
return null;
|
|
42895
|
-
const stream =
|
|
42896
|
-
const lines =
|
|
43426
|
+
const stream = createReadStream2(file2, { encoding: "utf8", signal, end: before.size - 1 });
|
|
43427
|
+
const lines = createInterface2({ input: stream, crlfDelay: Infinity });
|
|
42897
43428
|
let cwd = null;
|
|
42898
43429
|
let customTitle = null;
|
|
42899
43430
|
let generatedTitle = null;
|
|
@@ -42910,13 +43441,13 @@ async function readCandidate(file2, signal) {
|
|
|
42910
43441
|
} catch {
|
|
42911
43442
|
continue;
|
|
42912
43443
|
}
|
|
42913
|
-
if (!
|
|
43444
|
+
if (!isRecord4(entry))
|
|
42914
43445
|
continue;
|
|
42915
43446
|
if (typeof entry.sessionId === "string" && entry.sessionId !== nativeSessionId)
|
|
42916
43447
|
return null;
|
|
42917
43448
|
if (entry.isSidechain === true)
|
|
42918
43449
|
continue;
|
|
42919
|
-
if (typeof entry.cwd === "string" &&
|
|
43450
|
+
if (typeof entry.cwd === "string" && path4.isAbsolute(entry.cwd))
|
|
42920
43451
|
cwd = entry.cwd;
|
|
42921
43452
|
if (entry.type === "custom-title") {
|
|
42922
43453
|
customTitle = cleanText(entry.customTitle);
|
|
@@ -42960,7 +43491,7 @@ var ClaudeSessionImportIndex = class {
|
|
|
42960
43491
|
#cache = /* @__PURE__ */ new Map();
|
|
42961
43492
|
#listing;
|
|
42962
43493
|
constructor(environment) {
|
|
42963
|
-
this.#directory =
|
|
43494
|
+
this.#directory = claudeProjectsDirectory2(environment);
|
|
42964
43495
|
}
|
|
42965
43496
|
list(signal) {
|
|
42966
43497
|
this.#listing ??= this.#scan(signal).finally(() => {
|
|
@@ -43002,7 +43533,7 @@ var ClaudeSessionImportIndex = class {
|
|
|
43002
43533
|
let selected;
|
|
43003
43534
|
for (const file2 of await sessionFiles(this.#directory, signal)) {
|
|
43004
43535
|
signal.throwIfAborted();
|
|
43005
|
-
if (
|
|
43536
|
+
if (path4.basename(file2, ".jsonl") !== nativeSessionId)
|
|
43006
43537
|
continue;
|
|
43007
43538
|
if (selected)
|
|
43008
43539
|
throw new Error("Claude Code Session identity is ambiguous across files");
|
|
@@ -43022,13 +43553,13 @@ var ClaudeSessionImportIndex = class {
|
|
|
43022
43553
|
};
|
|
43023
43554
|
|
|
43024
43555
|
// dist/command.js
|
|
43025
|
-
import
|
|
43556
|
+
import path9 from "node:path";
|
|
43026
43557
|
|
|
43027
43558
|
// ../../harness-discovery/dist/environment.js
|
|
43028
43559
|
import fs from "node:fs";
|
|
43029
|
-
import
|
|
43560
|
+
import path5 from "node:path";
|
|
43030
43561
|
function targetPath(platform) {
|
|
43031
|
-
return platform === "win32" ?
|
|
43562
|
+
return platform === "win32" ? path5.win32 : path5.posix;
|
|
43032
43563
|
}
|
|
43033
43564
|
function environmentValue(environment, name) {
|
|
43034
43565
|
const lowered = name.toLowerCase();
|
|
@@ -43071,9 +43602,9 @@ function newestFirst(names) {
|
|
|
43071
43602
|
}
|
|
43072
43603
|
|
|
43073
43604
|
// ../../harness-discovery/dist/invocation.js
|
|
43074
|
-
import
|
|
43605
|
+
import path6 from "node:path";
|
|
43075
43606
|
function commandInvocation(command, arguments_, environment, platform = process.platform) {
|
|
43076
|
-
const extension =
|
|
43607
|
+
const extension = path6.win32.extname(command).toLowerCase();
|
|
43077
43608
|
if (platform !== "win32" || ![".cmd", ".bat"].includes(extension)) {
|
|
43078
43609
|
return { command, arguments: [...arguments_], windowsVerbatimArguments: false };
|
|
43079
43610
|
}
|
|
@@ -43087,11 +43618,11 @@ function commandInvocation(command, arguments_, environment, platform = process.
|
|
|
43087
43618
|
}
|
|
43088
43619
|
|
|
43089
43620
|
// ../../harness-discovery/dist/node-runtime.js
|
|
43090
|
-
import
|
|
43621
|
+
import path7 from "node:path";
|
|
43091
43622
|
function withNodeRuntimeOnPath(environment, runtimeExecutable = process.execPath, platform = process.platform) {
|
|
43092
43623
|
const pathKey = Object.keys(environment).find((name) => name.toLowerCase() === "path") ?? "PATH";
|
|
43093
43624
|
const delimiter = platform === "win32" ? ";" : ":";
|
|
43094
|
-
const runtimeDirectory =
|
|
43625
|
+
const runtimeDirectory = path7.dirname(runtimeExecutable);
|
|
43095
43626
|
const directories = (environment[pathKey] ?? "").split(delimiter).filter(Boolean);
|
|
43096
43627
|
const equal = platform === "win32" ? (value) => value.toLowerCase() : (value) => value;
|
|
43097
43628
|
if (!directories.some((directory) => equal(directory) === equal(runtimeDirectory))) {
|
|
@@ -43101,7 +43632,7 @@ function withNodeRuntimeOnPath(environment, runtimeExecutable = process.execPath
|
|
|
43101
43632
|
}
|
|
43102
43633
|
|
|
43103
43634
|
// ../../harness-discovery/dist/resolve.js
|
|
43104
|
-
import
|
|
43635
|
+
import os4 from "node:os";
|
|
43105
43636
|
|
|
43106
43637
|
// ../../harness-discovery/dist/version-managers.js
|
|
43107
43638
|
function versionManagerBinaryDirectories(context) {
|
|
@@ -43167,7 +43698,7 @@ function installRootExtensions(platform) {
|
|
|
43167
43698
|
return platform === "win32" ? [".exe", ".cmd"] : [""];
|
|
43168
43699
|
}
|
|
43169
43700
|
function resolveHomeDirectory(input) {
|
|
43170
|
-
return input.homeDirectory ?? environmentValue(input.environment, "HOME") ?? environmentValue(input.environment, "USERPROFILE") ??
|
|
43701
|
+
return input.homeDirectory ?? environmentValue(input.environment, "HOME") ?? environmentValue(input.environment, "USERPROFILE") ?? os4.homedir();
|
|
43171
43702
|
}
|
|
43172
43703
|
function templateVariables(environment, platform, home) {
|
|
43173
43704
|
const pathFlavor = targetPath(platform);
|
|
@@ -43375,58 +43906,58 @@ async function fetchInstallationText(url2) {
|
|
|
43375
43906
|
|
|
43376
43907
|
// ../../harness-discovery/dist/npm-installation.js
|
|
43377
43908
|
import { readFile as readFile2, realpath as realpath2 } from "node:fs/promises";
|
|
43378
|
-
import
|
|
43909
|
+
import path8 from "node:path";
|
|
43379
43910
|
function referencesNpmBin(shim, name, bin) {
|
|
43380
43911
|
if (bin.includes(".."))
|
|
43381
43912
|
return false;
|
|
43382
43913
|
const target = `node_modules/${name}/${bin.replace(/^\.\//, "")}`.toLowerCase();
|
|
43383
|
-
const
|
|
43384
|
-
return
|
|
43914
|
+
const text2 = shim.replaceAll("\\", "/").toLowerCase();
|
|
43915
|
+
return text2.includes(`%dp0%/${target}"`) || text2.includes(`%~dp0/${target}"`);
|
|
43385
43916
|
}
|
|
43386
43917
|
async function npmInstallation(command, packages, environment) {
|
|
43387
43918
|
let selected = await realpath2(command);
|
|
43388
43919
|
if (process.platform === "win32" && /\.(cmd|bat)$/i.test(selected)) {
|
|
43389
43920
|
const shim = (await readFile2(selected, "utf8")).replaceAll("\\", "/");
|
|
43390
|
-
const root =
|
|
43921
|
+
const root = path8.dirname(selected);
|
|
43391
43922
|
for (const name of packages) {
|
|
43392
|
-
const directory2 =
|
|
43393
|
-
const metadata = await readFile2(
|
|
43923
|
+
const directory2 = path8.join(root, "node_modules", ...name.split("/"));
|
|
43924
|
+
const metadata = await readFile2(path8.join(directory2, "package.json"), "utf8").then((text2) => JSON.parse(text2)).catch(() => null);
|
|
43394
43925
|
const bins = typeof metadata?.bin === "string" ? [metadata.bin] : Object.values(metadata?.bin ?? {});
|
|
43395
43926
|
const bin = bins.find((entry) => referencesNpmBin(shim, name, entry));
|
|
43396
43927
|
if (bin) {
|
|
43397
|
-
selected = await realpath2(
|
|
43928
|
+
selected = await realpath2(path8.join(directory2, bin));
|
|
43398
43929
|
break;
|
|
43399
43930
|
}
|
|
43400
43931
|
}
|
|
43401
43932
|
}
|
|
43402
|
-
let directory =
|
|
43933
|
+
let directory = path8.dirname(selected);
|
|
43403
43934
|
for (let depth = 0; depth < 8; depth++) {
|
|
43404
|
-
const metadata = await readFile2(
|
|
43935
|
+
const metadata = await readFile2(path8.join(directory, "package.json"), "utf8").then((text2) => JSON.parse(text2)).catch(() => null);
|
|
43405
43936
|
if (metadata?.name && packages.includes(metadata.name)) {
|
|
43406
43937
|
const name = metadata.name;
|
|
43407
43938
|
const currentVersion = installationVersion(metadata.version);
|
|
43408
43939
|
const segments = name.split("/");
|
|
43409
43940
|
let modules = directory;
|
|
43410
43941
|
for (let index = 0; index < segments.length; index++)
|
|
43411
|
-
modules =
|
|
43412
|
-
const prefix = process.platform === "win32" ?
|
|
43413
|
-
const globalRoot = process.platform === "win32" ?
|
|
43942
|
+
modules = path8.dirname(modules);
|
|
43943
|
+
const prefix = process.platform === "win32" ? path8.dirname(modules) : path8.dirname(path8.dirname(modules));
|
|
43944
|
+
const globalRoot = process.platform === "win32" ? path8.join(prefix, "node_modules") : path8.join(prefix, "lib", "node_modules");
|
|
43414
43945
|
const env = withNodeRuntimeOnPath(environment);
|
|
43415
43946
|
const npm = resolveHarnessExecutable({ id: "npm", command: "npm", installRoots: { posix: [], windows: [] } }, { environment: env });
|
|
43416
43947
|
let globalInstall = modules === globalRoot;
|
|
43417
43948
|
if (process.platform === "win32") {
|
|
43418
|
-
const
|
|
43949
|
+
const project2 = (await Promise.all(["package.json", "package-lock.json", "npm-shrinkwrap.json"].map((file2) => readFile2(path8.join(prefix, file2), "utf8").then(() => true, (error52) => error52.code !== "ENOENT")))).some(Boolean);
|
|
43419
43950
|
const bins = typeof metadata.bin === "string" ? { [name.split("/").at(-1) ?? name]: metadata.bin } : metadata.bin ?? {};
|
|
43420
43951
|
const launchers = await Promise.all(Object.entries(bins).map(async ([bin, entry]) => {
|
|
43421
|
-
if (
|
|
43952
|
+
if (path8.basename(bin) !== bin || entry.includes(".."))
|
|
43422
43953
|
return false;
|
|
43423
|
-
const target = await realpath2(
|
|
43954
|
+
const target = await realpath2(path8.join(directory, entry)).catch(() => "");
|
|
43424
43955
|
if (target.toLowerCase() !== selected.toLowerCase())
|
|
43425
43956
|
return false;
|
|
43426
|
-
const shim = await readFile2(
|
|
43957
|
+
const shim = await readFile2(path8.join(prefix, `${bin}.cmd`), "utf8").catch(() => "");
|
|
43427
43958
|
return referencesNpmBin(shim, name, entry);
|
|
43428
43959
|
}));
|
|
43429
|
-
globalInstall = globalInstall && !
|
|
43960
|
+
globalInstall = globalInstall && !project2 && launchers.some(Boolean);
|
|
43430
43961
|
}
|
|
43431
43962
|
const canUpdate = globalInstall && !!npm;
|
|
43432
43963
|
return {
|
|
@@ -43444,7 +43975,7 @@ async function npmInstallation(command, packages, environment) {
|
|
|
43444
43975
|
}
|
|
43445
43976
|
};
|
|
43446
43977
|
}
|
|
43447
|
-
const parent =
|
|
43978
|
+
const parent = path8.dirname(directory);
|
|
43448
43979
|
if (parent === directory)
|
|
43449
43980
|
break;
|
|
43450
43981
|
directory = parent;
|
|
@@ -43552,14 +44083,14 @@ function resolveClaudeCodeExecutable(input = {}, dependencies = {}) {
|
|
|
43552
44083
|
}, dependencies);
|
|
43553
44084
|
if (!resolution)
|
|
43554
44085
|
throw new ClaudeCodeExecutableError("Claude Code is not installed");
|
|
43555
|
-
return targetPath(platform).isAbsolute(resolution.executable) ? resolution.executable :
|
|
44086
|
+
return targetPath(platform).isAbsolute(resolution.executable) ? resolution.executable : path9.resolve(resolution.executable);
|
|
43556
44087
|
}
|
|
43557
44088
|
|
|
43558
44089
|
// dist/pending-session.js
|
|
43559
44090
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
43560
44091
|
import { mkdir, open, readFile as readFile3, rename, rm as rm3, stat as stat2, unlink } from "node:fs/promises";
|
|
43561
|
-
import
|
|
43562
|
-
import
|
|
44092
|
+
import os5 from "node:os";
|
|
44093
|
+
import path10 from "node:path";
|
|
43563
44094
|
var reservationSchema = external_exports.strictObject({
|
|
43564
44095
|
version: external_exports.literal(1),
|
|
43565
44096
|
sessionId: external_exports.uuid(),
|
|
@@ -43572,13 +44103,13 @@ function isPendingClaudeSession(ref) {
|
|
|
43572
44103
|
var ClaudePendingSessions = class {
|
|
43573
44104
|
#directory;
|
|
43574
44105
|
constructor(environment) {
|
|
43575
|
-
this.#directory =
|
|
44106
|
+
this.#directory = path10.join(path10.resolve(environment.CLAUDE_CONFIG_DIR ?? path10.join(os5.homedir(), ".claude")), "codexhost", "pending-sessions");
|
|
43576
44107
|
}
|
|
43577
44108
|
#path(ref, cwd) {
|
|
43578
|
-
if (ref.harnessId !== "claude-code" || !external_exports.uuid().safeParse(ref.nativeSessionId).success || !external_exports.strictObject({ pendingSession: external_exports.literal(1) }).safeParse(ref.locator).success || !
|
|
44109
|
+
if (ref.harnessId !== "claude-code" || !external_exports.uuid().safeParse(ref.nativeSessionId).success || !external_exports.strictObject({ pendingSession: external_exports.literal(1) }).safeParse(ref.locator).success || !path10.isAbsolute(cwd)) {
|
|
43579
44110
|
throw new Error("Claude Code pending Session identity is invalid");
|
|
43580
44111
|
}
|
|
43581
|
-
return
|
|
44112
|
+
return path10.join(this.#directory, ref.nativeSessionId);
|
|
43582
44113
|
}
|
|
43583
44114
|
async create(cwd, configuration) {
|
|
43584
44115
|
const ref = nativeSessionRefSchema.parse({
|
|
@@ -43597,7 +44128,7 @@ var ClaudePendingSessions = class {
|
|
|
43597
44128
|
await mkdir(this.#directory, { recursive: true, mode: 448 });
|
|
43598
44129
|
await mkdir(directory, { mode: 448 });
|
|
43599
44130
|
try {
|
|
43600
|
-
const file2 = await open(
|
|
44131
|
+
const file2 = await open(path10.join(directory, "session.json"), "wx", 384);
|
|
43601
44132
|
try {
|
|
43602
44133
|
await file2.writeFile(JSON.stringify(reservation));
|
|
43603
44134
|
await file2.sync();
|
|
@@ -43614,13 +44145,13 @@ var ClaudePendingSessions = class {
|
|
|
43614
44145
|
}
|
|
43615
44146
|
async read(ref, cwd) {
|
|
43616
44147
|
const directory = this.#path(ref, cwd);
|
|
43617
|
-
const reservation = reservationSchema.parse(JSON.parse(await readFile3(
|
|
44148
|
+
const reservation = reservationSchema.parse(JSON.parse(await readFile3(path10.join(directory, "session.json"), "utf8")));
|
|
43618
44149
|
if (reservation.sessionId !== ref.nativeSessionId || reservation.cwd !== cwd) {
|
|
43619
44150
|
throw new Error("Claude Code pending Session does not belong to this working directory");
|
|
43620
44151
|
}
|
|
43621
44152
|
let started = false;
|
|
43622
44153
|
try {
|
|
43623
|
-
const claim = await stat2(
|
|
44154
|
+
const claim = await stat2(path10.join(directory, "started"));
|
|
43624
44155
|
if (!claim.isFile())
|
|
43625
44156
|
throw new Error("Claude Code pending Session claim is invalid");
|
|
43626
44157
|
started = true;
|
|
@@ -43633,7 +44164,7 @@ var ClaudePendingSessions = class {
|
|
|
43633
44164
|
async saveConfiguration(ref, cwd, configuration) {
|
|
43634
44165
|
await this.read(ref, cwd);
|
|
43635
44166
|
const directory = this.#path(ref, cwd);
|
|
43636
|
-
const temporary =
|
|
44167
|
+
const temporary = path10.join(directory, `${randomUUID2()}.tmp`);
|
|
43637
44168
|
try {
|
|
43638
44169
|
const file2 = await open(temporary, "wx", 384);
|
|
43639
44170
|
try {
|
|
@@ -43647,7 +44178,7 @@ var ClaudePendingSessions = class {
|
|
|
43647
44178
|
} finally {
|
|
43648
44179
|
await file2.close();
|
|
43649
44180
|
}
|
|
43650
|
-
await rename(temporary,
|
|
44181
|
+
await rename(temporary, path10.join(directory, "session.json"));
|
|
43651
44182
|
await this.#sync(directory);
|
|
43652
44183
|
} finally {
|
|
43653
44184
|
await rm3(temporary, { force: true });
|
|
@@ -43665,7 +44196,7 @@ var ClaudePendingSessions = class {
|
|
|
43665
44196
|
}
|
|
43666
44197
|
async claim(ref, cwd) {
|
|
43667
44198
|
await this.read(ref, cwd);
|
|
43668
|
-
const claim = await open(
|
|
44199
|
+
const claim = await open(path10.join(this.#path(ref, cwd), "started"), "wx", 384);
|
|
43669
44200
|
try {
|
|
43670
44201
|
await claim.sync();
|
|
43671
44202
|
} finally {
|
|
@@ -43675,7 +44206,7 @@ var ClaudePendingSessions = class {
|
|
|
43675
44206
|
}
|
|
43676
44207
|
/** Only the claim owner may release, after proven close and before submitting any native input. */
|
|
43677
44208
|
async release(ref, cwd) {
|
|
43678
|
-
await unlink(
|
|
44209
|
+
await unlink(path10.join(this.#path(ref, cwd), "started"));
|
|
43679
44210
|
await this.#sync(this.#path(ref, cwd));
|
|
43680
44211
|
}
|
|
43681
44212
|
async discard(ref, cwd) {
|
|
@@ -43684,11 +44215,11 @@ var ClaudePendingSessions = class {
|
|
|
43684
44215
|
};
|
|
43685
44216
|
|
|
43686
44217
|
// dist/claude-fork.js
|
|
43687
|
-
import
|
|
44218
|
+
import path12 from "node:path";
|
|
43688
44219
|
import { isDeepStrictEqual } from "node:util";
|
|
43689
44220
|
|
|
43690
44221
|
// dist/file-change.js
|
|
43691
|
-
import
|
|
44222
|
+
import path11 from "node:path";
|
|
43692
44223
|
var hunkSchema = external_exports.object({
|
|
43693
44224
|
oldStart: external_exports.number().int().nonnegative(),
|
|
43694
44225
|
oldLines: external_exports.number().int().nonnegative(),
|
|
@@ -43696,7 +44227,7 @@ var hunkSchema = external_exports.object({
|
|
|
43696
44227
|
newLines: external_exports.number().int().nonnegative(),
|
|
43697
44228
|
lines: external_exports.array(external_exports.string())
|
|
43698
44229
|
}).strict();
|
|
43699
|
-
function
|
|
44230
|
+
function isRecord5(value) {
|
|
43700
44231
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
43701
44232
|
}
|
|
43702
44233
|
function validNativePath(value) {
|
|
@@ -43720,7 +44251,7 @@ function validHunk(value) {
|
|
|
43720
44251
|
return hunk;
|
|
43721
44252
|
}
|
|
43722
44253
|
function parseClaudeNativeFileChange(toolName, value) {
|
|
43723
|
-
if (toolName !== "Edit" && toolName !== "Write" || !
|
|
44254
|
+
if (toolName !== "Edit" && toolName !== "Write" || !isRecord5(value))
|
|
43724
44255
|
return null;
|
|
43725
44256
|
if (!validNativePath(value.filePath) || !Array.isArray(value.structuredPatch))
|
|
43726
44257
|
return null;
|
|
@@ -43736,10 +44267,10 @@ function parseClaudeNativeFileChange(toolName, value) {
|
|
|
43736
44267
|
};
|
|
43737
44268
|
}
|
|
43738
44269
|
function displayPath(nativePath, cwd) {
|
|
43739
|
-
const resolvedCwd =
|
|
43740
|
-
const resolvedPath =
|
|
43741
|
-
const relative =
|
|
43742
|
-
const selected = relative.length > 0 && relative !== ".." && !relative.startsWith(`..${
|
|
44270
|
+
const resolvedCwd = path11.resolve(cwd);
|
|
44271
|
+
const resolvedPath = path11.isAbsolute(nativePath) ? path11.resolve(nativePath) : path11.resolve(cwd, nativePath);
|
|
44272
|
+
const relative = path11.relative(resolvedCwd, resolvedPath);
|
|
44273
|
+
const selected = relative.length > 0 && relative !== ".." && !relative.startsWith(`..${path11.sep}`) ? relative : resolvedPath;
|
|
43743
44274
|
const normalized = selected.replaceAll("\\", "/");
|
|
43744
44275
|
return validNativePath(normalized) && normalized !== "." ? normalized : null;
|
|
43745
44276
|
}
|
|
@@ -43751,7 +44282,7 @@ function projectClaudeFileChange(value, cwd) {
|
|
|
43751
44282
|
`@@ -${hunk.oldStart},${hunk.oldLines} +${hunk.newStart},${hunk.newLines} @@`,
|
|
43752
44283
|
...hunk.lines
|
|
43753
44284
|
]);
|
|
43754
|
-
const absoluteDisplayPath =
|
|
44285
|
+
const absoluteDisplayPath = path11.posix.isAbsolute(normalizedPath);
|
|
43755
44286
|
const oldHeader = value.kind === "add" ? "/dev/null" : absoluteDisplayPath ? normalizedPath : `a/${normalizedPath}`;
|
|
43756
44287
|
const newHeader = absoluteDisplayPath ? normalizedPath : `b/${normalizedPath}`;
|
|
43757
44288
|
const unifiedDiff = [`--- ${oldHeader}`, `+++ ${newHeader}`, ...body, ""].join("\n");
|
|
@@ -43765,7 +44296,7 @@ var CLAUDE_SUBAGENT_TOOLS = /* @__PURE__ */ new Set(["Agent", "Task", "SendMessa
|
|
|
43765
44296
|
var BACKGROUND_OUTPUT_FILE_PATTERN = /Output is being written to: (.+?\.output)\./u;
|
|
43766
44297
|
var SUBAGENT_DESCRIPTION_LIMIT = 500;
|
|
43767
44298
|
var SUBAGENT_SUMMARY_LIMIT = 2e3;
|
|
43768
|
-
function
|
|
44299
|
+
function isRecord6(value) {
|
|
43769
44300
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
43770
44301
|
}
|
|
43771
44302
|
function nativeUuid(message) {
|
|
@@ -43775,12 +44306,12 @@ function parentToolUseId(message) {
|
|
|
43775
44306
|
return typeof message.parent_tool_use_id === "string" && message.parent_tool_use_id.length > 0 ? message.parent_tool_use_id : null;
|
|
43776
44307
|
}
|
|
43777
44308
|
function assistantNativeMessageId(message) {
|
|
43778
|
-
if (!
|
|
44309
|
+
if (!isRecord6(message.message))
|
|
43779
44310
|
return null;
|
|
43780
44311
|
return typeof message.message.id === "string" && message.message.id.length > 0 ? message.message.id : null;
|
|
43781
44312
|
}
|
|
43782
44313
|
function assistantContent(message) {
|
|
43783
|
-
if (message.type !== "assistant" || !
|
|
44314
|
+
if (message.type !== "assistant" || !isRecord6(message.message))
|
|
43784
44315
|
return null;
|
|
43785
44316
|
return Array.isArray(message.message.content) ? message.message.content : null;
|
|
43786
44317
|
}
|
|
@@ -43788,10 +44319,10 @@ function assistantText(message) {
|
|
|
43788
44319
|
const content = assistantContent(message);
|
|
43789
44320
|
if (!content)
|
|
43790
44321
|
return null;
|
|
43791
|
-
return content.flatMap((block) =>
|
|
44322
|
+
return content.flatMap((block) => isRecord6(block) && block.type === "text" && typeof block.text === "string" ? [block.text] : []).join("");
|
|
43792
44323
|
}
|
|
43793
44324
|
function assistantError(message) {
|
|
43794
|
-
return
|
|
44325
|
+
return isRecord6(message) && message.type === "assistant" && typeof message.error === "string" ? message.error : null;
|
|
43795
44326
|
}
|
|
43796
44327
|
function boundedString(value, limit) {
|
|
43797
44328
|
if (typeof value !== "string")
|
|
@@ -43802,25 +44333,25 @@ function boundedString(value, limit) {
|
|
|
43802
44333
|
return trimmed.slice(0, limit);
|
|
43803
44334
|
}
|
|
43804
44335
|
function subagentDescription(argumentsValue, toolName) {
|
|
43805
|
-
if (!
|
|
44336
|
+
if (!isRecord6(argumentsValue))
|
|
43806
44337
|
return `${toolName} delegation`;
|
|
43807
44338
|
return boundedString(argumentsValue.description, SUBAGENT_DESCRIPTION_LIMIT) ?? boundedString(argumentsValue.summary, SUBAGENT_DESCRIPTION_LIMIT) ?? boundedString(argumentsValue.name, SUBAGENT_DESCRIPTION_LIMIT) ?? `${toolName} delegation`;
|
|
43808
44339
|
}
|
|
43809
44340
|
function subagentPrompt(argumentsValue) {
|
|
43810
|
-
if (!
|
|
44341
|
+
if (!isRecord6(argumentsValue))
|
|
43811
44342
|
return void 0;
|
|
43812
44343
|
return boundedString(argumentsValue.prompt ?? argumentsValue.message, SUBAGENT_SUMMARY_LIMIT);
|
|
43813
44344
|
}
|
|
43814
44345
|
function subagentRole(argumentsValue) {
|
|
43815
|
-
if (!
|
|
44346
|
+
if (!isRecord6(argumentsValue))
|
|
43816
44347
|
return void 0;
|
|
43817
44348
|
return boundedString(argumentsValue.subagent_type ?? argumentsValue.agent_type, SUBAGENT_DESCRIPTION_LIMIT);
|
|
43818
44349
|
}
|
|
43819
44350
|
function subagentBackground(argumentsValue) {
|
|
43820
|
-
return
|
|
44351
|
+
return isRecord6(argumentsValue) && argumentsValue.run_in_background === true;
|
|
43821
44352
|
}
|
|
43822
44353
|
function targetedSubagentId(argumentsValue) {
|
|
43823
|
-
if (!
|
|
44354
|
+
if (!isRecord6(argumentsValue))
|
|
43824
44355
|
return void 0;
|
|
43825
44356
|
return boundedString(argumentsValue.to ?? argumentsValue.recipient ?? argumentsValue.agentId, SUBAGENT_DESCRIPTION_LIMIT);
|
|
43826
44357
|
}
|
|
@@ -43837,11 +44368,11 @@ function finiteNonNegativeNumber(value) {
|
|
|
43837
44368
|
return typeof value === "number" && Number.isFinite(value) && value >= 0;
|
|
43838
44369
|
}
|
|
43839
44370
|
function parseResultModelUsage(value) {
|
|
43840
|
-
if (!
|
|
44371
|
+
if (!isRecord6(value))
|
|
43841
44372
|
return void 0;
|
|
43842
44373
|
const usage = [];
|
|
43843
44374
|
for (const entry of Object.values(value)) {
|
|
43844
|
-
if (!
|
|
44375
|
+
if (!isRecord6(entry) || !safeNonNegativeInteger(entry.inputTokens) || !safeNonNegativeInteger(entry.outputTokens)) {
|
|
43845
44376
|
return void 0;
|
|
43846
44377
|
}
|
|
43847
44378
|
usage.push({ inputTokens: entry.inputTokens, outputTokens: entry.outputTokens });
|
|
@@ -43849,7 +44380,7 @@ function parseResultModelUsage(value) {
|
|
|
43849
44380
|
return usage;
|
|
43850
44381
|
}
|
|
43851
44382
|
function parseLastRequestUsage(value, attribution = {}) {
|
|
43852
|
-
if (!
|
|
44383
|
+
if (!isRecord6(value))
|
|
43853
44384
|
return void 0;
|
|
43854
44385
|
const inputTokens = value.input_tokens;
|
|
43855
44386
|
const outputTokens = value.output_tokens;
|
|
@@ -43859,11 +44390,11 @@ function parseLastRequestUsage(value, attribution = {}) {
|
|
|
43859
44390
|
return void 0;
|
|
43860
44391
|
}
|
|
43861
44392
|
const requestId = boundedString(attribution.requestId, 500);
|
|
43862
|
-
const
|
|
44393
|
+
const model2 = boundedString(attribution.model, 500);
|
|
43863
44394
|
const provider = boundedString(attribution.provider, 100);
|
|
43864
44395
|
return {
|
|
43865
44396
|
...requestId ? { requestId } : {},
|
|
43866
|
-
...
|
|
44397
|
+
...model2 ? { model: model2 } : {},
|
|
43867
44398
|
...provider ? { provider } : {},
|
|
43868
44399
|
inputTokens,
|
|
43869
44400
|
outputTokens,
|
|
@@ -43872,7 +44403,7 @@ function parseLastRequestUsage(value, attribution = {}) {
|
|
|
43872
44403
|
};
|
|
43873
44404
|
}
|
|
43874
44405
|
function assistantRequestUsage(message, provider) {
|
|
43875
|
-
if (!
|
|
44406
|
+
if (!isRecord6(message.message))
|
|
43876
44407
|
return void 0;
|
|
43877
44408
|
return parseLastRequestUsage(message.message.usage, {
|
|
43878
44409
|
requestId: message.message.id ?? message.request_id,
|
|
@@ -43895,7 +44426,7 @@ function parseResultUsageEvent(message) {
|
|
|
43895
44426
|
};
|
|
43896
44427
|
}
|
|
43897
44428
|
function parsePlanLimitWindow(value) {
|
|
43898
|
-
if (!
|
|
44429
|
+
if (!isRecord6(value))
|
|
43899
44430
|
return void 0;
|
|
43900
44431
|
const utilization = value.utilization;
|
|
43901
44432
|
if (typeof utilization !== "number" || !Number.isFinite(utilization) || utilization < 0) {
|
|
@@ -43907,12 +44438,12 @@ function parsePlanLimitWindow(value) {
|
|
|
43907
44438
|
return { utilizationPercent, ...resetsAtUnix !== void 0 ? { resetsAtUnix } : {} };
|
|
43908
44439
|
}
|
|
43909
44440
|
function parseClaudePlanLimitEvent(message) {
|
|
43910
|
-
if (!
|
|
44441
|
+
if (!isRecord6(message) || message.type !== "rate_limit_event")
|
|
43911
44442
|
return null;
|
|
43912
44443
|
const info = message.rate_limit_info;
|
|
43913
|
-
if (!
|
|
44444
|
+
if (!isRecord6(info))
|
|
43914
44445
|
return null;
|
|
43915
|
-
const windows =
|
|
44446
|
+
const windows = isRecord6(info.unifiedWindows) ? info.unifiedWindows : void 0;
|
|
43916
44447
|
let fiveHour = parsePlanLimitWindow(windows?.five_hour);
|
|
43917
44448
|
let sevenDay = parsePlanLimitWindow(windows?.seven_day);
|
|
43918
44449
|
if (!fiveHour && !sevenDay) {
|
|
@@ -43930,7 +44461,7 @@ function parseClaudePlanLimitEvent(message) {
|
|
|
43930
44461
|
};
|
|
43931
44462
|
}
|
|
43932
44463
|
function nativeSubagentId(nativeResult, outputText) {
|
|
43933
|
-
if (
|
|
44464
|
+
if (isRecord6(nativeResult)) {
|
|
43934
44465
|
const structured = boundedString(nativeResult.agentId ?? nativeResult.agent_id ?? nativeResult.task_id, SUBAGENT_DESCRIPTION_LIMIT);
|
|
43935
44466
|
if (structured)
|
|
43936
44467
|
return structured;
|
|
@@ -43938,7 +44469,7 @@ function nativeSubagentId(nativeResult, outputText) {
|
|
|
43938
44469
|
return boundedString(/agentId:\s*([A-Za-z0-9_-]+)/u.exec(outputText ?? "")?.[1], SUBAGENT_DESCRIPTION_LIMIT);
|
|
43939
44470
|
}
|
|
43940
44471
|
function subagentContinuesInBackground(nativeResult, outputText) {
|
|
43941
|
-
if (
|
|
44472
|
+
if (isRecord6(nativeResult)) {
|
|
43942
44473
|
if (nativeResult.isAsync === true || nativeResult.is_async === true)
|
|
43943
44474
|
return true;
|
|
43944
44475
|
if (nativeResult.status === "async_launched")
|
|
@@ -43947,15 +44478,15 @@ function subagentContinuesInBackground(nativeResult, outputText) {
|
|
|
43947
44478
|
return outputText?.includes("The agent is working in the background.") ?? false;
|
|
43948
44479
|
}
|
|
43949
44480
|
function resultText(content, nativeResult) {
|
|
43950
|
-
let
|
|
44481
|
+
let text2 = "";
|
|
43951
44482
|
if (typeof content === "string") {
|
|
43952
|
-
|
|
44483
|
+
text2 = content;
|
|
43953
44484
|
} else if (Array.isArray(content)) {
|
|
43954
|
-
|
|
44485
|
+
text2 = content.flatMap((block) => isRecord6(block) && block.type === "text" && typeof block.text === "string" ? [block.text] : []).join("");
|
|
43955
44486
|
}
|
|
43956
|
-
if (
|
|
43957
|
-
return
|
|
43958
|
-
if (!
|
|
44487
|
+
if (text2.length > 0)
|
|
44488
|
+
return text2;
|
|
44489
|
+
if (!isRecord6(nativeResult))
|
|
43959
44490
|
return void 0;
|
|
43960
44491
|
const stdout = typeof nativeResult.stdout === "string" ? nativeResult.stdout : "";
|
|
43961
44492
|
const stderr = typeof nativeResult.stderr === "string" ? nativeResult.stderr : "";
|
|
@@ -43967,13 +44498,13 @@ function userMessageText(content) {
|
|
|
43967
44498
|
return content;
|
|
43968
44499
|
if (!Array.isArray(content))
|
|
43969
44500
|
return null;
|
|
43970
|
-
const
|
|
43971
|
-
return
|
|
44501
|
+
const text2 = content.flatMap((block) => isRecord6(block) && block.type === "text" && typeof block.text === "string" ? [block.text] : []).join("");
|
|
44502
|
+
return text2.length > 0 ? text2 : null;
|
|
43972
44503
|
}
|
|
43973
44504
|
function parseClaudeTaskNotification(message) {
|
|
43974
|
-
if (!
|
|
44505
|
+
if (!isRecord6(message) || message.type !== "user" || !isRecord6(message.message))
|
|
43975
44506
|
return null;
|
|
43976
|
-
if (
|
|
44507
|
+
if (isRecord6(message.origin) && message.origin.kind !== "task-notification")
|
|
43977
44508
|
return null;
|
|
43978
44509
|
const content = userMessageText(message.message.content);
|
|
43979
44510
|
if (!content || !content.includes("<task-notification>"))
|
|
@@ -44033,8 +44564,9 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44033
44564
|
requestCancel() {
|
|
44034
44565
|
this.#cancelRequested = true;
|
|
44035
44566
|
}
|
|
44567
|
+
#usageRequest = null;
|
|
44036
44568
|
consume(message) {
|
|
44037
|
-
if (this.#completed || !
|
|
44569
|
+
if (this.#completed || !isRecord6(message))
|
|
44038
44570
|
return { events: [] };
|
|
44039
44571
|
const events = [];
|
|
44040
44572
|
this.#consumeSegmentLevel(message, events);
|
|
@@ -44048,9 +44580,11 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44048
44580
|
this.#consumeCompaction(message, events);
|
|
44049
44581
|
this.#consumeLocalCommandOutput(message, events);
|
|
44050
44582
|
}
|
|
44051
|
-
if (message.type === "stream_event" &&
|
|
44052
|
-
if (!nested)
|
|
44583
|
+
if (message.type === "stream_event" && isRecord6(message.event)) {
|
|
44584
|
+
if (!nested) {
|
|
44585
|
+
this.#observeUsage(message.event, events);
|
|
44053
44586
|
this.#consumeStreamEvent(message, events);
|
|
44587
|
+
}
|
|
44054
44588
|
} else if (message.type === "tool_progress") {
|
|
44055
44589
|
this.#consumeToolProgress(message, events);
|
|
44056
44590
|
}
|
|
@@ -44068,6 +44602,10 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44068
44602
|
}
|
|
44069
44603
|
if (message.type !== "result")
|
|
44070
44604
|
return { events };
|
|
44605
|
+
if (this.#usageRequest) {
|
|
44606
|
+
this.#usageRequest = null;
|
|
44607
|
+
events.push({ type: "usage.request", record: { kind: "missing" } });
|
|
44608
|
+
}
|
|
44071
44609
|
const usageEvent = parseResultUsageEvent(message);
|
|
44072
44610
|
if (usageEvent)
|
|
44073
44611
|
events.push(usageEvent);
|
|
@@ -44155,7 +44693,7 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44155
44693
|
if (message.subtype !== "background_tasks_changed" || !Array.isArray(message.tasks))
|
|
44156
44694
|
return;
|
|
44157
44695
|
const nativeSubagentIds = message.tasks.flatMap((task) => {
|
|
44158
|
-
if (!
|
|
44696
|
+
if (!isRecord6(task))
|
|
44159
44697
|
return [];
|
|
44160
44698
|
const taskId = boundedString(task.task_id, SUBAGENT_DESCRIPTION_LIMIT);
|
|
44161
44699
|
return taskId ? [taskId] : [];
|
|
@@ -44217,7 +44755,7 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44217
44755
|
});
|
|
44218
44756
|
return;
|
|
44219
44757
|
}
|
|
44220
|
-
if (message.subtype === "task_updated" &&
|
|
44758
|
+
if (message.subtype === "task_updated" && isRecord6(message.patch)) {
|
|
44221
44759
|
const status = taskStatus(message.patch.status);
|
|
44222
44760
|
if (!status)
|
|
44223
44761
|
return;
|
|
@@ -44234,16 +44772,45 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44234
44772
|
});
|
|
44235
44773
|
}
|
|
44236
44774
|
}
|
|
44775
|
+
/**
|
|
44776
|
+
* Meters each root model request from the Anthropic stream: `message_start` names it and
|
|
44777
|
+
* carries input and cache counts, the first `content_block_start` is its first output token,
|
|
44778
|
+
* `message_delta` carries the final counts and `message_stop` completes it.
|
|
44779
|
+
*/
|
|
44780
|
+
#observeUsage(event, events) {
|
|
44781
|
+
if (event.type === "message_start") {
|
|
44782
|
+
const message = isRecord6(event.message) ? event.message : null;
|
|
44783
|
+
this.#usageRequest = message && typeof message.id === "string" && message.id.length > 0 && isClaudeModelRequest(message.model) ? { id: message.id, model: message.model, usage: message.usage, startedAtMs: null } : null;
|
|
44784
|
+
return;
|
|
44785
|
+
}
|
|
44786
|
+
const request = this.#usageRequest;
|
|
44787
|
+
if (!request)
|
|
44788
|
+
return;
|
|
44789
|
+
if (event.type === "content_block_start") {
|
|
44790
|
+
request.startedAtMs ??= Date.now();
|
|
44791
|
+
} else if (event.type === "message_delta" && isRecord6(event.usage)) {
|
|
44792
|
+
request.usage = { ...isRecord6(request.usage) ? request.usage : {}, ...event.usage };
|
|
44793
|
+
} else if (event.type === "message_stop") {
|
|
44794
|
+
this.#usageRequest = null;
|
|
44795
|
+
events.push({
|
|
44796
|
+
type: "usage.request",
|
|
44797
|
+
record: claudeUsageRecord(request.id, request.model, request.usage, {
|
|
44798
|
+
startedAtMs: request.startedAtMs,
|
|
44799
|
+
completedAtMs: Date.now()
|
|
44800
|
+
})
|
|
44801
|
+
});
|
|
44802
|
+
}
|
|
44803
|
+
}
|
|
44237
44804
|
#consumeStreamEvent(message, events) {
|
|
44238
44805
|
const event = message.event;
|
|
44239
|
-
if (!
|
|
44806
|
+
if (!isRecord6(event))
|
|
44240
44807
|
return;
|
|
44241
|
-
if (event.type === "message_start" &&
|
|
44808
|
+
if (event.type === "message_start" && isRecord6(event.message) && typeof event.message.id === "string" && event.message.id.length > 0) {
|
|
44242
44809
|
this.#activeRootStreamMessageId = event.message.id;
|
|
44243
44810
|
this.#messageState(event.message.id);
|
|
44244
44811
|
return;
|
|
44245
44812
|
}
|
|
44246
|
-
if (event.type !== "content_block_delta" || !
|
|
44813
|
+
if (event.type !== "content_block_delta" || !isRecord6(event.delta))
|
|
44247
44814
|
return;
|
|
44248
44815
|
const messageId = this.#activeRootStreamMessageId ?? nativeUuid(message) ?? this.#nextMessageId();
|
|
44249
44816
|
if (!this.#activeRootStreamMessageId)
|
|
@@ -44319,7 +44886,7 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44319
44886
|
}
|
|
44320
44887
|
#consumeToolUseBlocks(message, events, ignoreKnownIds) {
|
|
44321
44888
|
for (const block of assistantContent(message) ?? []) {
|
|
44322
|
-
if (!
|
|
44889
|
+
if (!isRecord6(block) || block.type !== "tool_use")
|
|
44323
44890
|
continue;
|
|
44324
44891
|
const argumentsResult = jsonValueSchema.safeParse(block.input);
|
|
44325
44892
|
if (typeof block.id !== "string" || block.id.length === 0 || typeof block.name !== "string" || block.name.length === 0 || !argumentsResult.success) {
|
|
@@ -44371,9 +44938,9 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44371
44938
|
events.push(settled);
|
|
44372
44939
|
}
|
|
44373
44940
|
#consumeToolResults(message, events, ignoreUnknown) {
|
|
44374
|
-
if (!
|
|
44941
|
+
if (!isRecord6(message.message) || !Array.isArray(message.message.content))
|
|
44375
44942
|
return;
|
|
44376
|
-
const resultBlocks = message.message.content.filter((block) =>
|
|
44943
|
+
const resultBlocks = message.message.content.filter((block) => isRecord6(block) && block.type === "tool_result");
|
|
44377
44944
|
if (resultBlocks.length === 0)
|
|
44378
44945
|
return;
|
|
44379
44946
|
if (resultBlocks.length > 1 && message.tool_use_result !== void 0) {
|
|
@@ -44415,7 +44982,7 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44415
44982
|
continue;
|
|
44416
44983
|
}
|
|
44417
44984
|
const fileChange = isError ? null : parseClaudeNativeFileChange(tool.name, nativeResult);
|
|
44418
|
-
const backgroundTaskId = tool.name === "Bash" && !isError &&
|
|
44985
|
+
const backgroundTaskId = tool.name === "Bash" && !isError && isRecord6(nativeResult) && typeof nativeResult.backgroundTaskId === "string" && nativeResult.backgroundTaskId.length > 0 ? nativeResult.backgroundTaskId : void 0;
|
|
44419
44986
|
const outputFile = backgroundTaskId !== void 0 ? BACKGROUND_OUTPUT_FILE_PATTERN.exec(outputText ?? "")?.[1] : void 0;
|
|
44420
44987
|
const backgroundOutputFile = typeof outputFile === "string" && outputFile.length > 0 ? outputFile : void 0;
|
|
44421
44988
|
events.push({
|
|
@@ -44452,7 +45019,7 @@ function claudeTranscriptItemId(nativeTurnKey, kind, ordinal) {
|
|
|
44452
45019
|
|
|
44453
45020
|
// dist/claude-history.js
|
|
44454
45021
|
var claudeCodeHarnessId = harnessIdSchema.parse("claude-code");
|
|
44455
|
-
function
|
|
45022
|
+
function isRecord7(value) {
|
|
44456
45023
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
44457
45024
|
}
|
|
44458
45025
|
function textParts(value) {
|
|
@@ -44460,12 +45027,12 @@ function textParts(value) {
|
|
|
44460
45027
|
return value.length > 0 ? [value] : [];
|
|
44461
45028
|
if (!Array.isArray(value))
|
|
44462
45029
|
return [];
|
|
44463
|
-
return value.flatMap((part) =>
|
|
45030
|
+
return value.flatMap((part) => isRecord7(part) && part.type === "text" && typeof part.text === "string" ? [part.text] : []);
|
|
44464
45031
|
}
|
|
44465
45032
|
function thinkingParts(value) {
|
|
44466
45033
|
if (!Array.isArray(value))
|
|
44467
45034
|
return [];
|
|
44468
|
-
return value.flatMap((part) =>
|
|
45035
|
+
return value.flatMap((part) => isRecord7(part) && part.type === "thinking" && typeof part.thinking === "string" ? [part.thinking] : []);
|
|
44469
45036
|
}
|
|
44470
45037
|
var localCommandRecordPattern = /^\s*<(local-command-(?:stdout|caveat))>[\s\S]*<\/\1>\s*$/u;
|
|
44471
45038
|
var taskNotificationRecordPattern = /^\s*<task-notification>[\s\S]*<\/task-notification>\s*$/u;
|
|
@@ -44474,33 +45041,33 @@ var controlCommandNamePattern = /<command-name>\s*\/(?:model|compact)\s*<\/comma
|
|
|
44474
45041
|
var recapCommandNamePattern = /<command-name>\s*\/recap\s*<\/command-name>/u;
|
|
44475
45042
|
var initCommandNamePattern = /<command-name>\s*\/init\s*<\/command-name>/u;
|
|
44476
45043
|
var localCommandStdoutPattern = /^\s*<local-command-stdout>([\s\S]*)<\/local-command-stdout>\s*$/u;
|
|
44477
|
-
function isLocalCommandRecord(
|
|
44478
|
-
return localCommandRecordPattern.test(
|
|
45044
|
+
function isLocalCommandRecord(text2) {
|
|
45045
|
+
return localCommandRecordPattern.test(text2);
|
|
44479
45046
|
}
|
|
44480
|
-
function isTaskNotificationRecord(
|
|
44481
|
-
return taskNotificationRecordPattern.test(
|
|
45047
|
+
function isTaskNotificationRecord(text2) {
|
|
45048
|
+
return taskNotificationRecordPattern.test(text2);
|
|
44482
45049
|
}
|
|
44483
|
-
function isControlCommandEnvelope(
|
|
44484
|
-
return commandEnvelopePattern.test(
|
|
45050
|
+
function isControlCommandEnvelope(text2) {
|
|
45051
|
+
return commandEnvelopePattern.test(text2) && controlCommandNamePattern.test(text2);
|
|
44485
45052
|
}
|
|
44486
|
-
function isNamedCommandEnvelope(
|
|
44487
|
-
return commandEnvelopePattern.test(
|
|
45053
|
+
function isNamedCommandEnvelope(text2, namePattern) {
|
|
45054
|
+
return commandEnvelopePattern.test(text2) && namePattern.test(text2);
|
|
44488
45055
|
}
|
|
44489
|
-
function displayedUserText(
|
|
44490
|
-
if (isNamedCommandEnvelope(
|
|
45056
|
+
function displayedUserText(text2) {
|
|
45057
|
+
if (isNamedCommandEnvelope(text2, initCommandNamePattern))
|
|
44491
45058
|
return "/init";
|
|
44492
|
-
if (isNamedCommandEnvelope(
|
|
45059
|
+
if (isNamedCommandEnvelope(text2, recapCommandNamePattern))
|
|
44493
45060
|
return "/recap";
|
|
44494
|
-
return
|
|
45061
|
+
return text2;
|
|
44495
45062
|
}
|
|
44496
|
-
function localCommandStdoutText(
|
|
44497
|
-
const match = localCommandStdoutPattern.exec(
|
|
45063
|
+
function localCommandStdoutText(text2) {
|
|
45064
|
+
const match = localCommandStdoutPattern.exec(text2);
|
|
44498
45065
|
if (!match)
|
|
44499
45066
|
return null;
|
|
44500
45067
|
return match[1] ?? "";
|
|
44501
45068
|
}
|
|
44502
45069
|
function isTaskNotificationOrigin(value) {
|
|
44503
|
-
return
|
|
45070
|
+
return isRecord7(value.origin) && value.origin.kind === "task-notification";
|
|
44504
45071
|
}
|
|
44505
45072
|
function visibleUserTextParts(message) {
|
|
44506
45073
|
if (message.type !== "user" || message.syntheticUser)
|
|
@@ -44511,24 +45078,24 @@ function visibleUserTextParts(message) {
|
|
|
44511
45078
|
return parts.filter((part) => !isLocalCommandRecord(part) && !isTaskNotificationRecord(part));
|
|
44512
45079
|
}
|
|
44513
45080
|
function isInterruptionRecord(value, promptId) {
|
|
44514
|
-
if (value.type !== "user" || promptId === null || value.promptId !== promptId || value.promptSource !== void 0 || !
|
|
45081
|
+
if (value.type !== "user" || promptId === null || value.promptId !== promptId || value.promptSource !== void 0 || !isRecord7(value.message))
|
|
44515
45082
|
return false;
|
|
44516
45083
|
const content = value.message.content;
|
|
44517
45084
|
if (!Array.isArray(content) || content.length !== 1)
|
|
44518
45085
|
return false;
|
|
44519
45086
|
const part = content[0];
|
|
44520
|
-
return
|
|
45087
|
+
return isRecord7(part) && part.type === "text" && (part.text === "[Request interrupted by user]" || part.text === "[Request interrupted by user for tool use]");
|
|
44521
45088
|
}
|
|
44522
45089
|
function conversationMessages(values, sessionId) {
|
|
44523
45090
|
const messages = [];
|
|
44524
45091
|
const ids = /* @__PURE__ */ new Set();
|
|
44525
45092
|
let promptId = null;
|
|
44526
45093
|
for (const value of values) {
|
|
44527
|
-
if (!
|
|
45094
|
+
if (!isRecord7(value))
|
|
44528
45095
|
throw new Error("Claude history contains a malformed message");
|
|
44529
45096
|
if (value.type === "system")
|
|
44530
45097
|
continue;
|
|
44531
|
-
if (value.type !== "user" && value.type !== "assistant" || typeof value.uuid !== "string" || value.uuid.length === 0 || value.session_id !== sessionId || !
|
|
45098
|
+
if (value.type !== "user" && value.type !== "assistant" || typeof value.uuid !== "string" || value.uuid.length === 0 || value.session_id !== sessionId || !isRecord7(value.message) || value.message.role !== value.type) {
|
|
44532
45099
|
throw new Error("Claude history contains an invalid message identity");
|
|
44533
45100
|
}
|
|
44534
45101
|
if (ids.has(value.uuid))
|
|
@@ -44621,13 +45188,13 @@ function mapClaudeSnapshot(values, sessionId) {
|
|
|
44621
45188
|
formatVersion: 1
|
|
44622
45189
|
})
|
|
44623
45190
|
} : {},
|
|
44624
|
-
input: visibleUserTextParts(user).map((
|
|
45191
|
+
input: visibleUserTextParts(user).map((text2) => ({
|
|
44625
45192
|
type: "text",
|
|
44626
|
-
text: displayedUserText(
|
|
45193
|
+
text: displayedUserText(text2)
|
|
44627
45194
|
})),
|
|
44628
45195
|
items: turnMessages.flatMap((message) => {
|
|
44629
45196
|
if (message.type === "user") {
|
|
44630
|
-
const recapOutput = visibleUserTextParts(user).some((
|
|
45197
|
+
const recapOutput = visibleUserTextParts(user).some((text3) => isNamedCommandEnvelope(text3, recapCommandNamePattern)) ? textParts(message.message.content).map(localCommandStdoutText).find((text3) => text3 !== null && text3.length > 0) : void 0;
|
|
44631
45198
|
if (!recapOutput)
|
|
44632
45199
|
return [];
|
|
44633
45200
|
return [
|
|
@@ -44644,15 +45211,15 @@ function mapClaudeSnapshot(values, sessionId) {
|
|
|
44644
45211
|
if (message.type !== "assistant")
|
|
44645
45212
|
return [];
|
|
44646
45213
|
const content = message.message.content;
|
|
44647
|
-
const
|
|
45214
|
+
const text2 = textParts(content).join("");
|
|
44648
45215
|
const reasoning = thinkingParts(content).join("");
|
|
44649
45216
|
if (!Array.isArray(content)) {
|
|
44650
|
-
return
|
|
45217
|
+
return text2.length > 0 ? [
|
|
44651
45218
|
{
|
|
44652
45219
|
item: {
|
|
44653
45220
|
type: "agentMessage",
|
|
44654
45221
|
itemId: claudeTranscriptItemId(user.uuid, "agentMessage", agentMessageOrdinal += 1),
|
|
44655
|
-
text
|
|
45222
|
+
text: text2
|
|
44656
45223
|
},
|
|
44657
45224
|
outcome: itemOutcome(outcome)
|
|
44658
45225
|
}
|
|
@@ -44662,7 +45229,7 @@ function mapClaudeSnapshot(values, sessionId) {
|
|
|
44662
45229
|
let projectedReasoning = false;
|
|
44663
45230
|
let projectedText = false;
|
|
44664
45231
|
for (const [blockIndex, block] of content.entries()) {
|
|
44665
|
-
if (!
|
|
45232
|
+
if (!isRecord7(block))
|
|
44666
45233
|
continue;
|
|
44667
45234
|
if (block.type === "thinking" && !projectedReasoning && reasoning.length > 0) {
|
|
44668
45235
|
items.push({
|
|
@@ -44676,12 +45243,12 @@ function mapClaudeSnapshot(values, sessionId) {
|
|
|
44676
45243
|
projectedReasoning = true;
|
|
44677
45244
|
continue;
|
|
44678
45245
|
}
|
|
44679
|
-
if (block.type === "text" && !projectedText &&
|
|
45246
|
+
if (block.type === "text" && !projectedText && text2.length > 0) {
|
|
44680
45247
|
items.push({
|
|
44681
45248
|
item: {
|
|
44682
45249
|
type: "agentMessage",
|
|
44683
45250
|
itemId: claudeTranscriptItemId(user.uuid, "agentMessage", agentMessageOrdinal += 1),
|
|
44684
|
-
text
|
|
45251
|
+
text: text2
|
|
44685
45252
|
},
|
|
44686
45253
|
outcome: itemOutcome(outcome)
|
|
44687
45254
|
});
|
|
@@ -44706,7 +45273,7 @@ function mapClaudeSnapshot(values, sessionId) {
|
|
|
44706
45273
|
}
|
|
44707
45274
|
} : { status: "succeeded" };
|
|
44708
45275
|
const itemId = toolItem !== null ? claudeTranscriptItemId(user.uuid, "tool", toolItem) : hostItemIdSchema.parse(`claude-item-v1-${message.uuid}-tool-${blockIndex}`);
|
|
44709
|
-
if (block.name === "Bash" &&
|
|
45276
|
+
if (block.name === "Bash" && isRecord7(block.input) && typeof block.input.command === "string") {
|
|
44710
45277
|
items.push({
|
|
44711
45278
|
item: {
|
|
44712
45279
|
type: "commandExecution",
|
|
@@ -44744,7 +45311,7 @@ function toolResultBlocks(messages) {
|
|
|
44744
45311
|
if (message.type !== "user" || !Array.isArray(message.message.content))
|
|
44745
45312
|
continue;
|
|
44746
45313
|
for (const block of message.message.content) {
|
|
44747
|
-
if (
|
|
45314
|
+
if (isRecord7(block) && block.type === "tool_result" && typeof block.tool_use_id === "string") {
|
|
44748
45315
|
results.set(block.tool_use_id, block);
|
|
44749
45316
|
}
|
|
44750
45317
|
}
|
|
@@ -44754,12 +45321,12 @@ function toolResultBlocks(messages) {
|
|
|
44754
45321
|
function toolResultOutput(block) {
|
|
44755
45322
|
if (!block)
|
|
44756
45323
|
return void 0;
|
|
44757
|
-
const
|
|
44758
|
-
return
|
|
45324
|
+
const text2 = textParts(block.content).join("");
|
|
45325
|
+
return text2.length > 0 ? text2 : void 0;
|
|
44759
45326
|
}
|
|
44760
45327
|
function resultSubagentId(value, block) {
|
|
44761
45328
|
const nativeResult = value.tool_use_result;
|
|
44762
|
-
if (
|
|
45329
|
+
if (isRecord7(nativeResult)) {
|
|
44763
45330
|
const structured = nativeResult.agentId ?? nativeResult.agent_id ?? nativeResult.task_id;
|
|
44764
45331
|
if (typeof structured === "string" && structured.length > 0)
|
|
44765
45332
|
return structured;
|
|
@@ -44770,13 +45337,13 @@ function resultSubagentId(value, block) {
|
|
|
44770
45337
|
function subagentPrompt2(values, nativeSubagentId2) {
|
|
44771
45338
|
const toolUses = /* @__PURE__ */ new Map();
|
|
44772
45339
|
for (const value of values) {
|
|
44773
|
-
if (!
|
|
45340
|
+
if (!isRecord7(value) || !isRecord7(value.message) || !Array.isArray(value.message.content)) {
|
|
44774
45341
|
continue;
|
|
44775
45342
|
}
|
|
44776
45343
|
for (const block of value.message.content) {
|
|
44777
|
-
if (!
|
|
45344
|
+
if (!isRecord7(block))
|
|
44778
45345
|
continue;
|
|
44779
|
-
if (block.type === "tool_use" && typeof block.id === "string" && (block.name === "Agent" || block.name === "Task") &&
|
|
45346
|
+
if (block.type === "tool_use" && typeof block.id === "string" && (block.name === "Agent" || block.name === "Task") && isRecord7(block.input) && typeof block.input.prompt === "string" && block.input.prompt.length > 0) {
|
|
44780
45347
|
toolUses.set(block.id, block.input.prompt);
|
|
44781
45348
|
continue;
|
|
44782
45349
|
}
|
|
@@ -44790,7 +45357,7 @@ function subagentPrompt2(values, nativeSubagentId2) {
|
|
|
44790
45357
|
return void 0;
|
|
44791
45358
|
}
|
|
44792
45359
|
function mapClaudeSubagentSnapshot(values, parentSessionId, nativeSubagentId2, parentValues = []) {
|
|
44793
|
-
const messages = conversationMessages(values.map((value) =>
|
|
45360
|
+
const messages = conversationMessages(values.map((value) => isRecord7(value) ? { ...value, session_id: parentSessionId } : value), parentSessionId);
|
|
44794
45361
|
const turns = [];
|
|
44795
45362
|
for (let index = 0; index < messages.length; ) {
|
|
44796
45363
|
const first = messages[index];
|
|
@@ -44817,7 +45384,7 @@ function mapClaudeSubagentSnapshot(values, parentSessionId, nativeSubagentId2, p
|
|
|
44817
45384
|
const content = Array.isArray(message.message.content) ? message.message.content : [{ type: "text", text: message.message.content }];
|
|
44818
45385
|
for (let blockIndex = 0; blockIndex < content.length; blockIndex += 1) {
|
|
44819
45386
|
const block = content[blockIndex];
|
|
44820
|
-
if (!
|
|
45387
|
+
if (!isRecord7(block))
|
|
44821
45388
|
continue;
|
|
44822
45389
|
const itemId = hostItemIdSchema.parse(`claude-subagent-item-v2-${nativeSubagentId2}-${message.uuid}-${blockIndex}`);
|
|
44823
45390
|
if (block.type === "thinking" && typeof block.thinking === "string") {
|
|
@@ -44854,7 +45421,7 @@ function mapClaudeSubagentSnapshot(values, parentSessionId, nativeSubagentId2, p
|
|
|
44854
45421
|
retryable: false
|
|
44855
45422
|
}
|
|
44856
45423
|
} : { status: "succeeded" };
|
|
44857
|
-
if (block.name === "Bash" &&
|
|
45424
|
+
if (block.name === "Bash" && isRecord7(block.input) && typeof block.input.command === "string") {
|
|
44858
45425
|
items.push({
|
|
44859
45426
|
item: {
|
|
44860
45427
|
type: "commandExecution",
|
|
@@ -44896,7 +45463,7 @@ function mapClaudeSubagentSnapshot(values, parentSessionId, nativeSubagentId2, p
|
|
|
44896
45463
|
formatVersion: 1
|
|
44897
45464
|
})
|
|
44898
45465
|
} : {},
|
|
44899
|
-
input: user ? visibleUserTextParts(user).map((
|
|
45466
|
+
input: user ? visibleUserTextParts(user).map((text2) => ({ type: "text", text: text2 })) : turns.length === 0 ? [subagentPrompt2(parentValues, nativeSubagentId2)].filter((text2) => text2 !== void 0).map((text2) => ({ type: "text", text: text2 })) : [],
|
|
44900
45467
|
items,
|
|
44901
45468
|
outcome
|
|
44902
45469
|
});
|
|
@@ -44930,7 +45497,7 @@ function nativeIds(snapshot) {
|
|
|
44930
45497
|
async function readSnapshot(dependencies, cwd, sessionId) {
|
|
44931
45498
|
let messages;
|
|
44932
45499
|
try {
|
|
44933
|
-
messages = await dependencies.readSessionMessages({ cwd, sessionId });
|
|
45500
|
+
messages = await dependencies.readSessionMessages({ cwd, sessionId }) ?? [];
|
|
44934
45501
|
} catch {
|
|
44935
45502
|
return {
|
|
44936
45503
|
ok: false,
|
|
@@ -44984,7 +45551,7 @@ async function forkClaudeSession(input) {
|
|
|
44984
45551
|
error: error51("protocolError", "Claude Code Session working directory is unavailable", false)
|
|
44985
45552
|
};
|
|
44986
45553
|
}
|
|
44987
|
-
if (
|
|
45554
|
+
if (path12.resolve(sourceInfo.cwd) !== input.cwd) {
|
|
44988
45555
|
return {
|
|
44989
45556
|
ok: false,
|
|
44990
45557
|
error: error51("unsupported", "Claude Code cannot Fork across working directories", false)
|
|
@@ -45084,14 +45651,14 @@ async function forkClaudeSession(input) {
|
|
|
45084
45651
|
}
|
|
45085
45652
|
|
|
45086
45653
|
// dist/claude-transcript.js
|
|
45087
|
-
import
|
|
45088
|
-
import
|
|
45654
|
+
import os6 from "node:os";
|
|
45655
|
+
import path13 from "node:path";
|
|
45089
45656
|
import { readFile as readFile4, readdir, stat as stat3 } from "node:fs/promises";
|
|
45090
45657
|
function projectDirectoryName(cwd) {
|
|
45091
45658
|
return cwd.replace(/[^A-Za-z0-9]/gu, "-");
|
|
45092
45659
|
}
|
|
45093
45660
|
function configDirectory(environment) {
|
|
45094
|
-
return environment.CLAUDE_CONFIG_DIR ?
|
|
45661
|
+
return environment.CLAUDE_CONFIG_DIR ? path13.resolve(environment.CLAUDE_CONFIG_DIR) : path13.join(os6.homedir(), ".claude");
|
|
45095
45662
|
}
|
|
45096
45663
|
async function existingFile(file2) {
|
|
45097
45664
|
try {
|
|
@@ -45101,9 +45668,9 @@ async function existingFile(file2) {
|
|
|
45101
45668
|
}
|
|
45102
45669
|
}
|
|
45103
45670
|
async function findTranscript(input) {
|
|
45104
|
-
const projectsDirectory =
|
|
45671
|
+
const projectsDirectory = path13.join(configDirectory(input.environment), "projects");
|
|
45105
45672
|
const name = `${input.sessionId}.jsonl`;
|
|
45106
|
-
const expected =
|
|
45673
|
+
const expected = path13.join(projectsDirectory, projectDirectoryName(input.cwd), name);
|
|
45107
45674
|
if (await existingFile(expected))
|
|
45108
45675
|
return expected;
|
|
45109
45676
|
let projects;
|
|
@@ -45112,14 +45679,14 @@ async function findTranscript(input) {
|
|
|
45112
45679
|
} catch {
|
|
45113
45680
|
return null;
|
|
45114
45681
|
}
|
|
45115
|
-
for (const
|
|
45116
|
-
const candidate =
|
|
45682
|
+
for (const project2 of projects) {
|
|
45683
|
+
const candidate = path13.join(projectsDirectory, project2, name);
|
|
45117
45684
|
if (await existingFile(candidate))
|
|
45118
45685
|
return candidate;
|
|
45119
45686
|
}
|
|
45120
45687
|
return null;
|
|
45121
45688
|
}
|
|
45122
|
-
function
|
|
45689
|
+
function isRecord8(value) {
|
|
45123
45690
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
45124
45691
|
}
|
|
45125
45692
|
async function readClaudeTranscript(input) {
|
|
@@ -45127,7 +45694,7 @@ async function readClaudeTranscript(input) {
|
|
|
45127
45694
|
if (!transcript)
|
|
45128
45695
|
return null;
|
|
45129
45696
|
const contents = await readFile4(transcript, "utf8");
|
|
45130
|
-
const messages =
|
|
45697
|
+
const messages = /* @__PURE__ */ new Map();
|
|
45131
45698
|
for (const line of contents.split("\n")) {
|
|
45132
45699
|
if (line.trim().length === 0)
|
|
45133
45700
|
continue;
|
|
@@ -45137,19 +45704,19 @@ async function readClaudeTranscript(input) {
|
|
|
45137
45704
|
} catch {
|
|
45138
45705
|
continue;
|
|
45139
45706
|
}
|
|
45140
|
-
if (!
|
|
45707
|
+
if (!isRecord8(entry) || entry.type !== "user" && entry.type !== "assistant" || typeof entry.uuid !== "string" || !isRecord8(entry.message)) {
|
|
45141
45708
|
continue;
|
|
45142
45709
|
}
|
|
45143
|
-
messages.
|
|
45710
|
+
messages.set(entry.uuid, { ...entry, session_id: input.sessionId });
|
|
45144
45711
|
}
|
|
45145
|
-
return messages;
|
|
45712
|
+
return [...messages.values()];
|
|
45146
45713
|
}
|
|
45147
45714
|
|
|
45148
45715
|
// dist/model-catalog.js
|
|
45149
45716
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
45150
45717
|
import { readFile as readFile5 } from "node:fs/promises";
|
|
45151
|
-
import
|
|
45152
|
-
import
|
|
45718
|
+
import os7 from "node:os";
|
|
45719
|
+
import path14 from "node:path";
|
|
45153
45720
|
|
|
45154
45721
|
// dist/thinking-options.js
|
|
45155
45722
|
var option = (id, label) => ({
|
|
@@ -45231,7 +45798,7 @@ function decodeClaudeModelRef(ref) {
|
|
|
45231
45798
|
return value === "default" ? void 0 : value;
|
|
45232
45799
|
}
|
|
45233
45800
|
function resolveClaudeConfigDirectory(environment = process.env) {
|
|
45234
|
-
return
|
|
45801
|
+
return path14.resolve(environment.CLAUDE_CONFIG_DIR ?? path14.join(os7.homedir(), ".claude"));
|
|
45235
45802
|
}
|
|
45236
45803
|
function parseModelPickerOptions(value) {
|
|
45237
45804
|
if (!Array.isArray(value))
|
|
@@ -45273,7 +45840,7 @@ function parseClaudeModelPickerSettings(value) {
|
|
|
45273
45840
|
};
|
|
45274
45841
|
}
|
|
45275
45842
|
async function readClaudeUserModelPicker(environment = process.env) {
|
|
45276
|
-
const settingsPath =
|
|
45843
|
+
const settingsPath = path14.join(resolveClaudeConfigDirectory(environment), "settings.json");
|
|
45277
45844
|
let raw;
|
|
45278
45845
|
try {
|
|
45279
45846
|
raw = await readFile5(settingsPath, "utf8");
|
|
@@ -45474,7 +46041,7 @@ var CLAUDE_PERMISSION_MODE_CATALOGS = {
|
|
|
45474
46041
|
};
|
|
45475
46042
|
var autoModeModelInfoSchema = external_exports.object({ supportsAutoMode: external_exports.literal(true) });
|
|
45476
46043
|
function claudePermissionModeCatalogForModels(models, bypassPermissionsAvailable = true) {
|
|
45477
|
-
const supportsAutoMode = Array.isArray(models) && models.some((
|
|
46044
|
+
const supportsAutoMode = Array.isArray(models) && models.some((model2) => autoModeModelInfoSchema.safeParse(model2).success);
|
|
45478
46045
|
if (supportsAutoMode) {
|
|
45479
46046
|
return bypassPermissionsAvailable ? CLAUDE_PERMISSION_MODE_CATALOGS.auto : CLAUDE_PERMISSION_MODE_CATALOGS.autoWithoutBypass;
|
|
45480
46047
|
}
|
|
@@ -45603,7 +46170,7 @@ function projectClaudeAccountUsage(usage, account) {
|
|
|
45603
46170
|
|
|
45604
46171
|
// dist/process-fence.js
|
|
45605
46172
|
import { execFile as execFile3 } from "node:child_process";
|
|
45606
|
-
import
|
|
46173
|
+
import path15 from "node:path";
|
|
45607
46174
|
import { setTimeout as setTimeout2 } from "node:timers/promises";
|
|
45608
46175
|
import { promisify } from "node:util";
|
|
45609
46176
|
var executeFile = promisify(execFile3);
|
|
@@ -45627,9 +46194,9 @@ async function closeClaudeProcessGroup(child, timeoutMs) {
|
|
|
45627
46194
|
if (child.exitCode !== null || child.signalCode !== null)
|
|
45628
46195
|
throw new Error("Claude process tree cannot be confirmed after its Windows root exited");
|
|
45629
46196
|
const root = process.env.SystemRoot ?? process.env.SYSTEMROOT;
|
|
45630
|
-
if (!root || !
|
|
46197
|
+
if (!root || !path15.win32.isAbsolute(root))
|
|
45631
46198
|
throw new Error("Windows SystemRoot is unavailable");
|
|
45632
|
-
await executeFile(
|
|
46199
|
+
await executeFile(path15.win32.join(root, "System32", "taskkill.exe"), ["/PID", String(pid), "/T", "/F"], {
|
|
45633
46200
|
timeout: timeoutMs,
|
|
45634
46201
|
windowsHide: true
|
|
45635
46202
|
});
|
|
@@ -45713,25 +46280,25 @@ function rejectAfter(milliseconds, message) {
|
|
|
45713
46280
|
function processExited(child) {
|
|
45714
46281
|
return child.exitCode !== null || child.signalCode !== null;
|
|
45715
46282
|
}
|
|
45716
|
-
function
|
|
46283
|
+
function isRecord9(value) {
|
|
45717
46284
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
45718
46285
|
}
|
|
45719
46286
|
function permissionModeFromMessage(value) {
|
|
45720
|
-
if (!
|
|
46287
|
+
if (!isRecord9(value) || value.type !== "system" || value.subtype !== "init" && value.subtype !== "status" || !("permissionMode" in value) || value.permissionMode === void 0) {
|
|
45721
46288
|
return void 0;
|
|
45722
46289
|
}
|
|
45723
46290
|
return isClaudePermissionMode(value.permissionMode) ? value.permissionMode : void 0;
|
|
45724
46291
|
}
|
|
45725
46292
|
function parseContextUsage(value) {
|
|
45726
|
-
if (!
|
|
46293
|
+
if (!isRecord9(value))
|
|
45727
46294
|
throw new Error("Claude SDK context Usage is invalid");
|
|
45728
46295
|
const usedTokens = value.totalTokens;
|
|
45729
46296
|
const maxTokens = value.maxTokens;
|
|
45730
|
-
const
|
|
45731
|
-
if (typeof usedTokens !== "number" || !Number.isSafeInteger(usedTokens) || usedTokens < 0 || typeof maxTokens !== "number" || !Number.isSafeInteger(maxTokens) || maxTokens <= 0 || typeof
|
|
46297
|
+
const model2 = value.model;
|
|
46298
|
+
if (typeof usedTokens !== "number" || !Number.isSafeInteger(usedTokens) || usedTokens < 0 || typeof maxTokens !== "number" || !Number.isSafeInteger(maxTokens) || maxTokens <= 0 || typeof model2 !== "string" || model2.trim().length === 0 || model2.length > 256) {
|
|
45732
46299
|
throw new Error("Claude SDK context Usage contains invalid values");
|
|
45733
46300
|
}
|
|
45734
|
-
return { usedTokens, maxTokens, model };
|
|
46301
|
+
return { usedTokens, maxTokens, model: model2 };
|
|
45735
46302
|
}
|
|
45736
46303
|
function parseQuestions(input) {
|
|
45737
46304
|
if (!Array.isArray(input.questions) || input.questions.length < 1 || input.questions.length > 4) {
|
|
@@ -45740,7 +46307,7 @@ function parseQuestions(input) {
|
|
|
45740
46307
|
const questions = [];
|
|
45741
46308
|
const questionTexts = /* @__PURE__ */ new Set();
|
|
45742
46309
|
for (const value of input.questions) {
|
|
45743
|
-
if (!
|
|
46310
|
+
if (!isRecord9(value))
|
|
45744
46311
|
return null;
|
|
45745
46312
|
const question = value.question;
|
|
45746
46313
|
const header = value.header;
|
|
@@ -45751,7 +46318,7 @@ function parseQuestions(input) {
|
|
|
45751
46318
|
const labels = /* @__PURE__ */ new Set();
|
|
45752
46319
|
const options = [];
|
|
45753
46320
|
for (const option2 of value.options) {
|
|
45754
|
-
if (!
|
|
46321
|
+
if (!isRecord9(option2) || typeof option2.label !== "string" || option2.label.length === 0 || labels.has(option2.label) || typeof option2.description !== "string") {
|
|
45755
46322
|
return null;
|
|
45756
46323
|
}
|
|
45757
46324
|
labels.add(option2.label);
|
|
@@ -45765,8 +46332,8 @@ function parseQuestions(input) {
|
|
|
45765
46332
|
function boundedDisplayText(value, maxLength) {
|
|
45766
46333
|
if (typeof value !== "string")
|
|
45767
46334
|
return null;
|
|
45768
|
-
const
|
|
45769
|
-
return
|
|
46335
|
+
const text2 = value.trim();
|
|
46336
|
+
return text2.length > 0 && text2.length <= maxLength ? text2 : null;
|
|
45770
46337
|
}
|
|
45771
46338
|
var SESSION_PERMISSION_DESTINATIONS = /* @__PURE__ */ new Set(["session", "cliArg"]);
|
|
45772
46339
|
var PERSISTENT_PERMISSION_DESTINATIONS = /* @__PURE__ */ new Set([
|
|
@@ -45793,7 +46360,7 @@ function permissionUpdateDestination(value) {
|
|
|
45793
46360
|
return void 0;
|
|
45794
46361
|
}
|
|
45795
46362
|
function isPermissionUpdate(value) {
|
|
45796
|
-
if (!
|
|
46363
|
+
if (!isRecord9(value) || !permissionUpdateDestination(value.destination))
|
|
45797
46364
|
return false;
|
|
45798
46365
|
if (value.type === "setMode") {
|
|
45799
46366
|
return typeof value.mode === "string" && PERMISSION_MODES.has(value.mode);
|
|
@@ -45802,7 +46369,7 @@ function isPermissionUpdate(value) {
|
|
|
45802
46369
|
return Array.isArray(value.directories) && value.directories.every((directory) => typeof directory === "string");
|
|
45803
46370
|
}
|
|
45804
46371
|
if (value.type === "addRules" || value.type === "replaceRules" || value.type === "removeRules") {
|
|
45805
|
-
return typeof value.behavior === "string" && PERMISSION_BEHAVIORS.has(value.behavior) && Array.isArray(value.rules) && value.rules.every((rule) =>
|
|
46372
|
+
return typeof value.behavior === "string" && PERMISSION_BEHAVIORS.has(value.behavior) && Array.isArray(value.rules) && value.rules.every((rule) => isRecord9(rule) && typeof rule.toolName === "string" && (rule.ruleContent === void 0 || typeof rule.ruleContent === "string"));
|
|
45806
46373
|
}
|
|
45807
46374
|
return false;
|
|
45808
46375
|
}
|
|
@@ -45856,6 +46423,35 @@ function canDeliverSettlementImmediately(event, pendingEvents) {
|
|
|
45856
46423
|
return event.callId !== void 0 && pending.callId === event.callId || pending.nativeSubagentId === event.nativeSubagentId;
|
|
45857
46424
|
});
|
|
45858
46425
|
}
|
|
46426
|
+
function isRootOutput(event) {
|
|
46427
|
+
switch (event.type) {
|
|
46428
|
+
case "compaction.started":
|
|
46429
|
+
case "compaction.completed":
|
|
46430
|
+
case "text.delta":
|
|
46431
|
+
case "reasoning.delta":
|
|
46432
|
+
case "reasoning.completed":
|
|
46433
|
+
case "message.completed":
|
|
46434
|
+
case "tool.started":
|
|
46435
|
+
case "tool.progress":
|
|
46436
|
+
case "tool.completed":
|
|
46437
|
+
case "subagent.started":
|
|
46438
|
+
case "subagent.completed":
|
|
46439
|
+
case "interaction.requested":
|
|
46440
|
+
case "interaction.closed":
|
|
46441
|
+
case "usage.result":
|
|
46442
|
+
return true;
|
|
46443
|
+
case "usage.request":
|
|
46444
|
+
case "segment.started":
|
|
46445
|
+
case "subagents.live":
|
|
46446
|
+
case "subagent.updated":
|
|
46447
|
+
case "subagent.settled":
|
|
46448
|
+
case "subagent.transcript.changed":
|
|
46449
|
+
return false;
|
|
46450
|
+
default:
|
|
46451
|
+
event;
|
|
46452
|
+
return false;
|
|
46453
|
+
}
|
|
46454
|
+
}
|
|
45859
46455
|
var ClaudeSdkTransport = class {
|
|
45860
46456
|
sessionId;
|
|
45861
46457
|
#children = [];
|
|
@@ -45979,7 +46575,7 @@ var ClaudeSdkTransport = class {
|
|
|
45979
46575
|
return { commands: this.#slashCommands, skillNames: this.#skillNames };
|
|
45980
46576
|
}
|
|
45981
46577
|
#observeSlashCommands(message) {
|
|
45982
|
-
if (!
|
|
46578
|
+
if (!isRecord9(message) || message.type !== "system")
|
|
45983
46579
|
return;
|
|
45984
46580
|
if (message.subtype === "init" && Array.isArray(message.skills)) {
|
|
45985
46581
|
this.#skillNames = new Set(message.skills.filter((name) => typeof name === "string"));
|
|
@@ -45998,11 +46594,11 @@ var ClaudeSdkTransport = class {
|
|
|
45998
46594
|
throw new Error("Claude SDK transport is not started");
|
|
45999
46595
|
return this.#permissionMode;
|
|
46000
46596
|
}
|
|
46001
|
-
async setModel(
|
|
46597
|
+
async setModel(model2) {
|
|
46002
46598
|
const activeQuery = this.#query;
|
|
46003
46599
|
if (!this.#started || !activeQuery)
|
|
46004
46600
|
throw new Error("Claude SDK transport is not started");
|
|
46005
|
-
await activeQuery.setModel(
|
|
46601
|
+
await activeQuery.setModel(model2);
|
|
46006
46602
|
}
|
|
46007
46603
|
async setThinkingOption(thinkingOptionId) {
|
|
46008
46604
|
const activeQuery = this.#query;
|
|
@@ -46029,12 +46625,15 @@ var ClaudeSdkTransport = class {
|
|
|
46029
46625
|
recap(userMessageId, onEvent) {
|
|
46030
46626
|
return this.runTurn("/recap", userMessageId, onEvent);
|
|
46031
46627
|
}
|
|
46032
|
-
runTurn(
|
|
46628
|
+
runTurn(text2, userMessageId, onEvent) {
|
|
46033
46629
|
if (this.#closePromise || !this.#started || !this.#query) {
|
|
46034
46630
|
return Promise.reject(new Error("Claude SDK transport is not started"));
|
|
46035
46631
|
}
|
|
46036
|
-
if (this.#active)
|
|
46632
|
+
if (this.#active || this.#autonomous?.live) {
|
|
46037
46633
|
return Promise.reject(new Error("Claude SDK transport is busy"));
|
|
46634
|
+
}
|
|
46635
|
+
const unclaimed = this.#autonomous?.events ?? [];
|
|
46636
|
+
this.#autonomous = null;
|
|
46038
46637
|
const promise2 = new Promise((resolve2, reject) => {
|
|
46039
46638
|
this.#active = {
|
|
46040
46639
|
accumulator: new ClaudeNativeTurnAccumulator(this.#provider ? { provider: this.#provider } : {}),
|
|
@@ -46045,9 +46644,11 @@ var ClaudeSdkTransport = class {
|
|
|
46045
46644
|
reject
|
|
46046
46645
|
};
|
|
46047
46646
|
});
|
|
46647
|
+
for (const event of unclaimed)
|
|
46648
|
+
onEvent(event);
|
|
46048
46649
|
this.#input.push({
|
|
46049
46650
|
type: "user",
|
|
46050
|
-
message: { role: "user", content:
|
|
46651
|
+
message: { role: "user", content: text2 },
|
|
46051
46652
|
parent_tool_use_id: null,
|
|
46052
46653
|
session_id: this.sessionId,
|
|
46053
46654
|
uuid: userMessageId,
|
|
@@ -46104,11 +46705,11 @@ var ClaudeSdkTransport = class {
|
|
|
46104
46705
|
return Promise.resolve();
|
|
46105
46706
|
}
|
|
46106
46707
|
async abort() {
|
|
46107
|
-
const
|
|
46708
|
+
const accumulator = this.#active?.accumulator ?? (this.#autonomous?.live ? this.#autonomous.accumulator : null);
|
|
46108
46709
|
const activeQuery = this.#query;
|
|
46109
|
-
if (!
|
|
46710
|
+
if (!accumulator || !activeQuery)
|
|
46110
46711
|
throw new Error("Claude SDK transport has no active Turn");
|
|
46111
|
-
|
|
46712
|
+
accumulator.requestCancel();
|
|
46112
46713
|
try {
|
|
46113
46714
|
await this.#stopRequest(activeQuery.interrupt(), INTERRUPT_TIMEOUT_MESSAGE);
|
|
46114
46715
|
} catch (error52) {
|
|
@@ -46278,16 +46879,23 @@ var ClaudeSdkTransport = class {
|
|
|
46278
46879
|
}
|
|
46279
46880
|
}
|
|
46280
46881
|
#observeBackgroundTasks(message) {
|
|
46281
|
-
if (!
|
|
46882
|
+
if (!isRecord9(message) || message.type !== "system")
|
|
46282
46883
|
return;
|
|
46283
46884
|
if (message.subtype === "background_tasks_changed" && Array.isArray(message.tasks)) {
|
|
46284
|
-
this.#backgroundTasks = new Set(message.tasks.flatMap((task) =>
|
|
46885
|
+
this.#backgroundTasks = new Set(message.tasks.flatMap((task) => isRecord9(task) && typeof task.task_id === "string" ? [task.task_id] : []));
|
|
46285
46886
|
} else if (message.subtype === "task_started" && typeof message.task_id === "string") {
|
|
46286
46887
|
this.#backgroundTasks.add(message.task_id);
|
|
46287
46888
|
} else if (message.subtype === "task_notification" && typeof message.task_id === "string" && ["completed", "failed", "stopped"].includes(String(message.status))) {
|
|
46288
46889
|
this.#backgroundTasks.delete(message.task_id);
|
|
46289
46890
|
}
|
|
46290
46891
|
}
|
|
46892
|
+
/** Starts the Segment's autonomous Turn and releases the events it held, in native order. */
|
|
46893
|
+
#startAutonomousTurn(autonomous, handler) {
|
|
46894
|
+
autonomous.live = true;
|
|
46895
|
+
handler.start(autonomous.nativeTurnKey ?? `autonomous-${Date.now()}`);
|
|
46896
|
+
for (const event of autonomous.events.splice(0))
|
|
46897
|
+
handler.onEvent(event);
|
|
46898
|
+
}
|
|
46291
46899
|
async #consume(activeQuery) {
|
|
46292
46900
|
try {
|
|
46293
46901
|
for await (const message of activeQuery) {
|
|
@@ -46324,32 +46932,35 @@ var ClaudeSdkTransport = class {
|
|
|
46324
46932
|
}
|
|
46325
46933
|
continue;
|
|
46326
46934
|
}
|
|
46327
|
-
|
|
46935
|
+
const handler = this.#autonomousTurnHandler;
|
|
46936
|
+
if (!handler)
|
|
46328
46937
|
continue;
|
|
46329
46938
|
const autonomous = this.#autonomous ?? (this.#autonomous = {
|
|
46330
46939
|
accumulator: new ClaudeNativeTurnAccumulator(this.#provider ? { provider: this.#provider } : {}),
|
|
46331
46940
|
events: [],
|
|
46332
|
-
nativeTurnKey: null
|
|
46941
|
+
nativeTurnKey: null,
|
|
46942
|
+
live: false
|
|
46333
46943
|
});
|
|
46334
|
-
if (autonomous.nativeTurnKey === null &&
|
|
46944
|
+
if (autonomous.nativeTurnKey === null && isRecord9(message) && message.type === "user" && (message.parent_tool_use_id === null || message.parent_tool_use_id === void 0) && typeof message.uuid === "string" && message.uuid.length > 0) {
|
|
46335
46945
|
autonomous.nativeTurnKey = message.uuid;
|
|
46336
46946
|
}
|
|
46337
46947
|
const interpreted = autonomous.accumulator.consume(message);
|
|
46338
46948
|
for (const event of interpreted.events) {
|
|
46339
|
-
if (
|
|
46949
|
+
if (autonomous.live) {
|
|
46950
|
+
handler.onEvent(event);
|
|
46951
|
+
} else if (this.#threadEventHandler && canDeliverSettlementImmediately(event, autonomous.events)) {
|
|
46340
46952
|
this.#threadEventHandler(event);
|
|
46341
|
-
|
|
46953
|
+
} else {
|
|
46954
|
+
autonomous.events.push(event);
|
|
46955
|
+
if (isRootOutput(event))
|
|
46956
|
+
this.#startAutonomousTurn(autonomous, handler);
|
|
46342
46957
|
}
|
|
46343
|
-
autonomous.events.push(event);
|
|
46344
46958
|
}
|
|
46345
46959
|
if (interpreted.terminal) {
|
|
46346
46960
|
this.#autonomous = null;
|
|
46347
|
-
|
|
46348
|
-
|
|
46349
|
-
|
|
46350
|
-
events: autonomous.events,
|
|
46351
|
-
result: interpreted.terminal
|
|
46352
|
-
});
|
|
46961
|
+
if (!autonomous.live)
|
|
46962
|
+
this.#startAutonomousTurn(autonomous, handler);
|
|
46963
|
+
handler.onTerminal(interpreted.terminal);
|
|
46353
46964
|
}
|
|
46354
46965
|
}
|
|
46355
46966
|
if (!this.#closePromise)
|
|
@@ -46674,11 +47285,11 @@ var ClaudeSubagentLifecycle = class {
|
|
|
46674
47285
|
};
|
|
46675
47286
|
|
|
46676
47287
|
// dist/task-tracker.js
|
|
46677
|
-
function
|
|
47288
|
+
function isRecord10(value) {
|
|
46678
47289
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
46679
47290
|
}
|
|
46680
47291
|
function stringField(value, keys) {
|
|
46681
|
-
if (!
|
|
47292
|
+
if (!isRecord10(value))
|
|
46682
47293
|
return void 0;
|
|
46683
47294
|
for (const key of keys) {
|
|
46684
47295
|
const field = value[key];
|
|
@@ -46713,7 +47324,7 @@ var ClaudeTaskTracker = class {
|
|
|
46713
47324
|
};
|
|
46714
47325
|
}
|
|
46715
47326
|
#create(args, result) {
|
|
46716
|
-
if (!
|
|
47327
|
+
if (!isRecord10(result) || !isRecord10(result.task))
|
|
46717
47328
|
return;
|
|
46718
47329
|
const id = stringField(result.task, ["id"]);
|
|
46719
47330
|
const subject = stringField(args, ["subject"]) ?? stringField(result.task, ["subject"]);
|
|
@@ -46731,7 +47342,7 @@ var ClaudeTaskTracker = class {
|
|
|
46731
47342
|
const id = stringField(args, ["taskId", "id", "task_id"]);
|
|
46732
47343
|
if (!id)
|
|
46733
47344
|
return;
|
|
46734
|
-
const status =
|
|
47345
|
+
const status = isRecord10(args) ? taskStatus2(args.status) : void 0;
|
|
46735
47346
|
if (status === "deleted") {
|
|
46736
47347
|
this.#tasks.delete(id);
|
|
46737
47348
|
return;
|
|
@@ -46749,13 +47360,13 @@ var ClaudeTaskTracker = class {
|
|
|
46749
47360
|
});
|
|
46750
47361
|
}
|
|
46751
47362
|
#replace(result) {
|
|
46752
|
-
if (!
|
|
47363
|
+
if (!isRecord10(result) || !Array.isArray(result.tasks))
|
|
46753
47364
|
return;
|
|
46754
47365
|
const next = /* @__PURE__ */ new Map();
|
|
46755
47366
|
for (const value of result.tasks) {
|
|
46756
47367
|
const id = stringField(value, ["id"]);
|
|
46757
47368
|
const subject = stringField(value, ["subject"]);
|
|
46758
|
-
const status =
|
|
47369
|
+
const status = isRecord10(value) ? taskStatus2(value.status) : void 0;
|
|
46759
47370
|
if (!id || !subject || !status || status === "deleted")
|
|
46760
47371
|
continue;
|
|
46761
47372
|
const existing = this.#tasks.get(id);
|
|
@@ -46803,7 +47414,7 @@ var ClaudeBackgroundCommandItems = class {
|
|
|
46803
47414
|
this.#outputLimit = options.outputLimit;
|
|
46804
47415
|
}
|
|
46805
47416
|
taskIds() {
|
|
46806
|
-
return [...this.#commands.values()].
|
|
47417
|
+
return [...this.#commands.values()].flatMap(({ command, outcome }) => outcome ? [] : [command.taskId]);
|
|
46807
47418
|
}
|
|
46808
47419
|
follow(command) {
|
|
46809
47420
|
const followed = {
|
|
@@ -46816,6 +47427,7 @@ var ClaudeBackgroundCommandItems = class {
|
|
|
46816
47427
|
truncated: false,
|
|
46817
47428
|
timer: null,
|
|
46818
47429
|
reading: Promise.resolve(),
|
|
47430
|
+
outcome: void 0,
|
|
46819
47431
|
completed: false
|
|
46820
47432
|
};
|
|
46821
47433
|
this.#commands.set(command.callId, followed);
|
|
@@ -46824,24 +47436,25 @@ var ClaudeBackgroundCommandItems = class {
|
|
|
46824
47436
|
followed.timer.unref();
|
|
46825
47437
|
}
|
|
46826
47438
|
}
|
|
46827
|
-
/** Returns whether the notification
|
|
47439
|
+
/** Returns whether the notification belongs to a followed command. */
|
|
46828
47440
|
settle(notification) {
|
|
46829
47441
|
const followed = notification.callId ? this.#commands.get(notification.callId) : void 0;
|
|
46830
47442
|
if (!followed)
|
|
46831
47443
|
return false;
|
|
46832
|
-
|
|
47444
|
+
if (followed.outcome)
|
|
47445
|
+
return true;
|
|
47446
|
+
const outcome = notificationOutcome(notification.status);
|
|
47447
|
+
followed.outcome = outcome;
|
|
46833
47448
|
if (followed.timer)
|
|
46834
47449
|
clearInterval(followed.timer);
|
|
46835
47450
|
followed.outputFile ??= notification.outputFile;
|
|
46836
|
-
void this.#poll(followed).then(() => this.#complete(followed,
|
|
47451
|
+
void this.#poll(followed).then(() => this.#complete(followed, outcome));
|
|
46837
47452
|
return true;
|
|
46838
47453
|
}
|
|
46839
47454
|
/** The native process is gone; no notification can arrive any more. */
|
|
46840
47455
|
abandonAll(reason) {
|
|
46841
47456
|
for (const followed of this.#commands.values()) {
|
|
46842
|
-
|
|
46843
|
-
clearInterval(followed.timer);
|
|
46844
|
-
this.#complete(followed, { status: "cancelled", reason });
|
|
47457
|
+
this.#complete(followed, followed.outcome ?? { status: "cancelled", reason });
|
|
46845
47458
|
}
|
|
46846
47459
|
this.#commands.clear();
|
|
46847
47460
|
}
|
|
@@ -46850,7 +47463,7 @@ var ClaudeBackgroundCommandItems = class {
|
|
|
46850
47463
|
return followed.reading;
|
|
46851
47464
|
}
|
|
46852
47465
|
async #read(followed) {
|
|
46853
|
-
if (!followed.outputFile || followed.truncated)
|
|
47466
|
+
if (!followed.outputFile || followed.truncated || followed.completed)
|
|
46854
47467
|
return;
|
|
46855
47468
|
let handle;
|
|
46856
47469
|
try {
|
|
@@ -46861,8 +47474,10 @@ var ClaudeBackgroundCommandItems = class {
|
|
|
46861
47474
|
followed.opened = true;
|
|
46862
47475
|
try {
|
|
46863
47476
|
const buffer = Buffer.alloc(READ_CHUNK_BYTES);
|
|
46864
|
-
|
|
47477
|
+
while (!followed.completed) {
|
|
46865
47478
|
const { bytesRead } = await handle.read(buffer, 0, buffer.length, followed.offset);
|
|
47479
|
+
if (followed.completed)
|
|
47480
|
+
return;
|
|
46866
47481
|
if (bytesRead === 0)
|
|
46867
47482
|
return;
|
|
46868
47483
|
followed.offset += bytesRead;
|
|
@@ -46876,12 +47491,12 @@ var ClaudeBackgroundCommandItems = class {
|
|
|
46876
47491
|
await handle.close().catch(() => void 0);
|
|
46877
47492
|
}
|
|
46878
47493
|
}
|
|
46879
|
-
#append(followed,
|
|
46880
|
-
if (
|
|
47494
|
+
#append(followed, text2) {
|
|
47495
|
+
if (text2.length === 0 || followed.completed)
|
|
46881
47496
|
return;
|
|
46882
47497
|
const room = this.#outputLimit - followed.output.length;
|
|
46883
|
-
const accepted =
|
|
46884
|
-
if (
|
|
47498
|
+
const accepted = text2.length > room ? text2.slice(0, Math.max(0, room)) : text2;
|
|
47499
|
+
if (text2.length > room)
|
|
46885
47500
|
followed.truncated = true;
|
|
46886
47501
|
if (accepted.length === 0)
|
|
46887
47502
|
return;
|
|
@@ -46894,8 +47509,13 @@ var ClaudeBackgroundCommandItems = class {
|
|
|
46894
47509
|
});
|
|
46895
47510
|
}
|
|
46896
47511
|
#complete(followed, outcome) {
|
|
47512
|
+
if (followed.completed)
|
|
47513
|
+
return;
|
|
46897
47514
|
const { command } = followed;
|
|
46898
47515
|
followed.completed = true;
|
|
47516
|
+
if (followed.timer)
|
|
47517
|
+
clearInterval(followed.timer);
|
|
47518
|
+
this.#commands.delete(command.callId);
|
|
46899
47519
|
const output = followed.output.length > 0 ? followed.output : followed.opened ? void 0 : UNAVAILABLE_OUTPUT;
|
|
46900
47520
|
this.#emit({
|
|
46901
47521
|
type: "item.completed",
|
|
@@ -46913,11 +47533,11 @@ var ClaudeBackgroundCommandItems = class {
|
|
|
46913
47533
|
};
|
|
46914
47534
|
|
|
46915
47535
|
// dist/tool-lifecycle.js
|
|
46916
|
-
function
|
|
47536
|
+
function isRecord11(value) {
|
|
46917
47537
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
46918
47538
|
}
|
|
46919
47539
|
function stringField2(value, key) {
|
|
46920
|
-
return
|
|
47540
|
+
return isRecord11(value) && typeof value[key] === "string" ? value[key] : void 0;
|
|
46921
47541
|
}
|
|
46922
47542
|
function toolFailure(toolName) {
|
|
46923
47543
|
return {
|
|
@@ -46926,17 +47546,17 @@ function toolFailure(toolName) {
|
|
|
46926
47546
|
retryable: false
|
|
46927
47547
|
};
|
|
46928
47548
|
}
|
|
46929
|
-
function boundedToolOutput(
|
|
46930
|
-
if (!
|
|
47549
|
+
function boundedToolOutput(text2, limit) {
|
|
47550
|
+
if (!text2 || text2.length === 0)
|
|
46931
47551
|
return void 0;
|
|
46932
|
-
const truncated =
|
|
47552
|
+
const truncated = text2.length > limit;
|
|
46933
47553
|
return {
|
|
46934
|
-
content: [{ type: "text", text: truncated ?
|
|
47554
|
+
content: [{ type: "text", text: truncated ? text2.slice(0, limit) : text2 }],
|
|
46935
47555
|
...truncated ? { truncated: true } : {}
|
|
46936
47556
|
};
|
|
46937
47557
|
}
|
|
46938
47558
|
function toolOutputText(output) {
|
|
46939
|
-
return output?.content.filter((content) => content.type === "text").map(({ text }) =>
|
|
47559
|
+
return output?.content.filter((content) => content.type === "text").map(({ text: text2 }) => text2).join("") ?? "";
|
|
46940
47560
|
}
|
|
46941
47561
|
var ClaudeToolLifecycle = class {
|
|
46942
47562
|
#cwd;
|
|
@@ -47062,11 +47682,11 @@ var ClaudeToolLifecycle = class {
|
|
|
47062
47682
|
|
|
47063
47683
|
// dist/usage-estimate.js
|
|
47064
47684
|
var PER_MILLION = 1e6;
|
|
47065
|
-
function normalizedModel(
|
|
47066
|
-
return
|
|
47685
|
+
function normalizedModel(model2) {
|
|
47686
|
+
return model2.trim().toLowerCase().replaceAll("_", "-");
|
|
47067
47687
|
}
|
|
47068
|
-
function firstPartyPrice(
|
|
47069
|
-
const value = normalizedModel(
|
|
47688
|
+
function firstPartyPrice(model2) {
|
|
47689
|
+
const value = normalizedModel(model2);
|
|
47070
47690
|
if (/claude-opus-(?:5|4-(?:5|6|7|8))(?:-|$)/u.test(value)) {
|
|
47071
47691
|
return { input: 5, cacheWrite: 6.25, cacheRead: 0.5, output: 25 };
|
|
47072
47692
|
}
|
|
@@ -47183,7 +47803,7 @@ var CONTEXT_USAGE_TTL_MS = 1e4;
|
|
|
47183
47803
|
var CONTEXT_USAGE_FAILURE_COOLDOWN_MS = 5e3;
|
|
47184
47804
|
var REQUEST_USAGE_RETRY_DELAYS_MS = [0, 100, 250, 500, 1e3];
|
|
47185
47805
|
var DEFAULT_CONTINUATION_QUIESCENCE_MS = 2e3;
|
|
47186
|
-
function
|
|
47806
|
+
function isRecord12(value) {
|
|
47187
47807
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
47188
47808
|
}
|
|
47189
47809
|
function safeNonNegativeInteger2(value) {
|
|
@@ -47192,7 +47812,7 @@ function safeNonNegativeInteger2(value) {
|
|
|
47192
47812
|
function transcriptRequestUsage(messages, messageId) {
|
|
47193
47813
|
for (let index = messages.length - 1; index >= 0; index -= 1) {
|
|
47194
47814
|
const entry = messages[index];
|
|
47195
|
-
if (!
|
|
47815
|
+
if (!isRecord12(entry) || entry.type !== "assistant" || entry.parent_tool_use_id !== null && entry.parent_tool_use_id !== void 0 || !isRecord12(entry.message) || entry.message.id !== messageId || !isRecord12(entry.message.usage)) {
|
|
47196
47816
|
continue;
|
|
47197
47817
|
}
|
|
47198
47818
|
const inputTokens = entry.message.usage.input_tokens;
|
|
@@ -47241,8 +47861,8 @@ function startupFailure(error52) {
|
|
|
47241
47861
|
if (error52 instanceof ClaudeCodeExecutableError) {
|
|
47242
47862
|
return { code: "notInstalled", message: error52.message, retryable: false };
|
|
47243
47863
|
}
|
|
47244
|
-
const
|
|
47245
|
-
if (
|
|
47864
|
+
const text2 = error52 instanceof Error ? error52.message.toLowerCase() : "";
|
|
47865
|
+
if (text2.includes("not logged in") || text2.includes("authentication") || text2.includes("api key")) {
|
|
47246
47866
|
return {
|
|
47247
47867
|
code: "authenticationRequired",
|
|
47248
47868
|
message: "Claude Code authentication is required",
|
|
@@ -47287,9 +47907,10 @@ function claudePermissionModeSelectionFailure(permissionMode, error52) {
|
|
|
47287
47907
|
};
|
|
47288
47908
|
}
|
|
47289
47909
|
}
|
|
47910
|
+
const detail = sanitizeDiagnosticTail(error52 instanceof Error ? error52.message : String(error52));
|
|
47290
47911
|
return {
|
|
47291
47912
|
code: "nativeFailure",
|
|
47292
|
-
message:
|
|
47913
|
+
message: `Claude Code rejected the Permission Mode selection${detail ? `: ${detail}` : ""}`,
|
|
47293
47914
|
retryable: true
|
|
47294
47915
|
};
|
|
47295
47916
|
}
|
|
@@ -47408,6 +48029,8 @@ var ClaudeHarnessSession = class {
|
|
|
47408
48029
|
#contextUsageCooldownUntilMs = 0;
|
|
47409
48030
|
#requestUsageBoundary = 0;
|
|
47410
48031
|
#autonomousOrdinal = 0;
|
|
48032
|
+
/** The Host Turn that receives the native Segment Claude started on its own. */
|
|
48033
|
+
#autonomousTarget = null;
|
|
47411
48034
|
#occupancy = new ClaudeBackgroundOccupancy();
|
|
47412
48035
|
#cancelEscalation = null;
|
|
47413
48036
|
#continuationQuiescence = null;
|
|
@@ -47455,6 +48078,10 @@ var ClaudeHarnessSession = class {
|
|
|
47455
48078
|
this.#state = this.initialState;
|
|
47456
48079
|
this.#statePublished = durable;
|
|
47457
48080
|
this.outputs = this.#channel.outputs;
|
|
48081
|
+
for (const request of options.usageHistory.requests) {
|
|
48082
|
+
this.#event({ type: "usage.request", request });
|
|
48083
|
+
}
|
|
48084
|
+
this.#event({ type: "usage.history", complete: options.usageHistory.complete });
|
|
47458
48085
|
}
|
|
47459
48086
|
get nativeWriterRef() {
|
|
47460
48087
|
return this.#nativeRef;
|
|
@@ -47484,8 +48111,8 @@ var ClaudeHarnessSession = class {
|
|
|
47484
48111
|
messages = await this.#readSessionMessages({
|
|
47485
48112
|
cwd: this.#cwd,
|
|
47486
48113
|
sessionId: this.#sessionId
|
|
47487
|
-
});
|
|
47488
|
-
const ids = new Set(messages.flatMap((message) =>
|
|
48114
|
+
}) ?? [];
|
|
48115
|
+
const ids = new Set(messages.flatMap((message) => isRecord12(message) && typeof message.uuid === "string" ? [message.uuid] : []));
|
|
47489
48116
|
if (this.#unpersistedMessageIds.every((id) => ids.has(id))) {
|
|
47490
48117
|
this.#unpersistedMessageIds = [];
|
|
47491
48118
|
break;
|
|
@@ -47581,8 +48208,8 @@ var ClaudeHarnessSession = class {
|
|
|
47581
48208
|
}
|
|
47582
48209
|
};
|
|
47583
48210
|
}
|
|
47584
|
-
const
|
|
47585
|
-
if (
|
|
48211
|
+
const text2 = command.input.map((input) => input.text).join("\n");
|
|
48212
|
+
if (text2.length === 0) {
|
|
47586
48213
|
return {
|
|
47587
48214
|
ok: false,
|
|
47588
48215
|
error: {
|
|
@@ -47605,6 +48232,16 @@ var ClaudeHarnessSession = class {
|
|
|
47605
48232
|
if (this.#phase !== "open") {
|
|
47606
48233
|
return { ok: false, error: invalidState("Claude Code Session closed during startup") };
|
|
47607
48234
|
}
|
|
48235
|
+
if (this.#active) {
|
|
48236
|
+
return {
|
|
48237
|
+
ok: false,
|
|
48238
|
+
error: {
|
|
48239
|
+
code: "sessionBusy",
|
|
48240
|
+
message: "Claude Code Session already has an active Turn",
|
|
48241
|
+
retryable: true
|
|
48242
|
+
}
|
|
48243
|
+
};
|
|
48244
|
+
}
|
|
47608
48245
|
if (startingTransport)
|
|
47609
48246
|
this.#publishState();
|
|
47610
48247
|
this.#usageGeneration += 1;
|
|
@@ -47671,7 +48308,7 @@ var ClaudeHarnessSession = class {
|
|
|
47671
48308
|
nativeTurnKey,
|
|
47672
48309
|
formatVersion: 1
|
|
47673
48310
|
});
|
|
47674
|
-
const running = transport.runTurn(
|
|
48311
|
+
const running = transport.runTurn(text2, nativeTurnRef.nativeTurnKey, (event) => {
|
|
47675
48312
|
this.#handleTurnEvent(active, event);
|
|
47676
48313
|
});
|
|
47677
48314
|
active.nativeTurnRef = nativeTurnRef;
|
|
@@ -47717,6 +48354,16 @@ var ClaudeHarnessSession = class {
|
|
|
47717
48354
|
if (this.#phase !== "open") {
|
|
47718
48355
|
return { ok: false, error: invalidState("Claude Code Session closed during startup") };
|
|
47719
48356
|
}
|
|
48357
|
+
if (this.#active) {
|
|
48358
|
+
return {
|
|
48359
|
+
ok: false,
|
|
48360
|
+
error: {
|
|
48361
|
+
code: "sessionBusy",
|
|
48362
|
+
message: "Claude Code Session already has an active operation",
|
|
48363
|
+
retryable: true
|
|
48364
|
+
}
|
|
48365
|
+
};
|
|
48366
|
+
}
|
|
47720
48367
|
if (startingTransport)
|
|
47721
48368
|
this.#publishState();
|
|
47722
48369
|
this.#usageGeneration += 1;
|
|
@@ -47840,9 +48487,9 @@ var ClaudeHarnessSession = class {
|
|
|
47840
48487
|
}
|
|
47841
48488
|
};
|
|
47842
48489
|
}
|
|
47843
|
-
let
|
|
48490
|
+
let model2;
|
|
47844
48491
|
try {
|
|
47845
|
-
|
|
48492
|
+
model2 = decodeClaudeModelRef(command.model);
|
|
47846
48493
|
} catch {
|
|
47847
48494
|
return {
|
|
47848
48495
|
ok: false,
|
|
@@ -47864,7 +48511,7 @@ var ClaudeHarnessSession = class {
|
|
|
47864
48511
|
const transport = this.#transport;
|
|
47865
48512
|
if (transport) {
|
|
47866
48513
|
try {
|
|
47867
|
-
await transport.setModel(
|
|
48514
|
+
await transport.setModel(model2);
|
|
47868
48515
|
} catch {
|
|
47869
48516
|
return {
|
|
47870
48517
|
ok: false,
|
|
@@ -48203,7 +48850,7 @@ var ClaudeHarnessSession = class {
|
|
|
48203
48850
|
throw new Error("Claude Code Session closed during startup");
|
|
48204
48851
|
}
|
|
48205
48852
|
const selectedModel = this.#requestedModel ?? (this.#openMode === "create" ? CLAUDE_DEFAULT_MODEL_REF : void 0);
|
|
48206
|
-
const
|
|
48853
|
+
const model2 = selectedModel ? decodeClaudeModelRef(selectedModel) : void 0;
|
|
48207
48854
|
const permissionMode = decodeClaudePermissionModeId(this.#requestedPermissionModeId);
|
|
48208
48855
|
let transport;
|
|
48209
48856
|
try {
|
|
@@ -48211,7 +48858,7 @@ var ClaudeHarnessSession = class {
|
|
|
48211
48858
|
cwd: this.#cwd,
|
|
48212
48859
|
sessionId: this.#sessionId,
|
|
48213
48860
|
openMode: this.#openMode,
|
|
48214
|
-
...
|
|
48861
|
+
...model2 ? { model: model2 } : {},
|
|
48215
48862
|
thinkingOptionId: this.#requestedThinkingOptionId,
|
|
48216
48863
|
permissionMode,
|
|
48217
48864
|
allowDangerouslySkipPermissions: this.#bypassPermissionsAvailable,
|
|
@@ -48220,21 +48867,24 @@ var ClaudeHarnessSession = class {
|
|
|
48220
48867
|
onPlanLimit: (planLimit) => this.#handlePlanLimit(planLimit)
|
|
48221
48868
|
});
|
|
48222
48869
|
this.#transport = transport;
|
|
48223
|
-
transport.setAutonomousTurnHandler(
|
|
48870
|
+
transport.setAutonomousTurnHandler({
|
|
48871
|
+
start: (nativeTurnKey) => {
|
|
48872
|
+
this.#autonomousTarget = this.#startAutonomousTurn(nativeTurnKey);
|
|
48873
|
+
},
|
|
48874
|
+
onEvent: (event) => this.#deliverLiveEvent(this.#autonomousTarget, event),
|
|
48875
|
+
onTerminal: (result) => {
|
|
48876
|
+
const target = this.#autonomousTarget;
|
|
48877
|
+
this.#autonomousTarget = null;
|
|
48878
|
+
if (target)
|
|
48879
|
+
this.#finishResult(target, result);
|
|
48880
|
+
}
|
|
48881
|
+
});
|
|
48224
48882
|
transport.setThreadEventHandler((event) => {
|
|
48225
48883
|
if (event.type === "subagent.settled")
|
|
48226
48884
|
this.#settleNativeTask(event);
|
|
48227
48885
|
});
|
|
48228
48886
|
transport.setIdleTurnHandler({
|
|
48229
|
-
onEvent: (event) =>
|
|
48230
|
-
const active = this.#active;
|
|
48231
|
-
if (active) {
|
|
48232
|
-
this.#handleTurnEvent(active, event);
|
|
48233
|
-
return;
|
|
48234
|
-
}
|
|
48235
|
-
if (event.type === "subagent.settled")
|
|
48236
|
-
this.#settleNativeTask(event);
|
|
48237
|
-
},
|
|
48887
|
+
onEvent: (event) => this.#deliverLiveEvent(this.#active, event),
|
|
48238
48888
|
onTerminal: (result) => {
|
|
48239
48889
|
const active = this.#active;
|
|
48240
48890
|
if (active)
|
|
@@ -48311,6 +48961,11 @@ var ClaudeHarnessSession = class {
|
|
|
48311
48961
|
this.#publishState({ ...this.#state, effectivePermissionModeId });
|
|
48312
48962
|
}
|
|
48313
48963
|
#handleTurnEvent(active, event) {
|
|
48964
|
+
if (event.type === "usage.request") {
|
|
48965
|
+
if (this.#phase !== "closed" && this.#phase !== "faulted")
|
|
48966
|
+
this.#meterUsage(event.record);
|
|
48967
|
+
return;
|
|
48968
|
+
}
|
|
48314
48969
|
if (this.#active !== active || this.#phase === "closed" || this.#phase === "faulted")
|
|
48315
48970
|
return;
|
|
48316
48971
|
switch (event.type) {
|
|
@@ -48436,6 +49091,13 @@ var ClaudeHarnessSession = class {
|
|
|
48436
49091
|
return;
|
|
48437
49092
|
}
|
|
48438
49093
|
}
|
|
49094
|
+
/** Publishes one live request to Host metering; an unusable one marks history incomplete. */
|
|
49095
|
+
#meterUsage(record2) {
|
|
49096
|
+
if (record2.kind === "request")
|
|
49097
|
+
this.#event({ type: "usage.request", request: record2.request });
|
|
49098
|
+
else
|
|
49099
|
+
this.#event({ type: "usage.history", complete: false });
|
|
49100
|
+
}
|
|
48439
49101
|
#startCompaction(active) {
|
|
48440
49102
|
if (active.compactionItem)
|
|
48441
49103
|
throw new Error("Claude Code Compaction started more than once");
|
|
@@ -48641,23 +49303,26 @@ var ClaudeHarnessSession = class {
|
|
|
48641
49303
|
snapshot: { item, outcome }
|
|
48642
49304
|
});
|
|
48643
49305
|
}
|
|
48644
|
-
|
|
49306
|
+
/**
|
|
49307
|
+
* Claude started Root output in a Segment no requested Turn owns. A held Turn continues with
|
|
49308
|
+
* it; otherwise it becomes a live autonomous Turn, so the Thread shows it running and a new
|
|
49309
|
+
* request waits instead of absorbing it.
|
|
49310
|
+
*/
|
|
49311
|
+
#startAutonomousTurn(segmentKey) {
|
|
48645
49312
|
if (this.#phase !== "open")
|
|
48646
|
-
return;
|
|
48647
|
-
const
|
|
48648
|
-
if (
|
|
48649
|
-
|
|
48650
|
-
|
|
48651
|
-
|
|
48652
|
-
if (this.#active)
|
|
48653
|
-
return;
|
|
49313
|
+
return null;
|
|
49314
|
+
const current = this.#active;
|
|
49315
|
+
if (current?.held)
|
|
49316
|
+
return current;
|
|
49317
|
+
if (current)
|
|
49318
|
+
return null;
|
|
48654
49319
|
this.#autonomousOrdinal += 1;
|
|
48655
49320
|
const turnId = hostTurnIdSchema.parse(this.#randomUUID());
|
|
48656
49321
|
let resolveCompletion = () => void 0;
|
|
48657
49322
|
const completion = new Promise((resolve2) => {
|
|
48658
49323
|
resolveCompletion = resolve2;
|
|
48659
49324
|
});
|
|
48660
|
-
const nativeTurnKey =
|
|
49325
|
+
const nativeTurnKey = segmentKey || `autonomous-${this.#autonomousOrdinal}`;
|
|
48661
49326
|
const item = {
|
|
48662
49327
|
type: "agentMessage",
|
|
48663
49328
|
itemId: claudeTranscriptItemId(nativeTurnKey, "agentMessage", 1),
|
|
@@ -48712,14 +49377,20 @@ var ClaudeHarnessSession = class {
|
|
|
48712
49377
|
this.#event({ type: "turn.autonomous.started", turnId, input: [] });
|
|
48713
49378
|
this.#event({ type: "turn.started", turnId });
|
|
48714
49379
|
this.#event({ type: "item.started", turnId, item });
|
|
48715
|
-
|
|
48716
|
-
this.#handleTurnEvent(active, event);
|
|
48717
|
-
this.#finishResult(active, turn.result);
|
|
49380
|
+
return active;
|
|
48718
49381
|
}
|
|
48719
|
-
|
|
48720
|
-
|
|
48721
|
-
|
|
48722
|
-
|
|
49382
|
+
/** Live native events outside a requested Root Segment; settlements stay Thread-level. */
|
|
49383
|
+
#deliverLiveEvent(target, event) {
|
|
49384
|
+
if (event.type === "usage.request") {
|
|
49385
|
+
this.#meterUsage(event.record);
|
|
49386
|
+
return;
|
|
49387
|
+
}
|
|
49388
|
+
if (target && this.#active === target) {
|
|
49389
|
+
this.#handleTurnEvent(target, event);
|
|
49390
|
+
return;
|
|
49391
|
+
}
|
|
49392
|
+
if (event.type === "subagent.settled")
|
|
49393
|
+
this.#settleNativeTask(event);
|
|
48723
49394
|
}
|
|
48724
49395
|
/**
|
|
48725
49396
|
* A native `task_notification` names the tool call that started its task: a
|
|
@@ -48853,7 +49524,7 @@ var ClaudeHarnessSession = class {
|
|
|
48853
49524
|
if (this.#phase !== "open" || this.#usageGeneration !== request.generation || this.#requestUsageBoundary !== request.boundary) {
|
|
48854
49525
|
return;
|
|
48855
49526
|
}
|
|
48856
|
-
const usage = transcriptRequestUsage(messages, request.messageId);
|
|
49527
|
+
const usage = transcriptRequestUsage(messages ?? [], request.messageId);
|
|
48857
49528
|
if (!usage)
|
|
48858
49529
|
continue;
|
|
48859
49530
|
const active = this.#active;
|
|
@@ -48902,9 +49573,9 @@ var ClaudeHarnessSession = class {
|
|
|
48902
49573
|
if (event.modelUsage !== void 0) {
|
|
48903
49574
|
let inputTokens = 0;
|
|
48904
49575
|
let outputTokens = 0;
|
|
48905
|
-
for (const
|
|
48906
|
-
inputTokens +=
|
|
48907
|
-
outputTokens +=
|
|
49576
|
+
for (const model2 of event.modelUsage) {
|
|
49577
|
+
inputTokens += model2.inputTokens;
|
|
49578
|
+
outputTokens += model2.outputTokens;
|
|
48908
49579
|
}
|
|
48909
49580
|
if (Number.isSafeInteger(inputTokens) && Number.isSafeInteger(outputTokens)) {
|
|
48910
49581
|
this.#calibratedInputTokens = inputTokens;
|
|
@@ -49140,6 +49811,7 @@ var ClaudeCodeAdapter = class {
|
|
|
49140
49811
|
},
|
|
49141
49812
|
resolveCandidate: (nativeSessionId) => this.#importScope.resolve((signal) => this.#importIndex.resolve(nativeSessionId, signal))
|
|
49142
49813
|
});
|
|
49814
|
+
usageStatistics;
|
|
49143
49815
|
subagents = {
|
|
49144
49816
|
readSnapshot: async (input) => {
|
|
49145
49817
|
if (input.parent.harnessId !== this.harnessId || input.nativeSubagentId.trim().length === 0) {
|
|
@@ -49166,7 +49838,7 @@ var ClaudeCodeAdapter = class {
|
|
|
49166
49838
|
]);
|
|
49167
49839
|
return {
|
|
49168
49840
|
ok: true,
|
|
49169
|
-
value: mapClaudeSubagentSnapshot(messages, input.parent.nativeSessionId, input.nativeSubagentId, parentMessages)
|
|
49841
|
+
value: mapClaudeSubagentSnapshot(messages, input.parent.nativeSessionId, input.nativeSubagentId, parentMessages ?? [])
|
|
49170
49842
|
};
|
|
49171
49843
|
} catch {
|
|
49172
49844
|
return {
|
|
@@ -49202,6 +49874,7 @@ var ClaudeCodeAdapter = class {
|
|
|
49202
49874
|
constructor(options = {}, dependencies) {
|
|
49203
49875
|
const environment = options.environment ?? process.env;
|
|
49204
49876
|
this.#importIndex = new ClaudeSessionImportIndex(environment);
|
|
49877
|
+
this.usageStatistics = createClaudeUsageStatistics(environment);
|
|
49205
49878
|
this.#pendingSessions = new ClaudePendingSessions(environment);
|
|
49206
49879
|
this.#closeTimeoutMs = options.closeTimeoutMs ?? DEFAULT_CLOSE_TIMEOUT_MS;
|
|
49207
49880
|
this.#cancelTimeoutMs = options.cancelTimeoutMs ?? DEFAULT_CANCEL_TIMEOUT_MS;
|
|
@@ -49252,7 +49925,7 @@ var ClaudeCodeAdapter = class {
|
|
|
49252
49925
|
environment: options.environment ?? process.env,
|
|
49253
49926
|
sessionId
|
|
49254
49927
|
});
|
|
49255
|
-
return transcript
|
|
49928
|
+
return transcript;
|
|
49256
49929
|
},
|
|
49257
49930
|
readSubagentMessages: ({ cwd, sessionId, nativeSubagentId: nativeSubagentId2 }) => jkt(sessionId, nativeSubagentId2, { dir: cwd })
|
|
49258
49931
|
};
|
|
@@ -49264,7 +49937,7 @@ var ClaudeCodeAdapter = class {
|
|
|
49264
49937
|
error: invalidState("Claude Code Adapter is closing")
|
|
49265
49938
|
};
|
|
49266
49939
|
}
|
|
49267
|
-
const cwd =
|
|
49940
|
+
const cwd = path16.resolve(input.cwd ?? process.cwd());
|
|
49268
49941
|
if (!input.refresh) {
|
|
49269
49942
|
const cached2 = this.#inspectionCache.get(cwd);
|
|
49270
49943
|
if (cached2)
|
|
@@ -49459,7 +50132,7 @@ var ClaudeCodeAdapter = class {
|
|
|
49459
50132
|
}
|
|
49460
50133
|
requestedPermissionModeId = CLAUDE_DEFAULT_PERMISSION_MODE_ID;
|
|
49461
50134
|
}
|
|
49462
|
-
const cwd =
|
|
50135
|
+
const cwd = path16.resolve(input.cwd);
|
|
49463
50136
|
if (input.kind === "rollbackLastTurn") {
|
|
49464
50137
|
for (const source of this.#sessions) {
|
|
49465
50138
|
const ready = await source.prepareRollback(input.sourceRef.nativeSessionId);
|
|
@@ -49506,7 +50179,7 @@ var ClaudeCodeAdapter = class {
|
|
|
49506
50179
|
cwd,
|
|
49507
50180
|
sessionId: durableRef.nativeSessionId
|
|
49508
50181
|
});
|
|
49509
|
-
if (messages
|
|
50182
|
+
if ((messages?.length ?? 0) > 0 || input.kind === "resume" && input.knownTurnRefs?.length)
|
|
49510
50183
|
throw new Error("Pending Session unexpectedly contains history");
|
|
49511
50184
|
openMode = "create";
|
|
49512
50185
|
}
|
|
@@ -49533,6 +50206,8 @@ var ClaudeCodeAdapter = class {
|
|
|
49533
50206
|
};
|
|
49534
50207
|
}
|
|
49535
50208
|
}
|
|
50209
|
+
const sessionId = forked?.ok ? forked.value.sessionId : nativeRef?.success ? nativeRef.data.nativeSessionId : this.#dependencies.randomUUID();
|
|
50210
|
+
const usageHistory = await this.#readUsageHistory(cwd, sessionId, openMode);
|
|
49536
50211
|
const session = new ClaudeHarnessSession(cwd, this.#dependencies, this.#closeTimeoutMs, () => this.#sessions.delete(session), (planLimit) => this.#recordPlanLimit(session, planLimit), {
|
|
49537
50212
|
...input.environment ? { environment: input.environment } : {},
|
|
49538
50213
|
bypassPermissionsAvailable,
|
|
@@ -49540,7 +50215,8 @@ var ClaudeCodeAdapter = class {
|
|
|
49540
50215
|
pendingSessions: this.#pendingSessions,
|
|
49541
50216
|
knownConfiguration: input.kind === "rollbackLastTurn" || input.kind === "resume" && Boolean(input.model || input.thinkingOptionId) || Boolean(durableRef && isPendingClaudeSession(durableRef)),
|
|
49542
50217
|
...durableRef ? { nativeRef: durableRef } : {},
|
|
49543
|
-
sessionId
|
|
50218
|
+
sessionId,
|
|
50219
|
+
usageHistory,
|
|
49544
50220
|
...requestedModel ? { requestedModel } : {},
|
|
49545
50221
|
requestedPermissionModeId,
|
|
49546
50222
|
requestedThinkingOptionId,
|
|
@@ -49551,6 +50227,20 @@ var ClaudeCodeAdapter = class {
|
|
|
49551
50227
|
this.#sessions.add(session);
|
|
49552
50228
|
return { ok: true, value: session };
|
|
49553
50229
|
}
|
|
50230
|
+
/**
|
|
50231
|
+
* Every request already in the native transcript, for Host usage metering. A new Session has
|
|
50232
|
+
* none; an unreadable transcript is an incomplete history rather than an empty one.
|
|
50233
|
+
*/
|
|
50234
|
+
async #readUsageHistory(cwd, sessionId, openMode) {
|
|
50235
|
+
if (openMode === "create")
|
|
50236
|
+
return { requests: [], complete: true };
|
|
50237
|
+
try {
|
|
50238
|
+
const messages = await this.#dependencies.readSessionMessages({ cwd, sessionId });
|
|
50239
|
+
return messages === null ? { requests: [], complete: false } : claudeUsageHistory(messages);
|
|
50240
|
+
} catch {
|
|
50241
|
+
return { requests: [], complete: false };
|
|
50242
|
+
}
|
|
50243
|
+
}
|
|
49554
50244
|
/** Account-level plan windows are shared, but only stable native pushes may update them. */
|
|
49555
50245
|
#recordPlanLimit(origin, planLimit) {
|
|
49556
50246
|
const next = { ...this.#latestPlanLimit ?? {} };
|
|
@@ -49587,14 +50277,14 @@ var ClaudeCodeAdapter = class {
|
|
|
49587
50277
|
// dist/installation.js
|
|
49588
50278
|
import { readFile as readFile6, realpath as realpath3 } from "node:fs/promises";
|
|
49589
50279
|
import { homedir as homedir2 } from "node:os";
|
|
49590
|
-
import
|
|
50280
|
+
import path17 from "node:path";
|
|
49591
50281
|
async function readSettings(file2) {
|
|
49592
|
-
const
|
|
50282
|
+
const text2 = await readFile6(file2, "utf8").catch((error52) => {
|
|
49593
50283
|
if (error52.code === "ENOENT")
|
|
49594
50284
|
return "{}";
|
|
49595
50285
|
throw error52;
|
|
49596
50286
|
});
|
|
49597
|
-
const settings = JSON.parse(
|
|
50287
|
+
const settings = JSON.parse(text2);
|
|
49598
50288
|
if (!settings || typeof settings !== "object" || Array.isArray(settings))
|
|
49599
50289
|
throw new Error("Claude update settings are invalid");
|
|
49600
50290
|
return settings;
|
|
@@ -49608,9 +50298,9 @@ function createClaudeInstallation(environment, command) {
|
|
|
49608
50298
|
...command ? { command } : {}
|
|
49609
50299
|
});
|
|
49610
50300
|
const home = environment.HOME ?? environment.USERPROFILE ?? homedir2();
|
|
49611
|
-
const config2 = environment.CLAUDE_CONFIG_DIR ?
|
|
49612
|
-
const managedFile = process.platform === "darwin" ? "/Library/Application Support/ClaudeCode/managed-settings.json" : process.platform === "win32" ?
|
|
49613
|
-
const user = await readSettings(
|
|
50301
|
+
const config2 = environment.CLAUDE_CONFIG_DIR ? path17.resolve(home, environment.CLAUDE_CONFIG_DIR) : path17.join(home, ".claude");
|
|
50302
|
+
const managedFile = process.platform === "darwin" ? "/Library/Application Support/ClaudeCode/managed-settings.json" : process.platform === "win32" ? path17.join(environment.ProgramFiles ?? "C:\\Program Files", "ClaudeCode", "managed-settings.json") : "/etc/claude-code/managed-settings.json";
|
|
50303
|
+
const user = await readSettings(path17.join(config2, "settings.json"));
|
|
49614
50304
|
const managed = await readSettings(managedFile);
|
|
49615
50305
|
const settings = { ...user, ...managed, env: { ...user.env, ...managed.env } };
|
|
49616
50306
|
const env = { ...environment, ...settings.env };
|
|
@@ -49623,10 +50313,10 @@ function createClaudeInstallation(environment, command) {
|
|
|
49623
50313
|
throw new Error("Unknown Claude release channel");
|
|
49624
50314
|
const latestVersion = installationVersion(await fetchInstallationText(`https://downloads.claude.ai/claude-code-releases/${channel}`));
|
|
49625
50315
|
const npm = await npmInstallation(executable, ["@anthropic-ai/claude-code"], env);
|
|
49626
|
-
const launcher =
|
|
50316
|
+
const launcher = path17.join(home, ".local", "bin", process.platform === "win32" ? "claude.exe" : "claude");
|
|
49627
50317
|
const selected = await realpath3(executable);
|
|
49628
|
-
const versions =
|
|
49629
|
-
const native =
|
|
50318
|
+
const versions = path17.join(home, ".local", "share", "claude", "versions") + path17.sep;
|
|
50319
|
+
const native = path17.resolve(executable) === launcher && (selected.startsWith(versions) || process.platform === "win32" && selected === launcher);
|
|
49630
50320
|
const blocked = !!env.DISABLE_UPDATES && env.DISABLE_UPDATES !== "0" || !!settings.minimumVersion && newerInstallationVersion(latestVersion, installationVersion(settings.minimumVersion)) || !!settings.requiredMaximumVersion && newerInstallationVersion(installationVersion(settings.requiredMaximumVersion), latestVersion);
|
|
49631
50321
|
const canUpdate = !blocked && (npm?.canUpdate ?? native);
|
|
49632
50322
|
update = async () => {
|
|
@@ -49651,7 +50341,7 @@ function createClaudeInstallation(environment, command) {
|
|
|
49651
50341
|
}
|
|
49652
50342
|
|
|
49653
50343
|
// dist/user-shell-environment.js
|
|
49654
|
-
import
|
|
50344
|
+
import path18 from "node:path";
|
|
49655
50345
|
import { execFile as execFile4 } from "node:child_process";
|
|
49656
50346
|
var ENVIRONMENT_MARKER = Buffer.from("\0CODEXHOST_USER_SHELL_ENV_V1\0");
|
|
49657
50347
|
var ENVIRONMENT_COMMAND = "printf '\\0CODEXHOST_USER_SHELL_ENV_V1\\0'; /usr/bin/env -0";
|
|
@@ -49694,7 +50384,7 @@ async function withUserShellEnvironment(environment, dependencies) {
|
|
|
49694
50384
|
if (platform === "win32" || !environment.HOME)
|
|
49695
50385
|
return environment;
|
|
49696
50386
|
const shell = environment.SHELL?.trim() || defaultShell(platform);
|
|
49697
|
-
if (!shell || !SUPPORTED_SHELLS.has(
|
|
50387
|
+
if (!shell || !SUPPORTED_SHELLS.has(path18.basename(shell)))
|
|
49698
50388
|
return environment;
|
|
49699
50389
|
const cacheKey = `${platform}\0${shell}\0${environment.HOME}`;
|
|
49700
50390
|
const cached2 = dependencies ? void 0 : shellEnvironmentCache.get(cacheKey);
|