@kb-labs/shared-command-kit 2.16.0 → 2.17.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.
- package/dist/analytics/index.js.map +1 -1
- package/dist/errors/index.js.map +1 -1
- package/dist/flags/index.js.map +1 -1
- package/dist/helpers/index.d.ts +27 -1
- package/dist/helpers/index.js +9 -2
- package/dist/helpers/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { platformContext } from '@kb-labs/plugin-contracts';
|
|
1
|
+
import { platformContext, runtimeContext } from '@kb-labs/plugin-contracts';
|
|
2
2
|
import { platform } from '@kb-labs/core-runtime';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import * as fs from 'fs/promises';
|
|
@@ -878,6 +878,13 @@ function isCacheAvailable() {
|
|
|
878
878
|
const cache = useCache();
|
|
879
879
|
return !!cache;
|
|
880
880
|
}
|
|
881
|
+
function useEnv(key) {
|
|
882
|
+
const runtime = runtimeContext.getStore();
|
|
883
|
+
if (runtime?.env) {
|
|
884
|
+
return runtime.env(key);
|
|
885
|
+
}
|
|
886
|
+
return process.env[key];
|
|
887
|
+
}
|
|
881
888
|
|
|
882
889
|
// src/define-system-command.ts
|
|
883
890
|
function convertFlagSchema(schema2) {
|
|
@@ -1546,6 +1553,6 @@ var MessageRouter = class {
|
|
|
1546
1553
|
}
|
|
1547
1554
|
};
|
|
1548
1555
|
|
|
1549
|
-
export { FlagValidationError, MessageBuilder, MessageRouter, PluginError, array, artifactId, boolean, commandId, commonErrors, createAnalyticsWrapper, cwd, datetime, defineAction, defineCommand, defineCommandFlags, defineDestroyHandler, defineError, defineFlags, defineHandler, defineJob, defineManifest, defineMessage, defineRoute, defineSetupHandler, defineSystemCommand, defineSystemCommandGroup, defineWebSocket, defineWebhook, email, enumSchema, filePath, formatError, getLLMTier, isCLIHost, isCacheAvailable, isEmbeddingsAvailable, isLLMAvailable, isPlatformConfigured, isRESTHost, isVectorStoreAvailable, isWSHost, isWebhookHost, isWorkflowHost, json, nonNegativeInt, object, pluginId, positiveInt, schema, scopeId, text, trackAnalyticsEvent, trackEvent, url, useAnalytics, useCache, useConfig, useEmbeddings, useLLM, useLogger, useLoggerWithContext, usePlatform, useStorage, useVectorStore, uuid, validateFlags, validateFlagsSafe, withAnalytics };
|
|
1556
|
+
export { FlagValidationError, MessageBuilder, MessageRouter, PluginError, array, artifactId, boolean, commandId, commonErrors, createAnalyticsWrapper, cwd, datetime, defineAction, defineCommand, defineCommandFlags, defineDestroyHandler, defineError, defineFlags, defineHandler, defineJob, defineManifest, defineMessage, defineRoute, defineSetupHandler, defineSystemCommand, defineSystemCommandGroup, defineWebSocket, defineWebhook, email, enumSchema, filePath, formatError, getLLMTier, isCLIHost, isCacheAvailable, isEmbeddingsAvailable, isLLMAvailable, isPlatformConfigured, isRESTHost, isVectorStoreAvailable, isWSHost, isWebhookHost, isWorkflowHost, json, nonNegativeInt, object, pluginId, positiveInt, schema, scopeId, text, trackAnalyticsEvent, trackEvent, url, useAnalytics, useCache, useConfig, useEmbeddings, useEnv, useLLM, useLogger, useLoggerWithContext, usePlatform, useStorage, useVectorStore, uuid, validateFlags, validateFlagsSafe, withAnalytics };
|
|
1550
1557
|
//# sourceMappingURL=index.js.map
|
|
1551
1558
|
//# sourceMappingURL=index.js.map
|