apps 0.0.1-beta.124 → 0.0.1-beta.125
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-RR44Z4RU.js → chunk-2AI3RZXP.js} +5 -5
- package/js/{chunk-5IWCEMLY.js → chunk-55QLA7T7.js} +4 -4
- package/js/{chunk-DA6RXOMJ.js → chunk-5LGG5YSE.js} +10 -3
- package/js/{chunk-AUZGGAPP.js → chunk-7ASLJHSD.js} +4 -4
- package/js/{chunk-KY4KYPUZ.js → chunk-7TDDMSZI.js} +4 -4
- package/js/{chunk-573E3S2U.js → chunk-7ZYZWLXS.js} +80 -0
- package/js/{chunk-C23S3WPT.js → chunk-GWAA3COO.js} +1 -1
- package/js/{chunk-3OADIFKV.js → chunk-LOHZM4RK.js} +3 -3
- package/js/{chunk-OLUDW4HL.js → chunk-MVAS3VFK.js} +4 -4
- package/js/{chunk-UPICNVJO.js → chunk-TTMRK64V.js} +2 -2
- package/js/{chunk-CL3K7BJD.js → chunk-V3HWVVFZ.js} +1 -1
- package/js/{chunk-GU25DFBC.js → chunk-VEQDEM6J.js} +37 -14
- package/js/client.js +1 -1
- package/js/contracts.js +7 -1
- package/js/effect.js +9 -9
- package/js/graphql.js +11 -11
- package/js/host.js +9 -9
- package/js/index.js +12 -9
- package/js/mcp/effect.js +10 -10
- package/js/mcp.js +12 -12
- package/js/openapi.js +7 -7
- package/js/skills.js +6 -6
- package/package.json +1 -1
- package/runtime.json +1 -1
- package/types/apps/src/contracts/help-text.d.ts +31 -0
- package/types/apps/src/contracts/host.d.ts +36 -0
- package/types/apps/src/contracts/protocols/current.d.ts +244 -0
- package/types/apps/src/contracts/provider.d.ts +4 -0
- package/types/apps/src/implementation/elicitation.d.ts +4 -4
- package/types/apps/src/implementation/help-text.d.ts +5 -0
- package/types/apps/src/implementation/mcp-client.d.ts +2 -2
- package/types/apps/src/implementation/mcp.d.ts +2 -2
- package/types/apps/src/implementation/provider.d.ts +2 -1
- package/types/apps/src/implementation/router-catalog.d.ts +4 -4
- package/types/apps/src/implementation/schema.d.ts +17 -6
- package/types/apps/src/index.d.ts +20 -5
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
prepareElicitation
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VEQDEM6J.js";
|
|
4
4
|
import {
|
|
5
5
|
failOnNetworkRefusal
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-V3HWVVFZ.js";
|
|
7
7
|
import {
|
|
8
8
|
accountProviderError,
|
|
9
9
|
bodyUpstreamError,
|
|
10
10
|
fromPromise,
|
|
11
11
|
httpProviderError,
|
|
12
12
|
providerErrorDetail
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GWAA3COO.js";
|
|
14
14
|
import {
|
|
15
15
|
ElicitationFailed,
|
|
16
16
|
McpCredentialsUnverified,
|
|
@@ -28,12 +28,12 @@ import {
|
|
|
28
28
|
defaultMcpClientLimits,
|
|
29
29
|
mcpHealthReserveMs,
|
|
30
30
|
mcpSdkTimerCeilingMs
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-7ZYZWLXS.js";
|
|
32
32
|
import {
|
|
33
33
|
jsonSchemaDecoder,
|
|
34
34
|
nestJsonSchema,
|
|
35
35
|
preparedJsonSchemaDecoder
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-5LGG5YSE.js";
|
|
37
37
|
import {
|
|
38
38
|
captureTelemetry,
|
|
39
39
|
owned
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getWithReads
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7TDDMSZI.js";
|
|
4
4
|
import {
|
|
5
5
|
fromPromise,
|
|
6
6
|
method,
|
|
7
7
|
toPromise
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GWAA3COO.js";
|
|
9
9
|
import {
|
|
10
10
|
CacheError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7ZYZWLXS.js";
|
|
12
12
|
import {
|
|
13
13
|
wrap
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5LGG5YSE.js";
|
|
15
15
|
import {
|
|
16
16
|
JsonObject
|
|
17
17
|
} from "./chunk-NCOPALJZ.js";
|
|
@@ -1147,14 +1147,21 @@ function wrap(decoder, optionalValue) {
|
|
|
1147
1147
|
}
|
|
1148
1148
|
};
|
|
1149
1149
|
}
|
|
1150
|
+
var annotated = (schema, { title, description }) => title === void 0 && description === void 0 ? schema : schema.annotate({
|
|
1151
|
+
...title === void 0 ? {} : { title },
|
|
1152
|
+
...description === void 0 ? {} : { description }
|
|
1153
|
+
});
|
|
1150
1154
|
function string(options = {}) {
|
|
1151
1155
|
return wrap(
|
|
1152
|
-
|
|
1156
|
+
annotated(
|
|
1157
|
+
options.minLength === void 0 ? Schema_exports.String : Schema_exports.String.check(Schema_exports.isMinLength(options.minLength)),
|
|
1158
|
+
options
|
|
1159
|
+
),
|
|
1153
1160
|
false
|
|
1154
1161
|
);
|
|
1155
1162
|
}
|
|
1156
|
-
var number = () => wrap(Schema_exports.Finite, false);
|
|
1157
|
-
var boolean = () => wrap(Schema_exports.Boolean, false);
|
|
1163
|
+
var number = (options = {}) => wrap(annotated(Schema_exports.Finite, options), false);
|
|
1164
|
+
var boolean = (options = {}) => wrap(annotated(Schema_exports.Boolean, options), false);
|
|
1158
1165
|
var json = () => wrap(Schema_exports.Json, false);
|
|
1159
1166
|
var record = (value) => wrap(
|
|
1160
1167
|
Schema_exports.Record(
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
declaredOperations,
|
|
3
3
|
nativeOperation,
|
|
4
4
|
nativeRouter
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LOHZM4RK.js";
|
|
6
6
|
import {
|
|
7
7
|
fromPromise,
|
|
8
8
|
method
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GWAA3COO.js";
|
|
10
10
|
import {
|
|
11
11
|
EmittedEvent,
|
|
12
12
|
EventName,
|
|
@@ -17,13 +17,13 @@ import {
|
|
|
17
17
|
normalizePlacements,
|
|
18
18
|
placementFields,
|
|
19
19
|
renderPlacement
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-7ZYZWLXS.js";
|
|
21
21
|
import {
|
|
22
22
|
decoderOf,
|
|
23
23
|
isSchema,
|
|
24
24
|
jsonSchemaDocument,
|
|
25
25
|
schemaArgument
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-5LGG5YSE.js";
|
|
27
27
|
import {
|
|
28
28
|
JsonValue
|
|
29
29
|
} from "./chunk-NCOPALJZ.js";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
appInvocationFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-V3HWVVFZ.js";
|
|
4
4
|
import {
|
|
5
5
|
fromPromise,
|
|
6
6
|
method,
|
|
7
7
|
toPromise
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GWAA3COO.js";
|
|
9
9
|
import {
|
|
10
10
|
CacheAcquired,
|
|
11
11
|
CacheEntry,
|
|
12
12
|
CacheError,
|
|
13
13
|
cacheLimits,
|
|
14
14
|
scopedSlots
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7ZYZWLXS.js";
|
|
16
16
|
import {
|
|
17
17
|
decoderOf
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5LGG5YSE.js";
|
|
19
19
|
import {
|
|
20
20
|
captureTelemetry,
|
|
21
21
|
owned,
|
|
@@ -2277,6 +2277,72 @@ var appIconsProblem = (icons) => {
|
|
|
2277
2277
|
return Schema_exports.is(AppIcons)(icons) ? void 0 : 'Each icon is { src, mimeType?: string, sizes?: string[], theme?: "light" | "dark" }';
|
|
2278
2278
|
};
|
|
2279
2279
|
|
|
2280
|
+
// src/contracts/help-text.ts
|
|
2281
|
+
var helpTextLimits = { guide: 4e3, description: 1e3 };
|
|
2282
|
+
var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2283
|
+
var schemaNodes = /* @__PURE__ */ new Set([
|
|
2284
|
+
"items",
|
|
2285
|
+
"additionalItems",
|
|
2286
|
+
"contains",
|
|
2287
|
+
"additionalProperties",
|
|
2288
|
+
"unevaluatedProperties",
|
|
2289
|
+
"unevaluatedItems",
|
|
2290
|
+
"propertyNames",
|
|
2291
|
+
"not",
|
|
2292
|
+
"if",
|
|
2293
|
+
"then",
|
|
2294
|
+
"else",
|
|
2295
|
+
"contentSchema"
|
|
2296
|
+
]);
|
|
2297
|
+
var schemaLists = /* @__PURE__ */ new Set(["allOf", "anyOf", "oneOf", "prefixItems", "items"]);
|
|
2298
|
+
var schemaMaps = /* @__PURE__ */ new Set([
|
|
2299
|
+
"properties",
|
|
2300
|
+
"patternProperties",
|
|
2301
|
+
"dependentSchemas",
|
|
2302
|
+
"dependencies",
|
|
2303
|
+
"$defs",
|
|
2304
|
+
"definitions"
|
|
2305
|
+
]);
|
|
2306
|
+
var mapFieldHelp = (document, edit) => {
|
|
2307
|
+
const schema2 = (value) => isObject(value) ? mapFieldHelp(value, edit) : value;
|
|
2308
|
+
return Object.fromEntries(
|
|
2309
|
+
Object.entries(edit(document)).map(([keyword, value]) => [
|
|
2310
|
+
keyword,
|
|
2311
|
+
Array.isArray(value) ? schemaLists.has(keyword) ? value.map(schema2) : value : isObject(value) && schemaMaps.has(keyword) ? Object.fromEntries(Object.entries(value).map(([name, item]) => [name, schema2(item)])) : schemaNodes.has(keyword) ? schema2(value) : value
|
|
2312
|
+
])
|
|
2313
|
+
);
|
|
2314
|
+
};
|
|
2315
|
+
var fieldDescriptions = (document) => {
|
|
2316
|
+
const properties = document["properties"];
|
|
2317
|
+
if (!isObject(properties)) return [];
|
|
2318
|
+
const descriptions = (schema2) => {
|
|
2319
|
+
if (!isObject(schema2)) return [];
|
|
2320
|
+
const { description, anyOf } = schema2;
|
|
2321
|
+
return [
|
|
2322
|
+
...typeof description === "string" ? [description] : [],
|
|
2323
|
+
...Array.isArray(anyOf) ? anyOf.flatMap(descriptions) : []
|
|
2324
|
+
];
|
|
2325
|
+
};
|
|
2326
|
+
return Object.entries(properties).flatMap(
|
|
2327
|
+
([name, schema2]) => descriptions(schema2).map((description) => [name, description])
|
|
2328
|
+
);
|
|
2329
|
+
};
|
|
2330
|
+
var withoutFieldHelp = ({ title: _title, description: _description, ...field }) => field;
|
|
2331
|
+
var methodWithoutHelp = (method) => {
|
|
2332
|
+
if (method.type === "secrets") {
|
|
2333
|
+
const { guide: _guide, ...defined2 } = method;
|
|
2334
|
+
return { ...defined2, fields: mapFieldHelp(method.fields, withoutFieldHelp) };
|
|
2335
|
+
}
|
|
2336
|
+
const { clientGuide: _clientGuide, ...defined } = method;
|
|
2337
|
+
return { ...defined, response: mapFieldHelp(method.response, withoutFieldHelp) };
|
|
2338
|
+
};
|
|
2339
|
+
var withoutHelp = (provider) => ({
|
|
2340
|
+
...provider,
|
|
2341
|
+
auth: Object.fromEntries(
|
|
2342
|
+
Object.entries(provider.auth).map(([name, method]) => [name, methodWithoutHelp(method)])
|
|
2343
|
+
)
|
|
2344
|
+
});
|
|
2345
|
+
|
|
2280
2346
|
// src/contracts/placement.ts
|
|
2281
2347
|
var PlacementField = Schema_exports.Struct({ field: Schema_exports.NonEmptyString });
|
|
2282
2348
|
var PlacementText = Schema_exports.Union([Schema_exports.String, PlacementField]);
|
|
@@ -4569,34 +4635,44 @@ var exposure3 = {
|
|
|
4569
4635
|
*/
|
|
4570
4636
|
request: Schema_exports.optionalKey(Placements)
|
|
4571
4637
|
};
|
|
4638
|
+
var clientGuide = { clientGuide: Schema_exports.optionalKey(Schema_exports.String) };
|
|
4572
4639
|
var DeclaredAuthMethod5 = Schema_exports.Union([
|
|
4573
4640
|
Schema_exports.Struct({
|
|
4574
4641
|
type: Schema_exports.Literal("secrets"),
|
|
4575
4642
|
label: Schema_exports.String,
|
|
4643
|
+
/**
|
|
4644
|
+
* Markdown the connect form shows above the fields: ordered setup, prerequisites, warnings.
|
|
4645
|
+
* Setup help, not part of the provider; see `withoutHelp`. Bundles before it declare none.
|
|
4646
|
+
*/
|
|
4647
|
+
guide: Schema_exports.optionalKey(Schema_exports.String),
|
|
4576
4648
|
fields: JsonObject2,
|
|
4577
4649
|
...exposure3
|
|
4578
4650
|
}),
|
|
4579
4651
|
Schema_exports.Struct({
|
|
4580
4652
|
type: Schema_exports.Literal("oauth2"),
|
|
4581
4653
|
...OAuth2Config.members[0].fields,
|
|
4654
|
+
...clientGuide,
|
|
4582
4655
|
response: JsonObject2,
|
|
4583
4656
|
...exposure3
|
|
4584
4657
|
}),
|
|
4585
4658
|
Schema_exports.Struct({
|
|
4586
4659
|
type: Schema_exports.Literal("oauth2"),
|
|
4587
4660
|
...OAuth2Config.members[1].fields,
|
|
4661
|
+
...clientGuide,
|
|
4588
4662
|
response: JsonObject2,
|
|
4589
4663
|
...exposure3
|
|
4590
4664
|
}),
|
|
4591
4665
|
Schema_exports.Struct({
|
|
4592
4666
|
type: Schema_exports.Literal("oauth2"),
|
|
4593
4667
|
...OAuth2Config.members[2].fields,
|
|
4668
|
+
...clientGuide,
|
|
4594
4669
|
response: JsonObject2,
|
|
4595
4670
|
...exposure3
|
|
4596
4671
|
}),
|
|
4597
4672
|
Schema_exports.Struct({
|
|
4598
4673
|
type: Schema_exports.Literal("oauth2"),
|
|
4599
4674
|
...OAuth2Config.members[3].fields,
|
|
4675
|
+
...clientGuide,
|
|
4600
4676
|
response: JsonObject2,
|
|
4601
4677
|
...exposure3
|
|
4602
4678
|
})
|
|
@@ -5251,6 +5327,10 @@ export {
|
|
|
5251
5327
|
AppIcon,
|
|
5252
5328
|
AppIcons,
|
|
5253
5329
|
appIconsProblem,
|
|
5330
|
+
helpTextLimits,
|
|
5331
|
+
mapFieldHelp,
|
|
5332
|
+
fieldDescriptions,
|
|
5333
|
+
withoutHelp,
|
|
5254
5334
|
frameworkProtocol,
|
|
5255
5335
|
protocol1,
|
|
5256
5336
|
protocol2,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
accountProviderError,
|
|
3
3
|
fromPromise
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GWAA3COO.js";
|
|
5
5
|
import {
|
|
6
6
|
HostedTool,
|
|
7
7
|
HostedToolSummary,
|
|
8
8
|
RouterKey,
|
|
9
9
|
RouterMeta,
|
|
10
10
|
reservedRouterKeys
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7ZYZWLXS.js";
|
|
12
12
|
import {
|
|
13
13
|
combineJsonSchemas,
|
|
14
14
|
decoderOf,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
once,
|
|
17
17
|
schemaArgument,
|
|
18
18
|
withLazyJsonSchemaDocument
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-5LGG5YSE.js";
|
|
20
20
|
import {
|
|
21
21
|
JsonObject
|
|
22
22
|
} from "./chunk-NCOPALJZ.js";
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
PartialListing,
|
|
6
6
|
joinPath,
|
|
7
7
|
mergeMeta
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LOHZM4RK.js";
|
|
9
9
|
import {
|
|
10
10
|
isShortenedStated,
|
|
11
11
|
parseProviderError,
|
|
12
12
|
providerError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GWAA3COO.js";
|
|
14
14
|
import {
|
|
15
15
|
ApiErrorResponse,
|
|
16
16
|
CacheError,
|
|
@@ -33,14 +33,14 @@ import {
|
|
|
33
33
|
maxFailureFields,
|
|
34
34
|
maxFailureMessageLength,
|
|
35
35
|
maxUpstreamMessageLength
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-7ZYZWLXS.js";
|
|
37
37
|
import {
|
|
38
38
|
SkillLoadFailed,
|
|
39
39
|
skillFormatLimits
|
|
40
40
|
} from "./chunk-EPZ3P7IX.js";
|
|
41
41
|
import {
|
|
42
42
|
jsonSchemaDocument
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-5LGG5YSE.js";
|
|
44
44
|
import {
|
|
45
45
|
AccountId,
|
|
46
46
|
HttpUrl,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fixedRouter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MVAS3VFK.js";
|
|
4
4
|
import {
|
|
5
5
|
nativeOperation,
|
|
6
6
|
operationDeclaration,
|
|
7
7
|
routerDeclaration
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LOHZM4RK.js";
|
|
9
9
|
|
|
10
10
|
// src/implementation/protocol-operations.ts
|
|
11
11
|
var protocolOperations = (operations, kinds = {}) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
authorCache,
|
|
3
3
|
unavailableCache
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7TDDMSZI.js";
|
|
5
5
|
import {
|
|
6
6
|
accountSecrets,
|
|
7
7
|
boundFailureMessage,
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
parseSkillLoadFailed,
|
|
13
13
|
readCatalog,
|
|
14
14
|
routerSkills
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MVAS3VFK.js";
|
|
16
16
|
import {
|
|
17
17
|
appInvocationFetch
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-V3HWVVFZ.js";
|
|
19
19
|
import {
|
|
20
20
|
folderSkillsEffect
|
|
21
21
|
} from "./chunk-SO33LZ7J.js";
|
|
@@ -26,12 +26,12 @@ import {
|
|
|
26
26
|
makeEmitter,
|
|
27
27
|
toEffectApp,
|
|
28
28
|
withPlacements
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-7ASLJHSD.js";
|
|
30
30
|
import {
|
|
31
31
|
declaredOperations,
|
|
32
32
|
locate,
|
|
33
33
|
nativeOperation
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-LOHZM4RK.js";
|
|
35
35
|
import {
|
|
36
36
|
accountProviderError,
|
|
37
37
|
appCode,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
httpProviderError,
|
|
40
40
|
parseProviderError,
|
|
41
41
|
toPromise
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-GWAA3COO.js";
|
|
43
43
|
import {
|
|
44
44
|
AccountCheckResult,
|
|
45
45
|
DeclaredProvider,
|
|
@@ -86,14 +86,16 @@ import {
|
|
|
86
86
|
WorkflowValue,
|
|
87
87
|
approvalElicitation,
|
|
88
88
|
defaultWebhookTransportLimits,
|
|
89
|
+
mapFieldHelp,
|
|
89
90
|
maxInputProblems,
|
|
90
91
|
migrationsDirectory,
|
|
91
92
|
normalizePlacements,
|
|
92
93
|
reservedTablePrefix,
|
|
93
94
|
shareCatalog,
|
|
94
95
|
sqlBindingsLimit,
|
|
96
|
+
withoutHelp,
|
|
95
97
|
workflowDurationMillis
|
|
96
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-7ZYZWLXS.js";
|
|
97
99
|
import {
|
|
98
100
|
AppSkills,
|
|
99
101
|
SkillFile
|
|
@@ -110,7 +112,7 @@ import {
|
|
|
110
112
|
missingKeyText,
|
|
111
113
|
objectShape,
|
|
112
114
|
unionShape
|
|
113
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-5LGG5YSE.js";
|
|
114
116
|
import {
|
|
115
117
|
captureTelemetry,
|
|
116
118
|
makeOwnershipAccounting,
|
|
@@ -369,6 +371,24 @@ var makeWorkflowContext = (execution, definition, fresh, signal) => Effect_expor
|
|
|
369
371
|
return { runId: execution.runId, step };
|
|
370
372
|
});
|
|
371
373
|
|
|
374
|
+
// src/implementation/help-text.ts
|
|
375
|
+
var dedent = (text) => {
|
|
376
|
+
const lines = text.replace(/\r\n?/gu, "\n").split("\n");
|
|
377
|
+
while (lines.length > 0 && lines[0]?.trim() === "") lines.shift();
|
|
378
|
+
while (lines.length > 0 && lines.at(-1)?.trim() === "") lines.pop();
|
|
379
|
+
const indents = lines.filter((line) => line.trim() !== "").map((line) => line.length - line.trimStart().length);
|
|
380
|
+
const common = indents.length === 0 ? 0 : Math.min(...indents);
|
|
381
|
+
return lines.map((line) => line.slice(Math.min(common, line.length)).trimEnd()).join("\n");
|
|
382
|
+
};
|
|
383
|
+
var dedentFieldHelp = (document) => mapFieldHelp(document, (schema) => {
|
|
384
|
+
const { title, description } = schema;
|
|
385
|
+
return {
|
|
386
|
+
...schema,
|
|
387
|
+
...typeof title === "string" ? { title: dedent(title) } : {},
|
|
388
|
+
...typeof description === "string" ? { description: dedent(description) } : {}
|
|
389
|
+
};
|
|
390
|
+
});
|
|
391
|
+
|
|
372
392
|
// src/implementation/input-problems.ts
|
|
373
393
|
var nativeObjectShape = (ast, limit) => objectShape(
|
|
374
394
|
ast.propertySignatures.flatMap(
|
|
@@ -1136,7 +1156,8 @@ function providerDeclaration(provider) {
|
|
|
1136
1156
|
auth.set(name, {
|
|
1137
1157
|
type: "secrets",
|
|
1138
1158
|
label: method.label,
|
|
1139
|
-
|
|
1159
|
+
...method.guide === void 0 ? {} : { guide: dedent(method.guide) },
|
|
1160
|
+
fields: dedentFieldHelp(yield* jsonSchemaDocument(method.fields)),
|
|
1140
1161
|
...declaredExposure(method.exposure),
|
|
1141
1162
|
...declaredPlacements(method.request)
|
|
1142
1163
|
});
|
|
@@ -1145,7 +1166,8 @@ function providerDeclaration(provider) {
|
|
|
1145
1166
|
auth.set(name, {
|
|
1146
1167
|
type: "oauth2",
|
|
1147
1168
|
...method.config,
|
|
1148
|
-
|
|
1169
|
+
...method.clientGuide === void 0 ? {} : { clientGuide: dedent(method.clientGuide) },
|
|
1170
|
+
response: dedentFieldHelp(yield* jsonSchemaDocument(method.response)),
|
|
1149
1171
|
...declaredExposure(method.exposure),
|
|
1150
1172
|
...declaredPlacements(method.request)
|
|
1151
1173
|
});
|
|
@@ -1209,11 +1231,12 @@ function canonical(value) {
|
|
|
1209
1231
|
}
|
|
1210
1232
|
return JSON.stringify(value);
|
|
1211
1233
|
}
|
|
1212
|
-
function
|
|
1234
|
+
function comparable(provider) {
|
|
1235
|
+
const { hosts: _hosts, ...defined } = withoutHelp(provider);
|
|
1213
1236
|
return {
|
|
1214
|
-
...
|
|
1237
|
+
...defined,
|
|
1215
1238
|
auth: Object.fromEntries(
|
|
1216
|
-
Object.entries(
|
|
1239
|
+
Object.entries(defined.auth).map(([name, { request: _request, ...method }]) => [
|
|
1217
1240
|
name,
|
|
1218
1241
|
method
|
|
1219
1242
|
])
|
|
@@ -1240,7 +1263,7 @@ function bindScope(slots, declarations, selected) {
|
|
|
1240
1263
|
for (const account of accounts) {
|
|
1241
1264
|
if (ids.has(account.id)) return yield* Effect_exports.fail(new HostAccountsInvalid());
|
|
1242
1265
|
ids.add(account.id);
|
|
1243
|
-
if (canonical(
|
|
1266
|
+
if (canonical(comparable(account.provider)) !== canonical(comparable(requirement.definition)) || !Object.hasOwn(provider.auth, account.method))
|
|
1244
1267
|
return yield* Effect_exports.fail(new HostAccountsInvalid());
|
|
1245
1268
|
const method = provider.auth[account.method];
|
|
1246
1269
|
if (method === void 0) return yield* Effect_exports.fail(new HostAccountsInvalid());
|
package/js/client.js
CHANGED
package/js/contracts.js
CHANGED
|
@@ -144,7 +144,9 @@ import {
|
|
|
144
144
|
defaultMcpClientLimits,
|
|
145
145
|
defaultWebhookTransportLimits,
|
|
146
146
|
exactApprovalElicitation,
|
|
147
|
+
fieldDescriptions,
|
|
147
148
|
frameworkProtocol,
|
|
149
|
+
helpTextLimits,
|
|
148
150
|
indexCommand,
|
|
149
151
|
inspectCommand,
|
|
150
152
|
isPlacementField,
|
|
@@ -182,8 +184,9 @@ import {
|
|
|
182
184
|
selectTools,
|
|
183
185
|
skillCatalog,
|
|
184
186
|
skillsCommand,
|
|
187
|
+
withoutHelp,
|
|
185
188
|
workflowDurationMillis
|
|
186
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-7ZYZWLXS.js";
|
|
187
190
|
import {
|
|
188
191
|
AppSkillMetadata,
|
|
189
192
|
AppSkillName,
|
|
@@ -360,7 +363,9 @@ export {
|
|
|
360
363
|
defaultMcpClientLimits,
|
|
361
364
|
defaultWebhookTransportLimits,
|
|
362
365
|
exactApprovalElicitation,
|
|
366
|
+
fieldDescriptions,
|
|
363
367
|
frameworkProtocol,
|
|
368
|
+
helpTextLimits,
|
|
364
369
|
indexCommand,
|
|
365
370
|
inspectCommand,
|
|
366
371
|
isPlacementField,
|
|
@@ -401,5 +406,6 @@ export {
|
|
|
401
406
|
skillFormatLimits,
|
|
402
407
|
skillLoadLimits,
|
|
403
408
|
skillsCommand,
|
|
409
|
+
withoutHelp,
|
|
404
410
|
workflowDurationMillis
|
|
405
411
|
};
|
package/js/effect.js
CHANGED
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
ApprovalDecision,
|
|
4
4
|
createAppHandler,
|
|
5
5
|
prepareElicitation
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-VEQDEM6J.js";
|
|
7
|
+
import "./chunk-7TDDMSZI.js";
|
|
8
|
+
import "./chunk-MVAS3VFK.js";
|
|
9
|
+
import "./chunk-V3HWVVFZ.js";
|
|
10
10
|
import "./chunk-SO33LZ7J.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-7ASLJHSD.js";
|
|
12
|
+
import "./chunk-LOHZM4RK.js";
|
|
13
|
+
import "./chunk-GWAA3COO.js";
|
|
14
14
|
import {
|
|
15
15
|
ToolAnnotations
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7ZYZWLXS.js";
|
|
17
17
|
import "./chunk-EPZ3P7IX.js";
|
|
18
18
|
import {
|
|
19
19
|
compileJsonSchemaDecoder,
|
|
20
20
|
decoderOf,
|
|
21
21
|
jsonSchemaDecoder,
|
|
22
22
|
wrap
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-5LGG5YSE.js";
|
|
24
24
|
import "./chunk-2EEUUSL7.js";
|
|
25
25
|
import "./chunk-EAPSQBFN.js";
|
|
26
26
|
import "./chunk-CCJUTN55.js";
|
package/js/graphql.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
catalogCache,
|
|
3
3
|
catalogScope
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-55QLA7T7.js";
|
|
5
5
|
import {
|
|
6
6
|
protocolOperations
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TTMRK64V.js";
|
|
8
8
|
import "./chunk-BCSNKUAC.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-VEQDEM6J.js";
|
|
10
10
|
import {
|
|
11
11
|
cacheKey
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7TDDMSZI.js";
|
|
13
13
|
import {
|
|
14
14
|
GraphqlError,
|
|
15
15
|
GraphqlIntrospection,
|
|
@@ -20,33 +20,33 @@ import {
|
|
|
20
20
|
maxGraphqlStatedErrors,
|
|
21
21
|
maxGraphqlStatedExtensions,
|
|
22
22
|
maxGraphqlStatedFieldLength
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MVAS3VFK.js";
|
|
24
24
|
import {
|
|
25
25
|
failOnNetworkRefusal
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-V3HWVVFZ.js";
|
|
27
27
|
import "./chunk-SO33LZ7J.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-7ASLJHSD.js";
|
|
29
29
|
import {
|
|
30
30
|
nativeOperation,
|
|
31
31
|
routerDeclaration
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-LOHZM4RK.js";
|
|
33
33
|
import {
|
|
34
34
|
accountProviderError,
|
|
35
35
|
boundStated,
|
|
36
36
|
graphqlProviderError,
|
|
37
37
|
httpProviderError
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-GWAA3COO.js";
|
|
39
39
|
import {
|
|
40
40
|
FailureFieldName,
|
|
41
41
|
NetworkRefused,
|
|
42
42
|
ProviderError,
|
|
43
43
|
defaultOpenapiErrorLimits,
|
|
44
44
|
maxUpstreamMessageLength
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-7ZYZWLXS.js";
|
|
46
46
|
import "./chunk-EPZ3P7IX.js";
|
|
47
47
|
import {
|
|
48
48
|
jsonSchemaDecoder
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-5LGG5YSE.js";
|
|
50
50
|
import {
|
|
51
51
|
owned
|
|
52
52
|
} from "./chunk-2EEUUSL7.js";
|
package/js/host.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAppHandler
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-VEQDEM6J.js";
|
|
4
|
+
import "./chunk-7TDDMSZI.js";
|
|
5
|
+
import "./chunk-MVAS3VFK.js";
|
|
6
|
+
import "./chunk-V3HWVVFZ.js";
|
|
7
7
|
import "./chunk-SO33LZ7J.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-7ASLJHSD.js";
|
|
9
|
+
import "./chunk-LOHZM4RK.js";
|
|
10
|
+
import "./chunk-GWAA3COO.js";
|
|
11
11
|
import {
|
|
12
12
|
CacheCommand,
|
|
13
13
|
CacheError,
|
|
@@ -25,9 +25,9 @@ import {
|
|
|
25
25
|
WorkflowRun,
|
|
26
26
|
WorkflowRunId,
|
|
27
27
|
WorkflowRunPage
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-7ZYZWLXS.js";
|
|
29
29
|
import "./chunk-EPZ3P7IX.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-5LGG5YSE.js";
|
|
31
31
|
import {
|
|
32
32
|
collectTelemetry,
|
|
33
33
|
withRemoteSpan
|