@skaile/workspaces 3.3.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +108 -0
- package/dist/{asset-feeds-AGAH5OHC.js → asset-feeds-SILUSNAL.js} +11 -11
- package/dist/{asset-feeds-AGAH5OHC.js.map → asset-feeds-SILUSNAL.js.map} +1 -1
- package/dist/asset-manager/catalog-deployer.js +7 -7
- package/dist/asset-manager/index.js +10 -10
- package/dist/asset-manager/installer.js +7 -7
- package/dist/bridge/drivers/claude-sdk.js +8 -8
- package/dist/bridge/drivers/codex.js +3 -3
- package/dist/bridge/drivers/continue.js +4 -4
- package/dist/bridge/drivers/echo.js +3 -3
- package/dist/bridge/drivers/gemini.js +5 -5
- package/dist/bridge/drivers/goose.js +4 -4
- package/dist/bridge/drivers/omp.js +3 -3
- package/dist/bridge/drivers/opencode.js +4 -4
- package/dist/bridge/drivers/qwen.js +5 -5
- package/dist/bridge/index.js +9 -9
- package/dist/{chunk-4GJLRYMB.js → chunk-33ZEIMFJ.js} +3 -3
- package/dist/{chunk-4GJLRYMB.js.map → chunk-33ZEIMFJ.js.map} +1 -1
- package/dist/{chunk-7GOCNYUV.js → chunk-3A5IKBHQ.js} +47 -47
- package/dist/{chunk-7GOCNYUV.js.map → chunk-3A5IKBHQ.js.map} +1 -1
- package/dist/{chunk-ZNIHTT22.js → chunk-3UU3D2Q3.js} +5 -5
- package/dist/{chunk-ZNIHTT22.js.map → chunk-3UU3D2Q3.js.map} +1 -1
- package/dist/{chunk-E5S2WGTS.js → chunk-4GYL5TCP.js} +103 -33
- package/dist/chunk-4GYL5TCP.js.map +1 -0
- package/dist/{chunk-CZZRDYT4.js → chunk-4VTBZ2MF.js} +4 -4
- package/dist/{chunk-CZZRDYT4.js.map → chunk-4VTBZ2MF.js.map} +1 -1
- package/dist/{chunk-VT6HDD2L.js → chunk-4YYJV6TW.js} +3 -3
- package/dist/{chunk-VT6HDD2L.js.map → chunk-4YYJV6TW.js.map} +1 -1
- package/dist/{chunk-S6GKHEMN.js → chunk-5JP7ZF5I.js} +10 -10
- package/dist/{chunk-S6GKHEMN.js.map → chunk-5JP7ZF5I.js.map} +1 -1
- package/dist/{chunk-U5POE4BA.js → chunk-5Q7HA4JP.js} +3 -3
- package/dist/{chunk-U5POE4BA.js.map → chunk-5Q7HA4JP.js.map} +1 -1
- package/dist/{chunk-I7MKEZ6J.js → chunk-7EUW3BBR.js} +3 -3
- package/dist/{chunk-I7MKEZ6J.js.map → chunk-7EUW3BBR.js.map} +1 -1
- package/dist/{chunk-P43HBWKK.js → chunk-AZPXCHDK.js} +36 -7
- package/dist/chunk-AZPXCHDK.js.map +1 -0
- package/dist/{chunk-PKEAYYEJ.js → chunk-BCXI27BH.js} +219 -4
- package/dist/chunk-BCXI27BH.js.map +1 -0
- package/dist/{chunk-PRKLFKNC.js → chunk-BSPOMUA7.js} +4 -4
- package/dist/{chunk-PRKLFKNC.js.map → chunk-BSPOMUA7.js.map} +1 -1
- package/dist/{chunk-MWFYXUFK.js → chunk-G2CXWUO5.js} +4 -4
- package/dist/{chunk-MWFYXUFK.js.map → chunk-G2CXWUO5.js.map} +1 -1
- package/dist/{chunk-BEAIJRVF.js → chunk-GHWJHOYX.js} +4 -4
- package/dist/{chunk-BEAIJRVF.js.map → chunk-GHWJHOYX.js.map} +1 -1
- package/dist/{chunk-5FLEP4X6.js → chunk-HBF7A7JB.js} +45 -5
- package/dist/chunk-HBF7A7JB.js.map +1 -0
- package/dist/{chunk-MJ77WSJC.js → chunk-HIFLMPNV.js} +6 -6
- package/dist/{chunk-MJ77WSJC.js.map → chunk-HIFLMPNV.js.map} +1 -1
- package/dist/{chunk-KPZZI2KG.js → chunk-HV3ZCE4M.js} +3 -3
- package/dist/{chunk-KPZZI2KG.js.map → chunk-HV3ZCE4M.js.map} +1 -1
- package/dist/{chunk-Q26C5GLO.js → chunk-IP3GXHOB.js} +3 -4
- package/dist/chunk-IP3GXHOB.js.map +1 -0
- package/dist/{chunk-RRCNMURJ.js → chunk-J7HJUX4W.js} +29 -21
- package/dist/chunk-J7HJUX4W.js.map +1 -0
- package/dist/{chunk-BK3WL3QK.js → chunk-JAHHMZWG.js} +3 -3
- package/dist/{chunk-BK3WL3QK.js.map → chunk-JAHHMZWG.js.map} +1 -1
- package/dist/{chunk-BOH6AG6Q.js → chunk-KHLEQB4F.js} +47 -37
- package/dist/chunk-KHLEQB4F.js.map +1 -0
- package/dist/chunk-M5D2QNTY.js +23 -0
- package/dist/chunk-M5D2QNTY.js.map +1 -0
- package/dist/{chunk-2OCYS5EP.js → chunk-O7WKKINT.js} +4 -4
- package/dist/{chunk-2OCYS5EP.js.map → chunk-O7WKKINT.js.map} +1 -1
- package/dist/{chunk-3HVASHBF.js → chunk-OCLCDB7G.js} +6 -15
- package/dist/chunk-OCLCDB7G.js.map +1 -0
- package/dist/{chunk-NU4E7C5I.js → chunk-PW4SJE3X.js} +3 -3
- package/dist/{chunk-NU4E7C5I.js.map → chunk-PW4SJE3X.js.map} +1 -1
- package/dist/{chunk-O6B3ZZ5S.js → chunk-QAH2DYIP.js} +4 -4
- package/dist/{chunk-O6B3ZZ5S.js.map → chunk-QAH2DYIP.js.map} +1 -1
- package/dist/{chunk-33GWB3RB.js → chunk-QEQ5I47S.js} +3 -3
- package/dist/{chunk-33GWB3RB.js.map → chunk-QEQ5I47S.js.map} +1 -1
- package/dist/{chunk-EP7VBFMN.js → chunk-R4BUI5BU.js} +7 -7
- package/dist/{chunk-EP7VBFMN.js.map → chunk-R4BUI5BU.js.map} +1 -1
- package/dist/{chunk-46LE3GNY.js → chunk-RUFTB7QN.js} +3 -3
- package/dist/{chunk-46LE3GNY.js.map → chunk-RUFTB7QN.js.map} +1 -1
- package/dist/{chunk-UFY2HFLO.js → chunk-SH572OBN.js} +4 -4
- package/dist/{chunk-UFY2HFLO.js.map → chunk-SH572OBN.js.map} +1 -1
- package/dist/{chunk-OD3ABXUO.js → chunk-UEH5XAQR.js} +8 -8
- package/dist/{chunk-OD3ABXUO.js.map → chunk-UEH5XAQR.js.map} +1 -1
- package/dist/{chunk-DYMWJAL4.js → chunk-VQ4P7UYE.js} +3 -3
- package/dist/{chunk-DYMWJAL4.js.map → chunk-VQ4P7UYE.js.map} +1 -1
- package/dist/{chunk-AM5LFRXJ.js → chunk-WAFHQDLK.js} +3 -3
- package/dist/{chunk-AM5LFRXJ.js.map → chunk-WAFHQDLK.js.map} +1 -1
- package/dist/{chunk-3KEJ2HJY.js → chunk-WC7Q6GMC.js} +3 -3
- package/dist/{chunk-3KEJ2HJY.js.map → chunk-WC7Q6GMC.js.map} +1 -1
- package/dist/cli/index.js +145 -170
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/commands/run.d.ts.map +1 -1
- package/dist/cli/src/flow-discovery.d.ts +9 -9
- package/dist/cli/src/flow-discovery.d.ts.map +1 -1
- package/dist/cli/src/paths.d.ts +9 -33
- package/dist/cli/src/paths.d.ts.map +1 -1
- package/dist/connectors/config.js +7 -7
- package/dist/connectors/index.js +12 -12
- package/dist/core/index.js +6 -6
- package/dist/core/logging.js +2 -2
- package/dist/core/manifest.js +2 -2
- package/dist/core/runtime-assets.js +4 -4
- package/dist/core/src/asset-roots.d.ts +74 -0
- package/dist/core/src/asset-roots.d.ts.map +1 -0
- package/dist/core/src/index.d.ts +1 -0
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts +0 -2
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/workspace-config.js +3 -3
- package/dist/deploy/index.js +6 -6
- package/dist/discovery/index.js +3 -3
- package/dist/{ensure-sources-L2276FYP.js → ensure-sources-SZABN3WG.js} +13 -13
- package/dist/{ensure-sources-L2276FYP.js.map → ensure-sources-SZABN3WG.js.map} +1 -1
- package/dist/factory-assets/connectors/box.js +12 -12
- package/dist/factory-assets/connectors/deploy.js +12 -12
- package/dist/factory-assets/connectors/devserver.js +12 -12
- package/dist/factory-assets/connectors/flow/CONNECTOR.md +22 -2
- package/dist/factory-assets/connectors/flow/adapter.d.ts +1 -1
- package/dist/factory-assets/connectors/flow/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/adapter.js +12 -12
- package/dist/factory-assets/connectors/flow/engine/index.d.ts +1 -0
- package/dist/factory-assets/connectors/flow/engine/index.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine/locate.d.ts +75 -0
- package/dist/factory-assets/connectors/flow/engine/locate.d.ts.map +1 -0
- package/dist/factory-assets/connectors/flow/engine.js +7 -7
- package/dist/factory-assets/connectors/flow/index.d.ts +1 -1
- package/dist/factory-assets/connectors/flow/index.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/node-executor.d.ts +23 -3
- package/dist/factory-assets/connectors/flow/node-executor.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/run-flow.d.ts +9 -1
- package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/run-flow.js +14 -14
- package/dist/factory-assets/connectors/flow.js +12 -12
- package/dist/factory-assets/connectors/git.js +12 -12
- package/dist/factory-assets/connectors/gmail.js +12 -12
- package/dist/factory-assets/connectors/googledrive.js +12 -12
- package/dist/factory-assets/connectors/local.js +12 -12
- package/dist/factory-assets/connectors/mattermost.js +12 -12
- package/dist/factory-assets/connectors/memory.js +12 -12
- package/dist/factory-assets/connectors/minio.js +12 -12
- package/dist/factory-assets/connectors/postgres.js +12 -12
- package/dist/factory-assets/connectors/s3.js +12 -12
- package/dist/factory-assets/connectors/sharepoint.js +12 -12
- package/dist/factory-assets/connectors/sqlite.js +12 -12
- package/dist/factory-assets/connectors/static-server.js +12 -12
- package/dist/factory-assets/connectors/tunnel.js +12 -12
- package/dist/factory-assets/connectors/webdav.js +12 -12
- package/dist/factory-assets/connectors/xstate-store.js +12 -12
- package/dist/factory-assets/connectors/xstate.js +12 -12
- package/dist/flows-4PIPK2S6.js +20 -0
- package/dist/{flows-7CZKSC64.js.map → flows-4PIPK2S6.js.map} +1 -1
- package/dist/{helpers-ZWHB5JHQ.js → helpers-XDIMXDTI.js} +13 -13
- package/dist/{helpers-ZWHB5JHQ.js.map → helpers-XDIMXDTI.js.map} +1 -1
- package/dist/library/index.js +8 -8
- package/dist/library/install.js +6 -6
- package/dist/library/src/config.d.ts +6 -6
- package/dist/library/src/config.d.ts.map +1 -1
- package/dist/{library-publish-CVYFMVGR.js → library-publish-HDYBQF46.js} +17 -17
- package/dist/{library-publish-CVYFMVGR.js.map → library-publish-HDYBQF46.js.map} +1 -1
- package/dist/{open-library-XB65LU3M.js → open-library-LAUJOTYJ.js} +15 -15
- package/dist/{open-library-XB65LU3M.js.map → open-library-LAUJOTYJ.js.map} +1 -1
- package/dist/paths-S7UESJKT.js +16 -0
- package/dist/{paths-B52KTS7N.js.map → paths-S7UESJKT.js.map} +1 -1
- package/dist/{plugin-store-EOP3S7OU.js → plugin-store-5SJX2PRR.js} +8 -8
- package/dist/{plugin-store-EOP3S7OU.js.map → plugin-store-5SJX2PRR.js.map} +1 -1
- package/dist/{project-E5LKCE7R.js → project-6IW2N3MX.js} +14 -14
- package/dist/{project-E5LKCE7R.js.map → project-6IW2N3MX.js.map} +1 -1
- package/dist/resolver/index.js +7 -7
- package/dist/runner/index.js +17 -17
- package/dist/runner/src/compaction/orchestrator.d.ts +14 -2
- package/dist/runner/src/compaction/orchestrator.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +10 -10
- package/dist/sdk/bridge.js +9 -9
- package/dist/sdk/core.js +6 -6
- package/dist/sdk/flow.js +7 -7
- package/dist/sdk/index.js +17 -17
- package/dist/sdk/resolver.js +7 -7
- package/dist/sdk/runner.js +17 -17
- package/dist/sdk/session.js +1 -1
- package/dist/session/index.js +1 -1
- package/dist/session/src/dispatcher.d.ts +15 -0
- package/dist/session/src/dispatcher.d.ts.map +1 -1
- package/dist/session/src/workspace-change-digest.d.ts +34 -0
- package/dist/session/src/workspace-change-digest.d.ts.map +1 -0
- package/dist/{setup-XI7TCIGF.js → setup-YA2QHQ2N.js} +11 -11
- package/dist/{setup-XI7TCIGF.js.map → setup-YA2QHQ2N.js.map} +1 -1
- package/dist/skills-OBJX3VYG.js +20 -0
- package/dist/{skills-5PJ6YVM7.js.map → skills-OBJX3VYG.js.map} +1 -1
- package/dist/{source-7BNREKGK.js → source-FIE5KQS2.js} +16 -16
- package/dist/{source-7BNREKGK.js.map → source-FIE5KQS2.js.map} +1 -1
- package/dist/{source-manifest-publish-JGMHNADH.js → source-manifest-publish-64PTOEP2.js} +18 -18
- package/dist/{source-manifest-publish-JGMHNADH.js.map → source-manifest-publish-64PTOEP2.js.map} +1 -1
- package/dist/tui/index.js +17 -17
- package/dist/types/src/events.d.ts +1 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +11 -11
- package/dist/workspace-plugin/adapters/omp.js +7 -7
- package/dist/workspace-plugin/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-3HVASHBF.js.map +0 -1
- package/dist/chunk-5FLEP4X6.js.map +0 -1
- package/dist/chunk-6OMKIPIE.js +0 -42
- package/dist/chunk-6OMKIPIE.js.map +0 -1
- package/dist/chunk-BOH6AG6Q.js.map +0 -1
- package/dist/chunk-E5S2WGTS.js.map +0 -1
- package/dist/chunk-P43HBWKK.js.map +0 -1
- package/dist/chunk-PKEAYYEJ.js.map +0 -1
- package/dist/chunk-Q26C5GLO.js.map +0 -1
- package/dist/chunk-RRCNMURJ.js.map +0 -1
- package/dist/flows-7CZKSC64.js +0 -20
- package/dist/paths-B52KTS7N.js +0 -22
- package/dist/skills-5PJ6YVM7.js +0 -20
package/dist/cli/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportInstalledSoftDeps } from '../chunk-
|
|
3
|
-
import { makeSourceCommand, syncProjectSources } from '../chunk-
|
|
4
|
-
import { AI_RESOURCES
|
|
5
|
-
import { getStoreConfig, storeFetch, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, isStoreAuthenticated, getStoreToken, getStoreIdentity } from '../chunk-
|
|
6
|
-
import { openCatalogSource, openLibraryManager, createFullRegistry, openLibrary } from '../chunk-
|
|
7
|
-
import { logErr, S, logOk, logInfo, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, logWarn, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth } from '../chunk-
|
|
2
|
+
import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportInstalledSoftDeps } from '../chunk-R4BUI5BU.js';
|
|
3
|
+
import { makeSourceCommand, syncProjectSources } from '../chunk-5JP7ZF5I.js';
|
|
4
|
+
import { AI_RESOURCES } from '../chunk-M5D2QNTY.js';
|
|
5
|
+
import { getStoreConfig, storeFetch, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, isStoreAuthenticated, getStoreToken, getStoreIdentity } from '../chunk-WAFHQDLK.js';
|
|
6
|
+
import { openCatalogSource, openLibraryManager, createFullRegistry, openLibrary } from '../chunk-HIFLMPNV.js';
|
|
7
|
+
import { logErr, S, logOk, logInfo, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, logWarn, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth } from '../chunk-WC7Q6GMC.js';
|
|
8
8
|
import { LocalSecretsProvider } from '../chunk-6BEGKO2Q.js';
|
|
9
|
-
import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-
|
|
10
|
-
import { buildClaudePluginFiles } from '../chunk-
|
|
9
|
+
import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-J7HJUX4W.js';
|
|
10
|
+
import { buildClaudePluginFiles } from '../chunk-QEQ5I47S.js';
|
|
11
11
|
import '../chunk-X5YPJV4N.js';
|
|
12
12
|
import '../chunk-W3UDISS2.js';
|
|
13
13
|
import '../chunk-O7SG5PC2.js';
|
|
@@ -15,53 +15,53 @@ import '../chunk-7QBNJTTQ.js';
|
|
|
15
15
|
import '../chunk-GTS2FODO.js';
|
|
16
16
|
import '../chunk-WQ7DE5UC.js';
|
|
17
17
|
import '../chunk-32NA4TVC.js';
|
|
18
|
-
import { runFlow, resumeFlow } from '../chunk-
|
|
18
|
+
import { runFlow, resumeFlow } from '../chunk-KHLEQB4F.js';
|
|
19
19
|
import '../chunk-4R6DROGN.js';
|
|
20
|
-
import { validateFlowVersions, parseSkillFrontmatter } from '../chunk-
|
|
21
|
-
import '../chunk-
|
|
20
|
+
import { validateFlowVersions, parseSkillFrontmatter } from '../chunk-4VTBZ2MF.js';
|
|
21
|
+
import '../chunk-GHWJHOYX.js';
|
|
22
22
|
import '../chunk-HNBWU5RA.js';
|
|
23
|
-
import '../chunk-
|
|
24
|
-
import '../chunk-
|
|
25
|
-
import '../chunk-
|
|
26
|
-
import '../chunk-
|
|
23
|
+
import '../chunk-4GYL5TCP.js';
|
|
24
|
+
import '../chunk-3UU3D2Q3.js';
|
|
25
|
+
import '../chunk-HV3ZCE4M.js';
|
|
26
|
+
import '../chunk-RUFTB7QN.js';
|
|
27
27
|
import '../chunk-RRVQAE5D.js';
|
|
28
28
|
import '../chunk-V34ZEXSE.js';
|
|
29
29
|
import '../chunk-GAH4YRCI.js';
|
|
30
|
-
import '../chunk-
|
|
30
|
+
import '../chunk-4YYJV6TW.js';
|
|
31
31
|
import '../chunk-6E6PKKAD.js';
|
|
32
32
|
import '../chunk-IFGTRL2I.js';
|
|
33
|
-
import { loadFlow, loadAllFlowEntries,
|
|
33
|
+
import { projectAiAssetsRoots, loadFlow, loadAllFlowEntries, findFlowFileInRoots } from '../chunk-HBF7A7JB.js';
|
|
34
34
|
import '../chunk-B4J6TV4G.js';
|
|
35
35
|
import '../chunk-HGFKNJA5.js';
|
|
36
36
|
import { nodeLabel, nodeSkillAsset, nodeIsInert, nodeIsOptional, nodeRunKind, flowSkillVersionPins } from '../chunk-ELPR5XBG.js';
|
|
37
37
|
import '../chunk-D4VHBAJC.js';
|
|
38
|
-
import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-
|
|
39
|
-
import {
|
|
40
|
-
import '../chunk-
|
|
38
|
+
import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-UEH5XAQR.js';
|
|
39
|
+
import { getStoreManifestsDir, getDefaultValue, isSecretPlaceholder } from '../chunk-OCLCDB7G.js';
|
|
40
|
+
import '../chunk-PW4SJE3X.js';
|
|
41
41
|
import '../chunk-UKJMQZV6.js';
|
|
42
42
|
import '../chunk-R7FOF242.js';
|
|
43
43
|
import '../chunk-JXT46QFC.js';
|
|
44
|
-
import '../chunk-
|
|
44
|
+
import '../chunk-O7WKKINT.js';
|
|
45
45
|
import '../chunk-CGYEHQOX.js';
|
|
46
|
-
import { resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, portableSpawn, portableSpawnSync, WorkspaceYamlEditor, checkAgentSkillConformance, readLock } from '../chunk-
|
|
46
|
+
import { resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, portableSpawn, portableSpawnSync, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, aiResourceRoots, readLock } from '../chunk-AZPXCHDK.js';
|
|
47
47
|
import '../chunk-F3HNW354.js';
|
|
48
48
|
import { DRIVER_DEFAULTS } from '../chunk-K5GBV4SA.js';
|
|
49
|
-
import {
|
|
50
|
-
import { factoryAssetRoots } from '../chunk-
|
|
51
|
-
import { globalCacheRoot, sourceCacheKey, getGlobalCacheDir, resolveAgentDir, matchPin, coerceVersion, loadSkWorkspaceConfig, resolveSkWorkspaceConfig, storeManifestSlug } from '../chunk-
|
|
49
|
+
import { detectDomains, assetSearchDirs } from '../chunk-QVZA2MDT.js';
|
|
50
|
+
import { factoryAssetRoots } from '../chunk-SH572OBN.js';
|
|
51
|
+
import { globalCacheRoot, sourceCacheKey, getGlobalCacheDir, resolveAgentDir, matchPin, coerceVersion, loadSkWorkspaceConfig, resolveSkWorkspaceConfig, storeManifestSlug } from '../chunk-IP3GXHOB.js';
|
|
52
52
|
import { SUPPORTED_DRIVER_TARGETS } from '../chunk-MENCWIHW.js';
|
|
53
53
|
import { SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, loadSkPublishManifest, saveSkPublishManifest } from '../chunk-P4VHQA4N.js';
|
|
54
|
-
import { parseFrontmatter, scanDirectory } from '../chunk-
|
|
54
|
+
import { parseFrontmatter, scanDirectory } from '../chunk-VQ4P7UYE.js';
|
|
55
55
|
import { parseAssetRef, ASSET_KINDS, isValidAssetName, slugifyAssetName, ASSET_NAME_HINT, assetRefToStr } from '../chunk-GEEW6SY2.js';
|
|
56
|
-
import { openSqlite } from '../chunk-
|
|
57
|
-
import '../chunk-
|
|
56
|
+
import { openSqlite } from '../chunk-5Q7HA4JP.js';
|
|
57
|
+
import '../chunk-3A5IKBHQ.js';
|
|
58
58
|
import '../chunk-KTBKW2FI.js';
|
|
59
59
|
import '../chunk-UQ6LFBPZ.js';
|
|
60
60
|
import '../chunk-IEX5YV4R.js';
|
|
61
61
|
import { validatePreset } from '../chunk-IRORTHGA.js';
|
|
62
62
|
import '../chunk-NSBPE2FW.js';
|
|
63
|
-
import * as
|
|
64
|
-
import
|
|
63
|
+
import * as fs12 from 'fs';
|
|
64
|
+
import fs12__default, { readFileSync, existsSync, mkdirSync, writeFileSync, lstatSync, rmSync, readdirSync, statSync } from 'fs';
|
|
65
65
|
import * as path35 from 'path';
|
|
66
66
|
import path35__default, { resolve, join } from 'path';
|
|
67
67
|
import { fileURLToPath } from 'url';
|
|
@@ -74,7 +74,7 @@ import { homedir } from 'os';
|
|
|
74
74
|
import { parse, stringify } from 'yaml';
|
|
75
75
|
import * as readline from 'readline';
|
|
76
76
|
import { createInterface } from 'readline';
|
|
77
|
-
import
|
|
77
|
+
import fs5 from 'fs/promises';
|
|
78
78
|
import { parse as parse$1, stringify as stringify$1 } from 'smol-toml';
|
|
79
79
|
import { execSync } from 'child_process';
|
|
80
80
|
import * as readline2 from 'readline/promises';
|
|
@@ -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-
|
|
113
|
+
const { openLibrary: openLibrary2 } = await import('../open-library-LAUJOTYJ.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-
|
|
166
|
+
const { autoSyncForSearch } = await import('../source-FIE5KQS2.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-
|
|
220
|
+
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-LAUJOTYJ.js');
|
|
221
221
|
try {
|
|
222
222
|
const remote = await openCatalogSource2({ projectDir: path35__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-
|
|
535
|
+
const { resolveCatalogSource } = await import('../open-library-LAUJOTYJ.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-
|
|
551
|
+
const { LocalCatalogDisabledError } = await import('../open-library-LAUJOTYJ.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 } : {} };
|
|
@@ -644,16 +644,16 @@ function claudeSkillRoots() {
|
|
|
644
644
|
}
|
|
645
645
|
function resolveImportSource(nameOrPath) {
|
|
646
646
|
const asPath = path35.resolve(nameOrPath);
|
|
647
|
-
if (
|
|
648
|
-
const dir =
|
|
647
|
+
if (fs12.existsSync(asPath)) {
|
|
648
|
+
const dir = fs12.statSync(asPath).isDirectory() ? asPath : path35.dirname(asPath);
|
|
649
649
|
const skillFile = path35.join(dir, "SKILL.md");
|
|
650
|
-
if (
|
|
650
|
+
if (fs12.existsSync(skillFile)) return { dir, skillFile, via: "path" };
|
|
651
651
|
}
|
|
652
652
|
if (!nameOrPath.includes(path35.sep) && !nameOrPath.startsWith(".")) {
|
|
653
653
|
for (const root of claudeSkillRoots()) {
|
|
654
654
|
const dir = path35.join(root, nameOrPath);
|
|
655
655
|
const skillFile = path35.join(dir, "SKILL.md");
|
|
656
|
-
if (
|
|
656
|
+
if (fs12.existsSync(skillFile)) return { dir, skillFile, via: "claude-skills" };
|
|
657
657
|
}
|
|
658
658
|
}
|
|
659
659
|
return null;
|
|
@@ -721,17 +721,17 @@ function ensureDomain(libraryPath, domain, opts = {}) {
|
|
|
721
721
|
const dir = path35.join(libraryPath, domain);
|
|
722
722
|
const domainFile = path35.join(dir, "DOMAIN.md");
|
|
723
723
|
const publisher = opts.publisher ?? slugifyAssetName(domain);
|
|
724
|
-
if (
|
|
724
|
+
if (fs12.existsSync(domainFile)) {
|
|
725
725
|
return { dir, publisher, created: false };
|
|
726
726
|
}
|
|
727
|
-
|
|
727
|
+
fs12.mkdirSync(dir, { recursive: true });
|
|
728
728
|
const description = opts.description ?? `The ${domain} domain.`;
|
|
729
|
-
|
|
729
|
+
fs12.writeFileSync(domainFile, DOMAIN_TEMPLATE(domain, publisher, description), "utf8");
|
|
730
730
|
return { dir, publisher, created: true };
|
|
731
731
|
}
|
|
732
732
|
function listDomains(libraryPath) {
|
|
733
|
-
if (!
|
|
734
|
-
return
|
|
733
|
+
if (!fs12.existsSync(libraryPath)) return [];
|
|
734
|
+
return fs12.readdirSync(libraryPath, { withFileTypes: true }).filter((e) => e.isDirectory() && fs12.existsSync(path35.join(libraryPath, e.name, "DOMAIN.md"))).map((e) => e.name).sort();
|
|
735
735
|
}
|
|
736
736
|
function upsertManifestAsset(libraryPath, input) {
|
|
737
737
|
const manifest = loadSkPublishManifest(libraryPath) ?? { assets: [] };
|
|
@@ -800,7 +800,7 @@ function makeAssetCommand() {
|
|
|
800
800
|
logErr(`Library "${target.name}" is read-only (ownership=reader). Choose --to.`);
|
|
801
801
|
process.exit(1);
|
|
802
802
|
}
|
|
803
|
-
const rawSkill =
|
|
803
|
+
const rawSkill = fs12.readFileSync(src.skillFile, "utf8");
|
|
804
804
|
const norm = opts.normalize ? normalizeSkillContent(rawSkill, {
|
|
805
805
|
fallbackName: path35.basename(src.dir),
|
|
806
806
|
version: opts.version,
|
|
@@ -819,14 +819,14 @@ function makeAssetCommand() {
|
|
|
819
819
|
destParent = path35.join(dom.dir, "skills");
|
|
820
820
|
publisher = dom.publisher;
|
|
821
821
|
}
|
|
822
|
-
|
|
822
|
+
fs12.mkdirSync(destParent, { recursive: true });
|
|
823
823
|
const destDir = path35.join(destParent, norm.name);
|
|
824
|
-
if (
|
|
824
|
+
if (fs12.existsSync(destDir)) {
|
|
825
825
|
logErr(`Destination already exists: ${destDir}`);
|
|
826
826
|
process.exit(1);
|
|
827
827
|
}
|
|
828
|
-
|
|
829
|
-
|
|
828
|
+
fs12.cpSync(src.dir, destDir, { recursive: true });
|
|
829
|
+
fs12.writeFileSync(path35.join(destDir, "SKILL.md"), norm.content, "utf8");
|
|
830
830
|
for (const note of norm.notes) logInfo(` \u2022 ${note}`);
|
|
831
831
|
const fm = parseFrontmatter(norm.content).data;
|
|
832
832
|
const descRaw = fm.description;
|
|
@@ -868,7 +868,7 @@ function makeAssetCommand() {
|
|
|
868
868
|
logErr(`Invalid --mode "${opts.mode}". Expected: copy | move | link.`);
|
|
869
869
|
process.exit(1);
|
|
870
870
|
}
|
|
871
|
-
if (!
|
|
871
|
+
if (!fs12.existsSync(srcPath)) {
|
|
872
872
|
logErr(`Source path does not exist: ${srcPath}`);
|
|
873
873
|
process.exit(1);
|
|
874
874
|
}
|
|
@@ -897,21 +897,21 @@ function makeAssetCommand() {
|
|
|
897
897
|
}
|
|
898
898
|
const basename2 = path35.basename(srcPath);
|
|
899
899
|
const destDir = target.structure === "domain" && opts.domain ? path35.join(target.path, opts.domain) : target.path;
|
|
900
|
-
|
|
900
|
+
fs12.mkdirSync(destDir, { recursive: true });
|
|
901
901
|
const destPath = path35.join(destDir, basename2);
|
|
902
|
-
if (
|
|
902
|
+
if (fs12.existsSync(destPath)) {
|
|
903
903
|
logErr(`Destination already exists: ${destPath}`);
|
|
904
904
|
process.exit(1);
|
|
905
905
|
}
|
|
906
906
|
switch (opts.mode) {
|
|
907
907
|
case "copy":
|
|
908
|
-
|
|
908
|
+
fs12.cpSync(srcPath, destPath, { recursive: true });
|
|
909
909
|
break;
|
|
910
910
|
case "move":
|
|
911
|
-
|
|
911
|
+
fs12.renameSync(srcPath, destPath);
|
|
912
912
|
break;
|
|
913
913
|
case "link":
|
|
914
|
-
|
|
914
|
+
fs12.symlinkSync(path35.resolve(srcPath), destPath);
|
|
915
915
|
break;
|
|
916
916
|
}
|
|
917
917
|
if (target.backend === "git" && opts.commit) {
|
|
@@ -969,16 +969,16 @@ function makeAssetCommand() {
|
|
|
969
969
|
const manifestPath = def.manifest.path;
|
|
970
970
|
const candidateSubpath = typeof manifestPath === "string" && manifestPath.length > 0 ? manifestPath : def.name;
|
|
971
971
|
const srcPath = path35.join(lib.path, candidateSubpath);
|
|
972
|
-
if (!
|
|
972
|
+
if (!fs12.existsSync(srcPath)) {
|
|
973
973
|
logErr(`Asset path not found: ${srcPath}`);
|
|
974
974
|
process.exit(1);
|
|
975
975
|
}
|
|
976
976
|
const destPath = path35.join(target, candidateSubpath);
|
|
977
|
-
|
|
977
|
+
fs12.mkdirSync(path35.dirname(destPath), { recursive: true });
|
|
978
978
|
if (opts.mode === "copy") {
|
|
979
|
-
|
|
979
|
+
fs12.cpSync(srcPath, destPath, { recursive: true });
|
|
980
980
|
} else {
|
|
981
|
-
|
|
981
|
+
fs12.symlinkSync(path35.resolve(srcPath), destPath);
|
|
982
982
|
}
|
|
983
983
|
logOk(`Installed ${ref} \u2192 ${destPath} (${opts.mode})`);
|
|
984
984
|
} finally {
|
|
@@ -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-
|
|
1171
|
+
const { resolveCatalogSource } = await import('../open-library-LAUJOTYJ.js');
|
|
1172
1172
|
let resolved;
|
|
1173
1173
|
try {
|
|
1174
1174
|
resolved = await resolveCatalogSource({ projectDir });
|
|
@@ -1288,6 +1288,8 @@ complete -F _${bin}_completion ${bin}`,
|
|
|
1288
1288
|
end
|
|
1289
1289
|
complete -c ${bin} -f -a '(__${bin}_complete)'`
|
|
1290
1290
|
};
|
|
1291
|
+
|
|
1292
|
+
// cli/src/flow-discovery.ts
|
|
1291
1293
|
function discoverFlows(projectDir) {
|
|
1292
1294
|
const byId = /* @__PURE__ */ new Map();
|
|
1293
1295
|
for (const root of aiResourceRoots(projectDir)) {
|
|
@@ -1297,31 +1299,14 @@ function discoverFlows(projectDir) {
|
|
|
1297
1299
|
}
|
|
1298
1300
|
return [...byId.values()];
|
|
1299
1301
|
}
|
|
1300
|
-
function declaredFlowId(filePath) {
|
|
1301
|
-
try {
|
|
1302
|
-
return loadFlow(filePath).id;
|
|
1303
|
-
} catch {
|
|
1304
|
-
return void 0;
|
|
1305
|
-
}
|
|
1306
|
-
}
|
|
1307
1302
|
function findFlowFile(flowId, priorityRoots = [], projectDir) {
|
|
1308
|
-
|
|
1309
|
-
for (const { dir } of assetSearchDirs(root, "flows")) {
|
|
1310
|
-
for (const candidate of flowFileCandidates(dir, flowId)) {
|
|
1311
|
-
if (fs13__default.existsSync(candidate) && declaredFlowId(candidate) === flowId) return candidate;
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
const entry = loadAllFlowEntries(root, { onWarn: () => {
|
|
1315
|
-
} }).find((e) => e.flow.id === flowId);
|
|
1316
|
-
if (entry) return entry.path;
|
|
1317
|
-
}
|
|
1318
|
-
return void 0;
|
|
1303
|
+
return findFlowFileInRoots(flowId, [...priorityRoots, ...aiResourceRoots(projectDir)]);
|
|
1319
1304
|
}
|
|
1320
1305
|
function findSkills(domain) {
|
|
1321
1306
|
const found = [];
|
|
1322
1307
|
for (const root of aiResourceRoots()) {
|
|
1323
1308
|
for (const { dir, domain: dirDomain } of assetSearchDirs(root, "skills")) {
|
|
1324
|
-
if (
|
|
1309
|
+
if (fs12__default.existsSync(dir)) walkSkills(dir, dirDomain, found);
|
|
1325
1310
|
}
|
|
1326
1311
|
}
|
|
1327
1312
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -1334,11 +1319,11 @@ function findSkills(domain) {
|
|
|
1334
1319
|
return deduped;
|
|
1335
1320
|
}
|
|
1336
1321
|
function walkSkills(dir, domain, out) {
|
|
1337
|
-
for (const entry of
|
|
1322
|
+
for (const entry of fs12__default.readdirSync(dir, { withFileTypes: true })) {
|
|
1338
1323
|
const full = path35__default.join(dir, entry.name);
|
|
1339
1324
|
if (entry.isDirectory()) {
|
|
1340
1325
|
const skillMd = path35__default.join(full, "SKILL.md");
|
|
1341
|
-
if (
|
|
1326
|
+
if (fs12__default.existsSync(skillMd)) {
|
|
1342
1327
|
out.push({ name: entry.name, path: full, skillPath: skillMd, domain });
|
|
1343
1328
|
} else {
|
|
1344
1329
|
walkSkills(full, domain, out);
|
|
@@ -1367,9 +1352,9 @@ function resolveFlowIds() {
|
|
|
1367
1352
|
}
|
|
1368
1353
|
function resolveSessionIds(projectDir) {
|
|
1369
1354
|
const sessionsDir = path35__default.join(projectDir, ".skaile", "sessions");
|
|
1370
|
-
if (!
|
|
1355
|
+
if (!fs12__default.existsSync(sessionsDir)) return [];
|
|
1371
1356
|
try {
|
|
1372
|
-
return
|
|
1357
|
+
return fs12__default.readdirSync(sessionsDir).filter((f) => f.endsWith(".json")).map((f) => f.slice(0, -".json".length));
|
|
1373
1358
|
} catch {
|
|
1374
1359
|
return [];
|
|
1375
1360
|
}
|
|
@@ -2167,7 +2152,7 @@ async function ensureTargetsRegistered(projectDir) {
|
|
|
2167
2152
|
const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
|
|
2168
2153
|
const config = resolveSkWorkspaceConfig2(projectDir);
|
|
2169
2154
|
if (config.plugins && config.plugins.length > 0) {
|
|
2170
|
-
const { ensurePluginsLoaded } = await import('../plugin-store-
|
|
2155
|
+
const { ensurePluginsLoaded } = await import('../plugin-store-5SJX2PRR.js');
|
|
2171
2156
|
const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
|
|
2172
2157
|
for (const f of result.failed) logWarn(f.error);
|
|
2173
2158
|
}
|
|
@@ -2385,7 +2370,7 @@ function pluginDir(projectDir) {
|
|
|
2385
2370
|
async function readJsonStrict(p7) {
|
|
2386
2371
|
let raw;
|
|
2387
2372
|
try {
|
|
2388
|
-
raw = await
|
|
2373
|
+
raw = await fs5.readFile(p7, "utf-8");
|
|
2389
2374
|
} catch {
|
|
2390
2375
|
return null;
|
|
2391
2376
|
}
|
|
@@ -2398,18 +2383,18 @@ async function readJsonStrict(p7) {
|
|
|
2398
2383
|
}
|
|
2399
2384
|
}
|
|
2400
2385
|
async function writeJson(p7, value) {
|
|
2401
|
-
await
|
|
2402
|
-
await
|
|
2386
|
+
await fs5.mkdir(path35__default.dirname(p7), { recursive: true });
|
|
2387
|
+
await fs5.writeFile(p7, `${JSON.stringify(value, null, 2)}
|
|
2403
2388
|
`);
|
|
2404
2389
|
}
|
|
2405
2390
|
async function copyDir(src, dest) {
|
|
2406
|
-
await
|
|
2407
|
-
const entries = await
|
|
2391
|
+
await fs5.mkdir(dest, { recursive: true });
|
|
2392
|
+
const entries = await fs5.readdir(src, { withFileTypes: true });
|
|
2408
2393
|
for (const entry of entries) {
|
|
2409
2394
|
const srcPath = path35__default.join(src, entry.name);
|
|
2410
2395
|
const destPath = path35__default.join(dest, entry.name);
|
|
2411
2396
|
if (entry.isDirectory()) await copyDir(srcPath, destPath);
|
|
2412
|
-
else await
|
|
2397
|
+
else await fs5.copyFile(srcPath, destPath);
|
|
2413
2398
|
}
|
|
2414
2399
|
}
|
|
2415
2400
|
async function install(projectDir, opts) {
|
|
@@ -2433,8 +2418,8 @@ async function installFullPlugin(projectDir) {
|
|
|
2433
2418
|
const dir = pluginDir(projectDir);
|
|
2434
2419
|
for (const [rel, content] of Object.entries(buildClaudePluginFiles())) {
|
|
2435
2420
|
const dest = path35__default.join(dir, rel);
|
|
2436
|
-
await
|
|
2437
|
-
await
|
|
2421
|
+
await fs5.mkdir(path35__default.dirname(dest), { recursive: true });
|
|
2422
|
+
await fs5.writeFile(dest, content);
|
|
2438
2423
|
}
|
|
2439
2424
|
const projectSkillsDir = path35__default.join(projectDir, ".skaile", "skills");
|
|
2440
2425
|
if (existsSync(projectSkillsDir)) {
|
|
@@ -2463,7 +2448,7 @@ async function uninstall(projectDir) {
|
|
|
2463
2448
|
}
|
|
2464
2449
|
}
|
|
2465
2450
|
if (existsSync(dir)) {
|
|
2466
|
-
await
|
|
2451
|
+
await fs5.rm(dir, { recursive: true, force: true });
|
|
2467
2452
|
changed = true;
|
|
2468
2453
|
}
|
|
2469
2454
|
const mcp = await readJsonStrict(mcpPath);
|
|
@@ -2473,7 +2458,7 @@ async function uninstall(projectDir) {
|
|
|
2473
2458
|
const updated = { ...mcp, mcpServers: rest };
|
|
2474
2459
|
if (Object.keys(rest).length === 0) delete updated.mcpServers;
|
|
2475
2460
|
if (Object.keys(updated).length === 0) {
|
|
2476
|
-
await
|
|
2461
|
+
await fs5.unlink(mcpPath);
|
|
2477
2462
|
} else {
|
|
2478
2463
|
await writeJson(mcpPath, updated);
|
|
2479
2464
|
}
|
|
@@ -2585,7 +2570,7 @@ function buildEntry(projectDir) {
|
|
|
2585
2570
|
async function readConfig(p7) {
|
|
2586
2571
|
let raw;
|
|
2587
2572
|
try {
|
|
2588
|
-
raw = await
|
|
2573
|
+
raw = await fs5.readFile(p7, "utf-8");
|
|
2589
2574
|
} catch {
|
|
2590
2575
|
return null;
|
|
2591
2576
|
}
|
|
@@ -2598,13 +2583,13 @@ async function readConfig(p7) {
|
|
|
2598
2583
|
}
|
|
2599
2584
|
}
|
|
2600
2585
|
async function writeConfig(p7, value) {
|
|
2601
|
-
await
|
|
2586
|
+
await fs5.mkdir(path35__default.dirname(p7), { recursive: true });
|
|
2602
2587
|
const cleaned = {};
|
|
2603
2588
|
for (const [k, v] of Object.entries(value)) {
|
|
2604
2589
|
if (v === void 0) continue;
|
|
2605
2590
|
cleaned[k] = v;
|
|
2606
2591
|
}
|
|
2607
|
-
await
|
|
2592
|
+
await fs5.writeFile(p7, stringify$1(cleaned));
|
|
2608
2593
|
}
|
|
2609
2594
|
function configPath(projectDir) {
|
|
2610
2595
|
return path35__default.join(projectDir, ".codex", "config.toml");
|
|
@@ -2635,7 +2620,7 @@ async function uninstall2(projectDir) {
|
|
|
2635
2620
|
const updated = { ...cfg, mcp_servers: rest };
|
|
2636
2621
|
if (Object.keys(rest).length === 0) delete updated.mcp_servers;
|
|
2637
2622
|
if (Object.keys(updated).length === 0) {
|
|
2638
|
-
await
|
|
2623
|
+
await fs5.unlink(p7);
|
|
2639
2624
|
} else {
|
|
2640
2625
|
await writeConfig(p7, updated);
|
|
2641
2626
|
}
|
|
@@ -2665,23 +2650,23 @@ async function status2(projectDir) {
|
|
|
2665
2650
|
async function install3(projectDir) {
|
|
2666
2651
|
const extDir = path35__default.join(projectDir, ".omp", "extensions");
|
|
2667
2652
|
const extPath = path35__default.join(extDir, "skaile.ts");
|
|
2668
|
-
await
|
|
2653
|
+
await fs5.mkdir(extDir, { recursive: true });
|
|
2669
2654
|
const { WorkspacePlugin } = await import('../workspace-plugin/index.js');
|
|
2670
2655
|
const plugin = new WorkspacePlugin({ projectDir });
|
|
2671
2656
|
const nextSrc = await plugin.buildOmpExtensionSource();
|
|
2672
2657
|
let prevSrc = null;
|
|
2673
2658
|
try {
|
|
2674
|
-
prevSrc = await
|
|
2659
|
+
prevSrc = await fs5.readFile(extPath, "utf-8");
|
|
2675
2660
|
} catch {
|
|
2676
2661
|
}
|
|
2677
2662
|
if (prevSrc === nextSrc) return { changed: false, method: "generated" };
|
|
2678
|
-
await
|
|
2663
|
+
await fs5.writeFile(extPath, nextSrc);
|
|
2679
2664
|
return { changed: true, method: "generated" };
|
|
2680
2665
|
}
|
|
2681
2666
|
async function uninstall3(projectDir) {
|
|
2682
2667
|
const extPath = path35__default.join(projectDir, ".omp", "extensions", "skaile.ts");
|
|
2683
2668
|
try {
|
|
2684
|
-
await
|
|
2669
|
+
await fs5.unlink(extPath);
|
|
2685
2670
|
return { changed: true };
|
|
2686
2671
|
} catch {
|
|
2687
2672
|
return { changed: false };
|
|
@@ -2995,9 +2980,9 @@ async function indexLibrary(lib, index) {
|
|
|
2995
2980
|
}
|
|
2996
2981
|
function domainPublisher(libraryPath, domain) {
|
|
2997
2982
|
const domainFile = path35.join(libraryPath, domain, "DOMAIN.md");
|
|
2998
|
-
if (!
|
|
2983
|
+
if (!fs12.existsSync(domainFile)) return void 0;
|
|
2999
2984
|
try {
|
|
3000
|
-
const { data } = parseFrontmatter(
|
|
2985
|
+
const { data } = parseFrontmatter(fs12.readFileSync(domainFile, "utf8"));
|
|
3001
2986
|
const pub = data.publisher;
|
|
3002
2987
|
return typeof pub === "string" && pub.trim() ? pub.trim() : void 0;
|
|
3003
2988
|
} catch {
|
|
@@ -3082,7 +3067,7 @@ function makeLibraryCommand() {
|
|
|
3082
3067
|
const { manager, close } = await openLibraryManager();
|
|
3083
3068
|
try {
|
|
3084
3069
|
if (opts.git) {
|
|
3085
|
-
|
|
3070
|
+
fs12.mkdirSync(libPath, { recursive: true });
|
|
3086
3071
|
await manager.addLibrary({
|
|
3087
3072
|
name,
|
|
3088
3073
|
path: libPath,
|
|
@@ -3091,7 +3076,7 @@ function makeLibraryCommand() {
|
|
|
3091
3076
|
ownership
|
|
3092
3077
|
});
|
|
3093
3078
|
} else {
|
|
3094
|
-
|
|
3079
|
+
fs12.mkdirSync(libPath, { recursive: true });
|
|
3095
3080
|
await manager.addLibrary({
|
|
3096
3081
|
name,
|
|
3097
3082
|
path: libPath,
|
|
@@ -3243,7 +3228,7 @@ function makeLibraryCommand() {
|
|
|
3243
3228
|
logErr(`Domain "${name}" not found in "${target.name}" (no ${domainFile}).`);
|
|
3244
3229
|
process.exit(1);
|
|
3245
3230
|
}
|
|
3246
|
-
console.log(
|
|
3231
|
+
console.log(fs12.readFileSync(domainFile, "utf8"));
|
|
3247
3232
|
} finally {
|
|
3248
3233
|
close();
|
|
3249
3234
|
}
|
|
@@ -3263,11 +3248,11 @@ function makeLibraryCommand() {
|
|
|
3263
3248
|
const lib = await manager.requireLibrary(oldName);
|
|
3264
3249
|
const parent = path35.dirname(lib.path);
|
|
3265
3250
|
const newPath = path35.join(parent, newName);
|
|
3266
|
-
if (
|
|
3251
|
+
if (fs12.existsSync(newPath)) {
|
|
3267
3252
|
logErr(`Target directory already exists: ${newPath}`);
|
|
3268
3253
|
process.exit(1);
|
|
3269
3254
|
}
|
|
3270
|
-
|
|
3255
|
+
fs12.renameSync(lib.path, newPath);
|
|
3271
3256
|
await manager.updateLibrary(lib.id, { name: newName, path: newPath });
|
|
3272
3257
|
logOk(`Renamed ${oldName} \u2192 ${newName}`);
|
|
3273
3258
|
} finally {
|
|
@@ -3422,16 +3407,16 @@ function makeLibraryCommand() {
|
|
|
3422
3407
|
});
|
|
3423
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(
|
|
3424
3409
|
async (lib, opts) => {
|
|
3425
|
-
const { runLibraryPublish } = await import('../library-publish-
|
|
3410
|
+
const { runLibraryPublish } = await import('../library-publish-HDYBQF46.js');
|
|
3426
3411
|
await withStoreErrorHandling(() => runLibraryPublish(lib, opts));
|
|
3427
3412
|
}
|
|
3428
3413
|
);
|
|
3429
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) => {
|
|
3430
|
-
const { runLibraryRegister } = await import('../library-publish-
|
|
3415
|
+
const { runLibraryRegister } = await import('../library-publish-HDYBQF46.js');
|
|
3431
3416
|
await withStoreErrorHandling(() => runLibraryRegister(lib, opts));
|
|
3432
3417
|
});
|
|
3433
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) => {
|
|
3434
|
-
const { runLibraryYank } = await import('../library-publish-
|
|
3419
|
+
const { runLibraryYank } = await import('../library-publish-HDYBQF46.js');
|
|
3435
3420
|
await withStoreErrorHandling(() => runLibraryYank(lib, opts));
|
|
3436
3421
|
});
|
|
3437
3422
|
return cmd;
|
|
@@ -3448,24 +3433,24 @@ function stampAssetPublisher(assetDir, publisher) {
|
|
|
3448
3433
|
const markers = ["SKILL.md", "AGENT.md", "CONTRACT.md"];
|
|
3449
3434
|
let markerFile;
|
|
3450
3435
|
for (const m of markers) {
|
|
3451
|
-
if (
|
|
3436
|
+
if (fs12.existsSync(path35.join(assetDir, m))) {
|
|
3452
3437
|
markerFile = path35.join(assetDir, m);
|
|
3453
3438
|
break;
|
|
3454
3439
|
}
|
|
3455
3440
|
}
|
|
3456
3441
|
if (!markerFile) {
|
|
3457
|
-
const promptMd =
|
|
3442
|
+
const promptMd = fs12.readdirSync(assetDir).find((f) => f.endsWith(".prompt.md"));
|
|
3458
3443
|
if (promptMd) markerFile = path35.join(assetDir, promptMd);
|
|
3459
3444
|
}
|
|
3460
3445
|
if (!markerFile) return;
|
|
3461
3446
|
try {
|
|
3462
|
-
const { data, body } = parseFrontmatter(
|
|
3447
|
+
const { data, body } = parseFrontmatter(fs12.readFileSync(markerFile, "utf8"));
|
|
3463
3448
|
const meta = data.metadata && typeof data.metadata === "object" && !Array.isArray(data.metadata) ? { ...data.metadata } : {};
|
|
3464
3449
|
if (meta.publisher != null) return;
|
|
3465
3450
|
meta.publisher = publisher;
|
|
3466
3451
|
data.metadata = meta;
|
|
3467
3452
|
const fm = stringify(data).trimEnd();
|
|
3468
|
-
|
|
3453
|
+
fs12.writeFileSync(markerFile, `---
|
|
3469
3454
|
${fm}
|
|
3470
3455
|
---
|
|
3471
3456
|
|
|
@@ -4153,7 +4138,7 @@ function scheduleSoftDepPreview() {
|
|
|
4153
4138
|
}
|
|
4154
4139
|
async function loadAssets() {
|
|
4155
4140
|
softDepPreviewCache.clear();
|
|
4156
|
-
const { gatherAssetFeeds } = await import('../asset-feeds-
|
|
4141
|
+
const { gatherAssetFeeds } = await import('../asset-feeds-SILUSNAL.js');
|
|
4157
4142
|
const { entries, domains, notes } = await gatherAssetFeeds(am, am.projectDir);
|
|
4158
4143
|
if (notes.length > 0) {
|
|
4159
4144
|
state.message = notes.map((n) => `[${n.feed}] ${n.message}`).join(" \u2022 ");
|
|
@@ -4359,7 +4344,7 @@ function reconcileCollapsedSets(rows) {
|
|
|
4359
4344
|
async function loadSourcesAndLibraries() {
|
|
4360
4345
|
try {
|
|
4361
4346
|
const [{ openLibraryManager: openLibraryManager2 }, { skaileHomeDir }, { getGlobalCacheDir: getGlobalCacheDir2 }] = await Promise.all([
|
|
4362
|
-
import('../open-library-
|
|
4347
|
+
import('../open-library-LAUJOTYJ.js'),
|
|
4363
4348
|
import('../library/index.js'),
|
|
4364
4349
|
import('../core/index.js')
|
|
4365
4350
|
]);
|
|
@@ -5648,7 +5633,7 @@ function action2(fn) {
|
|
|
5648
5633
|
};
|
|
5649
5634
|
}
|
|
5650
5635
|
async function reconcileAndReport(projectDir, plugins) {
|
|
5651
|
-
const { reconcilePlugins } = await import('../plugin-store-
|
|
5636
|
+
const { reconcilePlugins } = await import('../plugin-store-5SJX2PRR.js');
|
|
5652
5637
|
if (plugins.length === 0) {
|
|
5653
5638
|
logInfo("No plugins declared \u2014 nothing to reconcile.");
|
|
5654
5639
|
return;
|
|
@@ -5664,7 +5649,7 @@ async function reconcileAndReport(projectDir, plugins) {
|
|
|
5664
5649
|
async function runInstall2(spec, opts) {
|
|
5665
5650
|
const projectDir = path35__default.resolve(opts.projectDir);
|
|
5666
5651
|
const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
|
|
5667
|
-
const { specName } = await import('../plugin-store-
|
|
5652
|
+
const { specName } = await import('../plugin-store-5SJX2PRR.js');
|
|
5668
5653
|
const yamlPath = path35__default.join(projectDir, "skaile.yaml");
|
|
5669
5654
|
const editor = WorkspaceYamlEditor2.load(yamlPath);
|
|
5670
5655
|
const replaced = editor.addPlugin(spec, specName);
|
|
@@ -5676,7 +5661,7 @@ async function runInstall2(spec, opts) {
|
|
|
5676
5661
|
async function runRemove(name, opts) {
|
|
5677
5662
|
const projectDir = path35__default.resolve(opts.projectDir);
|
|
5678
5663
|
const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
|
|
5679
|
-
const { specName } = await import('../plugin-store-
|
|
5664
|
+
const { specName } = await import('../plugin-store-5SJX2PRR.js');
|
|
5680
5665
|
const yamlPath = path35__default.join(projectDir, "skaile.yaml");
|
|
5681
5666
|
const editor = WorkspaceYamlEditor2.load(yamlPath);
|
|
5682
5667
|
const removed = editor.removePlugin(name, specName);
|
|
@@ -5704,7 +5689,7 @@ async function runList(opts) {
|
|
|
5704
5689
|
const registry = createPluginRegistry();
|
|
5705
5690
|
if (declared.length > 0) {
|
|
5706
5691
|
try {
|
|
5707
|
-
const { loadPlugins } = await import('../plugin-store-
|
|
5692
|
+
const { loadPlugins } = await import('../plugin-store-5SJX2PRR.js');
|
|
5708
5693
|
const result = await loadPlugins(projectDir, declared, registry);
|
|
5709
5694
|
for (const f of result.failed) logWarn(f.error);
|
|
5710
5695
|
} catch (err) {
|
|
@@ -6588,17 +6573,7 @@ function makeRunCommand() {
|
|
|
6588
6573
|
const driver = config.driver ?? "omp";
|
|
6589
6574
|
const model = config.model;
|
|
6590
6575
|
const provider = config.provider;
|
|
6591
|
-
const
|
|
6592
|
-
let dir = projectDir;
|
|
6593
|
-
for (let i = 0; i < 6; i++) {
|
|
6594
|
-
const candidate = path35__default.join(dir, "ai-assets");
|
|
6595
|
-
if (fs13__default.existsSync(candidate)) {
|
|
6596
|
-
priorityRoots.push(candidate);
|
|
6597
|
-
break;
|
|
6598
|
-
}
|
|
6599
|
-
dir = path35__default.dirname(dir);
|
|
6600
|
-
}
|
|
6601
|
-
const flowPath = findFlowFile(flowId, priorityRoots, projectDir);
|
|
6576
|
+
const flowPath = findFlowFile(flowId, projectAiAssetsRoots(projectDir), projectDir);
|
|
6602
6577
|
if (!flowPath) {
|
|
6603
6578
|
const textPrompt = positional.join(" ");
|
|
6604
6579
|
if (!textPrompt.trim()) {
|
|
@@ -6751,13 +6726,13 @@ function makeReplCommand() {
|
|
|
6751
6726
|
p5.cancel("Cancelled.");
|
|
6752
6727
|
process.exit(0);
|
|
6753
6728
|
}
|
|
6754
|
-
const tmpDir =
|
|
6729
|
+
const tmpDir = fs12__default.mkdtempSync(path35__default.join(os2.tmpdir(), "skaile-repl-"));
|
|
6755
6730
|
projectDir = tmpDir;
|
|
6756
6731
|
agentCwd = userCwd;
|
|
6757
6732
|
logOk(`Temporary workspace: ${S.cmd(tmpDir)}`);
|
|
6758
6733
|
if (!driverOverride) {
|
|
6759
6734
|
const claudeDir = path35__default.join(os2.homedir(), ".claude");
|
|
6760
|
-
if (
|
|
6735
|
+
if (fs12__default.existsSync(claudeDir)) {
|
|
6761
6736
|
driverOverride = "claude-sdk";
|
|
6762
6737
|
logInfo(`Detected ${S.cmd("~/.claude")} \u2192 using ${S.cmd("claude-sdk")} backend`);
|
|
6763
6738
|
} else {
|
|
@@ -6803,12 +6778,12 @@ function makeServeCommand() {
|
|
|
6803
6778
|
);
|
|
6804
6779
|
}
|
|
6805
6780
|
async function ensurePluginsLoadedForServe(projectDir) {
|
|
6806
|
-
const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-
|
|
6781
|
+
const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-XDIMXDTI.js');
|
|
6807
6782
|
try {
|
|
6808
6783
|
const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
|
|
6809
6784
|
const config = resolveSkWorkspaceConfig2(projectDir);
|
|
6810
6785
|
if (!config.plugins || config.plugins.length === 0) return;
|
|
6811
|
-
const { ensurePluginsLoaded } = await import('../plugin-store-
|
|
6786
|
+
const { ensurePluginsLoaded } = await import('../plugin-store-5SJX2PRR.js');
|
|
6812
6787
|
const { pluginRegistry } = await import('../plugin-registry/index.js');
|
|
6813
6788
|
const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
|
|
6814
6789
|
if (result.loaded.length > 0) {
|
|
@@ -6822,14 +6797,14 @@ async function ensurePluginsLoadedForServe(projectDir) {
|
|
|
6822
6797
|
}
|
|
6823
6798
|
}
|
|
6824
6799
|
async function runCompileTest(opts) {
|
|
6825
|
-
const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-
|
|
6800
|
+
const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-XDIMXDTI.js');
|
|
6826
6801
|
const { tmpdir } = await import('os');
|
|
6827
6802
|
const { dirname: dirname4, join: join7, resolve: resolve5 } = await import('path');
|
|
6828
6803
|
const { fileURLToPath: fileURLToPath2 } = await import('url');
|
|
6829
6804
|
const { unlinkSync, existsSync: existsSync15 } = await import('fs');
|
|
6830
6805
|
const { spawn } = await import('child_process');
|
|
6831
6806
|
const { portableSpawnSync: portableSpawnSync2 } = await import('../core/index.js');
|
|
6832
|
-
const { MONOREPO_ROOT } = await import('../paths-
|
|
6807
|
+
const { MONOREPO_ROOT } = await import('../paths-S7UESJKT.js');
|
|
6833
6808
|
if (MONOREPO_ROOT === null) {
|
|
6834
6809
|
logErr2("--compile-test is only available inside the skaile-dev workspace.");
|
|
6835
6810
|
logInfo2("Run it from a checkout of skaile-ai/skaile-dev (the monorepo shell).");
|
|
@@ -7622,12 +7597,12 @@ function showOverview(am2) {
|
|
|
7622
7597
|
}
|
|
7623
7598
|
async function showAsset(am2, kind, name) {
|
|
7624
7599
|
const entry = await am2.info(`${kind}:${name}`);
|
|
7625
|
-
if (entry?.source &&
|
|
7600
|
+
if (entry?.source && fs12__default.existsSync(entry.source)) {
|
|
7626
7601
|
console.log();
|
|
7627
7602
|
console.log(` ${kindColor(entry.kind)} ${S.heading(entry.name)}`);
|
|
7628
7603
|
console.log(` ${S.rule(40)}`);
|
|
7629
7604
|
console.log();
|
|
7630
|
-
console.log(
|
|
7605
|
+
console.log(fs12__default.readFileSync(entry.source, "utf-8"));
|
|
7631
7606
|
return;
|
|
7632
7607
|
}
|
|
7633
7608
|
logErr(`Asset not found: ${kind}:${name}`);
|
|
@@ -7704,7 +7679,7 @@ function makeStoreCommand() {
|
|
|
7704
7679
|
process.exit(2);
|
|
7705
7680
|
});
|
|
7706
7681
|
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) => {
|
|
7707
|
-
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-
|
|
7682
|
+
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-LAUJOTYJ.js');
|
|
7708
7683
|
try {
|
|
7709
7684
|
const remote = await openCatalogSource2({ projectDir: path35__default.resolve(opts.projectDir) });
|
|
7710
7685
|
const assets = await remote.listAssets(opts.kind ? { kind: opts.kind } : {});
|
|
@@ -7737,8 +7712,8 @@ function makeStoreCommand() {
|
|
|
7737
7712
|
}
|
|
7738
7713
|
});
|
|
7739
7714
|
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) => {
|
|
7740
|
-
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-
|
|
7741
|
-
const { supportsInstallManifest } = await import('../project-
|
|
7715
|
+
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-LAUJOTYJ.js');
|
|
7716
|
+
const { supportsInstallManifest } = await import('../project-6IW2N3MX.js');
|
|
7742
7717
|
try {
|
|
7743
7718
|
const remote = await openCatalogSource2({ projectDir: path35__default.resolve(opts.projectDir) });
|
|
7744
7719
|
const asset = await remote.resolve(ref);
|
|
@@ -7953,7 +7928,7 @@ function findManifestCandidates(rootPath) {
|
|
|
7953
7928
|
function walk(dir) {
|
|
7954
7929
|
let entries;
|
|
7955
7930
|
try {
|
|
7956
|
-
entries =
|
|
7931
|
+
entries = fs12__default.readdirSync(dir, { withFileTypes: true });
|
|
7957
7932
|
} catch {
|
|
7958
7933
|
return;
|
|
7959
7934
|
}
|
|
@@ -7999,7 +7974,7 @@ function checkManifestIdentity(kind, parsed) {
|
|
|
7999
7974
|
return null;
|
|
8000
7975
|
}
|
|
8001
7976
|
function parseManifestCandidate(c, absRoot) {
|
|
8002
|
-
const content =
|
|
7977
|
+
const content = fs12__default.readFileSync(c.filePath, "utf-8");
|
|
8003
7978
|
if (c.filePath.endsWith(".md")) {
|
|
8004
7979
|
const parsed = parseMdFrontmatter(content);
|
|
8005
7980
|
if (parsed === null) {
|
|
@@ -8055,7 +8030,7 @@ function validateManifestCandidate(c, parsed, absRoot, registry, strictConforman
|
|
|
8055
8030
|
}
|
|
8056
8031
|
function validateManifests(rootPath, strictConformance) {
|
|
8057
8032
|
const absRoot = path35__default.resolve(rootPath);
|
|
8058
|
-
if (!
|
|
8033
|
+
if (!fs12__default.existsSync(absRoot)) {
|
|
8059
8034
|
logErr(`Path does not exist: ${absRoot}`);
|
|
8060
8035
|
return { total: 0, errors: 1, warnings: 0 };
|
|
8061
8036
|
}
|
|
@@ -8087,7 +8062,7 @@ function findWorkspaceManifests(rootPath) {
|
|
|
8087
8062
|
function walk(dir) {
|
|
8088
8063
|
let entries;
|
|
8089
8064
|
try {
|
|
8090
|
-
entries =
|
|
8065
|
+
entries = fs12__default.readdirSync(dir, { withFileTypes: true });
|
|
8091
8066
|
} catch {
|
|
8092
8067
|
return;
|
|
8093
8068
|
}
|
|
@@ -8162,7 +8137,7 @@ function validateWorkspaceManifests(rootPath) {
|
|
|
8162
8137
|
const relPath = path35__default.relative(absRoot, file);
|
|
8163
8138
|
let parsed;
|
|
8164
8139
|
try {
|
|
8165
|
-
parsed = parse(
|
|
8140
|
+
parsed = parse(fs12__default.readFileSync(file, "utf-8")) ?? {};
|
|
8166
8141
|
} catch (e) {
|
|
8167
8142
|
logErr(`${relPath} \u2014 parse error: ${e instanceof Error ? e.message : String(e)}`);
|
|
8168
8143
|
errors++;
|
|
@@ -8176,34 +8151,34 @@ function validateWorkspaceManifests(rootPath) {
|
|
|
8176
8151
|
var EXCLUDED_DOMAINS = /* @__PURE__ */ new Set(["skaileup-shared", "external", "docs"]);
|
|
8177
8152
|
function collectAssetVersions() {
|
|
8178
8153
|
const assets = [];
|
|
8179
|
-
if (!
|
|
8180
|
-
const domains =
|
|
8154
|
+
if (!fs12__default.existsSync(AI_RESOURCES)) return assets;
|
|
8155
|
+
const domains = fs12__default.readdirSync(AI_RESOURCES, { withFileTypes: true }).filter((d) => d.isDirectory() && !EXCLUDED_DOMAINS.has(d.name));
|
|
8181
8156
|
for (const d of domains) {
|
|
8182
8157
|
const domainDir = path35__default.join(AI_RESOURCES, d.name);
|
|
8183
8158
|
const skillsDir = path35__default.join(domainDir, "skills");
|
|
8184
|
-
if (
|
|
8159
|
+
if (fs12__default.existsSync(skillsDir)) {
|
|
8185
8160
|
collectSkillVersions(skillsDir, d.name, assets);
|
|
8186
8161
|
}
|
|
8187
8162
|
const agentsDir = path35__default.join(domainDir, "agents");
|
|
8188
|
-
if (
|
|
8163
|
+
if (fs12__default.existsSync(agentsDir)) {
|
|
8189
8164
|
collectAgentVersions(agentsDir, d.name, assets);
|
|
8190
8165
|
}
|
|
8191
8166
|
const flowsDir = path35__default.join(domainDir, "flows");
|
|
8192
|
-
if (
|
|
8167
|
+
if (fs12__default.existsSync(flowsDir)) {
|
|
8193
8168
|
collectFlowVersions(flowsDir, d.name, assets);
|
|
8194
8169
|
}
|
|
8195
8170
|
const promptsDir = path35__default.join(domainDir, "prompts");
|
|
8196
|
-
if (
|
|
8171
|
+
if (fs12__default.existsSync(promptsDir)) {
|
|
8197
8172
|
collectPromptVersions(promptsDir, d.name, assets);
|
|
8198
8173
|
}
|
|
8199
8174
|
}
|
|
8200
8175
|
return assets;
|
|
8201
8176
|
}
|
|
8202
8177
|
function collectFlowVersions(dir, domain, out) {
|
|
8203
|
-
for (const f of
|
|
8178
|
+
for (const f of fs12__default.readdirSync(dir)) {
|
|
8204
8179
|
if (!f.endsWith(".flow.yaml")) continue;
|
|
8205
8180
|
const fp = path35__default.join(dir, f);
|
|
8206
|
-
const content =
|
|
8181
|
+
const content = fs12__default.readFileSync(fp, "utf-8");
|
|
8207
8182
|
const parsed = parse(content);
|
|
8208
8183
|
out.push({
|
|
8209
8184
|
kind: "flow",
|
|
@@ -8215,10 +8190,10 @@ function collectFlowVersions(dir, domain, out) {
|
|
|
8215
8190
|
}
|
|
8216
8191
|
}
|
|
8217
8192
|
function collectPromptVersions(dir, domain, out) {
|
|
8218
|
-
for (const f of
|
|
8193
|
+
for (const f of fs12__default.readdirSync(dir)) {
|
|
8219
8194
|
if (!f.endsWith(".prompt.md")) continue;
|
|
8220
8195
|
const fp = path35__default.join(dir, f);
|
|
8221
|
-
const content =
|
|
8196
|
+
const content = fs12__default.readFileSync(fp, "utf-8");
|
|
8222
8197
|
const fm = parseSkillFrontmatter(content);
|
|
8223
8198
|
out.push({
|
|
8224
8199
|
kind: "prompt",
|
|
@@ -8230,12 +8205,12 @@ function collectPromptVersions(dir, domain, out) {
|
|
|
8230
8205
|
}
|
|
8231
8206
|
}
|
|
8232
8207
|
function collectSkillVersions(dir, domain, out) {
|
|
8233
|
-
for (const entry of
|
|
8208
|
+
for (const entry of fs12__default.readdirSync(dir, { withFileTypes: true })) {
|
|
8234
8209
|
if (!entry.isDirectory()) continue;
|
|
8235
8210
|
const full = path35__default.join(dir, entry.name);
|
|
8236
8211
|
const skillMd = path35__default.join(full, "SKILL.md");
|
|
8237
|
-
if (
|
|
8238
|
-
const content =
|
|
8212
|
+
if (fs12__default.existsSync(skillMd)) {
|
|
8213
|
+
const content = fs12__default.readFileSync(skillMd, "utf-8");
|
|
8239
8214
|
const fm = parseSkillFrontmatter(content);
|
|
8240
8215
|
out.push({
|
|
8241
8216
|
kind: "skill",
|
|
@@ -8250,11 +8225,11 @@ function collectSkillVersions(dir, domain, out) {
|
|
|
8250
8225
|
}
|
|
8251
8226
|
}
|
|
8252
8227
|
function collectAgentVersions(dir, domain, out) {
|
|
8253
|
-
for (const entry of
|
|
8228
|
+
for (const entry of fs12__default.readdirSync(dir, { withFileTypes: true })) {
|
|
8254
8229
|
if (!entry.isDirectory()) continue;
|
|
8255
8230
|
const agentYaml = path35__default.join(dir, entry.name, "agent.yaml");
|
|
8256
|
-
if (!
|
|
8257
|
-
const content =
|
|
8231
|
+
if (!fs12__default.existsSync(agentYaml)) continue;
|
|
8232
|
+
const content = fs12__default.readFileSync(agentYaml, "utf-8");
|
|
8258
8233
|
const parsed = parse(content);
|
|
8259
8234
|
out.push({
|
|
8260
8235
|
kind: "agent",
|
|
@@ -8806,10 +8781,10 @@ async function initGitScaffold(resolved, created) {
|
|
|
8806
8781
|
}
|
|
8807
8782
|
async function bootstrapUserConfig() {
|
|
8808
8783
|
try {
|
|
8809
|
-
const
|
|
8784
|
+
const fs13 = await import('fs');
|
|
8810
8785
|
const { userConfigPath, saveConfig, getConfigDefaults } = await import('../library/index.js');
|
|
8811
8786
|
const userCfgPath = userConfigPath();
|
|
8812
|
-
if (!
|
|
8787
|
+
if (!fs13.existsSync(userCfgPath)) {
|
|
8813
8788
|
const defaults = getConfigDefaults();
|
|
8814
8789
|
saveConfig(userCfgPath, {
|
|
8815
8790
|
catalog: { url: defaults.catalog.url, cache_ttl: defaults.catalog.cache_ttl }
|
|
@@ -8824,7 +8799,7 @@ async function bootstrapUserConfig() {
|
|
|
8824
8799
|
}
|
|
8825
8800
|
async function hydrateInitSources(resolved, created) {
|
|
8826
8801
|
try {
|
|
8827
|
-
const { ensureSourcesCloned } = await import('../ensure-sources-
|
|
8802
|
+
const { ensureSourcesCloned } = await import('../ensure-sources-SZABN3WG.js');
|
|
8828
8803
|
const hydrate = ensureSourcesCloned(resolved, { quiet: true });
|
|
8829
8804
|
for (const n of hydrate.cloned) created.push(`~/.skaile/cache/sources/${n}/`);
|
|
8830
8805
|
if (hydrate.failed.length > 0) {
|
|
@@ -8864,7 +8839,7 @@ function printInitSummary(resolved, projectDir, created) {
|
|
|
8864
8839
|
console.log();
|
|
8865
8840
|
}
|
|
8866
8841
|
program.command("setup").description("Interactive provider setup wizard").action(async () => {
|
|
8867
|
-
const { cmdSetup } = await import('../setup-
|
|
8842
|
+
const { cmdSetup } = await import('../setup-YA2QHQ2N.js');
|
|
8868
8843
|
await cmdSetup([], { projectDir: process.cwd() });
|
|
8869
8844
|
});
|
|
8870
8845
|
program.addCommand(makeInstallCommand());
|