apps 0.0.1-beta.3 → 0.0.1-beta.30
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 +68 -44
- package/framework-reference.json +1 -1
- package/js/{chunk-G7ZIRKMK.js → chunk-2D2PKLGQ.js} +118 -197
- package/js/chunk-3SPRHIEE.js +42 -0
- package/js/{chunk-FDNTX5QJ.js → chunk-4N26L465.js} +2 -2
- package/js/chunk-5ZHHO4OM.js +92 -0
- package/js/{chunk-EVJUVWN2.js → chunk-65SZ23BK.js} +2 -2
- package/js/{chunk-M6ZRRIBI.js → chunk-6JBTHTI5.js} +1 -1
- package/js/{chunk-J7O55ZV7.js → chunk-6NK26ONC.js} +332 -187
- package/js/chunk-6VWYEQ4X.js +254 -0
- package/js/{chunk-RN2MXB4R.js → chunk-AE4FWJQU.js} +128 -24
- package/js/{chunk-HDJH3RPR.js → chunk-BBTELEAN.js} +2 -2
- package/js/{chunk-LGIYBDWA.js → chunk-BRGF7VFN.js} +65 -1
- package/js/{chunk-MYYEW3RA.js → chunk-BSRU52RU.js} +984 -61
- package/js/{chunk-FZJOYIZO.js → chunk-BTJMXW4I.js} +1 -1
- package/js/{chunk-HDTGZWP2.js → chunk-IMCEF6KE.js} +139 -32
- package/js/chunk-KQCMHI3K.js +118 -0
- package/js/{chunk-BMOIAIVR.js → chunk-M2KEEOIQ.js} +49 -1
- package/js/{chunk-YEJOQEII.js → chunk-MYCVMDWI.js} +45 -7
- package/js/{chunk-FW5HBOIK.js → chunk-NXTXZ635.js} +1841 -1701
- package/js/chunk-OD3KFKZD.js +1617 -0
- package/js/{chunk-JN55AYQH.js → chunk-OI5CKSBU.js} +61 -32
- package/js/{chunk-NQ3OMCA5.js → chunk-P46HIAX6.js} +2 -2
- package/js/chunk-PUC24GZP.js +801 -0
- package/js/{chunk-SATWJKN6.js → chunk-PWF2DRJ3.js} +1 -1
- package/js/{chunk-D47C7KG5.js → chunk-VUVBMNKC.js} +2 -2
- package/js/{chunk-ZCAMUXSG.js → chunk-WGBI5MVX.js} +3 -4
- package/js/{chunk-T2LAZCAD.js → chunk-WQ5MVBTP.js} +1 -1
- package/js/{chunk-PLCMJREA.js → chunk-XBQTJP76.js} +60 -20
- package/js/{chunk-QKHR7BMF.js → chunk-XGN5IFOZ.js} +3 -3
- package/js/{chunk-WFSQXYUT.js → chunk-YML53Z7H.js} +42 -5
- package/js/{chunk-5MQZEB6Y.js → chunk-ZZOCEUTB.js} +37 -12
- package/js/client.js +120 -84
- package/js/contracts.js +110 -16
- package/js/effect.js +20 -20
- package/js/{es-APDZKREY.js → es-DIULA3ZF.js} +62 -1659
- package/js/graphql.js +58 -54
- package/js/host.js +20 -20
- package/js/index.js +247 -204
- package/js/mcp/effect.js +24 -22
- package/js/mcp/stdio.js +35 -30
- package/js/mcp.js +105 -68
- package/js/openapi.js +4087 -1503
- package/js/react.js +3 -3
- package/js/skills/effect.js +5 -3
- package/js/skills.js +15 -15
- package/js/storage/facet.js +4 -4
- package/js/ui/auth/contracts.js +2 -2
- package/js/ui/auth.js +5 -5
- package/js/ui/contracts.js +5 -4
- package/js/ui/serving.js +8516 -214
- package/package.json +1 -1
- package/runtime.json +1 -1
- package/types/app-data/src/contracts/database.d.ts +33 -6
- package/types/app-data/src/implementation/schema.d.ts +2 -17
- package/types/apps/src/contracts/api-response-error.d.ts +4 -0
- package/types/apps/src/contracts/app.d.ts +7 -6
- package/types/apps/src/contracts/failure.d.ts +54 -0
- package/types/apps/src/contracts/graphql.d.ts +2 -1
- package/types/apps/src/contracts/host.d.ts +34 -11
- package/types/apps/src/contracts/mcp.d.ts +91 -10
- package/types/apps/src/contracts/network.d.ts +84 -0
- package/types/apps/src/contracts/openapi-compile.d.ts +31 -3
- package/types/apps/src/contracts/openapi.d.ts +45 -9
- package/types/apps/src/contracts/operations.d.ts +5 -6
- package/types/apps/src/contracts/protocol-version.d.ts +2 -2
- package/types/apps/src/contracts/protocols/1.d.ts +251 -69
- package/types/apps/src/contracts/protocols/2.d.ts +710 -0
- package/types/apps/src/contracts/protocols/3.d.ts +716 -0
- package/types/apps/src/contracts/protocols/4.d.ts +1298 -0
- package/types/apps/src/contracts/protocols/5.d.ts +1174 -0
- package/types/apps/src/contracts/protocols/6.d.ts +1620 -0
- package/types/apps/src/contracts/protocols/7.d.ts +1784 -0
- package/types/apps/src/contracts/protocols/8.d.ts +1119 -0
- package/types/apps/src/contracts/protocols/oauth.d.ts +89 -0
- package/types/apps/src/contracts/provider-error.d.ts +9 -0
- package/types/apps/src/contracts/provider.d.ts +115 -10
- package/types/apps/src/contracts/router.d.ts +59 -0
- package/types/apps/src/contracts/skills.d.ts +18 -5
- package/types/apps/src/contracts/storage.d.ts +3 -3
- package/types/apps/src/contracts/ui.d.ts +18 -0
- package/types/apps/src/contracts/workflows.d.ts +34 -3
- package/types/apps/src/graphql.d.ts +1 -3
- package/types/apps/src/implementation/account-router.d.ts +12 -0
- package/types/apps/src/implementation/app.d.ts +5 -4
- package/types/apps/src/implementation/browser-scripts.gen.d.ts +6 -0
- package/types/apps/src/implementation/catalog-cache.d.ts +34 -4
- package/types/apps/src/implementation/elicitation.d.ts +9 -9
- package/types/apps/src/implementation/failure-detail.d.ts +46 -0
- package/types/apps/src/implementation/graphql-catalog.d.ts +4 -7
- package/types/apps/src/implementation/graphql.d.ts +4 -3
- package/types/apps/src/implementation/mcp-call.d.ts +6 -5
- package/types/apps/src/implementation/mcp-catalog.d.ts +7 -8
- package/types/apps/src/implementation/mcp-client.d.ts +49 -25
- package/types/apps/src/implementation/mcp-stdio.d.ts +1 -1
- package/types/apps/src/implementation/mcp-tools.d.ts +2 -1
- package/types/apps/src/implementation/mcp.d.ts +52 -25
- package/types/apps/src/implementation/network.d.ts +16 -0
- package/types/apps/src/implementation/openapi-compile.d.ts +27 -6
- package/types/apps/src/implementation/openapi-document.d.ts +35 -8
- package/types/apps/src/implementation/openapi-names.d.ts +9 -4
- package/types/apps/src/implementation/openapi-request.d.ts +10 -2
- package/types/apps/src/implementation/openapi-source.d.ts +8 -6
- package/types/apps/src/implementation/openapi-upgrade.d.ts +4 -0
- package/types/apps/src/implementation/operations.d.ts +36 -3
- package/types/apps/src/implementation/protocol-operations.d.ts +6 -4
- package/types/apps/src/implementation/provider-error.d.ts +28 -1
- package/types/apps/src/implementation/provider.d.ts +19 -5
- package/types/apps/src/implementation/router-catalog.d.ts +224 -0
- package/types/apps/src/implementation/router.d.ts +68 -0
- package/types/apps/src/implementation/runtime-yield.d.ts +7 -0
- package/types/apps/src/implementation/schema.d.ts +52 -1
- package/types/apps/src/implementation/skills.d.ts +2 -2
- package/types/apps/src/implementation/storage.d.ts +5 -3
- package/types/apps/src/implementation/ui-account-notice.d.ts +9 -0
- package/types/apps/src/implementation/ui-client.d.ts +2 -2
- package/types/apps/src/implementation/ui-document.d.ts +5 -0
- package/types/apps/src/implementation/ui-errors.d.ts +1 -1
- package/types/apps/src/implementation/ui-serving.d.ts +10 -4
- package/types/apps/src/implementation/ui-watch.d.ts +1 -1
- package/types/apps/src/implementation/upstream-error.d.ts +7 -0
- package/types/apps/src/implementation/webhooks.d.ts +1 -1
- package/types/apps/src/implementation/workflow-context.d.ts +11 -3
- package/types/apps/src/index.d.ts +29 -11
- package/types/apps/src/mcp-stdio.d.ts +2 -5
- package/types/apps/src/mcp.d.ts +25 -5
- package/types/apps/src/openapi.d.ts +6 -6
- package/types/apps/src/skills.d.ts +4 -4
- package/types/telemetry/src/browser-operations.d.ts +5 -2
- package/types/telemetry/src/config.d.ts +2 -2
- package/types/utils/src/api-error.d.ts +48 -0
- package/js/chunk-PYUYJRSK.js +0 -93
- package/js/chunk-SWPD52J7.js +0 -35
- package/js/chunk-W7D7WVSY.js +0 -18
- package/js/chunk-Z5NMEGJN.js +0 -29
- package/js/chunk-ZJWDMTE3.js +0 -63
- package/types/apps/src/contracts/dynamic-tools.d.ts +0 -13
- package/types/apps/src/implementation/account-operations.d.ts +0 -151
- package/types/apps/src/implementation/dynamic-tools.d.ts +0 -8
|
@@ -19,10 +19,7 @@ import {
|
|
|
19
19
|
text,
|
|
20
20
|
uint8Array,
|
|
21
21
|
urlParams
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import {
|
|
24
|
-
JsonValue
|
|
25
|
-
} from "./chunk-SATWJKN6.js";
|
|
22
|
+
} from "./chunk-XGN5IFOZ.js";
|
|
26
23
|
import {
|
|
27
24
|
Cause,
|
|
28
25
|
Defect,
|
|
@@ -31,7 +28,6 @@ import {
|
|
|
31
28
|
Literal,
|
|
32
29
|
Never,
|
|
33
30
|
RecordFromUrlParams,
|
|
34
|
-
Schema_exports,
|
|
35
31
|
Service,
|
|
36
32
|
String as String2,
|
|
37
33
|
Struct,
|
|
@@ -118,39 +114,11 @@ import {
|
|
|
118
114
|
transformEffect,
|
|
119
115
|
transformPull,
|
|
120
116
|
void_2 as void_
|
|
121
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-NXTXZ635.js";
|
|
122
118
|
import {
|
|
123
119
|
__export
|
|
124
120
|
} from "./chunk-CZ7CSFO4.js";
|
|
125
121
|
|
|
126
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApi.js
|
|
127
|
-
var HttpApi_exports = {};
|
|
128
|
-
__export(HttpApi_exports, {
|
|
129
|
-
AdditionalSchemas: () => AdditionalSchemas,
|
|
130
|
-
ParseOptions: () => ParseOptions,
|
|
131
|
-
isHttpApi: () => isHttpApi,
|
|
132
|
-
make: () => make4,
|
|
133
|
-
reflect: () => reflect
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApiEndpoint.js
|
|
137
|
-
var HttpApiEndpoint_exports = {};
|
|
138
|
-
__export(HttpApiEndpoint_exports, {
|
|
139
|
-
delete: () => del,
|
|
140
|
-
get: () => get2,
|
|
141
|
-
getErrorSchemas: () => getErrorSchemas,
|
|
142
|
-
getPayloadSchemas: () => getPayloadSchemas,
|
|
143
|
-
getSuccessSchemas: () => getSuccessSchemas,
|
|
144
|
-
head: () => head,
|
|
145
|
-
isHttpApiEndpoint: () => isHttpApiEndpoint,
|
|
146
|
-
make: () => make3,
|
|
147
|
-
options: () => options,
|
|
148
|
-
patch: () => patch,
|
|
149
|
-
post: () => post,
|
|
150
|
-
put: () => put,
|
|
151
|
-
query: () => query
|
|
152
|
-
});
|
|
153
|
-
|
|
154
122
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApiSchema.js
|
|
155
123
|
var HttpApiSchema_exports = {};
|
|
156
124
|
__export(HttpApiSchema_exports, {
|
|
@@ -655,6 +623,24 @@ function getStatusErrorSchema(schema) {
|
|
|
655
623
|
return getStatusError(schema.ast);
|
|
656
624
|
}
|
|
657
625
|
|
|
626
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApiEndpoint.js
|
|
627
|
+
var HttpApiEndpoint_exports = {};
|
|
628
|
+
__export(HttpApiEndpoint_exports, {
|
|
629
|
+
delete: () => del,
|
|
630
|
+
get: () => get2,
|
|
631
|
+
getErrorSchemas: () => getErrorSchemas,
|
|
632
|
+
getPayloadSchemas: () => getPayloadSchemas,
|
|
633
|
+
getSuccessSchemas: () => getSuccessSchemas,
|
|
634
|
+
head: () => head,
|
|
635
|
+
isHttpApiEndpoint: () => isHttpApiEndpoint,
|
|
636
|
+
make: () => make3,
|
|
637
|
+
options: () => options,
|
|
638
|
+
patch: () => patch,
|
|
639
|
+
post: () => post,
|
|
640
|
+
put: () => put,
|
|
641
|
+
query: () => query
|
|
642
|
+
});
|
|
643
|
+
|
|
658
644
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/internal/mediaType.js
|
|
659
645
|
function normalize(contentType) {
|
|
660
646
|
const normalized = contentType.toLowerCase().trim();
|
|
@@ -990,6 +976,14 @@ var head = /* @__PURE__ */ make3("HEAD");
|
|
|
990
976
|
var options = /* @__PURE__ */ make3("OPTIONS");
|
|
991
977
|
|
|
992
978
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApi.js
|
|
979
|
+
var HttpApi_exports = {};
|
|
980
|
+
__export(HttpApi_exports, {
|
|
981
|
+
AdditionalSchemas: () => AdditionalSchemas,
|
|
982
|
+
ParseOptions: () => ParseOptions,
|
|
983
|
+
isHttpApi: () => isHttpApi,
|
|
984
|
+
make: () => make4,
|
|
985
|
+
reflect: () => reflect
|
|
986
|
+
});
|
|
993
987
|
var TypeId2 = "~effect/httpapi/HttpApi";
|
|
994
988
|
var isHttpApi = (u) => hasProperty(u, TypeId2);
|
|
995
989
|
var Proto2 = {
|
|
@@ -1109,6 +1103,88 @@ var AdditionalSchemas = class extends (/* @__PURE__ */ Service()("effect/httpapi
|
|
|
1109
1103
|
var ParseOptions = class extends (/* @__PURE__ */ Service()("effect/httpapi/HttpApi/ParseOptions")) {
|
|
1110
1104
|
};
|
|
1111
1105
|
|
|
1106
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApiGroup.js
|
|
1107
|
+
var HttpApiGroup_exports = {};
|
|
1108
|
+
__export(HttpApiGroup_exports, {
|
|
1109
|
+
isHttpApiGroup: () => isHttpApiGroup,
|
|
1110
|
+
make: () => make5
|
|
1111
|
+
});
|
|
1112
|
+
var TypeId3 = "~effect/httpapi/HttpApiGroup";
|
|
1113
|
+
var isHttpApiGroup = (u) => hasProperty(u, TypeId3);
|
|
1114
|
+
var Proto3 = {
|
|
1115
|
+
[TypeId3]: TypeId3,
|
|
1116
|
+
add(...toAdd) {
|
|
1117
|
+
const endpoints = {
|
|
1118
|
+
...this.endpoints
|
|
1119
|
+
};
|
|
1120
|
+
for (const endpoint2 of toAdd) {
|
|
1121
|
+
assignProperty(endpoints, endpoint2.identifier, endpoint2);
|
|
1122
|
+
}
|
|
1123
|
+
return makeProto3({
|
|
1124
|
+
...optionsFromGroup(this),
|
|
1125
|
+
endpoints
|
|
1126
|
+
});
|
|
1127
|
+
},
|
|
1128
|
+
prefix(prefix) {
|
|
1129
|
+
return makeProto3({
|
|
1130
|
+
...optionsFromGroup(this),
|
|
1131
|
+
endpoints: map(this.endpoints, (endpoint2) => endpoint2.prefix(prefix))
|
|
1132
|
+
});
|
|
1133
|
+
},
|
|
1134
|
+
middleware(middleware) {
|
|
1135
|
+
return makeProto3({
|
|
1136
|
+
...optionsFromGroup(this),
|
|
1137
|
+
endpoints: map(this.endpoints, (endpoint2) => endpoint2.middleware(middleware))
|
|
1138
|
+
});
|
|
1139
|
+
},
|
|
1140
|
+
annotateMerge(annotations) {
|
|
1141
|
+
return makeProto3({
|
|
1142
|
+
...optionsFromGroup(this),
|
|
1143
|
+
annotations: merge(this.annotations, annotations)
|
|
1144
|
+
});
|
|
1145
|
+
},
|
|
1146
|
+
annotate(annotation, value) {
|
|
1147
|
+
return makeProto3({
|
|
1148
|
+
...optionsFromGroup(this),
|
|
1149
|
+
annotations: add(this.annotations, annotation, value)
|
|
1150
|
+
});
|
|
1151
|
+
},
|
|
1152
|
+
annotateEndpointsMerge(annotations) {
|
|
1153
|
+
return makeProto3({
|
|
1154
|
+
...optionsFromGroup(this),
|
|
1155
|
+
endpoints: map(this.endpoints, (endpoint2) => endpoint2.annotateMerge(annotations))
|
|
1156
|
+
});
|
|
1157
|
+
},
|
|
1158
|
+
annotateEndpoints(annotation, value) {
|
|
1159
|
+
return makeProto3({
|
|
1160
|
+
...optionsFromGroup(this),
|
|
1161
|
+
endpoints: map(this.endpoints, (endpoint2) => endpoint2.annotate(annotation, value))
|
|
1162
|
+
});
|
|
1163
|
+
},
|
|
1164
|
+
pipe() {
|
|
1165
|
+
return pipeArguments(this, arguments);
|
|
1166
|
+
}
|
|
1167
|
+
};
|
|
1168
|
+
var optionsFromGroup = (group2) => ({
|
|
1169
|
+
identifier: group2.identifier,
|
|
1170
|
+
topLevel: group2.topLevel,
|
|
1171
|
+
endpoints: group2.endpoints,
|
|
1172
|
+
annotations: group2.annotations
|
|
1173
|
+
});
|
|
1174
|
+
var makeProto3 = (options2) => {
|
|
1175
|
+
function HttpApiGroup() {
|
|
1176
|
+
}
|
|
1177
|
+
Object.setPrototypeOf(HttpApiGroup, Proto3);
|
|
1178
|
+
HttpApiGroup.key = `effect/httpapi/HttpApiGroup/${options2.identifier}`;
|
|
1179
|
+
return Object.assign(HttpApiGroup, options2);
|
|
1180
|
+
};
|
|
1181
|
+
var make5 = (identifier, options2) => makeProto3({
|
|
1182
|
+
identifier,
|
|
1183
|
+
topLevel: options2?.topLevel ?? false,
|
|
1184
|
+
endpoints: {},
|
|
1185
|
+
annotations: empty()
|
|
1186
|
+
});
|
|
1187
|
+
|
|
1112
1188
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/internal/path.js
|
|
1113
1189
|
var emptyParamNames = /* @__PURE__ */ new Set();
|
|
1114
1190
|
function getParamNames(schema) {
|
|
@@ -1122,7 +1198,7 @@ var HttpApiClient_exports = {};
|
|
|
1122
1198
|
__export(HttpApiClient_exports, {
|
|
1123
1199
|
endpoint: () => endpoint,
|
|
1124
1200
|
group: () => group,
|
|
1125
|
-
make: () =>
|
|
1201
|
+
make: () => make6,
|
|
1126
1202
|
makeClient: () => makeClient,
|
|
1127
1203
|
makeWith: () => makeWith,
|
|
1128
1204
|
urlBuilder: () => urlBuilder
|
|
@@ -1156,7 +1232,7 @@ var makeClient = (api, options2) => gen(function* () {
|
|
|
1156
1232
|
const {
|
|
1157
1233
|
group: group2,
|
|
1158
1234
|
endpoint: endpoint2,
|
|
1159
|
-
errors
|
|
1235
|
+
errors,
|
|
1160
1236
|
successes,
|
|
1161
1237
|
mergedAnnotations
|
|
1162
1238
|
} = onEndpointOptions;
|
|
@@ -1166,7 +1242,7 @@ var makeClient = (api, options2) => gen(function* () {
|
|
|
1166
1242
|
orElse: statusOrElse
|
|
1167
1243
|
};
|
|
1168
1244
|
const errorAlternatives = /* @__PURE__ */ new Map();
|
|
1169
|
-
for (const [status2, schemas] of
|
|
1245
|
+
for (const [status2, schemas] of errors.entries()) {
|
|
1170
1246
|
const grouped = groupSchemasByContentType(schemas);
|
|
1171
1247
|
for (const [contentType, schemas2] of grouped.entries()) {
|
|
1172
1248
|
addResponseAlternative(errorAlternatives, status2, contentType, schemasToResponse(schemas2, parseOptions));
|
|
@@ -1246,7 +1322,7 @@ var makeClient = (api, options2) => gen(function* () {
|
|
|
1246
1322
|
}
|
|
1247
1323
|
});
|
|
1248
1324
|
});
|
|
1249
|
-
var
|
|
1325
|
+
var make6 = (api, options2) => flatMap(HttpClient, (httpClient) => makeWith(api, {
|
|
1250
1326
|
...options2,
|
|
1251
1327
|
httpClient: options2?.transformClient ? options2.transformClient(httpClient) : httpClient
|
|
1252
1328
|
}));
|
|
@@ -1632,165 +1708,10 @@ function getEncodePayloadSchemaFromBody(schema, method) {
|
|
|
1632
1708
|
return out;
|
|
1633
1709
|
}
|
|
1634
1710
|
|
|
1635
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApiGroup.js
|
|
1636
|
-
var HttpApiGroup_exports = {};
|
|
1637
|
-
__export(HttpApiGroup_exports, {
|
|
1638
|
-
isHttpApiGroup: () => isHttpApiGroup,
|
|
1639
|
-
make: () => make6
|
|
1640
|
-
});
|
|
1641
|
-
var TypeId3 = "~effect/httpapi/HttpApiGroup";
|
|
1642
|
-
var isHttpApiGroup = (u) => hasProperty(u, TypeId3);
|
|
1643
|
-
var Proto3 = {
|
|
1644
|
-
[TypeId3]: TypeId3,
|
|
1645
|
-
add(...toAdd) {
|
|
1646
|
-
const endpoints = {
|
|
1647
|
-
...this.endpoints
|
|
1648
|
-
};
|
|
1649
|
-
for (const endpoint2 of toAdd) {
|
|
1650
|
-
assignProperty(endpoints, endpoint2.identifier, endpoint2);
|
|
1651
|
-
}
|
|
1652
|
-
return makeProto3({
|
|
1653
|
-
...optionsFromGroup(this),
|
|
1654
|
-
endpoints
|
|
1655
|
-
});
|
|
1656
|
-
},
|
|
1657
|
-
prefix(prefix) {
|
|
1658
|
-
return makeProto3({
|
|
1659
|
-
...optionsFromGroup(this),
|
|
1660
|
-
endpoints: map(this.endpoints, (endpoint2) => endpoint2.prefix(prefix))
|
|
1661
|
-
});
|
|
1662
|
-
},
|
|
1663
|
-
middleware(middleware) {
|
|
1664
|
-
return makeProto3({
|
|
1665
|
-
...optionsFromGroup(this),
|
|
1666
|
-
endpoints: map(this.endpoints, (endpoint2) => endpoint2.middleware(middleware))
|
|
1667
|
-
});
|
|
1668
|
-
},
|
|
1669
|
-
annotateMerge(annotations) {
|
|
1670
|
-
return makeProto3({
|
|
1671
|
-
...optionsFromGroup(this),
|
|
1672
|
-
annotations: merge(this.annotations, annotations)
|
|
1673
|
-
});
|
|
1674
|
-
},
|
|
1675
|
-
annotate(annotation, value) {
|
|
1676
|
-
return makeProto3({
|
|
1677
|
-
...optionsFromGroup(this),
|
|
1678
|
-
annotations: add(this.annotations, annotation, value)
|
|
1679
|
-
});
|
|
1680
|
-
},
|
|
1681
|
-
annotateEndpointsMerge(annotations) {
|
|
1682
|
-
return makeProto3({
|
|
1683
|
-
...optionsFromGroup(this),
|
|
1684
|
-
endpoints: map(this.endpoints, (endpoint2) => endpoint2.annotateMerge(annotations))
|
|
1685
|
-
});
|
|
1686
|
-
},
|
|
1687
|
-
annotateEndpoints(annotation, value) {
|
|
1688
|
-
return makeProto3({
|
|
1689
|
-
...optionsFromGroup(this),
|
|
1690
|
-
endpoints: map(this.endpoints, (endpoint2) => endpoint2.annotate(annotation, value))
|
|
1691
|
-
});
|
|
1692
|
-
},
|
|
1693
|
-
pipe() {
|
|
1694
|
-
return pipeArguments(this, arguments);
|
|
1695
|
-
}
|
|
1696
|
-
};
|
|
1697
|
-
var optionsFromGroup = (group2) => ({
|
|
1698
|
-
identifier: group2.identifier,
|
|
1699
|
-
topLevel: group2.topLevel,
|
|
1700
|
-
endpoints: group2.endpoints,
|
|
1701
|
-
annotations: group2.annotations
|
|
1702
|
-
});
|
|
1703
|
-
var makeProto3 = (options2) => {
|
|
1704
|
-
function HttpApiGroup() {
|
|
1705
|
-
}
|
|
1706
|
-
Object.setPrototypeOf(HttpApiGroup, Proto3);
|
|
1707
|
-
HttpApiGroup.key = `effect/httpapi/HttpApiGroup/${options2.identifier}`;
|
|
1708
|
-
return Object.assign(HttpApiGroup, options2);
|
|
1709
|
-
};
|
|
1710
|
-
var make6 = (identifier, options2) => makeProto3({
|
|
1711
|
-
identifier,
|
|
1712
|
-
topLevel: options2?.topLevel ?? false,
|
|
1713
|
-
endpoints: {},
|
|
1714
|
-
annotations: empty()
|
|
1715
|
-
});
|
|
1716
|
-
|
|
1717
|
-
// src/contracts/ui.ts
|
|
1718
|
-
var UiContext = Schema_exports.Struct({
|
|
1719
|
-
deployment: Schema_exports.NonEmptyString,
|
|
1720
|
-
profile: Schema_exports.optional(Schema_exports.NonEmptyString),
|
|
1721
|
-
expectedProfileRevision: Schema_exports.optional(Schema_exports.Int)
|
|
1722
|
-
});
|
|
1723
|
-
var UiOperation = Schema_exports.Struct({
|
|
1724
|
-
...UiContext.fields,
|
|
1725
|
-
name: Schema_exports.NonEmptyString,
|
|
1726
|
-
input: JsonValue
|
|
1727
|
-
});
|
|
1728
|
-
var UiUnauthorized = class extends Schema_exports.TaggedError()(
|
|
1729
|
-
"UiUnauthorized",
|
|
1730
|
-
{},
|
|
1731
|
-
{ httpApiStatus: 401 }
|
|
1732
|
-
) {
|
|
1733
|
-
};
|
|
1734
|
-
var UiForbidden = class extends Schema_exports.TaggedError()(
|
|
1735
|
-
"UiForbidden",
|
|
1736
|
-
{},
|
|
1737
|
-
{ httpApiStatus: 403 }
|
|
1738
|
-
) {
|
|
1739
|
-
};
|
|
1740
|
-
var UiDeploymentChanged = class extends Schema_exports.TaggedError()(
|
|
1741
|
-
"UiDeploymentChanged",
|
|
1742
|
-
{},
|
|
1743
|
-
{ httpApiStatus: 409 }
|
|
1744
|
-
) {
|
|
1745
|
-
};
|
|
1746
|
-
var UiFailed = class extends Schema_exports.TaggedError()(
|
|
1747
|
-
"UiFailed",
|
|
1748
|
-
{
|
|
1749
|
-
reason: Schema_exports.Literals(["unavailable", "operation_failed", "account_required"])
|
|
1750
|
-
},
|
|
1751
|
-
{ httpApiStatus: 422 }
|
|
1752
|
-
) {
|
|
1753
|
-
};
|
|
1754
|
-
var UiSnapshot = Schema_exports.Union([
|
|
1755
|
-
Schema_exports.Struct({
|
|
1756
|
-
type: Schema_exports.Literal("snapshot"),
|
|
1757
|
-
value: JsonValue,
|
|
1758
|
-
trace: Schema_exports.optional(Schema_exports.Unknown)
|
|
1759
|
-
}),
|
|
1760
|
-
Schema_exports.Struct({ type: Schema_exports.Literal("failure"), error: UiFailed }),
|
|
1761
|
-
Schema_exports.Struct({ type: Schema_exports.Literal("heartbeat") })
|
|
1762
|
-
]);
|
|
1763
|
-
var errors = [UiUnauthorized, UiForbidden, UiDeploymentChanged, UiFailed];
|
|
1764
|
-
var AppUiApi = HttpApi_exports.make("app-ui").add(
|
|
1765
|
-
HttpApiGroup_exports.make("ui").add(
|
|
1766
|
-
HttpApiEndpoint_exports.post("query", "/_executor/api/query", {
|
|
1767
|
-
payload: UiOperation,
|
|
1768
|
-
success: JsonValue,
|
|
1769
|
-
error: errors
|
|
1770
|
-
})
|
|
1771
|
-
).add(
|
|
1772
|
-
HttpApiEndpoint_exports.post("mutate", "/_executor/api/mutate", {
|
|
1773
|
-
payload: UiOperation,
|
|
1774
|
-
success: JsonValue,
|
|
1775
|
-
error: errors
|
|
1776
|
-
})
|
|
1777
|
-
).add(
|
|
1778
|
-
HttpApiEndpoint_exports.post("subscribe", "/_executor/api/subscribe", {
|
|
1779
|
-
payload: UiOperation,
|
|
1780
|
-
success: HttpApiSchema_exports.StreamSse({ data: UiSnapshot, error: Schema_exports.Union(errors) }),
|
|
1781
|
-
error: errors
|
|
1782
|
-
})
|
|
1783
|
-
)
|
|
1784
|
-
);
|
|
1785
|
-
|
|
1786
1711
|
export {
|
|
1712
|
+
HttpApiSchema_exports,
|
|
1713
|
+
HttpApiEndpoint_exports,
|
|
1714
|
+
HttpApi_exports,
|
|
1787
1715
|
HttpApiClient_exports,
|
|
1788
|
-
|
|
1789
|
-
UiOperation,
|
|
1790
|
-
UiUnauthorized,
|
|
1791
|
-
UiForbidden,
|
|
1792
|
-
UiDeploymentChanged,
|
|
1793
|
-
UiFailed,
|
|
1794
|
-
UiSnapshot,
|
|
1795
|
-
AppUiApi
|
|
1716
|
+
HttpApiGroup_exports
|
|
1796
1717
|
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fixedRouter
|
|
3
|
+
} from "./chunk-PUC24GZP.js";
|
|
4
|
+
import {
|
|
5
|
+
nativeOperation,
|
|
6
|
+
operationDeclaration,
|
|
7
|
+
routerDeclaration
|
|
8
|
+
} from "./chunk-6VWYEQ4X.js";
|
|
9
|
+
|
|
10
|
+
// src/implementation/protocol-operations.ts
|
|
11
|
+
var protocolOperations = (operations, kinds = {}) => {
|
|
12
|
+
const declared = {};
|
|
13
|
+
for (const [name, operation] of Object.entries(operations)) {
|
|
14
|
+
const kind = Object.hasOwn(kinds, name) ? kinds[name] ?? "mutation" : operation.readOnly === true ? "query" : "mutation";
|
|
15
|
+
const native = {
|
|
16
|
+
description: operation.description,
|
|
17
|
+
...operation.title === void 0 ? {} : { title: operation.title },
|
|
18
|
+
...operation.annotations === void 0 ? {} : { annotations: operation.annotations },
|
|
19
|
+
...operation._meta === void 0 ? {} : { _meta: operation._meta },
|
|
20
|
+
input: operation.input,
|
|
21
|
+
...operation.output === void 0 ? {} : { output: operation.output },
|
|
22
|
+
run: operation.run
|
|
23
|
+
};
|
|
24
|
+
const output = Object.getOwnPropertyDescriptor(operation, "outputSchema");
|
|
25
|
+
const withOutput = (target) => operation.output !== void 0 || output === void 0 || output.get === void 0 && output.value === void 0 ? target : Object.defineProperty(target, "outputSchema", { ...output, enumerable: true });
|
|
26
|
+
declared[name] = operationDeclaration(withOutput({ ...native, kind }));
|
|
27
|
+
}
|
|
28
|
+
return declared;
|
|
29
|
+
};
|
|
30
|
+
var protocolRouter = (operations, kinds = {}) => {
|
|
31
|
+
const native = {};
|
|
32
|
+
for (const [name, declaration] of Object.entries(protocolOperations(operations, kinds))) {
|
|
33
|
+
const operation = nativeOperation(declaration);
|
|
34
|
+
if (operation !== void 0) native[name] = operation;
|
|
35
|
+
}
|
|
36
|
+
return routerDeclaration(fixedRouter(native));
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
protocolOperations,
|
|
41
|
+
protocolRouter
|
|
42
|
+
};
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
SkillDefinitionInvalid,
|
|
6
6
|
SkillFile,
|
|
7
7
|
SkillFilePath
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MYCVMDWI.js";
|
|
9
9
|
import {
|
|
10
10
|
Effect_exports,
|
|
11
11
|
Schema_exports
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NXTXZ635.js";
|
|
13
13
|
|
|
14
14
|
// src/implementation/skill-files.ts
|
|
15
15
|
var skillFromFiles = (input, source = {}) => Effect_exports.gen(function* () {
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import {
|
|
2
|
+
JsonValue
|
|
3
|
+
} from "./chunk-PWF2DRJ3.js";
|
|
4
|
+
import {
|
|
5
|
+
HttpApiEndpoint_exports,
|
|
6
|
+
HttpApiGroup_exports,
|
|
7
|
+
HttpApiSchema_exports,
|
|
8
|
+
HttpApi_exports
|
|
9
|
+
} from "./chunk-2D2PKLGQ.js";
|
|
10
|
+
import {
|
|
11
|
+
Schema_exports
|
|
12
|
+
} from "./chunk-NXTXZ635.js";
|
|
13
|
+
|
|
14
|
+
// src/contracts/ui.ts
|
|
15
|
+
var UiContext = Schema_exports.Struct({
|
|
16
|
+
deployment: Schema_exports.NonEmptyString,
|
|
17
|
+
profile: Schema_exports.optional(Schema_exports.NonEmptyString),
|
|
18
|
+
expectedProfileRevision: Schema_exports.optional(Schema_exports.Int)
|
|
19
|
+
});
|
|
20
|
+
var UiOperation = Schema_exports.Struct({
|
|
21
|
+
...UiContext.fields,
|
|
22
|
+
name: Schema_exports.NonEmptyString,
|
|
23
|
+
input: JsonValue
|
|
24
|
+
});
|
|
25
|
+
var UiUnauthorized = class extends Schema_exports.TaggedError()(
|
|
26
|
+
"UiUnauthorized",
|
|
27
|
+
{},
|
|
28
|
+
{ httpApiStatus: 401 }
|
|
29
|
+
) {
|
|
30
|
+
};
|
|
31
|
+
var UiForbidden = class extends Schema_exports.TaggedError()(
|
|
32
|
+
"UiForbidden",
|
|
33
|
+
{},
|
|
34
|
+
{ httpApiStatus: 403 }
|
|
35
|
+
) {
|
|
36
|
+
};
|
|
37
|
+
var UiDeploymentChanged = class extends Schema_exports.TaggedError()(
|
|
38
|
+
"UiDeploymentChanged",
|
|
39
|
+
{},
|
|
40
|
+
{ httpApiStatus: 409 }
|
|
41
|
+
) {
|
|
42
|
+
};
|
|
43
|
+
var UiFailed = class extends Schema_exports.TaggedError()(
|
|
44
|
+
"UiFailed",
|
|
45
|
+
{
|
|
46
|
+
reason: Schema_exports.Literals(["unavailable", "operation_failed", "account_required"])
|
|
47
|
+
},
|
|
48
|
+
{ httpApiStatus: 422 }
|
|
49
|
+
) {
|
|
50
|
+
};
|
|
51
|
+
var UiSnapshot = Schema_exports.Union([
|
|
52
|
+
Schema_exports.Struct({
|
|
53
|
+
type: Schema_exports.Literal("snapshot"),
|
|
54
|
+
value: JsonValue,
|
|
55
|
+
trace: Schema_exports.optional(Schema_exports.Unknown)
|
|
56
|
+
}),
|
|
57
|
+
Schema_exports.Struct({ type: Schema_exports.Literal("failure"), error: UiFailed }),
|
|
58
|
+
Schema_exports.Struct({ type: Schema_exports.Literal("heartbeat") })
|
|
59
|
+
]);
|
|
60
|
+
var errors = [UiUnauthorized, UiForbidden, UiDeploymentChanged, UiFailed];
|
|
61
|
+
var AppUiApi = HttpApi_exports.make("app-ui").add(
|
|
62
|
+
HttpApiGroup_exports.make("ui").add(
|
|
63
|
+
HttpApiEndpoint_exports.post("query", "/_executor/api/query", {
|
|
64
|
+
payload: UiOperation,
|
|
65
|
+
success: JsonValue,
|
|
66
|
+
error: errors
|
|
67
|
+
})
|
|
68
|
+
).add(
|
|
69
|
+
HttpApiEndpoint_exports.post("mutate", "/_executor/api/mutate", {
|
|
70
|
+
payload: UiOperation,
|
|
71
|
+
success: JsonValue,
|
|
72
|
+
error: errors
|
|
73
|
+
})
|
|
74
|
+
).add(
|
|
75
|
+
HttpApiEndpoint_exports.post("subscribe", "/_executor/api/subscribe", {
|
|
76
|
+
payload: UiOperation,
|
|
77
|
+
success: HttpApiSchema_exports.StreamSse({ data: UiSnapshot, error: Schema_exports.Union(errors) }),
|
|
78
|
+
error: errors
|
|
79
|
+
})
|
|
80
|
+
)
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
export {
|
|
84
|
+
UiContext,
|
|
85
|
+
UiOperation,
|
|
86
|
+
UiUnauthorized,
|
|
87
|
+
UiForbidden,
|
|
88
|
+
UiDeploymentChanged,
|
|
89
|
+
UiFailed,
|
|
90
|
+
UiSnapshot,
|
|
91
|
+
AppUiApi
|
|
92
|
+
};
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
invalidate,
|
|
4
4
|
layer,
|
|
5
5
|
mutation
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6JBTHTI5.js";
|
|
7
7
|
import {
|
|
8
8
|
Boolean,
|
|
9
9
|
Cause,
|
|
@@ -158,7 +158,7 @@ import {
|
|
|
158
158
|
void_2,
|
|
159
159
|
whileLoop,
|
|
160
160
|
zipRight
|
|
161
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-NXTXZ635.js";
|
|
162
162
|
import {
|
|
163
163
|
__export
|
|
164
164
|
} from "./chunk-CZ7CSFO4.js";
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
useSpan,
|
|
59
59
|
void_2 as void_,
|
|
60
60
|
withFiber
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-NXTXZ635.js";
|
|
62
62
|
|
|
63
63
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/reactivity/Reactivity.js
|
|
64
64
|
var TypeId = "~effect/reactivity/Reactivity";
|