@liberseek/boft-cli-win32-arm64 0.7.9 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +9669 -5390
- package/app/desktop-controller.mjs +252 -42
- package/app/host-runtime.mjs +5361 -1491
- 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 +1055 -391
- 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 +16750 -0
- package/app/plugins/cursor-cli/manifest.json +18 -1
- 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 +898 -268
- 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/muse/manifest.json +18 -1
- package/app/plugins/muse/plugin.mjs +251 -17
- package/app/plugins/omp/manifest.json +21 -1
- package/app/plugins/omp/plugin.mjs +2741 -1960
- 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 +3396 -2841
- 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 +2731 -2427
- package/bin/boft.exe +0 -0
- package/libexec/boft-node-repl.exe +0 -0
- package/libexec/boft-shim.exe +0 -0
- package/libexec/boft-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, path21) {
|
|
781
|
+
if (!path21)
|
|
782
782
|
return obj;
|
|
783
|
-
return
|
|
783
|
+
return path21.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(path21, 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(path21);
|
|
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, path21 = []) => {
|
|
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 }, [...path21, ...issue2.path]));
|
|
1347
1347
|
} else if (issue2.code === "invalid_key") {
|
|
1348
|
-
processError({ issues: issue2.issues }, [...
|
|
1348
|
+
processError({ issues: issue2.issues }, [...path21, ...issue2.path]);
|
|
1349
1349
|
} else if (issue2.code === "invalid_element") {
|
|
1350
|
-
processError({ issues: issue2.issues }, [...
|
|
1350
|
+
processError({ issues: issue2.issues }, [...path21, ...issue2.path]);
|
|
1351
1351
|
} else {
|
|
1352
|
-
const fullpath = [...
|
|
1352
|
+
const fullpath = [...path21, ...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, path21 = []) => {
|
|
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 }, [...path21, ...issue2.path]));
|
|
1384
1384
|
} else if (issue2.code === "invalid_key") {
|
|
1385
|
-
processError({ issues: issue2.issues }, [...
|
|
1385
|
+
processError({ issues: issue2.issues }, [...path21, ...issue2.path]);
|
|
1386
1386
|
} else if (issue2.code === "invalid_element") {
|
|
1387
|
-
processError({ issues: issue2.issues }, [...
|
|
1387
|
+
processError({ issues: issue2.issues }, [...path21, ...issue2.path]);
|
|
1388
1388
|
} else {
|
|
1389
|
-
const fullpath = [...
|
|
1389
|
+
const fullpath = [...path21, ...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 path21 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
1422
|
+
for (const seg of path21) {
|
|
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 path21 = ref.slice(1).split("/").filter(Boolean);
|
|
14115
|
+
if (path21.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 (path21[0] === defsKey) {
|
|
14120
|
+
const key = path21[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"
|
|
@@ -14616,13 +14772,40 @@ var HARNESS_PLUGIN_LIMIT = 128;
|
|
|
14616
14772
|
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);
|
|
14617
14773
|
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");
|
|
14618
14774
|
var documentationUrlSchema = external_exports.url().refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Plugin documentation links must be credential-free HTTPS URLs");
|
|
14775
|
+
var localizedTextSchema = external_exports.object({ en: external_exports.string().max(4096), "zh-CN": external_exports.string().max(4096).optional() }).strict();
|
|
14776
|
+
var harnessInstallationGuideSchema = external_exports.object({
|
|
14777
|
+
commands: external_exports.array(external_exports.object({ terminal: external_exports.string().max(256), command: external_exports.string().max(4096) }).strict()).max(8),
|
|
14778
|
+
before: localizedTextSchema.optional(),
|
|
14779
|
+
after: localizedTextSchema.optional(),
|
|
14780
|
+
downloads: external_exports.array(external_exports.object({ label: external_exports.string().max(128), url: documentationUrlSchema }).strict()).max(8).optional()
|
|
14781
|
+
}).strict();
|
|
14619
14782
|
var pluginPresentationShape = {
|
|
14620
14783
|
id: harnessPluginIdSchema,
|
|
14621
14784
|
name: external_exports.string().trim().min(1).max(128),
|
|
14622
14785
|
version: external_exports.string().min(1).max(128),
|
|
14786
|
+
/** Capability-only plugin; omitted for existing session-capable plugins. */
|
|
14787
|
+
kind: external_exports.literal("usage").optional(),
|
|
14788
|
+
/** Original image styling or bounded vector paths; never arbitrary CSS/SVG markup. */
|
|
14789
|
+
iconStyle: external_exports.object({
|
|
14790
|
+
vector: external_exports.object({
|
|
14791
|
+
viewBox: external_exports.string().max(128).regex(/^-?\d+(?:\.\d+)?(?: +-?\d+(?:\.\d+)?){3}$/u),
|
|
14792
|
+
color: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu),
|
|
14793
|
+
paths: external_exports.array(external_exports.object({
|
|
14794
|
+
d: external_exports.string().min(1).max(32768).regex(/^[MmLlHhVvCcSsQqTtAaZz\d.,+eE\s-]+$/u),
|
|
14795
|
+
fillRule: external_exports.enum(["evenodd", "nonzero"]).optional(),
|
|
14796
|
+
fill: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu).optional()
|
|
14797
|
+
}).strict()).min(1).max(32)
|
|
14798
|
+
}).strict().optional(),
|
|
14799
|
+
background: external_exports.string().regex(/^#[a-f0-9]{6}$/iu).optional(),
|
|
14800
|
+
borderRadius: external_exports.number().min(0).max(50).optional(),
|
|
14801
|
+
paddingRatio: external_exports.number().min(0).max(0.25).optional()
|
|
14802
|
+
}).strict().optional(),
|
|
14803
|
+
installation: harnessInstallationGuideSchema.optional(),
|
|
14804
|
+
notice: localizedTextSchema.optional(),
|
|
14623
14805
|
/** The factory accepts a persisted local entrypoint through its construction context. */
|
|
14624
14806
|
launchCommand: external_exports.literal(true).optional(),
|
|
14625
14807
|
links: external_exports.object({
|
|
14808
|
+
website: documentationUrlSchema.optional(),
|
|
14626
14809
|
documentation: documentationUrlSchema.optional(),
|
|
14627
14810
|
installation: documentationUrlSchema.optional()
|
|
14628
14811
|
}).strict().optional()
|
|
@@ -14699,6 +14882,10 @@ var CONSOLE_HOST_METHODS = Object.freeze([
|
|
|
14699
14882
|
"codexhost/account/list",
|
|
14700
14883
|
"codexhost/account/refresh",
|
|
14701
14884
|
"codexhost/account/usage/inspect",
|
|
14885
|
+
"codexhost/usage/model-prices/get",
|
|
14886
|
+
"codexhost/usage/model-prices/set",
|
|
14887
|
+
"codexhost/usage/model-prices/default",
|
|
14888
|
+
"codexhost/usage/statistics/get",
|
|
14702
14889
|
"codexhost/update/check",
|
|
14703
14890
|
"codexhost/update/start",
|
|
14704
14891
|
"codexhost/update/status"
|
|
@@ -14763,6 +14950,7 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
14763
14950
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14764
14951
|
outputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14765
14952
|
outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
14953
|
+
apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
14766
14954
|
reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14767
14955
|
totalTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14768
14956
|
totalCostUsd: finiteNonNegativeNumberSchema.optional(),
|
|
@@ -14774,7 +14962,11 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
14774
14962
|
planFiveHourUsedPercent: cacheHitRatePercentSchema.optional(),
|
|
14775
14963
|
planFiveHourResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
|
|
14776
14964
|
planSevenDayUsedPercent: cacheHitRatePercentSchema.optional(),
|
|
14777
|
-
planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional()
|
|
14965
|
+
planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
|
|
14966
|
+
sessionCacheHitRatePercent: cacheHitRatePercentSchema.optional(),
|
|
14967
|
+
timeToFirstOutputMs: nonNegativeSafeIntegerSchema.optional(),
|
|
14968
|
+
costSource: external_exports.enum(["publicPrice", "native"]).optional(),
|
|
14969
|
+
unpricedModels: external_exports.array(external_exports.string().min(1)).min(1).optional()
|
|
14778
14970
|
}).strict().superRefine((usage, context) => {
|
|
14779
14971
|
if (Object.keys(usage).length === 0) {
|
|
14780
14972
|
context.addIssue({ code: "custom", message: "Thread Usage must contain a reliable field" });
|
|
@@ -14795,6 +14987,20 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
14795
14987
|
path: ["contextWindowTokens"]
|
|
14796
14988
|
});
|
|
14797
14989
|
}
|
|
14990
|
+
if (usage.costSource !== void 0 && usage.totalCostUsd === void 0) {
|
|
14991
|
+
context.addIssue({
|
|
14992
|
+
code: "custom",
|
|
14993
|
+
message: "Thread Usage costSource must be provided with totalCostUsd",
|
|
14994
|
+
path: ["costSource"]
|
|
14995
|
+
});
|
|
14996
|
+
}
|
|
14997
|
+
if (usage.unpricedModels !== void 0 && usage.costSource !== "publicPrice") {
|
|
14998
|
+
context.addIssue({
|
|
14999
|
+
code: "custom",
|
|
15000
|
+
message: "Thread Usage unpricedModels must be provided with a publicPrice cost",
|
|
15001
|
+
path: ["unpricedModels"]
|
|
15002
|
+
});
|
|
15003
|
+
}
|
|
14798
15004
|
if (usage.planFiveHourResetsAtUnix !== void 0 && usage.planFiveHourUsedPercent === void 0) {
|
|
14799
15005
|
context.addIssue({
|
|
14800
15006
|
code: "custom",
|
|
@@ -15064,27 +15270,27 @@ var harnessModelCatalogSchema = external_exports.object({
|
|
|
15064
15270
|
}).strict().superRefine((catalog, context) => {
|
|
15065
15271
|
const refs = /* @__PURE__ */ new Set();
|
|
15066
15272
|
const thinkingIds = new Set(catalog.thinkingOptions.map(({ id }) => id));
|
|
15067
|
-
for (const [index,
|
|
15068
|
-
if (refs.has(
|
|
15273
|
+
for (const [index, model2] of catalog.models.entries()) {
|
|
15274
|
+
if (refs.has(model2.ref.id)) {
|
|
15069
15275
|
context.addIssue({
|
|
15070
15276
|
code: "custom",
|
|
15071
15277
|
message: "Model Catalog refs must be unique",
|
|
15072
15278
|
path: ["models", index, "ref", "id"]
|
|
15073
15279
|
});
|
|
15074
15280
|
}
|
|
15075
|
-
refs.add(
|
|
15076
|
-
if (
|
|
15077
|
-
if (refs.has(
|
|
15281
|
+
refs.add(model2.ref.id);
|
|
15282
|
+
if (model2.fastModel) {
|
|
15283
|
+
if (refs.has(model2.fastModel.id) || catalog.models.some((entry) => entry.ref.id === model2.fastModel?.id)) {
|
|
15078
15284
|
context.addIssue({
|
|
15079
15285
|
code: "custom",
|
|
15080
15286
|
message: "Fast Model refs must be distinct and unique",
|
|
15081
15287
|
path: ["models", index, "fastModel"]
|
|
15082
15288
|
});
|
|
15083
15289
|
}
|
|
15084
|
-
refs.add(
|
|
15290
|
+
refs.add(model2.fastModel.id);
|
|
15085
15291
|
}
|
|
15086
15292
|
const supportedThinkingIds = /* @__PURE__ */ new Set();
|
|
15087
|
-
for (const [optionIndex, optionId] of (
|
|
15293
|
+
for (const [optionIndex, optionId] of (model2.supportedThinkingOptionIds ?? []).entries()) {
|
|
15088
15294
|
if (supportedThinkingIds.has(optionId)) {
|
|
15089
15295
|
context.addIssue({
|
|
15090
15296
|
code: "custom",
|
|
@@ -15678,6 +15884,11 @@ var codexSshDraftSchema = external_exports.strictObject({
|
|
|
15678
15884
|
});
|
|
15679
15885
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
15680
15886
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
15887
|
+
external_exports.strictObject({
|
|
15888
|
+
action: external_exports.literal("read-thread"),
|
|
15889
|
+
hostId: hostId.refine((id) => id !== "local"),
|
|
15890
|
+
input: delegationReadParamsSchema
|
|
15891
|
+
}),
|
|
15681
15892
|
external_exports.strictObject({
|
|
15682
15893
|
action: external_exports.literal("save"),
|
|
15683
15894
|
draft: codexSshDraftSchema,
|
|
@@ -15809,7 +16020,6 @@ var tokenFields = [
|
|
|
15809
16020
|
"cachedInputTokens",
|
|
15810
16021
|
"cacheWriteInputTokens",
|
|
15811
16022
|
"outputTokens",
|
|
15812
|
-
"outputTokensPerSecond",
|
|
15813
16023
|
"reasoningOutputTokens",
|
|
15814
16024
|
"totalTokens",
|
|
15815
16025
|
"contextWindowTokens",
|
|
@@ -15817,10 +16027,12 @@ var tokenFields = [
|
|
|
15817
16027
|
];
|
|
15818
16028
|
var safeIntegerFields = [
|
|
15819
16029
|
"planFiveHourResetsAtUnix",
|
|
15820
|
-
"planSevenDayResetsAtUnix"
|
|
16030
|
+
"planSevenDayResetsAtUnix",
|
|
16031
|
+
"timeToFirstOutputMs"
|
|
15821
16032
|
];
|
|
15822
16033
|
var percentFields = [
|
|
15823
16034
|
"cacheHitRatePercent",
|
|
16035
|
+
"sessionCacheHitRatePercent",
|
|
15824
16036
|
"planFiveHourUsedPercent",
|
|
15825
16037
|
"planSevenDayUsedPercent"
|
|
15826
16038
|
];
|
|
@@ -15828,9 +16040,14 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
15828
16040
|
...tokenFields,
|
|
15829
16041
|
...safeIntegerFields,
|
|
15830
16042
|
...percentFields,
|
|
16043
|
+
"sessionCacheUsage",
|
|
15831
16044
|
"totalCostUsd",
|
|
15832
16045
|
"totalCredits",
|
|
15833
|
-
"contextUsagePercent"
|
|
16046
|
+
"contextUsagePercent",
|
|
16047
|
+
"outputTokensPerSecond",
|
|
16048
|
+
"apiOutputTokensPerSecond",
|
|
16049
|
+
"costSource",
|
|
16050
|
+
"unpricedModels"
|
|
15834
16051
|
]);
|
|
15835
16052
|
function isRecord(value) {
|
|
15836
16053
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -15846,7 +16063,11 @@ function parseHostUsage(value) {
|
|
|
15846
16063
|
throw new Error(`Harness Usage contains unknown field '${key}'`);
|
|
15847
16064
|
}
|
|
15848
16065
|
}
|
|
15849
|
-
for (const field of [
|
|
16066
|
+
for (const field of [
|
|
16067
|
+
"totalCredits",
|
|
16068
|
+
"contextUsagePercent",
|
|
16069
|
+
"apiOutputTokensPerSecond"
|
|
16070
|
+
]) {
|
|
15850
16071
|
const candidate = value[field];
|
|
15851
16072
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
|
|
15852
16073
|
throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
|
|
@@ -15882,6 +16103,12 @@ function parseHostUsage(value) {
|
|
|
15882
16103
|
throw new Error(`Harness Usage '${field}' must be between 0 and 100`);
|
|
15883
16104
|
}
|
|
15884
16105
|
}
|
|
16106
|
+
if (value.sessionCacheUsage !== void 0) {
|
|
16107
|
+
const totals2 = value.sessionCacheUsage;
|
|
16108
|
+
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) {
|
|
16109
|
+
throw new Error("Harness Usage 'sessionCacheUsage' must contain complete bounded token totals");
|
|
16110
|
+
}
|
|
16111
|
+
}
|
|
15885
16112
|
const hasContextUsed = value.contextUsedTokens !== void 0;
|
|
15886
16113
|
const hasContextWindow = value.contextWindowTokens !== void 0;
|
|
15887
16114
|
if (hasContextUsed !== hasContextWindow) {
|
|
@@ -15896,8 +16123,90 @@ function parseHostUsage(value) {
|
|
|
15896
16123
|
if (value.planSevenDayResetsAtUnix !== void 0 && value.planSevenDayUsedPercent === void 0) {
|
|
15897
16124
|
throw new Error("Harness Usage 'planSevenDayResetsAtUnix' must be provided with 'planSevenDayUsedPercent'");
|
|
15898
16125
|
}
|
|
16126
|
+
if (value.costSource !== void 0) {
|
|
16127
|
+
if (value.costSource !== "publicPrice" && value.costSource !== "native") {
|
|
16128
|
+
throw new Error("Harness Usage 'costSource' must be 'publicPrice' or 'native'");
|
|
16129
|
+
}
|
|
16130
|
+
if (value.totalCostUsd === void 0) {
|
|
16131
|
+
throw new Error("Harness Usage 'costSource' must be provided with 'totalCostUsd'");
|
|
16132
|
+
}
|
|
16133
|
+
}
|
|
16134
|
+
if (value.unpricedModels !== void 0) {
|
|
16135
|
+
const models = value.unpricedModels;
|
|
16136
|
+
if (!Array.isArray(models) || models.length === 0 || !models.every((model2) => typeof model2 === "string" && model2.length > 0)) {
|
|
16137
|
+
throw new Error("Harness Usage 'unpricedModels' must be a non-empty list of Model IDs");
|
|
16138
|
+
}
|
|
16139
|
+
if (value.costSource !== "publicPrice") {
|
|
16140
|
+
throw new Error("Harness Usage 'unpricedModels' must be provided with a 'publicPrice' cost");
|
|
16141
|
+
}
|
|
16142
|
+
return { ...value, unpricedModels: [...models] };
|
|
16143
|
+
}
|
|
15899
16144
|
return { ...value };
|
|
15900
16145
|
}
|
|
16146
|
+
var requestTokenFields = [
|
|
16147
|
+
"inputTokens",
|
|
16148
|
+
"cachedInputTokens",
|
|
16149
|
+
"cacheWriteInputTokens",
|
|
16150
|
+
"cacheWrite1hInputTokens",
|
|
16151
|
+
"outputTokens",
|
|
16152
|
+
"reasoningOutputTokens",
|
|
16153
|
+
"startedAtMs",
|
|
16154
|
+
"completedAtMs"
|
|
16155
|
+
];
|
|
16156
|
+
var requestFields = /* @__PURE__ */ new Set([
|
|
16157
|
+
...requestTokenFields,
|
|
16158
|
+
"requestId",
|
|
16159
|
+
"historical",
|
|
16160
|
+
"model",
|
|
16161
|
+
"provider"
|
|
16162
|
+
]);
|
|
16163
|
+
function parseHostUsageRequest(value) {
|
|
16164
|
+
if (!isRecord(value))
|
|
16165
|
+
throw new Error("Harness Usage request must be an object");
|
|
16166
|
+
for (const key of Object.keys(value)) {
|
|
16167
|
+
if (!requestFields.has(key)) {
|
|
16168
|
+
throw new Error(`Harness Usage request contains unknown field '${key}'`);
|
|
16169
|
+
}
|
|
16170
|
+
}
|
|
16171
|
+
if (typeof value.requestId !== "string" || value.requestId.length === 0) {
|
|
16172
|
+
throw new Error("Harness Usage request 'requestId' must be a non-empty string");
|
|
16173
|
+
}
|
|
16174
|
+
for (const field of ["model", "provider"]) {
|
|
16175
|
+
const candidate = value[field];
|
|
16176
|
+
if (candidate !== void 0 && (typeof candidate !== "string" || candidate.length === 0)) {
|
|
16177
|
+
throw new Error(`Harness Usage request '${field}' must be a non-empty string`);
|
|
16178
|
+
}
|
|
16179
|
+
}
|
|
16180
|
+
if (value.historical !== void 0 && typeof value.historical !== "boolean") {
|
|
16181
|
+
throw new Error("Harness Usage request 'historical' must be a boolean");
|
|
16182
|
+
}
|
|
16183
|
+
for (const field of requestTokenFields) {
|
|
16184
|
+
const candidate = value[field];
|
|
16185
|
+
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16186
|
+
throw new Error(`Harness Usage request '${field}' must be a non-negative safe integer`);
|
|
16187
|
+
}
|
|
16188
|
+
}
|
|
16189
|
+
if (value.inputTokens === void 0 || value.outputTokens === void 0) {
|
|
16190
|
+
throw new Error("Harness Usage request must contain 'inputTokens' and 'outputTokens'");
|
|
16191
|
+
}
|
|
16192
|
+
const request = value;
|
|
16193
|
+
if ((request.cachedInputTokens ?? 0) + (request.cacheWriteInputTokens ?? 0) > request.inputTokens) {
|
|
16194
|
+
throw new Error("Harness Usage request cache Tokens must not exceed 'inputTokens'");
|
|
16195
|
+
}
|
|
16196
|
+
if ((request.reasoningOutputTokens ?? 0) > request.outputTokens) {
|
|
16197
|
+
throw new Error("Harness Usage request 'reasoningOutputTokens' must not exceed 'outputTokens'");
|
|
16198
|
+
}
|
|
16199
|
+
if (request.cacheWrite1hInputTokens !== void 0 && request.cacheWrite1hInputTokens > (request.cacheWriteInputTokens ?? -1)) {
|
|
16200
|
+
throw new Error("Harness Usage request 'cacheWrite1hInputTokens' must not exceed 'cacheWriteInputTokens'");
|
|
16201
|
+
}
|
|
16202
|
+
if (request.startedAtMs === void 0 !== (request.completedAtMs === void 0)) {
|
|
16203
|
+
throw new Error("Harness Usage request timing fields must be provided together");
|
|
16204
|
+
}
|
|
16205
|
+
if (request.startedAtMs !== void 0 && request.completedAtMs !== void 0 && request.completedAtMs < request.startedAtMs) {
|
|
16206
|
+
throw new Error("Harness Usage request 'completedAtMs' must not precede 'startedAtMs'");
|
|
16207
|
+
}
|
|
16208
|
+
return { ...request };
|
|
16209
|
+
}
|
|
15901
16210
|
|
|
15902
16211
|
// ../../harness-adapter/dist/live-command-catalog.js
|
|
15903
16212
|
var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
|
|
@@ -15980,8 +16289,8 @@ function liveHarnessCommandPrompt(catalog, idPrefix, commandId, argumentText) {
|
|
|
15980
16289
|
const descriptor = catalog.commands.find(({ id }) => id === commandId);
|
|
15981
16290
|
if (!descriptor)
|
|
15982
16291
|
return null;
|
|
15983
|
-
const
|
|
15984
|
-
return
|
|
16292
|
+
const text2 = typeof argumentText === "string" ? argumentText.trim() : "";
|
|
16293
|
+
return text2 ? `${descriptor.invocation} ${text2}` : descriptor.invocation;
|
|
15985
16294
|
}
|
|
15986
16295
|
function mergeLiveHarnessCommands(builtIns, idPrefix, live, exclusions = {}) {
|
|
15987
16296
|
if (!live)
|
|
@@ -16330,6 +16639,8 @@ var harnessSessionStateSchema = external_exports.custom((value) => {
|
|
|
16330
16639
|
var eventKeys = /* @__PURE__ */ new Map([
|
|
16331
16640
|
["session.state.changed", /* @__PURE__ */ new Set(["type", "state"])],
|
|
16332
16641
|
["session.usage.changed", /* @__PURE__ */ new Set(["type", "usage", "observedForTurnId"])],
|
|
16642
|
+
["usage.request", /* @__PURE__ */ new Set(["type", "request"])],
|
|
16643
|
+
["usage.history", /* @__PURE__ */ new Set(["type", "complete"])],
|
|
16333
16644
|
["subagent.state.changed", /* @__PURE__ */ new Set(["type", "nativeSubagentId", "status", "resultSummary"])],
|
|
16334
16645
|
["subagent.transcript.changed", /* @__PURE__ */ new Set(["type", "nativeSubagentId"])],
|
|
16335
16646
|
["turn.started", /* @__PURE__ */ new Set(["type", "turnId"])],
|
|
@@ -16378,6 +16689,8 @@ var harnessOutputSchema = external_exports.custom((value) => {
|
|
|
16378
16689
|
return harnessSessionStateSchema.safeParse(event.state).success;
|
|
16379
16690
|
if (event.type === "session.faulted")
|
|
16380
16691
|
return harnessErrorSchema.safeParse(event.error).success;
|
|
16692
|
+
if (event.type === "usage.history")
|
|
16693
|
+
return typeof event.complete === "boolean";
|
|
16381
16694
|
return true;
|
|
16382
16695
|
}
|
|
16383
16696
|
if (output.kind === "interaction") {
|
|
@@ -17197,9 +17510,221 @@ var BrokeredHarnessAdapter = class {
|
|
|
17197
17510
|
}
|
|
17198
17511
|
};
|
|
17199
17512
|
|
|
17513
|
+
// dist/claude-usage.js
|
|
17514
|
+
var SYNTHETIC_MODEL = "<synthetic>";
|
|
17515
|
+
function isRecord2(value) {
|
|
17516
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
17517
|
+
}
|
|
17518
|
+
function count2(value) {
|
|
17519
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value >= 0 ? value : null;
|
|
17520
|
+
}
|
|
17521
|
+
function isClaudeModelRequest(model2) {
|
|
17522
|
+
return typeof model2 === "string" && model2.length > 0 && model2 !== SYNTHETIC_MODEL;
|
|
17523
|
+
}
|
|
17524
|
+
function claudeUsageRecord(requestId, model2, usage, extra = {}) {
|
|
17525
|
+
if (!isRecord2(usage))
|
|
17526
|
+
return { kind: "missing" };
|
|
17527
|
+
const input = count2(usage.input_tokens);
|
|
17528
|
+
const output = count2(usage.output_tokens);
|
|
17529
|
+
const cacheRead = count2(usage.cache_read_input_tokens ?? 0);
|
|
17530
|
+
const cacheWrite = count2(usage.cache_creation_input_tokens ?? 0);
|
|
17531
|
+
if (input === null || output === null || cacheRead === null || cacheWrite === null) {
|
|
17532
|
+
return { kind: "missing" };
|
|
17533
|
+
}
|
|
17534
|
+
const split = isRecord2(usage.cache_creation) ? usage.cache_creation : null;
|
|
17535
|
+
const oneHour = split ? count2(split.ephemeral_1h_input_tokens) : null;
|
|
17536
|
+
const details = isRecord2(usage.output_tokens_details) ? usage.output_tokens_details : null;
|
|
17537
|
+
const thinking = details ? count2(details.thinking_tokens) : null;
|
|
17538
|
+
const timed = extra.startedAtMs !== void 0 && extra.startedAtMs !== null && extra.completedAtMs !== void 0;
|
|
17539
|
+
try {
|
|
17540
|
+
return {
|
|
17541
|
+
kind: "request",
|
|
17542
|
+
request: parseHostUsageRequest({
|
|
17543
|
+
requestId,
|
|
17544
|
+
...extra.historical ? { historical: true } : {},
|
|
17545
|
+
model: model2,
|
|
17546
|
+
// Claude Code's providers (first-party, Bedrock, Vertex, gateways) differ in model IDs,
|
|
17547
|
+
// not in list prices; the model ID alone resolves the price.
|
|
17548
|
+
inputTokens: input + cacheRead + cacheWrite,
|
|
17549
|
+
cachedInputTokens: cacheRead,
|
|
17550
|
+
cacheWriteInputTokens: cacheWrite,
|
|
17551
|
+
// Mirrors Claude Code's own pricing: one-hour writes are capped by the total writes.
|
|
17552
|
+
...oneHour !== null ? { cacheWrite1hInputTokens: Math.min(oneHour, cacheWrite) } : {},
|
|
17553
|
+
outputTokens: output,
|
|
17554
|
+
...thinking !== null && thinking <= output ? { reasoningOutputTokens: thinking } : {},
|
|
17555
|
+
...timed ? { startedAtMs: extra.startedAtMs, completedAtMs: extra.completedAtMs } : {}
|
|
17556
|
+
})
|
|
17557
|
+
};
|
|
17558
|
+
} catch {
|
|
17559
|
+
return { kind: "missing" };
|
|
17560
|
+
}
|
|
17561
|
+
}
|
|
17562
|
+
function claudeUsageHistory(entries) {
|
|
17563
|
+
const usages = /* @__PURE__ */ new Map();
|
|
17564
|
+
let complete = true;
|
|
17565
|
+
for (const entry of entries) {
|
|
17566
|
+
if (!isRecord2(entry) || entry.type !== "assistant" || entry.isSidechain === true)
|
|
17567
|
+
continue;
|
|
17568
|
+
const message = entry.message;
|
|
17569
|
+
if (!isRecord2(message) || !isClaudeModelRequest(message.model))
|
|
17570
|
+
continue;
|
|
17571
|
+
if (typeof message.id !== "string" || message.id.length === 0) {
|
|
17572
|
+
complete = false;
|
|
17573
|
+
continue;
|
|
17574
|
+
}
|
|
17575
|
+
usages.set(message.id, { model: message.model, usage: message.usage });
|
|
17576
|
+
}
|
|
17577
|
+
const requests = [];
|
|
17578
|
+
for (const [id, { model: model2, usage }] of usages) {
|
|
17579
|
+
const record2 = claudeUsageRecord(id, model2, usage, { historical: true });
|
|
17580
|
+
if (record2.kind === "request")
|
|
17581
|
+
requests.push(record2.request);
|
|
17582
|
+
else
|
|
17583
|
+
complete = false;
|
|
17584
|
+
}
|
|
17585
|
+
return { requests, complete };
|
|
17586
|
+
}
|
|
17587
|
+
|
|
17588
|
+
// dist/claude-usage-statistics.js
|
|
17589
|
+
import os2 from "node:os";
|
|
17590
|
+
import path3 from "node:path";
|
|
17591
|
+
|
|
17592
|
+
// ../../harness-adapter/dist/usage-statistics.js
|
|
17593
|
+
import { createReadStream } from "node:fs";
|
|
17594
|
+
import { lstat as lstat2, opendir } from "node:fs/promises";
|
|
17595
|
+
import path2 from "node:path";
|
|
17596
|
+
import { createInterface } from "node:readline";
|
|
17597
|
+
var MAX_SESSION_ID_LENGTH = 512;
|
|
17598
|
+
var MAX_CWD_LENGTH = 4096;
|
|
17599
|
+
function sessionIdOk(value) {
|
|
17600
|
+
return typeof value === "string" && value.length > 0 && value.length <= MAX_SESSION_ID_LENGTH;
|
|
17601
|
+
}
|
|
17602
|
+
function cwdOk(value) {
|
|
17603
|
+
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("\\\\"));
|
|
17604
|
+
}
|
|
17605
|
+
function withUsageSession(entry, session) {
|
|
17606
|
+
const sessionId = sessionIdOk(session.sessionId) ? session.sessionId : void 0;
|
|
17607
|
+
const cwd = cwdOk(session.cwd) ? session.cwd : void 0;
|
|
17608
|
+
if (sessionId === void 0 && cwd === void 0)
|
|
17609
|
+
return entry;
|
|
17610
|
+
return {
|
|
17611
|
+
...entry,
|
|
17612
|
+
...sessionId !== void 0 ? { sessionId } : {},
|
|
17613
|
+
...cwd !== void 0 ? { cwd } : {}
|
|
17614
|
+
};
|
|
17615
|
+
}
|
|
17616
|
+
function usageEntryFromRequest(request, occurredAtMs) {
|
|
17617
|
+
if (!Number.isSafeInteger(occurredAtMs) || occurredAtMs <= 0)
|
|
17618
|
+
return null;
|
|
17619
|
+
return {
|
|
17620
|
+
id: request.requestId,
|
|
17621
|
+
occurredAtMs,
|
|
17622
|
+
...request.model !== void 0 ? { model: request.model } : {},
|
|
17623
|
+
inputTokens: request.inputTokens,
|
|
17624
|
+
...request.cachedInputTokens !== void 0 ? { cachedInputTokens: request.cachedInputTokens } : {},
|
|
17625
|
+
...request.cacheWriteInputTokens !== void 0 ? { cacheWriteInputTokens: request.cacheWriteInputTokens } : {},
|
|
17626
|
+
...request.cacheWrite1hInputTokens !== void 0 ? { cacheWrite1hInputTokens: request.cacheWrite1hInputTokens } : {},
|
|
17627
|
+
outputTokens: request.outputTokens,
|
|
17628
|
+
...request.reasoningOutputTokens !== void 0 ? { reasoningOutputTokens: request.reasoningOutputTokens } : {}
|
|
17629
|
+
};
|
|
17630
|
+
}
|
|
17631
|
+
async function jsonlUsageSources(root, maxDepth, signal) {
|
|
17632
|
+
const sources = [];
|
|
17633
|
+
const visit = async (directory, depth) => {
|
|
17634
|
+
signal.throwIfAborted();
|
|
17635
|
+
const entries = await opendir(directory).catch((error52) => {
|
|
17636
|
+
if (error52.code === "ENOENT")
|
|
17637
|
+
return null;
|
|
17638
|
+
throw error52;
|
|
17639
|
+
});
|
|
17640
|
+
if (!entries)
|
|
17641
|
+
return;
|
|
17642
|
+
for await (const entry of entries) {
|
|
17643
|
+
signal.throwIfAborted();
|
|
17644
|
+
const file2 = path2.join(directory, entry.name);
|
|
17645
|
+
if (entry.isDirectory()) {
|
|
17646
|
+
if (depth < maxDepth)
|
|
17647
|
+
await visit(file2, depth + 1);
|
|
17648
|
+
} else if (entry.isFile() && entry.name.endsWith(".jsonl")) {
|
|
17649
|
+
const info = await lstat2(file2).catch(() => null);
|
|
17650
|
+
if (info?.isFile() && info.size > 0) {
|
|
17651
|
+
sources.push({ id: file2, fingerprint: `${info.ino}:${info.size}:${info.mtimeMs}` });
|
|
17652
|
+
}
|
|
17653
|
+
}
|
|
17654
|
+
}
|
|
17655
|
+
};
|
|
17656
|
+
await visit(root, 0);
|
|
17657
|
+
return sources;
|
|
17658
|
+
}
|
|
17659
|
+
async function* jsonlRecords(file2, marker, signal) {
|
|
17660
|
+
const lines = createInterface({
|
|
17661
|
+
input: createReadStream(file2, { encoding: "utf8", signal }),
|
|
17662
|
+
crlfDelay: Infinity
|
|
17663
|
+
});
|
|
17664
|
+
for await (const line of lines) {
|
|
17665
|
+
if (!line.includes(marker))
|
|
17666
|
+
continue;
|
|
17667
|
+
let value;
|
|
17668
|
+
try {
|
|
17669
|
+
value = JSON.parse(line);
|
|
17670
|
+
} catch {
|
|
17671
|
+
continue;
|
|
17672
|
+
}
|
|
17673
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
17674
|
+
yield value;
|
|
17675
|
+
}
|
|
17676
|
+
}
|
|
17677
|
+
}
|
|
17678
|
+
function nativeTimeMs(value) {
|
|
17679
|
+
const time3 = typeof value === "number" ? value : typeof value === "string" ? Date.parse(value) : Number.NaN;
|
|
17680
|
+
return Number.isFinite(time3) && time3 > 0 ? Math.floor(time3) : null;
|
|
17681
|
+
}
|
|
17682
|
+
|
|
17683
|
+
// dist/claude-usage-statistics.js
|
|
17684
|
+
function isRecord3(value) {
|
|
17685
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
17686
|
+
}
|
|
17687
|
+
function claudeProjectsDirectory(environment) {
|
|
17688
|
+
return path3.join(path3.resolve(environment.CLAUDE_CONFIG_DIR ?? path3.join(os2.homedir(), ".claude")), "projects");
|
|
17689
|
+
}
|
|
17690
|
+
async function readClaudeUsage(file2, signal) {
|
|
17691
|
+
const messages = /* @__PURE__ */ new Map();
|
|
17692
|
+
let sessionId;
|
|
17693
|
+
let cwd;
|
|
17694
|
+
for await (const line of jsonlRecords(file2, '"assistant"', signal)) {
|
|
17695
|
+
if (line.type !== "assistant" || !isRecord3(line.message))
|
|
17696
|
+
continue;
|
|
17697
|
+
sessionId ??= line.sessionId;
|
|
17698
|
+
cwd ??= line.cwd;
|
|
17699
|
+
const { id, model: model2, usage } = line.message;
|
|
17700
|
+
if (typeof id !== "string" || id.length === 0 || !isClaudeModelRequest(model2))
|
|
17701
|
+
continue;
|
|
17702
|
+
const at2 = messages.get(id)?.at ?? nativeTimeMs(line.timestamp);
|
|
17703
|
+
messages.set(id, { model: model2, usage, at: at2 });
|
|
17704
|
+
}
|
|
17705
|
+
const entries = [];
|
|
17706
|
+
for (const [id, { model: model2, usage, at: at2 }] of messages) {
|
|
17707
|
+
const record2 = claudeUsageRecord(id, model2, usage);
|
|
17708
|
+
const entry = record2.kind === "request" && at2 !== null && usageEntryFromRequest(record2.request, at2);
|
|
17709
|
+
if (entry)
|
|
17710
|
+
entries.push(withUsageSession(entry, { sessionId: text(sessionId), cwd: text(cwd) }));
|
|
17711
|
+
}
|
|
17712
|
+
return entries;
|
|
17713
|
+
}
|
|
17714
|
+
function text(value) {
|
|
17715
|
+
return typeof value === "string" ? value : void 0;
|
|
17716
|
+
}
|
|
17717
|
+
function createClaudeUsageStatistics(environment) {
|
|
17718
|
+
return Object.freeze({
|
|
17719
|
+
// projects/<project>/<id>.jsonl, <id>/subagents/*.jsonl, <id>/subagents/workflows/wf_*/*.jsonl
|
|
17720
|
+
listSources: (signal) => jsonlUsageSources(claudeProjectsDirectory(environment), 4, signal),
|
|
17721
|
+
readSource: (id, signal) => readClaudeUsage(id, signal)
|
|
17722
|
+
});
|
|
17723
|
+
}
|
|
17724
|
+
|
|
17200
17725
|
// dist/claude-code-adapter.js
|
|
17201
17726
|
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
17202
|
-
import
|
|
17727
|
+
import path18 from "node:path";
|
|
17203
17728
|
|
|
17204
17729
|
// ../../../node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs
|
|
17205
17730
|
import { createRequire as DW } from "node:module";
|
|
@@ -17793,6 +18318,12 @@ var E0 = v(function(Dot, Ore) {
|
|
|
17793
18318
|
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 } };
|
|
17794
18319
|
});
|
|
17795
18320
|
var O0 = v(function(Nre) {
|
|
18321
|
+
/*!
|
|
18322
|
+
* mime-types
|
|
18323
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
18324
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
18325
|
+
* MIT Licensed
|
|
18326
|
+
*/
|
|
17796
18327
|
var dh = E0(), Cre = be("path").extname, w0 = /^\s*([^;\s]*)(?:;|\s|$)/, Rre = /^text\//i;
|
|
17797
18328
|
Nre.charset = T0;
|
|
17798
18329
|
Nre.charsets = { lookup: T0 };
|
|
@@ -21106,8 +21637,8 @@ var qU = v(function(BU) {
|
|
|
21106
21637
|
BU._globalThis = void 0;
|
|
21107
21638
|
BU._globalThis = typeof globalThis === "object" ? globalThis : global;
|
|
21108
21639
|
});
|
|
21109
|
-
var GU = v(function(
|
|
21110
|
-
var Axe =
|
|
21640
|
+
var GU = v(function(os8) {
|
|
21641
|
+
var Axe = os8 && os8.__createBinding || (Object.create ? function(e, t, r, n) {
|
|
21111
21642
|
if (n === void 0) n = r;
|
|
21112
21643
|
Object.defineProperty(e, n, { enumerable: true, get: function() {
|
|
21113
21644
|
return t[r];
|
|
@@ -21115,11 +21646,11 @@ var GU = v(function(os7) {
|
|
|
21115
21646
|
} : function(e, t, r, n) {
|
|
21116
21647
|
if (n === void 0) n = r;
|
|
21117
21648
|
e[n] = t[r];
|
|
21118
|
-
}), kxe =
|
|
21649
|
+
}), kxe = os8 && os8.__exportStar || function(e, t) {
|
|
21119
21650
|
for (var r in e) if (r !== "default" && !Object.prototype.hasOwnProperty.call(t, r)) Axe(t, e, r);
|
|
21120
21651
|
};
|
|
21121
|
-
Object.defineProperty(
|
|
21122
|
-
kxe(qU(),
|
|
21652
|
+
Object.defineProperty(os8, "__esModule", { value: true });
|
|
21653
|
+
kxe(qU(), os8);
|
|
21123
21654
|
});
|
|
21124
21655
|
var WU = v(function(is) {
|
|
21125
21656
|
var Oxe = is && is.__createBinding || (Object.create ? function(e, t, r, n) {
|
|
@@ -43138,13 +43669,13 @@ var SessionImportScope = class {
|
|
|
43138
43669
|
};
|
|
43139
43670
|
|
|
43140
43671
|
// dist/command.js
|
|
43141
|
-
import
|
|
43672
|
+
import path8 from "node:path";
|
|
43142
43673
|
|
|
43143
43674
|
// ../../harness-discovery/dist/environment.js
|
|
43144
43675
|
import fs from "node:fs";
|
|
43145
|
-
import
|
|
43676
|
+
import path4 from "node:path";
|
|
43146
43677
|
function targetPath(platform) {
|
|
43147
|
-
return platform === "win32" ?
|
|
43678
|
+
return platform === "win32" ? path4.win32 : path4.posix;
|
|
43148
43679
|
}
|
|
43149
43680
|
function environmentValue(environment, name) {
|
|
43150
43681
|
const lowered = name.toLowerCase();
|
|
@@ -43187,9 +43718,9 @@ function newestFirst(names) {
|
|
|
43187
43718
|
}
|
|
43188
43719
|
|
|
43189
43720
|
// ../../harness-discovery/dist/invocation.js
|
|
43190
|
-
import
|
|
43721
|
+
import path5 from "node:path";
|
|
43191
43722
|
function commandInvocation(command, arguments_, environment, platform = process.platform) {
|
|
43192
|
-
const extension =
|
|
43723
|
+
const extension = path5.win32.extname(command).toLowerCase();
|
|
43193
43724
|
if (platform !== "win32" || ![".cmd", ".bat"].includes(extension)) {
|
|
43194
43725
|
return { command, arguments: [...arguments_], windowsVerbatimArguments: false };
|
|
43195
43726
|
}
|
|
@@ -43203,11 +43734,11 @@ function commandInvocation(command, arguments_, environment, platform = process.
|
|
|
43203
43734
|
}
|
|
43204
43735
|
|
|
43205
43736
|
// ../../harness-discovery/dist/node-runtime.js
|
|
43206
|
-
import
|
|
43737
|
+
import path6 from "node:path";
|
|
43207
43738
|
function withNodeRuntimeOnPath(environment, runtimeExecutable = process.execPath, platform = process.platform) {
|
|
43208
43739
|
const pathKey = Object.keys(environment).find((name) => name.toLowerCase() === "path") ?? "PATH";
|
|
43209
43740
|
const delimiter = platform === "win32" ? ";" : ":";
|
|
43210
|
-
const runtimeDirectory =
|
|
43741
|
+
const runtimeDirectory = path6.dirname(runtimeExecutable);
|
|
43211
43742
|
const directories = (environment[pathKey] ?? "").split(delimiter).filter(Boolean);
|
|
43212
43743
|
const equal = platform === "win32" ? (value) => value.toLowerCase() : (value) => value;
|
|
43213
43744
|
if (!directories.some((directory) => equal(directory) === equal(runtimeDirectory))) {
|
|
@@ -43217,7 +43748,7 @@ function withNodeRuntimeOnPath(environment, runtimeExecutable = process.execPath
|
|
|
43217
43748
|
}
|
|
43218
43749
|
|
|
43219
43750
|
// ../../harness-discovery/dist/resolve.js
|
|
43220
|
-
import
|
|
43751
|
+
import os3 from "node:os";
|
|
43221
43752
|
|
|
43222
43753
|
// ../../harness-discovery/dist/version-managers.js
|
|
43223
43754
|
function versionManagerBinaryDirectories(context) {
|
|
@@ -43283,7 +43814,7 @@ function installRootExtensions(platform) {
|
|
|
43283
43814
|
return platform === "win32" ? [".exe", ".cmd"] : [""];
|
|
43284
43815
|
}
|
|
43285
43816
|
function resolveHomeDirectory(input) {
|
|
43286
|
-
return input.homeDirectory ?? environmentValue(input.environment, "HOME") ?? environmentValue(input.environment, "USERPROFILE") ??
|
|
43817
|
+
return input.homeDirectory ?? environmentValue(input.environment, "HOME") ?? environmentValue(input.environment, "USERPROFILE") ?? os3.homedir();
|
|
43287
43818
|
}
|
|
43288
43819
|
function templateVariables(environment, platform, home) {
|
|
43289
43820
|
const pathFlavor = targetPath(platform);
|
|
@@ -43491,58 +44022,58 @@ async function fetchInstallationText(url2) {
|
|
|
43491
44022
|
|
|
43492
44023
|
// ../../harness-discovery/dist/npm-installation.js
|
|
43493
44024
|
import { readFile as readFile2, realpath } from "node:fs/promises";
|
|
43494
|
-
import
|
|
44025
|
+
import path7 from "node:path";
|
|
43495
44026
|
function referencesNpmBin(shim, name, bin) {
|
|
43496
44027
|
if (bin.includes(".."))
|
|
43497
44028
|
return false;
|
|
43498
44029
|
const target = `node_modules/${name}/${bin.replace(/^\.\//, "")}`.toLowerCase();
|
|
43499
|
-
const
|
|
43500
|
-
return
|
|
44030
|
+
const text2 = shim.replaceAll("\\", "/").toLowerCase();
|
|
44031
|
+
return text2.includes(`%dp0%/${target}"`) || text2.includes(`%~dp0/${target}"`);
|
|
43501
44032
|
}
|
|
43502
44033
|
async function npmInstallation(command, packages, environment) {
|
|
43503
44034
|
let selected = await realpath(command);
|
|
43504
44035
|
if (process.platform === "win32" && /\.(cmd|bat)$/i.test(selected)) {
|
|
43505
44036
|
const shim = (await readFile2(selected, "utf8")).replaceAll("\\", "/");
|
|
43506
|
-
const root =
|
|
44037
|
+
const root = path7.dirname(selected);
|
|
43507
44038
|
for (const name of packages) {
|
|
43508
|
-
const directory2 =
|
|
43509
|
-
const metadata = await readFile2(
|
|
44039
|
+
const directory2 = path7.join(root, "node_modules", ...name.split("/"));
|
|
44040
|
+
const metadata = await readFile2(path7.join(directory2, "package.json"), "utf8").then((text2) => JSON.parse(text2)).catch(() => null);
|
|
43510
44041
|
const bins = typeof metadata?.bin === "string" ? [metadata.bin] : Object.values(metadata?.bin ?? {});
|
|
43511
44042
|
const bin = bins.find((entry) => referencesNpmBin(shim, name, entry));
|
|
43512
44043
|
if (bin) {
|
|
43513
|
-
selected = await realpath(
|
|
44044
|
+
selected = await realpath(path7.join(directory2, bin));
|
|
43514
44045
|
break;
|
|
43515
44046
|
}
|
|
43516
44047
|
}
|
|
43517
44048
|
}
|
|
43518
|
-
let directory =
|
|
44049
|
+
let directory = path7.dirname(selected);
|
|
43519
44050
|
for (let depth = 0; depth < 8; depth++) {
|
|
43520
|
-
const metadata = await readFile2(
|
|
44051
|
+
const metadata = await readFile2(path7.join(directory, "package.json"), "utf8").then((text2) => JSON.parse(text2)).catch(() => null);
|
|
43521
44052
|
if (metadata?.name && packages.includes(metadata.name)) {
|
|
43522
44053
|
const name = metadata.name;
|
|
43523
44054
|
const currentVersion = installationVersion(metadata.version);
|
|
43524
44055
|
const segments = name.split("/");
|
|
43525
44056
|
let modules = directory;
|
|
43526
44057
|
for (let index = 0; index < segments.length; index++)
|
|
43527
|
-
modules =
|
|
43528
|
-
const prefix = process.platform === "win32" ?
|
|
43529
|
-
const globalRoot = process.platform === "win32" ?
|
|
44058
|
+
modules = path7.dirname(modules);
|
|
44059
|
+
const prefix = process.platform === "win32" ? path7.dirname(modules) : path7.dirname(path7.dirname(modules));
|
|
44060
|
+
const globalRoot = process.platform === "win32" ? path7.join(prefix, "node_modules") : path7.join(prefix, "lib", "node_modules");
|
|
43530
44061
|
const env = withNodeRuntimeOnPath(environment);
|
|
43531
44062
|
const npm = resolveHarnessExecutable({ id: "npm", command: "npm", installRoots: { posix: [], windows: [] } }, { environment: env });
|
|
43532
44063
|
let globalInstall = modules === globalRoot;
|
|
43533
44064
|
if (process.platform === "win32") {
|
|
43534
|
-
const
|
|
44065
|
+
const project2 = (await Promise.all(["package.json", "package-lock.json", "npm-shrinkwrap.json"].map((file2) => readFile2(path7.join(prefix, file2), "utf8").then(() => true, (error52) => error52.code !== "ENOENT")))).some(Boolean);
|
|
43535
44066
|
const bins = typeof metadata.bin === "string" ? { [name.split("/").at(-1) ?? name]: metadata.bin } : metadata.bin ?? {};
|
|
43536
44067
|
const launchers = await Promise.all(Object.entries(bins).map(async ([bin, entry]) => {
|
|
43537
|
-
if (
|
|
44068
|
+
if (path7.basename(bin) !== bin || entry.includes(".."))
|
|
43538
44069
|
return false;
|
|
43539
|
-
const target = await realpath(
|
|
44070
|
+
const target = await realpath(path7.join(directory, entry)).catch(() => "");
|
|
43540
44071
|
if (target.toLowerCase() !== selected.toLowerCase())
|
|
43541
44072
|
return false;
|
|
43542
|
-
const shim = await readFile2(
|
|
44073
|
+
const shim = await readFile2(path7.join(prefix, `${bin}.cmd`), "utf8").catch(() => "");
|
|
43543
44074
|
return referencesNpmBin(shim, name, entry);
|
|
43544
44075
|
}));
|
|
43545
|
-
globalInstall = globalInstall && !
|
|
44076
|
+
globalInstall = globalInstall && !project2 && launchers.some(Boolean);
|
|
43546
44077
|
}
|
|
43547
44078
|
const canUpdate = globalInstall && !!npm;
|
|
43548
44079
|
return {
|
|
@@ -43560,7 +44091,7 @@ async function npmInstallation(command, packages, environment) {
|
|
|
43560
44091
|
}
|
|
43561
44092
|
};
|
|
43562
44093
|
}
|
|
43563
|
-
const parent =
|
|
44094
|
+
const parent = path7.dirname(directory);
|
|
43564
44095
|
if (parent === directory)
|
|
43565
44096
|
break;
|
|
43566
44097
|
directory = parent;
|
|
@@ -43668,14 +44199,14 @@ function resolveClaudeCodeExecutable(input = {}, dependencies = {}) {
|
|
|
43668
44199
|
}, dependencies);
|
|
43669
44200
|
if (!resolution)
|
|
43670
44201
|
throw new ClaudeCodeExecutableError("Claude Code is not installed");
|
|
43671
|
-
return targetPath(platform).isAbsolute(resolution.executable) ? resolution.executable :
|
|
44202
|
+
return targetPath(platform).isAbsolute(resolution.executable) ? resolution.executable : path8.resolve(resolution.executable);
|
|
43672
44203
|
}
|
|
43673
44204
|
|
|
43674
44205
|
// dist/pending-session.js
|
|
43675
44206
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
43676
44207
|
import { mkdir, open, readFile as readFile3, rename, rm as rm3, stat, unlink } from "node:fs/promises";
|
|
43677
|
-
import
|
|
43678
|
-
import
|
|
44208
|
+
import os4 from "node:os";
|
|
44209
|
+
import path9 from "node:path";
|
|
43679
44210
|
var reservationSchema = external_exports.strictObject({
|
|
43680
44211
|
version: external_exports.literal(1),
|
|
43681
44212
|
sessionId: external_exports.uuid(),
|
|
@@ -43688,13 +44219,13 @@ function isPendingClaudeSession(ref) {
|
|
|
43688
44219
|
var ClaudePendingSessions = class {
|
|
43689
44220
|
#directory;
|
|
43690
44221
|
constructor(environment) {
|
|
43691
|
-
this.#directory =
|
|
44222
|
+
this.#directory = path9.join(path9.resolve(environment.CLAUDE_CONFIG_DIR ?? path9.join(os4.homedir(), ".claude")), "codexhost", "pending-sessions");
|
|
43692
44223
|
}
|
|
43693
44224
|
#path(ref, cwd) {
|
|
43694
|
-
if (ref.harnessId !== "claude-code" || !external_exports.uuid().safeParse(ref.nativeSessionId).success || !external_exports.strictObject({ pendingSession: external_exports.literal(1) }).safeParse(ref.locator).success || !
|
|
44225
|
+
if (ref.harnessId !== "claude-code" || !external_exports.uuid().safeParse(ref.nativeSessionId).success || !external_exports.strictObject({ pendingSession: external_exports.literal(1) }).safeParse(ref.locator).success || !path9.isAbsolute(cwd)) {
|
|
43695
44226
|
throw new Error("Claude Code pending Session identity is invalid");
|
|
43696
44227
|
}
|
|
43697
|
-
return
|
|
44228
|
+
return path9.join(this.#directory, ref.nativeSessionId);
|
|
43698
44229
|
}
|
|
43699
44230
|
async create(cwd, configuration) {
|
|
43700
44231
|
const ref = nativeSessionRefSchema.parse({
|
|
@@ -43713,7 +44244,7 @@ var ClaudePendingSessions = class {
|
|
|
43713
44244
|
await mkdir(this.#directory, { recursive: true, mode: 448 });
|
|
43714
44245
|
await mkdir(directory, { mode: 448 });
|
|
43715
44246
|
try {
|
|
43716
|
-
const file2 = await open(
|
|
44247
|
+
const file2 = await open(path9.join(directory, "session.json"), "wx", 384);
|
|
43717
44248
|
try {
|
|
43718
44249
|
await file2.writeFile(JSON.stringify(reservation));
|
|
43719
44250
|
await file2.sync();
|
|
@@ -43730,13 +44261,13 @@ var ClaudePendingSessions = class {
|
|
|
43730
44261
|
}
|
|
43731
44262
|
async read(ref, cwd) {
|
|
43732
44263
|
const directory = this.#path(ref, cwd);
|
|
43733
|
-
const reservation = reservationSchema.parse(JSON.parse(await readFile3(
|
|
44264
|
+
const reservation = reservationSchema.parse(JSON.parse(await readFile3(path9.join(directory, "session.json"), "utf8")));
|
|
43734
44265
|
if (reservation.sessionId !== ref.nativeSessionId || reservation.cwd !== cwd) {
|
|
43735
44266
|
throw new Error("Claude Code pending Session does not belong to this working directory");
|
|
43736
44267
|
}
|
|
43737
44268
|
let started = false;
|
|
43738
44269
|
try {
|
|
43739
|
-
const claim = await stat(
|
|
44270
|
+
const claim = await stat(path9.join(directory, "started"));
|
|
43740
44271
|
if (!claim.isFile())
|
|
43741
44272
|
throw new Error("Claude Code pending Session claim is invalid");
|
|
43742
44273
|
started = true;
|
|
@@ -43749,7 +44280,7 @@ var ClaudePendingSessions = class {
|
|
|
43749
44280
|
async saveConfiguration(ref, cwd, configuration) {
|
|
43750
44281
|
await this.read(ref, cwd);
|
|
43751
44282
|
const directory = this.#path(ref, cwd);
|
|
43752
|
-
const temporary =
|
|
44283
|
+
const temporary = path9.join(directory, `${randomUUID2()}.tmp`);
|
|
43753
44284
|
try {
|
|
43754
44285
|
const file2 = await open(temporary, "wx", 384);
|
|
43755
44286
|
try {
|
|
@@ -43763,7 +44294,7 @@ var ClaudePendingSessions = class {
|
|
|
43763
44294
|
} finally {
|
|
43764
44295
|
await file2.close();
|
|
43765
44296
|
}
|
|
43766
|
-
await rename(temporary,
|
|
44297
|
+
await rename(temporary, path9.join(directory, "session.json"));
|
|
43767
44298
|
await this.#sync(directory);
|
|
43768
44299
|
} finally {
|
|
43769
44300
|
await rm3(temporary, { force: true });
|
|
@@ -43781,7 +44312,7 @@ var ClaudePendingSessions = class {
|
|
|
43781
44312
|
}
|
|
43782
44313
|
async claim(ref, cwd) {
|
|
43783
44314
|
await this.read(ref, cwd);
|
|
43784
|
-
const claim = await open(
|
|
44315
|
+
const claim = await open(path9.join(this.#path(ref, cwd), "started"), "wx", 384);
|
|
43785
44316
|
try {
|
|
43786
44317
|
await claim.sync();
|
|
43787
44318
|
} finally {
|
|
@@ -43791,7 +44322,7 @@ var ClaudePendingSessions = class {
|
|
|
43791
44322
|
}
|
|
43792
44323
|
/** Only the claim owner may release, after proven close and before submitting any native input. */
|
|
43793
44324
|
async release(ref, cwd) {
|
|
43794
|
-
await unlink(
|
|
44325
|
+
await unlink(path9.join(this.#path(ref, cwd), "started"));
|
|
43795
44326
|
await this.#sync(this.#path(ref, cwd));
|
|
43796
44327
|
}
|
|
43797
44328
|
async discard(ref, cwd) {
|
|
@@ -43800,11 +44331,11 @@ var ClaudePendingSessions = class {
|
|
|
43800
44331
|
};
|
|
43801
44332
|
|
|
43802
44333
|
// dist/claude-fork.js
|
|
43803
|
-
import
|
|
44334
|
+
import path11 from "node:path";
|
|
43804
44335
|
import { isDeepStrictEqual } from "node:util";
|
|
43805
44336
|
|
|
43806
44337
|
// dist/file-change.js
|
|
43807
|
-
import
|
|
44338
|
+
import path10 from "node:path";
|
|
43808
44339
|
var hunkSchema = external_exports.object({
|
|
43809
44340
|
oldStart: external_exports.number().int().nonnegative(),
|
|
43810
44341
|
oldLines: external_exports.number().int().nonnegative(),
|
|
@@ -43812,7 +44343,7 @@ var hunkSchema = external_exports.object({
|
|
|
43812
44343
|
newLines: external_exports.number().int().nonnegative(),
|
|
43813
44344
|
lines: external_exports.array(external_exports.string())
|
|
43814
44345
|
}).strict();
|
|
43815
|
-
function
|
|
44346
|
+
function isRecord4(value) {
|
|
43816
44347
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
43817
44348
|
}
|
|
43818
44349
|
function validNativePath(value) {
|
|
@@ -43836,7 +44367,7 @@ function validHunk(value) {
|
|
|
43836
44367
|
return hunk;
|
|
43837
44368
|
}
|
|
43838
44369
|
function parseClaudeNativeFileChange(toolName, value) {
|
|
43839
|
-
if (toolName !== "Edit" && toolName !== "Write" || !
|
|
44370
|
+
if (toolName !== "Edit" && toolName !== "Write" || !isRecord4(value))
|
|
43840
44371
|
return null;
|
|
43841
44372
|
if (!validNativePath(value.filePath) || !Array.isArray(value.structuredPatch))
|
|
43842
44373
|
return null;
|
|
@@ -43852,10 +44383,10 @@ function parseClaudeNativeFileChange(toolName, value) {
|
|
|
43852
44383
|
};
|
|
43853
44384
|
}
|
|
43854
44385
|
function displayPath(nativePath, cwd) {
|
|
43855
|
-
const resolvedCwd =
|
|
43856
|
-
const resolvedPath =
|
|
43857
|
-
const relative =
|
|
43858
|
-
const selected = relative.length > 0 && relative !== ".." && !relative.startsWith(`..${
|
|
44386
|
+
const resolvedCwd = path10.resolve(cwd);
|
|
44387
|
+
const resolvedPath = path10.isAbsolute(nativePath) ? path10.resolve(nativePath) : path10.resolve(cwd, nativePath);
|
|
44388
|
+
const relative = path10.relative(resolvedCwd, resolvedPath);
|
|
44389
|
+
const selected = relative.length > 0 && relative !== ".." && !relative.startsWith(`..${path10.sep}`) ? relative : resolvedPath;
|
|
43859
44390
|
const normalized = selected.replaceAll("\\", "/");
|
|
43860
44391
|
return validNativePath(normalized) && normalized !== "." ? normalized : null;
|
|
43861
44392
|
}
|
|
@@ -43867,7 +44398,7 @@ function projectClaudeFileChange(value, cwd) {
|
|
|
43867
44398
|
`@@ -${hunk.oldStart},${hunk.oldLines} +${hunk.newStart},${hunk.newLines} @@`,
|
|
43868
44399
|
...hunk.lines
|
|
43869
44400
|
]);
|
|
43870
|
-
const absoluteDisplayPath =
|
|
44401
|
+
const absoluteDisplayPath = path10.posix.isAbsolute(normalizedPath);
|
|
43871
44402
|
const oldHeader = value.kind === "add" ? "/dev/null" : absoluteDisplayPath ? normalizedPath : `a/${normalizedPath}`;
|
|
43872
44403
|
const newHeader = absoluteDisplayPath ? normalizedPath : `b/${normalizedPath}`;
|
|
43873
44404
|
const unifiedDiff = [`--- ${oldHeader}`, `+++ ${newHeader}`, ...body, ""].join("\n");
|
|
@@ -43881,7 +44412,7 @@ var CLAUDE_SUBAGENT_TOOLS = /* @__PURE__ */ new Set(["Agent", "Task", "SendMessa
|
|
|
43881
44412
|
var BACKGROUND_OUTPUT_FILE_PATTERN = /Output is being written to: (.+?\.output)\./u;
|
|
43882
44413
|
var SUBAGENT_DESCRIPTION_LIMIT = 500;
|
|
43883
44414
|
var SUBAGENT_SUMMARY_LIMIT = 2e3;
|
|
43884
|
-
function
|
|
44415
|
+
function isRecord5(value) {
|
|
43885
44416
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
43886
44417
|
}
|
|
43887
44418
|
function nativeUuid(message) {
|
|
@@ -43891,12 +44422,12 @@ function parentToolUseId(message) {
|
|
|
43891
44422
|
return typeof message.parent_tool_use_id === "string" && message.parent_tool_use_id.length > 0 ? message.parent_tool_use_id : null;
|
|
43892
44423
|
}
|
|
43893
44424
|
function assistantNativeMessageId(message) {
|
|
43894
|
-
if (!
|
|
44425
|
+
if (!isRecord5(message.message))
|
|
43895
44426
|
return null;
|
|
43896
44427
|
return typeof message.message.id === "string" && message.message.id.length > 0 ? message.message.id : null;
|
|
43897
44428
|
}
|
|
43898
44429
|
function assistantContent(message) {
|
|
43899
|
-
if (message.type !== "assistant" || !
|
|
44430
|
+
if (message.type !== "assistant" || !isRecord5(message.message))
|
|
43900
44431
|
return null;
|
|
43901
44432
|
return Array.isArray(message.message.content) ? message.message.content : null;
|
|
43902
44433
|
}
|
|
@@ -43904,10 +44435,10 @@ function assistantText(message) {
|
|
|
43904
44435
|
const content = assistantContent(message);
|
|
43905
44436
|
if (!content)
|
|
43906
44437
|
return null;
|
|
43907
|
-
return content.flatMap((block) =>
|
|
44438
|
+
return content.flatMap((block) => isRecord5(block) && block.type === "text" && typeof block.text === "string" ? [block.text] : []).join("");
|
|
43908
44439
|
}
|
|
43909
44440
|
function assistantError(message) {
|
|
43910
|
-
return
|
|
44441
|
+
return isRecord5(message) && message.type === "assistant" && typeof message.error === "string" ? message.error : null;
|
|
43911
44442
|
}
|
|
43912
44443
|
function boundedString(value, limit) {
|
|
43913
44444
|
if (typeof value !== "string")
|
|
@@ -43918,25 +44449,25 @@ function boundedString(value, limit) {
|
|
|
43918
44449
|
return trimmed.slice(0, limit);
|
|
43919
44450
|
}
|
|
43920
44451
|
function subagentDescription(argumentsValue, toolName) {
|
|
43921
|
-
if (!
|
|
44452
|
+
if (!isRecord5(argumentsValue))
|
|
43922
44453
|
return `${toolName} delegation`;
|
|
43923
44454
|
return boundedString(argumentsValue.description, SUBAGENT_DESCRIPTION_LIMIT) ?? boundedString(argumentsValue.summary, SUBAGENT_DESCRIPTION_LIMIT) ?? boundedString(argumentsValue.name, SUBAGENT_DESCRIPTION_LIMIT) ?? `${toolName} delegation`;
|
|
43924
44455
|
}
|
|
43925
44456
|
function subagentPrompt(argumentsValue) {
|
|
43926
|
-
if (!
|
|
44457
|
+
if (!isRecord5(argumentsValue))
|
|
43927
44458
|
return void 0;
|
|
43928
44459
|
return boundedString(argumentsValue.prompt ?? argumentsValue.message, SUBAGENT_SUMMARY_LIMIT);
|
|
43929
44460
|
}
|
|
43930
44461
|
function subagentRole(argumentsValue) {
|
|
43931
|
-
if (!
|
|
44462
|
+
if (!isRecord5(argumentsValue))
|
|
43932
44463
|
return void 0;
|
|
43933
44464
|
return boundedString(argumentsValue.subagent_type ?? argumentsValue.agent_type, SUBAGENT_DESCRIPTION_LIMIT);
|
|
43934
44465
|
}
|
|
43935
44466
|
function subagentBackground(argumentsValue) {
|
|
43936
|
-
return
|
|
44467
|
+
return isRecord5(argumentsValue) && argumentsValue.run_in_background === true;
|
|
43937
44468
|
}
|
|
43938
44469
|
function targetedSubagentId(argumentsValue) {
|
|
43939
|
-
if (!
|
|
44470
|
+
if (!isRecord5(argumentsValue))
|
|
43940
44471
|
return void 0;
|
|
43941
44472
|
return boundedString(argumentsValue.to ?? argumentsValue.recipient ?? argumentsValue.agentId, SUBAGENT_DESCRIPTION_LIMIT);
|
|
43942
44473
|
}
|
|
@@ -43953,11 +44484,11 @@ function finiteNonNegativeNumber(value) {
|
|
|
43953
44484
|
return typeof value === "number" && Number.isFinite(value) && value >= 0;
|
|
43954
44485
|
}
|
|
43955
44486
|
function parseResultModelUsage(value) {
|
|
43956
|
-
if (!
|
|
44487
|
+
if (!isRecord5(value))
|
|
43957
44488
|
return void 0;
|
|
43958
44489
|
const usage = [];
|
|
43959
44490
|
for (const entry of Object.values(value)) {
|
|
43960
|
-
if (!
|
|
44491
|
+
if (!isRecord5(entry) || !safeNonNegativeInteger(entry.inputTokens) || !safeNonNegativeInteger(entry.outputTokens)) {
|
|
43961
44492
|
return void 0;
|
|
43962
44493
|
}
|
|
43963
44494
|
usage.push({
|
|
@@ -43972,7 +44503,7 @@ function parseResultModelUsage(value) {
|
|
|
43972
44503
|
return usage;
|
|
43973
44504
|
}
|
|
43974
44505
|
function parseLastRequestUsage(value, attribution = {}) {
|
|
43975
|
-
if (!
|
|
44506
|
+
if (!isRecord5(value))
|
|
43976
44507
|
return void 0;
|
|
43977
44508
|
const inputTokens = value.input_tokens;
|
|
43978
44509
|
const outputTokens = value.output_tokens;
|
|
@@ -43982,11 +44513,11 @@ function parseLastRequestUsage(value, attribution = {}) {
|
|
|
43982
44513
|
return void 0;
|
|
43983
44514
|
}
|
|
43984
44515
|
const requestId = boundedString(attribution.requestId, 500);
|
|
43985
|
-
const
|
|
44516
|
+
const model2 = boundedString(attribution.model, 500);
|
|
43986
44517
|
const provider = boundedString(attribution.provider, 100);
|
|
43987
44518
|
return {
|
|
43988
44519
|
...requestId ? { requestId } : {},
|
|
43989
|
-
...
|
|
44520
|
+
...model2 ? { model: model2 } : {},
|
|
43990
44521
|
...provider ? { provider } : {},
|
|
43991
44522
|
inputTokens,
|
|
43992
44523
|
outputTokens,
|
|
@@ -43995,7 +44526,7 @@ function parseLastRequestUsage(value, attribution = {}) {
|
|
|
43995
44526
|
};
|
|
43996
44527
|
}
|
|
43997
44528
|
function assistantRequestUsage(message, provider) {
|
|
43998
|
-
if (!
|
|
44529
|
+
if (!isRecord5(message.message))
|
|
43999
44530
|
return void 0;
|
|
44000
44531
|
return parseLastRequestUsage(message.message.usage, {
|
|
44001
44532
|
requestId: message.message.id ?? message.request_id,
|
|
@@ -44018,7 +44549,7 @@ function parseResultUsageEvent(message) {
|
|
|
44018
44549
|
};
|
|
44019
44550
|
}
|
|
44020
44551
|
function parsePlanLimitWindow(value) {
|
|
44021
|
-
if (!
|
|
44552
|
+
if (!isRecord5(value))
|
|
44022
44553
|
return void 0;
|
|
44023
44554
|
const utilization = value.utilization;
|
|
44024
44555
|
if (typeof utilization !== "number" || !Number.isFinite(utilization) || utilization < 0) {
|
|
@@ -44030,12 +44561,12 @@ function parsePlanLimitWindow(value) {
|
|
|
44030
44561
|
return { utilizationPercent, ...resetsAtUnix !== void 0 ? { resetsAtUnix } : {} };
|
|
44031
44562
|
}
|
|
44032
44563
|
function parseClaudePlanLimitEvent(message) {
|
|
44033
|
-
if (!
|
|
44564
|
+
if (!isRecord5(message) || message.type !== "rate_limit_event")
|
|
44034
44565
|
return null;
|
|
44035
44566
|
const info = message.rate_limit_info;
|
|
44036
|
-
if (!
|
|
44567
|
+
if (!isRecord5(info))
|
|
44037
44568
|
return null;
|
|
44038
|
-
const windows =
|
|
44569
|
+
const windows = isRecord5(info.unifiedWindows) ? info.unifiedWindows : void 0;
|
|
44039
44570
|
let fiveHour = parsePlanLimitWindow(windows?.five_hour);
|
|
44040
44571
|
let sevenDay = parsePlanLimitWindow(windows?.seven_day);
|
|
44041
44572
|
if (!fiveHour && !sevenDay) {
|
|
@@ -44053,7 +44584,7 @@ function parseClaudePlanLimitEvent(message) {
|
|
|
44053
44584
|
};
|
|
44054
44585
|
}
|
|
44055
44586
|
function nativeSubagentId(nativeResult, outputText) {
|
|
44056
|
-
if (
|
|
44587
|
+
if (isRecord5(nativeResult)) {
|
|
44057
44588
|
const structured = boundedString(nativeResult.agentId ?? nativeResult.agent_id ?? nativeResult.task_id, SUBAGENT_DESCRIPTION_LIMIT);
|
|
44058
44589
|
if (structured)
|
|
44059
44590
|
return structured;
|
|
@@ -44061,7 +44592,7 @@ function nativeSubagentId(nativeResult, outputText) {
|
|
|
44061
44592
|
return boundedString(/agentId:\s*([A-Za-z0-9_-]+)/u.exec(outputText ?? "")?.[1], SUBAGENT_DESCRIPTION_LIMIT);
|
|
44062
44593
|
}
|
|
44063
44594
|
function subagentContinuesInBackground(nativeResult, outputText) {
|
|
44064
|
-
if (
|
|
44595
|
+
if (isRecord5(nativeResult)) {
|
|
44065
44596
|
if (nativeResult.isAsync === true || nativeResult.is_async === true)
|
|
44066
44597
|
return true;
|
|
44067
44598
|
if (nativeResult.status === "async_launched")
|
|
@@ -44070,15 +44601,15 @@ function subagentContinuesInBackground(nativeResult, outputText) {
|
|
|
44070
44601
|
return outputText?.includes("The agent is working in the background.") ?? false;
|
|
44071
44602
|
}
|
|
44072
44603
|
function resultText(content, nativeResult) {
|
|
44073
|
-
let
|
|
44604
|
+
let text2 = "";
|
|
44074
44605
|
if (typeof content === "string") {
|
|
44075
|
-
|
|
44606
|
+
text2 = content;
|
|
44076
44607
|
} else if (Array.isArray(content)) {
|
|
44077
|
-
|
|
44608
|
+
text2 = content.flatMap((block) => isRecord5(block) && block.type === "text" && typeof block.text === "string" ? [block.text] : []).join("");
|
|
44078
44609
|
}
|
|
44079
|
-
if (
|
|
44080
|
-
return
|
|
44081
|
-
if (!
|
|
44610
|
+
if (text2.length > 0)
|
|
44611
|
+
return text2;
|
|
44612
|
+
if (!isRecord5(nativeResult))
|
|
44082
44613
|
return void 0;
|
|
44083
44614
|
const stdout = typeof nativeResult.stdout === "string" ? nativeResult.stdout : "";
|
|
44084
44615
|
const stderr = typeof nativeResult.stderr === "string" ? nativeResult.stderr : "";
|
|
@@ -44090,13 +44621,13 @@ function userMessageText(content) {
|
|
|
44090
44621
|
return content;
|
|
44091
44622
|
if (!Array.isArray(content))
|
|
44092
44623
|
return null;
|
|
44093
|
-
const
|
|
44094
|
-
return
|
|
44624
|
+
const text2 = content.flatMap((block) => isRecord5(block) && block.type === "text" && typeof block.text === "string" ? [block.text] : []).join("");
|
|
44625
|
+
return text2.length > 0 ? text2 : null;
|
|
44095
44626
|
}
|
|
44096
44627
|
function parseClaudeTaskNotification(message) {
|
|
44097
|
-
if (!
|
|
44628
|
+
if (!isRecord5(message) || message.type !== "user" || !isRecord5(message.message))
|
|
44098
44629
|
return null;
|
|
44099
|
-
if (
|
|
44630
|
+
if (isRecord5(message.origin) && message.origin.kind !== "task-notification")
|
|
44100
44631
|
return null;
|
|
44101
44632
|
const content = userMessageText(message.message.content);
|
|
44102
44633
|
if (!content || !content.includes("<task-notification>"))
|
|
@@ -44156,8 +44687,9 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44156
44687
|
requestCancel() {
|
|
44157
44688
|
this.#cancelRequested = true;
|
|
44158
44689
|
}
|
|
44690
|
+
#usageRequest = null;
|
|
44159
44691
|
consume(message) {
|
|
44160
|
-
if (this.#completed || !
|
|
44692
|
+
if (this.#completed || !isRecord5(message))
|
|
44161
44693
|
return { events: [] };
|
|
44162
44694
|
const events = [];
|
|
44163
44695
|
this.#consumeSegmentLevel(message, events);
|
|
@@ -44171,9 +44703,11 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44171
44703
|
this.#consumeCompaction(message, events);
|
|
44172
44704
|
this.#consumeLocalCommandOutput(message, events);
|
|
44173
44705
|
}
|
|
44174
|
-
if (message.type === "stream_event" &&
|
|
44175
|
-
if (!nested)
|
|
44706
|
+
if (message.type === "stream_event" && isRecord5(message.event)) {
|
|
44707
|
+
if (!nested) {
|
|
44708
|
+
this.#observeUsage(message.event, events);
|
|
44176
44709
|
this.#consumeStreamEvent(message, events);
|
|
44710
|
+
}
|
|
44177
44711
|
} else if (message.type === "tool_progress") {
|
|
44178
44712
|
this.#consumeToolProgress(message, events);
|
|
44179
44713
|
}
|
|
@@ -44191,6 +44725,10 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44191
44725
|
}
|
|
44192
44726
|
if (message.type !== "result")
|
|
44193
44727
|
return { events };
|
|
44728
|
+
if (this.#usageRequest) {
|
|
44729
|
+
this.#usageRequest = null;
|
|
44730
|
+
events.push({ type: "usage.request", record: { kind: "missing" } });
|
|
44731
|
+
}
|
|
44194
44732
|
const usageEvent = parseResultUsageEvent(message);
|
|
44195
44733
|
if (usageEvent)
|
|
44196
44734
|
events.push(usageEvent);
|
|
@@ -44278,7 +44816,7 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44278
44816
|
if (message.subtype !== "background_tasks_changed" || !Array.isArray(message.tasks))
|
|
44279
44817
|
return;
|
|
44280
44818
|
const nativeSubagentIds = message.tasks.flatMap((task) => {
|
|
44281
|
-
if (!
|
|
44819
|
+
if (!isRecord5(task))
|
|
44282
44820
|
return [];
|
|
44283
44821
|
const taskId = boundedString(task.task_id, SUBAGENT_DESCRIPTION_LIMIT);
|
|
44284
44822
|
return taskId ? [taskId] : [];
|
|
@@ -44340,7 +44878,7 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44340
44878
|
});
|
|
44341
44879
|
return;
|
|
44342
44880
|
}
|
|
44343
|
-
if (message.subtype === "task_updated" &&
|
|
44881
|
+
if (message.subtype === "task_updated" && isRecord5(message.patch)) {
|
|
44344
44882
|
const status = taskStatus(message.patch.status);
|
|
44345
44883
|
if (!status)
|
|
44346
44884
|
return;
|
|
@@ -44357,16 +44895,45 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44357
44895
|
});
|
|
44358
44896
|
}
|
|
44359
44897
|
}
|
|
44898
|
+
/**
|
|
44899
|
+
* Meters each root model request from the Anthropic stream: `message_start` names it and
|
|
44900
|
+
* carries input and cache counts, the first `content_block_start` is its first output token,
|
|
44901
|
+
* `message_delta` carries the final counts and `message_stop` completes it.
|
|
44902
|
+
*/
|
|
44903
|
+
#observeUsage(event, events) {
|
|
44904
|
+
if (event.type === "message_start") {
|
|
44905
|
+
const message = isRecord5(event.message) ? event.message : null;
|
|
44906
|
+
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;
|
|
44907
|
+
return;
|
|
44908
|
+
}
|
|
44909
|
+
const request = this.#usageRequest;
|
|
44910
|
+
if (!request)
|
|
44911
|
+
return;
|
|
44912
|
+
if (event.type === "content_block_start") {
|
|
44913
|
+
request.startedAtMs ??= Date.now();
|
|
44914
|
+
} else if (event.type === "message_delta" && isRecord5(event.usage)) {
|
|
44915
|
+
request.usage = { ...isRecord5(request.usage) ? request.usage : {}, ...event.usage };
|
|
44916
|
+
} else if (event.type === "message_stop") {
|
|
44917
|
+
this.#usageRequest = null;
|
|
44918
|
+
events.push({
|
|
44919
|
+
type: "usage.request",
|
|
44920
|
+
record: claudeUsageRecord(request.id, request.model, request.usage, {
|
|
44921
|
+
startedAtMs: request.startedAtMs,
|
|
44922
|
+
completedAtMs: Date.now()
|
|
44923
|
+
})
|
|
44924
|
+
});
|
|
44925
|
+
}
|
|
44926
|
+
}
|
|
44360
44927
|
#consumeStreamEvent(message, events) {
|
|
44361
44928
|
const event = message.event;
|
|
44362
|
-
if (!
|
|
44929
|
+
if (!isRecord5(event))
|
|
44363
44930
|
return;
|
|
44364
|
-
if (event.type === "message_start" &&
|
|
44931
|
+
if (event.type === "message_start" && isRecord5(event.message) && typeof event.message.id === "string" && event.message.id.length > 0) {
|
|
44365
44932
|
this.#activeRootStreamMessageId = event.message.id;
|
|
44366
44933
|
this.#messageState(event.message.id);
|
|
44367
44934
|
return;
|
|
44368
44935
|
}
|
|
44369
|
-
if (event.type !== "content_block_delta" || !
|
|
44936
|
+
if (event.type !== "content_block_delta" || !isRecord5(event.delta))
|
|
44370
44937
|
return;
|
|
44371
44938
|
const messageId = this.#activeRootStreamMessageId ?? nativeUuid(message) ?? this.#nextMessageId();
|
|
44372
44939
|
if (!this.#activeRootStreamMessageId)
|
|
@@ -44442,7 +45009,7 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44442
45009
|
}
|
|
44443
45010
|
#consumeToolUseBlocks(message, events, ignoreKnownIds) {
|
|
44444
45011
|
for (const block of assistantContent(message) ?? []) {
|
|
44445
|
-
if (!
|
|
45012
|
+
if (!isRecord5(block) || block.type !== "tool_use")
|
|
44446
45013
|
continue;
|
|
44447
45014
|
const argumentsResult = jsonValueSchema.safeParse(block.input);
|
|
44448
45015
|
if (typeof block.id !== "string" || block.id.length === 0 || typeof block.name !== "string" || block.name.length === 0 || !argumentsResult.success) {
|
|
@@ -44494,9 +45061,9 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44494
45061
|
events.push(settled);
|
|
44495
45062
|
}
|
|
44496
45063
|
#consumeToolResults(message, events, ignoreUnknown) {
|
|
44497
|
-
if (!
|
|
45064
|
+
if (!isRecord5(message.message) || !Array.isArray(message.message.content))
|
|
44498
45065
|
return;
|
|
44499
|
-
const resultBlocks = message.message.content.filter((block) =>
|
|
45066
|
+
const resultBlocks = message.message.content.filter((block) => isRecord5(block) && block.type === "tool_result");
|
|
44500
45067
|
if (resultBlocks.length === 0)
|
|
44501
45068
|
return;
|
|
44502
45069
|
if (resultBlocks.length > 1 && message.tool_use_result !== void 0) {
|
|
@@ -44538,7 +45105,7 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
44538
45105
|
continue;
|
|
44539
45106
|
}
|
|
44540
45107
|
const fileChange = isError ? null : parseClaudeNativeFileChange(tool.name, nativeResult);
|
|
44541
|
-
const backgroundTaskId = tool.name === "Bash" && !isError &&
|
|
45108
|
+
const backgroundTaskId = tool.name === "Bash" && !isError && isRecord5(nativeResult) && typeof nativeResult.backgroundTaskId === "string" && nativeResult.backgroundTaskId.length > 0 ? nativeResult.backgroundTaskId : void 0;
|
|
44542
45109
|
const outputFile = backgroundTaskId !== void 0 ? BACKGROUND_OUTPUT_FILE_PATTERN.exec(outputText ?? "")?.[1] : void 0;
|
|
44543
45110
|
const backgroundOutputFile = typeof outputFile === "string" && outputFile.length > 0 ? outputFile : void 0;
|
|
44544
45111
|
events.push({
|
|
@@ -44575,7 +45142,7 @@ function claudeTranscriptItemId(nativeTurnKey, kind, ordinal) {
|
|
|
44575
45142
|
|
|
44576
45143
|
// dist/claude-history.js
|
|
44577
45144
|
var claudeCodeHarnessId = harnessIdSchema.parse("claude-code");
|
|
44578
|
-
function
|
|
45145
|
+
function isRecord6(value) {
|
|
44579
45146
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
44580
45147
|
}
|
|
44581
45148
|
function isoToMs(value) {
|
|
@@ -44605,12 +45172,12 @@ function textParts(value) {
|
|
|
44605
45172
|
return value.length > 0 ? [value] : [];
|
|
44606
45173
|
if (!Array.isArray(value))
|
|
44607
45174
|
return [];
|
|
44608
|
-
return value.flatMap((part) =>
|
|
45175
|
+
return value.flatMap((part) => isRecord6(part) && part.type === "text" && typeof part.text === "string" ? [part.text] : []);
|
|
44609
45176
|
}
|
|
44610
45177
|
function thinkingParts(value) {
|
|
44611
45178
|
if (!Array.isArray(value))
|
|
44612
45179
|
return [];
|
|
44613
|
-
return value.flatMap((part) =>
|
|
45180
|
+
return value.flatMap((part) => isRecord6(part) && part.type === "thinking" && typeof part.thinking === "string" ? [part.thinking] : []);
|
|
44614
45181
|
}
|
|
44615
45182
|
var localCommandRecordPattern = /^\s*<(local-command-(?:stdout|caveat))>[\s\S]*<\/\1>\s*$/u;
|
|
44616
45183
|
var taskNotificationRecordPattern = /^\s*<task-notification>[\s\S]*<\/task-notification>\s*$/u;
|
|
@@ -44619,33 +45186,33 @@ var controlCommandNamePattern = /<command-name>\s*\/(?:model|compact)\s*<\/comma
|
|
|
44619
45186
|
var recapCommandNamePattern = /<command-name>\s*\/recap\s*<\/command-name>/u;
|
|
44620
45187
|
var initCommandNamePattern = /<command-name>\s*\/init\s*<\/command-name>/u;
|
|
44621
45188
|
var localCommandStdoutPattern = /^\s*<local-command-stdout>([\s\S]*)<\/local-command-stdout>\s*$/u;
|
|
44622
|
-
function isLocalCommandRecord(
|
|
44623
|
-
return localCommandRecordPattern.test(
|
|
45189
|
+
function isLocalCommandRecord(text2) {
|
|
45190
|
+
return localCommandRecordPattern.test(text2);
|
|
44624
45191
|
}
|
|
44625
|
-
function isTaskNotificationRecord(
|
|
44626
|
-
return taskNotificationRecordPattern.test(
|
|
45192
|
+
function isTaskNotificationRecord(text2) {
|
|
45193
|
+
return taskNotificationRecordPattern.test(text2);
|
|
44627
45194
|
}
|
|
44628
|
-
function isControlCommandEnvelope(
|
|
44629
|
-
return commandEnvelopePattern.test(
|
|
45195
|
+
function isControlCommandEnvelope(text2) {
|
|
45196
|
+
return commandEnvelopePattern.test(text2) && controlCommandNamePattern.test(text2);
|
|
44630
45197
|
}
|
|
44631
|
-
function isNamedCommandEnvelope(
|
|
44632
|
-
return commandEnvelopePattern.test(
|
|
45198
|
+
function isNamedCommandEnvelope(text2, namePattern) {
|
|
45199
|
+
return commandEnvelopePattern.test(text2) && namePattern.test(text2);
|
|
44633
45200
|
}
|
|
44634
|
-
function displayedUserText(
|
|
44635
|
-
if (isNamedCommandEnvelope(
|
|
45201
|
+
function displayedUserText(text2) {
|
|
45202
|
+
if (isNamedCommandEnvelope(text2, initCommandNamePattern))
|
|
44636
45203
|
return "/init";
|
|
44637
|
-
if (isNamedCommandEnvelope(
|
|
45204
|
+
if (isNamedCommandEnvelope(text2, recapCommandNamePattern))
|
|
44638
45205
|
return "/recap";
|
|
44639
|
-
return
|
|
45206
|
+
return text2;
|
|
44640
45207
|
}
|
|
44641
|
-
function localCommandStdoutText(
|
|
44642
|
-
const match = localCommandStdoutPattern.exec(
|
|
45208
|
+
function localCommandStdoutText(text2) {
|
|
45209
|
+
const match = localCommandStdoutPattern.exec(text2);
|
|
44643
45210
|
if (!match)
|
|
44644
45211
|
return null;
|
|
44645
45212
|
return match[1] ?? "";
|
|
44646
45213
|
}
|
|
44647
45214
|
function isTaskNotificationOrigin(value) {
|
|
44648
|
-
return
|
|
45215
|
+
return isRecord6(value.origin) && value.origin.kind === "task-notification";
|
|
44649
45216
|
}
|
|
44650
45217
|
function visibleUserTextParts(message) {
|
|
44651
45218
|
if (message.type !== "user" || message.syntheticUser)
|
|
@@ -44656,24 +45223,24 @@ function visibleUserTextParts(message) {
|
|
|
44656
45223
|
return parts.filter((part) => !isLocalCommandRecord(part) && !isTaskNotificationRecord(part));
|
|
44657
45224
|
}
|
|
44658
45225
|
function isInterruptionRecord(value, promptId) {
|
|
44659
|
-
if (value.type !== "user" || promptId === null || value.promptId !== promptId || value.promptSource !== void 0 || !
|
|
45226
|
+
if (value.type !== "user" || promptId === null || value.promptId !== promptId || value.promptSource !== void 0 || !isRecord6(value.message))
|
|
44660
45227
|
return false;
|
|
44661
45228
|
const content = value.message.content;
|
|
44662
45229
|
if (!Array.isArray(content) || content.length !== 1)
|
|
44663
45230
|
return false;
|
|
44664
45231
|
const part = content[0];
|
|
44665
|
-
return
|
|
45232
|
+
return isRecord6(part) && part.type === "text" && (part.text === "[Request interrupted by user]" || part.text === "[Request interrupted by user for tool use]");
|
|
44666
45233
|
}
|
|
44667
45234
|
function conversationMessages(values, sessionId) {
|
|
44668
45235
|
const messages = [];
|
|
44669
45236
|
const ids = /* @__PURE__ */ new Set();
|
|
44670
45237
|
let promptId = null;
|
|
44671
45238
|
for (const value of values) {
|
|
44672
|
-
if (!
|
|
45239
|
+
if (!isRecord6(value))
|
|
44673
45240
|
throw new Error("Claude history contains a malformed message");
|
|
44674
45241
|
if (value.type === "system")
|
|
44675
45242
|
continue;
|
|
44676
|
-
if (value.type !== "user" && value.type !== "assistant" || typeof value.uuid !== "string" || value.uuid.length === 0 || value.session_id !== sessionId || !
|
|
45243
|
+
if (value.type !== "user" && value.type !== "assistant" || typeof value.uuid !== "string" || value.uuid.length === 0 || value.session_id !== sessionId || !isRecord6(value.message) || value.message.role !== value.type) {
|
|
44677
45244
|
throw new Error("Claude history contains an invalid message identity");
|
|
44678
45245
|
}
|
|
44679
45246
|
if (ids.has(value.uuid))
|
|
@@ -44772,14 +45339,14 @@ function mapClaudeSnapshot(values, sessionId) {
|
|
|
44772
45339
|
} : {},
|
|
44773
45340
|
...startedAtMs !== void 0 ? { startedAtMs } : {},
|
|
44774
45341
|
...completedAtMs !== void 0 ? { completedAtMs } : {},
|
|
44775
|
-
input: visibleUserTextParts(user).map((
|
|
45342
|
+
input: visibleUserTextParts(user).map((text2) => ({
|
|
44776
45343
|
type: "text",
|
|
44777
|
-
text: displayedUserText(
|
|
45344
|
+
text: displayedUserText(text2)
|
|
44778
45345
|
})),
|
|
44779
45346
|
items: turnMessages.flatMap((message) => {
|
|
44780
45347
|
const recordDurationMs = durationsMs.get(message.uuid);
|
|
44781
45348
|
if (message.type === "user") {
|
|
44782
|
-
const recapOutput = visibleUserTextParts(user).some((
|
|
45349
|
+
const recapOutput = visibleUserTextParts(user).some((text3) => isNamedCommandEnvelope(text3, recapCommandNamePattern)) ? textParts(message.message.content).map(localCommandStdoutText).find((text3) => text3 !== null && text3.length > 0) : void 0;
|
|
44783
45350
|
if (!recapOutput)
|
|
44784
45351
|
return [];
|
|
44785
45352
|
return [
|
|
@@ -44797,15 +45364,15 @@ function mapClaudeSnapshot(values, sessionId) {
|
|
|
44797
45364
|
if (message.type !== "assistant")
|
|
44798
45365
|
return [];
|
|
44799
45366
|
const content = message.message.content;
|
|
44800
|
-
const
|
|
45367
|
+
const text2 = textParts(content).join("");
|
|
44801
45368
|
const reasoning = thinkingParts(content).join("");
|
|
44802
45369
|
if (!Array.isArray(content)) {
|
|
44803
|
-
return
|
|
45370
|
+
return text2.length > 0 ? [
|
|
44804
45371
|
{
|
|
44805
45372
|
item: {
|
|
44806
45373
|
type: "agentMessage",
|
|
44807
45374
|
itemId: claudeTranscriptItemId(user.uuid, "agentMessage", agentMessageOrdinal += 1),
|
|
44808
|
-
text,
|
|
45375
|
+
text: text2,
|
|
44809
45376
|
...recordDurationMs !== void 0 ? { durationMs: recordDurationMs } : {}
|
|
44810
45377
|
},
|
|
44811
45378
|
outcome: itemOutcome(outcome)
|
|
@@ -44816,7 +45383,7 @@ function mapClaudeSnapshot(values, sessionId) {
|
|
|
44816
45383
|
let projectedReasoning = false;
|
|
44817
45384
|
let projectedText = false;
|
|
44818
45385
|
for (const [blockIndex, block] of content.entries()) {
|
|
44819
|
-
if (!
|
|
45386
|
+
if (!isRecord6(block))
|
|
44820
45387
|
continue;
|
|
44821
45388
|
if (block.type === "thinking" && !projectedReasoning && reasoning.length > 0) {
|
|
44822
45389
|
items.push({
|
|
@@ -44831,12 +45398,12 @@ function mapClaudeSnapshot(values, sessionId) {
|
|
|
44831
45398
|
projectedReasoning = true;
|
|
44832
45399
|
continue;
|
|
44833
45400
|
}
|
|
44834
|
-
if (block.type === "text" && !projectedText &&
|
|
45401
|
+
if (block.type === "text" && !projectedText && text2.length > 0) {
|
|
44835
45402
|
items.push({
|
|
44836
45403
|
item: {
|
|
44837
45404
|
type: "agentMessage",
|
|
44838
45405
|
itemId: claudeTranscriptItemId(user.uuid, "agentMessage", agentMessageOrdinal += 1),
|
|
44839
|
-
text,
|
|
45406
|
+
text: text2,
|
|
44840
45407
|
...recordDurationMs !== void 0 ? { durationMs: recordDurationMs } : {}
|
|
44841
45408
|
},
|
|
44842
45409
|
outcome: itemOutcome(outcome)
|
|
@@ -44863,7 +45430,7 @@ function mapClaudeSnapshot(values, sessionId) {
|
|
|
44863
45430
|
}
|
|
44864
45431
|
} : { status: "succeeded" };
|
|
44865
45432
|
const itemId = toolItem !== null ? claudeTranscriptItemId(user.uuid, "tool", toolItem) : hostItemIdSchema.parse(`claude-item-v1-${message.uuid}-tool-${blockIndex}`);
|
|
44866
|
-
if (block.name === "Bash" &&
|
|
45433
|
+
if (block.name === "Bash" && isRecord6(block.input) && typeof block.input.command === "string") {
|
|
44867
45434
|
items.push({
|
|
44868
45435
|
item: {
|
|
44869
45436
|
type: "commandExecution",
|
|
@@ -44903,7 +45470,7 @@ function toolResultBlocks(messages) {
|
|
|
44903
45470
|
if (message.type !== "user" || !Array.isArray(message.message.content))
|
|
44904
45471
|
continue;
|
|
44905
45472
|
for (const block of message.message.content) {
|
|
44906
|
-
if (
|
|
45473
|
+
if (isRecord6(block) && block.type === "tool_result" && typeof block.tool_use_id === "string") {
|
|
44907
45474
|
results.set(block.tool_use_id, { block, timestampMs: message.timestampMs });
|
|
44908
45475
|
}
|
|
44909
45476
|
}
|
|
@@ -44913,12 +45480,12 @@ function toolResultBlocks(messages) {
|
|
|
44913
45480
|
function toolResultOutput(block) {
|
|
44914
45481
|
if (!block)
|
|
44915
45482
|
return void 0;
|
|
44916
|
-
const
|
|
44917
|
-
return
|
|
45483
|
+
const text2 = textParts(block.content).join("");
|
|
45484
|
+
return text2.length > 0 ? text2 : void 0;
|
|
44918
45485
|
}
|
|
44919
45486
|
function resultSubagentId(value, block) {
|
|
44920
45487
|
const nativeResult = value.tool_use_result;
|
|
44921
|
-
if (
|
|
45488
|
+
if (isRecord6(nativeResult)) {
|
|
44922
45489
|
const structured = nativeResult.agentId ?? nativeResult.agent_id ?? nativeResult.task_id;
|
|
44923
45490
|
if (typeof structured === "string" && structured.length > 0)
|
|
44924
45491
|
return structured;
|
|
@@ -44929,13 +45496,13 @@ function resultSubagentId(value, block) {
|
|
|
44929
45496
|
function subagentPrompt2(values, nativeSubagentId2) {
|
|
44930
45497
|
const toolUses = /* @__PURE__ */ new Map();
|
|
44931
45498
|
for (const value of values) {
|
|
44932
|
-
if (!
|
|
45499
|
+
if (!isRecord6(value) || !isRecord6(value.message) || !Array.isArray(value.message.content)) {
|
|
44933
45500
|
continue;
|
|
44934
45501
|
}
|
|
44935
45502
|
for (const block of value.message.content) {
|
|
44936
|
-
if (!
|
|
45503
|
+
if (!isRecord6(block))
|
|
44937
45504
|
continue;
|
|
44938
|
-
if (block.type === "tool_use" && typeof block.id === "string" && (block.name === "Agent" || block.name === "Task") &&
|
|
45505
|
+
if (block.type === "tool_use" && typeof block.id === "string" && (block.name === "Agent" || block.name === "Task") && isRecord6(block.input) && typeof block.input.prompt === "string" && block.input.prompt.length > 0) {
|
|
44939
45506
|
toolUses.set(block.id, block.input.prompt);
|
|
44940
45507
|
continue;
|
|
44941
45508
|
}
|
|
@@ -44949,7 +45516,7 @@ function subagentPrompt2(values, nativeSubagentId2) {
|
|
|
44949
45516
|
return void 0;
|
|
44950
45517
|
}
|
|
44951
45518
|
function mapClaudeSubagentSnapshot(values, parentSessionId, nativeSubagentId2, parentValues = []) {
|
|
44952
|
-
const messages = conversationMessages(values.map((value) =>
|
|
45519
|
+
const messages = conversationMessages(values.map((value) => isRecord6(value) ? { ...value, session_id: parentSessionId } : value), parentSessionId);
|
|
44953
45520
|
const durationsMs = recordDurationsMs(messages);
|
|
44954
45521
|
const turns = [];
|
|
44955
45522
|
for (let index = 0; index < messages.length; ) {
|
|
@@ -44980,7 +45547,7 @@ function mapClaudeSubagentSnapshot(values, parentSessionId, nativeSubagentId2, p
|
|
|
44980
45547
|
const content = Array.isArray(message.message.content) ? message.message.content : [{ type: "text", text: message.message.content }];
|
|
44981
45548
|
for (let blockIndex = 0; blockIndex < content.length; blockIndex += 1) {
|
|
44982
45549
|
const block = content[blockIndex];
|
|
44983
|
-
if (!
|
|
45550
|
+
if (!isRecord6(block))
|
|
44984
45551
|
continue;
|
|
44985
45552
|
const itemId = hostItemIdSchema.parse(`claude-subagent-item-v2-${nativeSubagentId2}-${message.uuid}-${blockIndex}`);
|
|
44986
45553
|
if (block.type === "thinking" && typeof block.thinking === "string") {
|
|
@@ -45028,7 +45595,7 @@ function mapClaudeSubagentSnapshot(values, parentSessionId, nativeSubagentId2, p
|
|
|
45028
45595
|
retryable: false
|
|
45029
45596
|
}
|
|
45030
45597
|
} : { status: "succeeded" };
|
|
45031
|
-
if (block.name === "Bash" &&
|
|
45598
|
+
if (block.name === "Bash" && isRecord6(block.input) && typeof block.input.command === "string") {
|
|
45032
45599
|
items.push({
|
|
45033
45600
|
item: {
|
|
45034
45601
|
type: "commandExecution",
|
|
@@ -45074,7 +45641,7 @@ function mapClaudeSubagentSnapshot(values, parentSessionId, nativeSubagentId2, p
|
|
|
45074
45641
|
} : {},
|
|
45075
45642
|
...startedAtMs !== void 0 ? { startedAtMs } : {},
|
|
45076
45643
|
...completedAtMs !== void 0 ? { completedAtMs } : {},
|
|
45077
|
-
input: user ? visibleUserTextParts(user).map((
|
|
45644
|
+
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 })) : [],
|
|
45078
45645
|
items,
|
|
45079
45646
|
outcome
|
|
45080
45647
|
});
|
|
@@ -45108,7 +45675,7 @@ function nativeIds(snapshot) {
|
|
|
45108
45675
|
async function readSnapshot(dependencies, cwd, sessionId) {
|
|
45109
45676
|
let messages;
|
|
45110
45677
|
try {
|
|
45111
|
-
messages = await dependencies.readSessionMessages({ cwd, sessionId });
|
|
45678
|
+
messages = await dependencies.readSessionMessages({ cwd, sessionId }) ?? [];
|
|
45112
45679
|
} catch {
|
|
45113
45680
|
return {
|
|
45114
45681
|
ok: false,
|
|
@@ -45162,7 +45729,7 @@ async function forkClaudeSession(input) {
|
|
|
45162
45729
|
error: error51("protocolError", "Claude Code Session working directory is unavailable", false)
|
|
45163
45730
|
};
|
|
45164
45731
|
}
|
|
45165
|
-
if (
|
|
45732
|
+
if (path11.resolve(sourceInfo.cwd) !== input.cwd) {
|
|
45166
45733
|
return {
|
|
45167
45734
|
ok: false,
|
|
45168
45735
|
error: error51("unsupported", "Claude Code cannot Fork across working directories", false)
|
|
@@ -45263,7 +45830,7 @@ async function forkClaudeSession(input) {
|
|
|
45263
45830
|
|
|
45264
45831
|
// dist/claude-session-import.js
|
|
45265
45832
|
import { realpath as realpath2, stat as stat2 } from "node:fs/promises";
|
|
45266
|
-
import
|
|
45833
|
+
import path12 from "node:path";
|
|
45267
45834
|
function titleFromMetadata(metadata) {
|
|
45268
45835
|
for (const value of [metadata.customTitle, metadata.summary, metadata.firstPrompt]) {
|
|
45269
45836
|
if (typeof value !== "string")
|
|
@@ -45285,7 +45852,7 @@ async function sourceFromMetadata(metadata, isRunning, signal, canonicalCwds, pr
|
|
|
45285
45852
|
];
|
|
45286
45853
|
let cwd = null;
|
|
45287
45854
|
for (const candidate2 of new Set(candidates)) {
|
|
45288
|
-
if (!
|
|
45855
|
+
if (!path12.isAbsolute(candidate2))
|
|
45289
45856
|
continue;
|
|
45290
45857
|
let canonical = canonicalCwds.get(candidate2);
|
|
45291
45858
|
if (!canonical) {
|
|
@@ -45362,20 +45929,22 @@ var ClaudeSessionImportIndex = class {
|
|
|
45362
45929
|
if (!metadata || metadata.sessionId !== nativeSessionId)
|
|
45363
45930
|
return null;
|
|
45364
45931
|
const preferredCwds = [];
|
|
45365
|
-
if (typeof metadata.cwd === "string" &&
|
|
45932
|
+
if (typeof metadata.cwd === "string" && path12.isAbsolute(metadata.cwd)) {
|
|
45366
45933
|
try {
|
|
45367
45934
|
const messages = await this.#dependencies.readSessionMessages({
|
|
45368
45935
|
cwd: metadata.cwd,
|
|
45369
45936
|
sessionId: nativeSessionId
|
|
45370
45937
|
});
|
|
45371
45938
|
signal.throwIfAborted();
|
|
45939
|
+
if (messages === null)
|
|
45940
|
+
return sourceFromMetadata(metadata, this.#dependencies.isRunning, signal, /* @__PURE__ */ new Map(), preferredCwds);
|
|
45372
45941
|
for (let index = messages.length - 1; index >= 0; index -= 1) {
|
|
45373
45942
|
const message = messages[index];
|
|
45374
45943
|
if (typeof message !== "object" || message === null || Array.isArray(message) || typeof message.cwd !== "string") {
|
|
45375
45944
|
continue;
|
|
45376
45945
|
}
|
|
45377
45946
|
const cwd = message.cwd;
|
|
45378
|
-
if (
|
|
45947
|
+
if (path12.isAbsolute(cwd) && !preferredCwds.includes(cwd))
|
|
45379
45948
|
preferredCwds.push(cwd);
|
|
45380
45949
|
}
|
|
45381
45950
|
} catch {
|
|
@@ -45386,14 +45955,14 @@ var ClaudeSessionImportIndex = class {
|
|
|
45386
45955
|
};
|
|
45387
45956
|
|
|
45388
45957
|
// dist/claude-transcript.js
|
|
45389
|
-
import
|
|
45390
|
-
import
|
|
45958
|
+
import os5 from "node:os";
|
|
45959
|
+
import path13 from "node:path";
|
|
45391
45960
|
import { readFile as readFile4, readdir, stat as stat3 } from "node:fs/promises";
|
|
45392
45961
|
function projectDirectoryName(cwd) {
|
|
45393
45962
|
return cwd.replace(/[^A-Za-z0-9]/gu, "-");
|
|
45394
45963
|
}
|
|
45395
45964
|
function configDirectory(environment) {
|
|
45396
|
-
return environment.CLAUDE_CONFIG_DIR ?
|
|
45965
|
+
return environment.CLAUDE_CONFIG_DIR ? path13.resolve(environment.CLAUDE_CONFIG_DIR) : path13.join(os5.homedir(), ".claude");
|
|
45397
45966
|
}
|
|
45398
45967
|
async function existingFile(file2) {
|
|
45399
45968
|
try {
|
|
@@ -45403,8 +45972,8 @@ async function existingFile(file2) {
|
|
|
45403
45972
|
}
|
|
45404
45973
|
}
|
|
45405
45974
|
async function findTranscriptFile(environment, cwd, relativeName) {
|
|
45406
|
-
const projectsDirectory =
|
|
45407
|
-
const expected =
|
|
45975
|
+
const projectsDirectory = path13.join(configDirectory(environment), "projects");
|
|
45976
|
+
const expected = path13.join(projectsDirectory, projectDirectoryName(cwd), relativeName);
|
|
45408
45977
|
if (await existingFile(expected))
|
|
45409
45978
|
return expected;
|
|
45410
45979
|
let projects;
|
|
@@ -45413,18 +45982,18 @@ async function findTranscriptFile(environment, cwd, relativeName) {
|
|
|
45413
45982
|
} catch {
|
|
45414
45983
|
return null;
|
|
45415
45984
|
}
|
|
45416
|
-
for (const
|
|
45417
|
-
const candidate =
|
|
45985
|
+
for (const project2 of projects) {
|
|
45986
|
+
const candidate = path13.join(projectsDirectory, project2, relativeName);
|
|
45418
45987
|
if (await existingFile(candidate))
|
|
45419
45988
|
return candidate;
|
|
45420
45989
|
}
|
|
45421
45990
|
return null;
|
|
45422
45991
|
}
|
|
45423
|
-
function
|
|
45992
|
+
function isRecord7(value) {
|
|
45424
45993
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
45425
45994
|
}
|
|
45426
45995
|
function parseTranscriptRecords(contents, sessionId) {
|
|
45427
|
-
const messages =
|
|
45996
|
+
const messages = /* @__PURE__ */ new Map();
|
|
45428
45997
|
for (const line of contents.split("\n")) {
|
|
45429
45998
|
if (line.trim().length === 0)
|
|
45430
45999
|
continue;
|
|
@@ -45434,12 +46003,12 @@ function parseTranscriptRecords(contents, sessionId) {
|
|
|
45434
46003
|
} catch {
|
|
45435
46004
|
continue;
|
|
45436
46005
|
}
|
|
45437
|
-
if (!
|
|
46006
|
+
if (!isRecord7(entry) || entry.type !== "user" && entry.type !== "assistant" || typeof entry.uuid !== "string" || !isRecord7(entry.message)) {
|
|
45438
46007
|
continue;
|
|
45439
46008
|
}
|
|
45440
|
-
messages.
|
|
46009
|
+
messages.set(entry.uuid, { ...entry, session_id: sessionId });
|
|
45441
46010
|
}
|
|
45442
|
-
return messages;
|
|
46011
|
+
return [...messages.values()];
|
|
45443
46012
|
}
|
|
45444
46013
|
async function readClaudeTranscript(input) {
|
|
45445
46014
|
const transcript = await findTranscriptFile(input.environment, input.cwd, `${input.sessionId}.jsonl`);
|
|
@@ -45448,7 +46017,7 @@ async function readClaudeTranscript(input) {
|
|
|
45448
46017
|
return parseTranscriptRecords(await readFile4(transcript, "utf8"), input.sessionId);
|
|
45449
46018
|
}
|
|
45450
46019
|
async function readClaudeSubagentTranscript(input) {
|
|
45451
|
-
const relativeName =
|
|
46020
|
+
const relativeName = path13.join(input.sessionId, "subagents", `agent-${input.nativeSubagentId}.jsonl`);
|
|
45452
46021
|
const transcript = await findTranscriptFile(input.environment, input.cwd, relativeName);
|
|
45453
46022
|
if (!transcript)
|
|
45454
46023
|
return null;
|
|
@@ -45458,14 +46027,14 @@ async function readClaudeSubagentTranscript(input) {
|
|
|
45458
46027
|
// dist/long-context.js
|
|
45459
46028
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
45460
46029
|
import { mkdir as mkdir2, readFile as readFile5, rename as rename2, rm as rm4, writeFile as writeFile2 } from "node:fs/promises";
|
|
45461
|
-
import
|
|
45462
|
-
import
|
|
46030
|
+
import os6 from "node:os";
|
|
46031
|
+
import path14 from "node:path";
|
|
45463
46032
|
var MILLION_CONTEXT_MODELS = [{ id: "claude-opus-5-5", aliases: ["claude-opus-5.5"] }];
|
|
45464
|
-
var MILLION_CONTEXT_MODEL_IDS = new Set(MILLION_CONTEXT_MODELS.flatMap((
|
|
46033
|
+
var MILLION_CONTEXT_MODEL_IDS = new Set(MILLION_CONTEXT_MODELS.flatMap((model2) => [model2.id, ...model2.aliases]));
|
|
45465
46034
|
var MILLION_CONTEXT_SUFFIX = /\[1m\]$/iu;
|
|
45466
46035
|
function claudeLongContextFile(environment) {
|
|
45467
|
-
const root = environment.CODEXHOST_DATA_DIR ?
|
|
45468
|
-
return
|
|
46036
|
+
const root = environment.CODEXHOST_DATA_DIR ? path14.resolve(environment.CODEXHOST_DATA_DIR) : path14.join(os6.homedir(), ".codexhost");
|
|
46037
|
+
return path14.join(root, "claude-code-long-context.json");
|
|
45469
46038
|
}
|
|
45470
46039
|
async function readClaudeLongContext(environment) {
|
|
45471
46040
|
try {
|
|
@@ -45479,7 +46048,7 @@ async function readClaudeLongContext(environment) {
|
|
|
45479
46048
|
}
|
|
45480
46049
|
async function writeClaudeLongContext(environment, enabled) {
|
|
45481
46050
|
const file2 = claudeLongContextFile(environment);
|
|
45482
|
-
await mkdir2(
|
|
46051
|
+
await mkdir2(path14.dirname(file2), { recursive: true, mode: 448 });
|
|
45483
46052
|
const temporary = `${file2}.${randomUUID3()}.tmp`;
|
|
45484
46053
|
try {
|
|
45485
46054
|
await writeFile2(temporary, `${JSON.stringify({ enabled })}
|
|
@@ -45490,10 +46059,10 @@ async function writeClaudeLongContext(environment, enabled) {
|
|
|
45490
46059
|
}
|
|
45491
46060
|
return enabled;
|
|
45492
46061
|
}
|
|
45493
|
-
function claudeSessionModel(
|
|
45494
|
-
if (!
|
|
46062
|
+
function claudeSessionModel(model2, enabled) {
|
|
46063
|
+
if (!model2)
|
|
45495
46064
|
return void 0;
|
|
45496
|
-
const bare =
|
|
46065
|
+
const bare = model2.replace(MILLION_CONTEXT_SUFFIX, "");
|
|
45497
46066
|
if (!enabled || !MILLION_CONTEXT_MODEL_IDS.has(bare))
|
|
45498
46067
|
return bare;
|
|
45499
46068
|
return `${bare}[1m]`;
|
|
@@ -45502,8 +46071,8 @@ function claudeSessionModel(model, enabled) {
|
|
|
45502
46071
|
// dist/model-catalog.js
|
|
45503
46072
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
45504
46073
|
import { readFile as readFile6 } from "node:fs/promises";
|
|
45505
|
-
import
|
|
45506
|
-
import
|
|
46074
|
+
import os7 from "node:os";
|
|
46075
|
+
import path15 from "node:path";
|
|
45507
46076
|
|
|
45508
46077
|
// dist/thinking-options.js
|
|
45509
46078
|
var option = (id, label) => ({
|
|
@@ -45585,7 +46154,7 @@ function decodeClaudeModelRef(ref) {
|
|
|
45585
46154
|
return value === "default" ? void 0 : value;
|
|
45586
46155
|
}
|
|
45587
46156
|
function resolveClaudeConfigDirectory(environment = process.env) {
|
|
45588
|
-
return
|
|
46157
|
+
return path15.resolve(environment.CLAUDE_CONFIG_DIR ?? path15.join(os7.homedir(), ".claude"));
|
|
45589
46158
|
}
|
|
45590
46159
|
function parseModelPickerOptions(value) {
|
|
45591
46160
|
if (!Array.isArray(value))
|
|
@@ -45627,7 +46196,7 @@ function parseClaudeModelPickerSettings(value) {
|
|
|
45627
46196
|
};
|
|
45628
46197
|
}
|
|
45629
46198
|
async function readClaudeUserModelPicker(environment = process.env) {
|
|
45630
|
-
const settingsPath =
|
|
46199
|
+
const settingsPath = path15.join(resolveClaudeConfigDirectory(environment), "settings.json");
|
|
45631
46200
|
let raw;
|
|
45632
46201
|
try {
|
|
45633
46202
|
raw = await readFile6(settingsPath, "utf8");
|
|
@@ -45828,7 +46397,7 @@ var CLAUDE_PERMISSION_MODE_CATALOGS = {
|
|
|
45828
46397
|
};
|
|
45829
46398
|
var autoModeModelInfoSchema = external_exports.object({ supportsAutoMode: external_exports.literal(true) });
|
|
45830
46399
|
function claudePermissionModeCatalogForModels(models, bypassPermissionsAvailable = true) {
|
|
45831
|
-
const supportsAutoMode = Array.isArray(models) && models.some((
|
|
46400
|
+
const supportsAutoMode = Array.isArray(models) && models.some((model2) => autoModeModelInfoSchema.safeParse(model2).success);
|
|
45832
46401
|
if (supportsAutoMode) {
|
|
45833
46402
|
return bypassPermissionsAvailable ? CLAUDE_PERMISSION_MODE_CATALOGS.auto : CLAUDE_PERMISSION_MODE_CATALOGS.autoWithoutBypass;
|
|
45834
46403
|
}
|
|
@@ -45957,7 +46526,7 @@ function projectClaudeAccountUsage(usage, account) {
|
|
|
45957
46526
|
|
|
45958
46527
|
// dist/gateway-models.js
|
|
45959
46528
|
import { readFile as readFile7 } from "node:fs/promises";
|
|
45960
|
-
import
|
|
46529
|
+
import path16 from "node:path";
|
|
45961
46530
|
var GATEWAY_MODELS_TIMEOUT_MS = 3e3;
|
|
45962
46531
|
var GATEWAY_MODELS_MAX_BYTES = 2 * 1024 * 1024;
|
|
45963
46532
|
var OFFICIAL_ANTHROPIC_HOST = "api.anthropic.com";
|
|
@@ -45999,14 +46568,14 @@ function claudeConfigDirectory(environment) {
|
|
|
45999
46568
|
if (configured)
|
|
46000
46569
|
return configured;
|
|
46001
46570
|
const home = trimmedEnv(environment, "HOME") ?? trimmedEnv(environment, "USERPROFILE");
|
|
46002
|
-
return home ?
|
|
46571
|
+
return home ? path16.join(home, ".claude") : void 0;
|
|
46003
46572
|
}
|
|
46004
46573
|
async function readClaudeUserSettingsEnv(environment) {
|
|
46005
46574
|
const configDir = claudeConfigDirectory(environment);
|
|
46006
46575
|
if (!configDir)
|
|
46007
46576
|
return {};
|
|
46008
46577
|
try {
|
|
46009
|
-
const raw = await readFile7(
|
|
46578
|
+
const raw = await readFile7(path16.join(configDir, "settings.json"), "utf8");
|
|
46010
46579
|
const parsed = JSON.parse(raw);
|
|
46011
46580
|
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed))
|
|
46012
46581
|
return {};
|
|
@@ -46139,7 +46708,7 @@ async function applyGatewayModelCatalog(snapshot, environment, dependencies = {}
|
|
|
46139
46708
|
|
|
46140
46709
|
// dist/process-fence.js
|
|
46141
46710
|
import { execFile as execFile3 } from "node:child_process";
|
|
46142
|
-
import
|
|
46711
|
+
import path17 from "node:path";
|
|
46143
46712
|
import { setTimeout as setTimeout2 } from "node:timers/promises";
|
|
46144
46713
|
import { promisify } from "node:util";
|
|
46145
46714
|
var executeFile = promisify(execFile3);
|
|
@@ -46163,9 +46732,9 @@ async function closeClaudeProcessGroup(child, timeoutMs) {
|
|
|
46163
46732
|
if (child.exitCode !== null || child.signalCode !== null)
|
|
46164
46733
|
throw new Error("Claude process tree cannot be confirmed after its Windows root exited");
|
|
46165
46734
|
const root = process.env.SystemRoot ?? process.env.SYSTEMROOT;
|
|
46166
|
-
if (!root || !
|
|
46735
|
+
if (!root || !path17.win32.isAbsolute(root))
|
|
46167
46736
|
throw new Error("Windows SystemRoot is unavailable");
|
|
46168
|
-
await executeFile(
|
|
46737
|
+
await executeFile(path17.win32.join(root, "System32", "taskkill.exe"), ["/PID", String(pid), "/T", "/F"], {
|
|
46169
46738
|
timeout: timeoutMs,
|
|
46170
46739
|
windowsHide: true
|
|
46171
46740
|
});
|
|
@@ -46249,7 +46818,7 @@ function rejectAfter(milliseconds, message) {
|
|
|
46249
46818
|
function processExited(child) {
|
|
46250
46819
|
return child.exitCode !== null || child.signalCode !== null;
|
|
46251
46820
|
}
|
|
46252
|
-
function
|
|
46821
|
+
function isRecord8(value) {
|
|
46253
46822
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
46254
46823
|
}
|
|
46255
46824
|
function safeNonNegativeInteger2(value) {
|
|
@@ -46269,13 +46838,13 @@ function userMessageContent(input) {
|
|
|
46269
46838
|
return blocks;
|
|
46270
46839
|
}
|
|
46271
46840
|
function permissionModeFromMessage(value) {
|
|
46272
|
-
if (!
|
|
46841
|
+
if (!isRecord8(value) || value.type !== "system" || value.subtype !== "init" && value.subtype !== "status" || !("permissionMode" in value) || value.permissionMode === void 0) {
|
|
46273
46842
|
return void 0;
|
|
46274
46843
|
}
|
|
46275
46844
|
return isClaudePermissionMode(value.permissionMode) ? value.permissionMode : void 0;
|
|
46276
46845
|
}
|
|
46277
46846
|
function parseContextApiUsage(value) {
|
|
46278
|
-
if (!
|
|
46847
|
+
if (!isRecord8(value))
|
|
46279
46848
|
return void 0;
|
|
46280
46849
|
const inputTokens = value.input_tokens;
|
|
46281
46850
|
const outputTokens = value.output_tokens;
|
|
@@ -46287,16 +46856,16 @@ function parseContextApiUsage(value) {
|
|
|
46287
46856
|
return { inputTokens, outputTokens, cacheCreationInputTokens, cacheReadInputTokens };
|
|
46288
46857
|
}
|
|
46289
46858
|
function parseContextUsage(value) {
|
|
46290
|
-
if (!
|
|
46859
|
+
if (!isRecord8(value))
|
|
46291
46860
|
throw new Error("Claude SDK context Usage is invalid");
|
|
46292
46861
|
const usedTokens = value.totalTokens;
|
|
46293
46862
|
const maxTokens = value.maxTokens;
|
|
46294
|
-
const
|
|
46295
|
-
if (typeof usedTokens !== "number" || !Number.isSafeInteger(usedTokens) || usedTokens < 0 || typeof maxTokens !== "number" || !Number.isSafeInteger(maxTokens) || maxTokens <= 0 || typeof
|
|
46863
|
+
const model2 = value.model;
|
|
46864
|
+
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) {
|
|
46296
46865
|
throw new Error("Claude SDK context Usage contains invalid values");
|
|
46297
46866
|
}
|
|
46298
46867
|
const apiUsage = parseContextApiUsage(value.apiUsage);
|
|
46299
|
-
return { usedTokens, maxTokens, model, ...apiUsage ? { apiUsage } : {} };
|
|
46868
|
+
return { usedTokens, maxTokens, model: model2, ...apiUsage ? { apiUsage } : {} };
|
|
46300
46869
|
}
|
|
46301
46870
|
function parseQuestions(input) {
|
|
46302
46871
|
if (!Array.isArray(input.questions) || input.questions.length < 1 || input.questions.length > 4) {
|
|
@@ -46305,7 +46874,7 @@ function parseQuestions(input) {
|
|
|
46305
46874
|
const questions = [];
|
|
46306
46875
|
const questionTexts = /* @__PURE__ */ new Set();
|
|
46307
46876
|
for (const value of input.questions) {
|
|
46308
|
-
if (!
|
|
46877
|
+
if (!isRecord8(value))
|
|
46309
46878
|
return null;
|
|
46310
46879
|
const question = value.question;
|
|
46311
46880
|
const header = value.header;
|
|
@@ -46316,7 +46885,7 @@ function parseQuestions(input) {
|
|
|
46316
46885
|
const labels = /* @__PURE__ */ new Set();
|
|
46317
46886
|
const options = [];
|
|
46318
46887
|
for (const option2 of value.options) {
|
|
46319
|
-
if (!
|
|
46888
|
+
if (!isRecord8(option2) || typeof option2.label !== "string" || option2.label.length === 0 || labels.has(option2.label) || typeof option2.description !== "string") {
|
|
46320
46889
|
return null;
|
|
46321
46890
|
}
|
|
46322
46891
|
labels.add(option2.label);
|
|
@@ -46330,8 +46899,8 @@ function parseQuestions(input) {
|
|
|
46330
46899
|
function boundedDisplayText(value, maxLength) {
|
|
46331
46900
|
if (typeof value !== "string")
|
|
46332
46901
|
return null;
|
|
46333
|
-
const
|
|
46334
|
-
return
|
|
46902
|
+
const text2 = value.trim();
|
|
46903
|
+
return text2.length > 0 && text2.length <= maxLength ? text2 : null;
|
|
46335
46904
|
}
|
|
46336
46905
|
var SESSION_PERMISSION_DESTINATIONS = /* @__PURE__ */ new Set(["session", "cliArg"]);
|
|
46337
46906
|
var PERSISTENT_PERMISSION_DESTINATIONS = /* @__PURE__ */ new Set([
|
|
@@ -46358,7 +46927,7 @@ function permissionUpdateDestination(value) {
|
|
|
46358
46927
|
return void 0;
|
|
46359
46928
|
}
|
|
46360
46929
|
function isPermissionUpdate(value) {
|
|
46361
|
-
if (!
|
|
46930
|
+
if (!isRecord8(value) || !permissionUpdateDestination(value.destination))
|
|
46362
46931
|
return false;
|
|
46363
46932
|
if (value.type === "setMode") {
|
|
46364
46933
|
return typeof value.mode === "string" && PERMISSION_MODES.has(value.mode);
|
|
@@ -46367,7 +46936,7 @@ function isPermissionUpdate(value) {
|
|
|
46367
46936
|
return Array.isArray(value.directories) && value.directories.every((directory) => typeof directory === "string");
|
|
46368
46937
|
}
|
|
46369
46938
|
if (value.type === "addRules" || value.type === "replaceRules" || value.type === "removeRules") {
|
|
46370
|
-
return typeof value.behavior === "string" && PERMISSION_BEHAVIORS.has(value.behavior) && Array.isArray(value.rules) && value.rules.every((rule) =>
|
|
46939
|
+
return typeof value.behavior === "string" && PERMISSION_BEHAVIORS.has(value.behavior) && Array.isArray(value.rules) && value.rules.every((rule) => isRecord8(rule) && typeof rule.toolName === "string" && (rule.ruleContent === void 0 || typeof rule.ruleContent === "string"));
|
|
46371
46940
|
}
|
|
46372
46941
|
return false;
|
|
46373
46942
|
}
|
|
@@ -46421,6 +46990,35 @@ function canDeliverSettlementImmediately(event, pendingEvents) {
|
|
|
46421
46990
|
return event.callId !== void 0 && pending.callId === event.callId || pending.nativeSubagentId === event.nativeSubagentId;
|
|
46422
46991
|
});
|
|
46423
46992
|
}
|
|
46993
|
+
function isRootOutput(event) {
|
|
46994
|
+
switch (event.type) {
|
|
46995
|
+
case "compaction.started":
|
|
46996
|
+
case "compaction.completed":
|
|
46997
|
+
case "text.delta":
|
|
46998
|
+
case "reasoning.delta":
|
|
46999
|
+
case "reasoning.completed":
|
|
47000
|
+
case "message.completed":
|
|
47001
|
+
case "tool.started":
|
|
47002
|
+
case "tool.progress":
|
|
47003
|
+
case "tool.completed":
|
|
47004
|
+
case "subagent.started":
|
|
47005
|
+
case "subagent.completed":
|
|
47006
|
+
case "interaction.requested":
|
|
47007
|
+
case "interaction.closed":
|
|
47008
|
+
case "usage.result":
|
|
47009
|
+
return true;
|
|
47010
|
+
case "usage.request":
|
|
47011
|
+
case "segment.started":
|
|
47012
|
+
case "subagents.live":
|
|
47013
|
+
case "subagent.updated":
|
|
47014
|
+
case "subagent.settled":
|
|
47015
|
+
case "subagent.transcript.changed":
|
|
47016
|
+
return false;
|
|
47017
|
+
default:
|
|
47018
|
+
event;
|
|
47019
|
+
return false;
|
|
47020
|
+
}
|
|
47021
|
+
}
|
|
46424
47022
|
var ClaudeSdkTransport = class {
|
|
46425
47023
|
sessionId;
|
|
46426
47024
|
#children = [];
|
|
@@ -46544,7 +47142,7 @@ var ClaudeSdkTransport = class {
|
|
|
46544
47142
|
return { commands: this.#slashCommands, skillNames: this.#skillNames };
|
|
46545
47143
|
}
|
|
46546
47144
|
#observeSlashCommands(message) {
|
|
46547
|
-
if (!
|
|
47145
|
+
if (!isRecord8(message) || message.type !== "system")
|
|
46548
47146
|
return;
|
|
46549
47147
|
if (message.subtype === "init" && Array.isArray(message.skills)) {
|
|
46550
47148
|
this.#skillNames = new Set(message.skills.filter((name) => typeof name === "string"));
|
|
@@ -46563,11 +47161,11 @@ var ClaudeSdkTransport = class {
|
|
|
46563
47161
|
throw new Error("Claude SDK transport is not started");
|
|
46564
47162
|
return this.#permissionMode;
|
|
46565
47163
|
}
|
|
46566
|
-
async setModel(
|
|
47164
|
+
async setModel(model2) {
|
|
46567
47165
|
const activeQuery = this.#query;
|
|
46568
47166
|
if (!this.#started || !activeQuery)
|
|
46569
47167
|
throw new Error("Claude SDK transport is not started");
|
|
46570
|
-
await activeQuery.setModel(
|
|
47168
|
+
await activeQuery.setModel(model2);
|
|
46571
47169
|
}
|
|
46572
47170
|
async setThinkingOption(thinkingOptionId) {
|
|
46573
47171
|
const activeQuery = this.#query;
|
|
@@ -46598,8 +47196,11 @@ var ClaudeSdkTransport = class {
|
|
|
46598
47196
|
if (this.#closePromise || !this.#started || !this.#query) {
|
|
46599
47197
|
return Promise.reject(new Error("Claude SDK transport is not started"));
|
|
46600
47198
|
}
|
|
46601
|
-
if (this.#active)
|
|
47199
|
+
if (this.#active || this.#autonomous?.live) {
|
|
46602
47200
|
return Promise.reject(new Error("Claude SDK transport is busy"));
|
|
47201
|
+
}
|
|
47202
|
+
const unclaimed = this.#autonomous?.events ?? [];
|
|
47203
|
+
this.#autonomous = null;
|
|
46603
47204
|
const promise2 = new Promise((resolve2, reject) => {
|
|
46604
47205
|
this.#active = {
|
|
46605
47206
|
accumulator: new ClaudeNativeTurnAccumulator(this.#provider ? { provider: this.#provider } : {}),
|
|
@@ -46610,6 +47211,8 @@ var ClaudeSdkTransport = class {
|
|
|
46610
47211
|
reject
|
|
46611
47212
|
};
|
|
46612
47213
|
});
|
|
47214
|
+
for (const event of unclaimed)
|
|
47215
|
+
onEvent(event);
|
|
46613
47216
|
this.#input.push({
|
|
46614
47217
|
type: "user",
|
|
46615
47218
|
message: { role: "user", content: userMessageContent(input) },
|
|
@@ -46669,11 +47272,11 @@ var ClaudeSdkTransport = class {
|
|
|
46669
47272
|
return Promise.resolve();
|
|
46670
47273
|
}
|
|
46671
47274
|
async abort() {
|
|
46672
|
-
const
|
|
47275
|
+
const accumulator = this.#active?.accumulator ?? (this.#autonomous?.live ? this.#autonomous.accumulator : null);
|
|
46673
47276
|
const activeQuery = this.#query;
|
|
46674
|
-
if (!
|
|
47277
|
+
if (!accumulator || !activeQuery)
|
|
46675
47278
|
throw new Error("Claude SDK transport has no active Turn");
|
|
46676
|
-
|
|
47279
|
+
accumulator.requestCancel();
|
|
46677
47280
|
try {
|
|
46678
47281
|
await this.#stopRequest(activeQuery.interrupt(), INTERRUPT_TIMEOUT_MESSAGE);
|
|
46679
47282
|
} catch (error52) {
|
|
@@ -46843,16 +47446,23 @@ var ClaudeSdkTransport = class {
|
|
|
46843
47446
|
}
|
|
46844
47447
|
}
|
|
46845
47448
|
#observeBackgroundTasks(message) {
|
|
46846
|
-
if (!
|
|
47449
|
+
if (!isRecord8(message) || message.type !== "system")
|
|
46847
47450
|
return;
|
|
46848
47451
|
if (message.subtype === "background_tasks_changed" && Array.isArray(message.tasks)) {
|
|
46849
|
-
this.#backgroundTasks = new Set(message.tasks.flatMap((task) =>
|
|
47452
|
+
this.#backgroundTasks = new Set(message.tasks.flatMap((task) => isRecord8(task) && typeof task.task_id === "string" ? [task.task_id] : []));
|
|
46850
47453
|
} else if (message.subtype === "task_started" && typeof message.task_id === "string") {
|
|
46851
47454
|
this.#backgroundTasks.add(message.task_id);
|
|
46852
47455
|
} else if (message.subtype === "task_notification" && typeof message.task_id === "string" && ["completed", "failed", "stopped"].includes(String(message.status))) {
|
|
46853
47456
|
this.#backgroundTasks.delete(message.task_id);
|
|
46854
47457
|
}
|
|
46855
47458
|
}
|
|
47459
|
+
/** Starts the Segment's autonomous Turn and releases the events it held, in native order. */
|
|
47460
|
+
#startAutonomousTurn(autonomous, handler) {
|
|
47461
|
+
autonomous.live = true;
|
|
47462
|
+
handler.start(autonomous.nativeTurnKey ?? `autonomous-${Date.now()}`);
|
|
47463
|
+
for (const event of autonomous.events.splice(0))
|
|
47464
|
+
handler.onEvent(event);
|
|
47465
|
+
}
|
|
46856
47466
|
async #consume(activeQuery) {
|
|
46857
47467
|
try {
|
|
46858
47468
|
for await (const message of activeQuery) {
|
|
@@ -46889,36 +47499,35 @@ var ClaudeSdkTransport = class {
|
|
|
46889
47499
|
}
|
|
46890
47500
|
continue;
|
|
46891
47501
|
}
|
|
46892
|
-
|
|
47502
|
+
const handler = this.#autonomousTurnHandler;
|
|
47503
|
+
if (!handler)
|
|
46893
47504
|
continue;
|
|
46894
|
-
const observedAtMs = Date.now();
|
|
46895
47505
|
const autonomous = this.#autonomous ?? (this.#autonomous = {
|
|
46896
47506
|
accumulator: new ClaudeNativeTurnAccumulator(this.#provider ? { provider: this.#provider } : {}),
|
|
46897
47507
|
events: [],
|
|
46898
47508
|
nativeTurnKey: null,
|
|
46899
|
-
|
|
47509
|
+
live: false
|
|
46900
47510
|
});
|
|
46901
|
-
if (autonomous.nativeTurnKey === null &&
|
|
47511
|
+
if (autonomous.nativeTurnKey === null && isRecord8(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) {
|
|
46902
47512
|
autonomous.nativeTurnKey = message.uuid;
|
|
46903
47513
|
}
|
|
46904
47514
|
const interpreted = autonomous.accumulator.consume(message);
|
|
46905
47515
|
for (const event of interpreted.events) {
|
|
46906
|
-
if (
|
|
47516
|
+
if (autonomous.live) {
|
|
47517
|
+
handler.onEvent(event);
|
|
47518
|
+
} else if (this.#threadEventHandler && canDeliverSettlementImmediately(event, autonomous.events)) {
|
|
46907
47519
|
this.#threadEventHandler(event);
|
|
46908
|
-
|
|
47520
|
+
} else {
|
|
47521
|
+
autonomous.events.push(event);
|
|
47522
|
+
if (isRootOutput(event))
|
|
47523
|
+
this.#startAutonomousTurn(autonomous, handler);
|
|
46909
47524
|
}
|
|
46910
|
-
autonomous.events.push({ ...event, observedAtMs });
|
|
46911
47525
|
}
|
|
46912
47526
|
if (interpreted.terminal) {
|
|
46913
47527
|
this.#autonomous = null;
|
|
46914
|
-
|
|
46915
|
-
|
|
46916
|
-
|
|
46917
|
-
events: autonomous.events,
|
|
46918
|
-
result: interpreted.terminal,
|
|
46919
|
-
startedAtMs: autonomous.startedAtMs,
|
|
46920
|
-
completedAtMs: observedAtMs
|
|
46921
|
-
});
|
|
47528
|
+
if (!autonomous.live)
|
|
47529
|
+
this.#startAutonomousTurn(autonomous, handler);
|
|
47530
|
+
handler.onTerminal(interpreted.terminal);
|
|
46922
47531
|
}
|
|
46923
47532
|
}
|
|
46924
47533
|
if (!this.#closePromise)
|
|
@@ -47247,11 +47856,11 @@ var ClaudeSubagentLifecycle = class {
|
|
|
47247
47856
|
};
|
|
47248
47857
|
|
|
47249
47858
|
// dist/task-tracker.js
|
|
47250
|
-
function
|
|
47859
|
+
function isRecord9(value) {
|
|
47251
47860
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
47252
47861
|
}
|
|
47253
47862
|
function stringField(value, keys) {
|
|
47254
|
-
if (!
|
|
47863
|
+
if (!isRecord9(value))
|
|
47255
47864
|
return void 0;
|
|
47256
47865
|
for (const key of keys) {
|
|
47257
47866
|
const field = value[key];
|
|
@@ -47286,7 +47895,7 @@ var ClaudeTaskTracker = class {
|
|
|
47286
47895
|
};
|
|
47287
47896
|
}
|
|
47288
47897
|
#create(args, result) {
|
|
47289
|
-
if (!
|
|
47898
|
+
if (!isRecord9(result) || !isRecord9(result.task))
|
|
47290
47899
|
return;
|
|
47291
47900
|
const id = stringField(result.task, ["id"]);
|
|
47292
47901
|
const subject = stringField(args, ["subject"]) ?? stringField(result.task, ["subject"]);
|
|
@@ -47304,7 +47913,7 @@ var ClaudeTaskTracker = class {
|
|
|
47304
47913
|
const id = stringField(args, ["taskId", "id", "task_id"]);
|
|
47305
47914
|
if (!id)
|
|
47306
47915
|
return;
|
|
47307
|
-
const status =
|
|
47916
|
+
const status = isRecord9(args) ? taskStatus2(args.status) : void 0;
|
|
47308
47917
|
if (status === "deleted") {
|
|
47309
47918
|
this.#tasks.delete(id);
|
|
47310
47919
|
return;
|
|
@@ -47322,13 +47931,13 @@ var ClaudeTaskTracker = class {
|
|
|
47322
47931
|
});
|
|
47323
47932
|
}
|
|
47324
47933
|
#replace(result) {
|
|
47325
|
-
if (!
|
|
47934
|
+
if (!isRecord9(result) || !Array.isArray(result.tasks))
|
|
47326
47935
|
return;
|
|
47327
47936
|
const next = /* @__PURE__ */ new Map();
|
|
47328
47937
|
for (const value of result.tasks) {
|
|
47329
47938
|
const id = stringField(value, ["id"]);
|
|
47330
47939
|
const subject = stringField(value, ["subject"]);
|
|
47331
|
-
const status =
|
|
47940
|
+
const status = isRecord9(value) ? taskStatus2(value.status) : void 0;
|
|
47332
47941
|
if (!id || !subject || !status || status === "deleted")
|
|
47333
47942
|
continue;
|
|
47334
47943
|
const existing = this.#tasks.get(id);
|
|
@@ -47376,7 +47985,7 @@ var ClaudeBackgroundCommandItems = class {
|
|
|
47376
47985
|
this.#outputLimit = options.outputLimit;
|
|
47377
47986
|
}
|
|
47378
47987
|
taskIds() {
|
|
47379
|
-
return [...this.#commands.values()].
|
|
47988
|
+
return [...this.#commands.values()].flatMap(({ command, outcome }) => outcome ? [] : [command.taskId]);
|
|
47380
47989
|
}
|
|
47381
47990
|
follow(command) {
|
|
47382
47991
|
const followed = {
|
|
@@ -47389,6 +47998,7 @@ var ClaudeBackgroundCommandItems = class {
|
|
|
47389
47998
|
truncated: false,
|
|
47390
47999
|
timer: null,
|
|
47391
48000
|
reading: Promise.resolve(),
|
|
48001
|
+
outcome: void 0,
|
|
47392
48002
|
completed: false
|
|
47393
48003
|
};
|
|
47394
48004
|
this.#commands.set(command.callId, followed);
|
|
@@ -47397,24 +48007,25 @@ var ClaudeBackgroundCommandItems = class {
|
|
|
47397
48007
|
followed.timer.unref();
|
|
47398
48008
|
}
|
|
47399
48009
|
}
|
|
47400
|
-
/** Returns whether the notification
|
|
48010
|
+
/** Returns whether the notification belongs to a followed command. */
|
|
47401
48011
|
settle(notification) {
|
|
47402
48012
|
const followed = notification.callId ? this.#commands.get(notification.callId) : void 0;
|
|
47403
48013
|
if (!followed)
|
|
47404
48014
|
return false;
|
|
47405
|
-
|
|
48015
|
+
if (followed.outcome)
|
|
48016
|
+
return true;
|
|
48017
|
+
const outcome = notificationOutcome(notification.status);
|
|
48018
|
+
followed.outcome = outcome;
|
|
47406
48019
|
if (followed.timer)
|
|
47407
48020
|
clearInterval(followed.timer);
|
|
47408
48021
|
followed.outputFile ??= notification.outputFile;
|
|
47409
|
-
void this.#poll(followed).then(() => this.#complete(followed,
|
|
48022
|
+
void this.#poll(followed).then(() => this.#complete(followed, outcome));
|
|
47410
48023
|
return true;
|
|
47411
48024
|
}
|
|
47412
48025
|
/** The native process is gone; no notification can arrive any more. */
|
|
47413
48026
|
abandonAll(reason) {
|
|
47414
48027
|
for (const followed of this.#commands.values()) {
|
|
47415
|
-
|
|
47416
|
-
clearInterval(followed.timer);
|
|
47417
|
-
this.#complete(followed, { status: "cancelled", reason });
|
|
48028
|
+
this.#complete(followed, followed.outcome ?? { status: "cancelled", reason });
|
|
47418
48029
|
}
|
|
47419
48030
|
this.#commands.clear();
|
|
47420
48031
|
}
|
|
@@ -47423,7 +48034,7 @@ var ClaudeBackgroundCommandItems = class {
|
|
|
47423
48034
|
return followed.reading;
|
|
47424
48035
|
}
|
|
47425
48036
|
async #read(followed) {
|
|
47426
|
-
if (!followed.outputFile || followed.truncated)
|
|
48037
|
+
if (!followed.outputFile || followed.truncated || followed.completed)
|
|
47427
48038
|
return;
|
|
47428
48039
|
let handle;
|
|
47429
48040
|
try {
|
|
@@ -47434,8 +48045,10 @@ var ClaudeBackgroundCommandItems = class {
|
|
|
47434
48045
|
followed.opened = true;
|
|
47435
48046
|
try {
|
|
47436
48047
|
const buffer = Buffer.alloc(READ_CHUNK_BYTES);
|
|
47437
|
-
|
|
48048
|
+
while (!followed.completed) {
|
|
47438
48049
|
const { bytesRead } = await handle.read(buffer, 0, buffer.length, followed.offset);
|
|
48050
|
+
if (followed.completed)
|
|
48051
|
+
return;
|
|
47439
48052
|
if (bytesRead === 0)
|
|
47440
48053
|
return;
|
|
47441
48054
|
followed.offset += bytesRead;
|
|
@@ -47449,12 +48062,12 @@ var ClaudeBackgroundCommandItems = class {
|
|
|
47449
48062
|
await handle.close().catch(() => void 0);
|
|
47450
48063
|
}
|
|
47451
48064
|
}
|
|
47452
|
-
#append(followed,
|
|
47453
|
-
if (
|
|
48065
|
+
#append(followed, text2) {
|
|
48066
|
+
if (text2.length === 0 || followed.completed)
|
|
47454
48067
|
return;
|
|
47455
48068
|
const room = this.#outputLimit - followed.output.length;
|
|
47456
|
-
const accepted =
|
|
47457
|
-
if (
|
|
48069
|
+
const accepted = text2.length > room ? text2.slice(0, Math.max(0, room)) : text2;
|
|
48070
|
+
if (text2.length > room)
|
|
47458
48071
|
followed.truncated = true;
|
|
47459
48072
|
if (accepted.length === 0)
|
|
47460
48073
|
return;
|
|
@@ -47467,8 +48080,13 @@ var ClaudeBackgroundCommandItems = class {
|
|
|
47467
48080
|
});
|
|
47468
48081
|
}
|
|
47469
48082
|
#complete(followed, outcome) {
|
|
48083
|
+
if (followed.completed)
|
|
48084
|
+
return;
|
|
47470
48085
|
const { command } = followed;
|
|
47471
48086
|
followed.completed = true;
|
|
48087
|
+
if (followed.timer)
|
|
48088
|
+
clearInterval(followed.timer);
|
|
48089
|
+
this.#commands.delete(command.callId);
|
|
47472
48090
|
const output = followed.output.length > 0 ? followed.output : followed.opened ? void 0 : UNAVAILABLE_OUTPUT;
|
|
47473
48091
|
this.#emit({
|
|
47474
48092
|
type: "item.completed",
|
|
@@ -47486,11 +48104,11 @@ var ClaudeBackgroundCommandItems = class {
|
|
|
47486
48104
|
};
|
|
47487
48105
|
|
|
47488
48106
|
// dist/tool-lifecycle.js
|
|
47489
|
-
function
|
|
48107
|
+
function isRecord10(value) {
|
|
47490
48108
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
47491
48109
|
}
|
|
47492
48110
|
function stringField2(value, key) {
|
|
47493
|
-
return
|
|
48111
|
+
return isRecord10(value) && typeof value[key] === "string" ? value[key] : void 0;
|
|
47494
48112
|
}
|
|
47495
48113
|
function toolFailure(toolName) {
|
|
47496
48114
|
return {
|
|
@@ -47499,17 +48117,17 @@ function toolFailure(toolName) {
|
|
|
47499
48117
|
retryable: false
|
|
47500
48118
|
};
|
|
47501
48119
|
}
|
|
47502
|
-
function boundedToolOutput(
|
|
47503
|
-
if (!
|
|
48120
|
+
function boundedToolOutput(text2, limit) {
|
|
48121
|
+
if (!text2 || text2.length === 0)
|
|
47504
48122
|
return void 0;
|
|
47505
|
-
const truncated =
|
|
48123
|
+
const truncated = text2.length > limit;
|
|
47506
48124
|
return {
|
|
47507
|
-
content: [{ type: "text", text: truncated ?
|
|
48125
|
+
content: [{ type: "text", text: truncated ? text2.slice(0, limit) : text2 }],
|
|
47508
48126
|
...truncated ? { truncated: true } : {}
|
|
47509
48127
|
};
|
|
47510
48128
|
}
|
|
47511
48129
|
function toolOutputText(output) {
|
|
47512
|
-
return output?.content.filter((content) => content.type === "text").map(({ text }) =>
|
|
48130
|
+
return output?.content.filter((content) => content.type === "text").map(({ text: text2 }) => text2).join("") ?? "";
|
|
47513
48131
|
}
|
|
47514
48132
|
var ClaudeToolLifecycle = class {
|
|
47515
48133
|
#cwd;
|
|
@@ -47635,11 +48253,11 @@ var ClaudeToolLifecycle = class {
|
|
|
47635
48253
|
|
|
47636
48254
|
// dist/usage-estimate.js
|
|
47637
48255
|
var PER_MILLION = 1e6;
|
|
47638
|
-
function normalizedModel(
|
|
47639
|
-
return
|
|
48256
|
+
function normalizedModel(model2) {
|
|
48257
|
+
return model2.trim().toLowerCase().replaceAll("_", "-");
|
|
47640
48258
|
}
|
|
47641
|
-
function firstPartyPrice(
|
|
47642
|
-
const value = normalizedModel(
|
|
48259
|
+
function firstPartyPrice(model2) {
|
|
48260
|
+
const value = normalizedModel(model2);
|
|
47643
48261
|
if (/claude-opus-(?:5|4-(?:5|6|7|8))(?:-|$)/u.test(value)) {
|
|
47644
48262
|
return { input: 5, cacheWrite: 6.25, cacheRead: 0.5, output: 25 };
|
|
47645
48263
|
}
|
|
@@ -47756,7 +48374,7 @@ var CONTEXT_USAGE_TTL_MS = 1e4;
|
|
|
47756
48374
|
var CONTEXT_USAGE_FAILURE_COOLDOWN_MS = 5e3;
|
|
47757
48375
|
var REQUEST_USAGE_RETRY_DELAYS_MS = [0, 100, 250, 500, 1e3];
|
|
47758
48376
|
var DEFAULT_CONTINUATION_QUIESCENCE_MS = 2e3;
|
|
47759
|
-
function
|
|
48377
|
+
function isRecord11(value) {
|
|
47760
48378
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
47761
48379
|
}
|
|
47762
48380
|
function safeNonNegativeInteger3(value) {
|
|
@@ -47765,7 +48383,7 @@ function safeNonNegativeInteger3(value) {
|
|
|
47765
48383
|
function transcriptRequestUsage(messages, messageId) {
|
|
47766
48384
|
for (let index = messages.length - 1; index >= 0; index -= 1) {
|
|
47767
48385
|
const entry = messages[index];
|
|
47768
|
-
if (!
|
|
48386
|
+
if (!isRecord11(entry) || entry.type !== "assistant" || entry.parent_tool_use_id !== null && entry.parent_tool_use_id !== void 0 || !isRecord11(entry.message) || entry.message.id !== messageId || !isRecord11(entry.message.usage)) {
|
|
47769
48387
|
continue;
|
|
47770
48388
|
}
|
|
47771
48389
|
const inputTokens = entry.message.usage.input_tokens;
|
|
@@ -47814,8 +48432,8 @@ function startupFailure(error52) {
|
|
|
47814
48432
|
if (error52 instanceof ClaudeCodeExecutableError) {
|
|
47815
48433
|
return { code: "notInstalled", message: error52.message, retryable: false };
|
|
47816
48434
|
}
|
|
47817
|
-
const
|
|
47818
|
-
if (
|
|
48435
|
+
const text2 = error52 instanceof Error ? error52.message.toLowerCase() : "";
|
|
48436
|
+
if (text2.includes("not logged in") || text2.includes("authentication") || text2.includes("api key")) {
|
|
47819
48437
|
return {
|
|
47820
48438
|
code: "authenticationRequired",
|
|
47821
48439
|
message: "Claude Code authentication is required",
|
|
@@ -47860,9 +48478,10 @@ function claudePermissionModeSelectionFailure(permissionMode, error52) {
|
|
|
47860
48478
|
};
|
|
47861
48479
|
}
|
|
47862
48480
|
}
|
|
48481
|
+
const detail = sanitizeDiagnosticTail(error52 instanceof Error ? error52.message : String(error52));
|
|
47863
48482
|
return {
|
|
47864
48483
|
code: "nativeFailure",
|
|
47865
|
-
message:
|
|
48484
|
+
message: `Claude Code rejected the Permission Mode selection${detail ? `: ${detail}` : ""}`,
|
|
47866
48485
|
retryable: true
|
|
47867
48486
|
};
|
|
47868
48487
|
}
|
|
@@ -47989,12 +48608,8 @@ var ClaudeHarnessSession = class {
|
|
|
47989
48608
|
#contextUsageCooldownUntilMs = 0;
|
|
47990
48609
|
#requestUsageBoundary = 0;
|
|
47991
48610
|
#autonomousOrdinal = 0;
|
|
47992
|
-
/**
|
|
47993
|
-
|
|
47994
|
-
* from a buffered autonomous Turn; null during live delivery. Read by the Item
|
|
47995
|
-
* lifecycle to stamp replayed reasoning/agentMessage durations.
|
|
47996
|
-
*/
|
|
47997
|
-
#replayObservedAtMs = null;
|
|
48611
|
+
/** The Host Turn that receives the native Segment Claude started on its own. */
|
|
48612
|
+
#autonomousTarget = null;
|
|
47998
48613
|
#occupancy = new ClaudeBackgroundOccupancy();
|
|
47999
48614
|
#cancelEscalation = null;
|
|
48000
48615
|
#continuationQuiescence = null;
|
|
@@ -48043,6 +48658,10 @@ var ClaudeHarnessSession = class {
|
|
|
48043
48658
|
this.#state = this.initialState;
|
|
48044
48659
|
this.#statePublished = durable;
|
|
48045
48660
|
this.outputs = this.#channel.outputs;
|
|
48661
|
+
for (const request of options.usageHistory.requests) {
|
|
48662
|
+
this.#event({ type: "usage.request", request });
|
|
48663
|
+
}
|
|
48664
|
+
this.#event({ type: "usage.history", complete: options.usageHistory.complete });
|
|
48046
48665
|
}
|
|
48047
48666
|
get nativeWriterRef() {
|
|
48048
48667
|
return this.#nativeRef;
|
|
@@ -48072,8 +48691,8 @@ var ClaudeHarnessSession = class {
|
|
|
48072
48691
|
messages = await this.#readSessionMessages({
|
|
48073
48692
|
cwd: this.#cwd,
|
|
48074
48693
|
sessionId: this.#sessionId
|
|
48075
|
-
});
|
|
48076
|
-
const ids = new Set(messages.flatMap((message) =>
|
|
48694
|
+
}) ?? [];
|
|
48695
|
+
const ids = new Set(messages.flatMap((message) => isRecord11(message) && typeof message.uuid === "string" ? [message.uuid] : []));
|
|
48077
48696
|
if (this.#unpersistedMessageIds.every((id) => ids.has(id))) {
|
|
48078
48697
|
this.#unpersistedMessageIds = [];
|
|
48079
48698
|
break;
|
|
@@ -48178,8 +48797,8 @@ var ClaudeHarnessSession = class {
|
|
|
48178
48797
|
textParts2.push(part.text);
|
|
48179
48798
|
}
|
|
48180
48799
|
}
|
|
48181
|
-
const
|
|
48182
|
-
if (
|
|
48800
|
+
const text2 = textParts2.join("\n");
|
|
48801
|
+
if (text2.length === 0 && imageParts.length === 0) {
|
|
48183
48802
|
return {
|
|
48184
48803
|
ok: false,
|
|
48185
48804
|
error: {
|
|
@@ -48189,7 +48808,7 @@ var ClaudeHarnessSession = class {
|
|
|
48189
48808
|
}
|
|
48190
48809
|
};
|
|
48191
48810
|
}
|
|
48192
|
-
const turnInput = imageParts.length === 0 ?
|
|
48811
|
+
const turnInput = imageParts.length === 0 ? text2 : [...text2.length > 0 ? [{ type: "text", text: text2 }] : [], ...imageParts];
|
|
48193
48812
|
this.#acceptingTurn = true;
|
|
48194
48813
|
const startingTransport = this.#transport === null;
|
|
48195
48814
|
let transport;
|
|
@@ -48203,6 +48822,16 @@ var ClaudeHarnessSession = class {
|
|
|
48203
48822
|
if (this.#phase !== "open") {
|
|
48204
48823
|
return { ok: false, error: invalidState("Claude Code Session closed during startup") };
|
|
48205
48824
|
}
|
|
48825
|
+
if (this.#active) {
|
|
48826
|
+
return {
|
|
48827
|
+
ok: false,
|
|
48828
|
+
error: {
|
|
48829
|
+
code: "sessionBusy",
|
|
48830
|
+
message: "Claude Code Session already has an active Turn",
|
|
48831
|
+
retryable: true
|
|
48832
|
+
}
|
|
48833
|
+
};
|
|
48834
|
+
}
|
|
48206
48835
|
if (startingTransport)
|
|
48207
48836
|
this.#publishState();
|
|
48208
48837
|
this.#usageGeneration += 1;
|
|
@@ -48319,6 +48948,16 @@ var ClaudeHarnessSession = class {
|
|
|
48319
48948
|
if (this.#phase !== "open") {
|
|
48320
48949
|
return { ok: false, error: invalidState("Claude Code Session closed during startup") };
|
|
48321
48950
|
}
|
|
48951
|
+
if (this.#active) {
|
|
48952
|
+
return {
|
|
48953
|
+
ok: false,
|
|
48954
|
+
error: {
|
|
48955
|
+
code: "sessionBusy",
|
|
48956
|
+
message: "Claude Code Session already has an active operation",
|
|
48957
|
+
retryable: true
|
|
48958
|
+
}
|
|
48959
|
+
};
|
|
48960
|
+
}
|
|
48322
48961
|
if (startingTransport)
|
|
48323
48962
|
this.#publishState();
|
|
48324
48963
|
this.#usageGeneration += 1;
|
|
@@ -48469,9 +49108,9 @@ var ClaudeHarnessSession = class {
|
|
|
48469
49108
|
}
|
|
48470
49109
|
};
|
|
48471
49110
|
}
|
|
48472
|
-
let
|
|
49111
|
+
let model2;
|
|
48473
49112
|
try {
|
|
48474
|
-
|
|
49113
|
+
model2 = decodeClaudeModelRef(command.model);
|
|
48475
49114
|
} catch {
|
|
48476
49115
|
return {
|
|
48477
49116
|
ok: false,
|
|
@@ -48493,7 +49132,7 @@ var ClaudeHarnessSession = class {
|
|
|
48493
49132
|
const transport = this.#transport;
|
|
48494
49133
|
if (transport) {
|
|
48495
49134
|
try {
|
|
48496
|
-
const sessionModel = claudeSessionModel(
|
|
49135
|
+
const sessionModel = claudeSessionModel(model2, await this.#longContextEnabled());
|
|
48497
49136
|
await transport.setModel(sessionModel);
|
|
48498
49137
|
this.#sdkModel = sessionModel;
|
|
48499
49138
|
} catch {
|
|
@@ -48834,8 +49473,8 @@ var ClaudeHarnessSession = class {
|
|
|
48834
49473
|
throw new Error("Claude Code Session closed during startup");
|
|
48835
49474
|
}
|
|
48836
49475
|
const selectedModel = this.#requestedModel ?? (this.#openMode === "create" ? CLAUDE_DEFAULT_MODEL_REF : void 0);
|
|
48837
|
-
const
|
|
48838
|
-
this.#sdkModel =
|
|
49476
|
+
const model2 = claudeSessionModel(selectedModel ? decodeClaudeModelRef(selectedModel) : void 0, await this.#longContextEnabled());
|
|
49477
|
+
this.#sdkModel = model2;
|
|
48839
49478
|
const permissionMode = decodeClaudePermissionModeId(this.#requestedPermissionModeId);
|
|
48840
49479
|
let transport;
|
|
48841
49480
|
try {
|
|
@@ -48843,7 +49482,7 @@ var ClaudeHarnessSession = class {
|
|
|
48843
49482
|
cwd: this.#cwd,
|
|
48844
49483
|
sessionId: this.#sessionId,
|
|
48845
49484
|
openMode: this.#openMode,
|
|
48846
|
-
...
|
|
49485
|
+
...model2 ? { model: model2 } : {},
|
|
48847
49486
|
thinkingOptionId: this.#requestedThinkingOptionId,
|
|
48848
49487
|
permissionMode,
|
|
48849
49488
|
allowDangerouslySkipPermissions: this.#bypassPermissionsAvailable,
|
|
@@ -48852,21 +49491,24 @@ var ClaudeHarnessSession = class {
|
|
|
48852
49491
|
onPlanLimit: (planLimit) => this.#handlePlanLimit(planLimit)
|
|
48853
49492
|
});
|
|
48854
49493
|
this.#transport = transport;
|
|
48855
|
-
transport.setAutonomousTurnHandler(
|
|
49494
|
+
transport.setAutonomousTurnHandler({
|
|
49495
|
+
start: (nativeTurnKey) => {
|
|
49496
|
+
this.#autonomousTarget = this.#startAutonomousTurn(nativeTurnKey);
|
|
49497
|
+
},
|
|
49498
|
+
onEvent: (event) => this.#deliverLiveEvent(this.#autonomousTarget, event),
|
|
49499
|
+
onTerminal: (result) => {
|
|
49500
|
+
const target = this.#autonomousTarget;
|
|
49501
|
+
this.#autonomousTarget = null;
|
|
49502
|
+
if (target)
|
|
49503
|
+
this.#finishResult(target, result);
|
|
49504
|
+
}
|
|
49505
|
+
});
|
|
48856
49506
|
transport.setThreadEventHandler((event) => {
|
|
48857
49507
|
if (event.type === "subagent.settled")
|
|
48858
49508
|
this.#settleNativeTask(event);
|
|
48859
49509
|
});
|
|
48860
49510
|
transport.setIdleTurnHandler({
|
|
48861
|
-
onEvent: (event) =>
|
|
48862
|
-
const active = this.#active;
|
|
48863
|
-
if (active) {
|
|
48864
|
-
this.#handleTurnEvent(active, event);
|
|
48865
|
-
return;
|
|
48866
|
-
}
|
|
48867
|
-
if (event.type === "subagent.settled")
|
|
48868
|
-
this.#settleNativeTask(event);
|
|
48869
|
-
},
|
|
49511
|
+
onEvent: (event) => this.#deliverLiveEvent(this.#active, event),
|
|
48870
49512
|
onTerminal: (result) => {
|
|
48871
49513
|
const active = this.#active;
|
|
48872
49514
|
if (active)
|
|
@@ -48943,6 +49585,11 @@ var ClaudeHarnessSession = class {
|
|
|
48943
49585
|
this.#publishState({ ...this.#state, effectivePermissionModeId });
|
|
48944
49586
|
}
|
|
48945
49587
|
#handleTurnEvent(active, event) {
|
|
49588
|
+
if (event.type === "usage.request") {
|
|
49589
|
+
if (this.#phase !== "closed" && this.#phase !== "faulted")
|
|
49590
|
+
this.#meterUsage(event.record);
|
|
49591
|
+
return;
|
|
49592
|
+
}
|
|
48946
49593
|
if (this.#active !== active || this.#phase === "closed" || this.#phase === "faulted")
|
|
48947
49594
|
return;
|
|
48948
49595
|
switch (event.type) {
|
|
@@ -49066,6 +49713,13 @@ var ClaudeHarnessSession = class {
|
|
|
49066
49713
|
return;
|
|
49067
49714
|
}
|
|
49068
49715
|
}
|
|
49716
|
+
/** Publishes one live request to Host metering; an unusable one marks history incomplete. */
|
|
49717
|
+
#meterUsage(record2) {
|
|
49718
|
+
if (record2.kind === "request")
|
|
49719
|
+
this.#event({ type: "usage.request", request: record2.request });
|
|
49720
|
+
else
|
|
49721
|
+
this.#event({ type: "usage.history", complete: false });
|
|
49722
|
+
}
|
|
49069
49723
|
#startCompaction(active) {
|
|
49070
49724
|
if (active.compactionItem)
|
|
49071
49725
|
throw new Error("Claude Code Compaction started more than once");
|
|
@@ -49217,8 +49871,8 @@ var ClaudeHarnessSession = class {
|
|
|
49217
49871
|
this.#activateAssistantMessage(active, messageId);
|
|
49218
49872
|
if (!active.item)
|
|
49219
49873
|
throw new Error("Claude Assistant text has no active Item");
|
|
49220
|
-
if (active.agentMessageStartedAtMs === null
|
|
49221
|
-
active.agentMessageStartedAtMs =
|
|
49874
|
+
if (active.agentMessageStartedAtMs === null) {
|
|
49875
|
+
active.agentMessageStartedAtMs = Date.now();
|
|
49222
49876
|
}
|
|
49223
49877
|
active.item = { ...active.item, text: active.item.text + delta };
|
|
49224
49878
|
this.#event({
|
|
@@ -49234,7 +49888,7 @@ var ClaudeHarnessSession = class {
|
|
|
49234
49888
|
if (!item || !completeEmpty && item.text.length === 0)
|
|
49235
49889
|
return;
|
|
49236
49890
|
active.item = null;
|
|
49237
|
-
const durationMs = this.#
|
|
49891
|
+
const durationMs = this.#itemDurationMs(active.agentMessageStartedAtMs);
|
|
49238
49892
|
active.agentMessageStartedAtMs = null;
|
|
49239
49893
|
this.#event({
|
|
49240
49894
|
type: "item.completed",
|
|
@@ -49243,14 +49897,13 @@ var ClaudeHarnessSession = class {
|
|
|
49243
49897
|
});
|
|
49244
49898
|
}
|
|
49245
49899
|
/**
|
|
49246
|
-
* Elapsed
|
|
49247
|
-
*
|
|
49248
|
-
* observation. Undefined for live delivery or when either endpoint is unknown.
|
|
49900
|
+
* Elapsed time between the first live delta and native Item completion.
|
|
49901
|
+
* Autonomous Segments now stream live, so they share the same clock as requested Turns.
|
|
49249
49902
|
*/
|
|
49250
|
-
#
|
|
49251
|
-
if (startedAtMs === null
|
|
49903
|
+
#itemDurationMs(startedAtMs) {
|
|
49904
|
+
if (startedAtMs === null)
|
|
49252
49905
|
return void 0;
|
|
49253
|
-
const durationMs =
|
|
49906
|
+
const durationMs = Date.now() - startedAtMs;
|
|
49254
49907
|
return durationMs >= 0 ? durationMs : void 0;
|
|
49255
49908
|
}
|
|
49256
49909
|
#appendReasoning(active, messageId, delta) {
|
|
@@ -49265,9 +49918,7 @@ var ClaudeHarnessSession = class {
|
|
|
49265
49918
|
text: ""
|
|
49266
49919
|
};
|
|
49267
49920
|
active.reasoningItems.set(messageId, item);
|
|
49268
|
-
|
|
49269
|
-
active.reasoningStartedAtMs.set(messageId, this.#replayObservedAtMs);
|
|
49270
|
-
}
|
|
49921
|
+
active.reasoningStartedAtMs.set(messageId, Date.now());
|
|
49271
49922
|
this.#event({ type: "item.started", turnId: active.command.turnId, item });
|
|
49272
49923
|
}
|
|
49273
49924
|
item = { ...item, text: item.text + delta };
|
|
@@ -49284,7 +49935,7 @@ var ClaudeHarnessSession = class {
|
|
|
49284
49935
|
if (!item)
|
|
49285
49936
|
return;
|
|
49286
49937
|
active.reasoningItems.delete(messageId);
|
|
49287
|
-
const durationMs = this.#
|
|
49938
|
+
const durationMs = this.#itemDurationMs(active.reasoningStartedAtMs.get(messageId) ?? null);
|
|
49288
49939
|
active.reasoningStartedAtMs.delete(messageId);
|
|
49289
49940
|
this.#event({
|
|
49290
49941
|
type: "item.completed",
|
|
@@ -49292,23 +49943,26 @@ var ClaudeHarnessSession = class {
|
|
|
49292
49943
|
snapshot: { item: durationMs === void 0 ? item : { ...item, durationMs }, outcome }
|
|
49293
49944
|
});
|
|
49294
49945
|
}
|
|
49295
|
-
|
|
49946
|
+
/**
|
|
49947
|
+
* Claude started Root output in a Segment no requested Turn owns. A held Turn continues with
|
|
49948
|
+
* it; otherwise it becomes a live autonomous Turn, so the Thread shows it running and a new
|
|
49949
|
+
* request waits instead of absorbing it.
|
|
49950
|
+
*/
|
|
49951
|
+
#startAutonomousTurn(segmentKey) {
|
|
49296
49952
|
if (this.#phase !== "open")
|
|
49297
|
-
return;
|
|
49298
|
-
const
|
|
49299
|
-
if (
|
|
49300
|
-
|
|
49301
|
-
|
|
49302
|
-
|
|
49303
|
-
if (this.#active)
|
|
49304
|
-
return;
|
|
49953
|
+
return null;
|
|
49954
|
+
const current = this.#active;
|
|
49955
|
+
if (current?.held)
|
|
49956
|
+
return current;
|
|
49957
|
+
if (current)
|
|
49958
|
+
return null;
|
|
49305
49959
|
this.#autonomousOrdinal += 1;
|
|
49306
49960
|
const turnId = hostTurnIdSchema.parse(this.#randomUUID());
|
|
49307
49961
|
let resolveCompletion = () => void 0;
|
|
49308
49962
|
const completion = new Promise((resolve2) => {
|
|
49309
49963
|
resolveCompletion = resolve2;
|
|
49310
49964
|
});
|
|
49311
|
-
const nativeTurnKey =
|
|
49965
|
+
const nativeTurnKey = segmentKey || `autonomous-${this.#autonomousOrdinal}`;
|
|
49312
49966
|
const item = {
|
|
49313
49967
|
type: "agentMessage",
|
|
49314
49968
|
itemId: claudeTranscriptItemId(nativeTurnKey, "agentMessage", 1),
|
|
@@ -49368,33 +50022,24 @@ var ClaudeHarnessSession = class {
|
|
|
49368
50022
|
type: "turn.autonomous.started",
|
|
49369
50023
|
turnId,
|
|
49370
50024
|
input: [],
|
|
49371
|
-
|
|
50025
|
+
startedAtMs: Date.now()
|
|
49372
50026
|
});
|
|
49373
50027
|
this.#event({ type: "turn.started", turnId });
|
|
49374
50028
|
this.#event({ type: "item.started", turnId, item });
|
|
49375
|
-
|
|
49376
|
-
}
|
|
49377
|
-
#continueHeldTurn(active, turn) {
|
|
49378
|
-
this.#replayAutonomousEvents(active, turn);
|
|
50029
|
+
return active;
|
|
49379
50030
|
}
|
|
49380
|
-
/**
|
|
49381
|
-
|
|
49382
|
-
|
|
49383
|
-
|
|
49384
|
-
|
|
49385
|
-
|
|
49386
|
-
|
|
49387
|
-
|
|
49388
|
-
|
|
49389
|
-
try {
|
|
49390
|
-
for (const event of turn.events) {
|
|
49391
|
-
this.#replayObservedAtMs = event.observedAtMs ?? null;
|
|
49392
|
-
this.#handleTurnEvent(active, event);
|
|
49393
|
-
}
|
|
49394
|
-
} finally {
|
|
49395
|
-
this.#replayObservedAtMs = null;
|
|
50031
|
+
/** Live native events outside a requested Root Segment; settlements stay Thread-level. */
|
|
50032
|
+
#deliverLiveEvent(target, event) {
|
|
50033
|
+
if (event.type === "usage.request") {
|
|
50034
|
+
this.#meterUsage(event.record);
|
|
50035
|
+
return;
|
|
50036
|
+
}
|
|
50037
|
+
if (target && this.#active === target) {
|
|
50038
|
+
this.#handleTurnEvent(target, event);
|
|
50039
|
+
return;
|
|
49396
50040
|
}
|
|
49397
|
-
|
|
50041
|
+
if (event.type === "subagent.settled")
|
|
50042
|
+
this.#settleNativeTask(event);
|
|
49398
50043
|
}
|
|
49399
50044
|
/**
|
|
49400
50045
|
* A native `task_notification` names the tool call that started its task: a
|
|
@@ -49534,7 +50179,7 @@ var ClaudeHarnessSession = class {
|
|
|
49534
50179
|
if (this.#phase !== "open" || this.#usageGeneration !== request.generation || this.#requestUsageBoundary !== request.boundary) {
|
|
49535
50180
|
return;
|
|
49536
50181
|
}
|
|
49537
|
-
const usage = transcriptRequestUsage(messages, request.messageId);
|
|
50182
|
+
const usage = transcriptRequestUsage(messages ?? [], request.messageId);
|
|
49538
50183
|
if (!usage)
|
|
49539
50184
|
continue;
|
|
49540
50185
|
const active = this.#active;
|
|
@@ -49602,11 +50247,11 @@ var ClaudeHarnessSession = class {
|
|
|
49602
50247
|
let outputTokens = 0;
|
|
49603
50248
|
let cachedInputTokens = 0;
|
|
49604
50249
|
let cacheWriteInputTokens = 0;
|
|
49605
|
-
for (const
|
|
49606
|
-
inputTokens +=
|
|
49607
|
-
outputTokens +=
|
|
49608
|
-
cachedInputTokens +=
|
|
49609
|
-
cacheWriteInputTokens +=
|
|
50250
|
+
for (const model2 of event.modelUsage) {
|
|
50251
|
+
inputTokens += model2.inputTokens;
|
|
50252
|
+
outputTokens += model2.outputTokens;
|
|
50253
|
+
cachedInputTokens += model2.cacheReadInputTokens;
|
|
50254
|
+
cacheWriteInputTokens += model2.cacheCreationInputTokens;
|
|
49610
50255
|
}
|
|
49611
50256
|
if (Number.isSafeInteger(inputTokens) && Number.isSafeInteger(outputTokens)) {
|
|
49612
50257
|
this.#calibratedInputTokens = inputTokens;
|
|
@@ -49860,6 +50505,7 @@ var ClaudeCodeAdapter = class {
|
|
|
49860
50505
|
},
|
|
49861
50506
|
resolveCandidate: (nativeSessionId) => this.#importScope.resolve((signal) => this.#importIndex.resolve(nativeSessionId, signal))
|
|
49862
50507
|
});
|
|
50508
|
+
usageStatistics;
|
|
49863
50509
|
subagents = {
|
|
49864
50510
|
readSnapshot: async (input) => {
|
|
49865
50511
|
if (input.parent.harnessId !== this.harnessId || input.nativeSubagentId.trim().length === 0) {
|
|
@@ -49886,7 +50532,7 @@ var ClaudeCodeAdapter = class {
|
|
|
49886
50532
|
]);
|
|
49887
50533
|
return {
|
|
49888
50534
|
ok: true,
|
|
49889
|
-
value: mapClaudeSubagentSnapshot(messages, input.parent.nativeSessionId, input.nativeSubagentId, parentMessages)
|
|
50535
|
+
value: mapClaudeSubagentSnapshot(messages, input.parent.nativeSessionId, input.nativeSubagentId, parentMessages ?? [])
|
|
49890
50536
|
};
|
|
49891
50537
|
} catch {
|
|
49892
50538
|
return {
|
|
@@ -49923,6 +50569,7 @@ var ClaudeCodeAdapter = class {
|
|
|
49923
50569
|
constructor(options = {}, dependencies) {
|
|
49924
50570
|
const environment = options.environment ?? process.env;
|
|
49925
50571
|
this.#environment = environment;
|
|
50572
|
+
this.usageStatistics = createClaudeUsageStatistics(environment);
|
|
49926
50573
|
this.#pendingSessions = new ClaudePendingSessions(environment);
|
|
49927
50574
|
this.#closeTimeoutMs = options.closeTimeoutMs ?? DEFAULT_CLOSE_TIMEOUT_MS;
|
|
49928
50575
|
this.#cancelTimeoutMs = options.cancelTimeoutMs ?? DEFAULT_CANCEL_TIMEOUT_MS;
|
|
@@ -49973,7 +50620,7 @@ var ClaudeCodeAdapter = class {
|
|
|
49973
50620
|
environment: options.environment ?? process.env,
|
|
49974
50621
|
sessionId
|
|
49975
50622
|
});
|
|
49976
|
-
return transcript
|
|
50623
|
+
return transcript;
|
|
49977
50624
|
},
|
|
49978
50625
|
readSubagentMessages: async ({ cwd, sessionId, nativeSubagentId: nativeSubagentId2 }) => {
|
|
49979
50626
|
const transcript = await readClaudeSubagentTranscript({
|
|
@@ -50001,7 +50648,7 @@ var ClaudeCodeAdapter = class {
|
|
|
50001
50648
|
error: invalidState("Claude Code Adapter is closing")
|
|
50002
50649
|
};
|
|
50003
50650
|
}
|
|
50004
|
-
const cwd =
|
|
50651
|
+
const cwd = path18.resolve(input.cwd ?? process.cwd());
|
|
50005
50652
|
if (!input.refresh) {
|
|
50006
50653
|
const cached2 = this.#inspectionCache.get(cwd);
|
|
50007
50654
|
if (cached2)
|
|
@@ -50197,7 +50844,7 @@ var ClaudeCodeAdapter = class {
|
|
|
50197
50844
|
}
|
|
50198
50845
|
requestedPermissionModeId = CLAUDE_DEFAULT_PERMISSION_MODE_ID;
|
|
50199
50846
|
}
|
|
50200
|
-
const cwd =
|
|
50847
|
+
const cwd = path18.resolve(input.cwd);
|
|
50201
50848
|
if (input.kind === "rollbackLastTurn") {
|
|
50202
50849
|
for (const source of this.#sessions) {
|
|
50203
50850
|
const ready = await source.prepareRollback(input.sourceRef.nativeSessionId);
|
|
@@ -50244,7 +50891,7 @@ var ClaudeCodeAdapter = class {
|
|
|
50244
50891
|
cwd,
|
|
50245
50892
|
sessionId: durableRef.nativeSessionId
|
|
50246
50893
|
});
|
|
50247
|
-
if (messages
|
|
50894
|
+
if ((messages?.length ?? 0) > 0 || input.kind === "resume" && input.knownTurnRefs?.length)
|
|
50248
50895
|
throw new Error("Pending Session unexpectedly contains history");
|
|
50249
50896
|
openMode = "create";
|
|
50250
50897
|
}
|
|
@@ -50271,6 +50918,8 @@ var ClaudeCodeAdapter = class {
|
|
|
50271
50918
|
};
|
|
50272
50919
|
}
|
|
50273
50920
|
}
|
|
50921
|
+
const sessionId = forked?.ok ? forked.value.sessionId : nativeRef?.success ? nativeRef.data.nativeSessionId : this.#dependencies.randomUUID();
|
|
50922
|
+
const usageHistory = await this.#readUsageHistory(cwd, sessionId, openMode);
|
|
50274
50923
|
const session = new ClaudeHarnessSession(cwd, this.#dependencies, this.#closeTimeoutMs, () => this.#sessions.delete(session), (planLimit) => this.#recordPlanLimit(session, planLimit), {
|
|
50275
50924
|
...input.environment ? { environment: input.environment } : {},
|
|
50276
50925
|
bypassPermissionsAvailable,
|
|
@@ -50278,7 +50927,8 @@ var ClaudeCodeAdapter = class {
|
|
|
50278
50927
|
pendingSessions: this.#pendingSessions,
|
|
50279
50928
|
knownConfiguration: input.kind === "rollbackLastTurn" || input.kind === "resume" && Boolean(input.model || input.thinkingOptionId) || Boolean(durableRef && isPendingClaudeSession(durableRef)),
|
|
50280
50929
|
...durableRef ? { nativeRef: durableRef } : {},
|
|
50281
|
-
sessionId
|
|
50930
|
+
sessionId,
|
|
50931
|
+
usageHistory,
|
|
50282
50932
|
...requestedModel ? { requestedModel } : {},
|
|
50283
50933
|
longContextEnabled: () => readClaudeLongContext(this.#environment),
|
|
50284
50934
|
requestedPermissionModeId,
|
|
@@ -50290,6 +50940,20 @@ var ClaudeCodeAdapter = class {
|
|
|
50290
50940
|
this.#sessions.add(session);
|
|
50291
50941
|
return { ok: true, value: session };
|
|
50292
50942
|
}
|
|
50943
|
+
/**
|
|
50944
|
+
* Every request already in the native transcript, for Host usage metering. A new Session has
|
|
50945
|
+
* none; an unreadable transcript is an incomplete history rather than an empty one.
|
|
50946
|
+
*/
|
|
50947
|
+
async #readUsageHistory(cwd, sessionId, openMode) {
|
|
50948
|
+
if (openMode === "create")
|
|
50949
|
+
return { requests: [], complete: true };
|
|
50950
|
+
try {
|
|
50951
|
+
const messages = await this.#dependencies.readSessionMessages({ cwd, sessionId });
|
|
50952
|
+
return messages === null ? { requests: [], complete: false } : claudeUsageHistory(messages);
|
|
50953
|
+
} catch {
|
|
50954
|
+
return { requests: [], complete: false };
|
|
50955
|
+
}
|
|
50956
|
+
}
|
|
50293
50957
|
/** Account-level plan windows are shared, but only stable native pushes may update them. */
|
|
50294
50958
|
#recordPlanLimit(origin, planLimit) {
|
|
50295
50959
|
const next = { ...this.#latestPlanLimit ?? {} };
|
|
@@ -50334,14 +50998,14 @@ var ClaudeCodeAdapter = class {
|
|
|
50334
50998
|
// dist/installation.js
|
|
50335
50999
|
import { readFile as readFile8, realpath as realpath3 } from "node:fs/promises";
|
|
50336
51000
|
import { homedir as homedir2 } from "node:os";
|
|
50337
|
-
import
|
|
51001
|
+
import path19 from "node:path";
|
|
50338
51002
|
async function readSettings(file2) {
|
|
50339
|
-
const
|
|
51003
|
+
const text2 = await readFile8(file2, "utf8").catch((error52) => {
|
|
50340
51004
|
if (error52.code === "ENOENT")
|
|
50341
51005
|
return "{}";
|
|
50342
51006
|
throw error52;
|
|
50343
51007
|
});
|
|
50344
|
-
const settings = JSON.parse(
|
|
51008
|
+
const settings = JSON.parse(text2);
|
|
50345
51009
|
if (!settings || typeof settings !== "object" || Array.isArray(settings))
|
|
50346
51010
|
throw new Error("Claude update settings are invalid");
|
|
50347
51011
|
return settings;
|
|
@@ -50355,9 +51019,9 @@ function createClaudeInstallation(environment, command) {
|
|
|
50355
51019
|
...command ? { command } : {}
|
|
50356
51020
|
});
|
|
50357
51021
|
const home = environment.HOME ?? environment.USERPROFILE ?? homedir2();
|
|
50358
|
-
const config2 = environment.CLAUDE_CONFIG_DIR ?
|
|
50359
|
-
const managedFile = process.platform === "darwin" ? "/Library/Application Support/ClaudeCode/managed-settings.json" : process.platform === "win32" ?
|
|
50360
|
-
const user = await readSettings(
|
|
51022
|
+
const config2 = environment.CLAUDE_CONFIG_DIR ? path19.resolve(home, environment.CLAUDE_CONFIG_DIR) : path19.join(home, ".claude");
|
|
51023
|
+
const managedFile = process.platform === "darwin" ? "/Library/Application Support/ClaudeCode/managed-settings.json" : process.platform === "win32" ? path19.join(environment.ProgramFiles ?? "C:\\Program Files", "ClaudeCode", "managed-settings.json") : "/etc/claude-code/managed-settings.json";
|
|
51024
|
+
const user = await readSettings(path19.join(config2, "settings.json"));
|
|
50361
51025
|
const managed = await readSettings(managedFile);
|
|
50362
51026
|
const settings = { ...user, ...managed, env: { ...user.env, ...managed.env } };
|
|
50363
51027
|
const env = { ...environment, ...settings.env };
|
|
@@ -50370,10 +51034,10 @@ function createClaudeInstallation(environment, command) {
|
|
|
50370
51034
|
throw new Error("Unknown Claude release channel");
|
|
50371
51035
|
const latestVersion = installationVersion(await fetchInstallationText(`https://downloads.claude.ai/claude-code-releases/${channel}`));
|
|
50372
51036
|
const npm = await npmInstallation(executable, ["@anthropic-ai/claude-code"], env);
|
|
50373
|
-
const launcher =
|
|
51037
|
+
const launcher = path19.join(home, ".local", "bin", process.platform === "win32" ? "claude.exe" : "claude");
|
|
50374
51038
|
const selected = await realpath3(executable);
|
|
50375
|
-
const versions =
|
|
50376
|
-
const native =
|
|
51039
|
+
const versions = path19.join(home, ".local", "share", "claude", "versions") + path19.sep;
|
|
51040
|
+
const native = path19.resolve(executable) === launcher && (selected.startsWith(versions) || process.platform === "win32" && selected === launcher);
|
|
50377
51041
|
const blocked = !!env.DISABLE_UPDATES && env.DISABLE_UPDATES !== "0" || !!settings.minimumVersion && newerInstallationVersion(latestVersion, installationVersion(settings.minimumVersion)) || !!settings.requiredMaximumVersion && newerInstallationVersion(installationVersion(settings.requiredMaximumVersion), latestVersion);
|
|
50378
51042
|
const canUpdate = !blocked && (npm?.canUpdate ?? native);
|
|
50379
51043
|
update = async () => {
|
|
@@ -50398,7 +51062,7 @@ function createClaudeInstallation(environment, command) {
|
|
|
50398
51062
|
}
|
|
50399
51063
|
|
|
50400
51064
|
// dist/user-shell-environment.js
|
|
50401
|
-
import
|
|
51065
|
+
import path20 from "node:path";
|
|
50402
51066
|
import { execFile as execFile4 } from "node:child_process";
|
|
50403
51067
|
var ENVIRONMENT_MARKER = Buffer.from("\0CODEXHOST_USER_SHELL_ENV_V1\0");
|
|
50404
51068
|
var ENVIRONMENT_COMMAND = "printf '\\0CODEXHOST_USER_SHELL_ENV_V1\\0'; /usr/bin/env -0";
|
|
@@ -50441,7 +51105,7 @@ async function withUserShellEnvironment(environment, dependencies) {
|
|
|
50441
51105
|
if (platform === "win32" || !environment.HOME)
|
|
50442
51106
|
return environment;
|
|
50443
51107
|
const shell = environment.SHELL?.trim() || defaultShell(platform);
|
|
50444
|
-
if (!shell || !SUPPORTED_SHELLS.has(
|
|
51108
|
+
if (!shell || !SUPPORTED_SHELLS.has(path20.basename(shell)))
|
|
50445
51109
|
return environment;
|
|
50446
51110
|
const cacheKey = `${platform}\0${shell}\0${environment.HOME}`;
|
|
50447
51111
|
const cached2 = dependencies ? void 0 : shellEnvironmentCache.get(cacheKey);
|