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
package/js/skills.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
catalogCache,
|
|
3
3
|
catalogScope
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-5GLC42LK.js";
|
|
5
|
+
import "./chunk-AQU56EPI.js";
|
|
6
6
|
import {
|
|
7
7
|
failOnNetworkRefusal
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-T65AFHU3.js";
|
|
9
9
|
import {
|
|
10
10
|
folderSkillsEffect,
|
|
11
11
|
skillFromFiles
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IN2WIN7I.js";
|
|
13
13
|
import {
|
|
14
14
|
accountProviderError,
|
|
15
15
|
httpProviderError
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-EMHFXFTJ.js";
|
|
17
17
|
import {
|
|
18
18
|
NetworkRefused,
|
|
19
19
|
ProviderError,
|
|
20
20
|
networkRefusalStatus
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-MWKHKOTL.js";
|
|
22
22
|
import {
|
|
23
23
|
AppSkillMetadata,
|
|
24
24
|
AppSkillSource,
|
|
@@ -28,28 +28,29 @@ import {
|
|
|
28
28
|
SkillLoadFailed,
|
|
29
29
|
SkillServiceName,
|
|
30
30
|
skillLoadLimits
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-KBIKBWSS.js";
|
|
32
|
+
import "./chunk-VU6GQ2SH.js";
|
|
33
33
|
import {
|
|
34
34
|
FetchHttpClient_exports
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-MZH4J2PO.js";
|
|
36
36
|
import {
|
|
37
37
|
wrap
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-KGCTYL2S.js";
|
|
39
|
+
import "./chunk-EG72MSVK.js";
|
|
40
|
+
import "./chunk-H2CJWXA3.js";
|
|
41
|
+
import "./chunk-KSGYJV46.js";
|
|
42
42
|
import {
|
|
43
43
|
HttpBody_exports,
|
|
44
44
|
HttpClient_exports
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-LNSVJS2Q.js";
|
|
46
46
|
import {
|
|
47
47
|
Base64_exports,
|
|
48
48
|
Effect_exports,
|
|
49
|
+
Hex_exports,
|
|
49
50
|
Ref_exports,
|
|
50
51
|
Schema_exports,
|
|
51
52
|
Stream_exports
|
|
52
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-IFJU5SYQ.js";
|
|
53
54
|
import "./chunk-CZ7CSFO4.js";
|
|
54
55
|
|
|
55
56
|
// src/implementation/inflate.ts
|
|
@@ -809,14 +810,30 @@ var cachedSkillDirectories = (cache, transport, options, commit) => Effect_expor
|
|
|
809
810
|
})
|
|
810
811
|
)
|
|
811
812
|
});
|
|
812
|
-
var
|
|
813
|
+
var digest = (value) => Effect_exports.promise(
|
|
814
|
+
() => crypto.subtle.digest("SHA-256", new TextEncoder().encode(JSON.stringify(value)))
|
|
815
|
+
).pipe(Effect_exports.map((bytes) => Hex_exports.encode(new Uint8Array(bytes))));
|
|
816
|
+
var checked = (request) => request.pipe(
|
|
817
|
+
Effect_exports.timeoutOrElse({
|
|
818
|
+
duration: skillLoadLimits.checkMillis,
|
|
819
|
+
orElse: () => Effect_exports.fail(failed("request"))
|
|
820
|
+
})
|
|
821
|
+
);
|
|
822
|
+
var cachedCatalog = (options, prefix, publication) => options.cache === void 0 ? publication(options, void 0).pipe(Effect_exports.flatMap((source) => source.load)) : catalogCache({
|
|
813
823
|
cache: options.cache,
|
|
814
824
|
...options.freshFor === void 0 ? {} : { freshFor: options.freshFor },
|
|
815
825
|
...options.staleFor === void 0 ? {} : { staleFor: options.staleFor },
|
|
826
|
+
stale: "revalidate",
|
|
816
827
|
prefix,
|
|
817
828
|
schema: AppSkillSource,
|
|
818
829
|
summary: { schema: AppSkillMetadata, of: ({ files: _files, ...metadata }) => metadata },
|
|
819
|
-
load: (context
|
|
830
|
+
load: (context, kept) => Effect_exports.gen(function* () {
|
|
831
|
+
const source = yield* context === void 0 ? publication(options, options.cache) : publication({ fetch: options.fetch, signal: context.signal }, context.cache);
|
|
832
|
+
if (source.id === void 0) return { tools: yield* source.load };
|
|
833
|
+
const previous = kept === void 0 ? void 0 : yield* kept;
|
|
834
|
+
const tools = previous?.header?.["publication"] === source.id ? yield* previous.tools : yield* source.load;
|
|
835
|
+
return { tools, header: { publication: source.id } };
|
|
836
|
+
})
|
|
820
837
|
}).pipe(
|
|
821
838
|
Effect_exports.flatMap((catalog) => catalog.list()),
|
|
822
839
|
Effect_exports.mapError(
|
|
@@ -858,12 +875,18 @@ var githubSkillsEffect = (options) => Effect_exports.gen(function* () {
|
|
|
858
875
|
return yield* cachedCatalog(
|
|
859
876
|
cache === void 0 ? options : { ...options, cache },
|
|
860
877
|
["apps/githubSkills/catalog", 1, options.repo, options.ref ?? null, options.path ?? null],
|
|
861
|
-
(transport, cache2) =>
|
|
878
|
+
(transport, cache2) => githubPublication(options, transport, cache2)
|
|
862
879
|
);
|
|
863
880
|
}).pipe(withService("GitHub"), Effect_exports.mapError(attributed(options.account)));
|
|
864
|
-
var
|
|
881
|
+
var githubPublication = (options, transport, cache) => Effect_exports.gen(function* () {
|
|
865
882
|
const github = githubRequests(yield* reader(transport), options.repo, options.token);
|
|
866
|
-
const commit = yield* resolveCommit(github, options.ref);
|
|
883
|
+
const commit = yield* checked(resolveCommit(github, options.ref));
|
|
884
|
+
return {
|
|
885
|
+
id: commit,
|
|
886
|
+
load: githubCatalog(options, github, commit, transport, cache)
|
|
887
|
+
};
|
|
888
|
+
});
|
|
889
|
+
var githubCatalog = (options, github, commit, transport, cache) => Effect_exports.gen(function* () {
|
|
867
890
|
const resources = yield* cache === void 0 ? skillDirectories(github, commit, options.path) : cachedSkillDirectories(cache, transport, options, commit);
|
|
868
891
|
const skills = yield* Effect_exports.forEach(
|
|
869
892
|
resources,
|
|
@@ -908,13 +931,17 @@ var wellKnownSkillsEffect = (options) => Effect_exports.gen(function* () {
|
|
|
908
931
|
return yield* cachedCatalog(
|
|
909
932
|
options,
|
|
910
933
|
["apps/wellKnownSkills/catalog", 1, url.href],
|
|
911
|
-
(transport) =>
|
|
934
|
+
(transport) => wellKnownPublication(url, transport)
|
|
912
935
|
);
|
|
913
936
|
}).pipe(withService(URL.canParse(options.url) ? new URL(options.url).hostname : void 0));
|
|
914
|
-
var
|
|
937
|
+
var wellKnownPublication = (url, transport) => Effect_exports.gen(function* () {
|
|
915
938
|
const remote = yield* reader(transport);
|
|
916
|
-
const first = yield* remote.read(url.href);
|
|
939
|
+
const first = yield* checked(remote.read(url.href));
|
|
917
940
|
const index = yield* parse(Schema_exports.fromJsonString(Index), first);
|
|
941
|
+
const id = index.skills.every((skill) => skill.version !== void 0) ? yield* digest(index.skills.map(({ name, version, files }) => [name, version, files])) : void 0;
|
|
942
|
+
return { id, load: wellKnownCatalog(url, remote, first, index) };
|
|
943
|
+
});
|
|
944
|
+
var wellKnownCatalog = (url, remote, first, index) => Effect_exports.gen(function* () {
|
|
918
945
|
if (index.skills.reduce((count, skill) => count + skill.files.length, 0) > skillLoadLimits.files)
|
|
919
946
|
return yield* failed("limit");
|
|
920
947
|
const skills = yield* Effect_exports.forEach(
|
package/js/ui/auth/contracts.js
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
AppSignInFailure,
|
|
6
6
|
AppSignInId,
|
|
7
7
|
appSignInCallbackPath
|
|
8
|
-
} from "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
8
|
+
} from "../../chunk-JPEUKEV4.js";
|
|
9
|
+
import "../../chunk-IFJU5SYQ.js";
|
|
10
10
|
import "../../chunk-CZ7CSFO4.js";
|
|
11
11
|
export {
|
|
12
12
|
AppReturnPath,
|
package/js/ui/auth.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
appRedirect,
|
|
4
4
|
appSignInCallback,
|
|
5
5
|
appSignInFailed
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-EJUK2NK5.js";
|
|
7
7
|
import {
|
|
8
8
|
AppReturnPath,
|
|
9
9
|
AppSignInCallback,
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
AppSignInFailure,
|
|
12
12
|
AppSignInId,
|
|
13
13
|
appSignInCallbackPath
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
14
|
+
} from "../chunk-JPEUKEV4.js";
|
|
15
|
+
import "../chunk-MZH4J2PO.js";
|
|
16
|
+
import "../chunk-LNSVJS2Q.js";
|
|
17
|
+
import "../chunk-IFJU5SYQ.js";
|
|
18
18
|
import "../chunk-CZ7CSFO4.js";
|
|
19
19
|
export {
|
|
20
20
|
AppReturnPath,
|
package/js/ui/contracts.js
CHANGED
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
UiOperation,
|
|
8
8
|
UiSnapshot,
|
|
9
9
|
UiUnauthorized
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-4ZTVLEN6.js";
|
|
11
|
+
import "../chunk-H2CJWXA3.js";
|
|
12
|
+
import "../chunk-KSGYJV46.js";
|
|
13
|
+
import "../chunk-LNSVJS2Q.js";
|
|
14
|
+
import "../chunk-IFJU5SYQ.js";
|
|
15
15
|
import "../chunk-CZ7CSFO4.js";
|
|
16
16
|
export {
|
|
17
17
|
AppUiApi,
|
package/js/ui/serving.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
appPrivateHeaders
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-EJUK2NK5.js";
|
|
4
|
+
import "../chunk-JPEUKEV4.js";
|
|
5
5
|
import {
|
|
6
6
|
UiForbidden
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-4ZTVLEN6.js";
|
|
8
8
|
import {
|
|
9
9
|
CurrentTelemetryConfig
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-VU6GQ2SH.js";
|
|
11
|
+
import "../chunk-MZH4J2PO.js";
|
|
12
|
+
import "../chunk-EG72MSVK.js";
|
|
13
|
+
import "../chunk-H2CJWXA3.js";
|
|
14
|
+
import "../chunk-KSGYJV46.js";
|
|
15
15
|
import {
|
|
16
16
|
HttpServerRequest_exports,
|
|
17
17
|
HttpServerResponse_exports
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-LNSVJS2Q.js";
|
|
19
19
|
import {
|
|
20
20
|
Effect_exports
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-IFJU5SYQ.js";
|
|
22
22
|
import "../chunk-CZ7CSFO4.js";
|
|
23
23
|
|
|
24
24
|
// src/implementation/browser-scripts.gen.ts
|