@skaile/workspaces 2.8.0 → 3.0.0

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.
Files changed (161) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +17 -6
  3. package/dist/{asset-feeds-23CP6YUY.js → asset-feeds-XKPJZ6QT.js} +4 -4
  4. package/dist/{asset-feeds-23CP6YUY.js.map → asset-feeds-XKPJZ6QT.js.map} +1 -1
  5. package/dist/asset-manager/index.js +1 -1
  6. package/dist/bridge/drivers/claude-sdk.js +2 -2
  7. package/dist/bridge/drivers/codex.js +2 -2
  8. package/dist/bridge/drivers/continue.js +2 -2
  9. package/dist/bridge/drivers/echo.js +1 -1
  10. package/dist/bridge/drivers/gemini.js +4 -4
  11. package/dist/bridge/drivers/goose.js +2 -2
  12. package/dist/bridge/drivers/omp.js +1 -1
  13. package/dist/bridge/drivers/opencode.js +2 -2
  14. package/dist/bridge/drivers/qwen.js +4 -4
  15. package/dist/bridge/index.js +3 -3
  16. package/dist/bridge/src/models.d.ts +59 -0
  17. package/dist/bridge/src/models.d.ts.map +1 -1
  18. package/dist/{chunk-XJ74XFIZ.js → chunk-5QGMEPUX.js} +27 -18
  19. package/dist/chunk-5QGMEPUX.js.map +1 -0
  20. package/dist/{chunk-ONUDDQGS.js → chunk-7HXS7WZF.js} +2 -2
  21. package/dist/{chunk-ONUDDQGS.js.map → chunk-7HXS7WZF.js.map} +1 -1
  22. package/dist/{chunk-SCR3WGW7.js → chunk-7KFN2EPR.js} +12 -4
  23. package/dist/chunk-7KFN2EPR.js.map +1 -0
  24. package/dist/{chunk-L3TS7ZO4.js → chunk-BJDACPWZ.js} +3 -3
  25. package/dist/{chunk-L3TS7ZO4.js.map → chunk-BJDACPWZ.js.map} +1 -1
  26. package/dist/{chunk-JIA2S3T2.js → chunk-EH7BCJF4.js} +6 -6
  27. package/dist/{chunk-JIA2S3T2.js.map → chunk-EH7BCJF4.js.map} +1 -1
  28. package/dist/{chunk-TUYN2HDT.js → chunk-F5VREBV2.js} +14 -5
  29. package/dist/chunk-F5VREBV2.js.map +1 -0
  30. package/dist/{chunk-OAUKA7VT.js → chunk-JQMULHO6.js} +24 -12
  31. package/dist/chunk-JQMULHO6.js.map +1 -0
  32. package/dist/{chunk-ZR2X4SIG.js → chunk-KXWUCKP5.js} +5 -5
  33. package/dist/{chunk-ZR2X4SIG.js.map → chunk-KXWUCKP5.js.map} +1 -1
  34. package/dist/{chunk-IWUIXNMF.js → chunk-N4GFUWWC.js} +3 -3
  35. package/dist/{chunk-IWUIXNMF.js.map → chunk-N4GFUWWC.js.map} +1 -1
  36. package/dist/{chunk-ZJOEU5GP.js → chunk-NMKTM55X.js} +2 -2
  37. package/dist/{chunk-ZJOEU5GP.js.map → chunk-NMKTM55X.js.map} +1 -1
  38. package/dist/{chunk-XTFZOYNY.js → chunk-P2J3MLTW.js} +3 -3
  39. package/dist/{chunk-XTFZOYNY.js.map → chunk-P2J3MLTW.js.map} +1 -1
  40. package/dist/{chunk-VNIKF66R.js → chunk-P5W6JVD4.js} +4 -4
  41. package/dist/{chunk-VNIKF66R.js.map → chunk-P5W6JVD4.js.map} +1 -1
  42. package/dist/{chunk-6AYGXPPF.js → chunk-Q6O53D5Q.js} +2 -2
  43. package/dist/{chunk-6AYGXPPF.js.map → chunk-Q6O53D5Q.js.map} +1 -1
  44. package/dist/{chunk-ZJ7MRR2R.js → chunk-QGDQHNYC.js} +4 -4
  45. package/dist/{chunk-ZJ7MRR2R.js.map → chunk-QGDQHNYC.js.map} +1 -1
  46. package/dist/{chunk-E4AVJMOJ.js → chunk-S5FV6ISY.js} +89 -6
  47. package/dist/chunk-S5FV6ISY.js.map +1 -0
  48. package/dist/{chunk-HY3MBSNC.js → chunk-SR6NBBWT.js} +2 -2
  49. package/dist/{chunk-HY3MBSNC.js.map → chunk-SR6NBBWT.js.map} +1 -1
  50. package/dist/{chunk-AZ44F3AT.js → chunk-TXTCW7V6.js} +6 -6
  51. package/dist/{chunk-AZ44F3AT.js.map → chunk-TXTCW7V6.js.map} +1 -1
  52. package/dist/{chunk-BMQKMOQY.js → chunk-V34ZEXSE.js} +61 -3
  53. package/dist/chunk-V34ZEXSE.js.map +1 -0
  54. package/dist/{chunk-FW2C6JJP.js → chunk-WECBTWWZ.js} +3 -3
  55. package/dist/{chunk-FW2C6JJP.js.map → chunk-WECBTWWZ.js.map} +1 -1
  56. package/dist/{chunk-P3DUVOAW.js → chunk-XJECOBCO.js} +16 -7
  57. package/dist/chunk-XJECOBCO.js.map +1 -0
  58. package/dist/{chunk-HVQWLYZB.js → chunk-ZO7KL7GN.js} +731 -85
  59. package/dist/chunk-ZO7KL7GN.js.map +1 -0
  60. package/dist/cli/index.js +38 -38
  61. package/dist/connectors/index.js +11 -5
  62. package/dist/{ensure-sources-N7B7657V.js → ensure-sources-D6R57GAP.js} +4 -4
  63. package/dist/{ensure-sources-N7B7657V.js.map → ensure-sources-D6R57GAP.js.map} +1 -1
  64. package/dist/factory-assets/connectors/box.js +11 -5
  65. package/dist/factory-assets/connectors/deploy.js +11 -5
  66. package/dist/factory-assets/connectors/devserver.js +11 -5
  67. package/dist/factory-assets/connectors/flow/CONNECTOR.md +80 -11
  68. package/dist/factory-assets/connectors/flow/adapter.d.ts +97 -5
  69. package/dist/factory-assets/connectors/flow/adapter.d.ts.map +1 -1
  70. package/dist/factory-assets/connectors/flow/adapter.js +11 -5
  71. package/dist/factory-assets/connectors/flow/contract/expression.d.ts +2 -24
  72. package/dist/factory-assets/connectors/flow/contract/expression.d.ts.map +1 -1
  73. package/dist/factory-assets/connectors/flow/contract/flow.v2.schema.json +0 -6
  74. package/dist/factory-assets/connectors/flow/contract/normalize.d.ts.map +1 -1
  75. package/dist/factory-assets/connectors/flow/contract/schema.d.ts +0 -4
  76. package/dist/factory-assets/connectors/flow/contract/schema.d.ts.map +1 -1
  77. package/dist/factory-assets/connectors/flow/contract.js +2 -2
  78. package/dist/factory-assets/connectors/flow/engine/bindings.d.ts.map +1 -1
  79. package/dist/factory-assets/connectors/flow/engine/check-provenance.d.ts +47 -0
  80. package/dist/factory-assets/connectors/flow/engine/check-provenance.d.ts.map +1 -0
  81. package/dist/factory-assets/connectors/flow/engine/index.d.ts +3 -0
  82. package/dist/factory-assets/connectors/flow/engine/index.d.ts.map +1 -1
  83. package/dist/factory-assets/connectors/flow/engine/node-attempts.d.ts +68 -0
  84. package/dist/factory-assets/connectors/flow/engine/node-attempts.d.ts.map +1 -0
  85. package/dist/factory-assets/connectors/flow/engine/node-deadline.d.ts +44 -0
  86. package/dist/factory-assets/connectors/flow/engine/node-deadline.d.ts.map +1 -0
  87. package/dist/factory-assets/connectors/flow/engine/node-shape.d.ts +15 -1
  88. package/dist/factory-assets/connectors/flow/engine/node-shape.d.ts.map +1 -1
  89. package/dist/factory-assets/connectors/flow/engine/types.d.ts +16 -15
  90. package/dist/factory-assets/connectors/flow/engine/types.d.ts.map +1 -1
  91. package/dist/factory-assets/connectors/flow/engine.js +3 -3
  92. package/dist/factory-assets/connectors/flow/index.d.ts +2 -1
  93. package/dist/factory-assets/connectors/flow/index.d.ts.map +1 -1
  94. package/dist/factory-assets/connectors/flow/inline-sub-flow-host.d.ts +3 -0
  95. package/dist/factory-assets/connectors/flow/inline-sub-flow-host.d.ts.map +1 -1
  96. package/dist/factory-assets/connectors/flow/node-executor.d.ts +10 -4
  97. package/dist/factory-assets/connectors/flow/node-executor.d.ts.map +1 -1
  98. package/dist/factory-assets/connectors/flow/prompt-fragments.d.ts +14 -0
  99. package/dist/factory-assets/connectors/flow/prompt-fragments.d.ts.map +1 -1
  100. package/dist/factory-assets/connectors/flow/prompt-fragments.js +2 -2
  101. package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
  102. package/dist/factory-assets/connectors/flow/run-flow.js +12 -6
  103. package/dist/factory-assets/connectors/flow/subprompt-runner.d.ts +99 -0
  104. package/dist/factory-assets/connectors/flow/subprompt-runner.d.ts.map +1 -0
  105. package/dist/factory-assets/connectors/flow.js +11 -5
  106. package/dist/factory-assets/connectors/git.js +11 -5
  107. package/dist/factory-assets/connectors/gmail.js +11 -5
  108. package/dist/factory-assets/connectors/googledrive.js +11 -5
  109. package/dist/factory-assets/connectors/local.js +11 -5
  110. package/dist/factory-assets/connectors/mattermost.js +11 -5
  111. package/dist/factory-assets/connectors/memory.js +11 -5
  112. package/dist/factory-assets/connectors/minio.js +11 -5
  113. package/dist/factory-assets/connectors/postgres.js +11 -5
  114. package/dist/factory-assets/connectors/s3.js +11 -5
  115. package/dist/factory-assets/connectors/sharepoint.js +11 -5
  116. package/dist/factory-assets/connectors/sqlite.js +11 -5
  117. package/dist/factory-assets/connectors/static-server.js +11 -5
  118. package/dist/factory-assets/connectors/tunnel.js +11 -5
  119. package/dist/factory-assets/connectors/webdav.js +11 -5
  120. package/dist/factory-assets/connectors/xstate-store.js +11 -5
  121. package/dist/factory-assets/connectors/xstate.js +11 -5
  122. package/dist/{flows-K7B253U6.js → flows-LQSVM45J.js} +3 -3
  123. package/dist/{flows-K7B253U6.js.map → flows-LQSVM45J.js.map} +1 -1
  124. package/dist/{helpers-PXEHIKF7.js → helpers-IS4MSEOQ.js} +4 -4
  125. package/dist/{helpers-PXEHIKF7.js.map → helpers-IS4MSEOQ.js.map} +1 -1
  126. package/dist/{library-publish-3Z33J2ZY.js → library-publish-QJACP6FW.js} +9 -9
  127. package/dist/{library-publish-3Z33J2ZY.js.map → library-publish-QJACP6FW.js.map} +1 -1
  128. package/dist/{open-library-Y5SKFAMK.js → open-library-3FMLAU3F.js} +8 -8
  129. package/dist/{open-library-Y5SKFAMK.js.map → open-library-3FMLAU3F.js.map} +1 -1
  130. package/dist/{project-DQRC6J6M.js → project-KEAAGHSX.js} +5 -5
  131. package/dist/{project-DQRC6J6M.js.map → project-KEAAGHSX.js.map} +1 -1
  132. package/dist/runner/index.js +15 -15
  133. package/dist/runner/src/serve.d.ts.map +1 -1
  134. package/dist/sdk/asset-manager.js +1 -1
  135. package/dist/sdk/bridge.js +3 -3
  136. package/dist/sdk/flow.js +3 -3
  137. package/dist/sdk/index.js +15 -15
  138. package/dist/sdk/runner.js +15 -15
  139. package/dist/{setup-RHWARBBB.js → setup-VX6EPF5P.js} +5 -5
  140. package/dist/{setup-RHWARBBB.js.map → setup-VX6EPF5P.js.map} +1 -1
  141. package/dist/{source-XBJ5KTAV.js → source-45XHQSBF.js} +9 -9
  142. package/dist/{source-XBJ5KTAV.js.map → source-45XHQSBF.js.map} +1 -1
  143. package/dist/{source-manifest-publish-Q7TXBMCW.js → source-manifest-publish-M34SKD46.js} +10 -10
  144. package/dist/{source-manifest-publish-Q7TXBMCW.js.map → source-manifest-publish-M34SKD46.js.map} +1 -1
  145. package/dist/tui/index.js +15 -15
  146. package/dist/types/src/flow.d.ts +128 -0
  147. package/dist/types/src/flow.d.ts.map +1 -1
  148. package/dist/types/src/index.d.ts +1 -1
  149. package/dist/types/src/index.d.ts.map +1 -1
  150. package/dist/workspace-plugin/adapters/mcp.js +1 -1
  151. package/dist/workspace-plugin/adapters/omp.js +3 -3
  152. package/dist/workspace-plugin/index.js +1 -1
  153. package/package.json +1 -1
  154. package/dist/chunk-BMQKMOQY.js.map +0 -1
  155. package/dist/chunk-E4AVJMOJ.js.map +0 -1
  156. package/dist/chunk-HVQWLYZB.js.map +0 -1
  157. package/dist/chunk-OAUKA7VT.js.map +0 -1
  158. package/dist/chunk-P3DUVOAW.js.map +0 -1
  159. package/dist/chunk-SCR3WGW7.js.map +0 -1
  160. package/dist/chunk-TUYN2HDT.js.map +0 -1
  161. package/dist/chunk-XJ74XFIZ.js.map +0 -1
package/dist/cli/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportInstalledSoftDeps } from '../chunk-AZ44F3AT.js';
3
- import { makeSourceCommand, syncProjectSources } from '../chunk-JIA2S3T2.js';
2
+ import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportInstalledSoftDeps } from '../chunk-TXTCW7V6.js';
3
+ import { makeSourceCommand, syncProjectSources } from '../chunk-EH7BCJF4.js';
4
4
  import { AI_RESOURCES, aiResourceRoots } from '../chunk-57RFYEVM.js';
5
5
  import { getStoreConfig, storeFetch, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, isStoreAuthenticated, getStoreToken, getStoreIdentity } from '../chunk-AM5LFRXJ.js';
6
- import { openCatalogSource, openLibraryManager, createFullRegistry, openLibrary } from '../chunk-ZJ7MRR2R.js';
7
- import { logErr, S, logOk, logInfo, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, logWarn, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth } from '../chunk-XTFZOYNY.js';
6
+ import { openCatalogSource, openLibraryManager, createFullRegistry, openLibrary } from '../chunk-QGDQHNYC.js';
7
+ import { logErr, S, logOk, logInfo, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, logWarn, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth } from '../chunk-P2J3MLTW.js';
8
8
  import { LocalSecretsProvider } from '../chunk-6BEGKO2Q.js';
9
- import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-OAUKA7VT.js';
10
- import { buildClaudePluginFiles } from '../chunk-ZJOEU5GP.js';
9
+ import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-JQMULHO6.js';
10
+ import { buildClaudePluginFiles } from '../chunk-NMKTM55X.js';
11
11
  import '../chunk-X5YPJV4N.js';
12
12
  import '../chunk-W3UDISS2.js';
13
13
  import '../chunk-O7SG5PC2.js';
@@ -15,27 +15,27 @@ import '../chunk-7QBNJTTQ.js';
15
15
  import '../chunk-GTS2FODO.js';
16
16
  import '../chunk-WQ7DE5UC.js';
17
17
  import '../chunk-32NA4TVC.js';
18
- import '../chunk-VNIKF66R.js';
19
- import '../chunk-ISQWMBKD.js';
20
- import '../chunk-RRVQAE5D.js';
21
- import '../chunk-BMQKMOQY.js';
22
- import '../chunk-GAH4YRCI.js';
23
- import '../chunk-HY3MBSNC.js';
24
- import { runFlow, resumeFlow } from '../chunk-P3DUVOAW.js';
18
+ import { runFlow, resumeFlow } from '../chunk-XJECOBCO.js';
25
19
  import '../chunk-4R6DROGN.js';
26
20
  import { validateFlowVersions, parseSkillFrontmatter } from '../chunk-CZZRDYT4.js';
27
21
  import '../chunk-BEAIJRVF.js';
28
- import '../chunk-IWUIXNMF.js';
29
- import '../chunk-HVQWLYZB.js';
22
+ import '../chunk-N4GFUWWC.js';
23
+ import '../chunk-ZO7KL7GN.js';
30
24
  import '../chunk-ZNIHTT22.js';
25
+ import '../chunk-P5W6JVD4.js';
26
+ import '../chunk-ISQWMBKD.js';
27
+ import '../chunk-RRVQAE5D.js';
28
+ import '../chunk-V34ZEXSE.js';
29
+ import '../chunk-GAH4YRCI.js';
30
+ import '../chunk-SR6NBBWT.js';
31
31
  import '../chunk-6E6PKKAD.js';
32
32
  import '../chunk-IFGTRL2I.js';
33
- import { loadFlow, loadAllFlows } from '../chunk-E4AVJMOJ.js';
34
- import '../chunk-XJ74XFIZ.js';
35
- import '../chunk-SCR3WGW7.js';
36
- import '../chunk-TUYN2HDT.js';
33
+ import { loadFlow, loadAllFlows } from '../chunk-S5FV6ISY.js';
34
+ import '../chunk-5QGMEPUX.js';
35
+ import '../chunk-7KFN2EPR.js';
36
+ import '../chunk-F5VREBV2.js';
37
37
  import '../chunk-D4VHBAJC.js';
38
- import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-6AYGXPPF.js';
38
+ import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-Q6O53D5Q.js';
39
39
  import { resolveLibraryDir, getStoreManifestsDir, getDefaultValue, isSecretPlaceholder } from '../chunk-3HVASHBF.js';
40
40
  import '../chunk-NU4E7C5I.js';
41
41
  import '../chunk-UKJMQZV6.js';
@@ -110,7 +110,7 @@ async function runSearch(kind, query, opts) {
110
110
  }
111
111
  }
112
112
  async function searchIndex(query, kind) {
113
- const { openLibrary: openLibrary2 } = await import('../open-library-Y5SKFAMK.js');
113
+ const { openLibrary: openLibrary2 } = await import('../open-library-3FMLAU3F.js');
114
114
  const library = await openLibrary2();
115
115
  try {
116
116
  const defs = await library.listAssetDefs(kind ? { kind } : {});
@@ -163,7 +163,7 @@ async function searchLocal(query, kind, opts, showStore, airGapped) {
163
163
  const factory = await searchFactory(projectDir, query, kind);
164
164
  let entries = unionEntries(await searchIndex(query, kind), factory);
165
165
  if (entries.length === 0 && !query && !kind && !airGapped) {
166
- const { autoSyncForSearch } = await import('../source-XBJ5KTAV.js');
166
+ const { autoSyncForSearch } = await import('../source-45XHQSBF.js');
167
167
  if (await autoSyncForSearch(projectDir)) {
168
168
  entries = unionEntries(await searchIndex(query, kind), factory);
169
169
  }
@@ -217,7 +217,7 @@ async function searchStore(query, kind, opts, airGapped) {
217
217
  logInfo("air-gapped (cache_ttl: 0) \u2014 local sources only");
218
218
  return;
219
219
  }
220
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-Y5SKFAMK.js');
220
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-3FMLAU3F.js');
221
221
  try {
222
222
  const remote = await openCatalogSource2({ projectDir: path14__default.resolve(opts.projectDir) });
223
223
  const assets = await remote.listAssets(kind ? { kind } : {});
@@ -532,7 +532,7 @@ async function resolveInfoEntry(am2, ref, opts) {
532
532
  return { entry: match ?? deployed };
533
533
  }
534
534
  const lookup = opts.storeLookup ?? (async (filter) => {
535
- const { resolveCatalogSource } = await import('../open-library-Y5SKFAMK.js');
535
+ const { resolveCatalogSource } = await import('../open-library-3FMLAU3F.js');
536
536
  const { source, close } = await resolveCatalogSource({ projectDir: opts.projectDir });
537
537
  try {
538
538
  return await source.listAssets(filter);
@@ -548,7 +548,7 @@ async function resolveInfoEntry(am2, ref, opts) {
548
548
  );
549
549
  return { entry: hit ? catalogAssetToEntry(hit) : null };
550
550
  } catch (err) {
551
- const { LocalCatalogDisabledError } = await import('../open-library-Y5SKFAMK.js');
551
+ const { LocalCatalogDisabledError } = await import('../open-library-3FMLAU3F.js');
552
552
  const storeNote = err instanceof Error ? err.message : String(err);
553
553
  const disabled = err instanceof LocalCatalogDisabledError || /catalog\.url/i.test(storeNote);
554
554
  return { entry: null, storeNote, ...disabled ? { storeDisabled: true } : {} };
@@ -1168,7 +1168,7 @@ function makeCatalogCommand() {
1168
1168
  return catalog;
1169
1169
  }
1170
1170
  async function runLocalCatalogTest(projectDir) {
1171
- const { resolveCatalogSource } = await import('../open-library-Y5SKFAMK.js');
1171
+ const { resolveCatalogSource } = await import('../open-library-3FMLAU3F.js');
1172
1172
  let resolved;
1173
1173
  try {
1174
1174
  resolved = await resolveCatalogSource({ projectDir });
@@ -3407,16 +3407,16 @@ function makeLibraryCommand() {
3407
3407
  });
3408
3408
  cmd.command("publish <lib>").description("Push + register the library's manifest atomically (needs git backend)").option("--asset <ref>", "Publish only the single asset matching this ref/name").option("--create-repo", "Provision + link a public github repo if the library has no remote").option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; push nothing and call no store endpoint").action(
3409
3409
  async (lib, opts) => {
3410
- const { runLibraryPublish } = await import('../library-publish-3Z33J2ZY.js');
3410
+ const { runLibraryPublish } = await import('../library-publish-QJACP6FW.js');
3411
3411
  await withStoreErrorHandling(() => runLibraryPublish(lib, opts));
3412
3412
  }
3413
3413
  );
3414
3414
  cmd.command("register <lib>").description("Register the library's manifest without pushing (bytes already on github)").option("--asset <ref>", "Publish only the single asset matching this ref/name").option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; call no store endpoint").action(async (lib, opts) => {
3415
- const { runLibraryRegister } = await import('../library-publish-3Z33J2ZY.js');
3415
+ const { runLibraryRegister } = await import('../library-publish-QJACP6FW.js');
3416
3416
  await withStoreErrorHandling(() => runLibraryRegister(lib, opts));
3417
3417
  });
3418
3418
  cmd.command("yank <lib>").description("Retract the library's published assets from the store").option("--asset <ref>", "Yank only the single asset matching this ref/name").action(async (lib, opts) => {
3419
- const { runLibraryYank } = await import('../library-publish-3Z33J2ZY.js');
3419
+ const { runLibraryYank } = await import('../library-publish-QJACP6FW.js');
3420
3420
  await withStoreErrorHandling(() => runLibraryYank(lib, opts));
3421
3421
  });
3422
3422
  return cmd;
@@ -4138,7 +4138,7 @@ function scheduleSoftDepPreview() {
4138
4138
  }
4139
4139
  async function loadAssets() {
4140
4140
  softDepPreviewCache.clear();
4141
- const { gatherAssetFeeds } = await import('../asset-feeds-23CP6YUY.js');
4141
+ const { gatherAssetFeeds } = await import('../asset-feeds-XKPJZ6QT.js');
4142
4142
  const { entries, domains, notes } = await gatherAssetFeeds(am, am.projectDir);
4143
4143
  if (notes.length > 0) {
4144
4144
  state.message = notes.map((n) => `[${n.feed}] ${n.message}`).join(" \u2022 ");
@@ -4344,7 +4344,7 @@ function reconcileCollapsedSets(rows) {
4344
4344
  async function loadSourcesAndLibraries() {
4345
4345
  try {
4346
4346
  const [{ openLibraryManager: openLibraryManager2 }, { skaileHomeDir }, { getGlobalCacheDir: getGlobalCacheDir2 }] = await Promise.all([
4347
- import('../open-library-Y5SKFAMK.js'),
4347
+ import('../open-library-3FMLAU3F.js'),
4348
4348
  import('../library/index.js'),
4349
4349
  import('../core/index.js')
4350
4350
  ]);
@@ -6788,7 +6788,7 @@ function makeServeCommand() {
6788
6788
  );
6789
6789
  }
6790
6790
  async function ensurePluginsLoadedForServe(projectDir) {
6791
- const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-PXEHIKF7.js');
6791
+ const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-IS4MSEOQ.js');
6792
6792
  try {
6793
6793
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
6794
6794
  const config = resolveSkWorkspaceConfig2(projectDir);
@@ -6807,7 +6807,7 @@ async function ensurePluginsLoadedForServe(projectDir) {
6807
6807
  }
6808
6808
  }
6809
6809
  async function runCompileTest(opts) {
6810
- const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-PXEHIKF7.js');
6810
+ const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-IS4MSEOQ.js');
6811
6811
  const { tmpdir } = await import('os');
6812
6812
  const { dirname: dirname4, join: join7, resolve: resolve5 } = await import('path');
6813
6813
  const { fileURLToPath: fileURLToPath2 } = await import('url');
@@ -7689,7 +7689,7 @@ function makeStoreCommand() {
7689
7689
  process.exit(2);
7690
7690
  });
7691
7691
  store.command("search <query>").description("Search the AI Asset Store catalog by name, description, or publisher").option("--kind <kind>", "Filter by asset kind (skill, agent, prompt, flow, \u2026)").option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (query, opts) => {
7692
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-Y5SKFAMK.js');
7692
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-3FMLAU3F.js');
7693
7693
  try {
7694
7694
  const remote = await openCatalogSource2({ projectDir: path14__default.resolve(opts.projectDir) });
7695
7695
  const assets = await remote.listAssets(opts.kind ? { kind: opts.kind } : {});
@@ -7722,8 +7722,8 @@ function makeStoreCommand() {
7722
7722
  }
7723
7723
  });
7724
7724
  store.command("show <ref>").description("Show a store asset's details + provenance (source, files, integrity)").option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (ref, opts) => {
7725
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-Y5SKFAMK.js');
7726
- const { supportsInstallManifest } = await import('../project-DQRC6J6M.js');
7725
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-3FMLAU3F.js');
7726
+ const { supportsInstallManifest } = await import('../project-KEAAGHSX.js');
7727
7727
  try {
7728
7728
  const remote = await openCatalogSource2({ projectDir: path14__default.resolve(opts.projectDir) });
7729
7729
  const asset = await remote.resolve(ref);
@@ -8803,7 +8803,7 @@ async function bootstrapUserConfig() {
8803
8803
  }
8804
8804
  async function hydrateInitSources(resolved, created) {
8805
8805
  try {
8806
- const { ensureSourcesCloned } = await import('../ensure-sources-N7B7657V.js');
8806
+ const { ensureSourcesCloned } = await import('../ensure-sources-D6R57GAP.js');
8807
8807
  const hydrate = ensureSourcesCloned(resolved, { quiet: true });
8808
8808
  for (const n of hydrate.cloned) created.push(`~/.skaile/cache/sources/${n}/`);
8809
8809
  if (hydrate.failed.length > 0) {
@@ -8843,7 +8843,7 @@ function printInitSummary(resolved, projectDir, created) {
8843
8843
  console.log();
8844
8844
  }
8845
8845
  program.command("setup").description("Interactive provider setup wizard").action(async () => {
8846
- const { cmdSetup } = await import('../setup-RHWARBBB.js');
8846
+ const { cmdSetup } = await import('../setup-VX6EPF5P.js');
8847
8847
  await cmdSetup([], { projectDir: process.cwd() });
8848
8848
  });
8849
8849
  program.addCommand(makeInstallCommand());
@@ -1,11 +1,17 @@
1
- export { AbstractConnector, BUILTIN_CONNECTOR_CATALOG, ConnectorFieldMissingError, ConnectorManager, ConnectorStartupError, FlowAdapter, LogBuffer, ManagedGitconfigCollisionError, PortPool, atomicReplaceCredential, buildConnectorPromptSection, buildSdkConnectorTools, buildSdkFlowTools, createFsWatcher, createWorktree, defaultSpawn, ensureDirMode, ensureFleetMounted, findGitRoot, findMissingPackages, getConnector, installNpmPackages, isFleetManaged, isPackageResolvable, listConnectors, listWorktrees, registerBuiltinConnectors, removeMountBlock, renderCredentialHelperScript, tryGetConnector, worktreeRegistry, writeHelperScript, writeMountBlock } from '../chunk-HVQWLYZB.js';
1
+ export { AbstractConnector, BUILTIN_CONNECTOR_CATALOG, ConnectorFieldMissingError, ConnectorManager, ConnectorStartupError, FlowAdapter, LogBuffer, ManagedGitconfigCollisionError, PortPool, atomicReplaceCredential, buildConnectorPromptSection, buildSdkConnectorTools, buildSdkFlowTools, createFsWatcher, createWorktree, defaultSpawn, ensureDirMode, ensureFleetMounted, findGitRoot, findMissingPackages, getConnector, installNpmPackages, isFleetManaged, isPackageResolvable, listConnectors, listWorktrees, registerBuiltinConnectors, removeMountBlock, renderCredentialHelperScript, tryGetConnector, worktreeRegistry, writeHelperScript, writeMountBlock } from '../chunk-ZO7KL7GN.js';
2
2
  export { EnvSecretProvider, ForgeSecretProvider, InMemorySecretProvider, LegacyAuthGrammarError, LockedSecretProvider, OAuthRequiredError, PreMintedSecretProvider, SecretProviderChain, createCliSecretProviderChain, createForgeSecretProviderChain, deriveSingleMaterializedConnectorDeclaration, fromMaterializedConnectorMd, isKnownSecretRef, loadConnectorDeclarations, loadMaterializedConnectorDeclarations, resolveAuthRef, resolveBackendAuthFor, resolvedConfigToDeclarations } from '../chunk-ZNIHTT22.js';
3
+ import '../chunk-P5W6JVD4.js';
4
+ import '../chunk-ISQWMBKD.js';
5
+ import '../chunk-RRVQAE5D.js';
6
+ import '../chunk-V34ZEXSE.js';
7
+ import '../chunk-GAH4YRCI.js';
8
+ import '../chunk-SR6NBBWT.js';
3
9
  import '../chunk-6E6PKKAD.js';
4
10
  import '../chunk-IFGTRL2I.js';
5
- import '../chunk-E4AVJMOJ.js';
6
- import '../chunk-XJ74XFIZ.js';
7
- import '../chunk-SCR3WGW7.js';
8
- import '../chunk-TUYN2HDT.js';
11
+ import '../chunk-S5FV6ISY.js';
12
+ import '../chunk-5QGMEPUX.js';
13
+ import '../chunk-7KFN2EPR.js';
14
+ import '../chunk-F5VREBV2.js';
9
15
  import '../chunk-P43HBWKK.js';
10
16
  import '../chunk-F3HNW354.js';
11
17
  import '../chunk-K5GBV4SA.js';
@@ -1,5 +1,5 @@
1
- import { logErr, logOk, logInfo } from './chunk-XTFZOYNY.js';
2
- import './chunk-6AYGXPPF.js';
1
+ import { logErr, logOk, logInfo } from './chunk-P2J3MLTW.js';
2
+ import './chunk-Q6O53D5Q.js';
3
3
  import './chunk-3HVASHBF.js';
4
4
  import './chunk-NU4E7C5I.js';
5
5
  import './chunk-UKJMQZV6.js';
@@ -86,5 +86,5 @@ function ensureSourcesCloned(projectDir, opts = {}) {
86
86
  }
87
87
 
88
88
  export { ensureSourcesCloned };
89
- //# sourceMappingURL=ensure-sources-N7B7657V.js.map
90
- //# sourceMappingURL=ensure-sources-N7B7657V.js.map
89
+ //# sourceMappingURL=ensure-sources-D6R57GAP.js.map
90
+ //# sourceMappingURL=ensure-sources-D6R57GAP.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../cli/src/ensure-sources.ts"],"names":[],"mappings":"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","file":"ensure-sources-N7B7657V.js","sourcesContent":["/**\n * ensure-sources.ts — hydrate the `~/.skaile/cache/sources/` clone cache from a\n * project's `skaile.yaml` `sources:` entries.\n *\n * Called by `skaile init` (idempotent: no-op when no sources declared) and\n * `skaile install` so checking out a project pulls its source clones onto\n * the local machine.\n */\n\nimport { spawnSync } from \"node:child_process\";\nimport { existsSync, mkdirSync } from \"node:fs\";\nimport * as path from \"node:path\";\nimport {\n getGlobalCacheDir,\n type SourceEntry,\n sourceCacheKey,\n sourceShortName,\n WorkspaceYamlEditor,\n} from \"@skaile/workspaces/core\";\nimport { logErr, logInfo, logOk } from \"./helpers.ts\";\n\nfunction sourceClonePath(key: string): string {\n return path.join(getGlobalCacheDir(), key);\n}\n\nexport interface EnsureResult {\n cloned: string[];\n cached: string[];\n failed: string[];\n}\n\n/** Load `sources:` from a project's `skaile.yaml`, or `null` when unavailable. */\nfunction loadProjectSources(yamlPath: string, quiet: boolean): SourceEntry[] | null {\n try {\n return WorkspaceYamlEditor.load(yamlPath).getSources();\n } catch (err) {\n if (!quiet) {\n logErr(`Could not read ${yamlPath}: ${err instanceof Error ? err.message : String(err)}`);\n }\n return null;\n }\n}\n\n/**\n * Hydrate a single source entry into `result`: skip when already cached,\n * otherwise clone and record success/failure. Mutates `result` in place.\n */\nfunction hydrateSourceEntry(entry: SourceEntry, quiet: boolean, result: EnsureResult): void {\n const key = sourceCacheKey(entry.url);\n const slug = sourceShortName(entry.url);\n const dest = sourceClonePath(key);\n if (existsSync(dest)) {\n result.cached.push(slug);\n return;\n }\n mkdirSync(path.dirname(dest), { recursive: true });\n const args = [\"clone\", entry.url, dest];\n if (entry.pin) args.splice(1, 0, \"--branch\", entry.pin);\n const clone = spawnSync(\"git\", args, { stdio: quiet ? \"pipe\" : \"inherit\" });\n if (clone.status !== 0) {\n result.failed.push(slug);\n if (quiet) {\n logErr(`git clone failed for ${entry.url}`);\n }\n return;\n }\n result.cloned.push(slug);\n}\n\n/** Log a full-hydrate summary of cloned + reused-cached entries. */\nfunction logHydrateSummary(result: EnsureResult): void {\n for (const n of result.cloned) logOk(`Cloned source \"${n}\".`);\n if (result.cached.length > 0) {\n logInfo(`Reused cached clones: ${result.cached.join(\", \")}`);\n }\n}\n\n/**\n * Walk `projectDir/skaile.yaml` `sources:` and clone any entries whose\n * clone directory does not yet exist under `~/.skaile/cache/sources/`. Existing\n * clones are left untouched — this is hydration, not sync.\n *\n * Quiet by default: when `quiet: true` the helper only prints failures.\n * On full hydrate (`quiet: false`) it logs each cloned/cached entry.\n */\nexport function ensureSourcesCloned(\n projectDir: string,\n opts: { quiet?: boolean } = {},\n): EnsureResult {\n const result: EnsureResult = { cloned: [], cached: [], failed: [] };\n const yamlPath = path.join(projectDir, \"skaile.yaml\");\n if (!existsSync(yamlPath)) return result;\n\n const quiet = opts.quiet ?? false;\n const sources = loadProjectSources(yamlPath, quiet);\n if (sources === null) return result;\n if (sources.length === 0) return result;\n\n for (const entry of sources) {\n hydrateSourceEntry(entry, quiet, result);\n }\n\n if (!quiet) {\n logHydrateSummary(result);\n }\n\n return result;\n}\n"]}
1
+ {"version":3,"sources":["../cli/src/ensure-sources.ts"],"names":[],"mappings":"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","file":"ensure-sources-D6R57GAP.js","sourcesContent":["/**\n * ensure-sources.ts — hydrate the `~/.skaile/cache/sources/` clone cache from a\n * project's `skaile.yaml` `sources:` entries.\n *\n * Called by `skaile init` (idempotent: no-op when no sources declared) and\n * `skaile install` so checking out a project pulls its source clones onto\n * the local machine.\n */\n\nimport { spawnSync } from \"node:child_process\";\nimport { existsSync, mkdirSync } from \"node:fs\";\nimport * as path from \"node:path\";\nimport {\n getGlobalCacheDir,\n type SourceEntry,\n sourceCacheKey,\n sourceShortName,\n WorkspaceYamlEditor,\n} from \"@skaile/workspaces/core\";\nimport { logErr, logInfo, logOk } from \"./helpers.ts\";\n\nfunction sourceClonePath(key: string): string {\n return path.join(getGlobalCacheDir(), key);\n}\n\nexport interface EnsureResult {\n cloned: string[];\n cached: string[];\n failed: string[];\n}\n\n/** Load `sources:` from a project's `skaile.yaml`, or `null` when unavailable. */\nfunction loadProjectSources(yamlPath: string, quiet: boolean): SourceEntry[] | null {\n try {\n return WorkspaceYamlEditor.load(yamlPath).getSources();\n } catch (err) {\n if (!quiet) {\n logErr(`Could not read ${yamlPath}: ${err instanceof Error ? err.message : String(err)}`);\n }\n return null;\n }\n}\n\n/**\n * Hydrate a single source entry into `result`: skip when already cached,\n * otherwise clone and record success/failure. Mutates `result` in place.\n */\nfunction hydrateSourceEntry(entry: SourceEntry, quiet: boolean, result: EnsureResult): void {\n const key = sourceCacheKey(entry.url);\n const slug = sourceShortName(entry.url);\n const dest = sourceClonePath(key);\n if (existsSync(dest)) {\n result.cached.push(slug);\n return;\n }\n mkdirSync(path.dirname(dest), { recursive: true });\n const args = [\"clone\", entry.url, dest];\n if (entry.pin) args.splice(1, 0, \"--branch\", entry.pin);\n const clone = spawnSync(\"git\", args, { stdio: quiet ? \"pipe\" : \"inherit\" });\n if (clone.status !== 0) {\n result.failed.push(slug);\n if (quiet) {\n logErr(`git clone failed for ${entry.url}`);\n }\n return;\n }\n result.cloned.push(slug);\n}\n\n/** Log a full-hydrate summary of cloned + reused-cached entries. */\nfunction logHydrateSummary(result: EnsureResult): void {\n for (const n of result.cloned) logOk(`Cloned source \"${n}\".`);\n if (result.cached.length > 0) {\n logInfo(`Reused cached clones: ${result.cached.join(\", \")}`);\n }\n}\n\n/**\n * Walk `projectDir/skaile.yaml` `sources:` and clone any entries whose\n * clone directory does not yet exist under `~/.skaile/cache/sources/`. Existing\n * clones are left untouched — this is hydration, not sync.\n *\n * Quiet by default: when `quiet: true` the helper only prints failures.\n * On full hydrate (`quiet: false`) it logs each cloned/cached entry.\n */\nexport function ensureSourcesCloned(\n projectDir: string,\n opts: { quiet?: boolean } = {},\n): EnsureResult {\n const result: EnsureResult = { cloned: [], cached: [], failed: [] };\n const yamlPath = path.join(projectDir, \"skaile.yaml\");\n if (!existsSync(yamlPath)) return result;\n\n const quiet = opts.quiet ?? false;\n const sources = loadProjectSources(yamlPath, quiet);\n if (sources === null) return result;\n if (sources.length === 0) return result;\n\n for (const entry of sources) {\n hydrateSourceEntry(entry, quiet, result);\n }\n\n if (!quiet) {\n logHydrateSummary(result);\n }\n\n return result;\n}\n"]}
@@ -1,11 +1,17 @@
1
- export { BoxConnector, createConnector4 as createConnector } from '../../chunk-HVQWLYZB.js';
1
+ export { BoxConnector, createConnector4 as createConnector } from '../../chunk-ZO7KL7GN.js';
2
2
  import '../../chunk-ZNIHTT22.js';
3
+ import '../../chunk-P5W6JVD4.js';
4
+ import '../../chunk-ISQWMBKD.js';
5
+ import '../../chunk-RRVQAE5D.js';
6
+ import '../../chunk-V34ZEXSE.js';
7
+ import '../../chunk-GAH4YRCI.js';
8
+ import '../../chunk-SR6NBBWT.js';
3
9
  import '../../chunk-6E6PKKAD.js';
4
10
  import '../../chunk-IFGTRL2I.js';
5
- import '../../chunk-E4AVJMOJ.js';
6
- import '../../chunk-XJ74XFIZ.js';
7
- import '../../chunk-SCR3WGW7.js';
8
- import '../../chunk-TUYN2HDT.js';
11
+ import '../../chunk-S5FV6ISY.js';
12
+ import '../../chunk-5QGMEPUX.js';
13
+ import '../../chunk-7KFN2EPR.js';
14
+ import '../../chunk-F5VREBV2.js';
9
15
  import '../../chunk-P43HBWKK.js';
10
16
  import '../../chunk-F3HNW354.js';
11
17
  import '../../chunk-K5GBV4SA.js';
@@ -1,11 +1,17 @@
1
- export { DeployConnector, createConnector2 as createConnector } from '../../chunk-HVQWLYZB.js';
1
+ export { DeployConnector, createConnector2 as createConnector } from '../../chunk-ZO7KL7GN.js';
2
2
  import '../../chunk-ZNIHTT22.js';
3
+ import '../../chunk-P5W6JVD4.js';
4
+ import '../../chunk-ISQWMBKD.js';
5
+ import '../../chunk-RRVQAE5D.js';
6
+ import '../../chunk-V34ZEXSE.js';
7
+ import '../../chunk-GAH4YRCI.js';
8
+ import '../../chunk-SR6NBBWT.js';
3
9
  import '../../chunk-6E6PKKAD.js';
4
10
  import '../../chunk-IFGTRL2I.js';
5
- import '../../chunk-E4AVJMOJ.js';
6
- import '../../chunk-XJ74XFIZ.js';
7
- import '../../chunk-SCR3WGW7.js';
8
- import '../../chunk-TUYN2HDT.js';
11
+ import '../../chunk-S5FV6ISY.js';
12
+ import '../../chunk-5QGMEPUX.js';
13
+ import '../../chunk-7KFN2EPR.js';
14
+ import '../../chunk-F5VREBV2.js';
9
15
  import '../../chunk-P43HBWKK.js';
10
16
  import '../../chunk-F3HNW354.js';
11
17
  import '../../chunk-K5GBV4SA.js';
@@ -1,11 +1,17 @@
1
- export { DevServerConnector, createConnector3 as createConnector } from '../../chunk-HVQWLYZB.js';
1
+ export { DevServerConnector, createConnector3 as createConnector } from '../../chunk-ZO7KL7GN.js';
2
2
  import '../../chunk-ZNIHTT22.js';
3
+ import '../../chunk-P5W6JVD4.js';
4
+ import '../../chunk-ISQWMBKD.js';
5
+ import '../../chunk-RRVQAE5D.js';
6
+ import '../../chunk-V34ZEXSE.js';
7
+ import '../../chunk-GAH4YRCI.js';
8
+ import '../../chunk-SR6NBBWT.js';
3
9
  import '../../chunk-6E6PKKAD.js';
4
10
  import '../../chunk-IFGTRL2I.js';
5
- import '../../chunk-E4AVJMOJ.js';
6
- import '../../chunk-XJ74XFIZ.js';
7
- import '../../chunk-SCR3WGW7.js';
8
- import '../../chunk-TUYN2HDT.js';
11
+ import '../../chunk-S5FV6ISY.js';
12
+ import '../../chunk-5QGMEPUX.js';
13
+ import '../../chunk-7KFN2EPR.js';
14
+ import '../../chunk-F5VREBV2.js';
9
15
  import '../../chunk-P43HBWKK.js';
10
16
  import '../../chunk-F3HNW354.js';
11
17
  import '../../chunk-K5GBV4SA.js';
@@ -17,9 +17,11 @@ bridges three ownership roles:
17
17
  read-only `get_state`, `get_globals`, `get_available`, `validate_node`,
18
18
  `build_handoff`).
19
19
  - **Runtime** — resolves available `router` nodes with bounded expressions,
20
- drains available `function` nodes through `NodeExecutor`, parks available
21
- `gate` nodes through durable approval state, and drives available `sub-flow`
22
- nodes inline before an agent turn is considered.
20
+ drains available `function` and `check` nodes through `NodeExecutor`, drains
21
+ available `subprompt` nodes through `SubpromptRunner` on a second, isolated
22
+ driver instance, parks available `gate` nodes through durable approval
23
+ state, and drives available `sub-flow` nodes inline before an agent turn is
24
+ considered.
23
25
  - **Host** — the runner applies out-of-turn mutations through direct adapter
24
26
  methods (`applyApproval`, `applyInput`, `retryNode`, `setAutonomousMode`,
25
27
  `cancel`, `hydrate`) in response to platform actions, forwards persistence
@@ -37,20 +39,87 @@ declared in `skaile.yaml` — it is constructed by the runner per session
37
39
  and bound to the active `FlowDefinition`.
38
40
 
39
41
  The adapter normalizes authored definitions at its connect/start boundary.
40
- Strict v2 `run.kind: agent`, `run.kind: function`, `run.kind: gate`,
41
- `run.kind: router`, and `run.kind: sub-flow` nodes are active. Among legacy
42
- definitions, explicit `type: skill` nodes normalize into the agent shape and exact `type: sub-flow`
42
+ All seven strict v2 kinds `run.kind: agent`, `run.kind: subprompt`,
43
+ `run.kind: function`, `run.kind: check`, `run.kind: gate`, `run.kind: router`,
44
+ and `run.kind: sub-flow` are active. Among legacy definitions, explicit
45
+ `type: skill` nodes normalize into the agent shape and exact `type: sub-flow`
43
46
  nodes with `data.flow` normalize into the active inline-child shape. Other
44
47
  legacy kinds normalize to false-precondition router placeholders: they are
45
48
  tracked but never become available, so their outgoing hard flow edges remain
46
49
  blocking. A selected
47
50
  available or running agent receives its instruction, resolved
48
51
  bindings with origins, asset requirements, and completed predecessor
49
- context through `build_handoff`. Functions receive resolved raw values as
50
- environment variables while provenance remains on the executor request. They
51
- inherit the session environment and run from the session workspace.
52
- Configured stdout/stderr captures map only to `fields.<name>` output keys and
53
- remain attached to both completed and failed node executions.
52
+ context through `build_handoff`. Functions and checks receive resolved raw
53
+ values as environment variables while provenance remains on the executor
54
+ request. They inherit the session environment and run from the session
55
+ workspace. Configured stdout/stderr captures map only to `fields.<name>`
56
+ output keys and remain attached to both completed and failed node executions.
57
+ A subprompt receives its interpolated instruction as a plain-text prompt, not
58
+ environment variables — see below.
59
+
60
+ A `check` runs the same deterministic process as a function, through the same
61
+ `NodeExecutor` seam, but its exit status is a pass/fail verdict rather than a
62
+ plain success/failure. A clean exit inside `successExit` completes the node
63
+ exactly like a function — no approval, no agent turn, dark. A clean exit
64
+ outside `successExit` is a fail *verdict*: the runtime derives evidence — each
65
+ compared binding's value, whether *every compared value's immediate origin*
66
+ was runtime-obtained (`"verified"`) or at least one was agent-obtained
67
+ (`"asserted"`; the taint check is one-hop, not transitive — see
68
+ `engine/check-provenance.ts`), and whether the check's inputs could have
69
+ observed anything beyond the flow's own authored state — plus the process
70
+ record (`runtime`, `command`, `cwd`, `successExit`) so a persisted attempt is
71
+ self-describing, and attaches it to the attempt. `provenance` is present only
72
+ when there was at least one compared value; `inputs` defaults to `"live"`
73
+ (the floor for any check that runs a process) and is `"flow-local"` only when
74
+ every compared value's origins are all `literal`/`default`/`flow-input`. A
75
+ check cannot declare `control.optional` — rejected at parse time, since an
76
+ optional verification is close to a contradiction either way it could resolve.
77
+ Once the automatic retry budget (`control.retries`) is exhausted, `onFail:
78
+ 'fail'` (the alternative) fails the node terminally, while `onFail: 'escalate'`
79
+ (the default) parks it at `awaiting_approval` with an `Approval` naming the
80
+ failed check, its exit status, and the provenance label when one applies.
81
+ Escalation is a one-way door: `applyApproval` rejects an `"approved"` decision
82
+ on a check outright rather than silently ignoring it, and a `"rejected"`
83
+ decision ends the node terminally `failed` — there is no revision path and no
84
+ way back to `available`. A spawn failure or a timeout produced no verdict at
85
+ all, so it is always a plain node failure, carries no evidence, and never
86
+ escalates regardless of `onFail`.
87
+
88
+ A `subprompt` is `function`-shaped for everything except how the work is
89
+ performed and how its output provenance is classified. Instead of
90
+ `NodeExecutor`, an available subprompt hands its interpolated instruction —
91
+ plus a JSON-response directive when `contract.output.fields` is declared —
92
+ to a `SubpromptRunner`. The production implementation, `SessionSubpromptRunner`,
93
+ constructs a **second, isolated** `AgentDriver` instance per call: same
94
+ backend, provider, resolved model, and credentials as the session driver
95
+ (threaded through from the same values the two production wiring sites
96
+ already resolved for it — no new credential channel), but no Skaile system prompt, no MCP servers, no connector capabilities, and no access to the session conversation, bounded to a single turn. It does retain the backend's own native tool surface (a coding backend keeps its file and shell tools, rooted at the session workspace) — isolation here means a separate conversation, not a sandbox. The
97
+ instance is started, sent one prompt, and killed afterward; isolation comes
98
+ from the separate instance, never `resetSession()` (which mutates the shared
99
+ session). `run.model` resolves through a pure `resolveModelTier` in
100
+ `bridge/src/models.ts`: a configured override first, then the provider's
101
+ built-in tier. `default` and an absent tier fall back to the session model;
102
+ `small`/`deep` fail the node instead of substituting one, so an explicit
103
+ cost or quality request is never silently served by a different model. With no declared output contract the response is
104
+ prose, carried verbatim as the summary; with one declared, the response is
105
+ additionally parsed as JSON into `fields` and validated through the same
106
+ `validateConsumedNodeOutput` seam every other kind uses. The reply stays in
107
+ `summary` either way — `fields` is reachable only through an expression
108
+ binding, while `build_handoff` shows a downstream agent a predecessor's
109
+ summary/artifacts/concerns and never its `fields`, so replacing the summary
110
+ would make a declared output invisible to any consumer that reads it as
111
+ context rather than binding it. There is no
112
+ corrective reprompt — a subprompt has no conversation to reprompt in — so a
113
+ parse or validation failure is an ordinary node failure that consumes
114
+ `control.retries`, never fabricated output. `control.optional`,
115
+ `control.retries`, and `control.timeoutSec` reuse the identical
116
+ `raceWithTimeout` / `executionGeneration` / automatic-retry machinery as
117
+ `function` and `check` — including `raceWithTimeout`'s known limit: it stops
118
+ waiting on timeout but does not cancel the underlying call, so a timed-out
119
+ subprompt keeps running (and being billed) after the node fails. A
120
+ subprompt's output is classified `obtainedBy: "agent"` — model-generated even
121
+ though the *runtime* made the call — so a downstream `check` consuming it
122
+ always derives `"asserted"` provenance, never `"verified"`.
54
123
 
55
124
  A first-class gate never enters the agent mutation surface and never calls
56
125
  `NodeExecutor`. Admission parks it at `awaiting_approval` with `run.prompt` as
@@ -30,6 +30,7 @@ import type { BindingOrigin } from "./contract/expression.js";
30
30
  import { type FlowDefinition, isBlocking } from "./engine/index.js";
31
31
  import type { NodeExecutor } from "./node-executor.js";
32
32
  import type { InlineSubFlowOperationTarget, InlineSubFlowRunner } from "./sub-flow-runner.js";
33
+ import type { SubpromptRunner } from "./subprompt-runner.js";
33
34
  import { type TurnStimulus } from "./prompt-fragments.js";
34
35
  /**
35
36
  * Minimal structural shape of the runner's `SessionStimulusBus`. Declared
@@ -81,6 +82,8 @@ export interface FlowAdapterState {
81
82
  lastSignaledExecution?: FlowExecution;
82
83
  /** Deterministic runtime backed by the already-materialized session workspace. */
83
84
  nodeExecutor?: NodeExecutor;
85
+ /** Isolated model-call runtime for subprompt nodes — a second driver instance, never the session driver. */
86
+ subpromptRunner?: SubpromptRunner;
84
87
  /** Host-owned inline child lifecycle, backed by the existing materialized session. */
85
88
  inlineSubFlowRunner?: InlineSubFlowRunner;
86
89
  /** Transient child operation routes keyed by their owning parent sub-flow node. */
@@ -91,6 +94,14 @@ export interface FlowAdapterState {
91
94
  inlineSubFlowAncestry: string[];
92
95
  /** Non-durable ownership epoch for results returned by in-flight inline children. */
93
96
  executionGeneration: number;
97
+ /**
98
+ * Non-durable opportunistic wake timer for agent-node deadline re-evaluation.
99
+ * The derived deadline (see `engine/node-deadline.ts`) is the source of truth;
100
+ * this timer's only job is to trigger a re-evaluation call while nothing else
101
+ * would (a genuinely hung agent turn has no other event to react to). Rearmed
102
+ * after every mutation, `connect()`, and `hydrate()`; cleared on `disconnect()`.
103
+ */
104
+ wakeTimer: ReturnType<typeof setTimeout> | null;
94
105
  }
95
106
  /**
96
107
  * Options the runner passes via `declaration.options` when connecting the `FlowAdapter`.
@@ -127,6 +138,8 @@ export interface FlowAdapterConnectOptions {
127
138
  useBusForStimulus?: boolean;
128
139
  /** Runtime for function nodes. Required before deterministic nodes are drained. */
129
140
  nodeExecutor?: NodeExecutor;
141
+ /** Runtime for subprompt nodes. Required before subprompt nodes are drained. */
142
+ subpromptRunner?: SubpromptRunner;
130
143
  /** Host lifecycle used to resolve and drive inline child flows in the current session. */
131
144
  inlineSubFlowRunner?: InlineSubFlowRunner;
132
145
  /** @internal Provenance for child flow inputs, retained only in the live adapter. */
@@ -188,7 +201,9 @@ export declare class FlowAdapter extends AbstractConnector {
188
201
  /**
189
202
  * Record an approval decision on a node currently `awaiting_approval`.
190
203
  * A first-class gate completes directly when approved and remains parked when rejected.
191
- * Agent-node approvals keep their existing resume behavior.
204
+ * Agent-node approvals keep their existing resume behavior. A check's escalation is a
205
+ * one-way door: only `rejected` is legal, and it ends the node terminally `failed` —
206
+ * there is no decision that resumes or passes a check.
192
207
  */
193
208
  applyApproval(handle: ConnectorHandle, nodeId: string, decision: "approved" | "rejected", feedback: string | undefined, decidedBy: string): void;
194
209
  /**
@@ -204,7 +219,13 @@ export declare class FlowAdapter extends AbstractConnector {
204
219
  retryNode(handle: ConnectorHandle, nodeId: string): void;
205
220
  /** Toggle autonomous mode at the flow-execution level. */
206
221
  setAutonomousMode(handle: ConnectorHandle, enabled: boolean): void;
207
- /** Cancel the flow run. Status transitions to `cancelled`; dependents stay put. */
222
+ /**
223
+ * Cancel the flow run. Status transitions to `cancelled`; dependents stay
224
+ * put. Bumps `executionGeneration` — the sole late-settlement rejection
225
+ * mechanism every in-flight await (function executor, sub-flow child)
226
+ * checks after resolving, so a result that arrives after cancellation can
227
+ * never write state.
228
+ */
208
229
  cancel(handle: ConnectorHandle): void;
209
230
  /** Read-only access to the current FlowExecution snapshot. */
210
231
  getExecution(handle: ConnectorHandle): FlowExecution;
@@ -229,9 +250,11 @@ export declare class FlowAdapter extends AbstractConnector {
229
250
  */
230
251
  drainRuntimeNodes(handle: ConnectorHandle): Promise<FlowExecution>;
231
252
  /**
232
- * Run every currently available function node through the configured
233
- * NodeExecutor. Newly-unblocked function nodes are drained in definition
234
- * order before returning control to the runner's agent-turn decision.
253
+ * Run every currently available function and check node through the
254
+ * configured NodeExecutor. Newly-unblocked function/check nodes are
255
+ * drained in definition order before returning control to the runner's
256
+ * agent-turn decision. Routers and gates are excluded — see
257
+ * {@link drainRuntimeNodes} for the full drain.
235
258
  */
236
259
  executeAvailableFunctionNodes(handle: ConnectorHandle): Promise<FlowExecution>;
237
260
  private drainAvailableRuntimeNodes;
@@ -252,6 +275,75 @@ export declare class FlowAdapter extends AbstractConnector {
252
275
  * state directly.
253
276
  */
254
277
  private recompute;
278
+ private clearWakeTimer;
279
+ /**
280
+ * Whether `execution` counts as "actively running" for `control.timeoutSec`
281
+ * evaluation. Ordinarily this is just `status === "running"`. The one
282
+ * exception: a non-gate agent node whose approval was just decided
283
+ * `approved` stays at `awaiting_approval` — `applyApproval` deliberately
284
+ * does not restore `running` there, because `doCompleteNode`'s
285
+ * `approvedPrior` check requires exactly that status (a mandatory-approval
286
+ * node has no `runningAutonomous` fallback). Without this second clause the
287
+ * timeout would pause for the approval wait (correctly, via
288
+ * `remainingActiveExecutionMs` reading the now-resolved `approvalHistory`
289
+ * entry) and then never resume, since nothing re-evaluates a node that
290
+ * never looks "running" again.
291
+ */
292
+ private isDeadlineEligible;
293
+ /**
294
+ * Recomputes the pending wake timer against the current state: cancels any
295
+ * previously-armed timer, then arms a fresh one for the earliest deadline
296
+ * among currently `running` agent nodes with a `control.timeoutSec`. A
297
+ * no-op when nothing is running against a timeout, or the flow is already
298
+ * terminal. Called after every {@link mutate}, plus `connect()` and
299
+ * `hydrate()` (which bypass `mutate()`).
300
+ *
301
+ * `disconnect()` clears the timer and bumps `executionGeneration`, but a
302
+ * `mutate()` already in flight (or one that lands after teardown for any
303
+ * other reason) still calls this on its way out — bail here on
304
+ * `handle.status` so a post-disconnect mutation can never re-arm a timer
305
+ * that would fire against a handle nothing is watching anymore.
306
+ */
307
+ private rearmWakeTimer;
308
+ /**
309
+ * Re-checks every `running` agent node's derived deadline and, for any that
310
+ * have expired, either auto-retries (bounded by `control.retries`, composing
311
+ * with the existing `doFailNode(recoverable: true)` and `retryNode`
312
+ * pathways) or terminally fails the node. Safe to call at any time — the
313
+ * derived deadline means this is a no-op unless something has actually
314
+ * expired. Goes through {@link mutate}, so a state change here republishes
315
+ * `onChange`/stimulus exactly like any other mutation, waking a fresh turn
316
+ * when the node retries or the flow rolls up to `failed`.
317
+ */
318
+ private evaluateAgentNodeDeadlines;
319
+ /**
320
+ * Records one failed attempt on `nodeId`'s execution and decides whether
321
+ * the automatic bounded retry (`control.retries`) still has budget. Shared
322
+ * by every automatic-failure seam (agent-node timeout, function/check
323
+ * execution/timeout failure, sub-flow execution/timeout failure, and a
324
+ * check's fail verdict) so the budget — derived from prior `'failed'`
325
+ * entries in `outputHistory`, not a separate durable counter — is computed
326
+ * once, the same way, everywhere.
327
+ *
328
+ * Returns the `NodeExecution` patch (error/errorHistory/outputHistory/
329
+ * output) plus whether budget remains; the caller decides the resulting
330
+ * `status` because that differs by kind (e.g. sub-flow degrades an
331
+ * optional node's exhausted failure to `skipped`; agent/function do not,
332
+ * preserving their existing behavior). A terminal failure whose node has
333
+ * any `control.retries` configured carries `recoverable: true` so the
334
+ * manual `retryNode` operator override — which sits outside this budget
335
+ * entirely — remains usable once the automatic budget runs out.
336
+ *
337
+ * @param sourceErrorAtIso - The failure's own timestamp, when the caller has
338
+ * one more precise than `completedAtIso` (e.g. a sub-flow child reports
339
+ * its own `error.at`, which can predate this node's parent-side
340
+ * `completedAt` by however long the result took to propagate). Defaults
341
+ * to `completedAtIso` for callers (agent-timeout, function-node) whose
342
+ * failure message is synthesized at the moment of detection.
343
+ * @param checkEvidence - Derived evidence for a check's fail verdict, so it
344
+ * rides on the same appended attempt as the failure it explains.
345
+ */
346
+ private planAutomaticRetry;
255
347
  /**
256
348
  * Build the selected agent node's complete turn briefing plus upstream context.
257
349
  */