apps 0.0.1-beta.83 → 0.0.1-beta.85
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 +10 -12
- package/framework-reference.json +1 -1
- package/js/{chunk-JKH7ALFN.js → chunk-24IHGRND.js} +2 -2
- package/js/{chunk-HNCCRVIT.js → chunk-MHFAQ2XD.js} +1 -1
- package/js/{chunk-AIXYBMMI.js → chunk-PAUT66KY.js} +2 -2
- package/js/chunk-T6QLMX67.js +714 -0
- package/js/{chunk-NG56RPCA.js → chunk-WUPLD4VN.js} +0 -10
- package/js/{chunk-T2B6GUVY.js → chunk-Y46DFT3O.js} +2 -2
- package/js/{chunk-OHBKJ54H.js → chunk-ZKW64V6P.js} +4 -4
- package/js/contracts.js +1 -1
- package/js/effect.js +5 -5
- package/js/graphql.js +6 -6
- package/js/host.js +5 -5
- package/js/index.js +3 -3
- package/js/mcp/effect.js +6 -7
- package/js/mcp.js +11 -13
- package/js/openapi.js +15 -13
- package/package.json +1 -5
- package/runtime.json +1 -1
- package/types/apps/src/contracts/mcp.d.ts +1 -10
- package/types/apps/src/implementation/openapi-compile.d.ts +3 -2
- package/types/apps/src/implementation/openapi-source.d.ts +5 -1
- package/types/apps/src/implementation/router-catalog.d.ts +2 -2
- package/js/chunk-BX2S3T2R.js +0 -348
- package/js/chunk-IGOYMUWZ.js +0 -394
- package/js/mcp/stdio.js +0 -138
- package/types/apps/src/implementation/mcp-stdio.d.ts +0 -4
- package/types/apps/src/mcp-stdio.d.ts +0 -5
|
@@ -1998,15 +1998,6 @@ var McpCredentialsUnverified = class extends Schema_exports.TaggedError()(
|
|
|
1998
1998
|
{ anonymous: Schema_exports.Union([Schema_exports.Literal("answered"), McpError2, ProviderError]) }
|
|
1999
1999
|
) {
|
|
2000
2000
|
};
|
|
2001
|
-
var ProcessConfig = Schema_exports.Struct({
|
|
2002
|
-
command: Schema_exports.NonEmptyString,
|
|
2003
|
-
args: Schema_exports.Array(Schema_exports.String),
|
|
2004
|
-
cwd: Schema_exports.optional(Schema_exports.String),
|
|
2005
|
-
env: Schema_exports.Record(Schema_exports.String, Schema_exports.String),
|
|
2006
|
-
timeoutMs: Schema_exports.Int.check(
|
|
2007
|
-
Schema_exports.isBetween({ minimum: 1, maximum: defaultMcpClientLimits.maxTimeoutMs })
|
|
2008
|
-
)
|
|
2009
|
-
});
|
|
2010
2001
|
|
|
2011
2002
|
// src/contracts/webhook-protocol.ts
|
|
2012
2003
|
var WebhookTransportLimits = Schema_exports.Struct({
|
|
@@ -4429,7 +4420,6 @@ export {
|
|
|
4429
4420
|
McpServerHeader,
|
|
4430
4421
|
McpError2 as McpError,
|
|
4431
4422
|
McpCredentialsUnverified,
|
|
4432
|
-
ProcessConfig,
|
|
4433
4423
|
WebhookTransportLimits,
|
|
4434
4424
|
defaultWebhookTransportLimits,
|
|
4435
4425
|
WebhookRequestData,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fixedRouter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-24IHGRND.js";
|
|
4
4
|
import {
|
|
5
5
|
nativeOperation,
|
|
6
6
|
operationDeclaration,
|
|
7
7
|
routerDeclaration
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MHFAQ2XD.js";
|
|
9
9
|
|
|
10
10
|
// src/implementation/protocol-operations.ts
|
|
11
11
|
var protocolOperations = (operations, kinds = {}) => {
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
parseSkillLoadFailed,
|
|
13
13
|
readCatalog,
|
|
14
14
|
routerSkills
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-24IHGRND.js";
|
|
16
16
|
import {
|
|
17
17
|
appInvocationFetch
|
|
18
18
|
} from "./chunk-I6Q7ZPKJ.js";
|
|
@@ -26,12 +26,12 @@ import {
|
|
|
26
26
|
makeEmitter,
|
|
27
27
|
toEffectApp,
|
|
28
28
|
withPlacements
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-PAUT66KY.js";
|
|
30
30
|
import {
|
|
31
31
|
declaredOperations,
|
|
32
32
|
locate,
|
|
33
33
|
nativeOperation
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-MHFAQ2XD.js";
|
|
35
35
|
import {
|
|
36
36
|
accountProviderError,
|
|
37
37
|
appCode,
|
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
reservedTablePrefix,
|
|
92
92
|
sqlBindingsLimit,
|
|
93
93
|
workflowDurationMillis
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-WUPLD4VN.js";
|
|
95
95
|
import {
|
|
96
96
|
AppSkills,
|
|
97
97
|
SkillFile
|
package/js/contracts.js
CHANGED
package/js/effect.js
CHANGED
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
ApprovalDecision,
|
|
4
4
|
createAppHandler,
|
|
5
5
|
prepareElicitation
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZKW64V6P.js";
|
|
7
7
|
import "./chunk-PL5KOEZD.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-24IHGRND.js";
|
|
9
9
|
import "./chunk-I6Q7ZPKJ.js";
|
|
10
10
|
import "./chunk-XBG7HHXC.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-PAUT66KY.js";
|
|
12
|
+
import "./chunk-MHFAQ2XD.js";
|
|
13
13
|
import "./chunk-W6XCQAXP.js";
|
|
14
14
|
import {
|
|
15
15
|
ToolAnnotations
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WUPLD4VN.js";
|
|
17
17
|
import "./chunk-Q4IZAUIF.js";
|
|
18
18
|
import "./chunk-H72MEDMN.js";
|
|
19
19
|
import {
|
package/js/graphql.js
CHANGED
|
@@ -4,28 +4,28 @@ import {
|
|
|
4
4
|
} from "./chunk-TE25A7D6.js";
|
|
5
5
|
import {
|
|
6
6
|
protocolOperations
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Y46DFT3O.js";
|
|
8
8
|
import "./chunk-BCSNKUAC.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-ZKW64V6P.js";
|
|
10
10
|
import {
|
|
11
11
|
cacheKey
|
|
12
12
|
} from "./chunk-PL5KOEZD.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-24IHGRND.js";
|
|
14
14
|
import {
|
|
15
15
|
failOnNetworkRefusal
|
|
16
16
|
} from "./chunk-I6Q7ZPKJ.js";
|
|
17
17
|
import "./chunk-XBG7HHXC.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-PAUT66KY.js";
|
|
19
19
|
import {
|
|
20
20
|
nativeOperation,
|
|
21
21
|
routerDeclaration
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MHFAQ2XD.js";
|
|
23
23
|
import {
|
|
24
24
|
accountProviderError,
|
|
25
25
|
graphqlProviderError,
|
|
26
26
|
httpProviderError
|
|
27
27
|
} from "./chunk-W6XCQAXP.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-WUPLD4VN.js";
|
|
29
29
|
import {
|
|
30
30
|
NetworkRefused,
|
|
31
31
|
ProviderError
|
package/js/host.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAppHandler
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZKW64V6P.js";
|
|
4
4
|
import "./chunk-PL5KOEZD.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-24IHGRND.js";
|
|
6
6
|
import "./chunk-I6Q7ZPKJ.js";
|
|
7
7
|
import "./chunk-XBG7HHXC.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-PAUT66KY.js";
|
|
9
|
+
import "./chunk-MHFAQ2XD.js";
|
|
10
10
|
import "./chunk-W6XCQAXP.js";
|
|
11
11
|
import {
|
|
12
12
|
ElicitationFailed,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
WorkflowRun,
|
|
23
23
|
WorkflowRunId,
|
|
24
24
|
WorkflowRunPage
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-WUPLD4VN.js";
|
|
26
26
|
import {
|
|
27
27
|
CacheCommand,
|
|
28
28
|
CacheError,
|
package/js/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
query,
|
|
12
12
|
t,
|
|
13
13
|
workflow
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-PAUT66KY.js";
|
|
15
15
|
import {
|
|
16
16
|
dynamicRouter,
|
|
17
17
|
mutation,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
toolAnnotations,
|
|
26
26
|
withApproval,
|
|
27
27
|
withApprovals
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-MHFAQ2XD.js";
|
|
29
29
|
import {
|
|
30
30
|
accountProviderError,
|
|
31
31
|
fromPromise
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
ScheduleTiming,
|
|
45
45
|
SecretsMethod,
|
|
46
46
|
WorkflowFailure
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-WUPLD4VN.js";
|
|
48
48
|
import {
|
|
49
49
|
CacheError,
|
|
50
50
|
FetchOptionUnsupported,
|
package/js/mcp/effect.js
CHANGED
|
@@ -2,18 +2,17 @@ import {
|
|
|
2
2
|
mcpClientEffect,
|
|
3
3
|
mcpHealthEffect,
|
|
4
4
|
mcpToolsEffect
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-IGOYMUWZ.js";
|
|
5
|
+
} from "../chunk-T6QLMX67.js";
|
|
7
6
|
import "../chunk-BCSNKUAC.js";
|
|
8
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-ZKW64V6P.js";
|
|
9
8
|
import "../chunk-PL5KOEZD.js";
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-24IHGRND.js";
|
|
11
10
|
import "../chunk-I6Q7ZPKJ.js";
|
|
12
11
|
import "../chunk-XBG7HHXC.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-PAUT66KY.js";
|
|
13
|
+
import "../chunk-MHFAQ2XD.js";
|
|
15
14
|
import "../chunk-W6XCQAXP.js";
|
|
16
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-WUPLD4VN.js";
|
|
17
16
|
import "../chunk-Q4IZAUIF.js";
|
|
18
17
|
import "../chunk-H72MEDMN.js";
|
|
19
18
|
import "../chunk-KGCTYL2S.js";
|
package/js/mcp.js
CHANGED
|
@@ -1,32 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
mcpClientEffect,
|
|
3
|
-
mcpHealthEffect
|
|
4
|
-
} from "./chunk-BX2S3T2R.js";
|
|
5
1
|
import {
|
|
6
2
|
catalogCache,
|
|
7
3
|
catalogScope
|
|
8
4
|
} from "./chunk-TE25A7D6.js";
|
|
9
|
-
import {
|
|
10
|
-
adaptMcpTool
|
|
11
|
-
} from "./chunk-IGOYMUWZ.js";
|
|
12
5
|
import {
|
|
13
6
|
protocolOperations
|
|
14
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Y46DFT3O.js";
|
|
8
|
+
import {
|
|
9
|
+
adaptMcpTool,
|
|
10
|
+
mcpClientEffect,
|
|
11
|
+
mcpHealthEffect
|
|
12
|
+
} from "./chunk-T6QLMX67.js";
|
|
15
13
|
import "./chunk-BCSNKUAC.js";
|
|
16
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-ZKW64V6P.js";
|
|
17
15
|
import {
|
|
18
16
|
cacheKey
|
|
19
17
|
} from "./chunk-PL5KOEZD.js";
|
|
20
18
|
import {
|
|
21
19
|
operationDescription
|
|
22
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-24IHGRND.js";
|
|
23
21
|
import "./chunk-I6Q7ZPKJ.js";
|
|
24
22
|
import "./chunk-XBG7HHXC.js";
|
|
25
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-PAUT66KY.js";
|
|
26
24
|
import {
|
|
27
25
|
nativeOperation,
|
|
28
26
|
routerDeclaration
|
|
29
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-MHFAQ2XD.js";
|
|
30
28
|
import {
|
|
31
29
|
fromPromise,
|
|
32
30
|
method
|
|
@@ -37,7 +35,7 @@ import {
|
|
|
37
35
|
McpServerHeader,
|
|
38
36
|
McpToolMetadata,
|
|
39
37
|
McpToolsOptions
|
|
40
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-WUPLD4VN.js";
|
|
41
39
|
import "./chunk-Q4IZAUIF.js";
|
|
42
40
|
import "./chunk-H72MEDMN.js";
|
|
43
41
|
import "./chunk-KGCTYL2S.js";
|
package/js/openapi.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
protocolOperations,
|
|
10
10
|
protocolRouter
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-Y46DFT3O.js";
|
|
12
12
|
import {
|
|
13
13
|
OpenapiCompileError,
|
|
14
14
|
OpenapiCompileErrorCode,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
isOpenapiTextMedia,
|
|
30
30
|
openapiBinaryResultSchema,
|
|
31
31
|
openapiMediaKind
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-24IHGRND.js";
|
|
33
33
|
import {
|
|
34
34
|
failOnNetworkRefusal
|
|
35
35
|
} from "./chunk-I6Q7ZPKJ.js";
|
|
@@ -37,7 +37,7 @@ import "./chunk-XBG7HHXC.js";
|
|
|
37
37
|
import {
|
|
38
38
|
nativeOperation,
|
|
39
39
|
routerDeclaration
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-MHFAQ2XD.js";
|
|
41
41
|
import {
|
|
42
42
|
accountProviderError,
|
|
43
43
|
bodyUpstreamError,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
OpenapiResponseError,
|
|
54
54
|
RouterMeta,
|
|
55
55
|
defaultOpenapiErrorLimits
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-WUPLD4VN.js";
|
|
57
57
|
import {
|
|
58
58
|
NetworkRefused,
|
|
59
59
|
ProviderError,
|
|
@@ -5004,19 +5004,21 @@ var compileOpenApiDocument = (entry, inputDocument, options = {}) => {
|
|
|
5004
5004
|
} catch (error) {
|
|
5005
5005
|
if (!(error instanceof OpenapiCompileError)) throw error;
|
|
5006
5006
|
}
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5007
|
+
const allowed = options.allowedOrigin === void 0 ? void 0 : typeof options.allowedOrigin === "string" ? [options.allowedOrigin] : options.allowedOrigin;
|
|
5008
|
+
let mostUsed;
|
|
5009
|
+
for (const [origin, count] of allowed === void 0 ? counts : []) {
|
|
5010
|
+
const best = mostUsed === void 0 ? 0 : counts.get(mostUsed) ?? 0;
|
|
5011
|
+
if (count > best || count === best && origin === documentOrigin) mostUsed = origin;
|
|
5011
5012
|
}
|
|
5013
|
+
const pinnedOrigins = new Set(allowed ?? (mostUsed === void 0 ? [] : [mostUsed]));
|
|
5012
5014
|
const imported = [];
|
|
5013
5015
|
for (const { operation, methods: operationMethods, declared } of built) {
|
|
5014
5016
|
const origin = new URL(operation.baseUrl).origin;
|
|
5015
|
-
if (origin
|
|
5017
|
+
if (!pinnedOrigins.has(origin)) {
|
|
5016
5018
|
skipped.push({
|
|
5017
5019
|
...declared,
|
|
5018
5020
|
code: "multiple_hosts",
|
|
5019
|
-
reason:
|
|
5021
|
+
reason: allowed === void 0 ? `Its server origin ${origin} differs from ${mostUsed ?? "the origin"} most operations use.` : `Its server origin ${origin} is not allowedOrigin ${allowed.join(", ")}.`
|
|
5020
5022
|
});
|
|
5021
5023
|
continue;
|
|
5022
5024
|
}
|
|
@@ -5026,10 +5028,10 @@ var compileOpenApiDocument = (entry, inputDocument, options = {}) => {
|
|
|
5026
5028
|
const operations = imported.map(({ operation }) => operation);
|
|
5027
5029
|
if (!operations.length) {
|
|
5028
5030
|
const left = inDefinitionOrder(skipped);
|
|
5029
|
-
if (
|
|
5031
|
+
if (allowed !== void 0 && built.length > 0)
|
|
5030
5032
|
throw new OpenapiCompileError({
|
|
5031
5033
|
code: "no_supported_operations",
|
|
5032
|
-
reason: `allowedOrigin ${
|
|
5034
|
+
reason: `allowedOrigin ${allowed.join(", ")} is not the origin of any operation. They resolve to ${[...counts.keys()].join(", ")}. Set allowedOrigin to the origin that receives the account's credentials, or set baseUrl.`,
|
|
5033
5035
|
skipped: left,
|
|
5034
5036
|
origins: [...counts.keys()]
|
|
5035
5037
|
});
|
|
@@ -5094,7 +5096,7 @@ var compileOpenApiDocument = (entry, inputDocument, options = {}) => {
|
|
|
5094
5096
|
secrets: [...methods.values()],
|
|
5095
5097
|
oauth,
|
|
5096
5098
|
schemes,
|
|
5097
|
-
|
|
5099
|
+
pinnedOrigins: [...pinnedOrigins],
|
|
5098
5100
|
fallback
|
|
5099
5101
|
};
|
|
5100
5102
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apps",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.85",
|
|
4
4
|
"description": "TypeScript apps with typed tools, accounts, storage, and UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -33,10 +33,6 @@
|
|
|
33
33
|
"types": "./types/apps/src/mcp.d.ts",
|
|
34
34
|
"import": "./js/mcp.js"
|
|
35
35
|
},
|
|
36
|
-
"./mcp/stdio": {
|
|
37
|
-
"types": "./types/apps/src/mcp-stdio.d.ts",
|
|
38
|
-
"import": "./js/mcp/stdio.js"
|
|
39
|
-
},
|
|
40
36
|
"./mcp/effect": {
|
|
41
37
|
"types": "./types/apps/src/implementation/mcp.d.ts",
|
|
42
38
|
"import": "./js/mcp/effect.js"
|