@skaile/workspaces 3.2.1 → 3.3.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 (113) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/dist/{asset-feeds-SEYSNNEM.js → asset-feeds-AGAH5OHC.js} +4 -4
  3. package/dist/{asset-feeds-SEYSNNEM.js.map → asset-feeds-AGAH5OHC.js.map} +1 -1
  4. package/dist/asset-manager/index.js +1 -1
  5. package/dist/{chunk-PTAUN5CY.js → chunk-33GWB3RB.js} +2 -2
  6. package/dist/{chunk-PTAUN5CY.js.map → chunk-33GWB3RB.js.map} +1 -1
  7. package/dist/{chunk-XVIFPGYH.js → chunk-3KEJ2HJY.js} +3 -3
  8. package/dist/{chunk-XVIFPGYH.js.map → chunk-3KEJ2HJY.js.map} +1 -1
  9. package/dist/{chunk-HWEW3VII.js → chunk-4GJLRYMB.js} +2 -2
  10. package/dist/{chunk-HWEW3VII.js.map → chunk-4GJLRYMB.js.map} +1 -1
  11. package/dist/{chunk-I7S6DFRU.js → chunk-5FLEP4X6.js} +3 -3
  12. package/dist/{chunk-I7S6DFRU.js.map → chunk-5FLEP4X6.js.map} +1 -1
  13. package/dist/{chunk-57RFYEVM.js → chunk-6OMKIPIE.js} +18 -5
  14. package/dist/chunk-6OMKIPIE.js.map +1 -0
  15. package/dist/{chunk-BKUANJB7.js → chunk-BOH6AG6Q.js} +7 -31
  16. package/dist/chunk-BOH6AG6Q.js.map +1 -0
  17. package/dist/{chunk-BEA7RXI3.js → chunk-E5S2WGTS.js} +130 -11
  18. package/dist/chunk-E5S2WGTS.js.map +1 -0
  19. package/dist/{chunk-F5VREBV2.js → chunk-ELPR5XBG.js} +40 -3
  20. package/dist/chunk-ELPR5XBG.js.map +1 -0
  21. package/dist/{chunk-IAIHZRG7.js → chunk-EP7VBFMN.js} +6 -6
  22. package/dist/{chunk-IAIHZRG7.js.map → chunk-EP7VBFMN.js.map} +1 -1
  23. package/dist/{chunk-FLBDLF3I.js → chunk-HGFKNJA5.js} +6 -4
  24. package/dist/chunk-HGFKNJA5.js.map +1 -0
  25. package/dist/{chunk-CH3UTJBT.js → chunk-MJ77WSJC.js} +4 -4
  26. package/dist/{chunk-CH3UTJBT.js.map → chunk-MJ77WSJC.js.map} +1 -1
  27. package/dist/{chunk-HCNVX34E.js → chunk-OD3ABXUO.js} +2 -2
  28. package/dist/{chunk-HCNVX34E.js.map → chunk-OD3ABXUO.js.map} +1 -1
  29. package/dist/{chunk-DNYE3SSL.js → chunk-PRKLFKNC.js} +3 -3
  30. package/dist/{chunk-DNYE3SSL.js.map → chunk-PRKLFKNC.js.map} +1 -1
  31. package/dist/{chunk-NWFZUQPF.js → chunk-RRCNMURJ.js} +7 -7
  32. package/dist/{chunk-NWFZUQPF.js.map → chunk-RRCNMURJ.js.map} +1 -1
  33. package/dist/{chunk-NLZYBWVH.js → chunk-S6GKHEMN.js} +6 -6
  34. package/dist/{chunk-NLZYBWVH.js.map → chunk-S6GKHEMN.js.map} +1 -1
  35. package/dist/cli/index.js +295 -283
  36. package/dist/cli/index.js.map +1 -1
  37. package/dist/cli/src/commands/complete-resolvers.d.ts +4 -0
  38. package/dist/cli/src/commands/complete-resolvers.d.ts.map +1 -1
  39. package/dist/cli/src/commands/flow.d.ts +8 -4
  40. package/dist/cli/src/commands/flow.d.ts.map +1 -1
  41. package/dist/cli/src/commands/run.d.ts.map +1 -1
  42. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  43. package/dist/cli/src/flow-discovery.d.ts +26 -10
  44. package/dist/cli/src/flow-discovery.d.ts.map +1 -1
  45. package/dist/cli/src/paths.d.ts +21 -7
  46. package/dist/cli/src/paths.d.ts.map +1 -1
  47. package/dist/connectors/index.js +4 -4
  48. package/dist/{ensure-sources-IM3JMW2L.js → ensure-sources-L2276FYP.js} +4 -4
  49. package/dist/{ensure-sources-IM3JMW2L.js.map → ensure-sources-L2276FYP.js.map} +1 -1
  50. package/dist/factory-assets/connectors/box.js +4 -4
  51. package/dist/factory-assets/connectors/deploy.js +4 -4
  52. package/dist/factory-assets/connectors/devserver.js +4 -4
  53. package/dist/factory-assets/connectors/flow/CONNECTOR.md +20 -7
  54. package/dist/factory-assets/connectors/flow/adapter.d.ts.map +1 -1
  55. package/dist/factory-assets/connectors/flow/adapter.js +4 -4
  56. package/dist/factory-assets/connectors/flow/engine/index.d.ts +1 -0
  57. package/dist/factory-assets/connectors/flow/engine/index.d.ts.map +1 -1
  58. package/dist/factory-assets/connectors/flow/engine/node-shape.d.ts +56 -0
  59. package/dist/factory-assets/connectors/flow/engine/node-shape.d.ts.map +1 -1
  60. package/dist/factory-assets/connectors/flow/engine.js +2 -2
  61. package/dist/factory-assets/connectors/flow/prompt-fragments.d.ts +4 -0
  62. package/dist/factory-assets/connectors/flow/prompt-fragments.d.ts.map +1 -1
  63. package/dist/factory-assets/connectors/flow/prompt-fragments.js +2 -2
  64. package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
  65. package/dist/factory-assets/connectors/flow/run-flow.js +5 -5
  66. package/dist/factory-assets/connectors/flow.js +4 -4
  67. package/dist/factory-assets/connectors/git.js +4 -4
  68. package/dist/factory-assets/connectors/gmail.js +4 -4
  69. package/dist/factory-assets/connectors/googledrive.js +4 -4
  70. package/dist/factory-assets/connectors/local.js +4 -4
  71. package/dist/factory-assets/connectors/mattermost.js +4 -4
  72. package/dist/factory-assets/connectors/memory.js +4 -4
  73. package/dist/factory-assets/connectors/minio.js +4 -4
  74. package/dist/factory-assets/connectors/postgres.js +4 -4
  75. package/dist/factory-assets/connectors/s3.js +4 -4
  76. package/dist/factory-assets/connectors/sharepoint.js +4 -4
  77. package/dist/factory-assets/connectors/sqlite.js +4 -4
  78. package/dist/factory-assets/connectors/static-server.js +4 -4
  79. package/dist/factory-assets/connectors/tunnel.js +4 -4
  80. package/dist/factory-assets/connectors/webdav.js +4 -4
  81. package/dist/factory-assets/connectors/xstate-store.js +4 -4
  82. package/dist/factory-assets/connectors/xstate.js +4 -4
  83. package/dist/{flows-PBNW6BEH.js → flows-7CZKSC64.js} +3 -3
  84. package/dist/{flows-PBNW6BEH.js.map → flows-7CZKSC64.js.map} +1 -1
  85. package/dist/{helpers-LJFOH4RB.js → helpers-ZWHB5JHQ.js} +4 -4
  86. package/dist/{helpers-LJFOH4RB.js.map → helpers-ZWHB5JHQ.js.map} +1 -1
  87. package/dist/{library-publish-BEFA7OCS.js → library-publish-CVYFMVGR.js} +8 -8
  88. package/dist/{library-publish-BEFA7OCS.js.map → library-publish-CVYFMVGR.js.map} +1 -1
  89. package/dist/{open-library-WJ7P7B4N.js → open-library-XB65LU3M.js} +7 -7
  90. package/dist/{open-library-WJ7P7B4N.js.map → open-library-XB65LU3M.js.map} +1 -1
  91. package/dist/{paths-2ZZMB7HU.js → paths-B52KTS7N.js} +3 -3
  92. package/dist/{paths-2ZZMB7HU.js.map → paths-B52KTS7N.js.map} +1 -1
  93. package/dist/{project-6RXDBSRV.js → project-E5LKCE7R.js} +5 -5
  94. package/dist/{project-6RXDBSRV.js.map → project-E5LKCE7R.js.map} +1 -1
  95. package/dist/runner/index.js +7 -7
  96. package/dist/sdk/asset-manager.js +1 -1
  97. package/dist/sdk/flow.js +2 -2
  98. package/dist/sdk/index.js +7 -7
  99. package/dist/sdk/runner.js +7 -7
  100. package/dist/{source-TJ457ZRQ.js → source-7BNREKGK.js} +8 -8
  101. package/dist/{source-TJ457ZRQ.js.map → source-7BNREKGK.js.map} +1 -1
  102. package/dist/{source-manifest-publish-R3Q4MT5W.js → source-manifest-publish-JGMHNADH.js} +9 -9
  103. package/dist/{source-manifest-publish-R3Q4MT5W.js.map → source-manifest-publish-JGMHNADH.js.map} +1 -1
  104. package/dist/tui/index.js +7 -7
  105. package/dist/workspace-plugin/adapters/mcp.js +1 -1
  106. package/dist/workspace-plugin/adapters/omp.js +3 -3
  107. package/dist/workspace-plugin/index.js +1 -1
  108. package/package.json +1 -1
  109. package/dist/chunk-57RFYEVM.js.map +0 -1
  110. package/dist/chunk-BEA7RXI3.js.map +0 -1
  111. package/dist/chunk-BKUANJB7.js.map +0 -1
  112. package/dist/chunk-F5VREBV2.js.map +0 -1
  113. package/dist/chunk-FLBDLF3I.js.map +0 -1
@@ -1,5 +1,5 @@
1
- export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, DEFAULT_FLOW_MUTATE_CONNECTOR_WAIT_MS, MOUNT_LIST_MAX_DEPTH, MOUNT_LIST_MAX_ENTRIES, MOUNT_READ_DEADLINE_FACTOR, MOUNT_TREE_OP_DEADLINE_FACTOR, MarkdownStreamer, PreInitRingSink, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildConnectorTokenMediator, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, buildStoreSnapshotReplay, builtinCapabilities, capabilityLogInstance, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, connectorRefreshKind, createAgentSession, createFlowConnectorReadiness, createSessionStimulusBus, defineCapability, deleteSession, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureGitConfigInclude, executeConnectorMutate, extractClaudeAiOauthExpiresAt, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, hasNonTerminalFlow, hostOpResumeStimulus, installPreInitRingSink, isTerminalFlowStatus, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadSession, loadSessionById, mcpAuthSecretKey, newSession, pickRepointedManager, planFlowMutate, reconcilePendingDecisions, registerActiveFlow, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveFlowMutateConnectorWaitMs, resolveMixin, runAgentChat, saveSession, setCurrentSession, setUpFlowConnector, startAgentServer, stimulusFromMetas, touchSession, validateInputResponse, writeClaudeCodeCredentialsFile } from '../chunk-NWFZUQPF.js';
2
- import '../chunk-PTAUN5CY.js';
1
+ export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, DEFAULT_FLOW_MUTATE_CONNECTOR_WAIT_MS, MOUNT_LIST_MAX_DEPTH, MOUNT_LIST_MAX_ENTRIES, MOUNT_READ_DEADLINE_FACTOR, MOUNT_TREE_OP_DEADLINE_FACTOR, MarkdownStreamer, PreInitRingSink, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildConnectorTokenMediator, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, buildStoreSnapshotReplay, builtinCapabilities, capabilityLogInstance, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, connectorRefreshKind, createAgentSession, createFlowConnectorReadiness, createSessionStimulusBus, defineCapability, deleteSession, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureGitConfigInclude, executeConnectorMutate, extractClaudeAiOauthExpiresAt, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, hasNonTerminalFlow, hostOpResumeStimulus, installPreInitRingSink, isTerminalFlowStatus, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadSession, loadSessionById, mcpAuthSecretKey, newSession, pickRepointedManager, planFlowMutate, reconcilePendingDecisions, registerActiveFlow, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveFlowMutateConnectorWaitMs, resolveMixin, runAgentChat, saveSession, setCurrentSession, setUpFlowConnector, startAgentServer, stimulusFromMetas, touchSession, validateInputResponse, writeClaudeCodeCredentialsFile } from '../chunk-RRCNMURJ.js';
2
+ import '../chunk-33GWB3RB.js';
3
3
  import '../chunk-X5YPJV4N.js';
4
4
  export { assembleSystemPrompt, buildCapabilitiesPromptSection, buildLinkedPeersPromptSection } from '../chunk-W3UDISS2.js';
5
5
  import '../chunk-O7SG5PC2.js';
@@ -7,12 +7,12 @@ import '../chunk-7QBNJTTQ.js';
7
7
  import '../chunk-GTS2FODO.js';
8
8
  import '../chunk-WQ7DE5UC.js';
9
9
  import '../chunk-32NA4TVC.js';
10
- import '../chunk-BKUANJB7.js';
10
+ import '../chunk-BOH6AG6Q.js';
11
11
  import '../chunk-4R6DROGN.js';
12
12
  import '../chunk-CZZRDYT4.js';
13
13
  import '../chunk-BEAIJRVF.js';
14
14
  import '../chunk-HNBWU5RA.js';
15
- import '../chunk-BEA7RXI3.js';
15
+ import '../chunk-E5S2WGTS.js';
16
16
  import '../chunk-ZNIHTT22.js';
17
17
  import '../chunk-KPZZI2KG.js';
18
18
  import '../chunk-46LE3GNY.js';
@@ -22,10 +22,10 @@ import '../chunk-GAH4YRCI.js';
22
22
  import '../chunk-VT6HDD2L.js';
23
23
  import '../chunk-6E6PKKAD.js';
24
24
  import '../chunk-IFGTRL2I.js';
25
- import '../chunk-I7S6DFRU.js';
25
+ import '../chunk-5FLEP4X6.js';
26
26
  import '../chunk-B4J6TV4G.js';
27
- import '../chunk-FLBDLF3I.js';
28
- import '../chunk-F5VREBV2.js';
27
+ import '../chunk-HGFKNJA5.js';
28
+ import '../chunk-ELPR5XBG.js';
29
29
  import '../chunk-D4VHBAJC.js';
30
30
  export { globalSettingsPath, loadSettings, mapLegacyFields, projectSettingsPath, resolveSettings, saveSettings } from '../chunk-P43HBWKK.js';
31
31
  import '../chunk-F3HNW354.js';
@@ -1,4 +1,4 @@
1
- export { AssetManager, FACTORY_SOURCE_URL, MissingManifestError, NON_DEPLOYABLE_KINDS, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, renderMcpServerConfig, softDepName } from '../chunk-HCNVX34E.js';
1
+ export { AssetManager, FACTORY_SOURCE_URL, MissingManifestError, NON_DEPLOYABLE_KINDS, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, renderMcpServerConfig, softDepName } from '../chunk-OD3ABXUO.js';
2
2
  import '../chunk-3HVASHBF.js';
3
3
  import '../chunk-NU4E7C5I.js';
4
4
  import '../chunk-UKJMQZV6.js';
package/dist/sdk/flow.js CHANGED
@@ -1,6 +1,6 @@
1
- export { FLOW_FILE_EXTENSIONS, FlowManifestSchema, appendAttempt, buildFlowExpressionContext, computeFlowState, computeFlowStateFromSnapshots, computeSkippable, countFailedAttempts, deriveCheckEvidence, flowFileCandidates, flowKindProvider, getConsumedOutputSchema, hasAutomaticRetryBudget, interpolateNodeInstruction, isActiveExecutionExpired, isBlocking, loadAllFlowEntries, loadAllFlows, loadFlow, loadFlowEntriesFromDir, loadFlowsFromDir, nextAttemptNumber, producerOutputObtainedBy, remainingActiveExecutionMs, resolveAvailableRouter, resolveNextNodes, resolveNodeBindings, resolveTerminalFailureStatus, validateConsumedNodeOutput, validateFlow } from '../chunk-I7S6DFRU.js';
1
+ export { FLOW_FILE_EXTENSIONS, FlowManifestSchema, appendAttempt, buildFlowExpressionContext, computeFlowState, computeFlowStateFromSnapshots, computeSkippable, countFailedAttempts, deriveCheckEvidence, flowFileCandidates, flowKindProvider, getConsumedOutputSchema, hasAutomaticRetryBudget, interpolateNodeInstruction, isActiveExecutionExpired, isBlocking, loadAllFlowEntries, loadAllFlows, loadFlow, loadFlowEntriesFromDir, loadFlowsFromDir, nextAttemptNumber, producerOutputObtainedBy, remainingActiveExecutionMs, resolveAvailableRouter, resolveNextNodes, resolveNodeBindings, resolveTerminalFailureStatus, validateConsumedNodeOutput, validateFlow } from '../chunk-5FLEP4X6.js';
2
2
  import '../chunk-B4J6TV4G.js';
3
- import '../chunk-F5VREBV2.js';
3
+ export { deterministicNodeKindLabel, flowDefaults, flowSkillVersionPins, isActiveRuntimeNode, isAgentNode, isCheckNode, isExecutableNode, isFunctionNode, isGateNode, isRouterNode, isSubFlowNode, isSubpromptNode, nodeAssets, nodeBindings, nodeInstruction, nodeIsInert, nodeIsOptional, nodeLabel, nodeRequiresApproval, nodeRunKind, nodeSkillAsset, nodeSkillId, nodeSkillVersionPins } from '../chunk-ELPR5XBG.js';
4
4
  import '../chunk-P43HBWKK.js';
5
5
  import '../chunk-F3HNW354.js';
6
6
  import '../chunk-K5GBV4SA.js';
package/dist/sdk/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AgentClient } from '../chunk-AL6BU3SP.js';
2
- import { startAgentServer } from '../chunk-NWFZUQPF.js';
3
- import '../chunk-PTAUN5CY.js';
2
+ import { startAgentServer } from '../chunk-RRCNMURJ.js';
3
+ import '../chunk-33GWB3RB.js';
4
4
  import '../chunk-X5YPJV4N.js';
5
5
  import '../chunk-W3UDISS2.js';
6
6
  import '../chunk-O7SG5PC2.js';
@@ -8,12 +8,12 @@ import '../chunk-7QBNJTTQ.js';
8
8
  import { WebSocketClientTransport } from '../chunk-GTS2FODO.js';
9
9
  import '../chunk-WQ7DE5UC.js';
10
10
  import '../chunk-32NA4TVC.js';
11
- import '../chunk-BKUANJB7.js';
11
+ import '../chunk-BOH6AG6Q.js';
12
12
  import '../chunk-4R6DROGN.js';
13
13
  import '../chunk-CZZRDYT4.js';
14
14
  import '../chunk-BEAIJRVF.js';
15
15
  import '../chunk-HNBWU5RA.js';
16
- import '../chunk-BEA7RXI3.js';
16
+ import '../chunk-E5S2WGTS.js';
17
17
  import '../chunk-ZNIHTT22.js';
18
18
  import '../chunk-KPZZI2KG.js';
19
19
  import '../chunk-46LE3GNY.js';
@@ -23,10 +23,10 @@ import '../chunk-GAH4YRCI.js';
23
23
  import '../chunk-VT6HDD2L.js';
24
24
  import '../chunk-6E6PKKAD.js';
25
25
  import '../chunk-IFGTRL2I.js';
26
- import '../chunk-I7S6DFRU.js';
26
+ import '../chunk-5FLEP4X6.js';
27
27
  import '../chunk-B4J6TV4G.js';
28
- import '../chunk-FLBDLF3I.js';
29
- import '../chunk-F5VREBV2.js';
28
+ import '../chunk-HGFKNJA5.js';
29
+ import '../chunk-ELPR5XBG.js';
30
30
  import '../chunk-D4VHBAJC.js';
31
31
  import '../chunk-P43HBWKK.js';
32
32
  import '../chunk-F3HNW354.js';
@@ -1,5 +1,5 @@
1
- export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, DEFAULT_FLOW_MUTATE_CONNECTOR_WAIT_MS, MOUNT_LIST_MAX_DEPTH, MOUNT_LIST_MAX_ENTRIES, MOUNT_READ_DEADLINE_FACTOR, MOUNT_TREE_OP_DEADLINE_FACTOR, MarkdownStreamer, PreInitRingSink, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildConnectorTokenMediator, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, buildStoreSnapshotReplay, builtinCapabilities, capabilityLogInstance, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, connectorRefreshKind, createAgentSession, createFlowConnectorReadiness, createSessionStimulusBus, defineCapability, deleteSession, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureGitConfigInclude, executeConnectorMutate, extractClaudeAiOauthExpiresAt, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, hasNonTerminalFlow, hostOpResumeStimulus, installPreInitRingSink, isTerminalFlowStatus, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadSession, loadSessionById, mcpAuthSecretKey, newSession, pickRepointedManager, planFlowMutate, reconcilePendingDecisions, registerActiveFlow, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveFlowMutateConnectorWaitMs, resolveMixin, runAgentChat, saveSession, setCurrentSession, setUpFlowConnector, startAgentServer, stimulusFromMetas, touchSession, validateInputResponse, writeClaudeCodeCredentialsFile } from '../chunk-NWFZUQPF.js';
2
- import '../chunk-PTAUN5CY.js';
1
+ export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, DEFAULT_FLOW_MUTATE_CONNECTOR_WAIT_MS, MOUNT_LIST_MAX_DEPTH, MOUNT_LIST_MAX_ENTRIES, MOUNT_READ_DEADLINE_FACTOR, MOUNT_TREE_OP_DEADLINE_FACTOR, MarkdownStreamer, PreInitRingSink, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildConnectorTokenMediator, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, buildStoreSnapshotReplay, builtinCapabilities, capabilityLogInstance, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, connectorRefreshKind, createAgentSession, createFlowConnectorReadiness, createSessionStimulusBus, defineCapability, deleteSession, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureGitConfigInclude, executeConnectorMutate, extractClaudeAiOauthExpiresAt, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, hasNonTerminalFlow, hostOpResumeStimulus, installPreInitRingSink, isTerminalFlowStatus, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadSession, loadSessionById, mcpAuthSecretKey, newSession, pickRepointedManager, planFlowMutate, reconcilePendingDecisions, registerActiveFlow, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveFlowMutateConnectorWaitMs, resolveMixin, runAgentChat, saveSession, setCurrentSession, setUpFlowConnector, startAgentServer, stimulusFromMetas, touchSession, validateInputResponse, writeClaudeCodeCredentialsFile } from '../chunk-RRCNMURJ.js';
2
+ import '../chunk-33GWB3RB.js';
3
3
  import '../chunk-X5YPJV4N.js';
4
4
  export { assembleSystemPrompt, buildCapabilitiesPromptSection, buildLinkedPeersPromptSection } from '../chunk-W3UDISS2.js';
5
5
  import '../chunk-O7SG5PC2.js';
@@ -7,12 +7,12 @@ import '../chunk-7QBNJTTQ.js';
7
7
  import '../chunk-GTS2FODO.js';
8
8
  import '../chunk-WQ7DE5UC.js';
9
9
  import '../chunk-32NA4TVC.js';
10
- import '../chunk-BKUANJB7.js';
10
+ import '../chunk-BOH6AG6Q.js';
11
11
  import '../chunk-4R6DROGN.js';
12
12
  import '../chunk-CZZRDYT4.js';
13
13
  import '../chunk-BEAIJRVF.js';
14
14
  import '../chunk-HNBWU5RA.js';
15
- import '../chunk-BEA7RXI3.js';
15
+ import '../chunk-E5S2WGTS.js';
16
16
  import '../chunk-ZNIHTT22.js';
17
17
  import '../chunk-KPZZI2KG.js';
18
18
  import '../chunk-46LE3GNY.js';
@@ -22,10 +22,10 @@ import '../chunk-GAH4YRCI.js';
22
22
  import '../chunk-VT6HDD2L.js';
23
23
  import '../chunk-6E6PKKAD.js';
24
24
  import '../chunk-IFGTRL2I.js';
25
- import '../chunk-I7S6DFRU.js';
25
+ import '../chunk-5FLEP4X6.js';
26
26
  import '../chunk-B4J6TV4G.js';
27
- import '../chunk-FLBDLF3I.js';
28
- import '../chunk-F5VREBV2.js';
27
+ import '../chunk-HGFKNJA5.js';
28
+ import '../chunk-ELPR5XBG.js';
29
29
  import '../chunk-D4VHBAJC.js';
30
30
  export { globalSettingsPath, loadSettings, mapLegacyFields, projectSettingsPath, resolveSettings, saveSettings } from '../chunk-P43HBWKK.js';
31
31
  import '../chunk-F3HNW354.js';
@@ -1,10 +1,10 @@
1
- export { autoSyncForSearch, ensureClone, findCacheKeyCollision, indexingHadFailures, legacySourceConfigHint, makeSourceCommand, normalizeSourceUrl, readProjectSources, sourceClonePath, sourceMatchesKey, syncProjectSources } from './chunk-NLZYBWVH.js';
2
- import './chunk-CH3UTJBT.js';
3
- import './chunk-XVIFPGYH.js';
4
- import './chunk-I7S6DFRU.js';
1
+ export { autoSyncForSearch, ensureClone, findCacheKeyCollision, indexingHadFailures, legacySourceConfigHint, makeSourceCommand, normalizeSourceUrl, readProjectSources, sourceClonePath, sourceMatchesKey, syncProjectSources } from './chunk-S6GKHEMN.js';
2
+ import './chunk-MJ77WSJC.js';
3
+ import './chunk-3KEJ2HJY.js';
4
+ import './chunk-5FLEP4X6.js';
5
5
  import './chunk-B4J6TV4G.js';
6
- import './chunk-F5VREBV2.js';
7
- import './chunk-HCNVX34E.js';
6
+ import './chunk-ELPR5XBG.js';
7
+ import './chunk-OD3ABXUO.js';
8
8
  import './chunk-3HVASHBF.js';
9
9
  import './chunk-NU4E7C5I.js';
10
10
  import './chunk-UKJMQZV6.js';
@@ -29,5 +29,5 @@ import './chunk-UQ6LFBPZ.js';
29
29
  import './chunk-IEX5YV4R.js';
30
30
  import './chunk-IRORTHGA.js';
31
31
  import './chunk-NSBPE2FW.js';
32
- //# sourceMappingURL=source-TJ457ZRQ.js.map
33
- //# sourceMappingURL=source-TJ457ZRQ.js.map
32
+ //# sourceMappingURL=source-7BNREKGK.js.map
33
+ //# sourceMappingURL=source-7BNREKGK.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"source-TJ457ZRQ.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"source-7BNREKGK.js"}
@@ -1,12 +1,12 @@
1
- import { makeHttpPublisherClient, refFor, publishToStore, bareName } from './chunk-DNYE3SSL.js';
2
- import { sourceClonePath, resolveSourceArg } from './chunk-NLZYBWVH.js';
1
+ import { makeHttpPublisherClient, refFor, publishToStore, bareName } from './chunk-PRKLFKNC.js';
2
+ import { sourceClonePath, resolveSourceArg } from './chunk-S6GKHEMN.js';
3
3
  import { isStoreAuthenticated } from './chunk-AM5LFRXJ.js';
4
- import './chunk-CH3UTJBT.js';
5
- import { logErr, S, logInfo, logOk, logWarn } from './chunk-XVIFPGYH.js';
6
- import './chunk-I7S6DFRU.js';
4
+ import './chunk-MJ77WSJC.js';
5
+ import { logErr, S, logInfo, logOk, logWarn } from './chunk-3KEJ2HJY.js';
6
+ import './chunk-5FLEP4X6.js';
7
7
  import './chunk-B4J6TV4G.js';
8
- import './chunk-F5VREBV2.js';
9
- import './chunk-HCNVX34E.js';
8
+ import './chunk-ELPR5XBG.js';
9
+ import './chunk-OD3ABXUO.js';
10
10
  import './chunk-3HVASHBF.js';
11
11
  import './chunk-NU4E7C5I.js';
12
12
  import './chunk-UKJMQZV6.js';
@@ -229,5 +229,5 @@ async function runYank(arg, opts, client) {
229
229
  }
230
230
 
231
231
  export { getSidecarRepo, normalizePublishedManifest, pushSidecarManifest, runPublish, runYank, saveSidecarRepo };
232
- //# sourceMappingURL=source-manifest-publish-R3Q4MT5W.js.map
233
- //# sourceMappingURL=source-manifest-publish-R3Q4MT5W.js.map
232
+ //# sourceMappingURL=source-manifest-publish-JGMHNADH.js.map
233
+ //# sourceMappingURL=source-manifest-publish-JGMHNADH.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../cli/src/commands/source-manifest-publish.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,IAAM,yBAAA,GAA4B,sBAAA;AAW3B,SAAS,0BAAA,CACd,UACA,SAAA,EACmB;AACnB,EAAA,MAAM,UAAU,QAAA,CAAS,MAAA,IAAU,EAAC,EAAG,GAAA,CAAI,CAAC,CAAA,KAAM;AAChD,IAAA,MAAM,EAAE,SAAA,EAAW,KAAA,EAAO,GAAG,MAAK,GAAI,CAAA;AACtC,IAAA,OAAO,IAAA;AAAA,EACT,CAAC,CAAA;AACD,EAAA,OAAO,EAAE,GAAG,QAAA,EAAU,SAAA,EAAW,WAAW,MAAA,EAAO;AACrD;AAWA,SAAS,YAAA,GAAuB;AAC9B,EAAA,MAAM,OAAO,O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EAAY;AAC1B,IAAA,IAAI;AACF,MAAA,MAAM,GAAA,CAAI,cAAA,CAAe,CAAA,CAAE,EAAE,CAAA;AAC7B,MAAA,MAAA,CAAO,KAAK,CAAA,EAAG,CAAA,CAAE,IAAI,CAAA,CAAA,EAAI,CAAA,CAAE,IAAI,CAAA,CAAE,CAAA;AAAA,IACnC,SAAS,GAAA,EAAK;AACZ,MAAA,OAAA;AAAA,QACE,CAAA,eAAA,EAAkB,CAAA,CAAE,IAAI,CAAA,CAAA,EAAI,CAAA,CAAE,IAAI,CAAA,EAAA,EAAK,GAAA,YAAe,KAAA,GAAQ,GAAA,CAAI,OAAA,GAAU,MAAA,CAAO,GAAG,CAAC,CAAA;AAAA,OACzF;AAAA,IACF;AAAA,EACF;AAEA,EAAA,KAAA,CAAM,CAAA,OAAA,EAAU,MAAA,CAAO,MAAM,CAAA,UAAA,CAAY,CAAA;AACzC,EAAA,KAAA,MAAW,CAAA,IAAK,MAAA,EAAQ,OAAA,CAAQ,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAA;AAC1C","file":"source-manifest-publish-R3Q4MT5W.js","sourcesContent":["/**\n * `skaile source manifest publish` / `yank` — the curator-publish flow. Takes a\n * locally-curated sidecar manifest (over a foreign public GitHub repo) and:\n *\n * 1. Pushes the curated `skaile.manifest.yaml` to the curator's OWN public\n * \"sidecar\" repo (bytes stay in the foreign source; the sidecar holds only\n * the manifest pointing at it).\n * 2. Registers the foreign source + the sidecar (url + pinned commit) with the\n * store, syncs it, and publishes each curated asset.\n *\n * `yank` is the inverse: unpublish each currently-published asset of the source.\n *\n * The store REST surface is reached through the injectable {@link PublisherClient}\n * (default HTTP client); git side-effects go through an injectable `spawn`. Both\n * seams keep the pure helpers + orchestration unit/integration-testable without a\n * live store or a real remote.\n *\n * @docLink cli/commands/source#manifest-publish\n */\n\nimport { spawnSync } from \"node:child_process\";\nimport { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { dirname, join } from \"node:path\";\nimport {\n decodeSkaileManifest,\n encodeSkaileManifest,\n type SkPublishManifest,\n sourceCacheKey,\n} from \"@skaile/workspaces/core\";\nimport { logErr, logInfo, logOk, logWarn, S } from \"../helpers.ts\";\nimport { makeHttpPublisherClient, type PublisherClient } from \"../store-publisher.ts\";\nimport { isStoreAuthenticated } from \"../store-client.ts\";\nimport { bareName, publishToStore, refFor } from \"./publish-core.ts\";\nimport { sourceClonePath } from \"./source.ts\";\nimport { resolveSourceArg } from \"./source-manifest.ts\";\n\n/** The fixed filename a sidecar repo carries at its root. */\nconst SIDECAR_MANIFEST_FILENAME = \"skaile.manifest.yaml\";\n\n/** Injectable spawn contract — the subset of `spawnSync` these helpers use. */\ntype SpawnLike = typeof spawnSync;\n\n/**\n * Return a copy of `manifest` normalized for publication under `namespace`:\n * the top-level `publisher` is set to `namespace` and every per-asset\n * `publisher` override is removed so all assets inherit the top-level one.\n * Pure — the input is not mutated.\n */\nexport function normalizePublishedManifest(\n manifest: SkPublishManifest,\n namespace: string,\n): SkPublishManifest {\n const assets = (manifest.assets ?? []).map((a) => {\n const { publisher: _drop, ...rest } = a;\n return rest;\n });\n return { ...manifest, publisher: namespace, assets };\n}\n\n// ── Sidecar-repo association (~/.skaile/settings.json) ────────────────────────\n\n/**\n * Path to the user settings file — the same `~/.skaile/settings.json` the store\n * client reads tokens from. Resolves the `.skaile` root exactly as `getStoreRoot`\n * does (`SKAILE_HOME` when set — it IS the `.skaile` dir — else `~/.skaile`), so\n * the sidecar association lives beside the store manifests under one convention\n * and tests isolate through the same `SKAILE_HOME` seam.\n */\nfunction settingsFile(): string {\n const root = process.env.SKAILE_HOME ?? join(homedir(), \".skaile\");\n return join(root, \"settings.json\");\n}\n\nfunction readSettings(): Record<string, any> {\n const file = settingsFile();\n if (!existsSync(file)) return {};\n try {\n return JSON.parse(readFileSync(file, \"utf-8\"));\n } catch {\n return {};\n }\n}\n\n/**\n * The sidecar repo URL previously associated with a source `slug`, if any.\n * Reads `settings.sidecarRepos?.[slug]?.repo`.\n */\nexport function getSidecarRepo(slug: string): string | undefined {\n const settings = readSettings();\n return settings.sidecarRepos?.[slug]?.repo;\n}\n\n/**\n * Persist the sidecar repo URL for a source `slug`, preserving every other\n * settings key. Stored as an object (`{ repo }`) so a `path` (or other fields)\n * can be added later without a schema migration.\n */\nexport function saveSidecarRepo(slug: string, repo: string): void {\n const file = settingsFile();\n mkdirSync(dirname(file), { recursive: true });\n const settings = readSettings();\n const sidecarRepos = { ...(settings.sidecarRepos ?? {}) };\n sidecarRepos[slug] = { ...(sidecarRepos[slug] ?? {}), repo };\n settings.sidecarRepos = sidecarRepos;\n writeFileSync(file, JSON.stringify(settings, null, 2), \"utf-8\");\n}\n\n// ── Sidecar push ──────────────────────────────────────────────────────────────\n\n/**\n * Run a git command in `cwd` via the injected spawn, throwing with the captured\n * stderr on failure. Returns trimmed stdout.\n */\nfunction git(spawn: SpawnLike, cwd: string, args: string[]): string {\n const res = spawn(\"git\", [\"-C\", cwd, ...args], { encoding: \"utf-8\" });\n if (res.status !== 0) {\n const stderr = (res.stderr ?? \"\").toString().trim();\n throw new Error(`git ${args.join(\" \")} failed: ${stderr || `exit ${res.status}`}`);\n }\n return (res.stdout ?? \"\").toString().trim();\n}\n\n/**\n * Clone the curator's sidecar repo, write the curated manifest at its root, and\n * commit + push. Returns the pushed commit sha (used to pin the store source).\n *\n * Idempotent re-publish: when the manifest is unchanged `git commit` fails with\n * \"nothing to commit\" — we swallow that and return the current HEAD so a no-op\n * re-run still yields a valid pin. Any push/auth failure surfaces as a thrown\n * Error carrying git's stderr.\n */\nexport function pushSidecarManifest(opts: {\n sidecarRepoUrl: string;\n manifestText: string;\n spawn?: SpawnLike;\n}): { commitSha: string } {\n const spawn = opts.spawn ?? spawnSync;\n // Dedicated dir next to the source clone cache; wipe any stale clone first so\n // a re-publish always starts from a clean shallow checkout of the remote.\n const cloneDir = `${sourceClonePath(sourceCacheKey(opts.sidecarRepoUrl))}-sidecar-push`;\n rmSync(cloneDir, { recursive: true, force: true });\n mkdirSync(dirname(cloneDir), { recursive: true });\n\n // The clone is scratch — always remove it afterwards (success or failure) so a\n // failed push never leaves a stale checkout in the cache dir.\n try {\n const cloneRes = spawn(\"git\", [\"clone\", \"--depth\", \"1\", opts.sidecarRepoUrl, cloneDir], {\n encoding: \"utf-8\",\n });\n if (cloneRes.status !== 0) {\n const stderr = (cloneRes.stderr ?? \"\").toString().trim();\n throw new Error(\n `git clone ${opts.sidecarRepoUrl} failed: ${stderr || `exit ${cloneRes.status}`}`,\n );\n }\n\n writeFileSync(join(cloneDir, SIDECAR_MANIFEST_FILENAME), opts.manifestText, \"utf-8\");\n git(spawn, cloneDir, [\"add\", SIDECAR_MANIFEST_FILENAME]);\n\n // Fixed bot identity via -c so the commit succeeds regardless of the curator's\n // git config (the sidecar push is a machine action, not authored work).\n const commitRes = spawn(\n \"git\",\n [\n \"-C\",\n cloneDir,\n \"-c\",\n \"user.email=publish@skaile.store\",\n \"-c\",\n \"user.name=skaile\",\n \"commit\",\n \"-m\",\n \"chore(sidecar): publish curated manifest\",\n ],\n { encoding: \"utf-8\" },\n );\n if (commitRes.status !== 0) {\n const out = `${commitRes.stdout ?? \"\"}${commitRes.stderr ?? \"\"}`;\n // Nothing changed → idempotent re-publish; keep the existing HEAD.\n if (!/nothing to commit/i.test(out)) {\n throw new Error(`git commit failed: ${out.trim() || `exit ${commitRes.status}`}`);\n }\n } else {\n // `push origin HEAD` (not a bare `push`) so a fresh sidecar repo with an\n // unborn/renamed default branch still gets its branch created on the remote.\n git(spawn, cloneDir, [\"push\", \"origin\", \"HEAD\"]);\n }\n\n return { commitSha: git(spawn, cloneDir, [\"rev-parse\", \"HEAD\"]) };\n } finally {\n rmSync(cloneDir, { recursive: true, force: true });\n }\n}\n\n// ── Orchestration ───────────────────────────────────────────────────────────\n\n/**\n * `source manifest publish <src>` — publish a curated sidecar manifest to the\n * store. See the module header for the full flow. Store calls go through\n * `client` (default HTTP); git side-effects through `spawn` (default\n * `spawnSync`). The auth gate is enforced only for the default HTTP client so\n * injected fakes bypass it.\n */\nexport async function runPublish(\n arg: string,\n opts: {\n projectDir: string;\n as?: string;\n sidecarRepo?: string;\n ref?: string;\n dryRun?: boolean;\n },\n client?: PublisherClient,\n spawn: SpawnLike = spawnSync,\n): Promise<void> {\n const injected = client !== undefined;\n const pub = client ?? makeHttpPublisherClient();\n\n const { url, slug, manifestFile } = resolveSourceArg(arg, opts.projectDir);\n\n if (!existsSync(manifestFile)) {\n logErr(\n `No curated manifest for \"${slug}\" at ${S.dim(manifestFile)} — ` +\n \"run `skaile source manifest init` first.\",\n );\n process.exit(1);\n }\n\n const { manifest, diagnostics } = decodeSkaileManifest(readFileSync(manifestFile, \"utf-8\"));\n if (diagnostics.some((d) => d.severity === \"error\")) {\n for (const d of diagnostics.filter((x) => x.severity === \"error\")) {\n logErr(`${d.code}: ${d.message}`);\n }\n logErr(\n \"The curated manifest has errors — fix them with `skaile source manifest edit` / \" +\n \"`verify` before publishing.\",\n );\n process.exit(1);\n }\n\n // A real publish makes store calls (+ `me()` when `--as` is omitted), so it\n // needs a token. `--dry-run` is an offline preview: never gate it on auth.\n const authed = injected || isStoreAuthenticated();\n if (!opts.dryRun && !authed) {\n logErr(\"Not signed in — run `skaile store login` first.\");\n process.exit(1);\n }\n\n // Namespace: `--as` wins; else the caller's verified identity. Prefer the\n // GitHub handle (`githubLogin`) over the store login (`username`) — for a user\n // whose login differs from their GitHub handle the login namespace may be\n // reserved (matches the CLI's `resolveLibraryPublisher` precedence). In an\n // unauthenticated dry-run we cannot call `me()`, so show a placeholder.\n let namespace: string;\n if (opts.as) namespace = opts.as;\n else if (authed) {\n const me = await pub.me();\n // `||` not `??`: an empty-string githubLogin (partially-connected account) is\n // not a usable namespace — fall back to the login rather than publish under \"\".\n namespace = me.githubLogin || me.username;\n } else namespace = \"<your store username>\";\n\n const normalized = normalizePublishedManifest(manifest, namespace);\n const publishedText = encodeSkaileManifest(normalized);\n\n const wouldBeRefs = (normalized.assets ?? []).map((a) =>\n refFor(a.kind, namespace, a.name, a.version ?? normalized.version),\n );\n\n if (opts.dryRun) {\n const sidecar = opts.sidecarRepo ?? getSidecarRepo(slug) ?? \"<none — pass --sidecar-repo>\";\n logInfo(`Publish plan for ${S.bold(slug)}:`);\n logInfo(` namespace: ${namespace}`);\n logInfo(` sidecar repo: ${sidecar}`);\n logInfo(` source ref: ${opts.ref ?? \"main\"}`);\n logInfo(` would publish ${wouldBeRefs.length} asset(s):`);\n for (const r of wouldBeRefs) logInfo(` ${r}`);\n return;\n }\n\n const sidecarRepoUrl = opts.sidecarRepo ?? getSidecarRepo(slug);\n if (!sidecarRepoUrl) {\n logErr(\n \"No sidecar repo associated with this source. Pass \" +\n `${S.cmd(\"--sidecar-repo https://github.com/<you>/<repo>\")} — it must be a ` +\n \"PUBLIC GitHub repo you own; the curated manifest is committed there and the \" +\n \"store pins to that commit.\",\n );\n process.exit(1);\n }\n if (opts.sidecarRepo) saveSidecarRepo(slug, sidecarRepoUrl);\n\n const { commitSha } = pushSidecarManifest({ sidecarRepoUrl, manifestText: publishedText, spawn });\n logOk(`Pushed curated manifest to ${S.dim(sidecarRepoUrl)} @ ${commitSha.slice(0, 10)}.`);\n\n // The FOREIGN repo's ref to ingest (branch/sha). Defaults to `main`.\n const sourceRef = opts.ref ?? \"main\";\n\n const { published } = await publishToStore({\n sourceUrl: url,\n ref: sourceRef,\n sidecar: { url: sidecarRepoUrl, ref: commitSha },\n manifest: normalized,\n client: pub,\n });\n\n if (published.length > 0) {\n logInfo(`Consumers can now install them with \\`skaile add ${published[0]}\\`.`);\n }\n}\n\n/**\n * `source manifest yank <src>` — unpublish the source's published assets (all,\n * or the single asset matching `opts.asset`'s name). Auth-gated like publish.\n */\nexport async function runYank(\n arg: string,\n opts: { projectDir: string; asset?: string },\n client?: PublisherClient,\n): Promise<void> {\n const injected = client !== undefined;\n const pub = client ?? makeHttpPublisherClient();\n\n const { url, slug } = resolveSourceArg(arg, opts.projectDir);\n\n if (!injected && !isStoreAuthenticated()) {\n logErr(\"Not signed in — run `skaile store login` first.\");\n process.exit(1);\n }\n\n const rows = await pub.sourcesList();\n const source = rows.find((r) => r.url === url);\n if (!source) {\n logErr(`Source \"${slug}\" is not registered in the store — nothing to yank.`);\n process.exit(1);\n }\n\n // Optionally narrow to a single asset by name (accept a bare name or a ref).\n const targetName = opts.asset ? bareName(opts.asset) : undefined;\n const candidates = (await pub.sourceCandidates(source.id)).filter(\n (c) => c.published && (!targetName || c.name === targetName),\n );\n if (candidates.length === 0) {\n logWarn(\"No published assets matched — nothing to yank.\");\n return;\n }\n\n const yanked: string[] = [];\n for (const c of candidates) {\n try {\n await pub.assetUnpublish(c.id);\n yanked.push(`${c.kind}:${c.name}`);\n } catch (err) {\n logWarn(\n `Failed to yank ${c.kind}:${c.name}: ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n }\n\n logOk(`Yanked ${yanked.length} asset(s):`);\n for (const r of yanked) logInfo(` ${r}`);\n}\n"]}
1
+ {"version":3,"sources":["../cli/src/commands/source-manifest-publish.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,IAAM,yBAAA,GAA4B,sBAAA;AAW3B,SAAS,0BAAA,CACd,UACA,SAAA,EACmB;AACnB,EAAA,MAAM,UAAU,QAAA,CAAS,MAAA,IAAU,EAAC,EAAG,GAAA,CAAI,CAAC,CAAA,KAAM;AAChD,IAAA,MAAM,EAAE,SAAA,EAAW,KAAA,EAAO,GAAG,MAAK,GAAI,CAAA;AACtC,IAAA,OAAO,IAAA;AAAA,EACT,CAAC,CAAA;AACD,EAAA,OAAO,EAAE,GAAG,QAAA,EAAU,SAAA,EAAW,WAAW,MAAA,EAAO;AACrD;AAWA,SAAS,YAAA,GAAuB;AAC9B,EAAA,MAAM,OAAO,OAAA,CAAQ,GAAA,CAAI,eAAe,IAAA,CAAK,OAAA,IAAW,SAAS,CAAA;AACjE,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CAAE,EAAE,CAAA;AAC7B,MAAA,MAAA,CAAO,KAAK,CAAA,EAAG,CAAA,CAAE,IAAI,CAAA,CAAA,EAAI,CAAA,CAAE,IAAI,CAAA,CAAE,CAAA;AAAA,IACnC,SAAS,GAAA,EAAK;AACZ,MAAA,OAAA;AAAA,QACE,CAAA,eAAA,EAAkB,CAAA,CAAE,IAAI,CAAA,CAAA,EAAI,CAAA,CAAE,IAAI,CAAA,EAAA,EAAK,GAAA,YAAe,KAAA,GAAQ,GAAA,CAAI,OAAA,GAAU,MAAA,CAAO,GAAG,CAAC,CAAA;AAAA,OACzF;AAAA,IACF;AAAA,EACF;AAEA,EAAA,KAAA,CAAM,CAAA,OAAA,EAAU,MAAA,CAAO,MAAM,CAAA,UAAA,CAAY,CAAA;AACzC,EAAA,KAAA,MAAW,CAAA,IAAK,MAAA,EAAQ,OAAA,CAAQ,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAA;AAC1C","file":"source-manifest-publish-JGMHNADH.js","sourcesContent":["/**\n * `skaile source manifest publish` / `yank` — the curator-publish flow. Takes a\n * locally-curated sidecar manifest (over a foreign public GitHub repo) and:\n *\n * 1. Pushes the curated `skaile.manifest.yaml` to the curator's OWN public\n * \"sidecar\" repo (bytes stay in the foreign source; the sidecar holds only\n * the manifest pointing at it).\n * 2. Registers the foreign source + the sidecar (url + pinned commit) with the\n * store, syncs it, and publishes each curated asset.\n *\n * `yank` is the inverse: unpublish each currently-published asset of the source.\n *\n * The store REST surface is reached through the injectable {@link PublisherClient}\n * (default HTTP client); git side-effects go through an injectable `spawn`. Both\n * seams keep the pure helpers + orchestration unit/integration-testable without a\n * live store or a real remote.\n *\n * @docLink cli/commands/source#manifest-publish\n */\n\nimport { spawnSync } from \"node:child_process\";\nimport { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { dirname, join } from \"node:path\";\nimport {\n decodeSkaileManifest,\n encodeSkaileManifest,\n type SkPublishManifest,\n sourceCacheKey,\n} from \"@skaile/workspaces/core\";\nimport { logErr, logInfo, logOk, logWarn, S } from \"../helpers.ts\";\nimport { makeHttpPublisherClient, type PublisherClient } from \"../store-publisher.ts\";\nimport { isStoreAuthenticated } from \"../store-client.ts\";\nimport { bareName, publishToStore, refFor } from \"./publish-core.ts\";\nimport { sourceClonePath } from \"./source.ts\";\nimport { resolveSourceArg } from \"./source-manifest.ts\";\n\n/** The fixed filename a sidecar repo carries at its root. */\nconst SIDECAR_MANIFEST_FILENAME = \"skaile.manifest.yaml\";\n\n/** Injectable spawn contract — the subset of `spawnSync` these helpers use. */\ntype SpawnLike = typeof spawnSync;\n\n/**\n * Return a copy of `manifest` normalized for publication under `namespace`:\n * the top-level `publisher` is set to `namespace` and every per-asset\n * `publisher` override is removed so all assets inherit the top-level one.\n * Pure — the input is not mutated.\n */\nexport function normalizePublishedManifest(\n manifest: SkPublishManifest,\n namespace: string,\n): SkPublishManifest {\n const assets = (manifest.assets ?? []).map((a) => {\n const { publisher: _drop, ...rest } = a;\n return rest;\n });\n return { ...manifest, publisher: namespace, assets };\n}\n\n// ── Sidecar-repo association (~/.skaile/settings.json) ────────────────────────\n\n/**\n * Path to the user settings file — the same `~/.skaile/settings.json` the store\n * client reads tokens from. Resolves the `.skaile` root exactly as `getStoreRoot`\n * does (`SKAILE_HOME` when set — it IS the `.skaile` dir — else `~/.skaile`), so\n * the sidecar association lives beside the store manifests under one convention\n * and tests isolate through the same `SKAILE_HOME` seam.\n */\nfunction settingsFile(): string {\n const root = process.env.SKAILE_HOME ?? join(homedir(), \".skaile\");\n return join(root, \"settings.json\");\n}\n\nfunction readSettings(): Record<string, any> {\n const file = settingsFile();\n if (!existsSync(file)) return {};\n try {\n return JSON.parse(readFileSync(file, \"utf-8\"));\n } catch {\n return {};\n }\n}\n\n/**\n * The sidecar repo URL previously associated with a source `slug`, if any.\n * Reads `settings.sidecarRepos?.[slug]?.repo`.\n */\nexport function getSidecarRepo(slug: string): string | undefined {\n const settings = readSettings();\n return settings.sidecarRepos?.[slug]?.repo;\n}\n\n/**\n * Persist the sidecar repo URL for a source `slug`, preserving every other\n * settings key. Stored as an object (`{ repo }`) so a `path` (or other fields)\n * can be added later without a schema migration.\n */\nexport function saveSidecarRepo(slug: string, repo: string): void {\n const file = settingsFile();\n mkdirSync(dirname(file), { recursive: true });\n const settings = readSettings();\n const sidecarRepos = { ...(settings.sidecarRepos ?? {}) };\n sidecarRepos[slug] = { ...(sidecarRepos[slug] ?? {}), repo };\n settings.sidecarRepos = sidecarRepos;\n writeFileSync(file, JSON.stringify(settings, null, 2), \"utf-8\");\n}\n\n// ── Sidecar push ──────────────────────────────────────────────────────────────\n\n/**\n * Run a git command in `cwd` via the injected spawn, throwing with the captured\n * stderr on failure. Returns trimmed stdout.\n */\nfunction git(spawn: SpawnLike, cwd: string, args: string[]): string {\n const res = spawn(\"git\", [\"-C\", cwd, ...args], { encoding: \"utf-8\" });\n if (res.status !== 0) {\n const stderr = (res.stderr ?? \"\").toString().trim();\n throw new Error(`git ${args.join(\" \")} failed: ${stderr || `exit ${res.status}`}`);\n }\n return (res.stdout ?? \"\").toString().trim();\n}\n\n/**\n * Clone the curator's sidecar repo, write the curated manifest at its root, and\n * commit + push. Returns the pushed commit sha (used to pin the store source).\n *\n * Idempotent re-publish: when the manifest is unchanged `git commit` fails with\n * \"nothing to commit\" — we swallow that and return the current HEAD so a no-op\n * re-run still yields a valid pin. Any push/auth failure surfaces as a thrown\n * Error carrying git's stderr.\n */\nexport function pushSidecarManifest(opts: {\n sidecarRepoUrl: string;\n manifestText: string;\n spawn?: SpawnLike;\n}): { commitSha: string } {\n const spawn = opts.spawn ?? spawnSync;\n // Dedicated dir next to the source clone cache; wipe any stale clone first so\n // a re-publish always starts from a clean shallow checkout of the remote.\n const cloneDir = `${sourceClonePath(sourceCacheKey(opts.sidecarRepoUrl))}-sidecar-push`;\n rmSync(cloneDir, { recursive: true, force: true });\n mkdirSync(dirname(cloneDir), { recursive: true });\n\n // The clone is scratch — always remove it afterwards (success or failure) so a\n // failed push never leaves a stale checkout in the cache dir.\n try {\n const cloneRes = spawn(\"git\", [\"clone\", \"--depth\", \"1\", opts.sidecarRepoUrl, cloneDir], {\n encoding: \"utf-8\",\n });\n if (cloneRes.status !== 0) {\n const stderr = (cloneRes.stderr ?? \"\").toString().trim();\n throw new Error(\n `git clone ${opts.sidecarRepoUrl} failed: ${stderr || `exit ${cloneRes.status}`}`,\n );\n }\n\n writeFileSync(join(cloneDir, SIDECAR_MANIFEST_FILENAME), opts.manifestText, \"utf-8\");\n git(spawn, cloneDir, [\"add\", SIDECAR_MANIFEST_FILENAME]);\n\n // Fixed bot identity via -c so the commit succeeds regardless of the curator's\n // git config (the sidecar push is a machine action, not authored work).\n const commitRes = spawn(\n \"git\",\n [\n \"-C\",\n cloneDir,\n \"-c\",\n \"user.email=publish@skaile.store\",\n \"-c\",\n \"user.name=skaile\",\n \"commit\",\n \"-m\",\n \"chore(sidecar): publish curated manifest\",\n ],\n { encoding: \"utf-8\" },\n );\n if (commitRes.status !== 0) {\n const out = `${commitRes.stdout ?? \"\"}${commitRes.stderr ?? \"\"}`;\n // Nothing changed → idempotent re-publish; keep the existing HEAD.\n if (!/nothing to commit/i.test(out)) {\n throw new Error(`git commit failed: ${out.trim() || `exit ${commitRes.status}`}`);\n }\n } else {\n // `push origin HEAD` (not a bare `push`) so a fresh sidecar repo with an\n // unborn/renamed default branch still gets its branch created on the remote.\n git(spawn, cloneDir, [\"push\", \"origin\", \"HEAD\"]);\n }\n\n return { commitSha: git(spawn, cloneDir, [\"rev-parse\", \"HEAD\"]) };\n } finally {\n rmSync(cloneDir, { recursive: true, force: true });\n }\n}\n\n// ── Orchestration ───────────────────────────────────────────────────────────\n\n/**\n * `source manifest publish <src>` — publish a curated sidecar manifest to the\n * store. See the module header for the full flow. Store calls go through\n * `client` (default HTTP); git side-effects through `spawn` (default\n * `spawnSync`). The auth gate is enforced only for the default HTTP client so\n * injected fakes bypass it.\n */\nexport async function runPublish(\n arg: string,\n opts: {\n projectDir: string;\n as?: string;\n sidecarRepo?: string;\n ref?: string;\n dryRun?: boolean;\n },\n client?: PublisherClient,\n spawn: SpawnLike = spawnSync,\n): Promise<void> {\n const injected = client !== undefined;\n const pub = client ?? makeHttpPublisherClient();\n\n const { url, slug, manifestFile } = resolveSourceArg(arg, opts.projectDir);\n\n if (!existsSync(manifestFile)) {\n logErr(\n `No curated manifest for \"${slug}\" at ${S.dim(manifestFile)} — ` +\n \"run `skaile source manifest init` first.\",\n );\n process.exit(1);\n }\n\n const { manifest, diagnostics } = decodeSkaileManifest(readFileSync(manifestFile, \"utf-8\"));\n if (diagnostics.some((d) => d.severity === \"error\")) {\n for (const d of diagnostics.filter((x) => x.severity === \"error\")) {\n logErr(`${d.code}: ${d.message}`);\n }\n logErr(\n \"The curated manifest has errors — fix them with `skaile source manifest edit` / \" +\n \"`verify` before publishing.\",\n );\n process.exit(1);\n }\n\n // A real publish makes store calls (+ `me()` when `--as` is omitted), so it\n // needs a token. `--dry-run` is an offline preview: never gate it on auth.\n const authed = injected || isStoreAuthenticated();\n if (!opts.dryRun && !authed) {\n logErr(\"Not signed in — run `skaile store login` first.\");\n process.exit(1);\n }\n\n // Namespace: `--as` wins; else the caller's verified identity. Prefer the\n // GitHub handle (`githubLogin`) over the store login (`username`) — for a user\n // whose login differs from their GitHub handle the login namespace may be\n // reserved (matches the CLI's `resolveLibraryPublisher` precedence). In an\n // unauthenticated dry-run we cannot call `me()`, so show a placeholder.\n let namespace: string;\n if (opts.as) namespace = opts.as;\n else if (authed) {\n const me = await pub.me();\n // `||` not `??`: an empty-string githubLogin (partially-connected account) is\n // not a usable namespace — fall back to the login rather than publish under \"\".\n namespace = me.githubLogin || me.username;\n } else namespace = \"<your store username>\";\n\n const normalized = normalizePublishedManifest(manifest, namespace);\n const publishedText = encodeSkaileManifest(normalized);\n\n const wouldBeRefs = (normalized.assets ?? []).map((a) =>\n refFor(a.kind, namespace, a.name, a.version ?? normalized.version),\n );\n\n if (opts.dryRun) {\n const sidecar = opts.sidecarRepo ?? getSidecarRepo(slug) ?? \"<none — pass --sidecar-repo>\";\n logInfo(`Publish plan for ${S.bold(slug)}:`);\n logInfo(` namespace: ${namespace}`);\n logInfo(` sidecar repo: ${sidecar}`);\n logInfo(` source ref: ${opts.ref ?? \"main\"}`);\n logInfo(` would publish ${wouldBeRefs.length} asset(s):`);\n for (const r of wouldBeRefs) logInfo(` ${r}`);\n return;\n }\n\n const sidecarRepoUrl = opts.sidecarRepo ?? getSidecarRepo(slug);\n if (!sidecarRepoUrl) {\n logErr(\n \"No sidecar repo associated with this source. Pass \" +\n `${S.cmd(\"--sidecar-repo https://github.com/<you>/<repo>\")} — it must be a ` +\n \"PUBLIC GitHub repo you own; the curated manifest is committed there and the \" +\n \"store pins to that commit.\",\n );\n process.exit(1);\n }\n if (opts.sidecarRepo) saveSidecarRepo(slug, sidecarRepoUrl);\n\n const { commitSha } = pushSidecarManifest({ sidecarRepoUrl, manifestText: publishedText, spawn });\n logOk(`Pushed curated manifest to ${S.dim(sidecarRepoUrl)} @ ${commitSha.slice(0, 10)}.`);\n\n // The FOREIGN repo's ref to ingest (branch/sha). Defaults to `main`.\n const sourceRef = opts.ref ?? \"main\";\n\n const { published } = await publishToStore({\n sourceUrl: url,\n ref: sourceRef,\n sidecar: { url: sidecarRepoUrl, ref: commitSha },\n manifest: normalized,\n client: pub,\n });\n\n if (published.length > 0) {\n logInfo(`Consumers can now install them with \\`skaile add ${published[0]}\\`.`);\n }\n}\n\n/**\n * `source manifest yank <src>` — unpublish the source's published assets (all,\n * or the single asset matching `opts.asset`'s name). Auth-gated like publish.\n */\nexport async function runYank(\n arg: string,\n opts: { projectDir: string; asset?: string },\n client?: PublisherClient,\n): Promise<void> {\n const injected = client !== undefined;\n const pub = client ?? makeHttpPublisherClient();\n\n const { url, slug } = resolveSourceArg(arg, opts.projectDir);\n\n if (!injected && !isStoreAuthenticated()) {\n logErr(\"Not signed in — run `skaile store login` first.\");\n process.exit(1);\n }\n\n const rows = await pub.sourcesList();\n const source = rows.find((r) => r.url === url);\n if (!source) {\n logErr(`Source \"${slug}\" is not registered in the store — nothing to yank.`);\n process.exit(1);\n }\n\n // Optionally narrow to a single asset by name (accept a bare name or a ref).\n const targetName = opts.asset ? bareName(opts.asset) : undefined;\n const candidates = (await pub.sourceCandidates(source.id)).filter(\n (c) => c.published && (!targetName || c.name === targetName),\n );\n if (candidates.length === 0) {\n logWarn(\"No published assets matched — nothing to yank.\");\n return;\n }\n\n const yanked: string[] = [];\n for (const c of candidates) {\n try {\n await pub.assetUnpublish(c.id);\n yanked.push(`${c.kind}:${c.name}`);\n } catch (err) {\n logWarn(\n `Failed to yank ${c.kind}:${c.name}: ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n }\n\n logOk(`Yanked ${yanked.length} asset(s):`);\n for (const r of yanked) logInfo(` ${r}`);\n}\n"]}
package/dist/tui/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { createAgentSession } from '../chunk-NWFZUQPF.js';
2
- import '../chunk-PTAUN5CY.js';
1
+ import { createAgentSession } from '../chunk-RRCNMURJ.js';
2
+ import '../chunk-33GWB3RB.js';
3
3
  import '../chunk-X5YPJV4N.js';
4
4
  import '../chunk-W3UDISS2.js';
5
5
  import '../chunk-O7SG5PC2.js';
@@ -7,12 +7,12 @@ import '../chunk-7QBNJTTQ.js';
7
7
  import '../chunk-GTS2FODO.js';
8
8
  import '../chunk-WQ7DE5UC.js';
9
9
  import '../chunk-32NA4TVC.js';
10
- import '../chunk-BKUANJB7.js';
10
+ import '../chunk-BOH6AG6Q.js';
11
11
  import '../chunk-4R6DROGN.js';
12
12
  import '../chunk-CZZRDYT4.js';
13
13
  import '../chunk-BEAIJRVF.js';
14
14
  import '../chunk-HNBWU5RA.js';
15
- import '../chunk-BEA7RXI3.js';
15
+ import '../chunk-E5S2WGTS.js';
16
16
  import { loadConnectorDeclarations } from '../chunk-ZNIHTT22.js';
17
17
  import '../chunk-KPZZI2KG.js';
18
18
  import '../chunk-46LE3GNY.js';
@@ -22,10 +22,10 @@ import '../chunk-GAH4YRCI.js';
22
22
  import '../chunk-VT6HDD2L.js';
23
23
  import '../chunk-6E6PKKAD.js';
24
24
  import '../chunk-IFGTRL2I.js';
25
- import '../chunk-I7S6DFRU.js';
25
+ import '../chunk-5FLEP4X6.js';
26
26
  import '../chunk-B4J6TV4G.js';
27
- import '../chunk-FLBDLF3I.js';
28
- import '../chunk-F5VREBV2.js';
27
+ import '../chunk-HGFKNJA5.js';
28
+ import '../chunk-ELPR5XBG.js';
29
29
  import '../chunk-D4VHBAJC.js';
30
30
  import { resolveSettings } from '../chunk-P43HBWKK.js';
31
31
  import '../chunk-F3HNW354.js';
@@ -1,5 +1,5 @@
1
1
  import { mountList, mountSync, mountStatus, mountRead, connectorList, connectorRead, connectorWrite, connectorSearch, connectorExec, connectorLoadSkill, connectorDescribe } from '../../chunk-26L2B6P6.js';
2
- import { flowList, flowShow, flowListSessions, flowGetSession, flowFindFlowForSession } from '../../chunk-HWEW3VII.js';
2
+ import { flowList, flowShow, flowListSessions, flowGetSession, flowFindFlowForSession } from '../../chunk-4GJLRYMB.js';
3
3
  import { sessionList, sessionGet } from '../../chunk-R6O6YWU7.js';
4
4
  import { skillList, skillListDomains, skillShow, skillSearch, skillCheckRequirements, skillGetPreamble } from '../../chunk-MWFYXUFK.js';
5
5
  import '../../chunk-BK3WL3QK.js';
@@ -74,7 +74,7 @@ function buildOmpToolSet(plugin) {
74
74
  description: "List all available flow definitions from ai-assets.",
75
75
  parameters: {},
76
76
  handler: async () => {
77
- const { flowList } = await import('../../flows-PBNW6BEH.js');
77
+ const { flowList } = await import('../../flows-7CZKSC64.js');
78
78
  return (await flowList(plugin.projectDir)).content[0].text;
79
79
  }
80
80
  },
@@ -83,7 +83,7 @@ function buildOmpToolSet(plugin) {
83
83
  description: "List past flow run sessions for this workspace.",
84
84
  parameters: {},
85
85
  handler: async () => {
86
- const { flowListSessions } = await import('../../flows-PBNW6BEH.js');
86
+ const { flowListSessions } = await import('../../flows-7CZKSC64.js');
87
87
  return (await flowListSessions(plugin.projectDir)).content[0].text;
88
88
  }
89
89
  },
@@ -201,7 +201,7 @@ async function handleSlashCommand(plugin, group, args) {
201
201
  }
202
202
  }
203
203
  async function handleFlowCommand(plugin, sub, rest) {
204
- const { flowList, flowShow, flowListSessions, flowGetSession } = await import('../../flows-PBNW6BEH.js');
204
+ const { flowList, flowShow, flowListSessions, flowGetSession } = await import('../../flows-7CZKSC64.js');
205
205
  if (!sub || sub === "list") return (await flowList(plugin.projectDir)).content[0].text;
206
206
  if (sub === "show" && rest[0])
207
207
  return (await flowShow(plugin.projectDir, rest[0])).content[0].text;
@@ -1,4 +1,4 @@
1
- export { PluginStore, WorkspacePlugin, buildClaudePluginFiles, resolveProjectDir } from '../chunk-PTAUN5CY.js';
1
+ export { PluginStore, WorkspacePlugin, buildClaudePluginFiles, resolveProjectDir } from '../chunk-33GWB3RB.js';
2
2
  export { err, ok, okJson } from '../chunk-X5YPJV4N.js';
3
3
  import '../chunk-U5POE4BA.js';
4
4
  import '../chunk-7GOCNYUV.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skaile/workspaces",
3
- "version": "3.2.1",
3
+ "version": "3.3.0",
4
4
  "description": "Skaile workspaces runtime — types, core, bridge, runner, store, connectors, and supporting layers as one publishable package",
5
5
  "type": "module",
6
6
  "packageManager": "bun@1.3.9",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../cli/src/paths.ts"],"names":[],"mappings":";;;;;;;AAOA,IAAM,WAAW,IAAA,CAAK,OAAA,CAAQ,aAAA,CAAc,MAAA,CAAA,IAAA,CAAY,GAAG,CAAC,CAAA;AAW5D,SAAS,iBAAiB,IAAA,EAA6B;AACrD,EAAA,IAAI,GAAA,GAAM,IAAA;AACV,EAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,CAAA,EAAG,CAAA,EAAA,EAAK;AAC1B,IAAA,IAAI,EAAA,CAAG,WAAW,IAAA,CAAK,IAAA,CAAK,KAAK,YAAY,CAAC,GAAG,OAAO,GAAA;AACxD,IAAA,MAAM,MAAA,GAAS,IAAA,CAAK,OAAA,CAAQ,GAAG,CAAA;AAC/B,IAAA,IAAI,WAAW,GAAA,EAAK;AACpB,IAAA,GAAA,GAAM,MAAA;AAAA,EACR;AACA,EAAA,OAAO,IAAA;AACT;AAYO,IAAM,aAAA,GAA+B,iBAAiB,QAAQ;AAc9D,IAAM,YAAA,GACX,iBAAA,EAAkB,CAAE,CAAC,CAAA,IAAK,IAAA,CAAK,IAAA,CAAK,EAAA,CAAG,OAAA,EAAQ,EAAG,SAAA,EAAW,WAAW;AAoBnE,SAAS,eAAA,GAA4B;AAC1C,EAAA,MAAM,KAAA,GAAkB,CAAC,GAAG,iBAAA,EAAmB,CAAA;AAG/C,EAAA,KAAA,CAAM,IAAA,CAAK,mBAAmB,CAAA;AAC9B,EAAA,OAAO,CAAC,GAAG,IAAI,GAAA,CAAI,KAAK,CAAC,CAAA,CAAE,MAAA,CAAO,CAAC,CAAA,KAAM,EAAA,CAAG,UAAA,CAAW,CAAC,CAAC,CAAA;AAC3D","file":"chunk-57RFYEVM.js","sourcesContent":["import fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { factoryAssetRoots } from \"@skaile/workspaces/core\";\nimport { resolveLibraryDir } from \"@skaile/workspaces/library\";\n\nconst __ownDir = path.dirname(fileURLToPath(import.meta.url));\n\n/**\n * Walk up from `from` looking for the monorepo marker (`biome.json`, the\n * repo-root shared tooling config). Returns the matching directory or `null`\n * when none is found within eight levels — the latter is the typical case when\n * `@skaile/workspaces` has been installed via `npm i` without a skaile-dev\n * workspace context. Used only to gate dev-only commands (e.g.\n * `serve --compile-test`); first-party content is located via\n * {@link aiResourceRoots}, not this.\n */\nfunction findMonorepoRoot(from: string): string | null {\n let dir = from;\n for (let i = 0; i < 8; i++) {\n if (fs.existsSync(path.join(dir, \"biome.json\"))) return dir;\n const parent = path.dirname(dir);\n if (parent === dir) break;\n dir = parent;\n }\n return null;\n}\n\n/**\n * Absolute path to the monorepo root, or `null` when the CLI is running\n * outside the skaile-dev workspace (typical for `npm i -g` installs).\n *\n * Consumers that only make sense inside the workspace (e.g.\n * `skaile serve --compile-test`) MUST check for `null` and report a\n * \"monorepo-only feature\" error before proceeding.\n *\n * @docLink cli/dev-guide#paths\n */\nexport const MONOREPO_ROOT: string | null = findMonorepoRoot(__ownDir);\n\n/**\n * Default content root used by path display and the `validate` command.\n *\n * The primary first-party `factory-assets/` root resolved through the shared\n * `factoryAssetRoots()` helper — the `SKAILE_FACTORY_ASSETS_DIR` override when\n * set, else the in-repo source during dev / bundled `dist/factory-assets/` after\n * `npm i`. Falls back to `~/.skaile/libraries/` — the user-library directory\n * managed by `skaile library add` — when the package cannot be located.\n * Consumers `fs.existsSync` first and degrade to \"no skills / flows discovered\".\n *\n * @docLink cli/dev-guide#paths\n */\nexport const AI_RESOURCES: string =\n factoryAssetRoots()[0] ?? path.join(os.homedir(), \".skaile\", \"libraries\");\n\n/**\n * All content roots that skill / flow discovery should walk, in priority order,\n * filtered to those that exist on disk and de-duplicated.\n *\n * - The first-party `factory-assets/` roots from the shared `factoryAssetRoots()`\n * helper — the `SKAILE_FACTORY_ASSETS_DIR` override layer (when set) ahead of\n * the bundled tree (in-repo source in dev, `dist/factory-assets/` after\n * install). No monorepo special-case.\n * - The user-library dir `~/.skaile/libraries/`.\n *\n * Order is significant: `findSkills` / flow discovery dedupe first-root-wins, so\n * the env override shadows the bundled tree on a name clash.\n *\n * This is the discovery surface used by `findSkills`, flow discovery, and the\n * completion resolvers.\n *\n * @docLink cli/dev-guide#paths\n */\nexport function aiResourceRoots(): string[] {\n const roots: string[] = [...factoryAssetRoots()];\n // resolveLibraryDir honors SKAILE_LIBRARIES_DIR (the authoring side does too),\n // so a custom-dir library is visible to discovery instead of being missed.\n roots.push(resolveLibraryDir());\n return [...new Set(roots)].filter((r) => fs.existsSync(r));\n}\n"]}