apps 0.0.1-beta.37 → 0.0.1-beta.39
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-GHDZEEPO.js → chunk-27TDXHRX.js} +395 -82
- package/js/{chunk-KOOJUMLR.js → chunk-3MMG2H6M.js} +2 -2
- package/js/{chunk-LQBR7AI7.js → chunk-3V575NIW.js} +217 -19
- package/js/{chunk-U74JVKTQ.js → chunk-5NIEOXRZ.js} +7 -7
- package/js/{chunk-BWUHMKHQ.js → chunk-5TJA7364.js} +2 -2
- package/js/{chunk-7KEKFBV7.js → chunk-7CSHVXVR.js} +3 -3
- package/js/{chunk-3LRFKLUX.js → chunk-BO4US6DZ.js} +9 -49
- package/js/{chunk-A4O72Z3A.js → chunk-DKUEYTYD.js} +167 -30
- package/js/{chunk-ENJCQWVF.js → chunk-E4BWL7KQ.js} +3 -3
- package/js/{chunk-CAOHGMNW.js → chunk-F3TBO2U3.js} +7 -94
- package/js/{chunk-POOIHRPF.js → chunk-GHXRRFZA.js} +11 -34
- package/js/{chunk-RSNZDT4L.js → chunk-JTMDWPCH.js} +2 -2
- package/js/{chunk-YW333DH3.js → chunk-KANDIVIH.js} +4 -4
- package/js/{chunk-2FWXCU5I.js → chunk-KAQD3DTI.js} +1 -1
- package/js/{chunk-QQKHJ72Y.js → chunk-LVWX4UWK.js} +9 -9
- package/js/{chunk-KEZ4YZSP.js → chunk-MLHNVYHT.js} +2 -2
- package/js/{chunk-IJQ5LE74.js → chunk-MXDKXAY4.js} +363 -401
- package/js/{chunk-BI6R577B.js → chunk-P7MGDPFD.js} +2 -2
- package/js/{chunk-24EIFQYZ.js → chunk-PCV73KVK.js} +35 -10
- package/js/{chunk-JU7F4PRK.js → chunk-RIXVGVA6.js} +2 -2
- package/js/{chunk-D45FU4TZ.js → chunk-SDHD6J37.js} +3 -3
- package/js/{chunk-UCOMVHGW.js → chunk-U5PFZDVB.js} +2 -2
- package/js/{chunk-PHO7HXTC.js → chunk-VIU2XXA7.js} +294 -47
- package/js/{chunk-TADLIUEU.js → chunk-VJQXXOQ3.js} +2 -2
- package/js/{chunk-NHCFIWN5.js → chunk-W2NV54JD.js} +1 -1
- package/js/{chunk-BI45HZWM.js → chunk-YQ35E7KS.js} +1 -1
- package/js/{chunk-WDBUOIWV.js → chunk-ZUKBIHMK.js} +3 -3
- package/js/client.js +13 -17
- package/js/contracts.js +16 -21
- package/js/effect.js +19 -24
- package/js/graphql.js +21 -26
- package/js/host.js +19 -24
- package/js/index.js +13 -26
- package/js/mcp/effect.js +21 -26
- package/js/mcp/stdio.js +21 -26
- package/js/mcp.js +23 -28
- package/js/openapi.js +17 -21
- package/js/react.js +2 -3
- package/js/skills/effect.js +6 -7
- package/js/skills.js +15 -17
- package/js/storage/facet.js +1 -214
- package/js/ui/auth/contracts.js +2 -2
- package/js/ui/auth.js +5 -5
- package/js/ui/contracts.js +5 -6
- package/js/ui/serving.js +10 -11
- package/package.json +1 -2
- package/runtime.json +1 -1
- package/types/apps/src/contracts/app.d.ts +0 -2
- package/types/apps/src/contracts/context.d.ts +12 -11
- package/types/apps/src/contracts/host.d.ts +10 -8
- package/types/apps/src/contracts/live.d.ts +2 -0
- package/types/apps/src/contracts/operations.d.ts +3 -3
- package/types/apps/src/contracts/protocol-version.d.ts +2 -2
- package/types/apps/src/contracts/protocols/10.d.ts +1450 -0
- package/types/apps/src/contracts/protocols/4.d.ts +3 -3
- package/types/apps/src/contracts/protocols/5.d.ts +1 -1
- package/types/apps/src/contracts/protocols/6.d.ts +1 -1
- package/types/apps/src/contracts/protocols/7.d.ts +1 -1
- package/types/apps/src/contracts/sql.d.ts +58 -0
- package/types/apps/src/facet.d.ts +4 -5
- package/types/apps/src/implementation/openapi-compile.d.ts +2 -2
- package/types/apps/src/implementation/schema.d.ts +1 -10
- package/types/apps/src/implementation/sql.d.ts +66 -0
- package/types/apps/src/index.d.ts +1 -2
- package/types/telemetry/src/transport.d.ts +8 -1
- package/js/chunk-73AV3JVU.js +0 -186
- package/js/chunk-HDAQBRT5.js +0 -1254
- package/js/chunk-IU7CCCUC.js +0 -630
- package/js/chunk-NHUHTWAF.js +0 -0
- package/js/chunk-V5DWGYRK.js +0 -268
- package/js/chunk-Y3XN4X4Q.js +0 -19
- package/types/app-data/src/implementation/cursor.d.ts +0 -10
- package/types/app-data/src/implementation/index-key.d.ts +0 -7
- package/types/app-data/src/implementation/promise.d.ts +0 -68
- package/types/app-data/src/implementation/range.d.ts +0 -8
- package/types/app-data/src/implementation/schema.d.ts +0 -18
- package/types/app-data/src/implementation/sqlite.d.ts +0 -11
- package/types/app-data/src/index.d.ts +0 -4
- package/types/apps/src/contracts/storage.d.ts +0 -68
- package/types/apps/src/implementation/storage.d.ts +0 -15
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FetchHttpClient_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VJQXXOQ3.js";
|
|
4
4
|
import {
|
|
5
5
|
recordedMessage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KAQD3DTI.js";
|
|
7
7
|
import {
|
|
8
8
|
HttpBody_exports,
|
|
9
9
|
HttpClient,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
tapError,
|
|
24
24
|
transformResponse,
|
|
25
25
|
uint8Array
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-3MMG2H6M.js";
|
|
27
27
|
import {
|
|
28
28
|
Array as Array2,
|
|
29
29
|
Boolean2 as Boolean,
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
Context_exports,
|
|
34
34
|
CurrentLogAnnotations,
|
|
35
35
|
CurrentLogSpans,
|
|
36
|
+
Duration_exports,
|
|
36
37
|
Effect_exports,
|
|
37
38
|
Exit_exports,
|
|
38
39
|
FiberSet_exports,
|
|
@@ -45,6 +46,7 @@ import {
|
|
|
45
46
|
Option_exports,
|
|
46
47
|
Record2 as Record,
|
|
47
48
|
Redacted_exports,
|
|
49
|
+
Schedule_exports,
|
|
48
50
|
Schema_exports,
|
|
49
51
|
Scope,
|
|
50
52
|
Semaphore_exports,
|
|
@@ -95,9 +97,9 @@ import {
|
|
|
95
97
|
isSome,
|
|
96
98
|
layer,
|
|
97
99
|
logDebug,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
make,
|
|
101
|
+
make4 as make2,
|
|
102
|
+
make5 as make3,
|
|
101
103
|
map,
|
|
102
104
|
map3 as map2,
|
|
103
105
|
map5 as map3,
|
|
@@ -131,7 +133,7 @@ import {
|
|
|
131
133
|
withDefault2 as withDefault,
|
|
132
134
|
withTracerEnabled,
|
|
133
135
|
zero
|
|
134
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-MXDKXAY4.js";
|
|
135
137
|
import {
|
|
136
138
|
__export
|
|
137
139
|
} from "./chunk-CZ7CSFO4.js";
|
|
@@ -857,6 +859,27 @@ var telemetryHttpClient = Layer_exports.effect(
|
|
|
857
859
|
)
|
|
858
860
|
)
|
|
859
861
|
).pipe(Layer_exports.provide(selectedClient));
|
|
862
|
+
var retryDelay = (error) => Effect_exports.gen(function* () {
|
|
863
|
+
if (!HttpClientError_exports.isHttpClientError(error) || error.reason._tag !== "StatusCodeError" || error.reason.response.status !== 429 && error.reason.response.status !== 503)
|
|
864
|
+
return Duration_exports.seconds(1);
|
|
865
|
+
const header = error.reason.response.headers["retry-after"]?.trim();
|
|
866
|
+
if (header === void 0 || header === "")
|
|
867
|
+
return Duration_exports.seconds(error.reason.response.status === 429 ? 5 : 1);
|
|
868
|
+
const seconds2 = Number(header);
|
|
869
|
+
if (Number.isFinite(seconds2)) return Duration_exports.seconds(seconds2 >= 0 ? seconds2 : 5);
|
|
870
|
+
const date = Date.parse(header);
|
|
871
|
+
if (Number.isNaN(date)) return Duration_exports.seconds(5);
|
|
872
|
+
return Duration_exports.millis(Math.max(date - (yield* Clock_exports.currentTimeMillis), 1));
|
|
873
|
+
});
|
|
874
|
+
var retryTelemetryExport = (client) => client.pipe(
|
|
875
|
+
HttpClient_exports.retryTransient({
|
|
876
|
+
times: 3,
|
|
877
|
+
schedule: Schedule_exports.forever.pipe(
|
|
878
|
+
Schedule_exports.passthrough,
|
|
879
|
+
Schedule_exports.addDelay(({ output }) => retryDelay(output))
|
|
880
|
+
)
|
|
881
|
+
})
|
|
882
|
+
);
|
|
860
883
|
|
|
861
884
|
// ../telemetry/src/recorded-failure.ts
|
|
862
885
|
var recordedError = (error) => {
|
|
@@ -2286,7 +2309,8 @@ var operations = [
|
|
|
2286
2309
|
"webhook-handle",
|
|
2287
2310
|
"workflows",
|
|
2288
2311
|
"workflow-validate",
|
|
2289
|
-
"workflow-run"
|
|
2312
|
+
"workflow-run",
|
|
2313
|
+
"migrate"
|
|
2290
2314
|
];
|
|
2291
2315
|
var httpMethods = [
|
|
2292
2316
|
"GET",
|
|
@@ -2311,6 +2335,7 @@ var appSpanNames = /* @__PURE__ */ new Set([
|
|
|
2311
2335
|
"app.tool.approval",
|
|
2312
2336
|
"app.tool.elicitation",
|
|
2313
2337
|
"app.operation.execute",
|
|
2338
|
+
"app.sql.migrate",
|
|
2314
2339
|
"app.cache.get",
|
|
2315
2340
|
"app.cache.load",
|
|
2316
2341
|
"app.cache.command",
|
|
@@ -2727,7 +2752,7 @@ var forwardTelemetry = (batch, traceId, build, service = "executor-app") => Effe
|
|
|
2727
2752
|
...build === void 0 ? [] : [{ key: "executor.build.id", value: { stringValue: build } }]
|
|
2728
2753
|
]
|
|
2729
2754
|
};
|
|
2730
|
-
const client = yield* HttpClient_exports.HttpClient;
|
|
2755
|
+
const client = retryTelemetryExport(yield* HttpClient_exports.HttpClient);
|
|
2731
2756
|
if (batch.dropped > 0) yield* recordExportFailure("app", "capacity", batch.dropped);
|
|
2732
2757
|
for (const signal of ["traces", "logs"]) {
|
|
2733
2758
|
const target = config[signal];
|
|
@@ -2771,7 +2796,7 @@ var forwardTelemetry = (batch, traceId, build, service = "executor-app") => Effe
|
|
|
2771
2796
|
]
|
|
2772
2797
|
}))
|
|
2773
2798
|
);
|
|
2774
|
-
yield* client.
|
|
2799
|
+
yield* client.execute(
|
|
2775
2800
|
HttpClientRequest_exports.post(target.url).pipe(
|
|
2776
2801
|
HttpClientRequest_exports.setHeaders(
|
|
2777
2802
|
target.headers === void 0 ? {} : Redacted_exports.value(target.headers)
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
CacheEntry,
|
|
4
4
|
CacheError,
|
|
5
5
|
cacheLimits
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-P7MGDPFD.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-MXDKXAY4.js";
|
|
14
14
|
|
|
15
15
|
// ../app-cache/src/index.ts
|
|
16
16
|
var canonical = (value) => {
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
networkRefusalHeader,
|
|
6
6
|
networkRefusalStatus,
|
|
7
7
|
supportedFetchOptions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-P7MGDPFD.js";
|
|
9
9
|
import {
|
|
10
10
|
invocationFetch
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-PCV73KVK.js";
|
|
12
12
|
import {
|
|
13
13
|
Effect_exports,
|
|
14
14
|
Schema_exports
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MXDKXAY4.js";
|
|
16
16
|
|
|
17
17
|
// src/implementation/network.ts
|
|
18
18
|
var refusalHeader = (status, header) => status === networkRefusalStatus && header !== null && header !== void 0 ? header : void 0;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fixedRouter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BO4US6DZ.js";
|
|
4
4
|
import {
|
|
5
5
|
nativeOperation,
|
|
6
6
|
operationDeclaration,
|
|
7
7
|
routerDeclaration
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7CSHVXVR.js";
|
|
9
9
|
|
|
10
10
|
// src/implementation/protocol-operations.ts
|
|
11
11
|
var protocolOperations = (operations, kinds = {}) => {
|