apps 0.0.1-beta.40 → 0.0.1-beta.42
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/framework-reference.json +1 -1
- package/js/{chunk-SALJXSS3.js → chunk-47BLLMRQ.js} +87 -31
- package/js/{chunk-ZUKBIHMK.js → chunk-4ZTVLEN6.js} +3 -3
- package/js/{chunk-KANDIVIH.js → chunk-5GLC42LK.js} +35 -26
- package/js/{chunk-DKUEYTYD.js → chunk-74YVXBKY.js} +1 -1
- package/js/{chunk-RIXVGVA6.js → chunk-AQU56EPI.js} +9 -5
- package/js/{chunk-KAQD3DTI.js → chunk-EG72MSVK.js} +1 -1
- package/js/{chunk-TT6OU4UG.js → chunk-EJUK2NK5.js} +2 -2
- package/js/{chunk-EM4UL26F.js → chunk-EMHFXFTJ.js} +3 -3
- package/js/{chunk-YQ35E7KS.js → chunk-H2CJWXA3.js} +1 -1
- package/js/{chunk-MXDKXAY4.js → chunk-IFJU5SYQ.js} +10 -0
- package/js/{chunk-6KABJTDO.js → chunk-ILYK7BQG.js} +3 -3
- package/js/{chunk-CQD3WSYH.js → chunk-IN2WIN7I.js} +2 -2
- package/js/{chunk-NKWWPJYX.js → chunk-JPEUKEV4.js} +1 -1
- package/js/{chunk-UOZMSUJ2.js → chunk-KBIKBWSS.js} +5 -3
- package/js/{chunk-GHXRRFZA.js → chunk-KGCTYL2S.js} +116 -22
- package/js/{chunk-VIU2XXA7.js → chunk-KSGYJV46.js} +2 -2
- package/js/{chunk-4TLZGG4B.js → chunk-KTPKTBKZ.js} +9 -9
- package/js/{chunk-3MMG2H6M.js → chunk-LNSVJS2Q.js} +1 -1
- package/js/{chunk-DHX2OI2X.js → chunk-MSDGZ7FA.js} +9 -9
- package/js/{chunk-P7MGDPFD.js → chunk-MWKHKOTL.js} +2 -2
- package/js/{chunk-VJQXXOQ3.js → chunk-MZH4J2PO.js} +2 -2
- package/js/{chunk-OTCLXFLL.js → chunk-OBXHQNWC.js} +5 -5
- package/js/{chunk-MYF7KWUB.js → chunk-RIKH5H2X.js} +7 -7
- package/js/{chunk-KIM5HXNK.js → chunk-T65AFHU3.js} +3 -3
- package/js/{chunk-PNVCCB4L.js → chunk-VU6GQ2SH.js} +4 -4
- package/js/{chunk-XDGUGB2A.js → chunk-XSD3RZFX.js} +5 -5
- package/js/{chunk-PDS2E2OZ.js → chunk-Z3S2IVI3.js} +2 -2
- package/js/client.js +10 -10
- package/js/contracts.js +8 -8
- package/js/effect.js +19 -19
- package/js/graphql.js +21 -21
- package/js/host.js +19 -19
- package/js/index.js +12 -12
- package/js/mcp/effect.js +21 -21
- package/js/mcp/stdio.js +21 -21
- package/js/mcp.js +23 -23
- package/js/openapi.js +17 -17
- package/js/react.js +2 -2
- package/js/skills/effect.js +6 -6
- package/js/skills.js +50 -23
- package/js/ui/auth/contracts.js +2 -2
- package/js/ui/auth.js +5 -5
- package/js/ui/contracts.js +5 -5
- package/js/ui/serving.js +10 -10
- package/package.json +1 -1
- package/runtime.json +1 -1
- package/types/app-cache/src/index.d.ts +10 -1
- package/types/apps/src/contracts/cache.d.ts +6 -0
- package/types/apps/src/contracts/skills.d.ts +12 -5
- package/types/apps/src/implementation/catalog-cache.d.ts +12 -1
- package/types/apps/src/implementation/elicitation.d.ts +4 -4
- package/types/apps/src/implementation/input-problems.d.ts +2 -1
- package/types/apps/src/implementation/schema.d.ts +9 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeCache
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AQU56EPI.js";
|
|
4
4
|
import {
|
|
5
5
|
accountSecrets,
|
|
6
6
|
boundFailureMessage,
|
|
@@ -11,30 +11,30 @@ import {
|
|
|
11
11
|
parseSkillLoadFailed,
|
|
12
12
|
readCatalog,
|
|
13
13
|
routerSkills
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KTPKTBKZ.js";
|
|
15
15
|
import {
|
|
16
16
|
appInvocationFetch
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-T65AFHU3.js";
|
|
18
18
|
import {
|
|
19
19
|
folderSkillsEffect
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-IN2WIN7I.js";
|
|
21
21
|
import {
|
|
22
22
|
ResponseStatusError,
|
|
23
23
|
isApp,
|
|
24
24
|
toEffectApp
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-XSD3RZFX.js";
|
|
26
26
|
import {
|
|
27
27
|
declaredOperations,
|
|
28
28
|
fromPromise,
|
|
29
29
|
locate,
|
|
30
30
|
nativeOperation,
|
|
31
31
|
toPromise
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-ILYK7BQG.js";
|
|
33
33
|
import {
|
|
34
34
|
accountProviderError,
|
|
35
35
|
httpProviderError,
|
|
36
36
|
parseProviderError
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-EMHFXFTJ.js";
|
|
38
38
|
import {
|
|
39
39
|
AccountCheckResult,
|
|
40
40
|
DeclaredProvider,
|
|
@@ -83,32 +83,35 @@ import {
|
|
|
83
83
|
migrationsDirectory,
|
|
84
84
|
reservedTablePrefix,
|
|
85
85
|
workflowDurationMillis
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-OBXHQNWC.js";
|
|
87
87
|
import {
|
|
88
88
|
CacheError
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-MWKHKOTL.js";
|
|
90
90
|
import {
|
|
91
91
|
AppSkills,
|
|
92
92
|
SkillFile
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-KBIKBWSS.js";
|
|
94
94
|
import {
|
|
95
95
|
captureTelemetry
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-VU6GQ2SH.js";
|
|
97
97
|
import {
|
|
98
98
|
allowedValues,
|
|
99
99
|
decoderOf,
|
|
100
100
|
echoableKey,
|
|
101
101
|
importedJsonSchema,
|
|
102
|
+
importedSchemaKeys,
|
|
102
103
|
jsonSchemaDecoder,
|
|
103
104
|
jsonSchemaDocument,
|
|
104
105
|
maxAlternativeKeys,
|
|
106
|
+
missingKey,
|
|
107
|
+
missingKeyText,
|
|
105
108
|
objectShape,
|
|
106
109
|
unionShape
|
|
107
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-KGCTYL2S.js";
|
|
108
111
|
import {
|
|
109
112
|
JsonObject,
|
|
110
113
|
JsonValue
|
|
111
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-H2CJWXA3.js";
|
|
112
115
|
import {
|
|
113
116
|
Base64_exports,
|
|
114
117
|
Cause_exports,
|
|
@@ -121,7 +124,7 @@ import {
|
|
|
121
124
|
SchemaIssue_exports,
|
|
122
125
|
Schema_exports,
|
|
123
126
|
Stream_exports
|
|
124
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-IFJU5SYQ.js";
|
|
125
128
|
|
|
126
129
|
// src/implementation/elicitation.ts
|
|
127
130
|
var prepareElicitation = (input) => Effect_exports.gen(function* () {
|
|
@@ -364,19 +367,33 @@ var memberSelector = (members) => {
|
|
|
364
367
|
)
|
|
365
368
|
);
|
|
366
369
|
};
|
|
367
|
-
var
|
|
370
|
+
var unionExpectation = (ast) => {
|
|
368
371
|
const members = unionMembers(ast);
|
|
369
372
|
const fixed = members.map(fixedValues);
|
|
370
373
|
const values = fixed.flatMap((memberValues) => memberValues === void 0 ? [] : memberValues);
|
|
371
374
|
const others = members.filter((_, index) => fixed[index] === void 0);
|
|
372
|
-
if (others.length === 0) return
|
|
373
|
-
return
|
|
375
|
+
if (others.length === 0) return allowedValues(values);
|
|
376
|
+
return unionShape(
|
|
374
377
|
[
|
|
375
378
|
...values.length === 0 ? [] : [allowedValues(values)],
|
|
376
379
|
...new Set(others.map(describeMember))
|
|
377
380
|
],
|
|
378
381
|
memberSelector(members)
|
|
379
|
-
)
|
|
382
|
+
);
|
|
383
|
+
};
|
|
384
|
+
var expectedUnion = (ast) => `Expected ${unionExpectation(ast)}`;
|
|
385
|
+
var expectedValue = (ast) => {
|
|
386
|
+
const encoded = SchemaAST_exports.toEncoded(ast);
|
|
387
|
+
const values = fixedValues(encoded);
|
|
388
|
+
if (values !== void 0) return allowedValues(values);
|
|
389
|
+
const members = unionMembers(encoded);
|
|
390
|
+
const [only] = members;
|
|
391
|
+
if (only === void 0) return void 0;
|
|
392
|
+
if (members.length > 1 && SchemaAST_exports.isUnion(encoded)) return unionExpectation(encoded);
|
|
393
|
+
if (SchemaAST_exports.isObjects(only) && only.propertySignatures.length > 0)
|
|
394
|
+
return nativeObjectShape(only);
|
|
395
|
+
const described = describeMember(only);
|
|
396
|
+
return described === "a value with other constraints" ? void 0 : described;
|
|
380
397
|
};
|
|
381
398
|
var leafHook = (issue) => SchemaIssue_exports.hasInput(issue) ? "Invalid value" : Match_exports.value(issue).pipe(
|
|
382
399
|
Match_exports.tag("InvalidType", ({ ast }) => {
|
|
@@ -387,30 +404,68 @@ var leafHook = (issue) => SchemaIssue_exports.hasInput(issue) ? "Invalid value"
|
|
|
387
404
|
);
|
|
388
405
|
var checkHook = (issue) => SchemaIssue_exports.hasInput(issue) || SchemaIssue_exports.hasInput(issue.issue) ? SchemaIssue_exports.defaultCheckHook(issue) ?? "Invalid value" : SchemaIssue_exports.defaultCheckHook(issue);
|
|
389
406
|
var format = SchemaIssue_exports.makeFormatterStandardSchemaV1({ leafHook, checkHook });
|
|
390
|
-
var
|
|
391
|
-
|
|
392
|
-
|
|
407
|
+
var declaredKey = (parent, key) => parent !== void 0 && SchemaAST_exports.isObjects(parent) ? parent.propertySignatures.find(({ name }) => name === key)?.type : void 0;
|
|
408
|
+
var nativeKeys = (parent) => (key) => parent.indexSignatures.length > 0 || parent.propertySignatures.some(({ name }) => name === key);
|
|
409
|
+
var located = (issue, path, parent) => Match_exports.value(issue).pipe(
|
|
410
|
+
Match_exports.tag("Pointer", (pointer) => {
|
|
411
|
+
const declared = pointer.issue._tag === "MissingKey" && pointer.path.length === 1 ? declaredKey(parent, pointer.path[0]) : void 0;
|
|
412
|
+
return declared === void 0 || parent === void 0 || !SchemaAST_exports.isObjects(parent) ? located(pointer.issue, [...path, ...pointer.path]) : [
|
|
413
|
+
{
|
|
414
|
+
path: [...path, ...pointer.path],
|
|
415
|
+
message: missingKey(expectedValue(declared)),
|
|
416
|
+
accepts: nativeKeys(parent)
|
|
417
|
+
}
|
|
418
|
+
];
|
|
419
|
+
}),
|
|
420
|
+
Match_exports.tag(
|
|
421
|
+
"Composite",
|
|
422
|
+
({ ast, issues }) => issues.flatMap((issue2) => located(issue2, path, ast))
|
|
423
|
+
),
|
|
393
424
|
Match_exports.tag("Encoding", (encoding) => located(encoding.issue, path)),
|
|
394
425
|
Match_exports.tag(
|
|
395
426
|
"AnyOf",
|
|
396
427
|
({ ast, issues }) => issues.length === 0 ? [{ path, message: expectedUnion(ast) }] : issues.flatMap((issue2) => located(issue2, path))
|
|
397
428
|
),
|
|
398
|
-
Match_exports.orElse(
|
|
399
|
-
|
|
429
|
+
Match_exports.orElse((issue2) => {
|
|
430
|
+
const accepts = issue2._tag === "Filter" ? importedSchemaKeys(issue2.filter) : void 0;
|
|
431
|
+
return format(issue2).issues.map((problem) => ({
|
|
400
432
|
path: [
|
|
401
433
|
...path,
|
|
402
434
|
...(problem.path ?? []).map((key) => typeof key === "object" ? key.key : key)
|
|
403
435
|
],
|
|
404
|
-
message: problem.message
|
|
405
|
-
|
|
406
|
-
|
|
436
|
+
message: problem.message,
|
|
437
|
+
...accepts === void 0 ? {} : { accepts }
|
|
438
|
+
}));
|
|
439
|
+
})
|
|
407
440
|
);
|
|
408
441
|
var segment = (key) => typeof key === "number" ? `[${key}]` : typeof key === "string" && echoableKey(key) ? `.${key}` : "[key]";
|
|
409
|
-
var
|
|
442
|
+
var rendered = (path) => `input${path.map(segment).join("")}`;
|
|
443
|
+
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
444
|
+
var valueAt = (input, path) => path.reduce(
|
|
445
|
+
(value, key) => Array.isArray(value) && typeof key === "number" ? value[key] : isRecord(value) && typeof key === "string" && Object.hasOwn(value, key) ? value[key] : void 0,
|
|
446
|
+
input
|
|
447
|
+
);
|
|
448
|
+
var spelling = (key) => key.toLowerCase().replace(/[-_]/g, "");
|
|
449
|
+
var suppliedElsewhere = (input, path, accepts) => {
|
|
450
|
+
const key = path.at(-1);
|
|
451
|
+
if (typeof key !== "string" || !echoableKey(key)) return void 0;
|
|
452
|
+
const at = path.slice(0, -1);
|
|
453
|
+
const holder = valueAt(input, at);
|
|
454
|
+
if (!isRecord(holder)) return void 0;
|
|
455
|
+
const candidates = Object.keys(holder).filter((name) => echoableKey(name) && !accepts(name));
|
|
456
|
+
const respelled = candidates.find((name) => name !== key && spelling(name) === spelling(key));
|
|
457
|
+
const deeper = candidates.find((name) => {
|
|
458
|
+
const child = holder[name];
|
|
459
|
+
return isRecord(child) && Object.hasOwn(child, key);
|
|
460
|
+
});
|
|
461
|
+
const found = respelled !== void 0 ? [...at, respelled] : deeper !== void 0 ? [...at, deeper, key] : void 0;
|
|
462
|
+
return found === void 0 ? void 0 : `The input has ${String(found.at(-1))} at ${rendered(found)}; did you mean ${rendered(path)}?`;
|
|
463
|
+
};
|
|
464
|
+
var inputInvalid = (error, input) => {
|
|
410
465
|
if (!Schema_exports.isSchemaError(error)) return new HostInputInvalid();
|
|
411
|
-
const problems = located(error.issue, []).slice(0, maxInputProblems).map(({ path, message }) => {
|
|
412
|
-
const
|
|
413
|
-
return `${
|
|
466
|
+
const problems = located(error.issue, []).slice(0, maxInputProblems).map(({ path, message, accepts }) => {
|
|
467
|
+
const elsewhere = accepts !== void 0 && message.startsWith(missingKeyText) ? suppliedElsewhere(input, path, accepts) : void 0;
|
|
468
|
+
return `${rendered(path)}: ${message}${elsewhere === void 0 ? "" : `. ${elsewhere}`}`.slice(
|
|
414
469
|
0,
|
|
415
470
|
512
|
|
416
471
|
);
|
|
@@ -912,6 +967,7 @@ var authorCache = (host, accounts, signal, deadline) => {
|
|
|
912
967
|
schema: decoderOf(options.schema),
|
|
913
968
|
freshFor: options.freshFor,
|
|
914
969
|
...options.staleFor === void 0 ? {} : { staleFor: options.staleFor },
|
|
970
|
+
...options.stale === void 0 ? {} : { stale: options.stale },
|
|
915
971
|
load: Effect_exports.acquireUseRelease(
|
|
916
972
|
Effect_exports.sync(() => new AbortController()),
|
|
917
973
|
(controller) => appInvocationFetch(controller.signal).pipe(
|
|
@@ -1450,7 +1506,7 @@ function dispatch(app, request, context, signal) {
|
|
|
1450
1506
|
() => Schema_exports.decodeUnknownEffect(tool.input)(request.input)
|
|
1451
1507
|
).pipe(
|
|
1452
1508
|
Effect_exports.catchCause(
|
|
1453
|
-
(cause) => Cause_exports.hasInterrupts(cause) ? Effect_exports.interrupt : Effect_exports.fail(inputInvalid(Cause_exports.squash(cause)))
|
|
1509
|
+
(cause) => Cause_exports.hasInterrupts(cause) ? Effect_exports.interrupt : Effect_exports.fail(inputInvalid(Cause_exports.squash(cause), request.input))
|
|
1454
1510
|
)
|
|
1455
1511
|
);
|
|
1456
1512
|
if (context.approval !== void 0) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
JsonValue
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-H2CJWXA3.js";
|
|
4
4
|
import {
|
|
5
5
|
HttpApiEndpoint_exports,
|
|
6
6
|
HttpApiGroup_exports,
|
|
7
7
|
HttpApiSchema_exports,
|
|
8
8
|
HttpApi_exports
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KSGYJV46.js";
|
|
10
10
|
import {
|
|
11
11
|
Schema_exports
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IFJU5SYQ.js";
|
|
13
13
|
|
|
14
14
|
// src/contracts/ui.ts
|
|
15
15
|
var UiContext = Schema_exports.Struct({
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CacheError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MWKHKOTL.js";
|
|
4
4
|
import {
|
|
5
5
|
wrap
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KGCTYL2S.js";
|
|
7
7
|
import {
|
|
8
8
|
JsonObject
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-H2CJWXA3.js";
|
|
10
10
|
import {
|
|
11
11
|
Duration_exports,
|
|
12
12
|
Effect_exports,
|
|
13
13
|
Schema_exports
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IFJU5SYQ.js";
|
|
15
15
|
|
|
16
16
|
// src/implementation/catalog-cache.ts
|
|
17
17
|
var catalogScope = (options, credential, invalid) => {
|
|
@@ -45,8 +45,37 @@ var catalogCache = (options) => Effect_exports.gen(function* () {
|
|
|
45
45
|
const staleFor = options.staleFor ?? "1 day";
|
|
46
46
|
const retention = Duration_exports.toMillis(Duration_exports.fromInputUnsafe(freshFor)) + Duration_exports.toMillis(Duration_exports.fromInputUnsafe(staleFor)) + 3e5;
|
|
47
47
|
const local = yield* Effect_exports.cached(options.load());
|
|
48
|
+
const pages = (cache2, revision, kind, count, decoder) => Effect_exports.gen(function* () {
|
|
49
|
+
const batches = yield* Effect_exports.forEach(
|
|
50
|
+
Array.from({ length: Math.ceil(count / 4) }, (_, batch) => batch * 4),
|
|
51
|
+
(offset) => invoke(
|
|
52
|
+
() => cache2.readMany(
|
|
53
|
+
Array.from(
|
|
54
|
+
{ length: Math.min(4, count - offset) },
|
|
55
|
+
(_, index) => part(revision, kind, offset + index)
|
|
56
|
+
),
|
|
57
|
+
schema(Schema_exports.Array(decoder))
|
|
58
|
+
)
|
|
59
|
+
),
|
|
60
|
+
{ concurrency: "unbounded" }
|
|
61
|
+
);
|
|
62
|
+
const values = [];
|
|
63
|
+
for (const page of batches.flat()) {
|
|
64
|
+
if (page === void 0) return yield* new CacheError({ reason: "unavailable" });
|
|
65
|
+
values.push(...page);
|
|
66
|
+
}
|
|
67
|
+
return values;
|
|
68
|
+
});
|
|
69
|
+
const kept = (cache2) => invoke(() => cache2.read(key, schema(Manifest))).pipe(
|
|
70
|
+
Effect_exports.map(
|
|
71
|
+
(manifest) => manifest === void 0 ? void 0 : {
|
|
72
|
+
header: manifest.header,
|
|
73
|
+
tools: pages(cache2, manifest.revision, "page", manifest.pages, options.schema)
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
);
|
|
48
77
|
const refresh = (context) => Effect_exports.gen(function* () {
|
|
49
|
-
const { tools, header } = yield* options.load(context);
|
|
78
|
+
const { tools, header } = yield* options.load(context, kept(context.cache));
|
|
50
79
|
const digest = yield* invoke(
|
|
51
80
|
() => crypto.subtle.digest(
|
|
52
81
|
"SHA-256",
|
|
@@ -130,6 +159,7 @@ var catalogCache = (options) => Effect_exports.gen(function* () {
|
|
|
130
159
|
schema: schema(Manifest),
|
|
131
160
|
freshFor,
|
|
132
161
|
staleFor,
|
|
162
|
+
...options.stale === void 0 ? {} : { stale: options.stale },
|
|
133
163
|
load: (context) => Effect_exports.runPromise(refresh(context), { signal: context.signal })
|
|
134
164
|
};
|
|
135
165
|
let reading;
|
|
@@ -142,27 +172,6 @@ var catalogCache = (options) => Effect_exports.gen(function* () {
|
|
|
142
172
|
if (cache === void 0) yield* local;
|
|
143
173
|
else yield* invoke(() => cache.revalidate(getOptions));
|
|
144
174
|
}
|
|
145
|
-
const pages = (cache2, revision, kind, count, decoder) => Effect_exports.gen(function* () {
|
|
146
|
-
const batches = yield* Effect_exports.forEach(
|
|
147
|
-
Array.from({ length: Math.ceil(count / 4) }, (_, batch) => batch * 4),
|
|
148
|
-
(offset) => invoke(
|
|
149
|
-
() => cache2.readMany(
|
|
150
|
-
Array.from(
|
|
151
|
-
{ length: Math.min(4, count - offset) },
|
|
152
|
-
(_, index) => part(revision, kind, offset + index)
|
|
153
|
-
),
|
|
154
|
-
schema(Schema_exports.Array(decoder))
|
|
155
|
-
)
|
|
156
|
-
),
|
|
157
|
-
{ concurrency: "unbounded" }
|
|
158
|
-
);
|
|
159
|
-
const values = [];
|
|
160
|
-
for (const page of batches.flat()) {
|
|
161
|
-
if (page === void 0) return yield* new CacheError({ reason: "unavailable" });
|
|
162
|
-
values.push(...page);
|
|
163
|
-
}
|
|
164
|
-
return values;
|
|
165
|
-
});
|
|
166
175
|
const metadata = () => Effect_exports.gen(function* () {
|
|
167
176
|
if (cache === void 0) return (yield* local).tools;
|
|
168
177
|
const manifest = yield* current();
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
CacheEntry,
|
|
4
4
|
CacheError,
|
|
5
5
|
cacheLimits
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MWKHKOTL.js";
|
|
7
7
|
import {
|
|
8
8
|
Clock_exports,
|
|
9
9
|
Duration_exports,
|
|
10
10
|
Effect_exports,
|
|
11
11
|
Exit_exports,
|
|
12
12
|
Schema_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-IFJU5SYQ.js";
|
|
14
14
|
|
|
15
15
|
// ../app-cache/src/index.ts
|
|
16
16
|
var canonical = (value) => {
|
|
@@ -111,13 +111,14 @@ var makeCache = (host, background, scope = "shared", deadline) => {
|
|
|
111
111
|
yield* Effect_exports.annotateCurrentSpan("cache.result", "fresh");
|
|
112
112
|
return yield* decode(entry.value);
|
|
113
113
|
}
|
|
114
|
-
|
|
114
|
+
const kept = !refresh && entry !== null && now < entry.staleUntil;
|
|
115
|
+
if (kept && options.stale !== "revalidate") {
|
|
115
116
|
yield* Effect_exports.annotateCurrentSpan("cache.result", "stale");
|
|
116
117
|
if (lease !== null) yield* background(load(lease).pipe(Effect_exports.asVoid));
|
|
117
118
|
return yield* decode(entry.value);
|
|
118
119
|
}
|
|
119
120
|
if (lease !== null) {
|
|
120
|
-
yield* Effect_exports.annotateCurrentSpan("cache.result", "miss");
|
|
121
|
+
yield* Effect_exports.annotateCurrentSpan("cache.result", kept ? "revalidated" : "miss");
|
|
121
122
|
return yield* load(lease);
|
|
122
123
|
}
|
|
123
124
|
if (now >= waitUntil) {
|
|
@@ -159,7 +160,10 @@ var makeCache = (host, background, scope = "shared", deadline) => {
|
|
|
159
160
|
Effect_exports.flatMap((key2) => transport({ operation: "invalidate", key: key2 })),
|
|
160
161
|
Effect_exports.asVoid
|
|
161
162
|
),
|
|
162
|
-
/**
|
|
163
|
+
/**
|
|
164
|
+
* Read fresh data, refresh stale data in the background (or first, with `stale: "revalidate"`),
|
|
165
|
+
* or wait for the lease owner.
|
|
166
|
+
*/
|
|
163
167
|
get: (options) => get(options, false),
|
|
164
168
|
/** Force one awaited refresh without removing the retained value. Concurrent refreshes share a load. */
|
|
165
169
|
revalidate: (options) => get(options, true)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
appSignInCallbackPath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JPEUKEV4.js";
|
|
4
4
|
import {
|
|
5
5
|
HttpServerResponse_exports
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LNSVJS2Q.js";
|
|
7
7
|
|
|
8
8
|
// src/implementation/ui-auth.ts
|
|
9
9
|
var appPrivateHeaders = {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ProviderError,
|
|
3
3
|
maxUpstreamMessageLength
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MWKHKOTL.js";
|
|
5
5
|
import {
|
|
6
6
|
AccountId
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-H2CJWXA3.js";
|
|
8
8
|
import {
|
|
9
9
|
Option_exports,
|
|
10
10
|
Schema_exports
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IFJU5SYQ.js";
|
|
12
12
|
|
|
13
13
|
// src/implementation/upstream-error.ts
|
|
14
14
|
var ErrorToken = Schema_exports.String.check(Schema_exports.isPattern(/^[A-Za-z0-9._-]{1,128}$/u));
|
|
@@ -3345,6 +3345,15 @@ __export(Tracer_exports, {
|
|
|
3345
3345
|
nativeTracer: () => nativeTracer
|
|
3346
3346
|
});
|
|
3347
3347
|
|
|
3348
|
+
// ../../node_modules/.bun/effect@4.0.1/node_modules/effect/dist/encoding/Hex.js
|
|
3349
|
+
var Hex_exports = {};
|
|
3350
|
+
__export(Hex_exports, {
|
|
3351
|
+
decode: () => decode,
|
|
3352
|
+
decodeString: () => decodeString,
|
|
3353
|
+
encode: () => encode,
|
|
3354
|
+
random: () => random2
|
|
3355
|
+
});
|
|
3356
|
+
|
|
3348
3357
|
// ../../node_modules/.bun/effect@4.0.1/node_modules/effect/dist/Data.js
|
|
3349
3358
|
var Data_exports = {};
|
|
3350
3359
|
__export(Data_exports, {
|
|
@@ -30786,6 +30795,7 @@ export {
|
|
|
30786
30795
|
TaggedError2 as TaggedError,
|
|
30787
30796
|
Data_exports,
|
|
30788
30797
|
random2 as random,
|
|
30798
|
+
Hex_exports,
|
|
30789
30799
|
make7 as make,
|
|
30790
30800
|
externalSpan,
|
|
30791
30801
|
DisablePropagation,
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
RouterKey,
|
|
4
4
|
RouterMeta,
|
|
5
5
|
reservedRouterKeys
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OBXHQNWC.js";
|
|
7
7
|
import {
|
|
8
8
|
decoderOf,
|
|
9
9
|
schemaArgument
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KGCTYL2S.js";
|
|
11
11
|
import {
|
|
12
12
|
Effect_exports,
|
|
13
13
|
Schema_exports
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IFJU5SYQ.js";
|
|
15
15
|
|
|
16
16
|
// src/implementation/authoring.ts
|
|
17
17
|
var NativeCallback = /* @__PURE__ */ Symbol("apps.NativeCallback");
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
SkillDefinitionInvalid,
|
|
6
6
|
SkillFile,
|
|
7
7
|
SkillFilePath
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KBIKBWSS.js";
|
|
9
9
|
import {
|
|
10
10
|
Effect_exports,
|
|
11
11
|
Schema_exports
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IFJU5SYQ.js";
|
|
13
13
|
|
|
14
14
|
// src/implementation/skill-files.ts
|
|
15
15
|
var skillFromFiles = (input, source = {}) => Effect_exports.gen(function* () {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RecordedMessage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EG72MSVK.js";
|
|
4
4
|
import {
|
|
5
5
|
SchemaGetter_exports,
|
|
6
6
|
Schema_exports
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IFJU5SYQ.js";
|
|
8
8
|
|
|
9
9
|
// ../utils/src/api-error.ts
|
|
10
10
|
var MessageField = Schema_exports.String.pipe(
|
|
@@ -138,7 +138,9 @@ var skillLoadLimits = {
|
|
|
138
138
|
files: 1e3,
|
|
139
139
|
fileBytes: 2e6,
|
|
140
140
|
totalBytes: 2e7,
|
|
141
|
-
concurrency: 8
|
|
141
|
+
concurrency: 8,
|
|
142
|
+
/** The request that checks whether a kept catalog's publication changed. */
|
|
143
|
+
checkMillis: 5e3
|
|
142
144
|
};
|
|
143
145
|
|
|
144
146
|
export {
|