apps 0.0.1-beta.95 → 0.0.1-beta.99
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-7N2UOAMJ.js → chunk-2CURR5Y7.js} +2 -2
- package/js/{chunk-OGUGI2I6.js → chunk-2LSGC7XY.js} +2 -2
- package/js/{chunk-6WC2OWHV.js → chunk-4UPC36ZL.js} +138 -5
- package/js/{chunk-7YH74PGP.js → chunk-5C6RAGAS.js} +3 -3
- package/js/{chunk-MN5XVRKW.js → chunk-7STIP5CS.js} +1 -1
- package/js/{chunk-EQVLEJTX.js → chunk-ILYCJ3HV.js} +3 -3
- package/js/{chunk-DXZEKRIW.js → chunk-K6TSCYAO.js} +4 -4
- package/js/{chunk-RLV4NKW3.js → chunk-QI66R4FP.js} +20 -6
- package/js/{chunk-VIFIFPDC.js → chunk-RN4YB4JT.js} +18 -11
- package/js/{chunk-2GPX2E57.js → chunk-VCYWAA4N.js} +1 -1
- package/js/{chunk-4CCDS4U7.js → chunk-YWVISRZD.js} +3 -3
- package/js/contracts.js +9 -1
- package/js/effect.js +8 -8
- package/js/graphql.js +10 -10
- package/js/host.js +8 -8
- package/js/index.js +4 -4
- package/js/mcp/effect.js +9 -9
- package/js/mcp.js +11 -11
- package/js/openapi.js +6 -6
- package/js/skills.js +5 -5
- package/package.json +1 -1
- package/runtime.json +1 -1
- package/types/apps/src/contracts/host.d.ts +11 -4
- package/types/apps/src/contracts/protocols/current.d.ts +188 -0
- package/types/apps/src/contracts/shared-catalog.d.ts +11 -0
- package/types/utils/src/schema-definitions.d.ts +13 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fromPromise
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7STIP5CS.js";
|
|
4
4
|
import {
|
|
5
5
|
HostedTool,
|
|
6
6
|
RouterKey,
|
|
7
7
|
RouterMeta,
|
|
8
8
|
reservedRouterKeys
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4UPC36ZL.js";
|
|
10
10
|
import {
|
|
11
11
|
decoderOf,
|
|
12
12
|
schemaArgument
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fixedRouter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QI66R4FP.js";
|
|
4
4
|
import {
|
|
5
5
|
nativeOperation,
|
|
6
6
|
operationDeclaration,
|
|
7
7
|
routerDeclaration
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2CURR5Y7.js";
|
|
9
9
|
|
|
10
10
|
// src/implementation/protocol-operations.ts
|
|
11
11
|
var protocolOperations = (operations, kinds = {}) => {
|
|
@@ -4474,7 +4474,12 @@ var DeclaredRequirements8 = Schema_exports.Struct({
|
|
|
4474
4474
|
/** Accepts skills sources and reports whether the catalog includes a live loader. */
|
|
4475
4475
|
skillSources: Schema_exports.optionalKey(Schema_exports.Literal(true)),
|
|
4476
4476
|
/** Accepts scheduled inspection. Earlier builds reject it as an excess field. */
|
|
4477
|
-
scheduledTools: Schema_exports.optionalKey(Schema_exports.Literal(true))
|
|
4477
|
+
scheduledTools: Schema_exports.optionalKey(Schema_exports.Literal(true)),
|
|
4478
|
+
/**
|
|
4479
|
+
* Accepts inspect definitions and answers it with a shared catalog. Earlier builds reject it
|
|
4480
|
+
* as an excess field.
|
|
4481
|
+
*/
|
|
4482
|
+
sharedDefinitions: Schema_exports.optionalKey(Schema_exports.Literal(true))
|
|
4478
4483
|
})
|
|
4479
4484
|
),
|
|
4480
4485
|
/**
|
|
@@ -4567,6 +4572,18 @@ var HostedCatalogSummary4 = Schema_exports.Struct({
|
|
|
4567
4572
|
tools: Schema_exports.Array(HostedToolSummary3),
|
|
4568
4573
|
routers: Schema_exports.Array(HostedRouter4)
|
|
4569
4574
|
});
|
|
4575
|
+
var SharedSchemaKey = Schema_exports.Literals(["inputSchema", "outputSchema"]);
|
|
4576
|
+
var HostedSharedTool = Schema_exports.Struct({
|
|
4577
|
+
...HostedTool3.fields,
|
|
4578
|
+
shared: Schema_exports.optionalKey(Schema_exports.Array(SharedSchemaKey))
|
|
4579
|
+
});
|
|
4580
|
+
var HostedSharedCatalog = Schema_exports.Struct({
|
|
4581
|
+
tools: Schema_exports.Array(HostedSharedTool),
|
|
4582
|
+
routers: Schema_exports.Array(HostedRouter4),
|
|
4583
|
+
definitions: Schema_exports.Array(JsonValue),
|
|
4584
|
+
/** Each distinct `$defs`, its entries naming positions in `definitions`. */
|
|
4585
|
+
defs: Schema_exports.Array(Schema_exports.Record(Schema_exports.String, Schema_exports.Int))
|
|
4586
|
+
});
|
|
4570
4587
|
var SkillSources3 = Schema_exports.Struct({
|
|
4571
4588
|
skills: AppSkills,
|
|
4572
4589
|
dynamic: Schema_exports.Boolean,
|
|
@@ -4596,7 +4613,12 @@ var HostRequest5 = Schema_exports.Union([
|
|
|
4596
4613
|
* Describe only declared operations that have schedules, without dynamic tool discovery.
|
|
4597
4614
|
* Only builds that declare the scheduledTools capability accept this.
|
|
4598
4615
|
*/
|
|
4599
|
-
scheduled: Schema_exports.optionalKey(Schema_exports.Literal(true))
|
|
4616
|
+
scheduled: Schema_exports.optionalKey(Schema_exports.Literal(true)),
|
|
4617
|
+
/**
|
|
4618
|
+
* Answer with a HostedSharedCatalog, each shared `$defs` entry sent once. Only builds that
|
|
4619
|
+
* declare the sharedDefinitions capability accept this.
|
|
4620
|
+
*/
|
|
4621
|
+
definitions: Schema_exports.optionalKey(Schema_exports.Literal("shared"))
|
|
4600
4622
|
}),
|
|
4601
4623
|
Schema_exports.Struct({
|
|
4602
4624
|
operation: Schema_exports.Literal("skills"),
|
|
@@ -4732,6 +4754,7 @@ var current = {
|
|
|
4732
4754
|
requirements: DeclaredRequirements8,
|
|
4733
4755
|
catalog: HostedCatalog4,
|
|
4734
4756
|
catalogSummary: HostedCatalogSummary4,
|
|
4757
|
+
sharedCatalog: HostedSharedCatalog,
|
|
4735
4758
|
skills: SkillCatalogResponse3,
|
|
4736
4759
|
elicitationRequest: FormElicitation,
|
|
4737
4760
|
elicitationReply: ElicitationReply,
|
|
@@ -4746,6 +4769,110 @@ var current = {
|
|
|
4746
4769
|
}
|
|
4747
4770
|
};
|
|
4748
4771
|
|
|
4772
|
+
// ../utils/src/schema-definitions.ts
|
|
4773
|
+
var putEntry = (target, name, value) => {
|
|
4774
|
+
if (name === "__proto__")
|
|
4775
|
+
Object.defineProperty(target, name, {
|
|
4776
|
+
value,
|
|
4777
|
+
enumerable: true,
|
|
4778
|
+
writable: true,
|
|
4779
|
+
configurable: true
|
|
4780
|
+
});
|
|
4781
|
+
else target[name] = value;
|
|
4782
|
+
};
|
|
4783
|
+
var isEntries = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4784
|
+
var schemaDefinitions = (schema2) => {
|
|
4785
|
+
const definitions = schema2?.$defs;
|
|
4786
|
+
return isEntries(definitions) ? definitions : void 0;
|
|
4787
|
+
};
|
|
4788
|
+
|
|
4789
|
+
// src/contracts/shared-catalog.ts
|
|
4790
|
+
var shareCatalog = (catalog) => {
|
|
4791
|
+
const definitions = [];
|
|
4792
|
+
const positions = /* @__PURE__ */ new Map();
|
|
4793
|
+
const position = (definition) => {
|
|
4794
|
+
let at = positions.get(definition);
|
|
4795
|
+
if (at === void 0) positions.set(definition, at = definitions.push(definition) - 1);
|
|
4796
|
+
return at;
|
|
4797
|
+
};
|
|
4798
|
+
const defs = [];
|
|
4799
|
+
const entries = /* @__PURE__ */ new Map();
|
|
4800
|
+
let entryCount = 0;
|
|
4801
|
+
const entry = (name, at) => {
|
|
4802
|
+
let named = entries.get(name);
|
|
4803
|
+
if (named === void 0) entries.set(name, named = /* @__PURE__ */ new Map());
|
|
4804
|
+
let number = named.get(at);
|
|
4805
|
+
if (number === void 0) named.set(at, number = entryCount++);
|
|
4806
|
+
return number;
|
|
4807
|
+
};
|
|
4808
|
+
const byObject = /* @__PURE__ */ new Map();
|
|
4809
|
+
const byEntries = /* @__PURE__ */ new Map();
|
|
4810
|
+
const defsOf = (own) => {
|
|
4811
|
+
const known = byObject.get(own);
|
|
4812
|
+
if (known !== void 0) return known;
|
|
4813
|
+
const named = {};
|
|
4814
|
+
const key = [];
|
|
4815
|
+
for (const [name, definition] of Object.entries(own)) {
|
|
4816
|
+
const at2 = position(definition);
|
|
4817
|
+
putEntry(named, name, at2);
|
|
4818
|
+
key.push(entry(name, at2));
|
|
4819
|
+
}
|
|
4820
|
+
const text = key.join(",");
|
|
4821
|
+
let at = byEntries.get(text);
|
|
4822
|
+
if (at === void 0) byEntries.set(text, at = defs.push(named) - 1);
|
|
4823
|
+
byObject.set(own, at);
|
|
4824
|
+
return at;
|
|
4825
|
+
};
|
|
4826
|
+
const share = (schema2) => {
|
|
4827
|
+
const own = schemaDefinitions(schema2);
|
|
4828
|
+
return schema2 === void 0 || own === void 0 ? void 0 : { ...schema2, $defs: defsOf(own) };
|
|
4829
|
+
};
|
|
4830
|
+
const tools = catalog.tools.map((tool) => {
|
|
4831
|
+
const input = share(tool.inputSchema);
|
|
4832
|
+
const output = share(tool.outputSchema);
|
|
4833
|
+
if (input === void 0 && output === void 0) return tool;
|
|
4834
|
+
return {
|
|
4835
|
+
...tool,
|
|
4836
|
+
...input === void 0 ? {} : { inputSchema: input },
|
|
4837
|
+
...output === void 0 ? {} : { outputSchema: output },
|
|
4838
|
+
shared: [
|
|
4839
|
+
...input === void 0 ? [] : ["inputSchema"],
|
|
4840
|
+
...output === void 0 ? [] : ["outputSchema"]
|
|
4841
|
+
]
|
|
4842
|
+
};
|
|
4843
|
+
});
|
|
4844
|
+
return { tools, routers: catalog.routers, definitions, defs };
|
|
4845
|
+
};
|
|
4846
|
+
var restoreSharedCatalog = (catalog) => {
|
|
4847
|
+
const { definitions } = catalog;
|
|
4848
|
+
const defs = [];
|
|
4849
|
+
for (const named of catalog.defs) {
|
|
4850
|
+
const restored = {};
|
|
4851
|
+
for (const [name, at] of Object.entries(named)) {
|
|
4852
|
+
const definition = definitions[at];
|
|
4853
|
+
if (definition === void 0) return void 0;
|
|
4854
|
+
putEntry(restored, name, definition);
|
|
4855
|
+
}
|
|
4856
|
+
defs.push(restored);
|
|
4857
|
+
}
|
|
4858
|
+
const restore = (schema2) => {
|
|
4859
|
+
const at = schema2?.$defs;
|
|
4860
|
+
const found = typeof at === "number" ? defs[at] : void 0;
|
|
4861
|
+
return schema2 === void 0 || found === void 0 ? void 0 : { ...schema2, $defs: found };
|
|
4862
|
+
};
|
|
4863
|
+
const tools = [];
|
|
4864
|
+
for (const { shared, ...tool } of catalog.tools) {
|
|
4865
|
+
let restored = tool;
|
|
4866
|
+
for (const key of shared ?? []) {
|
|
4867
|
+
const schema2 = restore(restored[key]);
|
|
4868
|
+
if (schema2 === void 0) return void 0;
|
|
4869
|
+
restored = key === "inputSchema" ? { ...restored, inputSchema: schema2 } : { ...restored, outputSchema: schema2 };
|
|
4870
|
+
}
|
|
4871
|
+
tools.push(restored);
|
|
4872
|
+
}
|
|
4873
|
+
return { tools, routers: catalog.routers };
|
|
4874
|
+
};
|
|
4875
|
+
|
|
4749
4876
|
// src/contracts/host.ts
|
|
4750
4877
|
var HostAccount = Schema_exports.Struct({
|
|
4751
4878
|
...ResolvedAccount5.fields,
|
|
@@ -4765,10 +4892,11 @@ var scopedSlots = (accounts) => [
|
|
|
4765
4892
|
];
|
|
4766
4893
|
var skillsCommand = (sources) => sources ? { operation: "skills", sources: true } : { operation: "skills" };
|
|
4767
4894
|
var skillCatalog = (response) => Schema_exports.is(SkillSources3)(response) ? response : { skills: response };
|
|
4768
|
-
var inspectCommand = (
|
|
4895
|
+
var inspectCommand = (options) => ({
|
|
4769
4896
|
operation: "inspect",
|
|
4770
|
-
...tools === void 0 ? {} : { tools: [...tools] },
|
|
4771
|
-
...scheduled === void 0 ? {} : { scheduled }
|
|
4897
|
+
...options.tools === void 0 ? {} : { tools: [...options.tools] },
|
|
4898
|
+
...options.scheduled === void 0 ? {} : { scheduled: options.scheduled },
|
|
4899
|
+
...options.definitions === void 0 ? {} : { definitions: options.definitions }
|
|
4772
4900
|
});
|
|
4773
4901
|
var indexCommand = { operation: "inspect", detail: "summary" };
|
|
4774
4902
|
var selectTools = (tools) => (catalog) => tools === void 0 ? catalog : { ...catalog, tools: catalog.tools.filter((tool) => tools.includes(tool.name)) };
|
|
@@ -5009,6 +5137,9 @@ export {
|
|
|
5009
5137
|
HostedRouter4 as HostedRouter,
|
|
5010
5138
|
HostedCatalog4 as HostedCatalog,
|
|
5011
5139
|
HostedCatalogSummary4 as HostedCatalogSummary,
|
|
5140
|
+
SharedSchemaKey,
|
|
5141
|
+
HostedSharedTool,
|
|
5142
|
+
HostedSharedCatalog,
|
|
5012
5143
|
SkillSources3 as SkillSources,
|
|
5013
5144
|
SkillCatalogResponse3 as SkillCatalogResponse,
|
|
5014
5145
|
AccountCheckCommand2 as AccountCheckCommand,
|
|
@@ -5032,6 +5163,8 @@ export {
|
|
|
5032
5163
|
HostResponse7 as HostResponse,
|
|
5033
5164
|
HostInvocation8 as HostInvocation,
|
|
5034
5165
|
current,
|
|
5166
|
+
shareCatalog,
|
|
5167
|
+
restoreSharedCatalog,
|
|
5035
5168
|
HostAccount,
|
|
5036
5169
|
HostAccountSlots,
|
|
5037
5170
|
HostAccounts,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
appInvocationFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VCYWAA4N.js";
|
|
4
4
|
import {
|
|
5
5
|
fromPromise,
|
|
6
6
|
method,
|
|
7
7
|
toPromise
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7STIP5CS.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-4UPC36ZL.js";
|
|
16
16
|
import {
|
|
17
17
|
decoderOf
|
|
18
18
|
} from "./chunk-VAI3EVCS.js";
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
declaredOperations,
|
|
3
3
|
nativeOperation,
|
|
4
4
|
nativeRouter
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2CURR5Y7.js";
|
|
6
6
|
import {
|
|
7
7
|
fromPromise,
|
|
8
8
|
method
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7STIP5CS.js";
|
|
10
10
|
import {
|
|
11
11
|
EmittedEvent,
|
|
12
12
|
EventName,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
normalizePlacements,
|
|
18
18
|
placementFields,
|
|
19
19
|
renderPlacement
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4UPC36ZL.js";
|
|
21
21
|
import {
|
|
22
22
|
decoderOf,
|
|
23
23
|
isSchema,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
prepareElicitation
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RN4YB4JT.js";
|
|
4
4
|
import {
|
|
5
5
|
failOnNetworkRefusal
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VCYWAA4N.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-7STIP5CS.js";
|
|
14
14
|
import {
|
|
15
15
|
ElicitationFailed,
|
|
16
16
|
McpCredentialsUnverified,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
defaultMcpClientLimits,
|
|
29
29
|
mcpHealthReserveMs,
|
|
30
30
|
mcpSdkTimerCeilingMs
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-4UPC36ZL.js";
|
|
32
32
|
import {
|
|
33
33
|
jsonSchemaDecoder,
|
|
34
34
|
nestJsonSchema,
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
joinPath,
|
|
6
6
|
mergeMeta
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2CURR5Y7.js";
|
|
8
8
|
import {
|
|
9
9
|
isShortenedUpstream,
|
|
10
10
|
parseProviderError,
|
|
11
11
|
providerError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7STIP5CS.js";
|
|
13
13
|
import {
|
|
14
14
|
ApiErrorResponse,
|
|
15
15
|
CacheError,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
maxFailureFields,
|
|
32
32
|
maxFailureMessageLength,
|
|
33
33
|
maxUpstreamMessageLength
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-4UPC36ZL.js";
|
|
35
35
|
import {
|
|
36
36
|
SkillLoadFailed,
|
|
37
37
|
skillFormatLimits
|
|
@@ -607,6 +607,22 @@ var fixedRouter = (operations, meta) => ({
|
|
|
607
607
|
},
|
|
608
608
|
resolve: (name) => Effect_exports.succeed(Object.hasOwn(operations, name) ? operations[name] : void 0)
|
|
609
609
|
});
|
|
610
|
+
var ListedEntries = Schema_exports.Record(Schema_exports.String, Schema_exports.Unknown);
|
|
611
|
+
var ListedTool = HostedTool.mapFields((fields) => ({
|
|
612
|
+
...fields,
|
|
613
|
+
inputSchema: ListedEntries,
|
|
614
|
+
outputSchema: Schema_exports.optionalKey(ListedEntries),
|
|
615
|
+
_meta: Schema_exports.optionalKey(ListedEntries)
|
|
616
|
+
}));
|
|
617
|
+
var isJson = Schema_exports.is(Schema_exports.Json);
|
|
618
|
+
var jsonTools = (tools) => isJson(
|
|
619
|
+
tools.flatMap(
|
|
620
|
+
(tool) => [tool.inputSchema, tool.outputSchema, tool._meta].flatMap(
|
|
621
|
+
(schema) => schema === void 0 ? [] : Object.values(schema)
|
|
622
|
+
)
|
|
623
|
+
)
|
|
624
|
+
);
|
|
625
|
+
var DescribedTools = Schema_exports.Array(ListedTool).pipe(Schema_exports.refine(jsonTools));
|
|
610
626
|
var within = (wanted, path) => [...wanted].flatMap(
|
|
611
627
|
(name) => path === "" ? [name] : name.startsWith(`${path}.`) ? [name.slice(path.length + 1)] : []
|
|
612
628
|
);
|
|
@@ -628,9 +644,7 @@ var readCatalog = (root, options) => Effect_exports.gen(function* () {
|
|
|
628
644
|
],
|
|
629
645
|
{ concurrency: "unbounded" }
|
|
630
646
|
);
|
|
631
|
-
const parsed = yield* Schema_exports.decodeUnknownEffect(
|
|
632
|
-
Schema_exports.Array(options.summary ? HostedToolSummary : HostedTool)
|
|
633
|
-
)(listed).pipe(Effect_exports.mapError(() => new HostDeclarationInvalid()));
|
|
647
|
+
const parsed = yield* (options.summary ? Schema_exports.decodeUnknownEffect(Schema_exports.Array(HostedToolSummary))(listed) : Schema_exports.decodeUnknownEffect(DescribedTools)(listed)).pipe(Effect_exports.mapError(() => new HostDeclarationInvalid()));
|
|
634
648
|
const names = /* @__PURE__ */ new Set();
|
|
635
649
|
const found = [];
|
|
636
650
|
for (const tool of parsed) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
authorCache,
|
|
3
3
|
unavailableCache
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5C6RAGAS.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-QI66R4FP.js";
|
|
16
16
|
import {
|
|
17
17
|
appInvocationFetch
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VCYWAA4N.js";
|
|
19
19
|
import {
|
|
20
20
|
folderSkillsEffect
|
|
21
21
|
} from "./chunk-PBGPES67.js";
|
|
@@ -26,12 +26,12 @@ import {
|
|
|
26
26
|
makeEmitter,
|
|
27
27
|
toEffectApp,
|
|
28
28
|
withPlacements
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-ILYCJ3HV.js";
|
|
30
30
|
import {
|
|
31
31
|
declaredOperations,
|
|
32
32
|
locate,
|
|
33
33
|
nativeOperation
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-2CURR5Y7.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-7STIP5CS.js";
|
|
43
43
|
import {
|
|
44
44
|
AccountCheckResult,
|
|
45
45
|
DeclaredProvider,
|
|
@@ -63,6 +63,7 @@ import {
|
|
|
63
63
|
HostToolNotFound,
|
|
64
64
|
HostToolPolicyFailed,
|
|
65
65
|
HostedRouter,
|
|
66
|
+
HostedSharedCatalog,
|
|
66
67
|
HostedTool,
|
|
67
68
|
HostedToolSummary,
|
|
68
69
|
HostedWebhook,
|
|
@@ -89,9 +90,10 @@ import {
|
|
|
89
90
|
migrationsDirectory,
|
|
90
91
|
normalizePlacements,
|
|
91
92
|
reservedTablePrefix,
|
|
93
|
+
shareCatalog,
|
|
92
94
|
sqlBindingsLimit,
|
|
93
95
|
workflowDurationMillis
|
|
94
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-4UPC36ZL.js";
|
|
95
97
|
import {
|
|
96
98
|
AppSkills,
|
|
97
99
|
SkillFile
|
|
@@ -1178,7 +1180,13 @@ function requirements(slots, sql, events, icons) {
|
|
|
1178
1180
|
return Effect_exports.gen(function* () {
|
|
1179
1181
|
return yield* Schema_exports.decodeUnknownEffect(DeclaredRequirements)({
|
|
1180
1182
|
accounts: { app: yield* declaredSlots(slots.app), user: yield* declaredSlots(slots.user) },
|
|
1181
|
-
capabilities: {
|
|
1183
|
+
capabilities: {
|
|
1184
|
+
skills: true,
|
|
1185
|
+
toolIndex: true,
|
|
1186
|
+
skillSources: true,
|
|
1187
|
+
scheduledTools: true,
|
|
1188
|
+
sharedDefinitions: true
|
|
1189
|
+
},
|
|
1182
1190
|
...sql ? { sql: true } : {},
|
|
1183
1191
|
...events === void 0 || Object.keys(events).length === 0 ? {} : {
|
|
1184
1192
|
events: yield* declarationSafe(
|
|
@@ -1604,10 +1612,9 @@ function dispatch(app, request, context, signal, emitted) {
|
|
|
1604
1612
|
...request.scheduled === true ? { scheduled: true } : {},
|
|
1605
1613
|
schedules: (name) => Object.entries(definition.schedules ?? {}).filter(([, schedule]) => schedule.tool === name).map(([name2, { tool: _tool, ...schedule }]) => ({ name: name2, ...schedule }))
|
|
1606
1614
|
}).pipe(Effect_exports.withSpan("app.catalog.read"));
|
|
1615
|
+
const { tools, routers } = catalog;
|
|
1607
1616
|
return yield* safe2(
|
|
1608
|
-
() => Schema_exports.encodeEffect(WireCatalog)(catalog).pipe(
|
|
1609
|
-
Effect_exports.flatMap(Schema_exports.decodeUnknownEffect(JsonValue))
|
|
1610
|
-
),
|
|
1617
|
+
() => (request.definitions === "shared" && !summary && tools.every((tool2) => "inputSchema" in tool2) ? Schema_exports.encodeEffect(HostedSharedCatalog)(shareCatalog({ tools, routers })) : Schema_exports.encodeEffect(WireCatalog)(catalog)).pipe(Effect_exports.flatMap(Schema_exports.decodeUnknownEffect(JsonValue))),
|
|
1611
1618
|
new HostDeclarationInvalid()
|
|
1612
1619
|
);
|
|
1613
1620
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getWithReads
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5C6RAGAS.js";
|
|
4
4
|
import {
|
|
5
5
|
fromPromise,
|
|
6
6
|
method,
|
|
7
7
|
toPromise
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7STIP5CS.js";
|
|
9
9
|
import {
|
|
10
10
|
CacheError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4UPC36ZL.js";
|
|
12
12
|
import {
|
|
13
13
|
wrap
|
|
14
14
|
} from "./chunk-VAI3EVCS.js";
|
package/js/contracts.js
CHANGED
|
@@ -67,6 +67,8 @@ import {
|
|
|
67
67
|
HostedCatalog,
|
|
68
68
|
HostedCatalogSummary,
|
|
69
69
|
HostedRouter,
|
|
70
|
+
HostedSharedCatalog,
|
|
71
|
+
HostedSharedTool,
|
|
70
72
|
HostedTool,
|
|
71
73
|
HostedToolSummary,
|
|
72
74
|
HostedWebhook,
|
|
@@ -108,6 +110,7 @@ import {
|
|
|
108
110
|
RouterKey,
|
|
109
111
|
RouterMeta,
|
|
110
112
|
ScheduleTiming,
|
|
113
|
+
SharedSchemaKey,
|
|
111
114
|
SkillCatalogResponse,
|
|
112
115
|
SkillLoadFailed,
|
|
113
116
|
SkillSources,
|
|
@@ -173,12 +176,13 @@ import {
|
|
|
173
176
|
protocol9,
|
|
174
177
|
renderPlacement,
|
|
175
178
|
reservedAuthorizationParams,
|
|
179
|
+
restoreSharedCatalog,
|
|
176
180
|
scopedSlots,
|
|
177
181
|
selectTools,
|
|
178
182
|
skillCatalog,
|
|
179
183
|
skillsCommand,
|
|
180
184
|
workflowDurationMillis
|
|
181
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-4UPC36ZL.js";
|
|
182
186
|
import {
|
|
183
187
|
AppSkillMetadata,
|
|
184
188
|
AppSkillName,
|
|
@@ -274,6 +278,8 @@ export {
|
|
|
274
278
|
HostedCatalog,
|
|
275
279
|
HostedCatalogSummary,
|
|
276
280
|
HostedRouter,
|
|
281
|
+
HostedSharedCatalog,
|
|
282
|
+
HostedSharedTool,
|
|
277
283
|
HostedTool,
|
|
278
284
|
HostedToolSummary,
|
|
279
285
|
HostedWebhook,
|
|
@@ -316,6 +322,7 @@ export {
|
|
|
316
322
|
RouterKey,
|
|
317
323
|
RouterMeta,
|
|
318
324
|
ScheduleTiming,
|
|
325
|
+
SharedSchemaKey,
|
|
319
326
|
SkillCatalogResponse,
|
|
320
327
|
SkillDefinitionInvalid,
|
|
321
328
|
SkillFile,
|
|
@@ -385,6 +392,7 @@ export {
|
|
|
385
392
|
protocol9,
|
|
386
393
|
renderPlacement,
|
|
387
394
|
reservedAuthorizationParams,
|
|
395
|
+
restoreSharedCatalog,
|
|
388
396
|
scopedSlots,
|
|
389
397
|
selectTools,
|
|
390
398
|
skillCatalog,
|
package/js/effect.js
CHANGED
|
@@ -3,17 +3,17 @@ 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-RN4YB4JT.js";
|
|
7
|
+
import "./chunk-5C6RAGAS.js";
|
|
8
|
+
import "./chunk-QI66R4FP.js";
|
|
9
|
+
import "./chunk-VCYWAA4N.js";
|
|
10
10
|
import "./chunk-PBGPES67.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-ILYCJ3HV.js";
|
|
12
|
+
import "./chunk-2CURR5Y7.js";
|
|
13
|
+
import "./chunk-7STIP5CS.js";
|
|
14
14
|
import {
|
|
15
15
|
ToolAnnotations
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4UPC36ZL.js";
|
|
17
17
|
import "./chunk-4PIQKACY.js";
|
|
18
18
|
import {
|
|
19
19
|
compileJsonSchemaDecoder,
|
package/js/graphql.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import {
|
|
2
2
|
catalogCache,
|
|
3
3
|
catalogScope
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YWVISRZD.js";
|
|
5
5
|
import {
|
|
6
6
|
protocolOperations
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2LSGC7XY.js";
|
|
8
8
|
import "./chunk-BCSNKUAC.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-RN4YB4JT.js";
|
|
10
10
|
import {
|
|
11
11
|
cacheKey
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-5C6RAGAS.js";
|
|
13
|
+
import "./chunk-QI66R4FP.js";
|
|
14
14
|
import {
|
|
15
15
|
failOnNetworkRefusal
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-VCYWAA4N.js";
|
|
17
17
|
import "./chunk-PBGPES67.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-ILYCJ3HV.js";
|
|
19
19
|
import {
|
|
20
20
|
nativeOperation,
|
|
21
21
|
routerDeclaration
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2CURR5Y7.js";
|
|
23
23
|
import {
|
|
24
24
|
accountProviderError,
|
|
25
25
|
graphqlProviderError,
|
|
26
26
|
httpProviderError
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-7STIP5CS.js";
|
|
28
28
|
import {
|
|
29
29
|
NetworkRefused,
|
|
30
30
|
ProviderError
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-4UPC36ZL.js";
|
|
32
32
|
import "./chunk-4PIQKACY.js";
|
|
33
33
|
import {
|
|
34
34
|
jsonSchemaDecoder
|
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-RN4YB4JT.js";
|
|
4
|
+
import "./chunk-5C6RAGAS.js";
|
|
5
|
+
import "./chunk-QI66R4FP.js";
|
|
6
|
+
import "./chunk-VCYWAA4N.js";
|
|
7
7
|
import "./chunk-PBGPES67.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-ILYCJ3HV.js";
|
|
9
|
+
import "./chunk-2CURR5Y7.js";
|
|
10
|
+
import "./chunk-7STIP5CS.js";
|
|
11
11
|
import {
|
|
12
12
|
CacheCommand,
|
|
13
13
|
CacheError,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
WorkflowRun,
|
|
26
26
|
WorkflowRunId,
|
|
27
27
|
WorkflowRunPage
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-4UPC36ZL.js";
|
|
29
29
|
import "./chunk-4PIQKACY.js";
|
|
30
30
|
import "./chunk-VAI3EVCS.js";
|
|
31
31
|
import {
|
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-ILYCJ3HV.js";
|
|
15
15
|
import {
|
|
16
16
|
dynamicRouter,
|
|
17
17
|
mutation,
|
|
@@ -25,11 +25,11 @@ import {
|
|
|
25
25
|
toolAnnotations,
|
|
26
26
|
withApproval,
|
|
27
27
|
withApprovals
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-2CURR5Y7.js";
|
|
29
29
|
import {
|
|
30
30
|
accountProviderError,
|
|
31
31
|
fromPromise
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-7STIP5CS.js";
|
|
33
33
|
import {
|
|
34
34
|
CacheError,
|
|
35
35
|
CalendarSchedule,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
ScheduleTiming,
|
|
49
49
|
SecretsMethod,
|
|
50
50
|
WorkflowFailure
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-4UPC36ZL.js";
|
|
52
52
|
import "./chunk-4PIQKACY.js";
|
|
53
53
|
import {
|
|
54
54
|
array,
|