apps 0.0.1-beta.3 → 0.0.1-beta.4

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  prepareElicitation
3
- } from "./chunk-J7O55ZV7.js";
3
+ } from "./chunk-6VRYO2BG.js";
4
4
  import {
5
5
  fromPromise
6
6
  } from "./chunk-PYUYJRSK.js";
@@ -13,7 +13,7 @@ import {
13
13
  defaultElicitationLimits,
14
14
  defaultMcpClientLimits,
15
15
  mcpSdkTimerCeilingMs
16
- } from "./chunk-MYYEW3RA.js";
16
+ } from "./chunk-3M2MEDNL.js";
17
17
  import {
18
18
  compileJsonSchemaDecoder,
19
19
  jsonSchemaDecoder
@@ -1819,7 +1819,7 @@ var ManyAccounts = class extends Data_exports.TaggedClass("many") {
1819
1819
  };
1820
1820
 
1821
1821
  // src/contracts/protocol-version.ts
1822
- var frameworkProtocol = 1;
1822
+ var frameworkProtocol = 2;
1823
1823
 
1824
1824
  // src/contracts/schedules.ts
1825
1825
  var minimumIntervalMilliseconds = 6e4;
@@ -2092,12 +2092,24 @@ var protocol1 = {
2092
2092
  }
2093
2093
  };
2094
2094
 
2095
+ // src/contracts/protocols/2.ts
2096
+ var SkillSources2 = Schema_exports.Struct({
2097
+ skills: AppSkills,
2098
+ dynamic: Schema_exports.Boolean,
2099
+ cached: Schema_exports.optionalKey(Schema_exports.Boolean)
2100
+ });
2101
+ var SkillCatalogResponse2 = Schema_exports.Union([SkillSources2, AppSkills]);
2102
+ var protocol2 = {
2103
+ version: 2,
2104
+ schemas: { ...protocol1.schemas, skills: SkillCatalogResponse2 }
2105
+ };
2106
+
2095
2107
  // src/contracts/operations.ts
2096
2108
  var OperationToolPrefixes = { query: "queries.", mutate: "mutations." };
2097
2109
 
2098
2110
  // src/contracts/host.ts
2099
2111
  var skillsCommand = (sources) => sources ? { operation: "skills", sources: true } : { operation: "skills" };
2100
- var skillCatalog = (response) => Schema_exports.is(SkillSources)(response) ? response : { skills: response };
2112
+ var skillCatalog = (response) => Schema_exports.is(SkillSources2)(response) ? response : { skills: response };
2101
2113
  var inspectCommand = (tools, scheduled) => ({
2102
2114
  operation: "inspect",
2103
2115
  ...tools === void 0 ? {} : { tools: [...tools] },
@@ -2202,8 +2214,6 @@ export {
2202
2214
  InvocationDeadline,
2203
2215
  HostedTool,
2204
2216
  HostedToolSummary,
2205
- SkillSources,
2206
- SkillCatalogResponse,
2207
2217
  HostRequest,
2208
2218
  HostRequestInvalid,
2209
2219
  HostAccountsInvalid,
@@ -2223,6 +2233,9 @@ export {
2223
2233
  HostResponse,
2224
2234
  HostInvocation,
2225
2235
  protocol1,
2236
+ SkillSources2 as SkillSources,
2237
+ SkillCatalogResponse2 as SkillCatalogResponse,
2238
+ protocol2,
2226
2239
  OperationToolPrefixes,
2227
2240
  skillsCommand,
2228
2241
  skillCatalog,
@@ -9,7 +9,7 @@ import {
9
9
  isApp,
10
10
  toEffectApp,
11
11
  unavailableStorage
12
- } from "./chunk-JN55AYQH.js";
12
+ } from "./chunk-DHUDODG5.js";
13
13
  import {
14
14
  fromPromise,
15
15
  nativeOperation,
@@ -62,7 +62,7 @@ import {
62
62
  defaultWebhookTransportLimits,
63
63
  maxInputProblems,
64
64
  workflowDurationMillis
65
- } from "./chunk-MYYEW3RA.js";
65
+ } from "./chunk-3M2MEDNL.js";
66
66
  import {
67
67
  CacheError
68
68
  } from "./chunk-LGIYBDWA.js";
@@ -723,9 +723,17 @@ function dispatch(app, request, context, signal) {
723
723
  const files = yield* Schema_exports.decodeUnknownEffect(Schema_exports.Array(SkillFile))(
724
724
  context.files ?? []
725
725
  ).pipe(Effect_exports.mapError(() => new HostDeclarationInvalid()));
726
+ let cacheCommands = 0;
727
+ const hostCache = context.cache ?? unavailableCache;
726
728
  const bound = {
727
729
  cache: authorCache(
728
- context.cache ?? unavailableCache,
730
+ {
731
+ ...hostCache,
732
+ transport: (command) => {
733
+ cacheCommands += 1;
734
+ return hostCache.transport(command);
735
+ }
736
+ },
729
737
  Redacted_exports.value(context.accounts),
730
738
  invocationSignal,
731
739
  deadline
@@ -747,13 +755,15 @@ function dispatch(app, request, context, signal) {
747
755
  Effect_exports.mapError(() => new HostDeclarationInvalid())
748
756
  ));
749
757
  const source2 = definition.dynamicSkills;
758
+ const before = cacheCommands;
750
759
  const dynamic = source2 === void 0 ? [] : yield* evaluationSafe(Effect_exports.suspend(source2.list)).pipe(
751
760
  Effect_exports.withSpan("app.skills.load")
752
761
  );
762
+ const cached = source2 !== void 0 && cacheCommands > before;
753
763
  const skills = yield* Schema_exports.decodeUnknownEffect(AppSkills)([...declared2, ...dynamic]).pipe(
754
764
  Effect_exports.mapError(() => new HostDeclarationInvalid())
755
765
  );
756
- return request.sources === true ? { skills, dynamic: source2 !== void 0 } : skills;
766
+ return request.sources === true ? { skills, dynamic: source2 !== void 0, cached } : skills;
757
767
  }
758
768
  if (request.operation === "workflows") {
759
769
  return yield* Effect_exports.forEach(
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-PYUYJRSK.js";
9
9
  import {
10
10
  ScheduleTiming
11
- } from "./chunk-MYYEW3RA.js";
11
+ } from "./chunk-3M2MEDNL.js";
12
12
  import {
13
13
  decoderOf,
14
14
  isSchema,
@@ -2,7 +2,7 @@ import {
2
2
  adaptMcpTools,
3
3
  mcpClient,
4
4
  mcpJsonSchemaValidator
5
- } from "./chunk-RN2MXB4R.js";
5
+ } from "./chunk-2VPJHFOU.js";
6
6
  import {
7
7
  accountProviderError,
8
8
  httpProviderError
@@ -11,7 +11,7 @@ import {
11
11
  McpError,
12
12
  McpToolsOptions,
13
13
  defaultMcpClientLimits
14
- } from "./chunk-MYYEW3RA.js";
14
+ } from "./chunk-3M2MEDNL.js";
15
15
  import {
16
16
  ProviderError
17
17
  } from "./chunk-W7D7WVSY.js";
package/js/contracts.js CHANGED
@@ -80,11 +80,12 @@ import {
80
80
  maxInputProblems,
81
81
  minimumIntervalMilliseconds,
82
82
  protocol1,
83
+ protocol2,
83
84
  selectTools,
84
85
  skillCatalog,
85
86
  skillsCommand,
86
87
  workflowDurationMillis
87
- } from "./chunk-MYYEW3RA.js";
88
+ } from "./chunk-3M2MEDNL.js";
88
89
  import "./chunk-BMOIAIVR.js";
89
90
  import "./chunk-LGIYBDWA.js";
90
91
  import {
@@ -217,6 +218,7 @@ export {
217
218
  maxInputProblems,
218
219
  minimumIntervalMilliseconds,
219
220
  protocol1,
221
+ protocol2,
220
222
  selectTools,
221
223
  skillCatalog,
222
224
  skillFormatLimits,
package/js/effect.js CHANGED
@@ -3,16 +3,16 @@ import {
3
3
  ApprovalDecision,
4
4
  createAppHandler,
5
5
  prepareElicitation
6
- } from "./chunk-J7O55ZV7.js";
6
+ } from "./chunk-6VRYO2BG.js";
7
7
  import "./chunk-D47C7KG5.js";
8
8
  import "./chunk-FDNTX5QJ.js";
9
- import "./chunk-JN55AYQH.js";
9
+ import "./chunk-DHUDODG5.js";
10
10
  import "./chunk-PLCMJREA.js";
11
11
  import "./chunk-PYUYJRSK.js";
12
12
  import "./chunk-ZJWDMTE3.js";
13
13
  import {
14
14
  ToolAnnotations
15
- } from "./chunk-MYYEW3RA.js";
15
+ } from "./chunk-3M2MEDNL.js";
16
16
  import "./chunk-BMOIAIVR.js";
17
17
  import "./chunk-LGIYBDWA.js";
18
18
  import "./chunk-YEJOQEII.js";
package/js/graphql.js CHANGED
@@ -5,12 +5,12 @@ import {
5
5
  protocolOperations
6
6
  } from "./chunk-Z5NMEGJN.js";
7
7
  import "./chunk-BCSNKUAC.js";
8
- import "./chunk-J7O55ZV7.js";
8
+ import "./chunk-6VRYO2BG.js";
9
9
  import {
10
10
  cacheKey
11
11
  } from "./chunk-D47C7KG5.js";
12
12
  import "./chunk-FDNTX5QJ.js";
13
- import "./chunk-JN55AYQH.js";
13
+ import "./chunk-DHUDODG5.js";
14
14
  import "./chunk-PLCMJREA.js";
15
15
  import {
16
16
  nativeOperation
@@ -20,7 +20,7 @@ import {
20
20
  graphqlProviderError,
21
21
  httpProviderError
22
22
  } from "./chunk-ZJWDMTE3.js";
23
- import "./chunk-MYYEW3RA.js";
23
+ import "./chunk-3M2MEDNL.js";
24
24
  import "./chunk-BMOIAIVR.js";
25
25
  import "./chunk-LGIYBDWA.js";
26
26
  import "./chunk-YEJOQEII.js";
package/js/host.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createAppHandler
3
- } from "./chunk-J7O55ZV7.js";
3
+ } from "./chunk-6VRYO2BG.js";
4
4
  import "./chunk-D47C7KG5.js";
5
5
  import "./chunk-FDNTX5QJ.js";
6
- import "./chunk-JN55AYQH.js";
6
+ import "./chunk-DHUDODG5.js";
7
7
  import "./chunk-PLCMJREA.js";
8
8
  import "./chunk-PYUYJRSK.js";
9
9
  import "./chunk-ZJWDMTE3.js";
@@ -20,7 +20,7 @@ import {
20
20
  WorkflowRun,
21
21
  WorkflowRunId,
22
22
  WorkflowRunPage
23
- } from "./chunk-MYYEW3RA.js";
23
+ } from "./chunk-3M2MEDNL.js";
24
24
  import "./chunk-BMOIAIVR.js";
25
25
  import {
26
26
  CacheCommand,
package/js/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  defineDatabase,
4
4
  table,
5
5
  workflow
6
- } from "./chunk-JN55AYQH.js";
6
+ } from "./chunk-DHUDODG5.js";
7
7
  import "./chunk-PLCMJREA.js";
8
8
  import {
9
9
  fromPromise,
@@ -30,7 +30,7 @@ import {
30
30
  ScheduleTiming,
31
31
  SecretsMethod,
32
32
  WorkflowFailure
33
- } from "./chunk-MYYEW3RA.js";
33
+ } from "./chunk-3M2MEDNL.js";
34
34
  import "./chunk-BMOIAIVR.js";
35
35
  import {
36
36
  CacheError
package/js/mcp/effect.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  mcpClientEffect,
3
3
  mcpToolsEffect
4
- } from "../chunk-HDTGZWP2.js";
5
- import "../chunk-RN2MXB4R.js";
4
+ } from "../chunk-EQB7JMAL.js";
5
+ import "../chunk-2VPJHFOU.js";
6
6
  import "../chunk-BCSNKUAC.js";
7
- import "../chunk-J7O55ZV7.js";
7
+ import "../chunk-6VRYO2BG.js";
8
8
  import "../chunk-D47C7KG5.js";
9
9
  import "../chunk-FDNTX5QJ.js";
10
- import "../chunk-JN55AYQH.js";
10
+ import "../chunk-DHUDODG5.js";
11
11
  import "../chunk-PLCMJREA.js";
12
12
  import "../chunk-PYUYJRSK.js";
13
13
  import "../chunk-ZJWDMTE3.js";
14
- import "../chunk-MYYEW3RA.js";
14
+ import "../chunk-3M2MEDNL.js";
15
15
  import "../chunk-BMOIAIVR.js";
16
16
  import "../chunk-LGIYBDWA.js";
17
17
  import "../chunk-YEJOQEII.js";
package/js/mcp/stdio.js CHANGED
@@ -2,22 +2,22 @@ import {
2
2
  adaptMcpTools,
3
3
  mcpClient,
4
4
  mcpJsonSchemaValidator
5
- } from "../chunk-RN2MXB4R.js";
5
+ } from "../chunk-2VPJHFOU.js";
6
6
  import {
7
7
  protocolOperations
8
8
  } from "../chunk-Z5NMEGJN.js";
9
9
  import "../chunk-BCSNKUAC.js";
10
- import "../chunk-J7O55ZV7.js";
10
+ import "../chunk-6VRYO2BG.js";
11
11
  import "../chunk-D47C7KG5.js";
12
12
  import "../chunk-FDNTX5QJ.js";
13
- import "../chunk-JN55AYQH.js";
13
+ import "../chunk-DHUDODG5.js";
14
14
  import "../chunk-PLCMJREA.js";
15
15
  import "../chunk-PYUYJRSK.js";
16
16
  import "../chunk-ZJWDMTE3.js";
17
17
  import {
18
18
  McpError,
19
19
  ProcessConfig
20
- } from "../chunk-MYYEW3RA.js";
20
+ } from "../chunk-3M2MEDNL.js";
21
21
  import "../chunk-BMOIAIVR.js";
22
22
  import "../chunk-LGIYBDWA.js";
23
23
  import "../chunk-YEJOQEII.js";
package/js/mcp.js CHANGED
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  mcpClientEffect
3
- } from "./chunk-HDTGZWP2.js";
3
+ } from "./chunk-EQB7JMAL.js";
4
4
  import {
5
5
  catalogCache
6
6
  } from "./chunk-5MQZEB6Y.js";
7
7
  import {
8
8
  adaptMcpTool
9
- } from "./chunk-RN2MXB4R.js";
9
+ } from "./chunk-2VPJHFOU.js";
10
10
  import {
11
11
  protocolOperations
12
12
  } from "./chunk-Z5NMEGJN.js";
13
13
  import "./chunk-BCSNKUAC.js";
14
- import "./chunk-J7O55ZV7.js";
14
+ import "./chunk-6VRYO2BG.js";
15
15
  import {
16
16
  cacheKey
17
17
  } from "./chunk-D47C7KG5.js";
18
18
  import "./chunk-FDNTX5QJ.js";
19
- import "./chunk-JN55AYQH.js";
19
+ import "./chunk-DHUDODG5.js";
20
20
  import "./chunk-PLCMJREA.js";
21
21
  import {
22
22
  nativeOperation
@@ -26,7 +26,7 @@ import {
26
26
  McpError,
27
27
  McpToolMetadata,
28
28
  McpToolsOptions
29
- } from "./chunk-MYYEW3RA.js";
29
+ } from "./chunk-3M2MEDNL.js";
30
30
  import "./chunk-BMOIAIVR.js";
31
31
  import "./chunk-LGIYBDWA.js";
32
32
  import "./chunk-YEJOQEII.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apps",
3
- "version": "0.0.1-beta.3",
3
+ "version": "0.0.1-beta.4",
4
4
  "description": "TypeScript apps with typed tools, accounts, storage, and UI.",
5
5
  "type": "module",
6
6
  "sideEffects": false,